@davidsouther/jiffies 1.1.0 → 2.0.2
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/pico.css +2466 -0
- package/build/pico.css.map +1 -0
- package/{build → lib/cjs}/assert.d.ts +23 -23
- package/lib/cjs/assert.js +40 -0
- package/{build → lib/cjs}/case.d.ts +1 -1
- package/lib/cjs/case.js +9 -0
- package/{build → lib/cjs}/components/button_bar.d.ts +8 -8
- package/lib/cjs/components/button_bar.js +29 -0
- package/{build → lib/cjs}/components/inline_edit.d.ts +12 -12
- package/lib/cjs/components/inline_edit.js +51 -0
- package/{build → lib/cjs}/components/logger.d.ts +6 -6
- 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 +40 -40
- package/lib/cjs/components/virtual_scroll.js +102 -0
- package/{build → lib/cjs}/components/virtual_scroll.test.d.ts +1 -1
- package/lib/cjs/components/virtual_scroll.test.js +22 -0
- package/{build → lib/cjs}/context.d.ts +15 -15
- package/lib/cjs/context.js +48 -0
- package/{build → lib/cjs}/context.test.d.ts +1 -1
- package/lib/cjs/context.test.js +48 -0
- package/lib/cjs/debounce.d.ts +1 -0
- package/lib/cjs/debounce.js +12 -0
- package/lib/cjs/diff.d.ts +15 -0
- package/lib/cjs/diff.js +58 -0
- package/{build/components/test.d.ts → lib/cjs/diff.test.d.ts} +1 -1
- package/lib/cjs/diff.test.js +41 -0
- package/{build → lib/cjs}/display.d.ts +5 -5
- package/lib/cjs/display.js +16 -0
- package/{build → lib/cjs}/dom/css/border.d.ts +11 -11
- package/lib/cjs/dom/css/border.js +33 -0
- package/{build → lib/cjs}/dom/css/constants.d.ts +31 -31
- package/lib/cjs/dom/css/constants.js +31 -0
- package/{build → lib/cjs}/dom/css/core.d.ts +5 -5
- package/lib/cjs/dom/css/core.js +31 -0
- package/{build → lib/cjs}/dom/css/fstyle.d.ts +5 -5
- package/lib/cjs/dom/css/fstyle.js +36 -0
- package/{build → lib/cjs}/dom/css/sizing.d.ts +5 -5
- package/lib/cjs/dom/css/sizing.js +14 -0
- package/{build → lib/cjs}/dom/dom.d.ts +27 -26
- package/lib/cjs/dom/dom.js +110 -0
- package/{build → lib/cjs}/dom/fc.d.ts +14 -14
- package/lib/cjs/dom/fc.js +39 -0
- package/{build → lib/cjs}/dom/fc.test.d.ts +1 -1
- package/lib/cjs/dom/fc.test.js +23 -0
- package/{build → lib/cjs}/dom/form/form.app.d.ts +1 -1
- package/lib/cjs/dom/form/form.app.js +27 -0
- package/{build → lib/cjs}/dom/form/form.d.ts +26 -26
- 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 +1 -1
- package/{build → lib/cjs}/dom/html.d.ts +113 -113
- package/lib/cjs/dom/html.js +119 -0
- package/{build → lib/cjs}/dom/html.test.d.ts +1 -1
- 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/observable → lib/cjs/dom}/observable.test.d.ts +1 -1
- package/lib/cjs/dom/observable.test.js +35 -0
- package/{build → lib/cjs}/dom/provide.d.ts +3 -3
- package/lib/cjs/dom/provide.js +12 -0
- package/{build → lib/cjs}/dom/router/link.d.ts +6 -6
- package/lib/cjs/dom/router/link.js +7 -0
- package/{build → lib/cjs}/dom/router/router.d.ts +12 -12
- package/lib/cjs/dom/router/router.js +52 -0
- package/{build → lib/cjs}/dom/svg.d.ts +64 -64
- 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 +6612 -6612
- 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 +1 -1
- package/{build → lib/cjs}/dom/types/html.d.ts +616 -616
- package/lib/cjs/dom/types/html.js +2 -0
- package/{build → lib/cjs}/dom/xml.d.ts +1 -1
- package/lib/cjs/dom/xml.js +8 -0
- package/{build → lib/cjs}/equal.d.ts +5 -5
- package/lib/cjs/equal.js +43 -0
- package/{build → lib/cjs}/equal.test.d.ts +1 -1
- package/lib/cjs/equal.test.js +22 -0
- package/{build → lib/cjs}/flags.d.ts +7 -7
- package/lib/cjs/flags.js +52 -0
- package/{build → lib/cjs}/flags.test.d.ts +1 -1
- package/lib/cjs/flags.test.js +37 -0
- package/{build → lib/cjs}/fs.d.ts +48 -48
- package/lib/cjs/fs.js +152 -0
- package/{build → lib/cjs}/fs.test.d.ts +1 -1
- package/lib/cjs/fs.test.js +45 -0
- package/{build → lib/cjs}/generator.d.ts +1 -1
- package/lib/cjs/generator.js +14 -0
- package/{build → lib/cjs}/generator.test.d.ts +1 -1
- package/lib/cjs/generator.test.js +26 -0
- package/{build → lib/cjs}/is_browser.d.ts +1 -1
- package/lib/cjs/is_browser.js +4 -0
- package/{build → lib/cjs}/loader.d.mts +22 -22
- package/lib/cjs/loader.mjs +40 -0
- package/{build → lib/cjs}/lock.d.ts +1 -1
- package/lib/cjs/lock.js +27 -0
- package/{build → lib/cjs}/lock.test.d.ts +1 -1
- package/lib/cjs/lock.test.js +18 -0
- package/{build → lib/cjs}/log.d.ts +26 -26
- 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/lib/cjs/observable/observable.test.d.ts +1 -0
- package/lib/cjs/observable/observable.test.js +65 -0
- package/{build → lib/cjs}/range.d.ts +1 -1
- package/lib/cjs/range.js +11 -0
- package/{build → lib/cjs}/result.d.ts +31 -31
- package/lib/cjs/result.js +80 -0
- package/{build → lib/cjs}/result.test.d.ts +1 -1
- package/lib/cjs/result.test.js +73 -0
- package/{build → lib/cjs}/safe.d.ts +1 -1
- package/lib/cjs/safe.js +14 -0
- package/{build → lib/cjs}/scope/describe.d.ts +18 -18
- package/lib/cjs/scope/describe.js +73 -0
- package/{build → lib/cjs}/scope/display/console.d.ts +2 -2
- package/lib/cjs/scope/display/console.js +25 -0
- package/{build → lib/cjs}/scope/display/dom.d.ts +3 -3
- package/lib/cjs/scope/display/dom.js +30 -0
- package/{build → lib/cjs}/scope/display/junit.d.ts +2 -2
- package/lib/cjs/scope/display/junit.js +21 -0
- package/{build → lib/cjs}/scope/execute.d.ts +12 -12
- package/lib/cjs/scope/execute.js +91 -0
- package/{build → lib/cjs}/scope/expect.d.ts +23 -23
- package/lib/cjs/scope/expect.js +114 -0
- package/{build → lib/cjs}/scope/fix.d.ts +4 -4
- package/lib/cjs/scope/fix.js +26 -0
- package/{build → lib/cjs}/scope/index.d.ts +3 -3
- package/lib/cjs/scope/index.js +15 -0
- package/{build → lib/cjs}/scope/scope.d.ts +17 -17
- 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 +5 -5
- package/lib/cjs/server/http/apps.js +27 -0
- package/{build → lib/cjs}/server/http/css.d.ts +5 -5
- package/lib/cjs/server/http/css.js +54 -0
- package/{build → lib/cjs}/server/http/index.d.ts +21 -21
- package/lib/cjs/server/http/index.js +77 -0
- package/{build → lib/cjs}/server/http/response.d.ts +4 -4
- package/lib/cjs/server/http/response.js +45 -0
- package/{build → lib/cjs}/server/http/sitemap.d.ts +2 -2
- package/lib/cjs/server/http/sitemap.js +46 -0
- package/{build → lib/cjs}/server/http/static.d.ts +2 -2
- package/lib/cjs/server/http/static.js +25 -0
- package/{build → lib/cjs}/server/http/typescript.d.ts +5 -5
- package/lib/cjs/server/http/typescript.js +44 -0
- package/{build → lib/cjs}/server/main.d.ts +2 -2
- package/lib/cjs/server/main.js +14 -0
- package/{build → lib/cjs}/test.d.mts +2 -2
- package/lib/cjs/test.mjs +28 -0
- package/{build → lib/cjs}/test_all.d.ts +9 -7
- package/lib/cjs/test_all.js +30 -0
- package/{build → lib/cjs}/transpile.d.mts +3 -3
- 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 +33 -33
- package/lib/esm/case.d.ts +1 -0
- package/{build → lib/esm}/case.js +5 -5
- package/lib/esm/components/button_bar.d.ts +8 -0
- package/{build → lib/esm}/components/button_bar.js +27 -27
- package/lib/esm/components/inline_edit.d.ts +12 -0
- package/{build → lib/esm}/components/inline_edit.js +48 -48
- package/lib/esm/components/logger.d.ts +6 -0
- package/{build → lib/esm}/components/logger.js +22 -22
- package/lib/esm/components/select.d.ts +10 -0
- package/{build → lib/esm}/components/select.js +3 -3
- 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 +94 -94
- package/lib/esm/components/virtual_scroll.test.d.ts +1 -0
- package/{build → lib/esm}/components/virtual_scroll.test.js +20 -21
- package/lib/esm/context.d.ts +15 -0
- package/{build → lib/esm}/context.js +43 -43
- package/lib/esm/context.test.d.ts +1 -0
- package/{build → lib/esm}/context.test.js +46 -46
- package/lib/esm/debounce.d.ts +1 -0
- package/{build → lib/esm}/debounce.js +8 -7
- package/lib/esm/diff.d.ts +15 -0
- package/lib/esm/diff.js +54 -0
- package/lib/esm/diff.test.d.ts +1 -0
- package/lib/esm/diff.test.js +39 -0
- package/lib/esm/display.d.ts +5 -0
- package/{build → lib/esm}/display.js +11 -11
- package/lib/esm/dom/css/border.d.ts +11 -0
- package/{build → lib/esm}/dom/css/border.js +27 -27
- package/lib/esm/dom/css/constants.d.ts +31 -0
- package/{build → lib/esm}/dom/css/constants.js +28 -28
- package/lib/esm/dom/css/core.d.ts +5 -0
- package/{build → lib/esm}/dom/css/core.js +24 -24
- package/lib/esm/dom/css/fstyle.d.ts +5 -0
- package/{build → lib/esm}/dom/css/fstyle.js +32 -32
- package/lib/esm/dom/css/sizing.d.ts +5 -0
- package/{build → lib/esm}/dom/css/sizing.js +10 -10
- package/lib/esm/dom/dom.d.ts +27 -0
- package/{build → lib/esm}/dom/dom.js +104 -95
- package/lib/esm/dom/fc.d.ts +14 -0
- package/{build → lib/esm}/dom/fc.js +35 -36
- package/lib/esm/dom/fc.test.d.ts +1 -0
- package/{build → lib/esm}/dom/fc.test.js +21 -21
- package/lib/esm/dom/form/form.app.d.ts +1 -0
- package/{build → lib/esm}/dom/form/form.app.js +23 -23
- package/lib/esm/dom/form/form.d.ts +26 -0
- package/{build → lib/esm}/dom/form/form.js +34 -34
- 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 +114 -114
- package/lib/esm/dom/html.test.d.ts +1 -0
- package/{build → lib/esm}/dom/html.test.js +58 -58
- 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/{build → lib/esm}/dom/provide.js +7 -7
- package/lib/esm/dom/router/link.d.ts +6 -0
- package/{build → lib/esm}/dom/router/link.js +3 -3
- package/lib/esm/dom/router/router.d.ts +12 -0
- package/{build → lib/esm}/dom/router/router.js +49 -49
- package/lib/esm/dom/svg.d.ts +64 -0
- package/{build → lib/esm}/dom/svg.js +65 -65
- 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 +23 -23
- 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/{build → lib/esm}/dom/types/html.js +1 -1
- package/lib/esm/dom/xml.d.ts +1 -0
- package/{build → lib/esm}/dom/xml.js +4 -4
- package/lib/esm/equal.d.ts +5 -0
- package/{build → lib/esm}/equal.js +37 -37
- package/lib/esm/equal.test.d.ts +1 -0
- package/{build → lib/esm}/equal.test.js +20 -20
- package/lib/esm/flags.d.ts +7 -0
- package/{build → lib/esm}/flags.js +48 -48
- package/lib/esm/flags.test.d.ts +1 -0
- package/{build → lib/esm}/flags.test.js +35 -35
- package/lib/esm/fs.d.ts +48 -0
- package/{build → lib/esm}/fs.js +145 -144
- package/lib/esm/fs.test.d.ts +1 -0
- package/{build → lib/esm}/fs.test.js +43 -43
- package/lib/esm/generator.d.ts +1 -0
- package/{build → lib/esm}/generator.js +10 -10
- package/lib/esm/generator.test.d.ts +1 -0
- package/{build → lib/esm}/generator.test.js +24 -24
- package/lib/esm/is_browser.d.ts +1 -0
- package/{build → lib/esm}/is_browser.js +1 -1
- package/lib/esm/loader.d.mts +22 -0
- package/{build → lib/esm}/loader.mjs +35 -35
- package/lib/esm/lock.d.ts +1 -0
- package/{build → lib/esm}/lock.js +23 -23
- package/lib/esm/lock.test.d.ts +1 -0
- package/{build → lib/esm}/lock.test.js +16 -16
- package/lib/esm/log.d.ts +26 -0
- package/{build → lib/esm}/log.js +46 -46
- 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 +7 -7
- package/lib/esm/result.d.ts +31 -0
- package/{build → lib/esm}/result.js +65 -65
- package/lib/esm/result.test.d.ts +1 -0
- package/{build → lib/esm}/result.test.js +71 -71
- package/lib/esm/safe.d.ts +1 -0
- package/{build → lib/esm}/safe.js +10 -10
- package/lib/esm/scope/describe.d.ts +18 -0
- package/{build → lib/esm}/scope/describe.js +60 -61
- package/lib/esm/scope/display/console.d.ts +2 -0
- package/{build → lib/esm}/scope/display/console.js +21 -21
- package/lib/esm/scope/display/dom.d.ts +3 -0
- package/{build → lib/esm}/scope/display/dom.js +26 -26
- package/lib/esm/scope/display/junit.d.ts +2 -0
- package/{build → lib/esm}/scope/display/junit.js +17 -17
- package/lib/esm/scope/execute.d.ts +12 -0
- package/{build → lib/esm}/scope/execute.js +85 -85
- package/lib/esm/scope/expect.d.ts +23 -0
- package/{build → lib/esm}/scope/expect.js +108 -108
- package/lib/esm/scope/fix.d.ts +4 -0
- package/{build → lib/esm}/scope/fix.js +22 -22
- package/lib/esm/scope/index.d.ts +3 -0
- package/{build → lib/esm}/scope/index.js +3 -3
- package/lib/esm/scope/scope.d.ts +17 -0
- package/{build → lib/esm}/scope/scope.js +1 -1
- 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 +23 -23
- package/lib/esm/server/http/css.d.ts +5 -0
- package/{build → lib/esm}/server/http/css.js +50 -50
- package/lib/esm/server/http/index.d.ts +21 -0
- package/{build → lib/esm}/server/http/index.js +73 -73
- package/lib/esm/server/http/response.d.ts +4 -0
- package/{build → lib/esm}/server/http/response.js +40 -40
- package/lib/esm/server/http/sitemap.d.ts +2 -0
- package/{build → lib/esm}/server/http/sitemap.js +42 -42
- package/lib/esm/server/http/static.d.ts +2 -0
- package/{build → lib/esm}/server/http/static.js +21 -21
- package/lib/esm/server/http/typescript.d.ts +5 -0
- package/{build → lib/esm}/server/http/typescript.js +40 -40
- package/lib/esm/server/main.d.ts +2 -0
- package/{build → lib/esm}/server/main.js +12 -9
- 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/{build → lib/esm}/test_all.js +28 -18
- package/lib/esm/transpile.d.mts +3 -0
- package/{build → lib/esm}/transpile.mjs +18 -18
- package/lib/esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +16 -17
- package/src/assert.ts +1 -1
- package/src/components/button_bar.ts +3 -3
- package/src/components/inline_edit.ts +3 -3
- package/src/components/logger.ts +3 -3
- package/src/components/select.ts +3 -3
- package/src/components/test.js +3 -2
- package/src/context.ts +3 -3
- package/src/debounce.ts +2 -1
- package/src/diff.ts +2 -2
- package/src/display.ts +2 -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 +1 -1
- package/src/dom/fc.test.ts +3 -3
- package/src/dom/fc.ts +1 -1
- package/src/dom/form/form.app.ts +2 -2
- package/src/dom/form/form.ts +3 -3
- package/src/dom/html.test.ts +3 -3
- package/src/dom/html.ts +1 -1
- package/src/dom/observable.test.ts +6 -6
- package/src/dom/observable.ts +1 -1
- package/src/dom/provide.ts +1 -1
- package/src/dom/router/link.ts +2 -2
- package/src/dom/router/router.ts +2 -2
- package/src/dom/svg.ts +1 -1
- package/src/dom/test.ts +8 -6
- package/src/dom/types/html.ts +1 -1
- package/src/equal.ts +1 -1
- package/src/flags.ts +1 -1
- package/src/fs.ts +5 -4
- package/src/index.html +6 -6
- package/src/observable/event.ts +2 -2
- package/src/observable/observable.test.ts +2 -2
- package/src/observable/observable.ts +72 -12
- package/src/pico/_variables.scss +1 -1
- package/src/pico/layout/_sectioning.scss +2 -0
- package/src/result.ts +1 -1
- package/src/scope/describe.ts +2 -5
- package/src/scope/display/console.ts +4 -4
- package/src/scope/display/dom.ts +6 -6
- package/src/scope/display/junit.ts +3 -3
- package/src/scope/execute.ts +2 -2
- package/src/scope/expect.ts +3 -3
- package/src/scope/state.ts +10 -0
- 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 +10 -0
- package/build/components/select.d.ts +0 -13
- package/build/components/test.js +0 -2
- package/build/debounce.d.ts +0 -1
- package/build/dom/test.d.ts +0 -1
- package/build/dom/test.js +0 -2
- package/build/observable/observable.d.ts +0 -83
- package/build/observable/observable.js +0 -148
- package/build/observable/observable.test.js +0 -21
- package/build/test.mjs +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/pico/pico.scss","../src/pico/reset/_document.scss","../src/pico/reset/_typography.scss","../src/pico/reset/_embedded.scss","../src/pico/reset/_button.scss","../src/pico/reset/_form.scss","../src/pico/reset/_table.scss","../src/pico/reset/_misc.scss","../src/pico/reset/_nav.scss","../src/pico/reset/_progress.scss","../src/pico/themes/default.scss","../src/pico/themes/default/_styles.scss","../src/pico/themes/default/_light.scss","../src/pico/themes/default/_dark.scss","../src/pico/layout/_sectioning.scss","../src/pico/layout/_section.scss","../src/pico/layout/_flex.scss","../src/pico/layout/_grid.scss","../src/pico/layout/_scroller.scss","../src/pico/content/_typography.scss","../src/pico/content/_button.scss","../src/pico/content/_form.scss","../src/pico/content/_toggle.scss","../src/pico/content/_form-alt.scss","../src/pico/content/_table.scss","../src/pico/content/_code.scss","../src/pico/components/_accordion.scss","../src/pico/components/_card.scss","../src/pico/components/_modal.scss","../src/pico/components/_nav.scss","../src/pico/components/_progress.scss","../src/pico/components/_dropdown.scss","../src/pico/components/_property.scss","../src/pico/components/_button-group.scss","../src/pico/utilities/_loading.scss","../src/pico/utilities/_tooltip.scss","../src/pico/utilities/_accessibility.scss","../src/pico/utilities/_reduce-motion.scss"],"names":[],"mappings":";AAGA;AAEA;ACLA;AAAA;AAAA;AAAA;EAYA;AAAA;AAAA;IAGE;IACA;;;EAKF;AAAA;IAEE;IACA;;;EASF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;ECxCF;AAAA;IAEE;;;EAIF;AAAA;IAEE;IACA;IACA;IACA;;;EAEF;IACE;;;EAEF;IACE;;;ECtBF;IACE;;;EAIF;AAAA;IAEE;;;EAIF;IACE;IACA;;;EAIF;IACE;;;EAKF;IACE;IACA;IACA;;;EAIF;IACE;;;EAIF;IACE;;;EClCF;IACE;IACA;IACA;IACA;;;EAIF;AAAA;AAAA;AAAA;IAIE;;;ECbF;AAAA;AAAA;AAAA;IAIE;IACA;IACA;IACA;IACA;;;EAIF;IACE;;;EAIF;IACE;;;EAOF;IACE;IACA;IACA;IACA;;;EAIF;IACE;;;EAIF;AAAA;IAEE;;;EAIF;AAAA;IAEE;;;EAKF;IACE;IACA;;;EAIF;IACE;;;EAKF;IACE;IACA;;;EAIF;IACE;IACA;;;EAIF;IACE;;;EAIF;IACE;;;EAIF;IACE;;;EAIF;AAAA;IAEE;IACA;;;EC7FF;IACE;IACA;IACA;IACA;;;ECJF;IACE;IACA;IACA;IACA;;;EAIF;AAAA;IAGI;;;EAOJ;IACE;;;ECpBF;IACE;IACA;;;ECHF;IACE;IACA;;;ATeF;AUjBA;AAAA;AAAA;ECCA;IAEE;AAAA;AAAA;IAGA;AAAA;AAAA;IAGA;IACA;IACA;IA8BA;IACA;IACA;IAGA;IAGA;IAGA;IACA;IAGE;IACA;IAIF;IACA;IAGA;IACA;IACA;IACA;IAGA;IAGA;;EA1DI;IAfN;MAgBQ;;;EAKF;IArBN;MAsBQ;;;EAKF;IA3BN;MA4BQ;;;EAKF;IAjCN;MAkCQ;;;;EA8EF;IALJ;AAAA;AAAA;AAAA;MAMM;;;EAKF;IAXJ;AAAA;AAAA;AAAA;MAYM;;;EAKF;IAjBJ;AAAA;AAAA;AAAA;MAkBM;;;EAKF;IAvBJ;AAAA;AAAA;AAAA;MAwBM;;;;EAQF;IAFJ;MAGM;;;EAKF;IARJ;MASM;;;EAKF;IAdJ;MAeM;;;EAKF;IApBJ;MAqBM;;;;EAMN;IACE;IACA;;EAGE;IALJ;MAMM;MACA;;;EAKF;IAZJ;MAaM;MACA;;;;EAOR;IACE;;EAIE;IAEE;;;EAMN;IACE;;;EAIF;AAAA;AAAA;AAAA;AAAA;AAAA;IAME;;;EAGF;IACE;IACA;;;EAGF;IACE;IACA;;;EAGF;IACE;IACA;;;EAGF;IACE;IACA;;;EAGF;IACE;IACA;;;EAIF;AAAA;IAEE;;;EAGF;IACE;;;EAMA;AAAA;AAAA;AAAA;IAEE;;;EAIJ;IACE;;;EAIF;AAAA;AAAA;AAAA;IAIE;;;EAGF;IACE;;;ED9PF;AAAA;IEbE;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IAGA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IAKA;IACA;IAGA;IACA;IAGA;IACA;IAKA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IACA;IAGA;IACA;IACA;AAAA;AAAA;IAGA;IAGA;IACA;IACA;IACA;IACA;IAGA;IAGA;IACA;IAGA;IAGA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;EF5HF;IACE;MGrBA;MACA;MAGA;MACA;MACA;MACA;MACA;MACA;MACA;MAGA;MACA;MAGA;MACA;MACA;MACA;MAGA;MACA;MACA;MACA;MAGA;MACA;MACA;MACA;MAGA;MACA;MAGA;MACA;MAGA;MACA;MAKA;MACA;MAGA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MAGA;MACA;MACA;MAGA;MACA;MACA;MACA;MACA;MACA;MAGA;MACA;MAGA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MAGA;MACA;MACA;MACA;MAGA;MACA;MACA;AAAA;AAAA;MAGA;MAGA;MACA;MACA;MACA;MACA;MAGA;MAGA;MACA;MAGA;MAGA;MACA;MAGA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;;EHnHF;IG5BE;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IAGA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IAGA;IACA;IAGA;IACA;IAGA;IACA;IAKA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IACA;IACA;IAGA;IACA;IACA;AAAA;AAAA;IAGA;IAGA;IACA;IACA;IACA;IACA;IAGA;IAGA;IACA;IAGA;IAGA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;Ab7HF;AcrBA;AAAA;AAAA;AAAA;EAWA;IACE;;;EAMM;EAIR;IACE;IACA;IACA;;EAqBE;AAAA;AAAA;IAGE;IACA;IACA;;;ACnDN;AAAA;AAAA;AAAA;EAKA;IACE;;;ECNF;IACE;IACA;;EAEA;IACE;;EAEA;IACE;;EAIJ;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;EAGF;IACE;;EAIA;IACE,MAFS;;EACX;IACE,MAFS;;EACX;IACE,MAFS;;EACX;IACE,MAFS;;;ACvCb;AAAA;AAAA;AAAA;EAKA;IACE;IACA;IACA;IACA;IACA;;EAGE;IARJ;MASM;;;EAIJ;IACE;;;ACpBN;AAAA;AAAA;EAKA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;;;AlBkBJ;EmB/BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;IAUE;IACA;IACA;IACA;IACA;IACA;;;EAKF;AAAA;IAEE;IACA;IACA;IA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IACA;IACA;IACA;;;EAIJ;IAEE;;;EAIF;IACE;IACA;IACA;IACA;IACA;;EAoCA;IAjCE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGE;;EAKF;IACE;IACA;;EAQJ;IArCE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGE;;EAKF;IACE;IACA;;EAYJ;IAzCE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGE;;EAKF;IACE;IACA;;;EAkBN;IAOE;IACA;IACA;IACA;IACA,QARe;IASf;;EAeA;IAXE;IACA,QAfa;IAgBb;IACA;IAGE;;EASJ;IAfE;IACA,QAfa;IAgBb;IACA;IAGE;;EAaJ;IAnBE;IACA,QAfa;IAgBb;IACA;IAGE;;EAiCJ;IAdE;IACA,OAvCa;IAwCb,QAxCa;IAyCb;IACA;IACA;IACA;IACA;IAGE;;EAQJ;IAlBE;IACA,OAvCa;IAwCb,QAxCa;IAyCb;IACA;IACA;IACA;IACA;IAGE;;EAYJ;IAtBE;IACA,OAvCa;IAwCb,QAxCa;IAyCb;IACA;IACA;IACA;IACA;IAGE;;EAgBJ;IAEE;IACA;;EAGF;IACE;;EAGA;IACE;;EAGF;IACE;;EAGF;IACE;;;EAQJ;IACE;IAGA;IACA;IACA;IACA;IACA;;EAEA;IAEI;IAQF;;EAGF;IACE;;EAGF;IACE;;;EAOJ;IACE;IACA;;;EAOE;IACE;;EAEA;IACE;;;EC9QV;AAAA;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;;;EAKA;AAAA;IAEE;IACA;;;EAOA;IACE;;;ECxBN;AAAA;AAAA;IAGE;IACA;IACA;IACA;IACA;;;EAGF;AAAA;IAEE;IACA;;;EAGF;IACE;IACA;IACA;;EAEA;IACE;IACA;IACA;IACA;IACA;;;EAOF;IACE;IACA;;EAIF;IACE;IACA;;EAIF;IACE;IACA;;EAIF;IACE;IACA;;;EAKJ;IACE;IACA;IACA;;;AzBnBF;E0B1CA;IACE;IACA;IACA;IACA;;EAEA;IACE;IACA;IACA;IAOE;;EALF;IACE;;EAQF;IACE;;EAGF;IACE;;EAGF;IACE;;EAIF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGE;;EAIJ;IACE;;EAEA;IACE;;EAKJ;IACE;IACA;;EAGA;IACE;IACA;;EAOE;IACE;;EASR;IACE;;EAGE;IACE;;EAIJ;IACE;;;EAQJ;IACE;;EAEA;IACE;IACA;;;EC3GR;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;AAAA;IAEE;IACA;IACA;IACA;IACA;IACA;IAEA;;EAGF;IACE;IACA;IACA;;EAGE;IACE;;EAGF;IACE;;EAKN;IACE;;EAGF;IACE;IACA;IACA;;;EC5CJ;IACE;;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAGA;IACE;IACA;IACA;;EAGE;IANJ;MAOM;;;EAKF;IAZJ;MAaM;;;EAKF;IAlBJ;MAmBM;;;EAKF;IAxBJ;MAyBM;;;EAIJ;AAAA;IAEE;;EAKA;IACE;IACA;IACA;;EAIJ;IACE;;EAEA;IACE;;EAEA;IACE;;EAMJ;IACE;;EAMF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGE;;EAGF;IACE;;EAOR;IAEE;;;EAMF;IACE;IACA;IACA;;EAEA;IACE;;;EAUF;AAAA;IAEE,oBALiB;IAMjB;IACA;;EAGF;IACE;IACA;;EAEA;IACE,iBAfe;IAgBf;;;EAMJ;AAAA;IAEE;IACA;;;EAIJ;IACE;MACE;;IAEF;MACE;;;EAIJ;IACE;MACE;MACA;;IAEF;MACE;MACA;;;ECjLN;AAAA;IAEE;;;EAGF;IACE;;EAEA;AAAA;IAEE;IACA;IACA;IACA;;EAEA;AAAA;IACE;;EAEF;AAAA;IACE;;EAIJ;IACE;IACA;IACA;;EAIA;IACE;;EAIJ;IACE;IACA;IAEA;IACA;IACA;;EAEA;IACE;;EAKJ;IACE;IACA;IACA;;;EAMF;AAAA;AAAA;AAAA;IAIE;;EAGF;IACE;;EAGA;IACE;;EAIF;IACE;;;EC3EN;IAEE;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;IACA;IAGA;;EAEA;IACE;IACA;;EAEF;IACE;;EAEF;IACE;;EAIF;IACE;MACE;MAOA;;IAEA;MACE;;IAEF;MACE;;;;EAON;IACE;MACE;;;;EAKN;IACE;MACE;;IAEF;MACE;;;ECnEJ;AAAA;IAEE;;;EAGF;AAAA;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;AAAA;IACE;IACA;IACA;IAEA;;EAEA;AAAA;IACE;;EAGF;AAAA;IACE;;EAGF;AAAA;IACE;IACA;IAEA;IAEA;IACA;IACA;IACA;;EAEA;AAAA;IACE;;;EASN;AAAA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;EAKJ;IACE;IACA;;EAGA;IACE;;EAEA;IACE;IAIA;IAEA;IACA;IACA;IACA;IACA;IACA;IAGE;;EAKF;IAEE;IACA;;EAGF;IACE;;EAMN;IACE;IACA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;;EAMN;AAAA;IAEE;IACA;;;EAGF;AAAA;IAEE;IACA;;EAEA;AAAA;IACE;;;EAMF;AAAA;IAEE;IACA;;EAGF;IACE;;EAGF;IACE;IACA;;EAGF;IACE;IACA;;EAEA;IACE;IACA;;;EASJ;AAAA;AAAA;IAGE;;EAGF;IACE;IACA;IACA;;EAKF;IACE;;;ECxMJ;IACE;IACA;;;EAGF;IACE;;;EAGF;IACE;IACA;;;EAGF;IACE;IACA;IACA;IACA;IACA;;;EAIF;AAAA;IAEE;IAEA;;;EAGF;AAAA;IAEE;;;AChCF;AAAA;AAAA;EAIA;AAAA;IAGE;IACA;;EAGA;AAAA;AAAA;AAAA;AAAA;IAIE;;EAIF;AAAA;AAAA;AAAA;AAAA;IAIE;IACA;AACA;;EAGF;AAAA;AAAA;AAAA;AAAA;IAIE;IACA;IACA;;;EAKJ;IACE;;;EAIF;AAAA;IAIE;IACA;;;AjCKF;EkCrDA;IACE;;;EAKA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAIA;IACE;IACA;IACA;IACA;;EAIJ;IACE;;;EAUF;AAAA;AAAA;AAAA;AAAA;IACE;;;EAKJ;IACE;MACE;;;ECjDJ;IACE;;EAEA;IACE;IACA;IACA;;EAGF;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAIF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAMA;IAEE;;EAMF;IAGI;MAEE;MACA;;IAGF;MACE;;;;EASR;IACE;MACE;MACA;;IAEF;MACE;MACA;;;EAIJ;IACE;MACE;;IAEF;MACE;MACA;;IAEF;MACE;MACA;;;ECjGN;IACE;;;ACAA;AAAA;AAAA;EAYA;IACE;AAAA;AAAA;MAGE;MACA;MACA;MACA;MACA;MACA;MACA","file":"pico.css"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
declare type AssertMessage = string | (() => string);
|
|
2
|
-
/**
|
|
3
|
-
* Throw an error when a condition is not met.
|
|
4
|
-
*/
|
|
5
|
-
export declare function assert(condition: boolean, message?: AssertMessage): void | never;
|
|
6
|
-
/**
|
|
7
|
-
* Given a value, return it if it is not null nor undefined. Otherwise throw an
|
|
8
|
-
* error.
|
|
9
|
-
*
|
|
10
|
-
* @template T
|
|
11
|
-
* @returns {NonNullable<T>}
|
|
12
|
-
*/
|
|
13
|
-
export declare function assertExists<T>(t: T, message?: AssertMessage): NonNullable<T>;
|
|
14
|
-
/**
|
|
15
|
-
* @param {*} n
|
|
16
|
-
* @returns string
|
|
17
|
-
*/
|
|
18
|
-
export declare function assertString(n: unknown, message?: AssertMessage): string;
|
|
19
|
-
/**
|
|
20
|
-
* Compile time assertion that no value will used at this point in control flow.
|
|
21
|
-
*/
|
|
22
|
-
export declare function checkExhaustive(value: never, message?: AssertMessage): never;
|
|
23
|
-
export {};
|
|
1
|
+
declare type AssertMessage = string | (() => string);
|
|
2
|
+
/**
|
|
3
|
+
* Throw an error when a condition is not met.
|
|
4
|
+
*/
|
|
5
|
+
export declare function assert(condition: boolean, message?: AssertMessage): void | never;
|
|
6
|
+
/**
|
|
7
|
+
* Given a value, return it if it is not null nor undefined. Otherwise throw an
|
|
8
|
+
* error.
|
|
9
|
+
*
|
|
10
|
+
* @template T
|
|
11
|
+
* @returns {NonNullable<T>}
|
|
12
|
+
*/
|
|
13
|
+
export declare function assertExists<T>(t: T, message?: AssertMessage): NonNullable<T>;
|
|
14
|
+
/**
|
|
15
|
+
* @param {*} n
|
|
16
|
+
* @returns string
|
|
17
|
+
*/
|
|
18
|
+
export declare function assertString(n: unknown, message?: AssertMessage): string;
|
|
19
|
+
/**
|
|
20
|
+
* Compile time assertion that no value will used at this point in control flow.
|
|
21
|
+
*/
|
|
22
|
+
export declare function checkExhaustive(value: never, message?: AssertMessage): never;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkExhaustive = exports.assertString = exports.assertExists = exports.assert = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Throw an error when a condition is not met.
|
|
6
|
+
*/
|
|
7
|
+
function assert(condition, message = "Assertion failed") {
|
|
8
|
+
if (!condition) {
|
|
9
|
+
throw new Error(message instanceof Function ? message() : message);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.assert = assert;
|
|
13
|
+
/**
|
|
14
|
+
* Given a value, return it if it is not null nor undefined. Otherwise throw an
|
|
15
|
+
* error.
|
|
16
|
+
*
|
|
17
|
+
* @template T
|
|
18
|
+
* @returns {NonNullable<T>}
|
|
19
|
+
*/
|
|
20
|
+
function assertExists(t, message = "Assertion failed: value does not exist") {
|
|
21
|
+
assert(t != null, message);
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
exports.assertExists = assertExists;
|
|
25
|
+
/**
|
|
26
|
+
* @param {*} n
|
|
27
|
+
* @returns string
|
|
28
|
+
*/
|
|
29
|
+
function assertString(n, message = () => `Assertion failed: ${n} is not a string`) {
|
|
30
|
+
assert(typeof n === "string", message);
|
|
31
|
+
return n;
|
|
32
|
+
}
|
|
33
|
+
exports.assertString = assertString;
|
|
34
|
+
/**
|
|
35
|
+
* Compile time assertion that no value will used at this point in control flow.
|
|
36
|
+
*/
|
|
37
|
+
function checkExhaustive(value, message = `Unexpected value ${value}`) {
|
|
38
|
+
throw new Error(message instanceof Function ? message() : message);
|
|
39
|
+
}
|
|
40
|
+
exports.checkExhaustive = checkExhaustive;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function dashCase(identifier: string): string;
|
|
1
|
+
export declare function dashCase(identifier: string): string;
|
package/lib/cjs/case.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dashCase = void 0;
|
|
4
|
+
function dashCase(identifier) {
|
|
5
|
+
return identifier
|
|
6
|
+
.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}-${b.toLowerCase()}`)
|
|
7
|
+
.replace(/ ([A-Z])/g, (_, b) => `-${b.toLowerCase()}`);
|
|
8
|
+
}
|
|
9
|
+
exports.dashCase = dashCase;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
declare const ButtonBar: import("../dom/fc
|
|
2
|
-
value: T;
|
|
3
|
-
values: T[];
|
|
4
|
-
events: {
|
|
5
|
-
onSelect: (current: T) => void;
|
|
6
|
-
};
|
|
7
|
-
}, {}>;
|
|
8
|
-
export default ButtonBar;
|
|
1
|
+
declare const ButtonBar: import("../dom/fc").FCComponentCtor<{
|
|
2
|
+
value: T;
|
|
3
|
+
values: T[];
|
|
4
|
+
events: {
|
|
5
|
+
onSelect: (current: T) => void;
|
|
6
|
+
};
|
|
7
|
+
}, {}>;
|
|
8
|
+
export default ButtonBar;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const display_1 = require("../display");
|
|
4
|
+
const fc_1 = require("../dom/fc");
|
|
5
|
+
const html_1 = require("../dom/html");
|
|
6
|
+
let buttonBarId = 1;
|
|
7
|
+
let nextId = () => buttonBarId++;
|
|
8
|
+
const ButtonBar = (0, fc_1.FC)("button-bar", (el, { value, values, events }) => {
|
|
9
|
+
const name = `button-bar-${nextId()}`;
|
|
10
|
+
return (0, html_1.fieldset)({ class: "input-group" }, ...values
|
|
11
|
+
.map((option) => {
|
|
12
|
+
const opt = `${option}`.replace(/\s+/g, "_").toLowerCase();
|
|
13
|
+
const id = `${name}-${opt}`;
|
|
14
|
+
return [
|
|
15
|
+
(0, html_1.label)({ role: "button", htmlFor: id }, (0, html_1.input)({
|
|
16
|
+
type: "radio",
|
|
17
|
+
id,
|
|
18
|
+
name,
|
|
19
|
+
value: option,
|
|
20
|
+
checked: option === value,
|
|
21
|
+
events: {
|
|
22
|
+
change: () => events.onSelect(option),
|
|
23
|
+
},
|
|
24
|
+
}), (0, display_1.display)(option)),
|
|
25
|
+
];
|
|
26
|
+
})
|
|
27
|
+
.flat());
|
|
28
|
+
});
|
|
29
|
+
exports.default = ButtonBar;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface InlineEditState {
|
|
2
|
-
mode: number;
|
|
3
|
-
value: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const InlineEdit: import("../dom/fc
|
|
6
|
-
mode?: number | undefined;
|
|
7
|
-
value: string;
|
|
8
|
-
events: {
|
|
9
|
-
change: (value: string) => void;
|
|
10
|
-
};
|
|
11
|
-
}, InlineEditState>;
|
|
12
|
-
export default InlineEdit;
|
|
1
|
+
export interface InlineEditState {
|
|
2
|
+
mode: number;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const InlineEdit: import("../dom/fc").FCComponentCtor<{
|
|
6
|
+
mode?: number | undefined;
|
|
7
|
+
value: string;
|
|
8
|
+
events: {
|
|
9
|
+
change: (value: string) => void;
|
|
10
|
+
};
|
|
11
|
+
}, InlineEditState>;
|
|
12
|
+
export default InlineEdit;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InlineEdit = void 0;
|
|
4
|
+
const sizing_1 = require("../dom/css/sizing");
|
|
5
|
+
const fc_1 = require("../dom/fc");
|
|
6
|
+
const html_1 = require("../dom/html");
|
|
7
|
+
const Mode = { VIEW: 0, EDIT: 1 };
|
|
8
|
+
exports.InlineEdit = (0, fc_1.FC)("inline-edit", (el, { mode = Mode.VIEW, value, events }) => {
|
|
9
|
+
const state = (el[fc_1.State] ??= { mode, value });
|
|
10
|
+
const render = () => {
|
|
11
|
+
switch (state.mode) {
|
|
12
|
+
case Mode.EDIT:
|
|
13
|
+
return edit();
|
|
14
|
+
case Mode.VIEW:
|
|
15
|
+
return view();
|
|
16
|
+
default:
|
|
17
|
+
return (0, html_1.span)();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const view = () => (0, html_1.span)({
|
|
21
|
+
style: { cursor: "text", ...(0, sizing_1.width)("full", "inline") },
|
|
22
|
+
events: {
|
|
23
|
+
click: () => {
|
|
24
|
+
state.mode = Mode.EDIT;
|
|
25
|
+
el.update(render());
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}, state.value ?? "");
|
|
29
|
+
const edit = () => {
|
|
30
|
+
const edit = (0, html_1.span)({ style: { display: "block", position: "relative" } }, (0, html_1.input)({
|
|
31
|
+
style: {
|
|
32
|
+
zIndex: "10",
|
|
33
|
+
position: "absolute",
|
|
34
|
+
left: "0",
|
|
35
|
+
marginTop: "-0.375rem",
|
|
36
|
+
},
|
|
37
|
+
events: {
|
|
38
|
+
blur: ({ target }) => events.change(target?.value ?? ""),
|
|
39
|
+
},
|
|
40
|
+
type: "text",
|
|
41
|
+
value: state.value,
|
|
42
|
+
}), "\u00a0" // Hack to get the span to take up space
|
|
43
|
+
);
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
edit.dispatchEvent(new Event("focus"));
|
|
46
|
+
});
|
|
47
|
+
return edit;
|
|
48
|
+
};
|
|
49
|
+
return render();
|
|
50
|
+
});
|
|
51
|
+
exports.default = exports.InlineEdit;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Logger } from "../log
|
|
2
|
-
export interface HTMLLogger extends Logger {
|
|
3
|
-
root: Element;
|
|
4
|
-
}
|
|
5
|
-
export declare function isHTMLLogger(logger: Logger): logger is HTMLLogger;
|
|
6
|
-
export declare function makeHTMLLogger(name: string): HTMLLogger;
|
|
1
|
+
import { Logger } from "../log";
|
|
2
|
+
export interface HTMLLogger extends Logger {
|
|
3
|
+
root: Element;
|
|
4
|
+
}
|
|
5
|
+
export declare function isHTMLLogger(logger: Logger): logger is HTMLLogger;
|
|
6
|
+
export declare function makeHTMLLogger(name: string): HTMLLogger;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeHTMLLogger = exports.isHTMLLogger = void 0;
|
|
4
|
+
const display_1 = require("../display");
|
|
5
|
+
const html_1 = require("../dom/html");
|
|
6
|
+
const log_1 = require("../log");
|
|
7
|
+
function isHTMLLogger(logger) {
|
|
8
|
+
return logger.root != undefined;
|
|
9
|
+
}
|
|
10
|
+
exports.isHTMLLogger = isHTMLLogger;
|
|
11
|
+
function makeHTMLLogger(name) {
|
|
12
|
+
let log;
|
|
13
|
+
const root = (0, html_1.div)((0, html_1.div)((0, html_1.span)(name)), (log = (0, html_1.ul)()));
|
|
14
|
+
const logger = { level: log_1.LEVEL.INFO, root };
|
|
15
|
+
function append(message) {
|
|
16
|
+
log.appendChild((0, html_1.li)((0, html_1.pre)((0, html_1.code)(message))));
|
|
17
|
+
}
|
|
18
|
+
const logAt = (level) => (message) => level >= (logger.level ?? log_1.LEVEL.ERROR)
|
|
19
|
+
? append((0, display_1.display)(message))
|
|
20
|
+
: undefined;
|
|
21
|
+
logger.debug = logAt(log_1.LEVEL.VERBOSE);
|
|
22
|
+
logger.info = logAt(log_1.LEVEL.INFO);
|
|
23
|
+
logger.warn = logAt(log_1.LEVEL.WARN);
|
|
24
|
+
logger.error = logAt(log_1.LEVEL.ERROR);
|
|
25
|
+
return logger;
|
|
26
|
+
}
|
|
27
|
+
exports.makeHTMLLogger = makeHTMLLogger;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Select = void 0;
|
|
4
|
+
const fc_1 = require("../dom/fc");
|
|
5
|
+
const html_1 = require("../dom/html");
|
|
6
|
+
exports.Select = (0, fc_1.FC)("jiffies-select", (el, { name, events: { change }, disabled, value, options }) => (0, html_1.select)({ name, events: { change }, disabled }, ...options.map(([v, name]) => (0, html_1.option)({ value: v, selected: value === v }, `${name}`))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function loadTests(): Promise<void>;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export interface VirtualScrollSettings {
|
|
2
|
-
minIndex: number;
|
|
3
|
-
maxIndex: number;
|
|
4
|
-
startIndex: number;
|
|
5
|
-
itemHeight: number;
|
|
6
|
-
count: number;
|
|
7
|
-
tolerance: number;
|
|
8
|
-
}
|
|
9
|
-
export interface VirtualScrollDataAdapter<T> {
|
|
10
|
-
(offset: number, limit: number): Iterable<T>;
|
|
11
|
-
}
|
|
12
|
-
export declare function arrayAdapter<T>(data: T[]): VirtualScrollDataAdapter<T>;
|
|
13
|
-
export interface VirtualScrollProps<T, U extends HTMLElement> {
|
|
14
|
-
settings: Partial<VirtualScrollSettings>;
|
|
15
|
-
get: VirtualScrollDataAdapter<T>;
|
|
16
|
-
row: (t: T) => U;
|
|
17
|
-
}
|
|
18
|
-
export declare function fillVirtualScrollSettings(settings: Partial<VirtualScrollSettings>): VirtualScrollSettings;
|
|
19
|
-
export declare function initialState<T>(settings: VirtualScrollSettings): VirtualScrollState<T>;
|
|
20
|
-
export declare function getData<T>(minIndex: number, maxIndex: number, offset: number, limit: number, get: VirtualScrollDataAdapter<T>): T[];
|
|
21
|
-
export declare function doScroll<T>(scrollTop: number, state: VirtualScrollState<T>, get: VirtualScrollDataAdapter<T>): {
|
|
22
|
-
scrollTop: number;
|
|
23
|
-
topPaddingHeight: number;
|
|
24
|
-
bottomPaddingHeight: number;
|
|
25
|
-
data: T[];
|
|
26
|
-
};
|
|
27
|
-
interface VirtualScrollState<T, U extends HTMLElement = HTMLElement> {
|
|
28
|
-
settings: VirtualScrollSettings;
|
|
29
|
-
scrollTop: number;
|
|
30
|
-
bufferedItems: number;
|
|
31
|
-
totalHeight: number;
|
|
32
|
-
viewportHeight: number;
|
|
33
|
-
topPaddingHeight: number;
|
|
34
|
-
bottomPaddingHeight: number;
|
|
35
|
-
toleranceHeight: number;
|
|
36
|
-
data: T[];
|
|
37
|
-
rows: U[];
|
|
38
|
-
}
|
|
39
|
-
export declare const VirtualScroll: import("../dom/fc.js").FCComponentCtor<VirtualScrollProps<
|
|
40
|
-
export default VirtualScroll;
|
|
1
|
+
export interface VirtualScrollSettings {
|
|
2
|
+
minIndex: number;
|
|
3
|
+
maxIndex: number;
|
|
4
|
+
startIndex: number;
|
|
5
|
+
itemHeight: number;
|
|
6
|
+
count: number;
|
|
7
|
+
tolerance: number;
|
|
8
|
+
}
|
|
9
|
+
export interface VirtualScrollDataAdapter<T> {
|
|
10
|
+
(offset: number, limit: number): Iterable<T>;
|
|
11
|
+
}
|
|
12
|
+
export declare function arrayAdapter<T>(data: T[]): VirtualScrollDataAdapter<T>;
|
|
13
|
+
export interface VirtualScrollProps<T, U extends HTMLElement> {
|
|
14
|
+
settings: Partial<VirtualScrollSettings>;
|
|
15
|
+
get: VirtualScrollDataAdapter<T>;
|
|
16
|
+
row: (t: T) => U;
|
|
17
|
+
}
|
|
18
|
+
export declare function fillVirtualScrollSettings(settings: Partial<VirtualScrollSettings>): VirtualScrollSettings;
|
|
19
|
+
export declare function initialState<T>(settings: VirtualScrollSettings): VirtualScrollState<T>;
|
|
20
|
+
export declare function getData<T>(minIndex: number, maxIndex: number, offset: number, limit: number, get: VirtualScrollDataAdapter<T>): T[];
|
|
21
|
+
export declare function doScroll<T>(scrollTop: number, state: VirtualScrollState<T>, get: VirtualScrollDataAdapter<T>): {
|
|
22
|
+
scrollTop: number;
|
|
23
|
+
topPaddingHeight: number;
|
|
24
|
+
bottomPaddingHeight: number;
|
|
25
|
+
data: T[];
|
|
26
|
+
};
|
|
27
|
+
interface VirtualScrollState<T, U extends HTMLElement = HTMLElement> {
|
|
28
|
+
settings: VirtualScrollSettings;
|
|
29
|
+
scrollTop: number;
|
|
30
|
+
bufferedItems: number;
|
|
31
|
+
totalHeight: number;
|
|
32
|
+
viewportHeight: number;
|
|
33
|
+
topPaddingHeight: number;
|
|
34
|
+
bottomPaddingHeight: number;
|
|
35
|
+
toleranceHeight: number;
|
|
36
|
+
data: T[];
|
|
37
|
+
rows: U[];
|
|
38
|
+
}
|
|
39
|
+
export declare const VirtualScroll: import("../dom/fc.js").FCComponentCtor<VirtualScrollProps<any, HTMLElement>, VirtualScrollState<any, HTMLElement>>;
|
|
40
|
+
export default VirtualScroll;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VirtualScroll = exports.doScroll = exports.getData = exports.initialState = exports.fillVirtualScrollSettings = exports.arrayAdapter = void 0;
|
|
4
|
+
const debounce_js_1 = require("../debounce.js");
|
|
5
|
+
const fc_js_1 = require("../dom/fc.js");
|
|
6
|
+
const html_js_1 = require("../dom/html.js");
|
|
7
|
+
function arrayAdapter(data) {
|
|
8
|
+
return (offset, limit) => data.slice(offset, offset + limit);
|
|
9
|
+
}
|
|
10
|
+
exports.arrayAdapter = arrayAdapter;
|
|
11
|
+
function fillVirtualScrollSettings(settings) {
|
|
12
|
+
const { minIndex = 0, maxIndex = Number.MAX_SAFE_INTEGER, startIndex = 0, itemHeight = 20, count = maxIndex - minIndex + 1, tolerance = count, } = settings;
|
|
13
|
+
return { minIndex, maxIndex, startIndex, itemHeight, count, tolerance };
|
|
14
|
+
}
|
|
15
|
+
exports.fillVirtualScrollSettings = fillVirtualScrollSettings;
|
|
16
|
+
function initialState(settings) {
|
|
17
|
+
// From Denis Hilt, https://blog.logrocket.com/virtual-scrolling-core-principles-and-basic-implementation-in-react/
|
|
18
|
+
const { minIndex, maxIndex, startIndex, itemHeight, count, tolerance } = settings;
|
|
19
|
+
const bufferedItems = count + 2 * tolerance;
|
|
20
|
+
const itemsAbove = Math.max(0, startIndex - tolerance - minIndex);
|
|
21
|
+
const viewportHeight = count * itemHeight;
|
|
22
|
+
const totalHeight = (maxIndex - minIndex + 1) * itemHeight;
|
|
23
|
+
const toleranceHeight = tolerance * itemHeight;
|
|
24
|
+
const bufferHeight = viewportHeight + 2 * toleranceHeight;
|
|
25
|
+
const topPaddingHeight = itemsAbove * itemHeight;
|
|
26
|
+
const bottomPaddingHeight = totalHeight - (topPaddingHeight + bufferHeight);
|
|
27
|
+
return {
|
|
28
|
+
scrollTop: 0,
|
|
29
|
+
settings,
|
|
30
|
+
viewportHeight,
|
|
31
|
+
totalHeight,
|
|
32
|
+
toleranceHeight,
|
|
33
|
+
bufferedItems,
|
|
34
|
+
topPaddingHeight,
|
|
35
|
+
bottomPaddingHeight,
|
|
36
|
+
data: [],
|
|
37
|
+
rows: [],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.initialState = initialState;
|
|
41
|
+
function getData(minIndex, maxIndex, offset, limit, get) {
|
|
42
|
+
const start = Math.max(0, minIndex, offset);
|
|
43
|
+
const end = Math.min(maxIndex, offset + limit - 1);
|
|
44
|
+
const data = get(start, end - start);
|
|
45
|
+
return [...data];
|
|
46
|
+
}
|
|
47
|
+
exports.getData = getData;
|
|
48
|
+
function doScroll(scrollTop, state, get) {
|
|
49
|
+
const { totalHeight, toleranceHeight, bufferedItems, settings: { itemHeight, minIndex, maxIndex }, } = state;
|
|
50
|
+
const index = minIndex + Math.floor((scrollTop - toleranceHeight) / itemHeight);
|
|
51
|
+
const data = getData(minIndex, maxIndex, index, bufferedItems, get);
|
|
52
|
+
const topPaddingHeight = Math.max((index - minIndex) * itemHeight, 0);
|
|
53
|
+
const bottomPaddingHeight = Math.max(totalHeight - (topPaddingHeight + data.length * itemHeight), 0);
|
|
54
|
+
return { scrollTop, topPaddingHeight, bottomPaddingHeight, data };
|
|
55
|
+
}
|
|
56
|
+
exports.doScroll = doScroll;
|
|
57
|
+
// export interface VirtualScroll<T, U extends HTMLElement> {
|
|
58
|
+
// state: VirtualScrollState<T>;
|
|
59
|
+
// rows: UHTMLElement<U>[];
|
|
60
|
+
// }
|
|
61
|
+
exports.VirtualScroll = (0, fc_js_1.FC)("virtual-scroll", (element, props) => {
|
|
62
|
+
const settings = fillVirtualScrollSettings(props.settings);
|
|
63
|
+
const state = (element[fc_js_1.State] = {
|
|
64
|
+
...initialState(settings),
|
|
65
|
+
...element[fc_js_1.State],
|
|
66
|
+
});
|
|
67
|
+
const scrollTo = ({ target } = { target: state }) => {
|
|
68
|
+
const scrollTop = target?.scrollTop ?? state.topPaddingHeight;
|
|
69
|
+
const updatedSate = {
|
|
70
|
+
...state,
|
|
71
|
+
...doScroll(scrollTop, state, props.get),
|
|
72
|
+
};
|
|
73
|
+
setState(updatedSate);
|
|
74
|
+
};
|
|
75
|
+
const viewportElement = (0, html_js_1.div)({
|
|
76
|
+
style: { height: `${state.viewportHeight}px`, overflowY: "scroll" },
|
|
77
|
+
events: { scroll: (0, debounce_js_1.debounce)(scrollTo, 0) },
|
|
78
|
+
});
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
viewportElement.scroll({ top: state.scrollTop });
|
|
81
|
+
});
|
|
82
|
+
const setState = (newState) => {
|
|
83
|
+
state.scrollTop = newState.scrollTop;
|
|
84
|
+
state.topPaddingHeight = newState.topPaddingHeight;
|
|
85
|
+
state.bottomPaddingHeight = newState.bottomPaddingHeight;
|
|
86
|
+
state.data = newState.data;
|
|
87
|
+
state.rows = state.data.map(props.row);
|
|
88
|
+
viewportElement.update((0, html_js_1.div)({
|
|
89
|
+
class: "VirtualScroll__topPadding",
|
|
90
|
+
style: { height: `${state.topPaddingHeight}px` },
|
|
91
|
+
}), ...(state.rows ?? []).map((row, i) => (0, html_js_1.div)({
|
|
92
|
+
class: `VirtualScroll__item_${i}`,
|
|
93
|
+
style: { height: `${settings.itemHeight}px` },
|
|
94
|
+
}, row)), (0, html_js_1.div)({
|
|
95
|
+
class: "VirtualScroll__bottomPadding",
|
|
96
|
+
style: { height: `${state.bottomPaddingHeight}px` },
|
|
97
|
+
}));
|
|
98
|
+
};
|
|
99
|
+
scrollTo();
|
|
100
|
+
return viewportElement;
|
|
101
|
+
});
|
|
102
|
+
exports.default = exports.VirtualScroll;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fc_js_1 = require("../dom/fc.js");
|
|
4
|
+
const html_js_1 = require("../dom/html.js");
|
|
5
|
+
const index_js_1 = require("../scope/index.js");
|
|
6
|
+
const virtual_scroll_js_1 = require("./virtual_scroll.js");
|
|
7
|
+
(0, index_js_1.describe)("VirtualScroll", () => {
|
|
8
|
+
(0, index_js_1.it)("tracks scroll position", () => {
|
|
9
|
+
const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
10
|
+
const props = {
|
|
11
|
+
settings: { count: 3, startIndex: 2 },
|
|
12
|
+
get: (0, virtual_scroll_js_1.arrayAdapter)(data),
|
|
13
|
+
row: (i) => (0, html_js_1.div)(`${i}`),
|
|
14
|
+
};
|
|
15
|
+
const scroll = (0, virtual_scroll_js_1.default)(props);
|
|
16
|
+
(0, index_js_1.expect)(scroll[fc_js_1.State]?.bufferedItems).toBe(9);
|
|
17
|
+
(0, index_js_1.expect)(scroll[fc_js_1.State]?.data).toEqual([0, 1, 2, 3, 4]);
|
|
18
|
+
//expect(scroll.state.topPaddingHeight).toBe(0);
|
|
19
|
+
(0, index_js_1.expect)(scroll[fc_js_1.State]?.viewportHeight).toBe(60);
|
|
20
|
+
//expect(scroll.state.totalHeight).toBe(200);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Err, Result } from "./result.js";
|
|
2
|
-
export declare const Enter: unique symbol;
|
|
3
|
-
export declare const Exit: unique symbol;
|
|
4
|
-
export interface Context {
|
|
5
|
-
[Enter]: () => void;
|
|
6
|
-
[Exit]: () => void;
|
|
7
|
-
}
|
|
8
|
-
export interface Operation<T, E extends Error, C extends Context> {
|
|
9
|
-
(c: C): T | Result<T, E>;
|
|
10
|
-
}
|
|
11
|
-
export interface AsyncOperation<T, E extends Error, C extends Context> {
|
|
12
|
-
(c: C): Promise<T | Result<T, E>>;
|
|
13
|
-
}
|
|
14
|
-
export declare function using<T, E extends Error, C extends Context>(context: C | (() => C) | Operation<T, E, C>, operation?: Operation<T, E, C>, normalizeError?: (e: Error | unknown | any) => Err<E>): Result<T, E>;
|
|
15
|
-
export declare function asyncUsing<T, E extends Error, C extends Context>(context: C | (() => Promise<C>), operation: AsyncOperation<T, E, C>, normalizeError?: (e: Error | unknown | any) => Err<E>): Promise<Result<T, E>>;
|
|
1
|
+
import { Err, Result } from "./result.js";
|
|
2
|
+
export declare const Enter: unique symbol;
|
|
3
|
+
export declare const Exit: unique symbol;
|
|
4
|
+
export interface Context {
|
|
5
|
+
[Enter]: () => void;
|
|
6
|
+
[Exit]: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface Operation<T, E extends Error, C extends Context> {
|
|
9
|
+
(c: C): T | Result<T, E>;
|
|
10
|
+
}
|
|
11
|
+
export interface AsyncOperation<T, E extends Error, C extends Context> {
|
|
12
|
+
(c: C): Promise<T | Result<T, E>>;
|
|
13
|
+
}
|
|
14
|
+
export declare function using<T, E extends Error, C extends Context>(context: C | (() => C) | Operation<T, E, C>, operation?: Operation<T, E, C>, normalizeError?: (e: Error | unknown | any) => Err<E>): Result<T, E>;
|
|
15
|
+
export declare function asyncUsing<T, E extends Error, C extends Context>(context: C | (() => Promise<C>), operation: AsyncOperation<T, E, C>, normalizeError?: (e: Error | unknown | any) => Err<E>): Promise<Result<T, E>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.asyncUsing = exports.using = exports.Exit = exports.Enter = void 0;
|
|
4
|
+
const result_js_1 = require("./result.js");
|
|
5
|
+
exports.Enter = Symbol("Context Enter");
|
|
6
|
+
exports.Exit = Symbol("Context Exit");
|
|
7
|
+
function using(context, operation, normalizeError = (e) => (0, result_js_1.Err)(e)) {
|
|
8
|
+
if (typeof context === "function") {
|
|
9
|
+
if (context.length === 1) {
|
|
10
|
+
operation = context;
|
|
11
|
+
context = {};
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
context = context();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
let result;
|
|
18
|
+
try {
|
|
19
|
+
context[exports.Enter]();
|
|
20
|
+
const op = operation(context);
|
|
21
|
+
result = (0, result_js_1.isResult)(op) ? op : (0, result_js_1.Ok)(op);
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
result = normalizeError(e);
|
|
25
|
+
}
|
|
26
|
+
finally {
|
|
27
|
+
context[exports.Exit]();
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
exports.using = using;
|
|
32
|
+
async function asyncUsing(context, operation, normalizeError = (e) => (0, result_js_1.Err)(e)) {
|
|
33
|
+
context = typeof context === "function" ? await context() : context;
|
|
34
|
+
let result;
|
|
35
|
+
try {
|
|
36
|
+
context[exports.Enter]();
|
|
37
|
+
const op = await operation(context);
|
|
38
|
+
result = (0, result_js_1.isResult)(op) ? op : (0, result_js_1.Ok)(op);
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
result = normalizeError(e);
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
context[exports.Exit]();
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
exports.asyncUsing = asyncUsing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|