@davidsouther/jiffies 1.0.0-beta.1 → 2.0.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.
- package/{build → lib/cjs}/assert.d.ts +0 -0
- package/lib/cjs/assert.js +40 -0
- package/{build → lib/cjs}/case.d.ts +0 -0
- package/lib/cjs/case.js +9 -0
- package/{build → lib/cjs}/components/button_bar.d.ts +1 -1
- package/lib/cjs/components/button_bar.js +29 -0
- package/{build → lib/cjs}/components/inline_edit.d.ts +1 -1
- package/lib/cjs/components/inline_edit.js +51 -0
- package/{build → lib/cjs}/components/logger.d.ts +2 -3
- package/lib/cjs/components/logger.js +27 -0
- package/lib/cjs/components/select.d.ts +10 -0
- package/lib/cjs/components/select.js +6 -0
- package/lib/cjs/components/test.d.ts +1 -0
- package/lib/cjs/components/test.js +7 -0
- package/{build → lib/cjs}/components/virtual_scroll.d.ts +3 -4
- package/lib/cjs/components/virtual_scroll.js +102 -0
- package/{build → lib/cjs}/components/virtual_scroll.test.d.ts +0 -0
- package/lib/cjs/components/virtual_scroll.test.js +22 -0
- package/{build → lib/cjs}/context.d.ts +0 -0
- package/lib/cjs/context.js +48 -0
- package/{build → lib/cjs}/context.test.d.ts +0 -0
- package/lib/cjs/context.test.js +48 -0
- package/{build → lib/cjs}/debounce.d.ts +0 -0
- package/lib/cjs/debounce.js +11 -0
- package/lib/cjs/diff.d.ts +15 -0
- package/lib/cjs/diff.js +58 -0
- package/{build/components/index.d.ts → lib/cjs/diff.test.d.ts} +0 -0
- package/lib/cjs/diff.test.js +41 -0
- package/{build → lib/cjs}/display.d.ts +0 -0
- package/lib/cjs/display.js +16 -0
- package/{build → lib/cjs}/dom/css/border.d.ts +0 -0
- package/lib/cjs/dom/css/border.js +33 -0
- package/{build → lib/cjs}/dom/css/constants.d.ts +0 -0
- package/lib/cjs/dom/css/constants.js +31 -0
- package/{build → lib/cjs}/dom/css/core.d.ts +0 -0
- package/lib/cjs/dom/css/core.js +31 -0
- package/{build → lib/cjs}/dom/css/fstyle.d.ts +0 -0
- package/lib/cjs/dom/css/fstyle.js +36 -0
- package/{build → lib/cjs}/dom/css/sizing.d.ts +0 -0
- package/lib/cjs/dom/css/sizing.js +14 -0
- package/lib/cjs/dom/dom.d.ts +27 -0
- package/lib/cjs/dom/dom.js +110 -0
- package/{build → lib/cjs}/dom/fc.d.ts +5 -5
- package/lib/cjs/dom/fc.js +39 -0
- package/{build → lib/cjs}/dom/fc.test.d.ts +0 -0
- package/lib/cjs/dom/fc.test.js +23 -0
- package/lib/cjs/dom/form/form.app.d.ts +1 -0
- package/lib/cjs/dom/form/form.app.js +27 -0
- package/lib/cjs/dom/form/form.d.ts +26 -0
- package/lib/cjs/dom/form/form.js +49 -0
- package/{build → lib/cjs}/dom/form/form.test.d.ts +0 -0
- package/{build → lib/cjs}/dom/form/form.test.js +0 -0
- package/lib/cjs/dom/html.d.ts +113 -0
- package/lib/cjs/dom/html.js +119 -0
- package/{build → lib/cjs}/dom/html.test.d.ts +0 -0
- package/lib/cjs/dom/html.test.js +60 -0
- package/lib/cjs/dom/observable.d.ts +2 -0
- package/lib/cjs/dom/observable.js +10 -0
- package/{build/components/index.js → lib/cjs/dom/observable.test.d.ts} +0 -0
- package/lib/cjs/dom/observable.test.js +35 -0
- package/lib/cjs/dom/provide.d.ts +3 -0
- package/lib/cjs/dom/provide.js +12 -0
- package/lib/cjs/dom/router/link.d.ts +6 -0
- package/lib/cjs/dom/router/link.js +7 -0
- package/{build → lib/cjs}/dom/router/router.d.ts +3 -3
- package/lib/cjs/dom/router/router.js +52 -0
- package/lib/cjs/dom/svg.d.ts +64 -0
- package/lib/cjs/dom/svg.js +69 -0
- package/lib/cjs/dom/test.d.ts +1 -0
- package/lib/cjs/dom/test.js +13 -0
- package/{build → lib/cjs}/dom/types/css.d.ts +0 -0
- package/lib/cjs/dom/types/css.js +24 -0
- package/{build → lib/cjs}/dom/types/dom.d.ts +0 -0
- package/{build → lib/cjs}/dom/types/dom.js +0 -0
- package/{build → lib/cjs}/dom/types/html.d.ts +1 -1
- package/lib/cjs/dom/types/html.js +2 -0
- package/{build → lib/cjs}/dom/xml.d.ts +0 -0
- package/lib/cjs/dom/xml.js +8 -0
- package/lib/cjs/equal.d.ts +5 -0
- package/lib/cjs/equal.js +43 -0
- package/{build → lib/cjs}/equal.test.d.ts +0 -0
- package/lib/cjs/equal.test.js +22 -0
- package/{build → lib/cjs}/flags.d.ts +0 -0
- package/lib/cjs/flags.js +52 -0
- package/{build → lib/cjs}/flags.test.d.ts +0 -0
- package/lib/cjs/flags.test.js +37 -0
- package/lib/cjs/fs.d.ts +48 -0
- package/lib/cjs/fs.js +151 -0
- package/{build/components/test.d.ts → lib/cjs/fs.test.d.ts} +0 -0
- package/lib/cjs/fs.test.js +45 -0
- package/{build → lib/cjs}/generator.d.ts +0 -0
- package/lib/cjs/generator.js +14 -0
- package/{build → lib/cjs}/generator.test.d.ts +0 -0
- package/lib/cjs/generator.test.js +26 -0
- package/{build → lib/cjs}/is_browser.d.ts +0 -0
- package/lib/cjs/is_browser.js +4 -0
- package/{build → lib/cjs}/loader.d.mts +0 -0
- package/lib/cjs/loader.mjs +40 -0
- package/{build → lib/cjs}/lock.d.ts +0 -0
- package/lib/cjs/lock.js +27 -0
- package/{build → lib/cjs}/lock.test.d.ts +0 -0
- package/lib/cjs/lock.test.js +18 -0
- package/{build → lib/cjs}/log.d.ts +0 -0
- package/lib/cjs/log.js +54 -0
- package/lib/cjs/observable/event.d.ts +35 -0
- package/lib/cjs/observable/event.js +61 -0
- package/lib/cjs/observable/observable.d.ts +132 -0
- package/lib/cjs/observable/observable.js +363 -0
- package/{build/dom/test.d.ts → lib/cjs/observable/observable.test.d.ts} +0 -0
- package/lib/cjs/observable/observable.test.js +65 -0
- package/{build → lib/cjs}/range.d.ts +0 -0
- package/lib/cjs/range.js +11 -0
- package/{build → lib/cjs}/result.d.ts +11 -11
- package/lib/cjs/result.js +80 -0
- package/{build → lib/cjs}/result.test.d.ts +0 -0
- package/lib/cjs/result.test.js +73 -0
- package/{build → lib/cjs}/safe.d.ts +0 -0
- package/lib/cjs/safe.js +14 -0
- package/{build → lib/cjs}/scope/describe.d.ts +4 -0
- package/lib/cjs/scope/describe.js +73 -0
- package/{build → lib/cjs}/scope/display/console.d.ts +0 -0
- package/lib/cjs/scope/display/console.js +25 -0
- package/{build → lib/cjs}/scope/display/dom.d.ts +2 -2
- package/lib/cjs/scope/display/dom.js +30 -0
- package/{build → lib/cjs}/scope/display/junit.d.ts +0 -0
- package/lib/cjs/scope/display/junit.js +21 -0
- package/{build → lib/cjs}/scope/execute.d.ts +1 -1
- package/lib/cjs/scope/execute.js +91 -0
- package/{build → lib/cjs}/scope/expect.d.ts +1 -1
- package/lib/cjs/scope/expect.js +114 -0
- package/{build → lib/cjs}/scope/fix.d.ts +0 -0
- package/lib/cjs/scope/fix.js +26 -0
- package/{build → lib/cjs}/scope/index.d.ts +0 -0
- package/lib/cjs/scope/index.js +15 -0
- package/{build → lib/cjs}/scope/scope.d.ts +0 -0
- package/lib/cjs/scope/scope.js +2 -0
- package/lib/cjs/scope/state.d.ts +1 -0
- package/lib/cjs/scope/state.js +11 -0
- package/{build → lib/cjs}/server/http/apps.d.ts +0 -0
- package/lib/cjs/server/http/apps.js +27 -0
- package/lib/cjs/server/http/css.d.ts +5 -0
- package/lib/cjs/server/http/css.js +54 -0
- package/{build → lib/cjs}/server/http/index.d.ts +0 -0
- package/lib/cjs/server/http/index.js +77 -0
- package/{build → lib/cjs}/server/http/response.d.ts +0 -0
- package/lib/cjs/server/http/response.js +45 -0
- package/{build → lib/cjs}/server/http/sitemap.d.ts +0 -0
- package/lib/cjs/server/http/sitemap.js +46 -0
- package/{build → lib/cjs}/server/http/static.d.ts +0 -0
- package/lib/cjs/server/http/static.js +25 -0
- package/{build → lib/cjs}/server/http/typescript.d.ts +0 -0
- package/lib/cjs/server/http/typescript.js +44 -0
- package/{build → lib/cjs}/server/main.d.ts +0 -0
- package/lib/cjs/server/main.js +14 -0
- package/{build → lib/cjs}/test.d.mts +0 -0
- package/lib/cjs/test.mjs +28 -0
- package/lib/cjs/test_all.d.ts +9 -0
- package/lib/cjs/test_all.js +30 -0
- package/{build → lib/cjs}/transpile.d.mts +0 -0
- package/lib/cjs/transpile.mjs +22 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -0
- package/lib/esm/assert.d.ts +23 -0
- package/{build → lib/esm}/assert.js +1 -1
- package/lib/esm/case.d.ts +1 -0
- package/{build → lib/esm}/case.js +0 -0
- package/lib/esm/components/button_bar.d.ts +8 -0
- package/lib/esm/components/button_bar.js +27 -0
- package/lib/esm/components/inline_edit.d.ts +12 -0
- package/{build → lib/esm}/components/inline_edit.js +3 -3
- package/lib/esm/components/logger.d.ts +6 -0
- package/{build → lib/esm}/components/logger.js +3 -3
- package/lib/esm/components/select.d.ts +10 -0
- package/{build → lib/esm}/components/select.js +2 -2
- package/lib/esm/components/test.d.ts +1 -0
- package/lib/esm/components/test.js +3 -0
- package/lib/esm/components/virtual_scroll.d.ts +40 -0
- package/{build → lib/esm}/components/virtual_scroll.js +3 -3
- package/{build/dom/types/html.js → lib/esm/components/virtual_scroll.test.d.ts} +0 -0
- package/{build → lib/esm}/components/virtual_scroll.test.js +3 -4
- package/lib/esm/context.d.ts +15 -0
- package/{build → lib/esm}/context.js +3 -3
- package/{build/scope/scope.js → lib/esm/context.test.d.ts} +0 -0
- package/{build → lib/esm}/context.test.js +0 -0
- package/lib/esm/debounce.d.ts +1 -0
- package/{build → lib/esm}/debounce.js +0 -0
- package/lib/esm/diff.d.ts +15 -0
- package/lib/esm/diff.js +54 -0
- package/{build/test_all.d.ts → lib/esm/diff.test.d.ts} +0 -0
- package/lib/esm/diff.test.js +39 -0
- package/lib/esm/display.d.ts +5 -0
- package/lib/esm/display.js +11 -0
- package/lib/esm/dom/css/border.d.ts +11 -0
- package/{build → lib/esm}/dom/css/border.js +0 -0
- package/lib/esm/dom/css/constants.d.ts +31 -0
- package/{build → lib/esm}/dom/css/constants.js +0 -0
- package/lib/esm/dom/css/core.d.ts +5 -0
- package/{build → lib/esm}/dom/css/core.js +0 -0
- package/lib/esm/dom/css/fstyle.d.ts +5 -0
- package/{build → lib/esm}/dom/css/fstyle.js +0 -0
- package/lib/esm/dom/css/sizing.d.ts +5 -0
- package/{build → lib/esm}/dom/css/sizing.js +0 -0
- package/lib/esm/dom/dom.d.ts +27 -0
- package/{build → lib/esm}/dom/dom.js +44 -34
- package/lib/esm/dom/fc.d.ts +14 -0
- package/{build → lib/esm}/dom/fc.js +1 -1
- package/lib/esm/dom/fc.test.d.ts +1 -0
- package/{build → lib/esm}/dom/fc.test.js +0 -0
- package/lib/esm/dom/form/form.app.d.ts +1 -0
- package/{build → lib/esm}/dom/form/form.app.js +0 -0
- package/lib/esm/dom/form/form.d.ts +26 -0
- package/{build → lib/esm}/dom/form/form.js +14 -5
- package/lib/esm/dom/form/form.test.d.ts +0 -0
- package/lib/esm/dom/form/form.test.js +1 -0
- package/lib/esm/dom/html.d.ts +113 -0
- package/{build → lib/esm}/dom/html.js +0 -0
- package/lib/esm/dom/html.test.d.ts +1 -0
- package/{build → lib/esm}/dom/html.test.js +4 -4
- package/lib/esm/dom/observable.d.ts +2 -0
- package/lib/esm/dom/observable.js +6 -0
- package/lib/esm/dom/observable.test.d.ts +1 -0
- package/lib/esm/dom/observable.test.js +33 -0
- package/lib/esm/dom/provide.d.ts +3 -0
- package/lib/esm/dom/provide.js +7 -0
- package/lib/esm/dom/router/link.d.ts +6 -0
- package/{build → lib/esm}/dom/router/link.js +0 -0
- package/lib/esm/dom/router/router.d.ts +12 -0
- package/{build → lib/esm}/dom/router/router.js +0 -0
- package/lib/esm/dom/svg.d.ts +64 -0
- package/{build → lib/esm}/dom/svg.js +0 -0
- package/lib/esm/dom/test.d.ts +1 -0
- package/lib/esm/dom/test.js +9 -0
- package/lib/esm/dom/types/css.d.ts +6612 -0
- package/{build → lib/esm}/dom/types/css.js +0 -0
- package/lib/esm/dom/types/dom.d.ts +0 -0
- package/lib/esm/dom/types/dom.js +1 -0
- package/lib/esm/dom/types/html.d.ts +616 -0
- package/lib/esm/dom/types/html.js +1 -0
- package/lib/esm/dom/xml.d.ts +1 -0
- package/{build → lib/esm}/dom/xml.js +1 -2
- package/lib/esm/equal.d.ts +5 -0
- package/lib/esm/equal.js +37 -0
- package/lib/esm/equal.test.d.ts +1 -0
- package/{build → lib/esm}/equal.test.js +0 -0
- package/lib/esm/flags.d.ts +7 -0
- package/{build → lib/esm}/flags.js +1 -1
- package/lib/esm/flags.test.d.ts +1 -0
- package/{build → lib/esm}/flags.test.js +0 -0
- package/lib/esm/fs.d.ts +48 -0
- package/lib/esm/fs.js +144 -0
- package/lib/esm/fs.test.d.ts +1 -0
- package/lib/esm/fs.test.js +43 -0
- package/lib/esm/generator.d.ts +1 -0
- package/{build → lib/esm}/generator.js +0 -0
- package/lib/esm/generator.test.d.ts +1 -0
- package/{build → lib/esm}/generator.test.js +0 -0
- package/lib/esm/is_browser.d.ts +1 -0
- package/{build → lib/esm}/is_browser.js +0 -0
- package/lib/esm/loader.d.mts +22 -0
- package/{build → lib/esm}/loader.mjs +0 -0
- package/lib/esm/lock.d.ts +1 -0
- package/{build → lib/esm}/lock.js +0 -0
- package/lib/esm/lock.test.d.ts +1 -0
- package/{build → lib/esm}/lock.test.js +0 -0
- package/lib/esm/log.d.ts +26 -0
- package/{build → lib/esm}/log.js +16 -4
- package/lib/esm/observable/event.d.ts +35 -0
- package/lib/esm/observable/event.js +46 -0
- package/lib/esm/observable/observable.d.ts +132 -0
- package/lib/esm/observable/observable.js +343 -0
- package/lib/esm/observable/observable.test.d.ts +1 -0
- package/lib/esm/observable/observable.test.js +63 -0
- package/lib/esm/range.d.ts +1 -0
- package/{build → lib/esm}/range.js +0 -0
- package/lib/esm/result.d.ts +31 -0
- package/{build → lib/esm}/result.js +3 -3
- package/lib/esm/result.test.d.ts +1 -0
- package/{build → lib/esm}/result.test.js +0 -0
- package/lib/esm/safe.d.ts +1 -0
- package/{build → lib/esm}/safe.js +0 -0
- package/lib/esm/scope/describe.d.ts +18 -0
- package/{build → lib/esm}/scope/describe.js +14 -6
- package/lib/esm/scope/display/console.d.ts +2 -0
- package/{build → lib/esm}/scope/display/console.js +0 -0
- package/lib/esm/scope/display/dom.d.ts +3 -0
- package/{build → lib/esm}/scope/display/dom.js +0 -0
- package/lib/esm/scope/display/junit.d.ts +2 -0
- package/{build → lib/esm}/scope/display/junit.js +0 -0
- package/lib/esm/scope/execute.d.ts +12 -0
- package/{build → lib/esm}/scope/execute.js +3 -3
- package/lib/esm/scope/expect.d.ts +23 -0
- package/{build → lib/esm}/scope/expect.js +4 -3
- package/lib/esm/scope/fix.d.ts +4 -0
- package/{build → lib/esm}/scope/fix.js +0 -0
- package/{build/scope/index.js → lib/esm/scope/index.d.ts} +0 -0
- package/lib/esm/scope/index.js +3 -0
- package/lib/esm/scope/scope.d.ts +17 -0
- package/lib/esm/scope/scope.js +1 -0
- package/lib/esm/scope/state.d.ts +1 -0
- package/lib/esm/scope/state.js +7 -0
- package/lib/esm/server/http/apps.d.ts +5 -0
- package/{build → lib/esm}/server/http/apps.js +0 -0
- package/lib/esm/server/http/css.d.ts +5 -0
- package/lib/esm/server/http/css.js +50 -0
- package/lib/esm/server/http/index.d.ts +21 -0
- package/{build → lib/esm}/server/http/index.js +4 -2
- package/lib/esm/server/http/response.d.ts +4 -0
- package/{build → lib/esm}/server/http/response.js +6 -3
- package/lib/esm/server/http/sitemap.d.ts +2 -0
- package/{build → lib/esm}/server/http/sitemap.js +0 -0
- package/lib/esm/server/http/static.d.ts +2 -0
- package/{build → lib/esm}/server/http/static.js +0 -0
- package/lib/esm/server/http/typescript.d.ts +5 -0
- package/{build → lib/esm}/server/http/typescript.js +0 -0
- package/lib/esm/server/main.d.ts +2 -0
- package/{build → lib/esm}/server/main.js +5 -2
- package/lib/esm/test.d.mts +2 -0
- package/lib/esm/test.mjs +26 -0
- package/lib/esm/test_all.d.ts +9 -0
- package/lib/esm/test_all.js +28 -0
- package/lib/esm/transpile.d.mts +3 -0
- package/{build → lib/esm}/transpile.mjs +0 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +18 -16
- package/src/assert.ts +1 -1
- package/src/components/button_bar.ts +33 -27
- package/src/components/inline_edit.ts +3 -3
- package/src/components/logger.ts +5 -6
- package/src/components/select.ts +3 -3
- package/src/components/test.js +3 -2
- package/src/components/virtual_scroll.test.ts +4 -4
- package/src/components/virtual_scroll.ts +8 -8
- package/src/context.ts +3 -3
- package/src/diff.test.ts +48 -0
- package/src/diff.ts +84 -0
- package/src/display.ts +8 -2
- package/src/dom/css/border.ts +3 -3
- package/src/dom/css/core.ts +1 -1
- package/src/dom/css/fstyle.ts +2 -2
- package/src/dom/css/sizing.ts +1 -1
- package/src/dom/dom.ts +73 -60
- package/src/dom/fc.test.ts +3 -3
- package/src/dom/fc.ts +11 -10
- package/src/dom/form/form.app.ts +2 -2
- package/src/dom/form/form.ts +33 -10
- package/src/dom/html.test.ts +8 -8
- package/src/dom/html.ts +7 -10
- package/src/dom/observable.test.ts +43 -0
- package/src/dom/observable.ts +11 -0
- package/src/dom/provide.ts +11 -0
- package/src/dom/router/link.ts +2 -2
- package/src/dom/router/router.ts +5 -5
- package/src/dom/svg.ts +1 -1
- package/src/dom/test.ts +8 -2
- package/src/dom/types/html.ts +1 -1
- package/src/dom/xml.ts +1 -2
- package/src/equal.ts +22 -11
- package/src/flags.ts +1 -1
- package/src/fs.test.ts +53 -0
- package/src/fs.ts +180 -0
- package/src/index.html +16 -13
- package/src/log.ts +8 -4
- package/src/observable/_notes +21 -8
- package/src/observable/event.ts +93 -0
- package/src/observable/observable.test.ts +73 -0
- package/src/observable/observable.ts +463 -0
- package/src/pico/_variables.scss +66 -0
- package/src/pico/components/_accordion.scss +112 -0
- package/src/pico/components/_button-group.scss +51 -0
- package/src/pico/components/_card.scss +47 -0
- package/src/pico/components/_dropdown.scss +203 -0
- package/src/pico/components/_modal.scss +181 -0
- package/src/pico/components/_nav.scss +79 -0
- package/src/pico/components/_progress.scss +70 -0
- package/src/pico/components/_property.scss +34 -0
- package/src/pico/content/_button.scss +152 -0
- package/src/pico/content/_code.scss +63 -0
- package/src/pico/content/_embedded.scss +0 -0
- package/src/pico/content/_form-alt.scss +276 -0
- package/src/pico/content/_form.scss +259 -0
- package/src/pico/content/_misc.scss +0 -0
- package/src/pico/content/_table.scss +28 -0
- package/src/pico/content/_toggle.scss +132 -0
- package/src/pico/content/_typography.scss +232 -0
- package/src/pico/layout/_container.scss +40 -0
- package/src/pico/layout/_document.scss +0 -0
- package/src/pico/layout/_flex.scss +46 -0
- package/src/pico/layout/_grid.scss +24 -0
- package/src/pico/layout/_scroller.scss +16 -0
- package/src/pico/layout/_section.scss +8 -0
- package/src/pico/layout/_sectioning.scss +55 -0
- package/src/pico/pico.scss +60 -0
- package/src/pico/reset/_accessibility.scss +34 -0
- package/src/pico/reset/_button.scss +17 -0
- package/src/pico/reset/_code.scss +15 -0
- package/src/pico/reset/_document.scss +48 -0
- package/src/pico/reset/_embedded.scss +39 -0
- package/src/pico/reset/_form.scss +97 -0
- package/src/pico/reset/_misc.scss +23 -0
- package/src/pico/reset/_nav.scss +5 -0
- package/src/pico/reset/_progress.scss +4 -0
- package/src/pico/reset/_table.scss +8 -0
- package/src/pico/reset/_typography.scss +25 -0
- package/src/pico/themes/default/_colors.scss +65 -0
- package/src/pico/themes/default/_dark.scss +148 -0
- package/src/pico/themes/default/_light.scss +149 -0
- package/src/pico/themes/default/_styles.scss +272 -0
- package/src/pico/themes/default.scss +34 -0
- package/src/pico/utilities/_accessibility.scss +3 -0
- package/src/pico/utilities/_loading.scss +52 -0
- package/src/pico/utilities/_reduce-motion.scss +27 -0
- package/src/pico/utilities/_tooltip.scss +101 -0
- package/src/result.ts +17 -21
- package/src/scope/describe.ts +16 -6
- package/src/scope/display/console.ts +4 -4
- package/src/scope/display/dom.ts +7 -7
- package/src/scope/display/junit.ts +3 -3
- package/src/scope/execute.ts +5 -8
- package/src/scope/expect.ts +12 -11
- package/src/scope/state.ts +10 -0
- package/src/server/http/css.ts +65 -0
- package/src/server/http/index.ts +4 -2
- package/src/server/http/response.ts +7 -4
- package/src/server/http/sitemap.ts +1 -1
- package/src/server/main.ts +9 -2
- package/src/test.mjs +22 -18
- package/src/test_all.ts +20 -9
- package/src/zip/spec.txt +3260 -0
- package/build/components/button_bar.js +0 -16
- package/build/components/select.d.ts +0 -13
- package/build/components/test.js +0 -2
- package/build/display.js +0 -3
- package/build/dom/dom.d.ts +0 -27
- package/build/dom/form/form.app.d.ts +0 -1
- package/build/dom/form/form.d.ts +0 -25
- package/build/dom/html.d.ts +0 -117
- package/build/dom/router/link.d.ts +0 -6
- package/build/dom/svg.d.ts +0 -64
- package/build/dom/test.js +0 -2
- package/build/equal.d.ts +0 -4
- package/build/equal.js +0 -22
- package/build/index.d.ts +0 -13
- package/build/index.js +0 -13
- package/build/parcel_resolver.d.ts +0 -3
- package/build/parcel_resolver.js +0 -19
- package/build/test.mjs +0 -23
- package/build/test_all.js +0 -19
- package/src/observable/observable._js +0 -175
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i = exports.html = exports.hr = exports.hgroup = exports.header = exports.head = exports.h6 = exports.h5 = exports.h4 = exports.h3 = exports.h2 = exports.h1 = exports.form = exports.footer = exports.figure = exports.figcaption = exports.fieldset = exports.embed = exports.em = exports.dt = exports.dl = exports.div = exports.dialog = exports.dfn = exports.details = exports.del = exports.dd = exports.datalist = exports.data = exports.colgroup = exports.col = exports.code = exports.cite = exports.caption = exports.canvas = exports.button = exports.br = exports.body = exports.blockquote = exports.bdo = exports.bdi = exports.base = exports.b = exports.audio = exports.aside = exports.article = exports.area = exports.address = exports.abbr = exports.a = void 0;
|
|
4
|
+
exports.textarea = exports.template = exports.td = exports.tbody = exports.table = exports.sup = exports.summary = exports.sub = exports.style = exports.strong = exports.span = exports.source = exports.small = exports.slot = exports.select = exports.section = exports.script = exports.samp = exports.s = exports.ruby = exports.rt = exports.rp = exports.q = exports.progress = exports.pre = exports.picture = exports.param = exports.p = exports.output = exports.option = exports.optgroup = exports.ol = exports.object = exports.noscript = exports.nav = exports.meter = exports.meta = exports.menu = exports.mark = exports.map = exports.main = exports.link = exports.li = exports.legend = exports.label = exports.kbd = exports.ins = exports.input = exports.img = exports.iframe = void 0;
|
|
5
|
+
exports.wbr = exports.video = exports.htmlvar = exports.ul = exports.u = exports.track = exports.tr = exports.title = exports.time = exports.thead = exports.th = exports.tfoot = void 0;
|
|
6
|
+
const dom_js_1 = require("./dom.js");
|
|
7
|
+
const makeHTMLElement = (name) => (attrs, ...children) => (0, dom_js_1.up)(document.createElement(name), attrs, ...children);
|
|
8
|
+
exports.a = makeHTMLElement("a");
|
|
9
|
+
exports.abbr = makeHTMLElement("abbr");
|
|
10
|
+
exports.address = makeHTMLElement("address");
|
|
11
|
+
exports.area = makeHTMLElement("area");
|
|
12
|
+
exports.article = makeHTMLElement("article");
|
|
13
|
+
exports.aside = makeHTMLElement("aside");
|
|
14
|
+
exports.audio = makeHTMLElement("audio");
|
|
15
|
+
exports.b = makeHTMLElement("b");
|
|
16
|
+
exports.base = makeHTMLElement("base");
|
|
17
|
+
exports.bdi = makeHTMLElement("bdi");
|
|
18
|
+
exports.bdo = makeHTMLElement("bdo");
|
|
19
|
+
exports.blockquote = makeHTMLElement("blockquote");
|
|
20
|
+
exports.body = makeHTMLElement("body");
|
|
21
|
+
exports.br = makeHTMLElement("br");
|
|
22
|
+
exports.button = makeHTMLElement("button");
|
|
23
|
+
exports.canvas = makeHTMLElement("canvas");
|
|
24
|
+
exports.caption = makeHTMLElement("caption");
|
|
25
|
+
exports.cite = makeHTMLElement("cite");
|
|
26
|
+
exports.code = makeHTMLElement("code");
|
|
27
|
+
exports.col = makeHTMLElement("col");
|
|
28
|
+
exports.colgroup = makeHTMLElement("colgroup");
|
|
29
|
+
exports.data = makeHTMLElement("data");
|
|
30
|
+
exports.datalist = makeHTMLElement("datalist");
|
|
31
|
+
exports.dd = makeHTMLElement("dd");
|
|
32
|
+
exports.del = makeHTMLElement("del");
|
|
33
|
+
exports.details = makeHTMLElement("details");
|
|
34
|
+
exports.dfn = makeHTMLElement("dfn");
|
|
35
|
+
exports.dialog = makeHTMLElement("dialog");
|
|
36
|
+
exports.div = makeHTMLElement("div");
|
|
37
|
+
exports.dl = makeHTMLElement("dl");
|
|
38
|
+
exports.dt = makeHTMLElement("dt");
|
|
39
|
+
exports.em = makeHTMLElement("em");
|
|
40
|
+
exports.embed = makeHTMLElement("embed");
|
|
41
|
+
exports.fieldset = makeHTMLElement("fieldset");
|
|
42
|
+
exports.figcaption = makeHTMLElement("figcaption");
|
|
43
|
+
exports.figure = makeHTMLElement("figure");
|
|
44
|
+
exports.footer = makeHTMLElement("footer");
|
|
45
|
+
exports.form = makeHTMLElement("form");
|
|
46
|
+
exports.h1 = makeHTMLElement("h1");
|
|
47
|
+
exports.h2 = makeHTMLElement("h2");
|
|
48
|
+
exports.h3 = makeHTMLElement("h3");
|
|
49
|
+
exports.h4 = makeHTMLElement("h4");
|
|
50
|
+
exports.h5 = makeHTMLElement("h5");
|
|
51
|
+
exports.h6 = makeHTMLElement("h6");
|
|
52
|
+
exports.head = makeHTMLElement("head");
|
|
53
|
+
exports.header = makeHTMLElement("header");
|
|
54
|
+
exports.hgroup = makeHTMLElement("hgroup");
|
|
55
|
+
exports.hr = makeHTMLElement("hr");
|
|
56
|
+
exports.html = makeHTMLElement("html");
|
|
57
|
+
exports.i = makeHTMLElement("i");
|
|
58
|
+
exports.iframe = makeHTMLElement("iframe");
|
|
59
|
+
exports.img = makeHTMLElement("img");
|
|
60
|
+
exports.input = makeHTMLElement("input");
|
|
61
|
+
exports.ins = makeHTMLElement("ins");
|
|
62
|
+
exports.kbd = makeHTMLElement("kbd");
|
|
63
|
+
exports.label = makeHTMLElement("label");
|
|
64
|
+
exports.legend = makeHTMLElement("legend");
|
|
65
|
+
exports.li = makeHTMLElement("li");
|
|
66
|
+
exports.link = makeHTMLElement("link");
|
|
67
|
+
exports.main = makeHTMLElement("main");
|
|
68
|
+
exports.map = makeHTMLElement("map");
|
|
69
|
+
exports.mark = makeHTMLElement("mark");
|
|
70
|
+
exports.menu = makeHTMLElement("menu");
|
|
71
|
+
exports.meta = makeHTMLElement("meta");
|
|
72
|
+
exports.meter = makeHTMLElement("meter");
|
|
73
|
+
exports.nav = makeHTMLElement("nav");
|
|
74
|
+
exports.noscript = makeHTMLElement("noscript");
|
|
75
|
+
exports.object = makeHTMLElement("object");
|
|
76
|
+
exports.ol = makeHTMLElement("ol");
|
|
77
|
+
exports.optgroup = makeHTMLElement("optgroup");
|
|
78
|
+
exports.option = makeHTMLElement("option");
|
|
79
|
+
exports.output = makeHTMLElement("output");
|
|
80
|
+
exports.p = makeHTMLElement("p");
|
|
81
|
+
exports.param = makeHTMLElement("param");
|
|
82
|
+
exports.picture = makeHTMLElement("picture");
|
|
83
|
+
exports.pre = makeHTMLElement("pre");
|
|
84
|
+
exports.progress = makeHTMLElement("progress");
|
|
85
|
+
exports.q = makeHTMLElement("q");
|
|
86
|
+
exports.rp = makeHTMLElement("rp");
|
|
87
|
+
exports.rt = makeHTMLElement("rt");
|
|
88
|
+
exports.ruby = makeHTMLElement("ruby");
|
|
89
|
+
exports.s = makeHTMLElement("s");
|
|
90
|
+
exports.samp = makeHTMLElement("samp");
|
|
91
|
+
exports.script = makeHTMLElement("script");
|
|
92
|
+
exports.section = makeHTMLElement("section");
|
|
93
|
+
exports.select = makeHTMLElement("select");
|
|
94
|
+
exports.slot = makeHTMLElement("slot");
|
|
95
|
+
exports.small = makeHTMLElement("small");
|
|
96
|
+
exports.source = makeHTMLElement("source");
|
|
97
|
+
exports.span = makeHTMLElement("span");
|
|
98
|
+
exports.strong = makeHTMLElement("strong");
|
|
99
|
+
exports.style = makeHTMLElement("style");
|
|
100
|
+
exports.sub = makeHTMLElement("sub");
|
|
101
|
+
exports.summary = makeHTMLElement("summary");
|
|
102
|
+
exports.sup = makeHTMLElement("sup");
|
|
103
|
+
exports.table = makeHTMLElement("table");
|
|
104
|
+
exports.tbody = makeHTMLElement("tbody");
|
|
105
|
+
exports.td = makeHTMLElement("td");
|
|
106
|
+
exports.template = makeHTMLElement("template");
|
|
107
|
+
exports.textarea = makeHTMLElement("textarea");
|
|
108
|
+
exports.tfoot = makeHTMLElement("tfoot");
|
|
109
|
+
exports.th = makeHTMLElement("th");
|
|
110
|
+
exports.thead = makeHTMLElement("thead");
|
|
111
|
+
exports.time = makeHTMLElement("time");
|
|
112
|
+
exports.title = makeHTMLElement("title");
|
|
113
|
+
exports.tr = makeHTMLElement("tr");
|
|
114
|
+
exports.track = makeHTMLElement("track");
|
|
115
|
+
exports.u = makeHTMLElement("u");
|
|
116
|
+
exports.ul = makeHTMLElement("ul");
|
|
117
|
+
exports.htmlvar = makeHTMLElement("var"); // var is reserved, export as variable
|
|
118
|
+
exports.video = makeHTMLElement("video");
|
|
119
|
+
exports.wbr = makeHTMLElement("wbr");
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const describe_js_1 = require("../scope/describe.js");
|
|
4
|
+
const expect_js_1 = require("../scope/expect.js");
|
|
5
|
+
const html_js_1 = require("./html.js");
|
|
6
|
+
(0, describe_js_1.describe)("html", () => {
|
|
7
|
+
(0, describe_js_1.it)("creates HTML Elements", () => {
|
|
8
|
+
let tableBody;
|
|
9
|
+
const myTable = (0, html_js_1.table)((0, html_js_1.thead)((0, html_js_1.tr)((0, html_js_1.th)("Col A"), (0, html_js_1.th)("Col B"))), (tableBody = (0, html_js_1.tbody)()));
|
|
10
|
+
for (let x = 1; x <= 3; x++) {
|
|
11
|
+
tableBody.appendChild((0, html_js_1.tr)((0, html_js_1.td)(`${x}`), (0, html_js_1.td)(`${x * 2}`)));
|
|
12
|
+
}
|
|
13
|
+
(0, expect_js_1.expect)(myTable.textContent).toEqual("Col ACol B122436");
|
|
14
|
+
});
|
|
15
|
+
(0, describe_js_1.it)("attaches event handlers", () => {
|
|
16
|
+
let clicked = 0;
|
|
17
|
+
const btn = (0, html_js_1.button)({
|
|
18
|
+
events: {
|
|
19
|
+
click: () => {
|
|
20
|
+
clicked += 1;
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
btn.dispatchEvent(new Event("click"));
|
|
25
|
+
(0, expect_js_1.expect)(clicked).toBe(1);
|
|
26
|
+
});
|
|
27
|
+
(0, describe_js_1.it)("removes event handlers", () => {
|
|
28
|
+
let clicked = 0;
|
|
29
|
+
const btn = (0, html_js_1.button)({
|
|
30
|
+
events: {
|
|
31
|
+
click: () => {
|
|
32
|
+
clicked += 1;
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
btn.dispatchEvent(new Event("click"));
|
|
37
|
+
(0, expect_js_1.expect)(clicked).toBe(1);
|
|
38
|
+
btn.update({ events: { click: null } });
|
|
39
|
+
btn.dispatchEvent(new Event("click"));
|
|
40
|
+
(0, expect_js_1.expect)(clicked).toBe(1);
|
|
41
|
+
});
|
|
42
|
+
(0, describe_js_1.it)("sets style properties", () => {
|
|
43
|
+
const btn = (0, html_js_1.button)({
|
|
44
|
+
style: { flexDirection: "column" },
|
|
45
|
+
});
|
|
46
|
+
(0, expect_js_1.expect)(btn.style.flexDirection).toBe("column");
|
|
47
|
+
});
|
|
48
|
+
(0, describe_js_1.it)("sets style, attributes, and events together", () => {
|
|
49
|
+
let clicked = false;
|
|
50
|
+
const btn = (0, html_js_1.button)({
|
|
51
|
+
class: "test-class",
|
|
52
|
+
style: { flexDirection: "column" },
|
|
53
|
+
events: { click: () => (clicked = true) },
|
|
54
|
+
});
|
|
55
|
+
btn.dispatchEvent(new Event("click"));
|
|
56
|
+
(0, expect_js_1.expect)(btn.classList.contains("test-class")).toBe(true);
|
|
57
|
+
(0, expect_js_1.expect)(btn.style.flexDirection).toBe("column");
|
|
58
|
+
(0, expect_js_1.expect)(clicked).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const observable_js_1 = require("./observable.js");
|
|
4
|
+
const observable_js_2 = require("../observable/observable.js");
|
|
5
|
+
const describe_js_1 = require("../scope/describe.js");
|
|
6
|
+
const expect_js_1 = require("../scope/expect.js");
|
|
7
|
+
const html_js_1 = require("./html.js");
|
|
8
|
+
(0, describe_js_1.describe)("DOM Observable", () => {
|
|
9
|
+
(0, describe_js_1.it)("updates a dom node with observable results", async () => {
|
|
10
|
+
const subject = new observable_js_2.Subject();
|
|
11
|
+
const observable = subject.pipe((0, observable_js_2.map)((s) => [s]));
|
|
12
|
+
const element = (0, observable_js_1.O)((0, html_js_1.div)(), observable);
|
|
13
|
+
(0, expect_js_1.expect)(element.innerText).toEqual("");
|
|
14
|
+
await subject.next("H");
|
|
15
|
+
(0, expect_js_1.expect)(element.innerText).toEqual("H");
|
|
16
|
+
await subject.next("He");
|
|
17
|
+
(0, expect_js_1.expect)(element.innerText).toEqual("He");
|
|
18
|
+
});
|
|
19
|
+
(0, describe_js_1.it)("updates a dom node's attributes", async () => {
|
|
20
|
+
const classes = new observable_js_2.Subject();
|
|
21
|
+
const observable = classes.map((c) => [{ class: c.join(" ") }]);
|
|
22
|
+
const element = (0, observable_js_1.O)((0, html_js_1.span)(), observable);
|
|
23
|
+
(0, expect_js_1.expect)(element.classList.contains("warning")).toBe(false);
|
|
24
|
+
(0, expect_js_1.expect)(element.classList.contains("error")).toBe(false);
|
|
25
|
+
await classes.next(["warning"]);
|
|
26
|
+
(0, expect_js_1.expect)(element.classList.contains("warning")).toBe(true);
|
|
27
|
+
(0, expect_js_1.expect)(element.classList.contains("error")).toBe(false);
|
|
28
|
+
await classes.next(["error"]);
|
|
29
|
+
(0, expect_js_1.expect)(element.classList.contains("warning")).toBe(true);
|
|
30
|
+
(0, expect_js_1.expect)(element.classList.contains("error")).toBe(true);
|
|
31
|
+
await classes.next(["!warning", "!error"]);
|
|
32
|
+
(0, expect_js_1.expect)(element.classList.contains("warning")).toBe(false);
|
|
33
|
+
(0, expect_js_1.expect)(element.classList.contains("error")).toBe(false);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retrieve = exports.provide = void 0;
|
|
4
|
+
let registry = {};
|
|
5
|
+
function provide(items) {
|
|
6
|
+
registry = { ...registry, ...items };
|
|
7
|
+
}
|
|
8
|
+
exports.provide = provide;
|
|
9
|
+
function retrieve(key) {
|
|
10
|
+
return registry[key];
|
|
11
|
+
}
|
|
12
|
+
exports.retrieve = retrieve;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.link = void 0;
|
|
4
|
+
const html_js_1 = require("../html.js");
|
|
5
|
+
const router_js_1 = require("./router.js");
|
|
6
|
+
const link = ({ href, link }) => (0, html_js_1.a)({ href: router_js_1.Router.href(href), events: { click: router_js_1.Router.navigate(href) } }, link);
|
|
7
|
+
exports.link = link;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DOMElement
|
|
2
|
-
import { Link } from "./link";
|
|
1
|
+
import { DOMElement } from "../dom.js";
|
|
2
|
+
import { Link } from "./link.js";
|
|
3
3
|
export interface Router {
|
|
4
4
|
current?: string;
|
|
5
5
|
navigate: (url: string) => (event: Event) => void;
|
|
6
|
-
(target:
|
|
6
|
+
(target: DOMElement): DOMElement;
|
|
7
7
|
}
|
|
8
8
|
export declare const Router: {
|
|
9
9
|
for(links: Link[], index: string, setGlobalRouter?: boolean): Router;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Router = void 0;
|
|
4
|
+
let baseURI = `${document.baseURI}`;
|
|
5
|
+
const normalizeHref = () => {
|
|
6
|
+
return location.href + "/" === baseURI ? baseURI : location.href;
|
|
7
|
+
};
|
|
8
|
+
let globalRouter;
|
|
9
|
+
exports.Router = {
|
|
10
|
+
for(links, index, setGlobalRouter = true) {
|
|
11
|
+
let target;
|
|
12
|
+
const partialRouter = (t) => {
|
|
13
|
+
target = t;
|
|
14
|
+
const href = normalizeHref();
|
|
15
|
+
const route = href === baseURI ? baseURI + index : href;
|
|
16
|
+
doNavigate(route);
|
|
17
|
+
window.addEventListener("popstate", () => {
|
|
18
|
+
doNavigate(location.href);
|
|
19
|
+
});
|
|
20
|
+
return target;
|
|
21
|
+
};
|
|
22
|
+
const doNavigate = (link) => {
|
|
23
|
+
link = link.replace(baseURI, "") || index;
|
|
24
|
+
if (link === partialRouter.current) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
partialRouter.current = link;
|
|
28
|
+
target.update((links.find(({ href }) => link.endsWith(href))?.target ??
|
|
29
|
+
(() => undefined))());
|
|
30
|
+
return true;
|
|
31
|
+
};
|
|
32
|
+
const navigate = (url) => {
|
|
33
|
+
return (event) => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
if (doNavigate(url || index)) {
|
|
36
|
+
history.pushState(null, "", url);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
partialRouter.navigate = navigate;
|
|
41
|
+
if (setGlobalRouter) {
|
|
42
|
+
globalRouter = partialRouter;
|
|
43
|
+
}
|
|
44
|
+
return partialRouter;
|
|
45
|
+
},
|
|
46
|
+
href(link) {
|
|
47
|
+
return `${baseURI}${link.replace(/^\//, "")}`;
|
|
48
|
+
},
|
|
49
|
+
navigate(href) {
|
|
50
|
+
return globalRouter?.navigate(href);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DenormAttrs, DenormChildren } from "./dom.js";
|
|
2
|
+
export declare const a: (attrs?: DenormAttrs<SVGAElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
3
|
+
export declare const animate: (attrs?: DenormAttrs<SVGAnimateElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
4
|
+
export declare const animateMotion: (attrs?: DenormAttrs<SVGAnimateMotionElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
5
|
+
export declare const animateTransform: (attrs?: DenormAttrs<SVGAnimateTransformElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
6
|
+
export declare const circle: (attrs?: DenormAttrs<SVGCircleElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
7
|
+
export declare const clipPath: (attrs?: DenormAttrs<SVGClipPathElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
8
|
+
export declare const defs: (attrs?: DenormAttrs<SVGDefsElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
9
|
+
export declare const desc: (attrs?: DenormAttrs<SVGDescElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
10
|
+
export declare const ellipse: (attrs?: DenormAttrs<SVGEllipseElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
11
|
+
export declare const feBlend: (attrs?: DenormAttrs<SVGFEBlendElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
12
|
+
export declare const feColorMatrix: (attrs?: DenormAttrs<SVGFEColorMatrixElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
13
|
+
export declare const feComponentTransfer: (attrs?: DenormAttrs<SVGFEComponentTransferElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
14
|
+
export declare const feComposite: (attrs?: DenormAttrs<SVGFECompositeElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
15
|
+
export declare const feConvolveMatrix: (attrs?: DenormAttrs<SVGFEConvolveMatrixElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
16
|
+
export declare const feDiffuseLighting: (attrs?: DenormAttrs<SVGFEDiffuseLightingElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
17
|
+
export declare const feDisplacementMap: (attrs?: DenormAttrs<SVGFEDisplacementMapElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
18
|
+
export declare const feDistantLight: (attrs?: DenormAttrs<SVGFEDistantLightElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
19
|
+
export declare const feDropShadow: (attrs?: DenormAttrs<SVGFEDropShadowElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
20
|
+
export declare const feFlood: (attrs?: DenormAttrs<SVGFEFloodElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
21
|
+
export declare const feFuncA: (attrs?: DenormAttrs<SVGFEFuncAElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
22
|
+
export declare const feFuncB: (attrs?: DenormAttrs<SVGFEFuncBElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
23
|
+
export declare const feFuncG: (attrs?: DenormAttrs<SVGFEFuncGElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
24
|
+
export declare const feFuncR: (attrs?: DenormAttrs<SVGFEFuncRElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
25
|
+
export declare const feGaussianBlur: (attrs?: DenormAttrs<SVGFEGaussianBlurElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
26
|
+
export declare const feImage: (attrs?: DenormAttrs<SVGFEImageElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
27
|
+
export declare const feMerge: (attrs?: DenormAttrs<SVGFEMergeElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
28
|
+
export declare const feMergeNode: (attrs?: DenormAttrs<SVGFEMergeNodeElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
29
|
+
export declare const feMorphology: (attrs?: DenormAttrs<SVGFEMorphologyElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
30
|
+
export declare const feOffset: (attrs?: DenormAttrs<SVGFEOffsetElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
31
|
+
export declare const fePointLight: (attrs?: DenormAttrs<SVGFEPointLightElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
32
|
+
export declare const feSpecularLighting: (attrs?: DenormAttrs<SVGFESpecularLightingElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
33
|
+
export declare const feSpotLight: (attrs?: DenormAttrs<SVGFESpotLightElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
34
|
+
export declare const feTile: (attrs?: DenormAttrs<SVGFETileElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
35
|
+
export declare const feTurbulence: (attrs?: DenormAttrs<SVGFETurbulenceElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
36
|
+
export declare const filter: (attrs?: DenormAttrs<SVGFilterElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
37
|
+
export declare const foreignObject: (attrs?: DenormAttrs<SVGForeignObjectElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
38
|
+
export declare const g: (attrs?: DenormAttrs<SVGGElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
39
|
+
export declare const image: (attrs?: DenormAttrs<SVGImageElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
40
|
+
export declare const line: (attrs?: DenormAttrs<SVGLineElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
41
|
+
export declare const linearGradient: (attrs?: DenormAttrs<SVGLinearGradientElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
42
|
+
export declare const marker: (attrs?: DenormAttrs<SVGMarkerElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
43
|
+
export declare const mask: (attrs?: DenormAttrs<SVGMaskElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
44
|
+
export declare const metadata: (attrs?: DenormAttrs<SVGMetadataElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
45
|
+
export declare const mpath: (attrs?: DenormAttrs<SVGMPathElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
46
|
+
export declare const path: (attrs?: DenormAttrs<SVGPathElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
47
|
+
export declare const pattern: (attrs?: DenormAttrs<SVGPatternElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
48
|
+
export declare const polygon: (attrs?: DenormAttrs<SVGPolygonElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
49
|
+
export declare const polyline: (attrs?: DenormAttrs<SVGPolylineElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
50
|
+
export declare const radialGradient: (attrs?: DenormAttrs<SVGRadialGradientElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
51
|
+
export declare const rect: (attrs?: DenormAttrs<SVGRectElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
52
|
+
export declare const script: (attrs?: DenormAttrs<SVGScriptElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
53
|
+
export declare const set: (attrs?: DenormAttrs<SVGSetElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
54
|
+
export declare const stop: (attrs?: DenormAttrs<SVGStopElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
55
|
+
export declare const style: (attrs?: DenormAttrs<SVGStyleElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
56
|
+
export declare const svg: (attrs?: DenormAttrs<SVGSVGElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
57
|
+
export declare const svgswitch: (attrs?: DenormAttrs<SVGSwitchElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
58
|
+
export declare const symbol: (attrs?: DenormAttrs<SVGSymbolElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
59
|
+
export declare const text: (attrs?: DenormAttrs<SVGTextElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
60
|
+
export declare const textPath: (attrs?: DenormAttrs<SVGTextPathElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
61
|
+
export declare const title: (attrs?: DenormAttrs<SVGTitleElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
62
|
+
export declare const tspan: (attrs?: DenormAttrs<SVGTSpanElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
63
|
+
export declare const use: (attrs?: DenormAttrs<SVGUseElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
64
|
+
export declare const view: (attrs?: DenormAttrs<SVGViewElement, {}> | undefined, ...children: DenormChildren[]) => Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rect = exports.radialGradient = exports.polyline = exports.polygon = exports.pattern = exports.path = exports.mpath = exports.metadata = exports.mask = exports.marker = exports.linearGradient = exports.line = exports.image = exports.g = exports.foreignObject = exports.filter = exports.feTurbulence = exports.feTile = exports.feSpotLight = exports.feSpecularLighting = exports.fePointLight = exports.feOffset = exports.feMorphology = exports.feMergeNode = exports.feMerge = exports.feImage = exports.feGaussianBlur = exports.feFuncR = exports.feFuncG = exports.feFuncB = exports.feFuncA = exports.feFlood = exports.feDropShadow = exports.feDistantLight = exports.feDisplacementMap = exports.feDiffuseLighting = exports.feConvolveMatrix = exports.feComposite = exports.feComponentTransfer = exports.feColorMatrix = exports.feBlend = exports.ellipse = exports.desc = exports.defs = exports.clipPath = exports.circle = exports.animateTransform = exports.animateMotion = exports.animate = exports.a = void 0;
|
|
4
|
+
exports.view = exports.use = exports.tspan = exports.title = exports.textPath = exports.text = exports.symbol = exports.svgswitch = exports.svg = exports.style = exports.stop = exports.set = exports.script = void 0;
|
|
5
|
+
const dom_js_1 = require("./dom.js");
|
|
6
|
+
const makeSVGElement = (name) => (attrs, ...children) => (0, dom_js_1.up)(document.createElementNS("http://www.w3.org/2000/svg", name), attrs, ...children);
|
|
7
|
+
exports.a = makeSVGElement("a");
|
|
8
|
+
exports.animate = makeSVGElement("animate");
|
|
9
|
+
exports.animateMotion = makeSVGElement("animateMotion");
|
|
10
|
+
exports.animateTransform = makeSVGElement("animateTransform");
|
|
11
|
+
exports.circle = makeSVGElement("circle");
|
|
12
|
+
exports.clipPath = makeSVGElement("clipPath");
|
|
13
|
+
exports.defs = makeSVGElement("defs");
|
|
14
|
+
exports.desc = makeSVGElement("desc");
|
|
15
|
+
exports.ellipse = makeSVGElement("ellipse");
|
|
16
|
+
exports.feBlend = makeSVGElement("feBlend");
|
|
17
|
+
exports.feColorMatrix = makeSVGElement("feColorMatrix");
|
|
18
|
+
exports.feComponentTransfer = makeSVGElement("feComponentTransfer");
|
|
19
|
+
exports.feComposite = makeSVGElement("feComposite");
|
|
20
|
+
exports.feConvolveMatrix = makeSVGElement("feConvolveMatrix");
|
|
21
|
+
exports.feDiffuseLighting = makeSVGElement("feDiffuseLighting");
|
|
22
|
+
exports.feDisplacementMap = makeSVGElement("feDisplacementMap");
|
|
23
|
+
exports.feDistantLight = makeSVGElement("feDistantLight");
|
|
24
|
+
exports.feDropShadow = makeSVGElement("feDropShadow");
|
|
25
|
+
exports.feFlood = makeSVGElement("feFlood");
|
|
26
|
+
exports.feFuncA = makeSVGElement("feFuncA");
|
|
27
|
+
exports.feFuncB = makeSVGElement("feFuncB");
|
|
28
|
+
exports.feFuncG = makeSVGElement("feFuncG");
|
|
29
|
+
exports.feFuncR = makeSVGElement("feFuncR");
|
|
30
|
+
exports.feGaussianBlur = makeSVGElement("feGaussianBlur");
|
|
31
|
+
exports.feImage = makeSVGElement("feImage");
|
|
32
|
+
exports.feMerge = makeSVGElement("feMerge");
|
|
33
|
+
exports.feMergeNode = makeSVGElement("feMergeNode");
|
|
34
|
+
exports.feMorphology = makeSVGElement("feMorphology");
|
|
35
|
+
exports.feOffset = makeSVGElement("feOffset");
|
|
36
|
+
exports.fePointLight = makeSVGElement("fePointLight");
|
|
37
|
+
exports.feSpecularLighting = makeSVGElement("feSpecularLighting");
|
|
38
|
+
exports.feSpotLight = makeSVGElement("feSpotLight");
|
|
39
|
+
exports.feTile = makeSVGElement("feTile");
|
|
40
|
+
exports.feTurbulence = makeSVGElement("feTurbulence");
|
|
41
|
+
exports.filter = makeSVGElement("filter");
|
|
42
|
+
exports.foreignObject = makeSVGElement("foreignObject");
|
|
43
|
+
exports.g = makeSVGElement("g");
|
|
44
|
+
exports.image = makeSVGElement("image");
|
|
45
|
+
exports.line = makeSVGElement("line");
|
|
46
|
+
exports.linearGradient = makeSVGElement("linearGradient");
|
|
47
|
+
exports.marker = makeSVGElement("marker");
|
|
48
|
+
exports.mask = makeSVGElement("mask");
|
|
49
|
+
exports.metadata = makeSVGElement("metadata");
|
|
50
|
+
exports.mpath = makeSVGElement("mpath");
|
|
51
|
+
exports.path = makeSVGElement("path");
|
|
52
|
+
exports.pattern = makeSVGElement("pattern");
|
|
53
|
+
exports.polygon = makeSVGElement("polygon");
|
|
54
|
+
exports.polyline = makeSVGElement("polyline");
|
|
55
|
+
exports.radialGradient = makeSVGElement("radialGradient");
|
|
56
|
+
exports.rect = makeSVGElement("rect");
|
|
57
|
+
exports.script = makeSVGElement("script");
|
|
58
|
+
exports.set = makeSVGElement("set");
|
|
59
|
+
exports.stop = makeSVGElement("stop");
|
|
60
|
+
exports.style = makeSVGElement("style");
|
|
61
|
+
exports.svg = makeSVGElement("svg");
|
|
62
|
+
exports.svgswitch = makeSVGElement("switch");
|
|
63
|
+
exports.symbol = makeSVGElement("symbol");
|
|
64
|
+
exports.text = makeSVGElement("text");
|
|
65
|
+
exports.textPath = makeSVGElement("textPath");
|
|
66
|
+
exports.title = makeSVGElement("title");
|
|
67
|
+
exports.tspan = makeSVGElement("tspan");
|
|
68
|
+
exports.use = makeSVGElement("use");
|
|
69
|
+
exports.view = makeSVGElement("view");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadTests(): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadTests = void 0;
|
|
4
|
+
async function loadTests() {
|
|
5
|
+
if (process?.env.CI?.toLowerCase() === "true")
|
|
6
|
+
return;
|
|
7
|
+
await Promise.all([
|
|
8
|
+
Promise.resolve().then(() => require("./html.test.js")),
|
|
9
|
+
Promise.resolve().then(() => require("./fc.test.js")),
|
|
10
|
+
Promise.resolve().then(() => require("./observable.test.js")),
|
|
11
|
+
]);
|
|
12
|
+
}
|
|
13
|
+
exports.loadTests = loadTests;
|
|
File without changes
|
|
@@ -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
|
|
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;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function compareArrays<T>(equal: (a: T, b: T, partial: boolean) => boolean): (A: T[], B: T[], partial?: boolean) => boolean;
|
|
2
|
+
export declare const equalArrays: (A: any[], B: any[], partial?: boolean) => boolean;
|
|
3
|
+
export declare const matchArrays: <A>(a: A[], b: A[], partial?: boolean) => boolean;
|
|
4
|
+
export declare const matchObjects: (a: {}, b: {}, partial?: boolean) => boolean;
|
|
5
|
+
export declare function equals<A>(a: A | A[], b: A | A[], partial?: boolean): boolean;
|
package/lib/cjs/equal.js
ADDED
|
@@ -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
|