@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
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ https://github.com/frenic/csstype v3.0.11
4
+ Copyright (c) 2017-2018 Fredrik Nicol
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ */
24
+ Object.defineProperty(exports, "__esModule", { value: true });
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- import { Properties } from "./css.js";
1
+ import { Properties } from "./css";
2
2
  export interface AriaAttributes {
3
3
  [_: `aria-${string}`]: string;
4
4
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
File without changes
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.xml = void 0;
4
+ function xml(tag, attributes, children = []) {
5
+ const attrs = Object.entries(attributes).reduce((attrs, [attr, val]) => `${attrs} ${attr}="${val}"`, "");
6
+ return `<${tag} ${attrs}>${children.join("")}</${tag}>`;
7
+ }
8
+ exports.xml = xml;
File without changes
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.equals = exports.matchObjects = exports.matchArrays = exports.equalArrays = exports.compareArrays = void 0;
4
+ function compareArrays(equal) {
5
+ return (a, b, partial = false) => a.length === b.length && a.every((e, i) => equal(e, b[i], partial));
6
+ }
7
+ exports.compareArrays = compareArrays;
8
+ exports.equalArrays = compareArrays(Object.is);
9
+ exports.matchArrays = compareArrays(equals);
10
+ function asArray(a) {
11
+ return Object.entries(a).sort((a, b) => a[0].localeCompare(b[0]));
12
+ }
13
+ const matchObjects = (a, b, partial = true) => {
14
+ for (const [k, v] of Object.entries(a)) {
15
+ if (!b.hasOwnProperty(k) && partial)
16
+ continue;
17
+ // @ts-ignore
18
+ if (!equals(v, b[k], partial))
19
+ return false;
20
+ }
21
+ return true;
22
+ };
23
+ exports.matchObjects = matchObjects;
24
+ function equals(a, b, partial = false) {
25
+ // runtime type checking
26
+ switch (typeof a) {
27
+ case "object":
28
+ if (b === undefined) {
29
+ return false;
30
+ }
31
+ if (a instanceof Array && b instanceof Array) {
32
+ return (0, exports.matchArrays)(a, b, partial);
33
+ }
34
+ else {
35
+ return (0, exports.matchObjects)(a, b, partial);
36
+ }
37
+ case "function":
38
+ return a.name === b.name;
39
+ default:
40
+ return Object.is(a, b);
41
+ }
42
+ }
43
+ exports.equals = equals;
File without changes
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_js_1 = require("./scope/index.js");
4
+ const equal_js_1 = require("./equal.js");
5
+ (0, index_js_1.describe)("Equality", () => {
6
+ (0, index_js_1.it)("compares objects", () => {
7
+ (0, index_js_1.expect)((0, equal_js_1.equals)({ a: 1, b: 2 }, { b: 2, a: 1 })).toBe(true);
8
+ (0, index_js_1.expect)((0, equal_js_1.equals)({ a: 1, b: 2 }, { b: 1, a: 2 })).toBe(false);
9
+ });
10
+ (0, index_js_1.it)("compares primitives", () => {
11
+ (0, index_js_1.expect)((0, equal_js_1.equals)(1, 1)).toBe(true);
12
+ (0, index_js_1.expect)((0, equal_js_1.equals)(1, -1)).toBe(false);
13
+ (0, index_js_1.expect)((0, equal_js_1.equals)(0, -0)).toBe(false);
14
+ (0, index_js_1.expect)((0, equal_js_1.equals)(NaN, NaN)).toBe(true);
15
+ });
16
+ (0, index_js_1.it)("compares arrays", () => {
17
+ (0, index_js_1.expect)((0, equal_js_1.equalArrays)([1, 2, 3], [1, 2, 3])).toBe(true);
18
+ (0, index_js_1.expect)((0, equal_js_1.equalArrays)([1], [2, 3])).toBe(false);
19
+ (0, index_js_1.expect)((0, equal_js_1.equalArrays)([{ a: 1 }], [{ a: 1 }])).toBe(false);
20
+ (0, index_js_1.expect)((0, equal_js_1.matchArrays)([{ a: 1 }], [{ a: 1 }])).toBe(true);
21
+ });
22
+ });
File without changes
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parse = void 0;
4
+ const parse = (parseArgs) => {
5
+ const fromNode = parseArgs[0].endsWith("node");
6
+ const argv = parseArgs[fromNode ? 1 : 0];
7
+ const params = new Map();
8
+ const flags = new Map();
9
+ const args = [];
10
+ let index = fromNode ? 2 : 1;
11
+ const hasNext = () => index < parseArgs.length;
12
+ const peek = () => parseArgs[index];
13
+ const advance = () => parseArgs[index++];
14
+ const parseLong = (arg) => {
15
+ if (arg.substr(0, 3) === "no-") {
16
+ flags.set(arg.substr(3), false);
17
+ }
18
+ else if (!arg.includes("=")) {
19
+ flags.set(arg, true);
20
+ }
21
+ else {
22
+ const [param, ...value] = arg.split("=");
23
+ params.set(param, value.join("="));
24
+ }
25
+ };
26
+ while (hasNext()) {
27
+ if (peek().substr(0, 2) === "--") {
28
+ parseLong(advance().substr(2));
29
+ }
30
+ else {
31
+ args.push(advance());
32
+ }
33
+ }
34
+ return {
35
+ get argv0() {
36
+ return argv;
37
+ },
38
+ get args() {
39
+ return args;
40
+ },
41
+ get(flag, def = false) {
42
+ return flags.get(flag) ?? def;
43
+ },
44
+ asNumber(param, def = 0) {
45
+ return Number.parseFloat(params.get(param) ?? `${def}`);
46
+ },
47
+ asString(param, def = "") {
48
+ return params.get(param) ?? def;
49
+ },
50
+ };
51
+ };
52
+ exports.parse = parse;
File without changes
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_js_1 = require("./scope/index.js");
4
+ const flags_js_1 = require("./flags.js");
5
+ const TEST_CASES = {
6
+ SIMPLE: "program",
7
+ NODE: "/usr/local/bin/node program",
8
+ ONE_FLAG: "program --fun",
9
+ ONE_PARAM: "program --fun=100",
10
+ ONE_ARG: "program cat",
11
+ ONE_NO_FLAG: "program --no-fun",
12
+ MIXED: "program --fun=dog cat --port=8080 mouse --hamster --no-bird",
13
+ };
14
+ const makeFlags = (commandLine) => {
15
+ return (0, flags_js_1.parse)(commandLine.split(" "));
16
+ };
17
+ (0, index_js_1.describe)("Flags", () => {
18
+ (0, index_js_1.it)("stores the program name", () => {
19
+ const flags = makeFlags(TEST_CASES.SIMPLE);
20
+ (0, index_js_1.expect)(flags.argv0).toEqual("program");
21
+ (0, index_js_1.expect)(flags.args).toEqual([]);
22
+ });
23
+ (0, index_js_1.it)("stores the program name ignoring node", () => {
24
+ const flags = makeFlags(TEST_CASES.NODE);
25
+ (0, index_js_1.expect)(flags.argv0).toEqual("program");
26
+ (0, index_js_1.expect)(flags.args).toEqual([]);
27
+ });
28
+ (0, index_js_1.it)("parses a flag", () => {
29
+ const flags = makeFlags(TEST_CASES.ONE_FLAG);
30
+ (0, index_js_1.expect)(flags.get("fun")).toBe(true);
31
+ });
32
+ (0, index_js_1.it)("parses a flag with a default value", () => {
33
+ const flags = makeFlags(TEST_CASES.SIMPLE);
34
+ (0, index_js_1.expect)(flags.get("missing")).toBe(false);
35
+ (0, index_js_1.expect)(flags.get("missing", true)).toBe(true);
36
+ });
37
+ });
File without changes
package/lib/cjs/fs.js ADDED
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reset = exports.LocalStorageFileSystemAdapter = exports.ObjectFileSystemAdapter = exports.FileSystem = void 0;
4
+ function join(...paths) {
5
+ const pathParts = [];
6
+ for (const path of paths) {
7
+ for (const part of path.split("/")) {
8
+ switch (part) {
9
+ case "":
10
+ case ".":
11
+ break;
12
+ case "..":
13
+ pathParts.pop();
14
+ break;
15
+ default:
16
+ pathParts.push(part);
17
+ }
18
+ }
19
+ }
20
+ return "/" + pathParts.join("/");
21
+ }
22
+ class FileSystem {
23
+ adapter;
24
+ wd = "/";
25
+ stack = [];
26
+ constructor(adapter = new ObjectFileSystemAdapter()) {
27
+ this.adapter = adapter;
28
+ }
29
+ cwd() {
30
+ return this.wd;
31
+ }
32
+ cd(dir) {
33
+ this.wd = this.p(dir);
34
+ }
35
+ pushd(dir) {
36
+ this.stack.push(this.wd);
37
+ this.cd(dir);
38
+ }
39
+ popd() {
40
+ if (this.stack.length > 0) {
41
+ this.wd = this.stack.pop();
42
+ }
43
+ }
44
+ stat(path) {
45
+ return this.adapter.stat(join(this.cwd(), path));
46
+ }
47
+ readdir(path) {
48
+ return this.adapter.readdir(this.p(path) + "/");
49
+ }
50
+ copyFile(from, to) {
51
+ return this.adapter.copyFile(this.p(from), this.p(to));
52
+ }
53
+ readFile(path) {
54
+ return this.adapter.readFile(this.p(path));
55
+ }
56
+ writeFile(path, contents) {
57
+ return this.adapter.writeFile(this.p(path), contents);
58
+ }
59
+ rm(path) {
60
+ return this.adapter.rm(this.p(path));
61
+ }
62
+ p(path) {
63
+ return path[0] === "/" ? path : join(this.cwd(), path);
64
+ }
65
+ }
66
+ exports.FileSystem = FileSystem;
67
+ class ObjectFileSystemAdapter {
68
+ fs;
69
+ constructor(fs = {}) {
70
+ this.fs = fs;
71
+ }
72
+ stat(path) {
73
+ return new Promise((resolve, reject) => {
74
+ if (this.fs[path] != null) {
75
+ resolve({
76
+ isDirectory() {
77
+ return false;
78
+ },
79
+ isFile() {
80
+ return true;
81
+ },
82
+ });
83
+ }
84
+ else {
85
+ reject();
86
+ }
87
+ });
88
+ }
89
+ readdir(path) {
90
+ return new Promise((resolve) => {
91
+ let dir = [];
92
+ for (const filename of Object.keys(this.fs)) {
93
+ if (filename.startsWith(path)) {
94
+ const end = filename.indexOf("/", path.length + 1);
95
+ const basename = filename.substring(path.length, end === -1 ? undefined : end);
96
+ dir.push(basename);
97
+ }
98
+ }
99
+ return resolve(dir);
100
+ });
101
+ }
102
+ copyFile(from, to) {
103
+ return new Promise((resolve) => {
104
+ this.fs[to] = this.fs[from];
105
+ resolve();
106
+ });
107
+ }
108
+ readFile(path) {
109
+ return new Promise((resolve, reject) => {
110
+ let file = this.fs[path];
111
+ if (file === undefined) {
112
+ reject(new Error(`File Not Found ${path}`));
113
+ }
114
+ else {
115
+ resolve(file);
116
+ }
117
+ });
118
+ }
119
+ writeFile(path, contents) {
120
+ return new Promise((resolve) => {
121
+ this.fs[path] = contents;
122
+ resolve();
123
+ });
124
+ }
125
+ rm(path) {
126
+ return new Promise((resolve) => {
127
+ delete this.fs[path];
128
+ resolve();
129
+ });
130
+ }
131
+ }
132
+ exports.ObjectFileSystemAdapter = ObjectFileSystemAdapter;
133
+ class LocalStorageFileSystemAdapter extends ObjectFileSystemAdapter {
134
+ constructor() {
135
+ super(window.localStorage);
136
+ }
137
+ }
138
+ exports.LocalStorageFileSystemAdapter = LocalStorageFileSystemAdapter;
139
+ async function reset(fs, tree) {
140
+ for (const [path, file] of Object.entries(tree)) {
141
+ if (typeof file === "string") {
142
+ await fs.writeFile(path, file);
143
+ }
144
+ else {
145
+ fs.cd(path);
146
+ await reset(fs, file);
147
+ fs.cd("..");
148
+ }
149
+ }
150
+ }
151
+ exports.reset = reset;
File without changes
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs_js_1 = require("./fs.js");
4
+ const index_js_1 = require("./scope/index.js");
5
+ (0, index_js_1.describe)("FileSystem", () => {
6
+ (0, index_js_1.describe)("Writing", () => {
7
+ (0, index_js_1.it)("Writes files", async () => {
8
+ const fsObj = {};
9
+ const fs = new fs_js_1.FileSystem(new fs_js_1.ObjectFileSystemAdapter(fsObj));
10
+ await fs.writeFile("hello", "world");
11
+ (0, index_js_1.expect)(fsObj).toEqual({ "/hello": "world" });
12
+ });
13
+ (0, index_js_1.it)("Writes deep files", async () => {
14
+ const fsObj = {};
15
+ const fs = new fs_js_1.FileSystem(new fs_js_1.ObjectFileSystemAdapter(fsObj));
16
+ await fs.writeFile("deep/hello", "world");
17
+ (0, index_js_1.expect)(fsObj).toEqual({ "/deep/hello": "world" });
18
+ });
19
+ (0, index_js_1.it)("Writes deep files from root", async () => {
20
+ const fsObj = {};
21
+ const fs = new fs_js_1.FileSystem(new fs_js_1.ObjectFileSystemAdapter(fsObj));
22
+ await fs.writeFile("/root/deep/hello", "world");
23
+ (0, index_js_1.expect)(fsObj).toEqual({ "/root/deep/hello": "world" });
24
+ });
25
+ (0, index_js_1.it)("Writes files after cd", async () => {
26
+ const fsObj = {};
27
+ const fs = new fs_js_1.FileSystem(new fs_js_1.ObjectFileSystemAdapter(fsObj));
28
+ await fs.cd("deep");
29
+ await fs.writeFile("hello", "world");
30
+ (0, index_js_1.expect)(fsObj).toEqual({ "/deep/hello": "world" });
31
+ });
32
+ });
33
+ (0, index_js_1.describe)("directory", () => {
34
+ (0, index_js_1.it)("returns directory listing", async () => {
35
+ const fsObj = {
36
+ "/deep/hello": "world",
37
+ "/deep/bonjour": "monde",
38
+ "/other/file": "text",
39
+ };
40
+ const fs = new fs_js_1.FileSystem(new fs_js_1.ObjectFileSystemAdapter(fsObj));
41
+ const dir = await fs.readdir("deep");
42
+ (0, index_js_1.expect)(dir.sort()).toEqual(["bonjour", "hello"]);
43
+ });
44
+ });
45
+ });
File without changes
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.takeWhile = void 0;
4
+ function* takeWhile(predicate, iterator) {
5
+ for (const x of iterator) {
6
+ if (predicate(x)) {
7
+ yield x;
8
+ }
9
+ else {
10
+ return;
11
+ }
12
+ }
13
+ }
14
+ exports.takeWhile = takeWhile;
File without changes
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const generator_js_1 = require("./generator.js");
4
+ const index_js_1 = require("./scope/index.js");
5
+ (0, index_js_1.describe)("Generator", () => {
6
+ (0, index_js_1.it)("takes from a generator until a predicate", () => {
7
+ const generator = function* () {
8
+ let i = 1;
9
+ while (true) {
10
+ yield (i = i * 2);
11
+ }
12
+ };
13
+ const filter = () => {
14
+ let previousValue = 0;
15
+ return (n) => {
16
+ if (previousValue < 100) {
17
+ previousValue = n;
18
+ return true;
19
+ }
20
+ return false;
21
+ };
22
+ };
23
+ const values = [...(0, generator_js_1.takeWhile)(filter(), generator())];
24
+ (0, index_js_1.expect)(values).toEqual([2, 4, 8, 16, 32, 64, 128]);
25
+ });
26
+ });
File without changes
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IsBrowser = void 0;
4
+ exports.IsBrowser = typeof window !== "undefined";
File without changes
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.load = exports.resolve = void 0;
4
+ const promises_1 = require("node:fs/promises");
5
+ const node_process_1 = require("node:process");
6
+ const node_url_1 = require("node:url");
7
+ const transpile_mjs_1 = require("./transpile.mjs");
8
+ const baseURL = (0, node_url_1.pathToFileURL)(`${(0, node_process_1.cwd)()}/`).href;
9
+ /** @returns {Promise<{url: string}>} */
10
+ async function resolve(
11
+ /** @type string */ specifier,
12
+ /** @type {{parentURL?: string}} */ context,
13
+ /** @type {(specifier: string, context: {parentURL?: string}, defaultResolve: Function) => Promise<{url: string}>} */ defaultResolve) {
14
+ const tsURL = new URL(specifier.replace(/js$/, "ts"), context.parentURL ?? baseURL);
15
+ const tsSpecifier = tsURL.href;
16
+ try {
17
+ const stats = await (0, promises_1.stat)((0, node_url_1.fileURLToPath)(tsURL));
18
+ if (stats.isFile()) {
19
+ return { url: tsSpecifier };
20
+ }
21
+ }
22
+ catch (e) {
23
+ // Do nothing
24
+ }
25
+ return defaultResolve(specifier, context, defaultResolve);
26
+ }
27
+ exports.resolve = resolve;
28
+ /** @returns {Promise<{format: string, source: string}>} */
29
+ async function load(
30
+ /** @type string */ url,
31
+ /** @type {{format?: string}} */ context,
32
+ /** @type {(url: string, context: {format?: string}, defaultLoad?: Function) => Promise<{format: string, source: string}>} */ defaultLoad) {
33
+ return url.endsWith("ts")
34
+ ? {
35
+ format: "module",
36
+ source: await (0, transpile_mjs_1.transpile)(url, async () => (await defaultLoad(url, { format: "module" })).source),
37
+ }
38
+ : defaultLoad(url, context, defaultLoad);
39
+ }
40
+ exports.load = load;
File without changes
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lock = void 0;
4
+ const locks = new WeakSet();
5
+ function lock(fn) {
6
+ return function (...args) {
7
+ let ret = null;
8
+ let ex = null;
9
+ if (!locks.has(fn)) {
10
+ locks.add(fn);
11
+ try {
12
+ ret = fn(...args);
13
+ }
14
+ catch (e) {
15
+ ex = e;
16
+ }
17
+ }
18
+ locks.delete(fn);
19
+ if (ex !== null) {
20
+ throw ex;
21
+ }
22
+ else {
23
+ return ret;
24
+ }
25
+ };
26
+ }
27
+ exports.lock = lock;
File without changes
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_js_1 = require("./scope/index.js");
4
+ const lock_js_1 = require("./lock.js");
5
+ (0, index_js_1.describe)("Lock", () => {
6
+ (0, index_js_1.it)("prevents reentry", function () {
7
+ let count = 0;
8
+ const inc = (0, lock_js_1.lock)(function () {
9
+ if (count > 4) {
10
+ return;
11
+ }
12
+ inc();
13
+ count++;
14
+ });
15
+ inc();
16
+ (0, index_js_1.expect)(count).toBe(1);
17
+ });
18
+ });
File without changes
package/lib/cjs/log.js ADDED
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.error = exports.warn = exports.info = exports.debug = exports.DEFAULT_LOGGER = exports.getLogger = exports.LEVEL = void 0;
4
+ const display_js_1 = require("./display.js");
5
+ exports.LEVEL = {
6
+ UNKNOWN: 0,
7
+ SILENT: 0,
8
+ DEBUG: 1,
9
+ VERBOSE: 1,
10
+ INFO: 2,
11
+ WARN: 3,
12
+ ERROR: 4,
13
+ };
14
+ function getLogger(name) {
15
+ const logger = { level: exports.LEVEL.INFO };
16
+ const logAt = (level, fn) => (message, data) => level >= (logger.level ?? exports.LEVEL.SILENT)
17
+ ? fn((0, display_js_1.display)(message), data)
18
+ : undefined;
19
+ logger.debug = logAt(exports.LEVEL.VERBOSE, console.debug.bind(console));
20
+ logger.info = logAt(exports.LEVEL.INFO, console.info.bind(console));
21
+ logger.warn = logAt(exports.LEVEL.WARN, console.warn.bind(console));
22
+ logger.error = logAt(exports.LEVEL.ERROR, console.error.bind(console));
23
+ return logger;
24
+ }
25
+ exports.getLogger = getLogger;
26
+ exports.DEFAULT_LOGGER = getLogger("default");
27
+ function debug(message, data) {
28
+ if (data)
29
+ exports.DEFAULT_LOGGER.debug(message, data);
30
+ else
31
+ exports.DEFAULT_LOGGER.debug(message);
32
+ }
33
+ exports.debug = debug;
34
+ function info(message, data) {
35
+ if (data)
36
+ exports.DEFAULT_LOGGER.info(message, data);
37
+ else
38
+ exports.DEFAULT_LOGGER.info(message);
39
+ }
40
+ exports.info = info;
41
+ function warn(message, data) {
42
+ if (data)
43
+ exports.DEFAULT_LOGGER.warn(message, data);
44
+ else
45
+ exports.DEFAULT_LOGGER.warn(message);
46
+ }
47
+ exports.warn = warn;
48
+ function error(message, data) {
49
+ if (data)
50
+ exports.DEFAULT_LOGGER.error(message, data);
51
+ else
52
+ exports.DEFAULT_LOGGER.error(message);
53
+ }
54
+ exports.error = error;
@@ -0,0 +1,35 @@
1
+ import { Observable } from "./observable.js";
2
+ export interface Next<T> {
3
+ value: T;
4
+ completed: false;
5
+ failed: false;
6
+ }
7
+ export interface Error<E> {
8
+ error: E;
9
+ completed: false;
10
+ failed: true;
11
+ }
12
+ export interface Completed {
13
+ completed: true;
14
+ failed: false;
15
+ }
16
+ export interface Failed {
17
+ completed: true;
18
+ failed: true;
19
+ }
20
+ export declare type Event<T, E> = Next<T> | Error<E> | Completed | Failed;
21
+ export interface EventSubscriber<T, E> {
22
+ next(e: Event<T, E>): void;
23
+ }
24
+ export declare const next: <T>(value: T) => Next<T>;
25
+ export declare const error: <E>(e: E) => Error<E>;
26
+ export declare const completed: () => Completed;
27
+ export declare const failed: () => Failed;
28
+ export declare const isNext: <T>(event: Event<T, unknown>) => event is Next<T>;
29
+ export declare const isError: <E>(event: Event<unknown, E>) => event is Error<E>;
30
+ export declare const isCompleted: (event: Event<unknown, unknown>) => event is Completed;
31
+ export declare const isFailed: (event: Event<unknown, unknown>) => event is Failed;
32
+ export declare const isEvent: <T, E>(t: T | Event<T, E>) => t is Event<T, E>;
33
+ export declare const asEvents: <T, E>(a: (T | Event<T, E>)[]) => Event<T, E>[];
34
+ export declare const marbles: <T, E>(events: Event<T, E>[]) => string;
35
+ export declare const collect: <T, E>(input$: Observable<T, E>) => Event<T, E>[];