yummies 5.4.4 → 5.4.6
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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.github/FUNDING.yml +1 -0
- package/.github/workflows/main.yml +34 -0
- package/.github/workflows/version-or-publish.yml +45 -0
- package/.nvmrc +1 -0
- package/.vscode/settings.json +19 -0
- package/CHANGELOG.md +215 -0
- package/CONTRIBUTING.md +8 -0
- package/Makefile +7 -0
- package/assets/logo.png +0 -0
- package/assets/logo.pxz +0 -0
- package/biome.json +3 -0
- package/commitfmt.toml +18 -0
- package/lefthook.yml +14 -0
- package/package.json +3 -389
- package/scripts/post-build.ts +71 -0
- package/src/async.ts +86 -0
- package/src/common.ts +26 -0
- package/src/complex/counter.test.ts +41 -0
- package/src/complex/counter.ts +40 -0
- package/src/complex/global-config.ts +55 -0
- package/src/complex/index.ts +3 -0
- package/src/complex/modules-factory.ts +65 -0
- package/src/cookie.ts +11 -0
- package/src/css.ts +60 -0
- package/src/data.test.ts +99 -0
- package/src/data.ts +65 -0
- package/src/date-time.test.ts +119 -0
- package/src/date-time.ts +236 -0
- package/src/device.ts +42 -0
- package/src/encodings.ts +270 -0
- package/src/errors.ts +40 -0
- package/src/file.ts +25 -0
- package/src/format/_exports.ts +4 -0
- package/{dist/format/constants.js → src/format/constants.ts} +2 -0
- package/{dist/format/index.js → src/format/index.ts} +2 -1
- package/src/format/number.test.ts +16 -0
- package/src/format/number.ts +96 -0
- package/src/format/percent.ts +40 -0
- package/src/format/skip-spaces.ts +4 -0
- package/src/html.ts +238 -0
- package/{dist/id.js → src/id.ts} +16 -6
- package/src/imports.ts +52 -0
- package/src/math.ts +20 -0
- package/src/media.ts +134 -0
- package/src/mobx/apply-observable.ts +20 -0
- package/src/mobx/create-enhanced-atom.ts +28 -0
- package/src/mobx/deep-observable-struct.test.ts +69 -0
- package/src/mobx/deep-observable-struct.ts +69 -0
- package/src/mobx/get-mobx-administration.ts +10 -0
- package/src/mobx/index.ts +5 -0
- package/src/mobx/lazy-observe.ts +59 -0
- package/src/ms.ts +20 -0
- package/src/number.ts +14 -0
- package/src/parser/_exports.ts +3 -0
- package/{dist/parser/index.js → src/parser/index.ts} +2 -1
- package/src/parser/number.test.ts +38 -0
- package/src/parser/number.ts +73 -0
- package/src/parser/percent.ts +11 -0
- package/src/parser/string.ts +29 -0
- package/src/price.ts +33 -0
- package/src/random.ts +27 -0
- package/src/react/hooks/index.ts +21 -0
- package/src/react/hooks/use-abort-controller.ts +15 -0
- package/src/react/hooks/use-abort-signal.ts +5 -0
- package/src/react/hooks/use-click-outside.ts +27 -0
- package/{dist/react/hooks/use-constant.js → src/react/hooks/use-constant.ts} +9 -6
- package/{dist/react/hooks/use-define-ref.js → src/react/hooks/use-define-ref.ts} +10 -7
- package/src/react/hooks/use-element-ref.ts +11 -0
- package/src/react/hooks/use-event-listener.ts +29 -0
- package/src/react/hooks/use-event.ts +23 -0
- package/src/react/hooks/use-flag.ts +27 -0
- package/src/react/hooks/use-force-update.ts +9 -0
- package/src/react/hooks/use-initial-height.ts +16 -0
- package/{dist/react/hooks/use-instance.js → src/react/hooks/use-instance.ts} +31 -9
- package/src/react/hooks/use-intersection-observer.ts +18 -0
- package/src/react/hooks/use-last-defined-value.ts +9 -0
- package/src/react/hooks/use-last-value-ref.ts +11 -0
- package/src/react/hooks/use-life-cycle.ts +17 -0
- package/src/react/hooks/use-resize-observer.ts +14 -0
- package/src/react/hooks/use-sync-ref.ts +7 -0
- package/src/react/hooks/use-toggle.ts +9 -0
- package/src/react/hooks/use-value.ts +10 -0
- package/src/react/hooks/use-visibility-state.ts +19 -0
- package/src/react/index.ts +1 -0
- package/src/sound.ts +15 -0
- package/src/storage.ts +137 -0
- package/src/text.test.ts +91 -0
- package/src/text.ts +60 -0
- package/src/type-guard/_exports.ts +154 -0
- package/src/type-guard/index.test.ts +127 -0
- package/{dist/type-guard/index.js → src/type-guard/index.ts} +2 -1
- package/src/vibrate.ts +8 -0
- package/tsconfig.json +26 -0
- package/tsconfig.test.json +33 -0
- package/vitest.config.ts +20 -0
- package/dist/async.cjs +0 -70
- package/dist/async.d.cts +0 -28
- package/dist/async.d.cts.map +0 -1
- package/dist/async.d.ts +0 -28
- package/dist/async.d.ts.map +0 -1
- package/dist/async.js +0 -62
- package/dist/common.cjs +0 -18
- package/dist/common.d.cts +0 -15
- package/dist/common.d.cts.map +0 -1
- package/dist/common.d.ts +0 -15
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js +0 -14
- package/dist/complex/counter.cjs +0 -21
- package/dist/complex/counter.d.cts +0 -15
- package/dist/complex/counter.d.cts.map +0 -1
- package/dist/complex/counter.d.ts +0 -15
- package/dist/complex/counter.d.ts.map +0 -1
- package/dist/complex/counter.js +0 -17
- package/dist/complex/global-config.cjs +0 -46
- package/dist/complex/global-config.d.cts +0 -11
- package/dist/complex/global-config.d.cts.map +0 -1
- package/dist/complex/global-config.d.ts +0 -11
- package/dist/complex/global-config.d.ts.map +0 -1
- package/dist/complex/global-config.js +0 -41
- package/dist/complex/index.cjs +0 -19
- package/dist/complex/index.d.cts +0 -4
- package/dist/complex/index.d.cts.map +0 -1
- package/dist/complex/index.d.ts +0 -4
- package/dist/complex/index.d.ts.map +0 -1
- package/dist/complex/index.js +0 -3
- package/dist/complex/modules-factory.cjs +0 -50
- package/dist/complex/modules-factory.d.cts +0 -49
- package/dist/complex/modules-factory.d.cts.map +0 -1
- package/dist/complex/modules-factory.d.ts +0 -49
- package/dist/complex/modules-factory.d.ts.map +0 -1
- package/dist/complex/modules-factory.js +0 -46
- package/dist/cookie.cjs +0 -13
- package/dist/cookie.d.cts +0 -3
- package/dist/cookie.d.cts.map +0 -1
- package/dist/cookie.d.ts +0 -3
- package/dist/cookie.d.ts.map +0 -1
- package/dist/cookie.js +0 -9
- package/dist/css.cjs +0 -28
- package/dist/css.d.cts +0 -36
- package/dist/css.d.cts.map +0 -1
- package/dist/css.d.ts +0 -36
- package/dist/css.d.ts.map +0 -1
- package/dist/css.js +0 -20
- package/dist/data.cjs +0 -58
- package/dist/data.d.cts +0 -4
- package/dist/data.d.cts.map +0 -1
- package/dist/data.d.ts +0 -4
- package/dist/data.d.ts.map +0 -1
- package/dist/data.js +0 -52
- package/dist/date-time.cjs +0 -171
- package/dist/date-time.d.cts +0 -28
- package/dist/date-time.d.cts.map +0 -1
- package/dist/date-time.d.ts +0 -28
- package/dist/date-time.d.ts.map +0 -1
- package/dist/date-time.js +0 -160
- package/dist/device.cjs +0 -28
- package/dist/device.d.cts +0 -8
- package/dist/device.d.cts.map +0 -1
- package/dist/device.d.ts +0 -8
- package/dist/device.d.ts.map +0 -1
- package/dist/device.js +0 -21
- package/dist/encodings.cjs +0 -270
- package/dist/encodings.d.cts +0 -2
- package/dist/encodings.d.cts.map +0 -1
- package/dist/encodings.d.ts +0 -2
- package/dist/encodings.d.ts.map +0 -1
- package/dist/encodings.js +0 -267
- package/dist/errors.cjs +0 -34
- package/dist/errors.d.cts +0 -19
- package/dist/errors.d.cts.map +0 -1
- package/dist/errors.d.ts +0 -19
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -30
- package/dist/file.cjs +0 -29
- package/dist/file.d.cts +0 -3
- package/dist/file.d.cts.map +0 -1
- package/dist/file.d.ts +0 -3
- package/dist/file.d.ts.map +0 -1
- package/dist/file.js +0 -24
- package/dist/format/_exports.cjs +0 -20
- package/dist/format/_exports.d.cts +0 -5
- package/dist/format/_exports.d.cts.map +0 -1
- package/dist/format/_exports.d.ts +0 -5
- package/dist/format/_exports.d.ts.map +0 -1
- package/dist/format/_exports.js +0 -4
- package/dist/format/constants.cjs +0 -6
- package/dist/format/constants.d.cts +0 -4
- package/dist/format/constants.d.cts.map +0 -1
- package/dist/format/constants.d.ts +0 -4
- package/dist/format/constants.d.ts.map +0 -1
- package/dist/format/index.cjs +0 -40
- package/dist/format/index.d.cts +0 -3
- package/dist/format/index.d.cts.map +0 -1
- package/dist/format/index.d.ts +0 -3
- package/dist/format/index.d.ts.map +0 -1
- package/dist/format/number.cjs +0 -48
- package/dist/format/number.d.cts +0 -36
- package/dist/format/number.d.cts.map +0 -1
- package/dist/format/number.d.ts +0 -36
- package/dist/format/number.d.ts.map +0 -1
- package/dist/format/number.js +0 -44
- package/dist/format/percent.cjs +0 -27
- package/dist/format/percent.d.cts +0 -15
- package/dist/format/percent.d.cts.map +0 -1
- package/dist/format/percent.d.ts +0 -15
- package/dist/format/percent.d.ts.map +0 -1
- package/dist/format/percent.js +0 -23
- package/dist/format/skip-spaces.cjs +0 -8
- package/dist/format/skip-spaces.d.cts +0 -5
- package/dist/format/skip-spaces.d.cts.map +0 -1
- package/dist/format/skip-spaces.d.ts +0 -5
- package/dist/format/skip-spaces.d.ts.map +0 -1
- package/dist/format/skip-spaces.js +0 -4
- package/dist/html.cjs +0 -202
- package/dist/html.d.cts +0 -44
- package/dist/html.d.cts.map +0 -1
- package/dist/html.d.ts +0 -44
- package/dist/html.d.ts.map +0 -1
- package/dist/html.js +0 -182
- package/dist/id.cjs +0 -76
- package/dist/id.d.cts +0 -63
- package/dist/id.d.cts.map +0 -1
- package/dist/id.d.ts +0 -63
- package/dist/id.d.ts.map +0 -1
- package/dist/imports.cjs +0 -45
- package/dist/imports.d.cts +0 -15
- package/dist/imports.d.cts.map +0 -1
- package/dist/imports.d.ts +0 -15
- package/dist/imports.d.ts.map +0 -1
- package/dist/imports.js +0 -40
- package/dist/math.cjs +0 -23
- package/dist/math.d.cts +0 -13
- package/dist/math.d.cts.map +0 -1
- package/dist/math.d.ts +0 -13
- package/dist/math.d.ts.map +0 -1
- package/dist/math.js +0 -17
- package/dist/media.cjs +0 -115
- package/dist/media.d.cts +0 -20
- package/dist/media.d.cts.map +0 -1
- package/dist/media.d.ts +0 -20
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js +0 -103
- package/dist/mobx/apply-observable.cjs +0 -16
- package/dist/mobx/apply-observable.d.cts +0 -4
- package/dist/mobx/apply-observable.d.cts.map +0 -1
- package/dist/mobx/apply-observable.d.ts +0 -4
- package/dist/mobx/apply-observable.d.ts.map +0 -1
- package/dist/mobx/apply-observable.js +0 -12
- package/dist/mobx/create-enhanced-atom.cjs +0 -16
- package/dist/mobx/create-enhanced-atom.d.cts +0 -11
- package/dist/mobx/create-enhanced-atom.d.cts.map +0 -1
- package/dist/mobx/create-enhanced-atom.d.ts +0 -11
- package/dist/mobx/create-enhanced-atom.d.ts.map +0 -1
- package/dist/mobx/create-enhanced-atom.js +0 -12
- package/dist/mobx/deep-observable-struct.cjs +0 -61
- package/dist/mobx/deep-observable-struct.d.cts +0 -7
- package/dist/mobx/deep-observable-struct.d.cts.map +0 -1
- package/dist/mobx/deep-observable-struct.d.ts +0 -7
- package/dist/mobx/deep-observable-struct.d.ts.map +0 -1
- package/dist/mobx/deep-observable-struct.js +0 -57
- package/dist/mobx/get-mobx-administration.cjs +0 -6
- package/dist/mobx/get-mobx-administration.d.cts +0 -6
- package/dist/mobx/get-mobx-administration.d.cts.map +0 -1
- package/dist/mobx/get-mobx-administration.d.ts +0 -6
- package/dist/mobx/get-mobx-administration.d.ts.map +0 -1
- package/dist/mobx/get-mobx-administration.js +0 -2
- package/dist/mobx/index.cjs +0 -21
- package/dist/mobx/index.d.cts +0 -6
- package/dist/mobx/index.d.cts.map +0 -1
- package/dist/mobx/index.d.ts +0 -6
- package/dist/mobx/index.d.ts.map +0 -1
- package/dist/mobx/index.js +0 -5
- package/dist/mobx/lazy-observe.cjs +0 -47
- package/dist/mobx/lazy-observe.d.cts +0 -8
- package/dist/mobx/lazy-observe.d.cts.map +0 -1
- package/dist/mobx/lazy-observe.d.ts +0 -8
- package/dist/mobx/lazy-observe.d.ts.map +0 -1
- package/dist/mobx/lazy-observe.js +0 -43
- package/dist/ms.cjs +0 -22
- package/dist/ms.d.cts +0 -19
- package/dist/ms.d.cts.map +0 -1
- package/dist/ms.d.ts +0 -19
- package/dist/ms.d.ts.map +0 -1
- package/dist/ms.js +0 -18
- package/dist/number.cjs +0 -16
- package/dist/number.d.cts +0 -8
- package/dist/number.d.cts.map +0 -1
- package/dist/number.d.ts +0 -8
- package/dist/number.d.ts.map +0 -1
- package/dist/number.js +0 -13
- package/dist/parser/_exports.cjs +0 -19
- package/dist/parser/_exports.d.cts +0 -4
- package/dist/parser/_exports.d.cts.map +0 -1
- package/dist/parser/_exports.d.ts +0 -4
- package/dist/parser/_exports.d.ts.map +0 -1
- package/dist/parser/_exports.js +0 -3
- package/dist/parser/index.cjs +0 -40
- package/dist/parser/index.d.cts +0 -3
- package/dist/parser/index.d.cts.map +0 -1
- package/dist/parser/index.d.ts +0 -3
- package/dist/parser/index.d.ts.map +0 -1
- package/dist/parser/number.cjs +0 -48
- package/dist/parser/number.d.cts +0 -21
- package/dist/parser/number.d.cts.map +0 -1
- package/dist/parser/number.d.ts +0 -21
- package/dist/parser/number.d.ts.map +0 -1
- package/dist/parser/number.js +0 -44
- package/dist/parser/percent.cjs +0 -8
- package/dist/parser/percent.d.cts +0 -4
- package/dist/parser/percent.d.cts.map +0 -1
- package/dist/parser/percent.d.ts +0 -4
- package/dist/parser/percent.d.ts.map +0 -1
- package/dist/parser/percent.js +0 -4
- package/dist/parser/string.cjs +0 -18
- package/dist/parser/string.d.cts +0 -7
- package/dist/parser/string.d.cts.map +0 -1
- package/dist/parser/string.d.ts +0 -7
- package/dist/parser/string.d.ts.map +0 -1
- package/dist/parser/string.js +0 -14
- package/dist/price.cjs +0 -21
- package/dist/price.d.cts +0 -6
- package/dist/price.d.cts.map +0 -1
- package/dist/price.d.ts +0 -6
- package/dist/price.d.ts.map +0 -1
- package/dist/price.js +0 -17
- package/dist/random.cjs +0 -25
- package/dist/random.d.cts +0 -9
- package/dist/random.d.cts.map +0 -1
- package/dist/random.d.ts +0 -9
- package/dist/random.d.ts.map +0 -1
- package/dist/random.js +0 -14
- package/dist/react/hooks/index.cjs +0 -37
- package/dist/react/hooks/index.d.cts +0 -22
- package/dist/react/hooks/index.d.cts.map +0 -1
- package/dist/react/hooks/index.d.ts +0 -22
- package/dist/react/hooks/index.d.ts.map +0 -1
- package/dist/react/hooks/index.js +0 -21
- package/dist/react/hooks/use-abort-controller.cjs +0 -15
- package/dist/react/hooks/use-abort-controller.d.cts +0 -2
- package/dist/react/hooks/use-abort-controller.d.cts.map +0 -1
- package/dist/react/hooks/use-abort-controller.d.ts +0 -2
- package/dist/react/hooks/use-abort-controller.d.ts.map +0 -1
- package/dist/react/hooks/use-abort-controller.js +0 -11
- package/dist/react/hooks/use-abort-signal.cjs +0 -8
- package/dist/react/hooks/use-abort-signal.d.cts +0 -2
- package/dist/react/hooks/use-abort-signal.d.cts.map +0 -1
- package/dist/react/hooks/use-abort-signal.d.ts +0 -2
- package/dist/react/hooks/use-abort-signal.d.ts.map +0 -1
- package/dist/react/hooks/use-abort-signal.js +0 -4
- package/dist/react/hooks/use-click-outside.cjs +0 -17
- package/dist/react/hooks/use-click-outside.d.cts +0 -9
- package/dist/react/hooks/use-click-outside.d.cts.map +0 -1
- package/dist/react/hooks/use-click-outside.d.ts +0 -9
- package/dist/react/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/react/hooks/use-click-outside.js +0 -13
- package/dist/react/hooks/use-constant.cjs +0 -19
- package/dist/react/hooks/use-constant.d.cts +0 -9
- package/dist/react/hooks/use-constant.d.cts.map +0 -1
- package/dist/react/hooks/use-constant.d.ts +0 -9
- package/dist/react/hooks/use-constant.d.ts.map +0 -1
- package/dist/react/hooks/use-define-ref.cjs +0 -19
- package/dist/react/hooks/use-define-ref.d.cts +0 -10
- package/dist/react/hooks/use-define-ref.d.cts.map +0 -1
- package/dist/react/hooks/use-define-ref.d.ts +0 -10
- package/dist/react/hooks/use-define-ref.d.ts.map +0 -1
- package/dist/react/hooks/use-element-ref.cjs +0 -12
- package/dist/react/hooks/use-element-ref.d.cts +0 -2
- package/dist/react/hooks/use-element-ref.d.cts.map +0 -1
- package/dist/react/hooks/use-element-ref.d.ts +0 -2
- package/dist/react/hooks/use-element-ref.d.ts.map +0 -1
- package/dist/react/hooks/use-element-ref.js +0 -8
- package/dist/react/hooks/use-event-listener.cjs +0 -17
- package/dist/react/hooks/use-event-listener.d.cts +0 -8
- package/dist/react/hooks/use-event-listener.d.cts.map +0 -1
- package/dist/react/hooks/use-event-listener.d.ts +0 -8
- package/dist/react/hooks/use-event-listener.d.ts.map +0 -1
- package/dist/react/hooks/use-event-listener.js +0 -13
- package/dist/react/hooks/use-event.cjs +0 -23
- package/dist/react/hooks/use-event.d.cts +0 -3
- package/dist/react/hooks/use-event.d.cts.map +0 -1
- package/dist/react/hooks/use-event.d.ts +0 -3
- package/dist/react/hooks/use-event.d.ts.map +0 -1
- package/dist/react/hooks/use-event.js +0 -19
- package/dist/react/hooks/use-flag.cjs +0 -19
- package/dist/react/hooks/use-flag.d.cts +0 -8
- package/dist/react/hooks/use-flag.d.cts.map +0 -1
- package/dist/react/hooks/use-flag.d.ts +0 -8
- package/dist/react/hooks/use-flag.d.ts.map +0 -1
- package/dist/react/hooks/use-flag.js +0 -15
- package/dist/react/hooks/use-force-update.cjs +0 -11
- package/dist/react/hooks/use-force-update.d.cts +0 -2
- package/dist/react/hooks/use-force-update.d.cts.map +0 -1
- package/dist/react/hooks/use-force-update.d.ts +0 -2
- package/dist/react/hooks/use-force-update.d.ts.map +0 -1
- package/dist/react/hooks/use-force-update.js +0 -7
- package/dist/react/hooks/use-initial-height.cjs +0 -15
- package/dist/react/hooks/use-initial-height.d.cts +0 -5
- package/dist/react/hooks/use-initial-height.d.cts.map +0 -1
- package/dist/react/hooks/use-initial-height.d.ts +0 -5
- package/dist/react/hooks/use-initial-height.d.ts.map +0 -1
- package/dist/react/hooks/use-initial-height.js +0 -11
- package/dist/react/hooks/use-instance.cjs +0 -31
- package/dist/react/hooks/use-instance.d.cts +0 -27
- package/dist/react/hooks/use-instance.d.cts.map +0 -1
- package/dist/react/hooks/use-instance.d.ts +0 -27
- package/dist/react/hooks/use-instance.d.ts.map +0 -1
- package/dist/react/hooks/use-intersection-observer.cjs +0 -14
- package/dist/react/hooks/use-intersection-observer.d.cts +0 -2
- package/dist/react/hooks/use-intersection-observer.d.cts.map +0 -1
- package/dist/react/hooks/use-intersection-observer.d.ts +0 -2
- package/dist/react/hooks/use-intersection-observer.d.ts.map +0 -1
- package/dist/react/hooks/use-intersection-observer.js +0 -10
- package/dist/react/hooks/use-last-defined-value.cjs +0 -12
- package/dist/react/hooks/use-last-defined-value.d.cts +0 -2
- package/dist/react/hooks/use-last-defined-value.d.cts.map +0 -1
- package/dist/react/hooks/use-last-defined-value.d.ts +0 -2
- package/dist/react/hooks/use-last-defined-value.d.ts.map +0 -1
- package/dist/react/hooks/use-last-defined-value.js +0 -8
- package/dist/react/hooks/use-last-value-ref.cjs +0 -12
- package/dist/react/hooks/use-last-value-ref.d.cts +0 -2
- package/dist/react/hooks/use-last-value-ref.d.cts.map +0 -1
- package/dist/react/hooks/use-last-value-ref.d.ts +0 -2
- package/dist/react/hooks/use-last-value-ref.d.ts.map +0 -1
- package/dist/react/hooks/use-last-value-ref.js +0 -8
- package/dist/react/hooks/use-life-cycle.cjs +0 -14
- package/dist/react/hooks/use-life-cycle.d.cts +0 -5
- package/dist/react/hooks/use-life-cycle.d.cts.map +0 -1
- package/dist/react/hooks/use-life-cycle.d.ts +0 -5
- package/dist/react/hooks/use-life-cycle.d.ts.map +0 -1
- package/dist/react/hooks/use-life-cycle.js +0 -10
- package/dist/react/hooks/use-resize-observer.cjs +0 -15
- package/dist/react/hooks/use-resize-observer.d.cts +0 -2
- package/dist/react/hooks/use-resize-observer.d.cts.map +0 -1
- package/dist/react/hooks/use-resize-observer.d.ts +0 -2
- package/dist/react/hooks/use-resize-observer.d.ts.map +0 -1
- package/dist/react/hooks/use-resize-observer.js +0 -11
- package/dist/react/hooks/use-sync-ref.cjs +0 -10
- package/dist/react/hooks/use-sync-ref.d.cts +0 -2
- package/dist/react/hooks/use-sync-ref.d.cts.map +0 -1
- package/dist/react/hooks/use-sync-ref.d.ts +0 -2
- package/dist/react/hooks/use-sync-ref.d.ts.map +0 -1
- package/dist/react/hooks/use-sync-ref.js +0 -6
- package/dist/react/hooks/use-toggle.cjs +0 -10
- package/dist/react/hooks/use-toggle.d.cts +0 -2
- package/dist/react/hooks/use-toggle.d.cts.map +0 -1
- package/dist/react/hooks/use-toggle.d.ts +0 -2
- package/dist/react/hooks/use-toggle.d.ts.map +0 -1
- package/dist/react/hooks/use-toggle.js +0 -6
- package/dist/react/hooks/use-value.cjs +0 -12
- package/dist/react/hooks/use-value.d.cts +0 -5
- package/dist/react/hooks/use-value.d.cts.map +0 -1
- package/dist/react/hooks/use-value.d.ts +0 -5
- package/dist/react/hooks/use-value.d.ts.map +0 -1
- package/dist/react/hooks/use-value.js +0 -8
- package/dist/react/hooks/use-visibility-state.cjs +0 -18
- package/dist/react/hooks/use-visibility-state.d.cts +0 -2
- package/dist/react/hooks/use-visibility-state.d.cts.map +0 -1
- package/dist/react/hooks/use-visibility-state.d.ts +0 -2
- package/dist/react/hooks/use-visibility-state.d.ts.map +0 -1
- package/dist/react/hooks/use-visibility-state.js +0 -14
- package/dist/react/index.cjs +0 -17
- package/dist/react/index.d.cts +0 -2
- package/dist/react/index.d.cts.map +0 -1
- package/dist/react/index.d.ts +0 -2
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -1
- package/dist/sound.cjs +0 -16
- package/dist/sound.d.cts +0 -7
- package/dist/sound.d.cts.map +0 -1
- package/dist/sound.d.ts +0 -7
- package/dist/sound.d.ts.map +0 -1
- package/dist/sound.js +0 -12
- package/dist/storage.cjs +0 -48
- package/dist/storage.d.cts +0 -39
- package/dist/storage.d.cts.map +0 -1
- package/dist/storage.d.ts +0 -39
- package/dist/storage.d.ts.map +0 -1
- package/dist/storage.js +0 -43
- package/dist/text.cjs +0 -53
- package/dist/text.d.cts +0 -15
- package/dist/text.d.cts.map +0 -1
- package/dist/text.d.ts +0 -15
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js +0 -48
- package/dist/type-guard/_exports.cjs +0 -129
- package/dist/type-guard/_exports.d.cts +0 -86
- package/dist/type-guard/_exports.d.cts.map +0 -1
- package/dist/type-guard/_exports.d.ts +0 -86
- package/dist/type-guard/_exports.d.ts.map +0 -1
- package/dist/type-guard/_exports.js +0 -125
- package/dist/type-guard/index.cjs +0 -40
- package/dist/type-guard/index.d.cts +0 -3
- package/dist/type-guard/index.d.cts.map +0 -1
- package/dist/type-guard/index.d.ts +0 -3
- package/dist/type-guard/index.d.ts.map +0 -1
- package/dist/utils/types.cjs +0 -2
- package/dist/utils/types.d.cts +0 -395
- package/dist/utils/types.d.cts.map +0 -1
- package/dist/utils/types.d.ts +0 -395
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js +0 -1
- package/dist/vibrate.cjs +0 -12
- package/dist/vibrate.d.cts +0 -5
- package/dist/vibrate.d.cts.map +0 -1
- package/dist/vibrate.d.ts +0 -5
- package/dist/vibrate.d.ts.map +0 -1
- package/dist/vibrate.js +0 -8
- package/utility-types.d.ts +0 -395
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeepObservableStruct = void 0;
|
|
4
|
-
const mobx_1 = require("mobx");
|
|
5
|
-
const index_js_1 = require("../type-guard/index.cjs");
|
|
6
|
-
class DeepObservableStruct {
|
|
7
|
-
data;
|
|
8
|
-
constructor(data) {
|
|
9
|
-
this.data = data;
|
|
10
|
-
(0, mobx_1.makeObservable)(this, {
|
|
11
|
-
data: mobx_1.observable.deep,
|
|
12
|
-
set: mobx_1.action,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
set(newData) {
|
|
16
|
-
const stack = Object.keys(this.data).map((key) => [
|
|
17
|
-
key,
|
|
18
|
-
this.data,
|
|
19
|
-
newData,
|
|
20
|
-
]);
|
|
21
|
-
let currentIndex = 0;
|
|
22
|
-
let stackLength = stack.length;
|
|
23
|
-
while (currentIndex < stackLength) {
|
|
24
|
-
const [key, currObservableData, newData] = stack[currentIndex];
|
|
25
|
-
const newValue = newData[key];
|
|
26
|
-
const currValue = currObservableData[key];
|
|
27
|
-
currentIndex++;
|
|
28
|
-
if (key in newData) {
|
|
29
|
-
if (index_js_1.typeGuard.isObject(newValue) && index_js_1.typeGuard.isObject(currValue)) {
|
|
30
|
-
const newValueKeys = Object.keys(newValue);
|
|
31
|
-
Object.keys(currValue).forEach((childKey) => {
|
|
32
|
-
if (!(childKey in newValue)) {
|
|
33
|
-
delete currObservableData[key][childKey];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
newValueKeys.forEach((childKey) => {
|
|
37
|
-
const length = stack.push([
|
|
38
|
-
childKey,
|
|
39
|
-
currObservableData[key],
|
|
40
|
-
newValue,
|
|
41
|
-
]);
|
|
42
|
-
stackLength = length;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
else if (newValue !== currValue) {
|
|
46
|
-
currObservableData[key] = newValue;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
delete currObservableData[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
Object.keys(newData).forEach((newDataKey) => {
|
|
54
|
-
if (!this.data[newDataKey]) {
|
|
55
|
-
// @ts-expect-error
|
|
56
|
-
this.data[newDataKey] = newData[newDataKey];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.DeepObservableStruct = DeepObservableStruct;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep-observable-struct.d.ts","sourceRoot":"","sources":["../../src/mobx/deep-observable-struct.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,2BAA0B;AAEnD,qBAAa,oBAAoB,CAAC,KAAK,SAAS,SAAS;IACvD,IAAI,EAAE,KAAK,CAAC;gBAEA,IAAI,EAAE,KAAK;IASvB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;CAoD5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deep-observable-struct.d.ts","sourceRoot":"","sources":["../../src/mobx/deep-observable-struct.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAA0B;AAEnD,qBAAa,oBAAoB,CAAC,KAAK,SAAS,SAAS;IACvD,IAAI,EAAE,KAAK,CAAC;gBAEA,IAAI,EAAE,KAAK;IASvB,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;CAoD5B"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { action, makeObservable, observable } from 'mobx';
|
|
2
|
-
import { typeGuard } from "../type-guard/index.js";
|
|
3
|
-
export class DeepObservableStruct {
|
|
4
|
-
data;
|
|
5
|
-
constructor(data) {
|
|
6
|
-
this.data = data;
|
|
7
|
-
makeObservable(this, {
|
|
8
|
-
data: observable.deep,
|
|
9
|
-
set: action,
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
set(newData) {
|
|
13
|
-
const stack = Object.keys(this.data).map((key) => [
|
|
14
|
-
key,
|
|
15
|
-
this.data,
|
|
16
|
-
newData,
|
|
17
|
-
]);
|
|
18
|
-
let currentIndex = 0;
|
|
19
|
-
let stackLength = stack.length;
|
|
20
|
-
while (currentIndex < stackLength) {
|
|
21
|
-
const [key, currObservableData, newData] = stack[currentIndex];
|
|
22
|
-
const newValue = newData[key];
|
|
23
|
-
const currValue = currObservableData[key];
|
|
24
|
-
currentIndex++;
|
|
25
|
-
if (key in newData) {
|
|
26
|
-
if (typeGuard.isObject(newValue) && typeGuard.isObject(currValue)) {
|
|
27
|
-
const newValueKeys = Object.keys(newValue);
|
|
28
|
-
Object.keys(currValue).forEach((childKey) => {
|
|
29
|
-
if (!(childKey in newValue)) {
|
|
30
|
-
delete currObservableData[key][childKey];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
newValueKeys.forEach((childKey) => {
|
|
34
|
-
const length = stack.push([
|
|
35
|
-
childKey,
|
|
36
|
-
currObservableData[key],
|
|
37
|
-
newValue,
|
|
38
|
-
]);
|
|
39
|
-
stackLength = length;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
else if (newValue !== currValue) {
|
|
43
|
-
currObservableData[key] = newValue;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
delete currObservableData[key];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
Object.keys(newData).forEach((newDataKey) => {
|
|
51
|
-
if (!this.data[newDataKey]) {
|
|
52
|
-
// @ts-expect-error
|
|
53
|
-
this.data[newDataKey] = newData[newDataKey];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMobxAdministration = void 0;
|
|
4
|
-
const mobx_1 = require("mobx");
|
|
5
|
-
const getMobxAdministration = (context) => context[mobx_1.$mobx];
|
|
6
|
-
exports.getMobxAdministration = getMobxAdministration;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type AnnotationMapEntry } from 'mobx';
|
|
2
|
-
import type { AnyObject } from "../utils/types.cjs";
|
|
3
|
-
type ObservableObjectAdministration = Parameters<Exclude<AnnotationMapEntry, boolean>['make_']>[0];
|
|
4
|
-
export declare const getMobxAdministration: (context: AnyObject) => ObservableObjectAdministration;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=get-mobx-administration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-mobx-administration.d.ts","sourceRoot":"","sources":["../../src/mobx/get-mobx-administration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,2BAA0B;AAEnD,KAAK,8BAA8B,GAAG,UAAU,CAC9C,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAC9C,CAAC,CAAC,CAAC,CAAC;AAEL,eAAO,MAAM,qBAAqB,GAChC,SAAS,SAAS,KACjB,8BAAgD,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type AnnotationMapEntry } from 'mobx';
|
|
2
|
-
import type { AnyObject } from "../utils/types.js";
|
|
3
|
-
type ObservableObjectAdministration = Parameters<Exclude<AnnotationMapEntry, boolean>['make_']>[0];
|
|
4
|
-
export declare const getMobxAdministration: (context: AnyObject) => ObservableObjectAdministration;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=get-mobx-administration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-mobx-administration.d.ts","sourceRoot":"","sources":["../../src/mobx/get-mobx-administration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAA0B;AAEnD,KAAK,8BAA8B,GAAG,UAAU,CAC9C,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAC9C,CAAC,CAAC,CAAC,CAAC;AAEL,eAAO,MAAM,qBAAqB,GAChC,SAAS,SAAS,KACjB,8BAAgD,CAAC"}
|
package/dist/mobx/index.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./apply-observable.cjs"), exports);
|
|
18
|
-
__exportStar(require("./create-enhanced-atom.cjs"), exports);
|
|
19
|
-
__exportStar(require("./deep-observable-struct.cjs"), exports);
|
|
20
|
-
__exportStar(require("./get-mobx-administration.cjs"), exports);
|
|
21
|
-
__exportStar(require("./lazy-observe.cjs"), exports);
|
package/dist/mobx/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mobx/index.ts"],"names":[],"mappings":"AAAA,uCAAsC;AACtC,2CAA0C;AAC1C,6CAA4C;AAC5C,8CAA6C;AAC7C,mCAAkC"}
|
package/dist/mobx/index.d.ts
DELETED
package/dist/mobx/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mobx/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0CAA0C;AAC1C,4CAA4C;AAC5C,6CAA6C;AAC7C,kCAAkC"}
|
package/dist/mobx/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lazyObserve = void 0;
|
|
4
|
-
const mobx_1 = require("mobx");
|
|
5
|
-
const lazyObserve = ({ context, property, onStart, onEnd, endDelay = 0, }) => {
|
|
6
|
-
let timeoutId;
|
|
7
|
-
let metaData;
|
|
8
|
-
const properties = Array.isArray(property) ? property : [property];
|
|
9
|
-
let isObserving = false;
|
|
10
|
-
const start = () => {
|
|
11
|
-
if (isObserving) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
isObserving = true;
|
|
15
|
-
if (timeoutId) {
|
|
16
|
-
clearTimeout(timeoutId);
|
|
17
|
-
timeoutId = undefined;
|
|
18
|
-
}
|
|
19
|
-
metaData = onStart();
|
|
20
|
-
};
|
|
21
|
-
const cleanup = () => {
|
|
22
|
-
if (!isObserving) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (timeoutId) {
|
|
26
|
-
clearTimeout(timeoutId);
|
|
27
|
-
timeoutId = undefined;
|
|
28
|
-
}
|
|
29
|
-
timeoutId = setTimeout(() => {
|
|
30
|
-
onEnd(metaData, cleanup);
|
|
31
|
-
timeoutId = undefined;
|
|
32
|
-
metaData = undefined;
|
|
33
|
-
}, endDelay);
|
|
34
|
-
};
|
|
35
|
-
properties.forEach((property) => {
|
|
36
|
-
if (context) {
|
|
37
|
-
(0, mobx_1.onBecomeObserved)(context, property, start);
|
|
38
|
-
(0, mobx_1.onBecomeUnobserved)(context, property, cleanup);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
(0, mobx_1.onBecomeObserved)(property, start);
|
|
42
|
-
(0, mobx_1.onBecomeUnobserved)(property, cleanup);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return cleanup;
|
|
46
|
-
};
|
|
47
|
-
exports.lazyObserve = lazyObserve;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const lazyObserve: <TMetaData = void>({ context, property, onStart, onEnd, endDelay, }: {
|
|
2
|
-
context?: any;
|
|
3
|
-
property: any | any[];
|
|
4
|
-
onStart: () => TMetaData;
|
|
5
|
-
onEnd: (metaData: TMetaData, cleanupFn: VoidFunction) => void;
|
|
6
|
-
endDelay?: number;
|
|
7
|
-
}) => () => void;
|
|
8
|
-
//# sourceMappingURL=lazy-observe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-observe.d.ts","sourceRoot":"","sources":["../../src/mobx/lazy-observe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,SAAS,GAAG,IAAI,EAAE,kDAM3C;IACD,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,SAAS,CAAC;IACzB,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,eA4CA,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const lazyObserve: <TMetaData = void>({ context, property, onStart, onEnd, endDelay, }: {
|
|
2
|
-
context?: any;
|
|
3
|
-
property: any | any[];
|
|
4
|
-
onStart: () => TMetaData;
|
|
5
|
-
onEnd: (metaData: TMetaData, cleanupFn: VoidFunction) => void;
|
|
6
|
-
endDelay?: number;
|
|
7
|
-
}) => () => void;
|
|
8
|
-
//# sourceMappingURL=lazy-observe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-observe.d.ts","sourceRoot":"","sources":["../../src/mobx/lazy-observe.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,SAAS,GAAG,IAAI,EAAE,kDAM3C;IACD,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,SAAS,CAAC;IACzB,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,eA4CA,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { onBecomeObserved, onBecomeUnobserved } from 'mobx';
|
|
2
|
-
export const lazyObserve = ({ context, property, onStart, onEnd, endDelay = 0, }) => {
|
|
3
|
-
let timeoutId;
|
|
4
|
-
let metaData;
|
|
5
|
-
const properties = Array.isArray(property) ? property : [property];
|
|
6
|
-
let isObserving = false;
|
|
7
|
-
const start = () => {
|
|
8
|
-
if (isObserving) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
isObserving = true;
|
|
12
|
-
if (timeoutId) {
|
|
13
|
-
clearTimeout(timeoutId);
|
|
14
|
-
timeoutId = undefined;
|
|
15
|
-
}
|
|
16
|
-
metaData = onStart();
|
|
17
|
-
};
|
|
18
|
-
const cleanup = () => {
|
|
19
|
-
if (!isObserving) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (timeoutId) {
|
|
23
|
-
clearTimeout(timeoutId);
|
|
24
|
-
timeoutId = undefined;
|
|
25
|
-
}
|
|
26
|
-
timeoutId = setTimeout(() => {
|
|
27
|
-
onEnd(metaData, cleanup);
|
|
28
|
-
timeoutId = undefined;
|
|
29
|
-
metaData = undefined;
|
|
30
|
-
}, endDelay);
|
|
31
|
-
};
|
|
32
|
-
properties.forEach((property) => {
|
|
33
|
-
if (context) {
|
|
34
|
-
onBecomeObserved(context, property, start);
|
|
35
|
-
onBecomeUnobserved(context, property, cleanup);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
onBecomeObserved(property, start);
|
|
39
|
-
onBecomeUnobserved(property, cleanup);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
return cleanup;
|
|
43
|
-
};
|
package/dist/ms.cjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ms = exports.unitsToMs = void 0;
|
|
4
|
-
exports.unitsToMs = {
|
|
5
|
-
ms: 1,
|
|
6
|
-
sec: 1000,
|
|
7
|
-
min: 1000 * 60,
|
|
8
|
-
hour: 1000 * 60 * 60,
|
|
9
|
-
day: 1000 * 60 * 60 * 24,
|
|
10
|
-
week: 1000 * 60 * 60 * 24 * 7,
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Переводит значение в юнитах в миллисекунды
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* ms(1, 'min') // 60_000
|
|
18
|
-
* ms(30, 'sec') // 30_000
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
const ms = (value, unit = 'ms') => value * exports.unitsToMs[unit];
|
|
22
|
-
exports.ms = ms;
|
package/dist/ms.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const unitsToMs: {
|
|
2
|
-
readonly ms: 1;
|
|
3
|
-
readonly sec: 1000;
|
|
4
|
-
readonly min: number;
|
|
5
|
-
readonly hour: number;
|
|
6
|
-
readonly day: number;
|
|
7
|
-
readonly week: number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Переводит значение в юнитах в миллисекунды
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* ms(1, 'min') // 60_000
|
|
15
|
-
* ms(30, 'sec') // 30_000
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const ms: (value: number, unit?: keyof typeof unitsToMs) => number;
|
|
19
|
-
//# sourceMappingURL=ms.d.ts.map
|
package/dist/ms.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ms.d.ts","sourceRoot":"","sources":["../src/ms.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;CAOZ,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE,GAAI,OAAO,MAAM,EAAE,OAAM,MAAM,OAAO,SAAgB,WAC5C,CAAC"}
|
package/dist/ms.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const unitsToMs: {
|
|
2
|
-
readonly ms: 1;
|
|
3
|
-
readonly sec: 1000;
|
|
4
|
-
readonly min: number;
|
|
5
|
-
readonly hour: number;
|
|
6
|
-
readonly day: number;
|
|
7
|
-
readonly week: number;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Переводит значение в юнитах в миллисекунды
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* ms(1, 'min') // 60_000
|
|
15
|
-
* ms(30, 'sec') // 30_000
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const ms: (value: number, unit?: keyof typeof unitsToMs) => number;
|
|
19
|
-
//# sourceMappingURL=ms.d.ts.map
|
package/dist/ms.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ms.d.ts","sourceRoot":"","sources":["../src/ms.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;CAOZ,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE,GAAI,OAAO,MAAM,EAAE,OAAM,MAAM,OAAO,SAAgB,WAC5C,CAAC"}
|
package/dist/ms.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export const unitsToMs = {
|
|
2
|
-
ms: 1,
|
|
3
|
-
sec: 1000,
|
|
4
|
-
min: 1000 * 60,
|
|
5
|
-
hour: 1000 * 60 * 60,
|
|
6
|
-
day: 1000 * 60 * 60 * 24,
|
|
7
|
-
week: 1000 * 60 * 60 * 24 * 7,
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Переводит значение в юнитах в миллисекунды
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* ms(1, 'min') // 60_000
|
|
15
|
-
* ms(30, 'sec') // 30_000
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export const ms = (value, unit = 'ms') => value * unitsToMs[unit];
|
package/dist/number.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.round = round;
|
|
4
|
-
/**
|
|
5
|
-
* Works like `parseFloat(number.toFixed(4))` but performance better
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* round(191.212999999999999999999999, 4) // 191.213
|
|
9
|
-
*/
|
|
10
|
-
function round(value, decimalPlaces = 0) {
|
|
11
|
-
if (!decimalPlaces) {
|
|
12
|
-
return Math.round(value);
|
|
13
|
-
}
|
|
14
|
-
const factor = 10 ** decimalPlaces;
|
|
15
|
-
return Math.round(value * factor) / factor;
|
|
16
|
-
}
|
package/dist/number.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Works like `parseFloat(number.toFixed(4))` but performance better
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* round(191.212999999999999999999999, 4) // 191.213
|
|
6
|
-
*/
|
|
7
|
-
export declare function round(value: number, decimalPlaces?: number): number;
|
|
8
|
-
//# sourceMappingURL=number.d.ts.map
|
package/dist/number.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../src/number.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,GAAE,MAAU,GAAG,MAAM,CAOtE"}
|
package/dist/number.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Works like `parseFloat(number.toFixed(4))` but performance better
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* round(191.212999999999999999999999, 4) // 191.213
|
|
6
|
-
*/
|
|
7
|
-
export declare function round(value: number, decimalPlaces?: number): number;
|
|
8
|
-
//# sourceMappingURL=number.d.ts.map
|
package/dist/number.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../src/number.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,GAAE,MAAU,GAAG,MAAM,CAOtE"}
|
package/dist/number.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Works like `parseFloat(number.toFixed(4))` but performance better
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* round(191.212999999999999999999999, 4) // 191.213
|
|
6
|
-
*/
|
|
7
|
-
export function round(value, decimalPlaces = 0) {
|
|
8
|
-
if (!decimalPlaces) {
|
|
9
|
-
return Math.round(value);
|
|
10
|
-
}
|
|
11
|
-
const factor = 10 ** decimalPlaces;
|
|
12
|
-
return Math.round(value * factor) / factor;
|
|
13
|
-
}
|
package/dist/parser/_exports.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./number.cjs"), exports);
|
|
18
|
-
__exportStar(require("./percent.cjs"), exports);
|
|
19
|
-
__exportStar(require("./string.cjs"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_exports.d.ts","sourceRoot":"","sources":["../../src/parser/_exports.ts"],"names":[],"mappings":"AAAA,6BAA4B;AAC5B,8BAA6B;AAC7B,6BAA4B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_exports.d.ts","sourceRoot":"","sources":["../../src/parser/_exports.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B"}
|
package/dist/parser/_exports.js
DELETED
package/dist/parser/index.cjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.parser = void 0;
|
|
37
|
-
// This way is more treeshakable than collecting
|
|
38
|
-
// it into one exportable object export const parser
|
|
39
|
-
const parser = __importStar(require("./_exports.cjs"));
|
|
40
|
-
exports.parser = parser;
|
package/dist/parser/index.d.cts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,uBAAsB;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/parser/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,sBAAsB;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC"}
|