@davidsouther/jiffies 2.2.5 → 2026.4.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/LICENSE +1 -1
- package/package.json +22 -25
- package/src/assert.ts +5 -5
- package/src/components/button_bar.ts +28 -30
- package/src/components/inline_edit.ts +8 -7
- package/src/components/logger.ts +6 -6
- package/src/components/select.ts +7 -7
- package/src/components/test.ts +5 -0
- package/src/components/virtual_scroll.test.ts +9 -6
- package/src/components/virtual_scroll.ts +29 -24
- package/src/context.test.ts +4 -4
- package/src/context.ts +16 -11
- package/src/debounce.ts +9 -3
- package/src/diff.test.ts +4 -4
- package/src/diff.ts +14 -16
- package/src/dom/css/border.ts +11 -11
- package/src/dom/css/core.ts +1 -1
- package/src/dom/css/fstyle.ts +4 -4
- package/src/dom/css/sizing.ts +1 -1
- package/src/dom/dom.ts +59 -47
- package/src/dom/fc.test.ts +8 -8
- package/src/dom/fc.ts +32 -35
- package/src/dom/form/form.app.ts +9 -9
- package/src/dom/form/form.ts +21 -15
- package/src/dom/form/index.html +3 -2
- package/src/dom/html.test.ts +12 -10
- package/src/dom/html.ts +2 -3
- package/src/dom/index.ts +2 -0
- package/src/dom/observable.test.ts +6 -6
- package/src/dom/observable.ts +2 -2
- package/src/dom/provide.ts +1 -1
- package/src/dom/router/link.ts +3 -3
- package/src/dom/router/router.ts +5 -5
- package/src/dom/svg.ts +7 -6
- package/src/dom/test.ts +3 -0
- package/src/dom/types/css.ts +43 -61
- package/src/dom/types/html.ts +2 -4
- package/src/dom/xml.ts +2 -2
- package/src/equal.test.ts +3 -3
- package/src/equal.ts +27 -14
- package/src/flags.test.ts +2 -2
- package/src/flags.ts +2 -2
- package/src/fs.test.ts +5 -5
- package/src/fs.ts +26 -20
- package/src/fs_node.ts +4 -4
- package/src/fs_win.test.ts +1 -1
- package/src/generator.test.ts +4 -3
- package/src/generator.ts +1 -1
- package/src/hooks/_notes +4 -1
- package/src/index.html +7 -7
- package/src/lock.test.ts +4 -4
- package/src/lock.ts +8 -7
- package/src/log.ts +17 -18
- package/src/observable/event.ts +7 -7
- package/src/observable/observable.test.ts +3 -3
- package/src/observable/observable.ts +73 -52
- package/src/result.test.ts +7 -10
- package/src/result.ts +51 -47
- package/src/safe.ts +1 -1
- package/src/scope/describe.ts +12 -11
- package/src/scope/display/console.ts +4 -4
- package/src/scope/display/dom.ts +9 -9
- package/src/scope/display/junit.ts +21 -24
- package/src/scope/execute.ts +17 -12
- package/src/scope/expect.ts +22 -22
- package/src/scope/fix.ts +8 -7
- package/src/scope/index.ts +3 -3
- package/src/scope/scope.ts +2 -2
- package/src/scope/state.ts +2 -2
- package/src/server/http/apps.ts +5 -5
- package/src/server/http/css.ts +10 -26
- package/src/server/http/index.ts +30 -24
- package/src/server/http/response.ts +12 -5
- package/src/server/http/sitemap.ts +8 -8
- package/src/server/http/static.ts +9 -6
- package/src/server/http/typescript.ts +25 -25
- package/src/server/main.ts +7 -4
- package/src/test.mjs +8 -8
- package/src/test_all.ts +16 -13
- package/src/transpile.mjs +5 -18
- package/tsconfig.json +34 -0
- package/build/pico.css +0 -2466
- package/build/pico.css.map +0 -1
- package/lib/cjs/assert.d.ts +0 -26
- package/lib/cjs/assert.js +0 -46
- package/lib/cjs/awaitable.d.ts +0 -1
- package/lib/cjs/awaitable.js +0 -2
- package/lib/cjs/case.d.ts +0 -1
- package/lib/cjs/case.js +0 -9
- package/lib/cjs/components/button_bar.d.ts +0 -8
- package/lib/cjs/components/button_bar.js +0 -29
- package/lib/cjs/components/inline_edit.d.ts +0 -12
- package/lib/cjs/components/inline_edit.js +0 -51
- package/lib/cjs/components/logger.d.ts +0 -6
- package/lib/cjs/components/logger.js +0 -27
- package/lib/cjs/components/select.d.ts +0 -13
- package/lib/cjs/components/select.js +0 -6
- package/lib/cjs/components/test.d.ts +0 -1
- package/lib/cjs/components/test.js +0 -7
- package/lib/cjs/components/virtual_scroll.d.ts +0 -40
- package/lib/cjs/components/virtual_scroll.js +0 -102
- package/lib/cjs/components/virtual_scroll.test.d.ts +0 -1
- package/lib/cjs/components/virtual_scroll.test.js +0 -22
- package/lib/cjs/context.d.ts +0 -15
- package/lib/cjs/context.js +0 -48
- package/lib/cjs/context.test.d.ts +0 -1
- package/lib/cjs/context.test.js +0 -48
- package/lib/cjs/debounce.d.ts +0 -1
- package/lib/cjs/debounce.js +0 -12
- package/lib/cjs/diff.d.ts +0 -15
- package/lib/cjs/diff.js +0 -58
- package/lib/cjs/diff.test.d.ts +0 -1
- package/lib/cjs/diff.test.js +0 -41
- package/lib/cjs/display.d.ts +0 -5
- package/lib/cjs/display.js +0 -16
- package/lib/cjs/dom/css/border.d.ts +0 -11
- package/lib/cjs/dom/css/border.js +0 -33
- package/lib/cjs/dom/css/constants.d.ts +0 -31
- package/lib/cjs/dom/css/constants.js +0 -31
- package/lib/cjs/dom/css/core.d.ts +0 -5
- package/lib/cjs/dom/css/core.js +0 -31
- package/lib/cjs/dom/css/fstyle.d.ts +0 -5
- package/lib/cjs/dom/css/fstyle.js +0 -36
- package/lib/cjs/dom/css/sizing.d.ts +0 -5
- package/lib/cjs/dom/css/sizing.js +0 -14
- package/lib/cjs/dom/dom.d.ts +0 -27
- package/lib/cjs/dom/dom.js +0 -110
- package/lib/cjs/dom/fc.d.ts +0 -14
- package/lib/cjs/dom/fc.js +0 -39
- package/lib/cjs/dom/fc.test.d.ts +0 -1
- package/lib/cjs/dom/fc.test.js +0 -23
- package/lib/cjs/dom/form/form.app.d.ts +0 -1
- package/lib/cjs/dom/form/form.app.js +0 -27
- package/lib/cjs/dom/form/form.d.ts +0 -26
- package/lib/cjs/dom/form/form.js +0 -49
- package/lib/cjs/dom/form/form.test.d.ts +0 -0
- package/lib/cjs/dom/form/form.test.js +0 -1
- package/lib/cjs/dom/html.d.ts +0 -113
- package/lib/cjs/dom/html.js +0 -119
- package/lib/cjs/dom/html.test.d.ts +0 -1
- package/lib/cjs/dom/html.test.js +0 -60
- package/lib/cjs/dom/observable.d.ts +0 -2
- package/lib/cjs/dom/observable.js +0 -10
- package/lib/cjs/dom/observable.test.d.ts +0 -1
- package/lib/cjs/dom/observable.test.js +0 -35
- package/lib/cjs/dom/provide.d.ts +0 -3
- package/lib/cjs/dom/provide.js +0 -12
- package/lib/cjs/dom/router/link.d.ts +0 -6
- package/lib/cjs/dom/router/link.js +0 -7
- package/lib/cjs/dom/router/router.d.ts +0 -13
- package/lib/cjs/dom/router/router.js +0 -55
- package/lib/cjs/dom/svg.d.ts +0 -64
- package/lib/cjs/dom/svg.js +0 -69
- package/lib/cjs/dom/test.d.ts +0 -1
- package/lib/cjs/dom/test.js +0 -13
- package/lib/cjs/dom/types/css.d.ts +0 -6612
- package/lib/cjs/dom/types/css.js +0 -24
- package/lib/cjs/dom/types/dom.d.ts +0 -0
- package/lib/cjs/dom/types/dom.js +0 -1
- package/lib/cjs/dom/types/html.d.ts +0 -616
- package/lib/cjs/dom/types/html.js +0 -2
- package/lib/cjs/dom/xml.d.ts +0 -1
- package/lib/cjs/dom/xml.js +0 -8
- package/lib/cjs/equal.d.ts +0 -8
- package/lib/cjs/equal.js +0 -48
- package/lib/cjs/equal.test.d.ts +0 -1
- package/lib/cjs/equal.test.js +0 -22
- package/lib/cjs/flags.d.ts +0 -7
- package/lib/cjs/flags.js +0 -52
- package/lib/cjs/flags.test.d.ts +0 -1
- package/lib/cjs/flags.test.js +0 -37
- package/lib/cjs/fs.d.ts +0 -72
- package/lib/cjs/fs.js +0 -235
- package/lib/cjs/fs.test.d.ts +0 -1
- package/lib/cjs/fs.test.js +0 -86
- package/lib/cjs/fs_node.d.ts +0 -15
- package/lib/cjs/fs_node.js +0 -50
- package/lib/cjs/fs_win.test.d.ts +0 -1
- package/lib/cjs/fs_win.test.js +0 -10
- package/lib/cjs/generator.d.ts +0 -1
- package/lib/cjs/generator.js +0 -14
- package/lib/cjs/generator.test.d.ts +0 -1
- package/lib/cjs/generator.test.js +0 -26
- package/lib/cjs/is_browser.d.ts +0 -1
- package/lib/cjs/is_browser.js +0 -4
- package/lib/cjs/loader-register.d.mts +0 -1
- package/lib/cjs/loader-register.d.ts +0 -1
- package/lib/cjs/loader-register.js +0 -4
- package/lib/cjs/loader-register.mjs +0 -4
- package/lib/cjs/loader.d.mts +0 -23
- package/lib/cjs/loader.mjs +0 -41
- package/lib/cjs/lock.d.ts +0 -1
- package/lib/cjs/lock.js +0 -27
- package/lib/cjs/lock.test.d.ts +0 -1
- package/lib/cjs/lock.test.js +0 -18
- package/lib/cjs/log.d.ts +0 -56
- package/lib/cjs/log.js +0 -103
- package/lib/cjs/observable/event.d.ts +0 -35
- package/lib/cjs/observable/event.js +0 -61
- package/lib/cjs/observable/observable.d.ts +0 -132
- package/lib/cjs/observable/observable.js +0 -363
- package/lib/cjs/observable/observable.test.d.ts +0 -1
- package/lib/cjs/observable/observable.test.js +0 -65
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/range.d.ts +0 -1
- package/lib/cjs/range.js +0 -11
- package/lib/cjs/result.d.ts +0 -31
- package/lib/cjs/result.js +0 -80
- package/lib/cjs/result.test.d.ts +0 -1
- package/lib/cjs/result.test.js +0 -78
- package/lib/cjs/safe.d.ts +0 -1
- package/lib/cjs/safe.js +0 -14
- package/lib/cjs/scope/describe.d.ts +0 -18
- package/lib/cjs/scope/describe.js +0 -73
- package/lib/cjs/scope/display/console.d.ts +0 -2
- package/lib/cjs/scope/display/console.js +0 -25
- package/lib/cjs/scope/display/dom.d.ts +0 -3
- package/lib/cjs/scope/display/dom.js +0 -30
- package/lib/cjs/scope/display/junit.d.ts +0 -2
- package/lib/cjs/scope/display/junit.js +0 -21
- package/lib/cjs/scope/execute.d.ts +0 -12
- package/lib/cjs/scope/execute.js +0 -91
- package/lib/cjs/scope/expect.d.ts +0 -23
- package/lib/cjs/scope/expect.js +0 -110
- package/lib/cjs/scope/fix.d.ts +0 -4
- package/lib/cjs/scope/fix.js +0 -26
- package/lib/cjs/scope/index.d.ts +0 -3
- package/lib/cjs/scope/index.js +0 -15
- package/lib/cjs/scope/scope.d.ts +0 -17
- package/lib/cjs/scope/scope.js +0 -2
- package/lib/cjs/scope/state.d.ts +0 -2
- package/lib/cjs/scope/state.js +0 -12
- package/lib/cjs/server/http/apps.d.ts +0 -5
- package/lib/cjs/server/http/apps.js +0 -27
- package/lib/cjs/server/http/css.d.ts +0 -5
- package/lib/cjs/server/http/css.js +0 -54
- package/lib/cjs/server/http/index.d.ts +0 -21
- package/lib/cjs/server/http/index.js +0 -77
- package/lib/cjs/server/http/response.d.ts +0 -4
- package/lib/cjs/server/http/response.js +0 -45
- package/lib/cjs/server/http/sitemap.d.ts +0 -2
- package/lib/cjs/server/http/sitemap.js +0 -46
- package/lib/cjs/server/http/static.d.ts +0 -2
- package/lib/cjs/server/http/static.js +0 -25
- package/lib/cjs/server/http/typescript.d.ts +0 -5
- package/lib/cjs/server/http/typescript.js +0 -44
- package/lib/cjs/server/main.d.ts +0 -2
- package/lib/cjs/server/main.js +0 -14
- package/lib/cjs/test.d.mts +0 -2
- package/lib/cjs/test.mjs +0 -28
- package/lib/cjs/test_all.d.ts +0 -9
- package/lib/cjs/test_all.js +0 -30
- package/lib/cjs/transpile.d.mts +0 -3
- package/lib/cjs/transpile.mjs +0 -22
- package/lib/cjs/tsconfig.tsbuildinfo +0 -1
- package/lib/esm/assert.d.ts +0 -26
- package/lib/esm/assert.js +0 -38
- package/lib/esm/awaitable.d.ts +0 -1
- package/lib/esm/awaitable.js +0 -1
- package/lib/esm/case.d.ts +0 -1
- package/lib/esm/case.js +0 -5
- package/lib/esm/components/button_bar.d.ts +0 -8
- package/lib/esm/components/button_bar.js +0 -27
- package/lib/esm/components/inline_edit.d.ts +0 -12
- package/lib/esm/components/inline_edit.js +0 -48
- package/lib/esm/components/logger.d.ts +0 -6
- package/lib/esm/components/logger.js +0 -22
- package/lib/esm/components/select.d.ts +0 -10
- package/lib/esm/components/select.js +0 -3
- package/lib/esm/components/test.d.ts +0 -1
- package/lib/esm/components/test.js +0 -3
- package/lib/esm/components/virtual_scroll.d.ts +0 -40
- package/lib/esm/components/virtual_scroll.js +0 -94
- package/lib/esm/components/virtual_scroll.test.d.ts +0 -1
- package/lib/esm/components/virtual_scroll.test.js +0 -20
- package/lib/esm/context.d.ts +0 -15
- package/lib/esm/context.js +0 -43
- package/lib/esm/context.test.d.ts +0 -1
- package/lib/esm/context.test.js +0 -46
- package/lib/esm/debounce.d.ts +0 -2
- package/lib/esm/debounce.js +0 -8
- package/lib/esm/diff.d.ts +0 -15
- package/lib/esm/diff.js +0 -54
- package/lib/esm/diff.test.d.ts +0 -1
- package/lib/esm/diff.test.js +0 -39
- package/lib/esm/display.d.ts +0 -5
- package/lib/esm/display.js +0 -11
- package/lib/esm/dom/css/border.d.ts +0 -11
- package/lib/esm/dom/css/border.js +0 -27
- package/lib/esm/dom/css/constants.d.ts +0 -31
- package/lib/esm/dom/css/constants.js +0 -28
- package/lib/esm/dom/css/core.d.ts +0 -5
- package/lib/esm/dom/css/core.js +0 -24
- package/lib/esm/dom/css/fstyle.d.ts +0 -5
- package/lib/esm/dom/css/fstyle.js +0 -32
- package/lib/esm/dom/css/sizing.d.ts +0 -5
- package/lib/esm/dom/css/sizing.js +0 -10
- package/lib/esm/dom/dom.d.ts +0 -27
- package/lib/esm/dom/dom.js +0 -104
- package/lib/esm/dom/fc.d.ts +0 -14
- package/lib/esm/dom/fc.js +0 -35
- package/lib/esm/dom/fc.test.d.ts +0 -1
- package/lib/esm/dom/fc.test.js +0 -21
- package/lib/esm/dom/form/form.app.d.ts +0 -1
- package/lib/esm/dom/form/form.app.js +0 -23
- package/lib/esm/dom/form/form.d.ts +0 -26
- package/lib/esm/dom/form/form.js +0 -34
- package/lib/esm/dom/form/form.test.d.ts +0 -0
- package/lib/esm/dom/form/form.test.js +0 -1
- package/lib/esm/dom/html.d.ts +0 -113
- package/lib/esm/dom/html.js +0 -114
- package/lib/esm/dom/html.test.d.ts +0 -1
- package/lib/esm/dom/html.test.js +0 -58
- package/lib/esm/dom/observable.d.ts +0 -2
- package/lib/esm/dom/observable.js +0 -6
- package/lib/esm/dom/observable.test.d.ts +0 -1
- package/lib/esm/dom/observable.test.js +0 -33
- package/lib/esm/dom/provide.d.ts +0 -3
- package/lib/esm/dom/provide.js +0 -7
- package/lib/esm/dom/router/link.d.ts +0 -6
- package/lib/esm/dom/router/link.js +0 -3
- package/lib/esm/dom/router/router.d.ts +0 -13
- package/lib/esm/dom/router/router.js +0 -52
- package/lib/esm/dom/svg.d.ts +0 -64
- package/lib/esm/dom/svg.js +0 -65
- package/lib/esm/dom/test.d.ts +0 -1
- package/lib/esm/dom/test.js +0 -9
- package/lib/esm/dom/types/css.d.ts +0 -6612
- package/lib/esm/dom/types/css.js +0 -23
- package/lib/esm/dom/types/dom.d.ts +0 -0
- package/lib/esm/dom/types/dom.js +0 -1
- package/lib/esm/dom/types/html.d.ts +0 -616
- package/lib/esm/dom/types/html.js +0 -1
- package/lib/esm/dom/xml.d.ts +0 -1
- package/lib/esm/dom/xml.js +0 -4
- package/lib/esm/equal.d.ts +0 -8
- package/lib/esm/equal.js +0 -41
- package/lib/esm/equal.test.d.ts +0 -1
- package/lib/esm/equal.test.js +0 -20
- package/lib/esm/flags.d.ts +0 -7
- package/lib/esm/flags.js +0 -48
- package/lib/esm/flags.test.d.ts +0 -1
- package/lib/esm/flags.test.js +0 -35
- package/lib/esm/fs.d.ts +0 -72
- package/lib/esm/fs.js +0 -226
- package/lib/esm/fs.test.d.ts +0 -1
- package/lib/esm/fs.test.js +0 -84
- package/lib/esm/fs_node.d.ts +0 -15
- package/lib/esm/fs_node.js +0 -45
- package/lib/esm/fs_win.test.d.ts +0 -1
- package/lib/esm/fs_win.test.js +0 -8
- package/lib/esm/generator.d.ts +0 -1
- package/lib/esm/generator.js +0 -10
- package/lib/esm/generator.test.d.ts +0 -1
- package/lib/esm/generator.test.js +0 -24
- package/lib/esm/is_browser.d.ts +0 -1
- package/lib/esm/is_browser.js +0 -1
- package/lib/esm/loader-register.d.mts +0 -1
- package/lib/esm/loader-register.mjs +0 -2
- package/lib/esm/loader.d.mts +0 -23
- package/lib/esm/loader.mjs +0 -36
- package/lib/esm/lock.d.ts +0 -1
- package/lib/esm/lock.js +0 -23
- package/lib/esm/lock.test.d.ts +0 -1
- package/lib/esm/lock.test.js +0 -16
- package/lib/esm/log.d.ts +0 -56
- package/lib/esm/log.js +0 -93
- package/lib/esm/observable/event.d.ts +0 -35
- package/lib/esm/observable/event.js +0 -46
- package/lib/esm/observable/observable.d.ts +0 -132
- package/lib/esm/observable/observable.js +0 -343
- package/lib/esm/observable/observable.test.d.ts +0 -1
- package/lib/esm/observable/observable.test.js +0 -63
- package/lib/esm/range.d.ts +0 -1
- package/lib/esm/range.js +0 -7
- package/lib/esm/result.d.ts +0 -31
- package/lib/esm/result.js +0 -65
- package/lib/esm/result.test.d.ts +0 -1
- package/lib/esm/result.test.js +0 -76
- package/lib/esm/safe.d.ts +0 -1
- package/lib/esm/safe.js +0 -10
- package/lib/esm/scope/describe.d.ts +0 -18
- package/lib/esm/scope/describe.js +0 -60
- package/lib/esm/scope/display/console.d.ts +0 -2
- package/lib/esm/scope/display/console.js +0 -21
- package/lib/esm/scope/display/dom.d.ts +0 -3
- package/lib/esm/scope/display/dom.js +0 -26
- package/lib/esm/scope/display/junit.d.ts +0 -2
- package/lib/esm/scope/display/junit.js +0 -17
- package/lib/esm/scope/execute.d.ts +0 -12
- package/lib/esm/scope/execute.js +0 -85
- package/lib/esm/scope/expect.d.ts +0 -23
- package/lib/esm/scope/expect.js +0 -104
- package/lib/esm/scope/fix.d.ts +0 -4
- package/lib/esm/scope/fix.js +0 -22
- package/lib/esm/scope/index.d.ts +0 -3
- package/lib/esm/scope/index.js +0 -3
- package/lib/esm/scope/scope.d.ts +0 -17
- package/lib/esm/scope/scope.js +0 -1
- package/lib/esm/scope/state.d.ts +0 -2
- package/lib/esm/scope/state.js +0 -8
- package/lib/esm/server/http/apps.d.ts +0 -5
- package/lib/esm/server/http/apps.js +0 -23
- package/lib/esm/server/http/css.d.ts +0 -5
- package/lib/esm/server/http/css.js +0 -50
- package/lib/esm/server/http/index.d.ts +0 -21
- package/lib/esm/server/http/index.js +0 -73
- package/lib/esm/server/http/response.d.ts +0 -4
- package/lib/esm/server/http/response.js +0 -40
- package/lib/esm/server/http/sitemap.d.ts +0 -2
- package/lib/esm/server/http/sitemap.js +0 -42
- package/lib/esm/server/http/static.d.ts +0 -2
- package/lib/esm/server/http/static.js +0 -21
- package/lib/esm/server/http/typescript.d.ts +0 -5
- package/lib/esm/server/http/typescript.js +0 -40
- package/lib/esm/server/main.d.ts +0 -2
- package/lib/esm/server/main.js +0 -12
- package/lib/esm/test.d.mts +0 -2
- package/lib/esm/test.mjs +0 -26
- package/lib/esm/test_all.d.ts +0 -9
- package/lib/esm/test_all.js +0 -28
- package/lib/esm/transpile.d.mts +0 -3
- package/lib/esm/transpile.mjs +0 -18
- package/lib/esm/tsconfig.tsbuildinfo +0 -1
- package/src/components/test.js +0 -3
- package/src/loader-register.mjs +0 -3
- package/src/loader.mjs +0 -46
package/build/pico.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/cjs/assert.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare type AssertMessage = string | (() => string);
|
|
2
|
-
export declare class AssertionError extends Error {
|
|
3
|
-
constructor(message?: string);
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Throw an error when a condition is not met.
|
|
7
|
-
*/
|
|
8
|
-
export declare function assert<_T extends true>(condition: boolean, message?: AssertMessage): void | never;
|
|
9
|
-
/**
|
|
10
|
-
* Given a value, return it if it is not null nor undefined. Otherwise throw an
|
|
11
|
-
* error.
|
|
12
|
-
*
|
|
13
|
-
* @template T
|
|
14
|
-
* @returns {NonNullable<T>}
|
|
15
|
-
*/
|
|
16
|
-
export declare function assertExists<T>(t: T, message?: AssertMessage): NonNullable<T>;
|
|
17
|
-
/**
|
|
18
|
-
* @param {*} n
|
|
19
|
-
* @returns string
|
|
20
|
-
*/
|
|
21
|
-
export declare function assertString(n: unknown, message?: AssertMessage): string;
|
|
22
|
-
/**
|
|
23
|
-
* Compile time assertion that no value will used at this point in control flow.
|
|
24
|
-
*/
|
|
25
|
-
export declare function checkExhaustive(value: never, message?: AssertMessage): never;
|
|
26
|
-
export {};
|
package/lib/cjs/assert.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkExhaustive = exports.assertString = exports.assertExists = exports.assert = exports.AssertionError = void 0;
|
|
4
|
-
class AssertionError extends Error {
|
|
5
|
-
constructor(message = "Assertion failed") {
|
|
6
|
-
super(message);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.AssertionError = AssertionError;
|
|
10
|
-
/**
|
|
11
|
-
* Throw an error when a condition is not met.
|
|
12
|
-
*/
|
|
13
|
-
function assert(condition, message) {
|
|
14
|
-
if (!condition) {
|
|
15
|
-
throw new AssertionError(message instanceof Function ? message() : message);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.assert = assert;
|
|
19
|
-
/**
|
|
20
|
-
* Given a value, return it if it is not null nor undefined. Otherwise throw an
|
|
21
|
-
* error.
|
|
22
|
-
*
|
|
23
|
-
* @template T
|
|
24
|
-
* @returns {NonNullable<T>}
|
|
25
|
-
*/
|
|
26
|
-
function assertExists(t, message = "Assertion failed: value does not exist") {
|
|
27
|
-
assert(t != null, message);
|
|
28
|
-
return t;
|
|
29
|
-
}
|
|
30
|
-
exports.assertExists = assertExists;
|
|
31
|
-
/**
|
|
32
|
-
* @param {*} n
|
|
33
|
-
* @returns string
|
|
34
|
-
*/
|
|
35
|
-
function assertString(n, message = () => `Assertion failed: ${n} is not a string`) {
|
|
36
|
-
assert(typeof n === "string", message);
|
|
37
|
-
return n;
|
|
38
|
-
}
|
|
39
|
-
exports.assertString = assertString;
|
|
40
|
-
/**
|
|
41
|
-
* Compile time assertion that no value will used at this point in control flow.
|
|
42
|
-
*/
|
|
43
|
-
function checkExhaustive(value, message = `Unexpected value ${value}`) {
|
|
44
|
-
throw new Error(message instanceof Function ? message() : message);
|
|
45
|
-
}
|
|
46
|
-
exports.checkExhaustive = checkExhaustive;
|
package/lib/cjs/awaitable.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Awaitable<T> = T | PromiseLike<T>;
|
package/lib/cjs/awaitable.js
DELETED
package/lib/cjs/case.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function dashCase(identifier: string): string;
|
package/lib/cjs/case.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const display_js_1 = require("../display.js");
|
|
4
|
-
const fc_js_1 = require("../dom/fc.js");
|
|
5
|
-
const html_js_1 = require("../dom/html.js");
|
|
6
|
-
let buttonBarId = 1;
|
|
7
|
-
let nextId = () => buttonBarId++;
|
|
8
|
-
const ButtonBar = (0, fc_js_1.FC)("button-bar", (el, { value, values, events }) => {
|
|
9
|
-
const name = `button-bar-${nextId()}`;
|
|
10
|
-
return (0, html_js_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_js_1.label)({ role: "button", htmlFor: id }, (0, html_js_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_js_1.display)(option)),
|
|
25
|
-
];
|
|
26
|
-
})
|
|
27
|
-
.flat());
|
|
28
|
-
});
|
|
29
|
-
exports.default = ButtonBar;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface InlineEditState {
|
|
2
|
-
mode: number;
|
|
3
|
-
value: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const InlineEdit: import("../dom/fc.js").FCComponentCtor<{
|
|
6
|
-
mode?: number | undefined;
|
|
7
|
-
value: string;
|
|
8
|
-
events: {
|
|
9
|
-
change: (value: string) => void;
|
|
10
|
-
};
|
|
11
|
-
}, InlineEditState>;
|
|
12
|
-
export default InlineEdit;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InlineEdit = void 0;
|
|
4
|
-
const sizing_js_1 = require("../dom/css/sizing.js");
|
|
5
|
-
const fc_js_1 = require("../dom/fc.js");
|
|
6
|
-
const html_js_1 = require("../dom/html.js");
|
|
7
|
-
const Mode = { VIEW: 0, EDIT: 1 };
|
|
8
|
-
exports.InlineEdit = (0, fc_js_1.FC)("inline-edit", (el, { mode = Mode.VIEW, value, events }) => {
|
|
9
|
-
const state = (el[fc_js_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_js_1.span)();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
const view = () => (0, html_js_1.span)({
|
|
21
|
-
style: { cursor: "text", ...(0, sizing_js_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_js_1.span)({ style: { display: "block", position: "relative" } }, (0, html_js_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,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeHTMLLogger = exports.isHTMLLogger = void 0;
|
|
4
|
-
const display_js_1 = require("../display.js");
|
|
5
|
-
const html_js_1 = require("../dom/html.js");
|
|
6
|
-
const log_js_1 = require("../log.js");
|
|
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_js_1.div)((0, html_js_1.div)((0, html_js_1.span)(name)), (log = (0, html_js_1.ul)()));
|
|
14
|
-
const logger = { level: log_js_1.LEVEL.INFO, root };
|
|
15
|
-
function append(message) {
|
|
16
|
-
log.appendChild((0, html_js_1.li)((0, html_js_1.pre)((0, html_js_1.code)(message))));
|
|
17
|
-
}
|
|
18
|
-
const logAt = (level) => (message) => level >= (logger.level ?? log_js_1.LEVEL.ERROR)
|
|
19
|
-
? append((0, display_js_1.display)(message))
|
|
20
|
-
: undefined;
|
|
21
|
-
logger.debug = logAt(log_js_1.LEVEL.VERBOSE);
|
|
22
|
-
logger.info = logAt(log_js_1.LEVEL.INFO);
|
|
23
|
-
logger.warn = logAt(log_js_1.LEVEL.WARN);
|
|
24
|
-
logger.error = logAt(log_js_1.LEVEL.ERROR);
|
|
25
|
-
return logger;
|
|
26
|
-
}
|
|
27
|
-
exports.makeHTMLLogger = makeHTMLLogger;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EventHandler } from "../dom/dom.js";
|
|
2
|
-
export declare const Select: import("../dom/fc.js").FCComponentCtor<{
|
|
3
|
-
name: string;
|
|
4
|
-
value: string;
|
|
5
|
-
events: {
|
|
6
|
-
change: EventHandler;
|
|
7
|
-
};
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
options: [
|
|
10
|
-
string,
|
|
11
|
-
string
|
|
12
|
-
][];
|
|
13
|
-
}, {}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Select = void 0;
|
|
4
|
-
const fc_js_1 = require("../dom/fc.js");
|
|
5
|
-
const html_js_1 = require("../dom/html.js");
|
|
6
|
-
exports.Select = (0, fc_js_1.FC)("jiffies-select", (el, { name, events: { change }, disabled, value, options }) => (0, html_js_1.select)({ name, events: { change }, disabled }, ...options.map(([v, name]) => (0, html_js_1.option)({ value: v, selected: value === v }, `${name}`))));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function loadTests(): Promise<void>;
|
|
@@ -1,40 +0,0 @@
|
|
|
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;
|
|
@@ -1,102 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
});
|
package/lib/cjs/context.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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>>;
|
package/lib/cjs/context.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/context.test.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const context_js_1 = require("./context.js");
|
|
4
|
-
const result_js_1 = require("./result.js");
|
|
5
|
-
const describe_js_1 = require("./scope/describe.js");
|
|
6
|
-
const expect_js_1 = require("./scope/expect.js");
|
|
7
|
-
(0, describe_js_1.describe)("Context", () => {
|
|
8
|
-
(0, describe_js_1.it)("performs an operation using a context", () => {
|
|
9
|
-
const context = TestContext();
|
|
10
|
-
const result = (0, context_js_1.using)(context, () => (0, result_js_1.Ok)(5));
|
|
11
|
-
(0, expect_js_1.expect)((0, result_js_1.unwrap)(result)).toBe(5);
|
|
12
|
-
(0, expect_js_1.expect)(context.initialized).toBe(true);
|
|
13
|
-
(0, expect_js_1.expect)(context.completed).toBe(true);
|
|
14
|
-
});
|
|
15
|
-
(0, describe_js_1.it)("reports the result of a thrown error", () => {
|
|
16
|
-
const context = TestContext();
|
|
17
|
-
const result = (0, context_js_1.using)(context, () => {
|
|
18
|
-
throw new Error("Failed");
|
|
19
|
-
});
|
|
20
|
-
(0, expect_js_1.expect)((0, result_js_1.isErr)(result)).toBe(true);
|
|
21
|
-
(0, expect_js_1.expect)((0, result_js_1.Err)(result)).toMatchObject({
|
|
22
|
-
message: "Failed",
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
(0, describe_js_1.it)("passes the context to the operation", () => {
|
|
26
|
-
const op = (0, context_js_1.using)(TestContext, ({ initialized, completed }) => ({
|
|
27
|
-
initialized,
|
|
28
|
-
completed,
|
|
29
|
-
}));
|
|
30
|
-
(0, expect_js_1.expect)((0, result_js_1.isOk)(op)).toBe(true);
|
|
31
|
-
const { completed, initialized } = (0, result_js_1.unwrap)(op);
|
|
32
|
-
(0, expect_js_1.expect)(initialized).toBe(true);
|
|
33
|
-
(0, expect_js_1.expect)(completed).toBe(false);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
function TestContext() {
|
|
37
|
-
const context = {
|
|
38
|
-
[context_js_1.Enter]: () => {
|
|
39
|
-
context.initialized = true;
|
|
40
|
-
},
|
|
41
|
-
[context_js_1.Exit]: () => {
|
|
42
|
-
context.completed = true;
|
|
43
|
-
},
|
|
44
|
-
initialized: false,
|
|
45
|
-
completed: false,
|
|
46
|
-
};
|
|
47
|
-
return context;
|
|
48
|
-
}
|
package/lib/cjs/debounce.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function debounce(fn: (...args: any[]) => any, ms?: number): (...args: Parameters<typeof fn>) => NodeJS.Timeout;
|
package/lib/cjs/debounce.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.debounce = void 0;
|
|
4
|
-
function debounce(fn, ms = 32) {
|
|
5
|
-
let timer;
|
|
6
|
-
return (...args) => {
|
|
7
|
-
clearTimeout(timer);
|
|
8
|
-
timer = setTimeout(() => (clearTimeout(timer), fn(...args)), ms);
|
|
9
|
-
return timer;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
exports.debounce = debounce;
|
package/lib/cjs/diff.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const DiffA: unique symbol;
|
|
2
|
-
export declare const DiffB: unique symbol;
|
|
3
|
-
export declare type DiffIndex = string | number;
|
|
4
|
-
export declare type DiffPrimitive = string | number | boolean | null | undefined;
|
|
5
|
-
interface DiffEntry {
|
|
6
|
-
key: DiffIndex;
|
|
7
|
-
left: DiffPrimitive;
|
|
8
|
-
right: DiffPrimitive;
|
|
9
|
-
}
|
|
10
|
-
interface DiffList {
|
|
11
|
-
key: DiffIndex;
|
|
12
|
-
children: (DiffEntry | DiffList)[];
|
|
13
|
-
}
|
|
14
|
-
export declare function diff<T>(a: Partial<T>, b: Partial<T>): (DiffEntry | DiffList)[];
|
|
15
|
-
export {};
|