@davidsouther/jiffies 2.2.4 → 2.3.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 (367) hide show
  1. package/LICENSE +1 -1
  2. package/lib/cjs/assert.d.ts +2 -2
  3. package/lib/cjs/awaitable.d.ts +1 -1
  4. package/lib/cjs/components/button_bar.d.ts +2 -2
  5. package/lib/cjs/components/inline_edit.d.ts +2 -2
  6. package/lib/cjs/components/logger.d.ts +1 -1
  7. package/lib/cjs/components/select.d.ts +4 -7
  8. package/lib/cjs/components/test.d.ts +1 -1
  9. package/lib/cjs/components/virtual_scroll.d.ts +6 -4
  10. package/lib/cjs/context.d.ts +5 -9
  11. package/lib/cjs/debounce.d.ts +1 -1
  12. package/lib/cjs/diff.d.ts +2 -2
  13. package/lib/cjs/display.d.ts +1 -1
  14. package/lib/cjs/dom/css/border.d.ts +2 -2
  15. package/lib/cjs/dom/css/constants.d.ts +3 -3
  16. package/lib/cjs/dom/css/core.d.ts +1 -1
  17. package/lib/cjs/dom/css/fstyle.d.ts +2 -2
  18. package/lib/cjs/dom/css/sizing.d.ts +2 -2
  19. package/lib/cjs/dom/dom.d.ts +8 -8
  20. package/lib/cjs/dom/fc.d.ts +8 -12
  21. package/lib/cjs/dom/form/form.d.ts +5 -6
  22. package/lib/cjs/dom/html.d.ts +112 -113
  23. package/lib/cjs/dom/observable.d.ts +1 -1
  24. package/lib/cjs/dom/provide.d.ts +1 -1
  25. package/lib/cjs/dom/router/router.d.ts +2 -2
  26. package/lib/cjs/dom/svg.d.ts +64 -64
  27. package/lib/cjs/dom/types/css.d.ts +10 -32
  28. package/lib/cjs/dom/types/html.d.ts +4 -6
  29. package/lib/cjs/equal.d.ts +8 -5
  30. package/lib/cjs/flags.d.ts +1 -1
  31. package/lib/cjs/fs.d.ts +3 -3
  32. package/lib/cjs/fs_node.d.ts +1 -1
  33. package/lib/cjs/lock.d.ts +1 -1
  34. package/lib/cjs/log.d.ts +9 -9
  35. package/lib/cjs/observable/event.d.ts +2 -2
  36. package/lib/cjs/observable/observable.d.ts +37 -35
  37. package/lib/cjs/result.d.ts +21 -21
  38. package/lib/cjs/safe.d.ts +1 -1
  39. package/lib/cjs/scope/describe.d.ts +4 -4
  40. package/lib/cjs/scope/display/console.d.ts +1 -1
  41. package/lib/cjs/scope/display/dom.d.ts +2 -2
  42. package/lib/cjs/scope/display/junit.d.ts +1 -1
  43. package/lib/cjs/scope/execute.d.ts +2 -2
  44. package/lib/cjs/scope/index.d.ts +3 -3
  45. package/lib/cjs/scope/scope.d.ts +3 -3
  46. package/lib/cjs/scope/state.d.ts +1 -1
  47. package/lib/cjs/server/http/apps.d.ts +1 -1
  48. package/lib/cjs/server/http/css.d.ts +1 -1
  49. package/lib/cjs/server/http/index.d.ts +4 -9
  50. package/lib/cjs/server/http/response.d.ts +3 -3
  51. package/lib/cjs/server/http/sitemap.d.ts +1 -1
  52. package/lib/cjs/server/http/static.d.ts +1 -1
  53. package/lib/cjs/server/http/typescript.d.ts +1 -1
  54. package/lib/cjs/test_all.d.ts +9 -9
  55. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  56. package/lib/esm/assert.d.ts +2 -2
  57. package/lib/esm/awaitable.d.ts +1 -1
  58. package/lib/esm/components/button_bar.d.ts +2 -2
  59. package/lib/esm/components/inline_edit.d.ts +2 -2
  60. package/lib/esm/components/logger.d.ts +1 -1
  61. package/lib/esm/components/select.d.ts +3 -3
  62. package/lib/esm/components/test.d.ts +1 -1
  63. package/lib/esm/components/virtual_scroll.d.ts +6 -4
  64. package/lib/esm/context.d.ts +5 -9
  65. package/lib/esm/debounce.d.ts +1 -2
  66. package/lib/esm/diff.d.ts +2 -2
  67. package/lib/esm/display.d.ts +1 -1
  68. package/lib/esm/dom/css/border.d.ts +2 -2
  69. package/lib/esm/dom/css/constants.d.ts +3 -3
  70. package/lib/esm/dom/css/core.d.ts +1 -1
  71. package/lib/esm/dom/css/fstyle.d.ts +2 -2
  72. package/lib/esm/dom/css/sizing.d.ts +2 -2
  73. package/lib/esm/dom/dom.d.ts +8 -8
  74. package/lib/esm/dom/fc.d.ts +8 -12
  75. package/lib/esm/dom/form/form.d.ts +5 -6
  76. package/lib/esm/dom/html.d.ts +112 -113
  77. package/lib/esm/dom/observable.d.ts +1 -1
  78. package/lib/esm/dom/provide.d.ts +1 -1
  79. package/lib/esm/dom/router/router.d.ts +2 -2
  80. package/lib/esm/dom/svg.d.ts +64 -64
  81. package/lib/esm/dom/types/css.d.ts +10 -32
  82. package/lib/esm/dom/types/html.d.ts +4 -6
  83. package/lib/esm/equal.d.ts +8 -5
  84. package/lib/esm/flags.d.ts +1 -1
  85. package/lib/esm/fs.d.ts +3 -3
  86. package/lib/esm/fs_node.d.ts +1 -1
  87. package/lib/esm/lock.d.ts +1 -1
  88. package/lib/esm/log.d.ts +9 -9
  89. package/lib/esm/observable/event.d.ts +2 -2
  90. package/lib/esm/observable/observable.d.ts +37 -35
  91. package/lib/esm/result.d.ts +21 -21
  92. package/lib/esm/safe.d.ts +1 -1
  93. package/lib/esm/scope/describe.d.ts +4 -4
  94. package/lib/esm/scope/display/console.d.ts +1 -1
  95. package/lib/esm/scope/display/dom.d.ts +2 -2
  96. package/lib/esm/scope/display/junit.d.ts +1 -1
  97. package/lib/esm/scope/execute.d.ts +2 -2
  98. package/lib/esm/scope/index.d.ts +3 -3
  99. package/lib/esm/scope/scope.d.ts +3 -3
  100. package/lib/esm/scope/state.d.ts +1 -1
  101. package/lib/esm/server/http/apps.d.ts +1 -1
  102. package/lib/esm/server/http/css.d.ts +1 -1
  103. package/lib/esm/server/http/index.d.ts +4 -9
  104. package/lib/esm/server/http/response.d.ts +3 -3
  105. package/lib/esm/server/http/sitemap.d.ts +1 -1
  106. package/lib/esm/server/http/static.d.ts +1 -1
  107. package/lib/esm/server/http/typescript.d.ts +1 -1
  108. package/lib/esm/test_all.d.ts +9 -9
  109. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  110. package/package.json +11 -9
  111. package/src/assert.ts +5 -5
  112. package/src/components/button_bar.ts +28 -30
  113. package/src/components/inline_edit.ts +8 -7
  114. package/src/components/logger.ts +6 -6
  115. package/src/components/select.ts +7 -7
  116. package/src/components/test.ts +5 -0
  117. package/src/components/virtual_scroll.test.ts +9 -6
  118. package/src/components/virtual_scroll.ts +29 -24
  119. package/src/context.test.ts +4 -4
  120. package/src/context.ts +16 -11
  121. package/src/debounce.ts +9 -3
  122. package/src/diff.test.ts +4 -4
  123. package/src/diff.ts +14 -16
  124. package/src/dom/css/border.ts +11 -11
  125. package/src/dom/css/core.ts +1 -1
  126. package/src/dom/css/fstyle.ts +4 -4
  127. package/src/dom/css/sizing.ts +1 -1
  128. package/src/dom/dom.ts +57 -47
  129. package/src/dom/fc.test.ts +8 -8
  130. package/src/dom/fc.ts +32 -35
  131. package/src/dom/form/form.app.ts +9 -9
  132. package/src/dom/form/form.ts +25 -16
  133. package/src/dom/form/index.html +3 -2
  134. package/src/dom/html.test.ts +12 -10
  135. package/src/dom/html.ts +2 -3
  136. package/src/dom/observable.test.ts +6 -6
  137. package/src/dom/observable.ts +2 -2
  138. package/src/dom/provide.ts +1 -1
  139. package/src/dom/router/link.ts +3 -3
  140. package/src/dom/router/router.ts +5 -5
  141. package/src/dom/svg.ts +7 -6
  142. package/src/dom/test.ts +3 -0
  143. package/src/dom/types/css.ts +43 -61
  144. package/src/dom/types/html.ts +2 -4
  145. package/src/dom/xml.ts +2 -2
  146. package/src/equal.test.ts +3 -3
  147. package/src/equal.ts +27 -14
  148. package/src/flags.test.ts +2 -2
  149. package/src/flags.ts +2 -2
  150. package/src/fs.test.ts +5 -5
  151. package/src/fs.ts +26 -20
  152. package/src/fs_node.ts +4 -4
  153. package/src/fs_win.test.ts +1 -1
  154. package/src/generator.test.ts +4 -3
  155. package/src/generator.ts +1 -1
  156. package/src/hooks/_notes +4 -1
  157. package/src/index.html +7 -7
  158. package/src/lock.test.ts +4 -4
  159. package/src/lock.ts +8 -7
  160. package/src/log.ts +28 -18
  161. package/src/observable/event.ts +7 -7
  162. package/src/observable/observable.test.ts +3 -3
  163. package/src/observable/observable.ts +71 -52
  164. package/src/result.test.ts +7 -10
  165. package/src/result.ts +51 -47
  166. package/src/safe.ts +1 -1
  167. package/src/scope/describe.ts +12 -11
  168. package/src/scope/display/console.ts +4 -4
  169. package/src/scope/display/dom.ts +9 -9
  170. package/src/scope/display/junit.ts +21 -24
  171. package/src/scope/execute.ts +17 -12
  172. package/src/scope/expect.ts +22 -22
  173. package/src/scope/fix.ts +10 -7
  174. package/src/scope/index.ts +3 -3
  175. package/src/scope/scope.ts +2 -2
  176. package/src/scope/state.ts +2 -2
  177. package/src/server/http/apps.ts +5 -5
  178. package/src/server/http/css.ts +10 -26
  179. package/src/server/http/index.ts +30 -24
  180. package/src/server/http/response.ts +12 -5
  181. package/src/server/http/sitemap.ts +8 -8
  182. package/src/server/http/static.ts +9 -6
  183. package/src/server/http/typescript.ts +25 -25
  184. package/src/server/main.ts +7 -4
  185. package/src/test.mjs +8 -8
  186. package/src/test_all.ts +16 -13
  187. package/src/transpile.mjs +6 -18
  188. package/build/pico.css +0 -2466
  189. package/build/pico.css.map +0 -1
  190. package/lib/cjs/assert.js +0 -46
  191. package/lib/cjs/awaitable.js +0 -2
  192. package/lib/cjs/case.js +0 -9
  193. package/lib/cjs/components/button_bar.js +0 -29
  194. package/lib/cjs/components/inline_edit.js +0 -51
  195. package/lib/cjs/components/logger.js +0 -27
  196. package/lib/cjs/components/select.js +0 -6
  197. package/lib/cjs/components/test.js +0 -7
  198. package/lib/cjs/components/virtual_scroll.js +0 -102
  199. package/lib/cjs/components/virtual_scroll.test.js +0 -22
  200. package/lib/cjs/context.js +0 -48
  201. package/lib/cjs/context.test.js +0 -48
  202. package/lib/cjs/debounce.js +0 -12
  203. package/lib/cjs/diff.js +0 -58
  204. package/lib/cjs/diff.test.js +0 -41
  205. package/lib/cjs/display.js +0 -16
  206. package/lib/cjs/dom/css/border.js +0 -33
  207. package/lib/cjs/dom/css/constants.js +0 -31
  208. package/lib/cjs/dom/css/core.js +0 -31
  209. package/lib/cjs/dom/css/fstyle.js +0 -36
  210. package/lib/cjs/dom/css/sizing.js +0 -14
  211. package/lib/cjs/dom/dom.js +0 -110
  212. package/lib/cjs/dom/fc.js +0 -39
  213. package/lib/cjs/dom/fc.test.js +0 -23
  214. package/lib/cjs/dom/form/form.app.js +0 -27
  215. package/lib/cjs/dom/form/form.js +0 -49
  216. package/lib/cjs/dom/form/form.test.js +0 -1
  217. package/lib/cjs/dom/html.js +0 -119
  218. package/lib/cjs/dom/html.test.js +0 -60
  219. package/lib/cjs/dom/observable.js +0 -10
  220. package/lib/cjs/dom/observable.test.js +0 -35
  221. package/lib/cjs/dom/provide.js +0 -12
  222. package/lib/cjs/dom/router/link.js +0 -7
  223. package/lib/cjs/dom/router/router.js +0 -55
  224. package/lib/cjs/dom/svg.js +0 -69
  225. package/lib/cjs/dom/test.js +0 -13
  226. package/lib/cjs/dom/types/css.js +0 -24
  227. package/lib/cjs/dom/types/dom.js +0 -1
  228. package/lib/cjs/dom/types/html.js +0 -2
  229. package/lib/cjs/dom/xml.js +0 -8
  230. package/lib/cjs/equal.js +0 -48
  231. package/lib/cjs/equal.test.js +0 -22
  232. package/lib/cjs/flags.js +0 -52
  233. package/lib/cjs/flags.test.js +0 -37
  234. package/lib/cjs/fs.js +0 -235
  235. package/lib/cjs/fs.test.js +0 -86
  236. package/lib/cjs/fs_node.js +0 -50
  237. package/lib/cjs/fs_win.test.js +0 -10
  238. package/lib/cjs/generator.js +0 -14
  239. package/lib/cjs/generator.test.js +0 -26
  240. package/lib/cjs/is_browser.js +0 -4
  241. package/lib/cjs/loader-register.d.mts +0 -1
  242. package/lib/cjs/loader-register.d.ts +0 -1
  243. package/lib/cjs/loader-register.js +0 -4
  244. package/lib/cjs/loader-register.mjs +0 -4
  245. package/lib/cjs/loader.d.mts +0 -23
  246. package/lib/cjs/loader.mjs +0 -41
  247. package/lib/cjs/lock.js +0 -27
  248. package/lib/cjs/lock.test.js +0 -18
  249. package/lib/cjs/log.js +0 -98
  250. package/lib/cjs/observable/event.js +0 -61
  251. package/lib/cjs/observable/observable.js +0 -363
  252. package/lib/cjs/observable/observable.test.js +0 -65
  253. package/lib/cjs/package.json +0 -1
  254. package/lib/cjs/range.js +0 -11
  255. package/lib/cjs/result.js +0 -80
  256. package/lib/cjs/result.test.js +0 -78
  257. package/lib/cjs/safe.js +0 -14
  258. package/lib/cjs/scope/describe.js +0 -73
  259. package/lib/cjs/scope/display/console.js +0 -25
  260. package/lib/cjs/scope/display/dom.js +0 -30
  261. package/lib/cjs/scope/display/junit.js +0 -21
  262. package/lib/cjs/scope/execute.js +0 -91
  263. package/lib/cjs/scope/expect.js +0 -110
  264. package/lib/cjs/scope/fix.js +0 -26
  265. package/lib/cjs/scope/index.js +0 -15
  266. package/lib/cjs/scope/scope.js +0 -2
  267. package/lib/cjs/scope/state.js +0 -12
  268. package/lib/cjs/server/http/apps.js +0 -27
  269. package/lib/cjs/server/http/css.js +0 -54
  270. package/lib/cjs/server/http/index.js +0 -77
  271. package/lib/cjs/server/http/response.js +0 -45
  272. package/lib/cjs/server/http/sitemap.js +0 -46
  273. package/lib/cjs/server/http/static.js +0 -25
  274. package/lib/cjs/server/http/typescript.js +0 -44
  275. package/lib/cjs/server/main.js +0 -14
  276. package/lib/cjs/test.mjs +0 -28
  277. package/lib/cjs/test_all.js +0 -30
  278. package/lib/cjs/transpile.mjs +0 -22
  279. package/lib/esm/assert.js +0 -38
  280. package/lib/esm/awaitable.js +0 -1
  281. package/lib/esm/case.js +0 -5
  282. package/lib/esm/components/button_bar.js +0 -27
  283. package/lib/esm/components/inline_edit.js +0 -48
  284. package/lib/esm/components/logger.js +0 -22
  285. package/lib/esm/components/select.js +0 -3
  286. package/lib/esm/components/test.js +0 -3
  287. package/lib/esm/components/virtual_scroll.js +0 -94
  288. package/lib/esm/components/virtual_scroll.test.js +0 -20
  289. package/lib/esm/context.js +0 -43
  290. package/lib/esm/context.test.js +0 -46
  291. package/lib/esm/debounce.js +0 -8
  292. package/lib/esm/diff.js +0 -54
  293. package/lib/esm/diff.test.js +0 -39
  294. package/lib/esm/display.js +0 -11
  295. package/lib/esm/dom/css/border.js +0 -27
  296. package/lib/esm/dom/css/constants.js +0 -28
  297. package/lib/esm/dom/css/core.js +0 -24
  298. package/lib/esm/dom/css/fstyle.js +0 -32
  299. package/lib/esm/dom/css/sizing.js +0 -10
  300. package/lib/esm/dom/dom.js +0 -104
  301. package/lib/esm/dom/fc.js +0 -35
  302. package/lib/esm/dom/fc.test.js +0 -21
  303. package/lib/esm/dom/form/form.app.js +0 -23
  304. package/lib/esm/dom/form/form.js +0 -34
  305. package/lib/esm/dom/form/form.test.js +0 -1
  306. package/lib/esm/dom/html.js +0 -114
  307. package/lib/esm/dom/html.test.js +0 -58
  308. package/lib/esm/dom/observable.js +0 -6
  309. package/lib/esm/dom/observable.test.js +0 -33
  310. package/lib/esm/dom/provide.js +0 -7
  311. package/lib/esm/dom/router/link.js +0 -3
  312. package/lib/esm/dom/router/router.js +0 -52
  313. package/lib/esm/dom/svg.js +0 -65
  314. package/lib/esm/dom/test.js +0 -9
  315. package/lib/esm/dom/types/css.js +0 -23
  316. package/lib/esm/dom/types/dom.js +0 -1
  317. package/lib/esm/dom/types/html.js +0 -1
  318. package/lib/esm/dom/xml.js +0 -4
  319. package/lib/esm/equal.js +0 -41
  320. package/lib/esm/equal.test.js +0 -20
  321. package/lib/esm/flags.js +0 -48
  322. package/lib/esm/flags.test.js +0 -35
  323. package/lib/esm/fs.js +0 -226
  324. package/lib/esm/fs.test.js +0 -84
  325. package/lib/esm/fs_node.js +0 -45
  326. package/lib/esm/fs_win.test.js +0 -8
  327. package/lib/esm/generator.js +0 -10
  328. package/lib/esm/generator.test.js +0 -24
  329. package/lib/esm/is_browser.js +0 -1
  330. package/lib/esm/loader-register.d.mts +0 -1
  331. package/lib/esm/loader-register.mjs +0 -2
  332. package/lib/esm/loader.d.mts +0 -23
  333. package/lib/esm/loader.mjs +0 -36
  334. package/lib/esm/lock.js +0 -23
  335. package/lib/esm/lock.test.js +0 -16
  336. package/lib/esm/log.js +0 -88
  337. package/lib/esm/observable/event.js +0 -46
  338. package/lib/esm/observable/observable.js +0 -343
  339. package/lib/esm/observable/observable.test.js +0 -63
  340. package/lib/esm/range.js +0 -7
  341. package/lib/esm/result.js +0 -65
  342. package/lib/esm/result.test.js +0 -76
  343. package/lib/esm/safe.js +0 -10
  344. package/lib/esm/scope/describe.js +0 -60
  345. package/lib/esm/scope/display/console.js +0 -21
  346. package/lib/esm/scope/display/dom.js +0 -26
  347. package/lib/esm/scope/display/junit.js +0 -17
  348. package/lib/esm/scope/execute.js +0 -85
  349. package/lib/esm/scope/expect.js +0 -104
  350. package/lib/esm/scope/fix.js +0 -22
  351. package/lib/esm/scope/index.js +0 -3
  352. package/lib/esm/scope/scope.js +0 -1
  353. package/lib/esm/scope/state.js +0 -8
  354. package/lib/esm/server/http/apps.js +0 -23
  355. package/lib/esm/server/http/css.js +0 -50
  356. package/lib/esm/server/http/index.js +0 -73
  357. package/lib/esm/server/http/response.js +0 -40
  358. package/lib/esm/server/http/sitemap.js +0 -42
  359. package/lib/esm/server/http/static.js +0 -21
  360. package/lib/esm/server/http/typescript.js +0 -40
  361. package/lib/esm/server/main.js +0 -12
  362. package/lib/esm/test.mjs +0 -26
  363. package/lib/esm/test_all.js +0 -28
  364. package/lib/esm/transpile.mjs +0 -18
  365. package/src/components/test.js +0 -3
  366. package/src/loader-register.mjs +0 -3
  367. package/src/loader.mjs +0 -46
@@ -1,39 +1,15 @@
1
- /**
2
- https://github.com/frenic/csstype v3.0.11
3
- Copyright (c) 2017-2018 Fredrik Nicol
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
- */
23
-
24
- export {};
25
-
26
- export type PropertyValue<TValue> = TValue extends Array<infer AValue>
27
- ? Array<AValue extends infer TUnpacked & {} ? TUnpacked : AValue>
28
- : TValue extends infer TUnpacked & {}
29
- ? TUnpacked
30
- : TValue;
1
+ export type PropertyValue<TValue> =
2
+ TValue extends Array<infer AValue>
3
+ ? Array<AValue extends infer TUnpacked & {} ? TUnpacked : AValue>
4
+ : TValue extends infer TUnpacked & {}
5
+ ? TUnpacked
6
+ : TValue;
31
7
 
32
8
  export type Fallback<T> = { [P in keyof T]: T[P] | NonNullable<T[P]>[] };
33
9
 
34
10
  export interface StandardLonghandProperties<
35
11
  TLength = (string & {}) | 0,
36
- TTime = string & {}
12
+ TTime = string & {},
37
13
  > {
38
14
  /**
39
15
  * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements.
@@ -5220,7 +5196,7 @@ export interface StandardLonghandProperties<
5220
5196
 
5221
5197
  export interface StandardShorthandProperties<
5222
5198
  TLength = (string & {}) | 0,
5223
- TTime = string & {}
5199
+ TTime = string & {},
5224
5200
  > {
5225
5201
  /**
5226
5202
  * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another stylesheet origin.
@@ -5824,13 +5800,13 @@ export interface StandardShorthandProperties<
5824
5800
 
5825
5801
  export interface StandardProperties<
5826
5802
  TLength = (string & {}) | 0,
5827
- TTime = string & {}
5803
+ TTime = string & {},
5828
5804
  > extends StandardLonghandProperties<TLength, TTime>,
5829
5805
  StandardShorthandProperties<TLength, TTime> {}
5830
5806
 
5831
5807
  export interface SvgProperties<
5832
5808
  TLength = (string & {}) | 0,
5833
- TTime = string & {}
5809
+ _TTime = string & {},
5834
5810
  > {
5835
5811
  alignmentBaseline?: Property.AlignmentBaseline | undefined;
5836
5812
  baselineShift?: Property.BaselineShift<TLength> | undefined;
@@ -9221,11 +9197,11 @@ export namespace Property {
9221
9197
 
9222
9198
  export type AlignmentBaseline =
9223
9199
  | Globals
9224
- | "after-edge"
9200
+ // | "auto" # Deprecated
9201
+ // | "after-edge"
9202
+ // | "before-edge"
9225
9203
  | "alphabetic"
9226
- | "auto"
9227
9204
  | "baseline"
9228
- | "before-edge"
9229
9205
  | "central"
9230
9206
  | "hanging"
9231
9207
  | "ideographic"
@@ -9336,8 +9312,8 @@ export namespace Property {
9336
9312
 
9337
9313
  export namespace AtRule {
9338
9314
  export interface CounterStyle<
9339
- TLength = (string & {}) | 0,
9340
- TTime = string & {}
9315
+ _TLength = (string & {}) | 0,
9316
+ _TTime = string & {},
9341
9317
  > {
9342
9318
  additiveSymbols?: string | undefined;
9343
9319
  fallback?: string | undefined;
@@ -9352,8 +9328,8 @@ export namespace AtRule {
9352
9328
  }
9353
9329
 
9354
9330
  export interface CounterStyleHyphen<
9355
- TLength = (string & {}) | 0,
9356
- TTime = string & {}
9331
+ _TLength = (string & {}) | 0,
9332
+ _TTime = string & {},
9357
9333
  > {
9358
9334
  "additive-symbols"?: string | undefined;
9359
9335
  fallback?: string | undefined;
@@ -9369,15 +9345,18 @@ export namespace AtRule {
9369
9345
 
9370
9346
  export type CounterStyleFallback<
9371
9347
  TLength = (string & {}) | 0,
9372
- TTime = string & {}
9348
+ TTime = string & {},
9373
9349
  > = Fallback<CounterStyle<TLength, TTime>>;
9374
9350
 
9375
9351
  export type CounterStyleHyphenFallback<
9376
9352
  TLength = (string & {}) | 0,
9377
- TTime = string & {}
9353
+ TTime = string & {},
9378
9354
  > = Fallback<CounterStyleHyphen<TLength, TTime>>;
9379
9355
 
9380
- export interface FontFace<TLength = (string & {}) | 0, TTime = string & {}> {
9356
+ export interface FontFace<
9357
+ _TLength = (string & {}) | 0,
9358
+ _TTime = string & {},
9359
+ > {
9381
9360
  MozFontFeatureSettings?: FontFeatureSettings | undefined;
9382
9361
  ascentOverride?: AscentOverride | undefined;
9383
9362
  descentOverride?: DescentOverride | undefined;
@@ -9396,8 +9375,8 @@ export namespace AtRule {
9396
9375
  }
9397
9376
 
9398
9377
  export interface FontFaceHyphen<
9399
- TLength = (string & {}) | 0,
9400
- TTime = string & {}
9378
+ _TLength = (string & {}) | 0,
9379
+ _TTime = string & {},
9401
9380
  > {
9402
9381
  "ascent-override"?: AscentOverride | undefined;
9403
9382
  "descent-override"?: DescentOverride | undefined;
@@ -9417,15 +9396,15 @@ export namespace AtRule {
9417
9396
 
9418
9397
  export type FontFaceFallback<
9419
9398
  TLength = (string & {}) | 0,
9420
- TTime = string & {}
9399
+ TTime = string & {},
9421
9400
  > = Fallback<FontFace<TLength, TTime>>;
9422
9401
 
9423
9402
  export type FontFaceHyphenFallback<
9424
9403
  TLength = (string & {}) | 0,
9425
- TTime = string & {}
9404
+ TTime = string & {},
9426
9405
  > = Fallback<FontFaceHyphen<TLength, TTime>>;
9427
9406
 
9428
- export interface Page<TLength = (string & {}) | 0, TTime = string & {}> {
9407
+ export interface Page<TLength = (string & {}) | 0, _TTime = string & {}> {
9429
9408
  bleed?: Bleed<TLength> | undefined;
9430
9409
  marks?: Marks | undefined;
9431
9410
  size?: Size<TLength> | undefined;
@@ -9433,7 +9412,7 @@ export namespace AtRule {
9433
9412
 
9434
9413
  export interface PageHyphen<
9435
9414
  TLength = (string & {}) | 0,
9436
- TTime = string & {}
9415
+ _TTime = string & {},
9437
9416
  > {
9438
9417
  bleed?: Bleed<TLength> | undefined;
9439
9418
  marks?: Marks | undefined;
@@ -9442,23 +9421,26 @@ export namespace AtRule {
9442
9421
 
9443
9422
  export type PageFallback<
9444
9423
  TLength = (string & {}) | 0,
9445
- TTime = string & {}
9424
+ TTime = string & {},
9446
9425
  > = Fallback<Page<TLength, TTime>>;
9447
9426
 
9448
9427
  export type PageHyphenFallback<
9449
9428
  TLength = (string & {}) | 0,
9450
- TTime = string & {}
9429
+ TTime = string & {},
9451
9430
  > = Fallback<PageHyphen<TLength, TTime>>;
9452
9431
 
9453
- export interface Property<TLength = (string & {}) | 0, TTime = string & {}> {
9432
+ export interface Property<
9433
+ _TLength = (string & {}) | 0,
9434
+ _TTime = string & {},
9435
+ > {
9454
9436
  inherits?: Inherits | undefined;
9455
9437
  initialValue?: string | undefined;
9456
9438
  syntax?: string | undefined;
9457
9439
  }
9458
9440
 
9459
9441
  export interface PropertyHyphen<
9460
- TLength = (string & {}) | 0,
9461
- TTime = string & {}
9442
+ _TLength = (string & {}) | 0,
9443
+ _TTime = string & {},
9462
9444
  > {
9463
9445
  inherits?: Inherits | undefined;
9464
9446
  "initial-value"?: string | undefined;
@@ -9467,15 +9449,15 @@ export namespace AtRule {
9467
9449
 
9468
9450
  export type PropertyFallback<
9469
9451
  TLength = (string & {}) | 0,
9470
- TTime = string & {}
9452
+ TTime = string & {},
9471
9453
  > = Fallback<Property<TLength, TTime>>;
9472
9454
 
9473
9455
  export type PropertyHyphenFallback<
9474
9456
  TLength = (string & {}) | 0,
9475
- TTime = string & {}
9457
+ TTime = string & {},
9476
9458
  > = Fallback<PropertyHyphen<TLength, TTime>>;
9477
9459
 
9478
- export interface Viewport<TLength = (string & {}) | 0, TTime = string & {}> {
9460
+ export interface Viewport<TLength = (string & {}) | 0, _TTime = string & {}> {
9479
9461
  height?: Height<TLength> | undefined;
9480
9462
  maxHeight?: MaxHeight<TLength> | undefined;
9481
9463
  maxWidth?: MaxWidth<TLength> | undefined;
@@ -9492,7 +9474,7 @@ export namespace AtRule {
9492
9474
 
9493
9475
  export interface ViewportHyphen<
9494
9476
  TLength = (string & {}) | 0,
9495
- TTime = string & {}
9477
+ _TTime = string & {},
9496
9478
  > {
9497
9479
  height?: Height<TLength> | undefined;
9498
9480
  "max-height"?: MaxHeight<TLength> | undefined;
@@ -9510,12 +9492,12 @@ export namespace AtRule {
9510
9492
 
9511
9493
  export type ViewportFallback<
9512
9494
  TLength = (string & {}) | 0,
9513
- TTime = string & {}
9495
+ TTime = string & {},
9514
9496
  > = Fallback<Viewport<TLength, TTime>>;
9515
9497
 
9516
9498
  export type ViewportHyphenFallback<
9517
9499
  TLength = (string & {}) | 0,
9518
- TTime = string & {}
9500
+ TTime = string & {},
9519
9501
  > = Fallback<ViewportHyphen<TLength, TTime>>;
9520
9502
 
9521
9503
  type Range = "auto" | (string & {});
@@ -1,4 +1,4 @@
1
- import { Properties } from "./css"
1
+ import type { Properties } from "./css";
2
2
 
3
3
  export interface AriaAttributes {
4
4
  [_: `aria-${string}`]: string;
@@ -21,9 +21,7 @@ export type ReferrerPolicy =
21
21
  | "strict-origin-when-cross-origin"
22
22
  | "unsafe-url";
23
23
 
24
- export interface EventHandler {
25
- (k: Event): void;
26
- }
24
+ export type EventHandler = (k: Event) => void;
27
25
 
28
26
  export interface GlobalEvents {
29
27
  abort: EventHandler;
package/src/dom/xml.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  export function xml(
2
2
  tag: string,
3
3
  attributes: Record<string, string | number | boolean>,
4
- children: string[] = []
4
+ children: string[] = [],
5
5
  ) {
6
6
  const attrs = Object.entries(attributes).reduce(
7
7
  (attrs, [attr, val]) => `${attrs} ${attr}="${val}"`,
8
- ""
8
+ "",
9
9
  );
10
10
  return `<${tag} ${attrs}>${children.join("")}</${tag}>`;
11
11
  }
package/src/equal.test.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { describe, it, expect } from "./scope/index.js";
2
- import { equalArrays, equals, matchArrays } from "./equal.js";
1
+ import { equalArrays, equals, matchArrays } from "./equal.ts";
2
+ import { describe, expect, it } from "./scope/index.ts";
3
3
 
4
4
  describe("Equality", () => {
5
5
  it("compares objects", () => {
@@ -11,7 +11,7 @@ describe("Equality", () => {
11
11
  expect(equals(1, 1)).toBe(true);
12
12
  expect(equals(1, -1)).toBe(false);
13
13
  expect(equals(0, -0)).toBe(false);
14
- expect(equals(NaN, NaN)).toBe(true);
14
+ expect(equals(Number.NaN, Number.NaN)).toBe(true);
15
15
  });
16
16
 
17
17
  it("compares arrays", () => {
package/src/equal.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export function compareArrays<T>(
2
- equal: (a: T, b: T, partial: boolean) => boolean
2
+ equal: (a: T, b: T, partial: boolean) => boolean,
3
3
  ): (A: T[], B: T[], partial?: boolean) => boolean {
4
4
  return (a: T[], b: T[], partial = false): boolean =>
5
5
  a.length === b.length && a.every((e, i) => equal(e, b[i], partial));
@@ -7,23 +7,30 @@ export function compareArrays<T>(
7
7
 
8
8
  export const equalArrays = compareArrays(Object.is);
9
9
 
10
- export const matchArrays: <A>(a: A[], b: A[], partial?: boolean) => boolean =
11
- compareArrays(equals);
10
+ // export const matchArrays: <T>(a: T[], b: T[], partial?: boolean) => boolean = compareArrays(equals);
11
+ export function matchArrays<T>(a: T[], b: T[], partial?: boolean): boolean {
12
+ return compareArrays<T>(equals)(a, b, partial);
13
+ }
12
14
 
13
15
  export function asArray<T = unknown>(a: Record<string, T>): [string, T][] {
14
16
  return Object.entries(a).sort((a, b) => a[0].localeCompare(b[0]));
15
17
  }
16
18
 
17
- export const matchObjects = (a: {}, b: {}, partial = true) => {
19
+ export const matchObjects = (
20
+ a: object,
21
+ b: object & { [k: string]: unknown },
22
+ partial = true,
23
+ ) => {
18
24
  for (const [k, v] of Object.entries(a)) {
19
- if (!b.hasOwnProperty(k) && partial) continue;
20
- // @ts-ignore
25
+ if (!Object.hasOwn(b, k) && partial) continue;
21
26
  if (!equals(v, b[k], partial)) return false;
22
27
  }
23
28
  return true;
24
29
  };
25
30
 
26
- export function equals<A>(a: A | A[], b: A | A[], partial = false): boolean {
31
+ export function equals<T>(a: T, b: T, partial?: boolean): boolean;
32
+ export function equals<T>(a: T[], b: T[], partial?: boolean): boolean;
33
+ export function equals<T>(a: T | T[], b: T | T[], partial = false): boolean {
27
34
  // runtime type checking
28
35
  if (a === null && a === b) return true;
29
36
  if (a === undefined && a === b) return true;
@@ -32,13 +39,17 @@ export function equals<A>(a: A | A[], b: A | A[], partial = false): boolean {
32
39
  if (b === undefined) {
33
40
  return false;
34
41
  }
35
- if (a instanceof Array && b instanceof Array) {
42
+ if (Array.isArray(a) && Array.isArray(b)) {
36
43
  return matchArrays(a, b, partial);
37
- } else {
38
- return matchObjects(a, b, partial);
39
44
  }
45
+ return matchObjects(
46
+ a ?? {},
47
+ // @ts-expect-error
48
+ b,
49
+ partial,
50
+ );
40
51
  case "function":
41
- return a.name === (b as unknown as Function).name;
52
+ return a.name === (b as unknown as CallableFunction).name;
42
53
  default:
43
54
  return Object.is(a, b);
44
55
  }
@@ -46,8 +57,10 @@ export function equals<A>(a: A | A[], b: A | A[], partial = false): boolean {
46
57
 
47
58
  // prettier-ignore
48
59
  export type Equals<T1, T2> =
49
- (<T>() => (T extends T2 ? true : false)) extends
50
- (<T>() => (T extends T1 ? true : false))
51
- ? true : false;
60
+ (<T>() => T extends T2 ? true : false) extends <T>() => T extends T1
61
+ ? true
62
+ : false
63
+ ? true
64
+ : false;
52
65
 
53
66
  export type Not<B extends boolean> = B extends true ? false : true;
package/src/flags.test.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { describe, it, expect } from "./scope/index.js";
2
- import { parse } from "./flags.js";
1
+ import { parse } from "./flags.ts";
2
+ import { describe, expect, it } from "./scope/index.ts";
3
3
 
4
4
  const TEST_CASES = {
5
5
  SIMPLE: "program",
package/src/flags.ts CHANGED
@@ -11,8 +11,8 @@ export const parse = (parseArgs: string[]) => {
11
11
  const advance = () => parseArgs[index++];
12
12
 
13
13
  const parseLong = (arg: string) => {
14
- if (arg.substr(0, 3) === "no-") {
15
- flags.set(arg.substr(3), false);
14
+ if (arg.substring(0, 3) === "no-") {
15
+ flags.set(arg.substring(3), false);
16
16
  } else if (!arg.includes("=")) {
17
17
  flags.set(arg, true);
18
18
  } else {
package/src/fs.test.ts CHANGED
@@ -2,9 +2,9 @@ import {
2
2
  FileSystem,
3
3
  ObjectFileSystemAdapter,
4
4
  RecordFileSystemAdapter,
5
- } from "./fs.js";
6
- import { describe, it, expect, beforeEach } from "./scope/index.js";
7
- import { cleanState } from "./scope/state.js";
5
+ } from "./fs.ts";
6
+ import { beforeEach, describe, expect, it } from "./scope/index.ts";
7
+ import { cleanState } from "./scope/state.ts";
8
8
 
9
9
  describe("FileSystem", () => {
10
10
  describe("Writing", () => {
@@ -90,10 +90,10 @@ describe("FileSystem", () => {
90
90
  });
91
91
  expect([
92
92
  ...Object.keys(
93
- (fsAdapter as unknown as { fs: Record<string, string> }).fs
93
+ (fsAdapter as unknown as { fs: Record<string, string> }).fs,
94
94
  ),
95
95
  ]).toEqual(["/deep/hello", "/deep/bonjour", "/other_file"]);
96
- let fs = new FileSystem(fsAdapter);
96
+ const fs = new FileSystem(fsAdapter);
97
97
 
98
98
  const deep = await fs.stat("/deep");
99
99
  expect(deep.isDirectory()).toBe(true);
package/src/fs.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { assertExists } from "./assert.ts";
2
+
1
3
  // Treat localstorage as a file system
2
4
  export type PathLike = string;
3
5
 
@@ -10,17 +12,17 @@ export interface PlatformParts {
10
12
  export const PLATFORM_PARTS_WIN: PlatformParts = {
11
13
  SEP: "\\",
12
14
  WD: "C:\\\\",
13
- isAbsolute: (path) => Boolean(path.match(new RegExp("^[a-zA-Z]:\\\\"))),
15
+ isAbsolute: (path) => Boolean(path.match(/^[a-zA-Z]:\\/)),
14
16
  };
15
17
 
16
18
  export const PLATFORM_PARTS_UNIX: PlatformParts = {
17
19
  SEP: "/",
18
20
  WD: "/",
19
- isAbsolute: (path) => path[0] == "/",
21
+ isAbsolute: (path) => path[0] === "/",
20
22
  };
21
23
 
22
24
  export const PLATFORM_PARTS: PlatformParts =
23
- typeof process !== "undefined" && process.platform == "win32"
25
+ typeof process !== "undefined" && process.platform === "win32"
24
26
  ? PLATFORM_PARTS_WIN
25
27
  : PLATFORM_PARTS_UNIX;
26
28
 
@@ -60,7 +62,7 @@ function join(...paths: string[]): string {
60
62
  }
61
63
  }
62
64
  return (
63
- (PLATFORM_PARTS == PLATFORM_PARTS_UNIX ? SEP : "") + pathParts.join(SEP)
65
+ (PLATFORM_PARTS === PLATFORM_PARTS_UNIX ? SEP : "") + pathParts.join(SEP)
64
66
  );
65
67
  }
66
68
 
@@ -78,10 +80,11 @@ export interface FileSystemAdapter {
78
80
  export class FileSystem implements FileSystemAdapter {
79
81
  protected wd = WD;
80
82
  protected stack: string[] = [];
83
+ protected adapter: FileSystemAdapter;
81
84
 
82
- constructor(
83
- protected adapter: FileSystemAdapter = new RecordFileSystemAdapter()
84
- ) {}
85
+ constructor(adapter: FileSystemAdapter = new RecordFileSystemAdapter()) {
86
+ this.adapter = adapter;
87
+ }
85
88
 
86
89
  cwd(): string {
87
90
  return this.wd;
@@ -98,7 +101,7 @@ export class FileSystem implements FileSystemAdapter {
98
101
 
99
102
  popd() {
100
103
  if (this.stack.length > 0) {
101
- this.wd = this.stack.pop()!;
104
+ this.wd = assertExists(this.stack.pop());
102
105
  }
103
106
  }
104
107
 
@@ -140,7 +143,10 @@ export class FileSystem implements FileSystemAdapter {
140
143
  }
141
144
 
142
145
  export class RecordFileSystemAdapter implements FileSystemAdapter {
143
- constructor(private fs: Record<string, string> = {}) {}
146
+ private fs: Record<string, string>;
147
+ constructor(fs: Record<string, string> = {}) {
148
+ this.fs = fs;
149
+ }
144
150
 
145
151
  stat(path: PathLike): Promise<Stats> {
146
152
  return new Promise((resolve, reject) => {
@@ -157,7 +163,7 @@ export class RecordFileSystemAdapter implements FileSystemAdapter {
157
163
  }
158
164
 
159
165
  if (!path.endsWith(SEP)) path += SEP;
160
- for (let filename of Object.keys(this.fs)) {
166
+ for (const filename of Object.keys(this.fs)) {
161
167
  if (filename.startsWith(path)) {
162
168
  return resolve({
163
169
  name: basename(path),
@@ -177,7 +183,7 @@ export class RecordFileSystemAdapter implements FileSystemAdapter {
177
183
 
178
184
  async scandir(path: PathLike): Promise<Stats[]> {
179
185
  return (await this.readdir(path)).map<Stats>((name) => {
180
- let isFile = this.fs[join(path, name)] !== undefined;
186
+ const isFile = this.fs[join(path, name)] !== undefined;
181
187
  return {
182
188
  name,
183
189
  isDirectory() {
@@ -193,13 +199,13 @@ export class RecordFileSystemAdapter implements FileSystemAdapter {
193
199
  readdir(path: PathLike): Promise<string[]> {
194
200
  if (!path.endsWith(SEP)) path += SEP;
195
201
  return new Promise((resolve) => {
196
- let dir = new Set<string>();
202
+ const dir = new Set<string>();
197
203
  for (const filename of Object.keys(this.fs)) {
198
204
  if (filename.startsWith(path)) {
199
205
  const end = filename.indexOf(SEP, path.length + 1);
200
206
  const basename = filename.substring(
201
207
  path.length,
202
- end === -1 ? undefined : end
208
+ end === -1 ? undefined : end,
203
209
  );
204
210
  dir.add(basename);
205
211
  }
@@ -208,7 +214,7 @@ export class RecordFileSystemAdapter implements FileSystemAdapter {
208
214
  });
209
215
  }
210
216
 
211
- mkdir(path: string): Promise<void> {
217
+ mkdir(_path: string): Promise<void> {
212
218
  return Promise.resolve();
213
219
  }
214
220
 
@@ -221,7 +227,7 @@ export class RecordFileSystemAdapter implements FileSystemAdapter {
221
227
 
222
228
  readFile(path: PathLike): Promise<string> {
223
229
  return new Promise((resolve, reject) => {
224
- let file = this.fs[path];
230
+ const file = this.fs[path];
225
231
  if (file === undefined) {
226
232
  const error = new Error(`File Not Found ${path}`);
227
233
  reject(error);
@@ -260,15 +266,15 @@ export class ObjectFileSystemAdapter extends RecordFileSystemAdapter {
260
266
  }
261
267
 
262
268
  function reduceObjectFileSystem(
263
- object: ObjectFileSystem
269
+ object: ObjectFileSystem,
264
270
  ): Record<string, string> {
265
- let level: Record<string, string> = {};
271
+ const level: Record<string, string> = {};
266
272
 
267
- for (let [k, v] of Object.entries(object)) {
268
- if (typeof v == "string") {
273
+ for (const [k, v] of Object.entries(object)) {
274
+ if (typeof v === "string") {
269
275
  level[`/${k}`] = v;
270
276
  } else {
271
- for (let [k2, v2] of Object.entries(reduceObjectFileSystem(v))) {
277
+ for (const [k2, v2] of Object.entries(reduceObjectFileSystem(v))) {
272
278
  level[`/${k}${k2}`] = v2;
273
279
  }
274
280
  }
package/src/fs_node.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { FileSystem, FileSystemAdapter, Stats } from "./fs.js";
2
1
  import {
3
2
  copyFile,
4
3
  mkdir,
@@ -7,8 +6,9 @@ import {
7
6
  rm,
8
7
  stat,
9
8
  writeFile,
10
- } from "fs/promises";
11
- import { basename, join } from "path";
9
+ } from "node:fs/promises";
10
+ import { basename, join } from "node:path";
11
+ import { FileSystem, type FileSystemAdapter, type Stats } from "./fs.ts";
12
12
 
13
13
  export class NodeFileSystem extends FileSystem {
14
14
  constructor(cd: string = process.cwd()) {
@@ -39,7 +39,7 @@ export class NodeFileSystemAdapter implements FileSystemAdapter {
39
39
  }
40
40
  async scandir(path: string): Promise<Stats[]> {
41
41
  return Promise.all(
42
- (await this.readdir(path)).map((name) => this.stat(join(path, name)))
42
+ (await this.readdir(path)).map((name) => this.stat(join(path, name))),
43
43
  );
44
44
  }
45
45
  copyFile(from: string, to: string): Promise<void> {
@@ -1,4 +1,4 @@
1
- import { NodeFileSystem } from "./fs_node.js";
1
+ import { NodeFileSystem } from "./fs_node.ts";
2
2
 
3
3
  const fs = new NodeFileSystem();
4
4
 
@@ -1,12 +1,13 @@
1
- import { takeWhile } from "./generator.js";
2
- import { describe, it, expect } from "./scope/index.js";
1
+ import { takeWhile } from "./generator.ts";
2
+ import { describe, expect, it } from "./scope/index.ts";
3
3
 
4
4
  describe("Generator", () => {
5
5
  it("takes from a generator until a predicate", () => {
6
6
  const generator = function* () {
7
7
  let i = 1;
8
8
  while (true) {
9
- yield (i = i * 2);
9
+ i = i * 2;
10
+ yield i;
10
11
  }
11
12
  };
12
13
  const filter = () => {
package/src/generator.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export function* takeWhile<T>(
2
2
  predicate: (t: T) => boolean,
3
- iterator: Iterable<T>
3
+ iterator: Iterable<T>,
4
4
  ) {
5
5
  for (const x of iterator) {
6
6
  if (predicate(x)) {
package/src/hooks/_notes CHANGED
@@ -1,3 +1,6 @@
1
1
  useEffect
2
2
  useState
3
- useContext
3
+ useContext
4
+
5
+
6
+ signal(n) => n, setN
package/src/index.html CHANGED
@@ -23,10 +23,10 @@
23
23
  import("./components/test.js"),
24
24
  ]);
25
25
 
26
- import { execute } from "./scope/execute.js";
27
- import { displayStatistics } from "./scope/display/dom.js";
28
- import { onConsole } from "./scope/display/console.js";
29
- import { asXML } from "./scope/display/junit.js";
26
+ import { onConsole } from "./scope/display/console.ts";
27
+ import { displayStatistics } from "./scope/display/dom.ts";
28
+ import { asXML } from "./scope/display/junit.ts";
29
+ import { execute } from "./scope/execute.ts";
30
30
 
31
31
  function write(id, value) {
32
32
  const start = `--- START_${id.toUpperCase()} ---`;
@@ -46,8 +46,8 @@
46
46
  })();
47
47
  </script>
48
48
  <script type="module">
49
- import { nav, ul, li, strong } from "./dom/html.js";
50
- import { link } from "./dom/router/link.js";
49
+ import { li, nav, strong, ul } from "./dom/html.ts";
50
+ import { link } from "./dom/router/link.ts";
51
51
 
52
52
  const getUrls = async () => {
53
53
  const sitemap = await fetch("/sitemap.json");
@@ -65,7 +65,7 @@
65
65
  const urls = (await getUrls()).map((url) => ({
66
66
  href: url.replace("index.html", ""),
67
67
  link:
68
- url.match(/\/(?<link>[^\/]+)(\/index\.html)?$/)?.groups["link"] ??
68
+ url.match(/\/(?<link>[^/]+)(\/index\.html)?$/)?.groups.link ??
69
69
  url.replace("index.html", ""),
70
70
  }));
71
71