@davidsouther/jiffies 1.0.0 → 2.0.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 (388) hide show
  1. package/build/pico.css +2466 -0
  2. package/build/pico.css.map +1 -0
  3. package/{build → lib/cjs}/assert.d.ts +0 -0
  4. package/lib/cjs/assert.js +40 -0
  5. package/{build → lib/cjs}/case.d.ts +0 -0
  6. package/lib/cjs/case.js +9 -0
  7. package/{build → lib/cjs}/components/button_bar.d.ts +1 -1
  8. package/lib/cjs/components/button_bar.js +29 -0
  9. package/{build → lib/cjs}/components/inline_edit.d.ts +1 -1
  10. package/lib/cjs/components/inline_edit.js +51 -0
  11. package/{build → lib/cjs}/components/logger.d.ts +2 -3
  12. package/lib/cjs/components/logger.js +27 -0
  13. package/{build → lib/cjs}/components/select.d.ts +2 -2
  14. package/lib/cjs/components/select.js +6 -0
  15. package/lib/cjs/components/test.d.ts +1 -0
  16. package/lib/cjs/components/test.js +7 -0
  17. package/{build → lib/cjs}/components/virtual_scroll.d.ts +3 -4
  18. package/lib/cjs/components/virtual_scroll.js +102 -0
  19. package/{build → lib/cjs}/components/virtual_scroll.test.d.ts +0 -0
  20. package/lib/cjs/components/virtual_scroll.test.js +22 -0
  21. package/{build → lib/cjs}/context.d.ts +0 -0
  22. package/lib/cjs/context.js +48 -0
  23. package/{build → lib/cjs}/context.test.d.ts +0 -0
  24. package/lib/cjs/context.test.js +48 -0
  25. package/{build → lib/cjs}/debounce.d.ts +0 -0
  26. package/lib/cjs/debounce.js +11 -0
  27. package/lib/cjs/diff.d.ts +15 -0
  28. package/lib/cjs/diff.js +58 -0
  29. package/{build/components/test.d.ts → lib/cjs/diff.test.d.ts} +0 -0
  30. package/lib/cjs/diff.test.js +41 -0
  31. package/{build → lib/cjs}/display.d.ts +0 -0
  32. package/lib/cjs/display.js +16 -0
  33. package/{build → lib/cjs}/dom/css/border.d.ts +0 -0
  34. package/lib/cjs/dom/css/border.js +33 -0
  35. package/{build → lib/cjs}/dom/css/constants.d.ts +0 -0
  36. package/lib/cjs/dom/css/constants.js +31 -0
  37. package/{build → lib/cjs}/dom/css/core.d.ts +0 -0
  38. package/lib/cjs/dom/css/core.js +31 -0
  39. package/{build → lib/cjs}/dom/css/fstyle.d.ts +0 -0
  40. package/lib/cjs/dom/css/fstyle.js +36 -0
  41. package/{build → lib/cjs}/dom/css/sizing.d.ts +0 -0
  42. package/lib/cjs/dom/css/sizing.js +14 -0
  43. package/lib/cjs/dom/dom.d.ts +27 -0
  44. package/lib/cjs/dom/dom.js +110 -0
  45. package/{build → lib/cjs}/dom/fc.d.ts +5 -5
  46. package/lib/cjs/dom/fc.js +39 -0
  47. package/{build → lib/cjs}/dom/fc.test.d.ts +0 -0
  48. package/lib/cjs/dom/fc.test.js +23 -0
  49. package/lib/cjs/dom/form/form.app.d.ts +1 -0
  50. package/lib/cjs/dom/form/form.app.js +27 -0
  51. package/{build → lib/cjs}/dom/form/form.d.ts +9 -9
  52. package/lib/cjs/dom/form/form.js +49 -0
  53. package/{build → lib/cjs}/dom/form/form.test.d.ts +0 -0
  54. package/{build → lib/cjs}/dom/form/form.test.js +0 -0
  55. package/lib/cjs/dom/html.d.ts +113 -0
  56. package/lib/cjs/dom/html.js +119 -0
  57. package/{build → lib/cjs}/dom/html.test.d.ts +0 -0
  58. package/lib/cjs/dom/html.test.js +60 -0
  59. package/lib/cjs/dom/observable.d.ts +2 -0
  60. package/lib/cjs/dom/observable.js +10 -0
  61. package/{build/dom/test.d.ts → lib/cjs/dom/observable.test.d.ts} +0 -0
  62. package/lib/cjs/dom/observable.test.js +35 -0
  63. package/{build → lib/cjs}/dom/provide.d.ts +0 -0
  64. package/lib/cjs/dom/provide.js +12 -0
  65. package/lib/cjs/dom/router/link.d.ts +6 -0
  66. package/lib/cjs/dom/router/link.js +7 -0
  67. package/{build → lib/cjs}/dom/router/router.d.ts +3 -3
  68. package/lib/cjs/dom/router/router.js +52 -0
  69. package/lib/cjs/dom/svg.d.ts +64 -0
  70. package/lib/cjs/dom/svg.js +69 -0
  71. package/lib/cjs/dom/test.d.ts +1 -0
  72. package/lib/cjs/dom/test.js +13 -0
  73. package/{build → lib/cjs}/dom/types/css.d.ts +0 -0
  74. package/lib/cjs/dom/types/css.js +24 -0
  75. package/{build → lib/cjs}/dom/types/dom.d.ts +0 -0
  76. package/{build → lib/cjs}/dom/types/dom.js +0 -0
  77. package/{build → lib/cjs}/dom/types/html.d.ts +1 -1
  78. package/lib/cjs/dom/types/html.js +2 -0
  79. package/{build → lib/cjs}/dom/xml.d.ts +0 -0
  80. package/lib/cjs/dom/xml.js +8 -0
  81. package/{build → lib/cjs}/equal.d.ts +0 -0
  82. package/lib/cjs/equal.js +43 -0
  83. package/{build → lib/cjs}/equal.test.d.ts +0 -0
  84. package/lib/cjs/equal.test.js +22 -0
  85. package/{build → lib/cjs}/flags.d.ts +0 -0
  86. package/lib/cjs/flags.js +52 -0
  87. package/{build → lib/cjs}/flags.test.d.ts +0 -0
  88. package/lib/cjs/flags.test.js +37 -0
  89. package/{build → lib/cjs}/fs.d.ts +0 -0
  90. package/lib/cjs/fs.js +151 -0
  91. package/{build → lib/cjs}/fs.test.d.ts +0 -0
  92. package/lib/cjs/fs.test.js +45 -0
  93. package/{build → lib/cjs}/generator.d.ts +0 -0
  94. package/lib/cjs/generator.js +14 -0
  95. package/{build → lib/cjs}/generator.test.d.ts +0 -0
  96. package/lib/cjs/generator.test.js +26 -0
  97. package/{build → lib/cjs}/is_browser.d.ts +0 -0
  98. package/lib/cjs/is_browser.js +4 -0
  99. package/{build → lib/cjs}/loader.d.mts +0 -0
  100. package/lib/cjs/loader.mjs +40 -0
  101. package/{build → lib/cjs}/lock.d.ts +0 -0
  102. package/lib/cjs/lock.js +27 -0
  103. package/{build → lib/cjs}/lock.test.d.ts +0 -0
  104. package/lib/cjs/lock.test.js +18 -0
  105. package/{build → lib/cjs}/log.d.ts +0 -0
  106. package/lib/cjs/log.js +54 -0
  107. package/lib/cjs/observable/event.d.ts +35 -0
  108. package/lib/cjs/observable/event.js +61 -0
  109. package/lib/cjs/observable/observable.d.ts +132 -0
  110. package/lib/cjs/observable/observable.js +363 -0
  111. package/{build/dom/types/html.js → lib/cjs/observable/observable.test.d.ts} +0 -0
  112. package/lib/cjs/observable/observable.test.js +65 -0
  113. package/{build → lib/cjs}/range.d.ts +0 -0
  114. package/lib/cjs/range.js +11 -0
  115. package/{build → lib/cjs}/result.d.ts +0 -0
  116. package/lib/cjs/result.js +80 -0
  117. package/{build → lib/cjs}/result.test.d.ts +0 -0
  118. package/lib/cjs/result.test.js +73 -0
  119. package/{build → lib/cjs}/safe.d.ts +0 -0
  120. package/lib/cjs/safe.js +14 -0
  121. package/{build → lib/cjs}/scope/describe.d.ts +4 -0
  122. package/lib/cjs/scope/describe.js +73 -0
  123. package/{build → lib/cjs}/scope/display/console.d.ts +0 -0
  124. package/lib/cjs/scope/display/console.js +25 -0
  125. package/{build → lib/cjs}/scope/display/dom.d.ts +2 -2
  126. package/lib/cjs/scope/display/dom.js +30 -0
  127. package/{build → lib/cjs}/scope/display/junit.d.ts +0 -0
  128. package/lib/cjs/scope/display/junit.js +21 -0
  129. package/{build → lib/cjs}/scope/execute.d.ts +1 -1
  130. package/lib/cjs/scope/execute.js +91 -0
  131. package/{build → lib/cjs}/scope/expect.d.ts +0 -0
  132. package/lib/cjs/scope/expect.js +114 -0
  133. package/{build → lib/cjs}/scope/fix.d.ts +0 -0
  134. package/lib/cjs/scope/fix.js +26 -0
  135. package/{build → lib/cjs}/scope/index.d.ts +0 -0
  136. package/lib/cjs/scope/index.js +15 -0
  137. package/{build → lib/cjs}/scope/scope.d.ts +0 -0
  138. package/lib/cjs/scope/scope.js +2 -0
  139. package/lib/cjs/scope/state.d.ts +1 -0
  140. package/lib/cjs/scope/state.js +11 -0
  141. package/{build → lib/cjs}/server/http/apps.d.ts +0 -0
  142. package/lib/cjs/server/http/apps.js +27 -0
  143. package/{build → lib/cjs}/server/http/css.d.ts +0 -0
  144. package/lib/cjs/server/http/css.js +54 -0
  145. package/{build → lib/cjs}/server/http/index.d.ts +0 -0
  146. package/lib/cjs/server/http/index.js +77 -0
  147. package/{build → lib/cjs}/server/http/response.d.ts +0 -0
  148. package/lib/cjs/server/http/response.js +45 -0
  149. package/{build → lib/cjs}/server/http/sitemap.d.ts +0 -0
  150. package/lib/cjs/server/http/sitemap.js +46 -0
  151. package/{build → lib/cjs}/server/http/static.d.ts +0 -0
  152. package/lib/cjs/server/http/static.js +25 -0
  153. package/{build → lib/cjs}/server/http/typescript.d.ts +0 -0
  154. package/lib/cjs/server/http/typescript.js +44 -0
  155. package/{build → lib/cjs}/server/main.d.ts +0 -0
  156. package/lib/cjs/server/main.js +14 -0
  157. package/{build → lib/cjs}/test.d.mts +0 -0
  158. package/lib/cjs/test.mjs +28 -0
  159. package/{build → lib/cjs}/test_all.d.ts +2 -0
  160. package/lib/cjs/test_all.js +30 -0
  161. package/{build → lib/cjs}/transpile.d.mts +0 -0
  162. package/lib/cjs/transpile.mjs +22 -0
  163. package/lib/cjs/tsconfig.tsbuildinfo +1 -0
  164. package/lib/esm/assert.d.ts +23 -0
  165. package/{build → lib/esm}/assert.js +1 -1
  166. package/lib/esm/case.d.ts +1 -0
  167. package/{build → lib/esm}/case.js +0 -0
  168. package/lib/esm/components/button_bar.d.ts +8 -0
  169. package/{build → lib/esm}/components/button_bar.js +3 -3
  170. package/lib/esm/components/inline_edit.d.ts +12 -0
  171. package/{build → lib/esm}/components/inline_edit.js +3 -3
  172. package/lib/esm/components/logger.d.ts +6 -0
  173. package/{build → lib/esm}/components/logger.js +3 -3
  174. package/lib/esm/components/select.d.ts +10 -0
  175. package/{build → lib/esm}/components/select.js +2 -2
  176. package/lib/esm/components/test.d.ts +1 -0
  177. package/lib/esm/components/test.js +3 -0
  178. package/lib/esm/components/virtual_scroll.d.ts +40 -0
  179. package/{build → lib/esm}/components/virtual_scroll.js +3 -3
  180. package/{build/scope/scope.js → lib/esm/components/virtual_scroll.test.d.ts} +0 -0
  181. package/{build → lib/esm}/components/virtual_scroll.test.js +3 -4
  182. package/lib/esm/context.d.ts +15 -0
  183. package/{build → lib/esm}/context.js +3 -3
  184. package/lib/esm/context.test.d.ts +1 -0
  185. package/{build → lib/esm}/context.test.js +0 -0
  186. package/lib/esm/debounce.d.ts +1 -0
  187. package/{build → lib/esm}/debounce.js +0 -0
  188. package/lib/esm/diff.d.ts +15 -0
  189. package/lib/esm/diff.js +54 -0
  190. package/lib/esm/diff.test.d.ts +1 -0
  191. package/lib/esm/diff.test.js +39 -0
  192. package/lib/esm/display.d.ts +5 -0
  193. package/{build → lib/esm}/display.js +0 -0
  194. package/lib/esm/dom/css/border.d.ts +11 -0
  195. package/{build → lib/esm}/dom/css/border.js +0 -0
  196. package/lib/esm/dom/css/constants.d.ts +31 -0
  197. package/{build → lib/esm}/dom/css/constants.js +0 -0
  198. package/lib/esm/dom/css/core.d.ts +5 -0
  199. package/{build → lib/esm}/dom/css/core.js +0 -0
  200. package/lib/esm/dom/css/fstyle.d.ts +5 -0
  201. package/{build → lib/esm}/dom/css/fstyle.js +0 -0
  202. package/lib/esm/dom/css/sizing.d.ts +5 -0
  203. package/{build → lib/esm}/dom/css/sizing.js +0 -0
  204. package/lib/esm/dom/dom.d.ts +27 -0
  205. package/{build → lib/esm}/dom/dom.js +44 -35
  206. package/lib/esm/dom/fc.d.ts +14 -0
  207. package/{build → lib/esm}/dom/fc.js +1 -1
  208. package/lib/esm/dom/fc.test.d.ts +1 -0
  209. package/{build → lib/esm}/dom/fc.test.js +0 -0
  210. package/lib/esm/dom/form/form.app.d.ts +1 -0
  211. package/{build → lib/esm}/dom/form/form.app.js +0 -0
  212. package/lib/esm/dom/form/form.d.ts +26 -0
  213. package/{build → lib/esm}/dom/form/form.js +0 -0
  214. package/lib/esm/dom/form/form.test.d.ts +0 -0
  215. package/lib/esm/dom/form/form.test.js +1 -0
  216. package/lib/esm/dom/html.d.ts +113 -0
  217. package/{build → lib/esm}/dom/html.js +0 -0
  218. package/lib/esm/dom/html.test.d.ts +1 -0
  219. package/{build → lib/esm}/dom/html.test.js +4 -4
  220. package/lib/esm/dom/observable.d.ts +2 -0
  221. package/lib/esm/dom/observable.js +6 -0
  222. package/lib/esm/dom/observable.test.d.ts +1 -0
  223. package/lib/esm/dom/observable.test.js +33 -0
  224. package/lib/esm/dom/provide.d.ts +3 -0
  225. package/{build → lib/esm}/dom/provide.js +0 -0
  226. package/lib/esm/dom/router/link.d.ts +6 -0
  227. package/{build → lib/esm}/dom/router/link.js +0 -0
  228. package/lib/esm/dom/router/router.d.ts +12 -0
  229. package/{build → lib/esm}/dom/router/router.js +0 -0
  230. package/lib/esm/dom/svg.d.ts +64 -0
  231. package/{build → lib/esm}/dom/svg.js +0 -0
  232. package/lib/esm/dom/test.d.ts +1 -0
  233. package/lib/esm/dom/test.js +9 -0
  234. package/lib/esm/dom/types/css.d.ts +6612 -0
  235. package/{build → lib/esm}/dom/types/css.js +0 -0
  236. package/lib/esm/dom/types/dom.d.ts +0 -0
  237. package/lib/esm/dom/types/dom.js +1 -0
  238. package/lib/esm/dom/types/html.d.ts +616 -0
  239. package/lib/esm/dom/types/html.js +1 -0
  240. package/lib/esm/dom/xml.d.ts +1 -0
  241. package/{build → lib/esm}/dom/xml.js +1 -2
  242. package/lib/esm/equal.d.ts +5 -0
  243. package/{build → lib/esm}/equal.js +1 -1
  244. package/lib/esm/equal.test.d.ts +1 -0
  245. package/{build → lib/esm}/equal.test.js +0 -0
  246. package/lib/esm/flags.d.ts +7 -0
  247. package/{build → lib/esm}/flags.js +1 -1
  248. package/lib/esm/flags.test.d.ts +1 -0
  249. package/{build → lib/esm}/flags.test.js +0 -0
  250. package/lib/esm/fs.d.ts +48 -0
  251. package/{build → lib/esm}/fs.js +4 -4
  252. package/lib/esm/fs.test.d.ts +1 -0
  253. package/{build → lib/esm}/fs.test.js +0 -0
  254. package/lib/esm/generator.d.ts +1 -0
  255. package/{build → lib/esm}/generator.js +0 -0
  256. package/lib/esm/generator.test.d.ts +1 -0
  257. package/{build → lib/esm}/generator.test.js +0 -0
  258. package/lib/esm/is_browser.d.ts +1 -0
  259. package/{build → lib/esm}/is_browser.js +0 -0
  260. package/lib/esm/loader.d.mts +22 -0
  261. package/{build → lib/esm}/loader.mjs +0 -0
  262. package/lib/esm/lock.d.ts +1 -0
  263. package/{build → lib/esm}/lock.js +0 -0
  264. package/lib/esm/lock.test.d.ts +1 -0
  265. package/{build → lib/esm}/lock.test.js +0 -0
  266. package/lib/esm/log.d.ts +26 -0
  267. package/{build → lib/esm}/log.js +0 -0
  268. package/lib/esm/observable/event.d.ts +35 -0
  269. package/lib/esm/observable/event.js +46 -0
  270. package/lib/esm/observable/observable.d.ts +132 -0
  271. package/lib/esm/observable/observable.js +343 -0
  272. package/lib/esm/observable/observable.test.d.ts +1 -0
  273. package/lib/esm/observable/observable.test.js +63 -0
  274. package/lib/esm/range.d.ts +1 -0
  275. package/{build → lib/esm}/range.js +0 -0
  276. package/lib/esm/result.d.ts +31 -0
  277. package/{build → lib/esm}/result.js +1 -1
  278. package/lib/esm/result.test.d.ts +1 -0
  279. package/{build → lib/esm}/result.test.js +0 -0
  280. package/lib/esm/safe.d.ts +1 -0
  281. package/{build → lib/esm}/safe.js +0 -0
  282. package/lib/esm/scope/describe.d.ts +18 -0
  283. package/{build → lib/esm}/scope/describe.js +14 -6
  284. package/lib/esm/scope/display/console.d.ts +2 -0
  285. package/{build → lib/esm}/scope/display/console.js +0 -0
  286. package/lib/esm/scope/display/dom.d.ts +3 -0
  287. package/{build → lib/esm}/scope/display/dom.js +0 -0
  288. package/lib/esm/scope/display/junit.d.ts +2 -0
  289. package/{build → lib/esm}/scope/display/junit.js +0 -0
  290. package/lib/esm/scope/execute.d.ts +12 -0
  291. package/{build → lib/esm}/scope/execute.js +2 -2
  292. package/lib/esm/scope/expect.d.ts +23 -0
  293. package/{build → lib/esm}/scope/expect.js +0 -0
  294. package/lib/esm/scope/fix.d.ts +4 -0
  295. package/{build → lib/esm}/scope/fix.js +0 -0
  296. package/{build/scope/index.js → lib/esm/scope/index.d.ts} +0 -0
  297. package/lib/esm/scope/index.js +3 -0
  298. package/lib/esm/scope/scope.d.ts +17 -0
  299. package/lib/esm/scope/scope.js +1 -0
  300. package/lib/esm/scope/state.d.ts +1 -0
  301. package/lib/esm/scope/state.js +7 -0
  302. package/lib/esm/server/http/apps.d.ts +5 -0
  303. package/{build → lib/esm}/server/http/apps.js +0 -0
  304. package/lib/esm/server/http/css.d.ts +5 -0
  305. package/{build → lib/esm}/server/http/css.js +3 -0
  306. package/lib/esm/server/http/index.d.ts +21 -0
  307. package/{build → lib/esm}/server/http/index.js +0 -0
  308. package/lib/esm/server/http/response.d.ts +4 -0
  309. package/{build → lib/esm}/server/http/response.js +0 -0
  310. package/lib/esm/server/http/sitemap.d.ts +2 -0
  311. package/{build → lib/esm}/server/http/sitemap.js +0 -0
  312. package/lib/esm/server/http/static.d.ts +2 -0
  313. package/{build → lib/esm}/server/http/static.js +0 -0
  314. package/lib/esm/server/http/typescript.d.ts +5 -0
  315. package/{build → lib/esm}/server/http/typescript.js +0 -0
  316. package/lib/esm/server/main.d.ts +2 -0
  317. package/{build → lib/esm}/server/main.js +5 -2
  318. package/lib/esm/test.d.mts +2 -0
  319. package/lib/esm/test.mjs +26 -0
  320. package/lib/esm/test_all.d.ts +9 -0
  321. package/{build → lib/esm}/test_all.js +17 -7
  322. package/lib/esm/transpile.d.mts +3 -0
  323. package/{build → lib/esm}/transpile.mjs +0 -0
  324. package/lib/esm/tsconfig.tsbuildinfo +1 -0
  325. package/package.json +17 -18
  326. package/src/assert.ts +1 -1
  327. package/src/components/button_bar.ts +3 -3
  328. package/src/components/inline_edit.ts +3 -3
  329. package/src/components/logger.ts +5 -6
  330. package/src/components/select.ts +3 -3
  331. package/src/components/test.js +3 -2
  332. package/src/components/virtual_scroll.test.ts +4 -4
  333. package/src/components/virtual_scroll.ts +8 -8
  334. package/src/context.ts +3 -3
  335. package/src/diff.test.ts +48 -0
  336. package/src/diff.ts +84 -0
  337. package/src/dom/css/border.ts +3 -3
  338. package/src/dom/css/core.ts +1 -1
  339. package/src/dom/css/fstyle.ts +2 -2
  340. package/src/dom/css/sizing.ts +1 -1
  341. package/src/dom/dom.ts +73 -61
  342. package/src/dom/fc.test.ts +3 -3
  343. package/src/dom/fc.ts +11 -10
  344. package/src/dom/form/form.app.ts +2 -2
  345. package/src/dom/form/form.ts +3 -3
  346. package/src/dom/html.test.ts +8 -8
  347. package/src/dom/html.ts +7 -10
  348. package/src/dom/observable.test.ts +43 -0
  349. package/src/dom/observable.ts +11 -0
  350. package/src/dom/provide.ts +1 -1
  351. package/src/dom/router/link.ts +2 -2
  352. package/src/dom/router/router.ts +5 -5
  353. package/src/dom/svg.ts +1 -1
  354. package/src/dom/test.ts +8 -2
  355. package/src/dom/types/html.ts +1 -1
  356. package/src/dom/xml.ts +1 -2
  357. package/src/equal.ts +1 -1
  358. package/src/flags.ts +1 -1
  359. package/src/fs.ts +4 -4
  360. package/src/index.html +12 -9
  361. package/src/observable/_notes +21 -8
  362. package/src/observable/event.ts +93 -0
  363. package/src/observable/observable.test.ts +73 -0
  364. package/src/observable/observable.ts +463 -0
  365. package/src/pico/_variables.scss +1 -1
  366. package/src/pico/layout/_sectioning.scss +2 -0
  367. package/src/result.ts +1 -1
  368. package/src/scope/describe.ts +16 -6
  369. package/src/scope/display/console.ts +4 -4
  370. package/src/scope/display/dom.ts +7 -7
  371. package/src/scope/display/junit.ts +3 -3
  372. package/src/scope/execute.ts +4 -7
  373. package/src/scope/expect.ts +3 -3
  374. package/src/scope/state.ts +10 -0
  375. package/src/server/http/css.ts +3 -1
  376. package/src/server/http/sitemap.ts +1 -1
  377. package/src/server/main.ts +9 -2
  378. package/src/test.mjs +22 -18
  379. package/src/test_all.ts +20 -8
  380. package/build/components/test.js +0 -2
  381. package/build/dom/dom.d.ts +0 -27
  382. package/build/dom/form/form.app.d.ts +0 -1
  383. package/build/dom/html.d.ts +0 -117
  384. package/build/dom/router/link.d.ts +0 -6
  385. package/build/dom/svg.d.ts +0 -64
  386. package/build/dom/test.js +0 -2
  387. package/build/test.mjs +0 -23
  388. package/src/observable/observable._js +0 -175
package/src/diff.ts ADDED
@@ -0,0 +1,84 @@
1
+ import { range } from "./range.js";
2
+ import { isSome, None, Option, Some } from "./result.js";
3
+
4
+ export const DiffA = Symbol("A");
5
+ export const DiffB = Symbol("B");
6
+
7
+ export type DiffIndex = string | number;
8
+ export type DiffPrimitive = string | number | boolean | null | undefined;
9
+
10
+ interface DiffEntry {
11
+ key: DiffIndex;
12
+ left: DiffPrimitive;
13
+ right: DiffPrimitive;
14
+ }
15
+
16
+ interface DiffList {
17
+ key: DiffIndex;
18
+ children: (DiffEntry | DiffList)[];
19
+ }
20
+
21
+ function doDiff<T>(va: T, vb: T, k: DiffIndex): Option<DiffList | DiffEntry> {
22
+ if (Array.isArray(va)) {
23
+ // @ts-ignore
24
+ return diffArray(va, vb, k);
25
+ }
26
+ if (typeof va === "object") {
27
+ const d = diffObject(va, vb, k);
28
+ if (d.children.length === 0) {
29
+ return None();
30
+ } else {
31
+ return Some(d);
32
+ }
33
+ }
34
+ if (Object.is(va, vb)) {
35
+ return None();
36
+ } else {
37
+ // @ts-ignore
38
+ return { key: k, left: va, right: vb };
39
+ }
40
+ }
41
+
42
+ function diffArray<T>(
43
+ a: Partial<T>[],
44
+ b: Partial<T>[],
45
+ key: DiffIndex
46
+ ): Option<DiffList> {
47
+ const indexes = Math.max(a.length, b.length);
48
+ const children = range(0, indexes)
49
+ .map((i) => doDiff(a[i], b[i], i))
50
+ .filter(isSome);
51
+ return children.length > 0 ? { key, children } : None();
52
+ }
53
+
54
+ function diffObject<T>(
55
+ a: Partial<T>,
56
+ b: Partial<T>,
57
+ key: DiffIndex = ""
58
+ ): DiffList {
59
+ const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
60
+ const children = [...keys]
61
+ // @ts-ignore
62
+ .map((k) => doDiff(a[k], b[k], k))
63
+ .filter(isSome);
64
+ return {
65
+ key,
66
+ children,
67
+ };
68
+ }
69
+
70
+ export function diff<T>(
71
+ a: Partial<T>,
72
+ b: Partial<T>
73
+ ): (DiffEntry | DiffList)[] {
74
+ if (typeof a != "object" && !Object.is(a, b)) {
75
+ // @ts-ignore
76
+ return [{ key: "", left: a, right: b }];
77
+ }
78
+ return (
79
+ Array.isArray(a)
80
+ ? // @ts-ignore
81
+ diffArray(a, b, "") ?? { children: [] }
82
+ : diffObject(a, b, "")
83
+ ).children;
84
+ }
@@ -1,6 +1,6 @@
1
- import { Properties } from "../types/css.js";
2
- import { Side, Size } from "./constants.js";
3
- import { isSide, getSize, getSide } from "./core.js";
1
+ import { Properties } from "../types/css.js"
2
+ import { Side, Size } from "./constants.js"
3
+ import { isSide, getSize, getSide } from "./core.js"
4
4
 
5
5
  export function rounded(size: Size = "", side: Side = "") {
6
6
  if (isSide(size)) {
@@ -1,4 +1,4 @@
1
- import { Side, Sides, Size, Sizes } from "./constants.js";
1
+ import { Side, Sides, Size, Sizes } from "./constants.js"
2
2
 
3
3
  export function isSide(v: string): v is Side {
4
4
  return Sides[v as keyof typeof Sides] !== undefined;
@@ -1,5 +1,5 @@
1
- import { dashCase } from "../../case.js";
2
- import { Properties } from "../types/css.js";
1
+ import { dashCase } from "../../case.js"
2
+ import { Properties } from "../types/css.js"
3
3
 
4
4
  export type FStyle =
5
5
  | Properties
@@ -1,4 +1,4 @@
1
- import { Width, Widths } from "./constants.js";
1
+ import { Width, Widths } from "./constants.js"
2
2
 
3
3
  export function width(amount: Width, block?: "inline") {
4
4
  if (amount === undefined && Widths[block as Width] !== undefined) {
package/src/dom/dom.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as CSS from "./types/css";
1
+ import { Properties } from "./types/css.js"
2
2
 
3
3
  const Events = Symbol("events");
4
4
  export const CLEAR = Symbol("Clear children");
@@ -10,40 +10,44 @@ export type DOMElement = Element &
10
10
  DocumentAndElementEventHandlers &
11
11
  ElementCSSInlineStyle;
12
12
 
13
- export type Updater<E extends DOMElement> = Omit<E, "style"> & {
14
- [Events]?: Map<string, EventHandler>;
15
- update?: (attrs?: DenormAttrs<E>, ...children: DenormChildren[]) => Node;
16
- };
17
-
18
- export type Updatable<E extends Element> = Omit<E, "style"> & {
19
- [Events]: Map<string, EventHandler>;
20
- update: (attrs?: DenormAttrs<E>, ...children: DenormChildren[]) => Node;
21
- };
22
-
23
13
  export type DomAttrs = {
24
- class: string;
25
- style: Partial<CSS.Properties>;
14
+ class: string | string[];
15
+ style: Partial<Properties> | string;
16
+ role: "button" | "list" | "listbox";
26
17
  events: Partial<{
27
- [K in keyof HTMLElementEventMap]: EventHandler;
18
+ [K in keyof HTMLElementEventMap]: EventHandler | null;
28
19
  }>;
29
20
  };
30
21
 
31
- export type Attrs<E extends Element, S = {}> = Partial<E & S & DomAttrs>;
22
+ export type Attrs<E extends Omit<Element, "update">, S = {}> = Partial<
23
+ Omit<E, "style"> & S & DomAttrs
24
+ >;
32
25
 
33
- export type DenormAttrs<E extends Element, S = {}> =
26
+ export type DenormAttrs<E extends Omit<Element, "update">, S = {}> =
34
27
  | Attrs<E, S>
35
28
  | DenormChildren;
36
29
 
30
+ declare global {
31
+ interface Element {
32
+ [Events]: Map<string, EventHandler>;
33
+ update(attrs?: DenormAttrs<Element>, ...children: DenormChildren[]): this;
34
+ }
35
+ }
36
+
37
+ export type DOMUpdates<E extends Element = Element> =
38
+ | [DenormAttrs<E>, ...DenormChildren[]]
39
+ | DenormChildren[];
40
+
37
41
  function isAttrs<E extends Element>(
38
42
  attrs: DenormAttrs<E> | undefined
39
43
  ): attrs is Attrs<E> {
40
44
  if (!attrs) {
41
45
  return false;
42
46
  }
43
- if (typeof attrs === "string") {
44
- return false;
47
+ if (typeof attrs === "object") {
48
+ return !(attrs as Node).nodeType;
45
49
  }
46
- return !(attrs as Node).nodeType;
50
+ return false;
47
51
  }
48
52
 
49
53
  export function normalizeArguments<E extends Element>(
@@ -63,29 +67,31 @@ export function normalizeArguments<E extends Element>(
63
67
  return [attributes, children.flat()];
64
68
  }
65
69
 
66
- export function up<E extends DOMElement>(
67
- element: E,
70
+ export function up<E extends Element>(
71
+ element: Omit<E, "update">,
68
72
  attrs?: DenormAttrs<E>,
69
73
  ...children: DenormChildren[]
70
- ): Updatable<E> {
71
- return update(element, ...normalizeArguments(attrs, children));
74
+ ): E {
75
+ return update(element, ...normalizeArguments(attrs, children)) as E;
72
76
  }
73
77
 
74
- export function update<E extends DOMElement>(
75
- element: Updater<E>,
76
- attrs: Attrs<E>,
78
+ export function update(
79
+ element: Omit<Element, "update">,
80
+ attrs: Attrs<Element>,
77
81
  children: DenormChildren[]
78
- ): Updatable<E> {
82
+ ): Element {
79
83
  // Track events, to remove later
80
84
  const $events = (element[Events] ??= new Map<string, EventHandler>());
81
85
  const { style = {}, events = {}, ...rest } = attrs;
82
86
 
83
87
  Object.entries(events as NonNullable<typeof attrs.events>).forEach(
84
88
  ([k, v]) => {
85
- if (v === null && $events.has(k)) {
86
- const listener = $events.get(k)!;
87
- element.removeEventListener(k, listener);
88
- } else if (!$events.has(k)) {
89
+ if (v === null) {
90
+ if ($events.has(k)) {
91
+ const listener = $events.get(k)!;
92
+ element.removeEventListener(k, listener);
93
+ }
94
+ } else if (v !== undefined) {
89
95
  element.addEventListener(k as keyof ElementEventMap, v);
90
96
  $events.set(k, v);
91
97
  }
@@ -107,48 +113,54 @@ export function update<E extends DOMElement>(
107
113
  }
108
114
 
109
115
  Object.entries(rest).forEach(([k, v]) => {
110
- if (k === "class" && typeof v === "string") {
111
- v.split(/\s+/m)
116
+ if (k === "class") {
117
+ v = Array.isArray(v)
118
+ ? v
119
+ : (typeof v === "string" ? v : `${v}`).split(/\s+/m);
120
+ (v as string[])
112
121
  .filter((s) => s !== "")
113
- .forEach((c) => element.classList.add(c));
122
+ .forEach((c) => {
123
+ if (c.startsWith("!")) {
124
+ element.classList.remove(c.substring(1));
125
+ } else {
126
+ element.classList.add(c);
127
+ }
128
+ });
129
+ return;
114
130
  }
115
131
 
116
- let useAttributes =
117
- k.startsWith("aria-") ||
118
- k == "role" ||
132
+ const useNamespace =
133
+ element.namespaceURI &&
119
134
  element.namespaceURI != "http://www.w3.org/1999/xhtml";
120
-
121
- if (useAttributes) {
122
- switch (v) {
123
- case false:
124
- element.removeAttributeNS(element.namespaceURI, k);
125
- break;
126
- case true:
127
- element.setAttributeNS(element.namespaceURI, k, k);
128
- break;
129
- default:
130
- if (v === "") {
131
- element.removeAttributeNS(element.namespaceURI, k);
132
- } else {
133
- element.setAttributeNS(element.namespaceURI, k, v);
134
- }
135
+ const remove = !v;
136
+
137
+ if (useNamespace) {
138
+ if (remove) {
139
+ element.removeAttributeNS(element.namespaceURI, k);
140
+ } else if (v === true) {
141
+ element.setAttributeNS(element.namespaceURI, k, k);
142
+ } else {
143
+ element.setAttributeNS(element.namespaceURI, k, v);
135
144
  }
136
145
  } else {
137
- // @ts-ignore Object.entries is unable to statically look into args
138
- element[k] = v;
146
+ if (remove) {
147
+ element.removeAttribute(k);
148
+ } else if (v === true) {
149
+ element.setAttribute(k, k);
150
+ } else {
151
+ element.setAttribute(k, v);
152
+ }
139
153
  }
140
154
  });
141
155
 
142
156
  if (children?.length > 0) {
143
- if (children[0] === CLEAR) {
144
- element.replaceChildren();
145
- } else {
146
- element.replaceChildren(...(children as (string | Node)[]));
147
- }
157
+ element.replaceChildren(
158
+ ...(children[0] === CLEAR ? [] : (children as (string | Node)[]))
159
+ );
148
160
  }
149
161
 
150
- element.update ??= (attrs, ...children) =>
162
+ (element as Element).update ??= (attrs, ...children) =>
151
163
  update(element, ...normalizeArguments(attrs, children));
152
164
 
153
- return element as Updatable<E>;
165
+ return element as Element;
154
166
  }
@@ -1,6 +1,6 @@
1
- import { describe, it, expect } from "../scope/index.js";
2
- import { FC } from "./fc.js";
3
- import { button, div, form, input, label, small } from "./html.js";
1
+ import { describe, it, expect } from "../scope/index.js"
2
+ import { FC } from "./fc.js"
3
+ import { button, div, form, input, label, small } from "./html.js"
4
4
 
5
5
  describe("FC", () => {
6
6
  it("creates FCs", () => {
package/src/dom/fc.ts CHANGED
@@ -3,25 +3,24 @@ import {
3
3
  DenormChildren,
4
4
  DomAttrs,
5
5
  normalizeArguments,
6
- Updatable,
7
6
  update,
8
- } from "./dom.js";
7
+ } from "./dom.js"
9
8
 
10
9
  export type Attrs<S> = S & Partial<DomAttrs>;
11
10
 
12
11
  export const State = Symbol();
13
12
  export interface FCComponent<P extends object, S extends object>
14
- extends HTMLElement {
15
- [State]: Partial<S>;
13
+ extends Element {
14
+ [State]?: Partial<S>;
16
15
  update(
17
- attrs?: Partial<Attrs<P>> | DenormChildren,
16
+ attrs?: Partial<Attrs<P> & DomAttrs> | DenormChildren,
18
17
  ...children: DenormChildren[]
19
- ): void;
18
+ ): this;
20
19
  }
21
20
  export interface RenderFn<P extends object, S extends object> {
22
21
  (el: FCComponent<P, S>, attrs: Attrs<P>, children: DenormChildren[]):
23
- | Updatable<Element>
24
- | Updatable<Element>[];
22
+ | Element
23
+ | Element[];
25
24
  }
26
25
 
27
26
  export interface FCComponentCtor<P extends object, S extends object> {
@@ -35,7 +34,7 @@ export function FC<P extends object, S extends object = {}>(
35
34
  name: string,
36
35
  component: RenderFn<P, S>
37
36
  ): FCComponentCtor<P, S> {
38
- class FCImpl extends HTMLElement {
37
+ class FCImpl extends HTMLElement implements FCComponent<P, S> {
39
38
  constructor() {
40
39
  super();
41
40
  }
@@ -55,12 +54,14 @@ export function FC<P extends object, S extends object = {}>(
55
54
  this.#children = children;
56
55
  }
57
56
  this.#attrs = { ...this.#attrs, ...(attrs as Attrs<P>) };
57
+
58
58
  // Apply updates from the attrs to the dom node itself
59
- // @ts-ignore
60
59
  update(this, this.#attrs, []);
60
+
61
61
  // Re-run the component function using new element, attrs, and children.
62
62
  const replace = [component(this, this.#attrs, this.#children)];
63
63
  this.replaceChildren(...replace.flat());
64
+ return this;
64
65
  }
65
66
  }
66
67
 
@@ -1,5 +1,5 @@
1
- import { article, button, div, main, small } from "../html.js";
2
- import { Form, Input } from "./form.js";
1
+ import { article, button, div, main, small } from "../html.js"
2
+ import { Form, Input } from "./form.js"
3
3
 
4
4
  export const App = () =>
5
5
  main(
@@ -1,12 +1,12 @@
1
- import { Attrs, DenormChildren } from "../dom.js";
2
- import { form, input, label, option, select } from "../html.js";
1
+ import { Attrs, DenormChildren } from "../dom.js"
2
+ import { form, input, label, option, select } from "../html.js"
3
3
  import {
4
4
  FormAttributes,
5
5
  InputAttributes,
6
6
  LabelAttributes,
7
7
  OptionAttributes,
8
8
  SelectAttributes,
9
- } from "../types/html.js";
9
+ } from "../types/html"
10
10
 
11
11
  export const Form = (attrs: FormAttributes, ...children: DenormChildren[]) => {
12
12
  if (attrs.events?.submit) {
@@ -1,6 +1,6 @@
1
- import { describe, it } from "../scope/describe.js";
2
- import { expect } from "../scope/expect.js";
3
- import { table, tbody, td, th, thead, tr, button } from "./html.js";
1
+ import { describe, it } from "../scope/describe.js"
2
+ import { expect } from "../scope/expect.js"
3
+ import { table, tbody, td, th, thead, tr, button } from "./html.js"
4
4
 
5
5
  describe("html", () => {
6
6
  it("creates HTML Elements", () => {
@@ -16,16 +16,16 @@ describe("html", () => {
16
16
  });
17
17
 
18
18
  it("attaches event handlers", () => {
19
- let clicked = false;
19
+ let clicked = 0;
20
20
  const btn = button({
21
21
  events: {
22
22
  click: () => {
23
- clicked = true;
23
+ clicked += 1;
24
24
  },
25
25
  },
26
26
  });
27
27
  btn.dispatchEvent(new Event("click"));
28
- expect(clicked).toBe(true);
28
+ expect(clicked).toBe(1);
29
29
  });
30
30
 
31
31
  it("removes event handlers", () => {
@@ -41,7 +41,7 @@ describe("html", () => {
41
41
 
42
42
  expect(clicked).toBe(1);
43
43
 
44
- btn.update({ events: { click: undefined } });
44
+ btn.update({ events: { click: null } });
45
45
  btn.dispatchEvent(new Event("click"));
46
46
  expect(clicked).toBe(1);
47
47
  });
@@ -49,7 +49,7 @@ describe("html", () => {
49
49
  it("sets style properties", () => {
50
50
  const btn = button({
51
51
  style: { flexDirection: "column" },
52
- }) as unknown as HTMLButtonElement;
52
+ });
53
53
 
54
54
  expect(btn.style.flexDirection).toBe("column");
55
55
  });
package/src/dom/html.ts CHANGED
@@ -1,19 +1,16 @@
1
- import { DenormAttrs, DenormChildren, up, Updatable } from "./dom.js";
2
- import { Properties } from "./types/css.js";
3
-
4
- export type UHTMLElement<E extends HTMLElement = HTMLElement> = Updatable<
5
- Omit<E, "style">
6
- > & { style: Properties };
1
+ import { DenormAttrs, DenormChildren, up } from "./dom.js"
7
2
 
8
3
  const makeHTMLElement =
9
4
  <K extends keyof HTMLElementTagNameMap>(name: K) =>
10
5
  (
11
- attrs?: DenormAttrs<Omit<HTMLElementTagNameMap[K], "style">>,
6
+ attrs?: DenormAttrs<HTMLElementTagNameMap[K]>,
12
7
  ...children: DenormChildren[]
13
8
  ) =>
14
- up(document.createElement(name), attrs, ...children) as UHTMLElement<
15
- HTMLElementTagNameMap[K]
16
- >;
9
+ up(
10
+ document.createElement(name),
11
+ attrs,
12
+ ...children
13
+ ) as HTMLElementTagNameMap[K];
17
14
 
18
15
  export const a = makeHTMLElement("a");
19
16
  export const abbr = makeHTMLElement("abbr");
@@ -0,0 +1,43 @@
1
+ import { O } from "./observable.js"
2
+ import { Subject, map } from "../observable/observable.js"
3
+ import { describe, it } from "../scope/describe.js"
4
+ import { expect } from "../scope/expect.js"
5
+ import { div, span } from "./html.js"
6
+ import { DOMUpdates } from "./dom.js"
7
+
8
+ describe("DOM Observable", () => {
9
+ it("updates a dom node with observable results", async () => {
10
+ const subject = new Subject<string>();
11
+ const observable = subject.pipe(map((s) => [s]));
12
+
13
+ const element = O(div(), observable);
14
+
15
+ expect(element.innerText).toEqual("");
16
+ await subject.next("H");
17
+ expect(element.innerText).toEqual("H");
18
+ await subject.next("He");
19
+ expect(element.innerText).toEqual("He");
20
+ });
21
+
22
+ it("updates a dom node's attributes", async () => {
23
+ const classes = new Subject<string[]>();
24
+ const observable = classes.map<DOMUpdates>((c) => [{ class: c.join(" ") }]);
25
+
26
+ const element = O(span(), observable);
27
+
28
+ expect(element.classList.contains("warning")).toBe(false);
29
+ expect(element.classList.contains("error")).toBe(false);
30
+
31
+ await classes.next(["warning"]);
32
+ expect(element.classList.contains("warning")).toBe(true);
33
+ expect(element.classList.contains("error")).toBe(false);
34
+
35
+ await classes.next(["error"]);
36
+ expect(element.classList.contains("warning")).toBe(true);
37
+ expect(element.classList.contains("error")).toBe(true);
38
+
39
+ await classes.next(["!warning", "!error"]);
40
+ expect(element.classList.contains("warning")).toBe(false);
41
+ expect(element.classList.contains("error")).toBe(false);
42
+ });
43
+ });
@@ -0,0 +1,11 @@
1
+ import { Observable } from "../observable/observable.js"
2
+
3
+ export function O<E extends Element>(
4
+ element: E,
5
+ observable: Observable<Parameters<E["update"]>>
6
+ ): E {
7
+ observable.subscribe((t) => {
8
+ element.update(...t);
9
+ });
10
+ return element;
11
+ }
@@ -1,4 +1,4 @@
1
- import { Option } from "../result.js";
1
+ import { Option } from "../result.js"
2
2
 
3
3
  let registry: Record<string, unknown> = {};
4
4
 
@@ -1,5 +1,5 @@
1
- import { a } from "../html.js";
2
- import { Router } from "./router.js";
1
+ import { a } from "../html.js"
2
+ import { Router } from "./router.js"
3
3
 
4
4
  export interface Link {
5
5
  href: string;
@@ -1,10 +1,10 @@
1
- import { DOMElement, Updatable } from "../dom";
2
- import { Link } from "./link";
1
+ import { DOMElement } from "../dom.js";
2
+ import { Link } from "./link.js";
3
3
 
4
4
  export interface Router {
5
5
  current?: string;
6
6
  navigate: (url: string) => (event: Event) => void;
7
- (target: Updatable<DOMElement>): Updatable<DOMElement>;
7
+ (target: DOMElement): DOMElement;
8
8
  }
9
9
 
10
10
  let baseURI = `${document.baseURI}`;
@@ -15,8 +15,8 @@ const normalizeHref = () => {
15
15
  let globalRouter: Router;
16
16
  export const Router = {
17
17
  for(links: Link[], index: string, setGlobalRouter = true): Router {
18
- let target: Updatable<Element>;
19
- const partialRouter: Partial<Router> = (t: Updatable<Element>) => {
18
+ let target: Element;
19
+ const partialRouter: Partial<Router> = (t: Element) => {
20
20
  target = t;
21
21
  const href = normalizeHref();
22
22
  const route = href === baseURI ? baseURI + index : href;
package/src/dom/svg.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DenormAttrs, DenormChildren, up } from "./dom.js";
1
+ import { DenormAttrs, DenormChildren, up } from "./dom.js"
2
2
 
3
3
  const makeSVGElement =
4
4
  <K extends keyof SVGElementTagNameMap>(name: K) =>
package/src/dom/test.ts CHANGED
@@ -1,2 +1,8 @@
1
- export {};
2
- await Promise.all([import("./html.test.js"), import("./fc.test.js")]);
1
+ export async function loadTests() {
2
+ if (process?.env.CI?.toLowerCase() === "true") return;
3
+ await Promise.all([
4
+ import("./html.test.js"),
5
+ import("./fc.test.js"),
6
+ import("./observable.test.js"),
7
+ ]);
8
+ }
@@ -1,4 +1,4 @@
1
- import { Properties } from "./css.js";
1
+ import { Properties } from "./css"
2
2
 
3
3
  export interface AriaAttributes {
4
4
  [_: `aria-${string}`]: string;
package/src/dom/xml.ts CHANGED
@@ -7,6 +7,5 @@ export function xml(
7
7
  (attrs, [attr, val]) => `${attrs} ${attr}="${val}"`,
8
8
  ""
9
9
  );
10
- const kids = children.join("");
11
- return `<${tag} ${attrs}>${kids}</${tag}>`;
10
+ return `<${tag} ${attrs}>${children.join("")}</${tag}>`;
12
11
  }
package/src/equal.ts CHANGED
@@ -36,7 +36,7 @@ export function equals<A>(a: A | A[], b: A | A[], partial = false): boolean {
36
36
  return matchObjects(a, b, partial);
37
37
  }
38
38
  case "function":
39
- return a.name == (b as unknown as Function).name;
39
+ return a.name === (b as unknown as Function).name;
40
40
  default:
41
41
  return Object.is(a, b);
42
42
  }
package/src/flags.ts CHANGED
@@ -22,7 +22,7 @@ export const parse = (parseArgs: string[]) => {
22
22
  };
23
23
 
24
24
  while (hasNext()) {
25
- if (peek().substr(0, 2) == "--") {
25
+ if (peek().substr(0, 2) === "--") {
26
26
  parseLong(advance().substr(2));
27
27
  } else {
28
28
  args.push(advance());