yummies 5.4.5 → 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
- package/utils/types.cjs +0 -2
- package/utils/types.d.cts +0 -395
- package/utils/types.d.cts.map +0 -1
- package/utils/types.d.ts +0 -395
- package/utils/types.d.ts.map +0 -1
- package/utils/types.js +0 -1
package/dist/encodings.cjs
DELETED
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unicodeToWin1251 = unicodeToWin1251;
|
|
4
|
-
const DMap = {
|
|
5
|
-
0: 0,
|
|
6
|
-
1: 1,
|
|
7
|
-
2: 2,
|
|
8
|
-
3: 3,
|
|
9
|
-
4: 4,
|
|
10
|
-
5: 5,
|
|
11
|
-
6: 6,
|
|
12
|
-
7: 7,
|
|
13
|
-
8: 8,
|
|
14
|
-
9: 9,
|
|
15
|
-
10: 10,
|
|
16
|
-
11: 11,
|
|
17
|
-
12: 12,
|
|
18
|
-
13: 13,
|
|
19
|
-
14: 14,
|
|
20
|
-
15: 15,
|
|
21
|
-
16: 16,
|
|
22
|
-
17: 17,
|
|
23
|
-
18: 18,
|
|
24
|
-
19: 19,
|
|
25
|
-
20: 20,
|
|
26
|
-
21: 21,
|
|
27
|
-
22: 22,
|
|
28
|
-
23: 23,
|
|
29
|
-
24: 24,
|
|
30
|
-
25: 25,
|
|
31
|
-
26: 26,
|
|
32
|
-
27: 27,
|
|
33
|
-
28: 28,
|
|
34
|
-
29: 29,
|
|
35
|
-
30: 30,
|
|
36
|
-
31: 31,
|
|
37
|
-
32: 32,
|
|
38
|
-
33: 33,
|
|
39
|
-
34: 34,
|
|
40
|
-
35: 35,
|
|
41
|
-
36: 36,
|
|
42
|
-
37: 37,
|
|
43
|
-
38: 38,
|
|
44
|
-
39: 39,
|
|
45
|
-
40: 40,
|
|
46
|
-
41: 41,
|
|
47
|
-
42: 42,
|
|
48
|
-
43: 43,
|
|
49
|
-
44: 44,
|
|
50
|
-
45: 45,
|
|
51
|
-
46: 46,
|
|
52
|
-
47: 47,
|
|
53
|
-
48: 48,
|
|
54
|
-
49: 49,
|
|
55
|
-
50: 50,
|
|
56
|
-
51: 51,
|
|
57
|
-
52: 52,
|
|
58
|
-
53: 53,
|
|
59
|
-
54: 54,
|
|
60
|
-
55: 55,
|
|
61
|
-
56: 56,
|
|
62
|
-
57: 57,
|
|
63
|
-
58: 58,
|
|
64
|
-
59: 59,
|
|
65
|
-
60: 60,
|
|
66
|
-
61: 61,
|
|
67
|
-
62: 62,
|
|
68
|
-
63: 63,
|
|
69
|
-
64: 64,
|
|
70
|
-
65: 65,
|
|
71
|
-
66: 66,
|
|
72
|
-
67: 67,
|
|
73
|
-
68: 68,
|
|
74
|
-
69: 69,
|
|
75
|
-
70: 70,
|
|
76
|
-
71: 71,
|
|
77
|
-
72: 72,
|
|
78
|
-
73: 73,
|
|
79
|
-
74: 74,
|
|
80
|
-
75: 75,
|
|
81
|
-
76: 76,
|
|
82
|
-
77: 77,
|
|
83
|
-
78: 78,
|
|
84
|
-
79: 79,
|
|
85
|
-
80: 80,
|
|
86
|
-
81: 81,
|
|
87
|
-
82: 82,
|
|
88
|
-
83: 83,
|
|
89
|
-
84: 84,
|
|
90
|
-
85: 85,
|
|
91
|
-
86: 86,
|
|
92
|
-
87: 87,
|
|
93
|
-
88: 88,
|
|
94
|
-
89: 89,
|
|
95
|
-
90: 90,
|
|
96
|
-
91: 91,
|
|
97
|
-
92: 92,
|
|
98
|
-
93: 93,
|
|
99
|
-
94: 94,
|
|
100
|
-
95: 95,
|
|
101
|
-
96: 96,
|
|
102
|
-
97: 97,
|
|
103
|
-
98: 98,
|
|
104
|
-
99: 99,
|
|
105
|
-
100: 100,
|
|
106
|
-
101: 101,
|
|
107
|
-
102: 102,
|
|
108
|
-
103: 103,
|
|
109
|
-
104: 104,
|
|
110
|
-
105: 105,
|
|
111
|
-
106: 106,
|
|
112
|
-
107: 107,
|
|
113
|
-
108: 108,
|
|
114
|
-
109: 109,
|
|
115
|
-
110: 110,
|
|
116
|
-
111: 111,
|
|
117
|
-
112: 112,
|
|
118
|
-
113: 113,
|
|
119
|
-
114: 114,
|
|
120
|
-
115: 115,
|
|
121
|
-
116: 116,
|
|
122
|
-
117: 117,
|
|
123
|
-
118: 118,
|
|
124
|
-
119: 119,
|
|
125
|
-
120: 120,
|
|
126
|
-
121: 121,
|
|
127
|
-
122: 122,
|
|
128
|
-
123: 123,
|
|
129
|
-
124: 124,
|
|
130
|
-
125: 125,
|
|
131
|
-
126: 126,
|
|
132
|
-
127: 127,
|
|
133
|
-
1027: 129,
|
|
134
|
-
8225: 135,
|
|
135
|
-
1046: 198,
|
|
136
|
-
8222: 132,
|
|
137
|
-
1047: 199,
|
|
138
|
-
1168: 165,
|
|
139
|
-
1048: 200,
|
|
140
|
-
1113: 154,
|
|
141
|
-
1049: 201,
|
|
142
|
-
1045: 197,
|
|
143
|
-
1050: 202,
|
|
144
|
-
1028: 170,
|
|
145
|
-
160: 160,
|
|
146
|
-
1040: 192,
|
|
147
|
-
1051: 203,
|
|
148
|
-
164: 164,
|
|
149
|
-
166: 166,
|
|
150
|
-
167: 167,
|
|
151
|
-
169: 169,
|
|
152
|
-
171: 171,
|
|
153
|
-
172: 172,
|
|
154
|
-
173: 173,
|
|
155
|
-
174: 174,
|
|
156
|
-
1053: 205,
|
|
157
|
-
176: 176,
|
|
158
|
-
177: 177,
|
|
159
|
-
1114: 156,
|
|
160
|
-
181: 181,
|
|
161
|
-
182: 182,
|
|
162
|
-
183: 183,
|
|
163
|
-
8221: 148,
|
|
164
|
-
187: 187,
|
|
165
|
-
1029: 189,
|
|
166
|
-
1056: 208,
|
|
167
|
-
1057: 209,
|
|
168
|
-
1058: 210,
|
|
169
|
-
8364: 136,
|
|
170
|
-
1112: 188,
|
|
171
|
-
1115: 158,
|
|
172
|
-
1059: 211,
|
|
173
|
-
1060: 212,
|
|
174
|
-
1030: 178,
|
|
175
|
-
1061: 213,
|
|
176
|
-
1062: 214,
|
|
177
|
-
1063: 215,
|
|
178
|
-
1116: 157,
|
|
179
|
-
1064: 216,
|
|
180
|
-
1065: 217,
|
|
181
|
-
1031: 175,
|
|
182
|
-
1066: 218,
|
|
183
|
-
1067: 219,
|
|
184
|
-
1068: 220,
|
|
185
|
-
1069: 221,
|
|
186
|
-
1070: 222,
|
|
187
|
-
1032: 163,
|
|
188
|
-
8226: 149,
|
|
189
|
-
1071: 223,
|
|
190
|
-
1072: 224,
|
|
191
|
-
8482: 153,
|
|
192
|
-
1073: 225,
|
|
193
|
-
8240: 137,
|
|
194
|
-
1118: 162,
|
|
195
|
-
1074: 226,
|
|
196
|
-
1110: 179,
|
|
197
|
-
8230: 133,
|
|
198
|
-
1075: 227,
|
|
199
|
-
1033: 138,
|
|
200
|
-
1076: 228,
|
|
201
|
-
1077: 229,
|
|
202
|
-
8211: 150,
|
|
203
|
-
1078: 230,
|
|
204
|
-
1119: 159,
|
|
205
|
-
1079: 231,
|
|
206
|
-
1042: 194,
|
|
207
|
-
1080: 232,
|
|
208
|
-
1034: 140,
|
|
209
|
-
1025: 168,
|
|
210
|
-
1081: 233,
|
|
211
|
-
1082: 234,
|
|
212
|
-
8212: 151,
|
|
213
|
-
1083: 235,
|
|
214
|
-
1169: 180,
|
|
215
|
-
1084: 236,
|
|
216
|
-
1052: 204,
|
|
217
|
-
1085: 237,
|
|
218
|
-
1035: 142,
|
|
219
|
-
1086: 238,
|
|
220
|
-
1087: 239,
|
|
221
|
-
1088: 240,
|
|
222
|
-
1089: 241,
|
|
223
|
-
1090: 242,
|
|
224
|
-
1036: 141,
|
|
225
|
-
1041: 193,
|
|
226
|
-
1091: 243,
|
|
227
|
-
1092: 244,
|
|
228
|
-
8224: 134,
|
|
229
|
-
1093: 245,
|
|
230
|
-
8470: 185,
|
|
231
|
-
1094: 246,
|
|
232
|
-
1054: 206,
|
|
233
|
-
1095: 247,
|
|
234
|
-
1096: 248,
|
|
235
|
-
8249: 139,
|
|
236
|
-
1097: 249,
|
|
237
|
-
1098: 250,
|
|
238
|
-
1044: 196,
|
|
239
|
-
1099: 251,
|
|
240
|
-
1111: 191,
|
|
241
|
-
1055: 207,
|
|
242
|
-
1100: 252,
|
|
243
|
-
1038: 161,
|
|
244
|
-
8220: 147,
|
|
245
|
-
1101: 253,
|
|
246
|
-
8250: 155,
|
|
247
|
-
1102: 254,
|
|
248
|
-
8216: 145,
|
|
249
|
-
1103: 255,
|
|
250
|
-
1043: 195,
|
|
251
|
-
1105: 184,
|
|
252
|
-
1039: 143,
|
|
253
|
-
1026: 128,
|
|
254
|
-
1106: 144,
|
|
255
|
-
8218: 130,
|
|
256
|
-
1107: 131,
|
|
257
|
-
8217: 146,
|
|
258
|
-
1108: 186,
|
|
259
|
-
1109: 190,
|
|
260
|
-
};
|
|
261
|
-
function unicodeToWin1251(s) {
|
|
262
|
-
const L = [];
|
|
263
|
-
for (let i = 0; i < s.length; i++) {
|
|
264
|
-
const ord = s.charCodeAt(i);
|
|
265
|
-
if (!(ord in DMap))
|
|
266
|
-
throw new Error(`Character ${s.charAt(i)} isn't supported by win1251!`);
|
|
267
|
-
L.push(String.fromCharCode(DMap[ord]));
|
|
268
|
-
}
|
|
269
|
-
return L.join('');
|
|
270
|
-
}
|
package/dist/encodings.d.cts
DELETED
package/dist/encodings.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodings.d.ts","sourceRoot":"","sources":["../src/encodings.ts"],"names":[],"mappings":"AAoQA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,UASzC"}
|
package/dist/encodings.d.ts
DELETED
package/dist/encodings.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encodings.d.ts","sourceRoot":"","sources":["../src/encodings.ts"],"names":[],"mappings":"AAoQA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,UASzC"}
|
package/dist/encodings.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
const DMap = {
|
|
2
|
-
0: 0,
|
|
3
|
-
1: 1,
|
|
4
|
-
2: 2,
|
|
5
|
-
3: 3,
|
|
6
|
-
4: 4,
|
|
7
|
-
5: 5,
|
|
8
|
-
6: 6,
|
|
9
|
-
7: 7,
|
|
10
|
-
8: 8,
|
|
11
|
-
9: 9,
|
|
12
|
-
10: 10,
|
|
13
|
-
11: 11,
|
|
14
|
-
12: 12,
|
|
15
|
-
13: 13,
|
|
16
|
-
14: 14,
|
|
17
|
-
15: 15,
|
|
18
|
-
16: 16,
|
|
19
|
-
17: 17,
|
|
20
|
-
18: 18,
|
|
21
|
-
19: 19,
|
|
22
|
-
20: 20,
|
|
23
|
-
21: 21,
|
|
24
|
-
22: 22,
|
|
25
|
-
23: 23,
|
|
26
|
-
24: 24,
|
|
27
|
-
25: 25,
|
|
28
|
-
26: 26,
|
|
29
|
-
27: 27,
|
|
30
|
-
28: 28,
|
|
31
|
-
29: 29,
|
|
32
|
-
30: 30,
|
|
33
|
-
31: 31,
|
|
34
|
-
32: 32,
|
|
35
|
-
33: 33,
|
|
36
|
-
34: 34,
|
|
37
|
-
35: 35,
|
|
38
|
-
36: 36,
|
|
39
|
-
37: 37,
|
|
40
|
-
38: 38,
|
|
41
|
-
39: 39,
|
|
42
|
-
40: 40,
|
|
43
|
-
41: 41,
|
|
44
|
-
42: 42,
|
|
45
|
-
43: 43,
|
|
46
|
-
44: 44,
|
|
47
|
-
45: 45,
|
|
48
|
-
46: 46,
|
|
49
|
-
47: 47,
|
|
50
|
-
48: 48,
|
|
51
|
-
49: 49,
|
|
52
|
-
50: 50,
|
|
53
|
-
51: 51,
|
|
54
|
-
52: 52,
|
|
55
|
-
53: 53,
|
|
56
|
-
54: 54,
|
|
57
|
-
55: 55,
|
|
58
|
-
56: 56,
|
|
59
|
-
57: 57,
|
|
60
|
-
58: 58,
|
|
61
|
-
59: 59,
|
|
62
|
-
60: 60,
|
|
63
|
-
61: 61,
|
|
64
|
-
62: 62,
|
|
65
|
-
63: 63,
|
|
66
|
-
64: 64,
|
|
67
|
-
65: 65,
|
|
68
|
-
66: 66,
|
|
69
|
-
67: 67,
|
|
70
|
-
68: 68,
|
|
71
|
-
69: 69,
|
|
72
|
-
70: 70,
|
|
73
|
-
71: 71,
|
|
74
|
-
72: 72,
|
|
75
|
-
73: 73,
|
|
76
|
-
74: 74,
|
|
77
|
-
75: 75,
|
|
78
|
-
76: 76,
|
|
79
|
-
77: 77,
|
|
80
|
-
78: 78,
|
|
81
|
-
79: 79,
|
|
82
|
-
80: 80,
|
|
83
|
-
81: 81,
|
|
84
|
-
82: 82,
|
|
85
|
-
83: 83,
|
|
86
|
-
84: 84,
|
|
87
|
-
85: 85,
|
|
88
|
-
86: 86,
|
|
89
|
-
87: 87,
|
|
90
|
-
88: 88,
|
|
91
|
-
89: 89,
|
|
92
|
-
90: 90,
|
|
93
|
-
91: 91,
|
|
94
|
-
92: 92,
|
|
95
|
-
93: 93,
|
|
96
|
-
94: 94,
|
|
97
|
-
95: 95,
|
|
98
|
-
96: 96,
|
|
99
|
-
97: 97,
|
|
100
|
-
98: 98,
|
|
101
|
-
99: 99,
|
|
102
|
-
100: 100,
|
|
103
|
-
101: 101,
|
|
104
|
-
102: 102,
|
|
105
|
-
103: 103,
|
|
106
|
-
104: 104,
|
|
107
|
-
105: 105,
|
|
108
|
-
106: 106,
|
|
109
|
-
107: 107,
|
|
110
|
-
108: 108,
|
|
111
|
-
109: 109,
|
|
112
|
-
110: 110,
|
|
113
|
-
111: 111,
|
|
114
|
-
112: 112,
|
|
115
|
-
113: 113,
|
|
116
|
-
114: 114,
|
|
117
|
-
115: 115,
|
|
118
|
-
116: 116,
|
|
119
|
-
117: 117,
|
|
120
|
-
118: 118,
|
|
121
|
-
119: 119,
|
|
122
|
-
120: 120,
|
|
123
|
-
121: 121,
|
|
124
|
-
122: 122,
|
|
125
|
-
123: 123,
|
|
126
|
-
124: 124,
|
|
127
|
-
125: 125,
|
|
128
|
-
126: 126,
|
|
129
|
-
127: 127,
|
|
130
|
-
1027: 129,
|
|
131
|
-
8225: 135,
|
|
132
|
-
1046: 198,
|
|
133
|
-
8222: 132,
|
|
134
|
-
1047: 199,
|
|
135
|
-
1168: 165,
|
|
136
|
-
1048: 200,
|
|
137
|
-
1113: 154,
|
|
138
|
-
1049: 201,
|
|
139
|
-
1045: 197,
|
|
140
|
-
1050: 202,
|
|
141
|
-
1028: 170,
|
|
142
|
-
160: 160,
|
|
143
|
-
1040: 192,
|
|
144
|
-
1051: 203,
|
|
145
|
-
164: 164,
|
|
146
|
-
166: 166,
|
|
147
|
-
167: 167,
|
|
148
|
-
169: 169,
|
|
149
|
-
171: 171,
|
|
150
|
-
172: 172,
|
|
151
|
-
173: 173,
|
|
152
|
-
174: 174,
|
|
153
|
-
1053: 205,
|
|
154
|
-
176: 176,
|
|
155
|
-
177: 177,
|
|
156
|
-
1114: 156,
|
|
157
|
-
181: 181,
|
|
158
|
-
182: 182,
|
|
159
|
-
183: 183,
|
|
160
|
-
8221: 148,
|
|
161
|
-
187: 187,
|
|
162
|
-
1029: 189,
|
|
163
|
-
1056: 208,
|
|
164
|
-
1057: 209,
|
|
165
|
-
1058: 210,
|
|
166
|
-
8364: 136,
|
|
167
|
-
1112: 188,
|
|
168
|
-
1115: 158,
|
|
169
|
-
1059: 211,
|
|
170
|
-
1060: 212,
|
|
171
|
-
1030: 178,
|
|
172
|
-
1061: 213,
|
|
173
|
-
1062: 214,
|
|
174
|
-
1063: 215,
|
|
175
|
-
1116: 157,
|
|
176
|
-
1064: 216,
|
|
177
|
-
1065: 217,
|
|
178
|
-
1031: 175,
|
|
179
|
-
1066: 218,
|
|
180
|
-
1067: 219,
|
|
181
|
-
1068: 220,
|
|
182
|
-
1069: 221,
|
|
183
|
-
1070: 222,
|
|
184
|
-
1032: 163,
|
|
185
|
-
8226: 149,
|
|
186
|
-
1071: 223,
|
|
187
|
-
1072: 224,
|
|
188
|
-
8482: 153,
|
|
189
|
-
1073: 225,
|
|
190
|
-
8240: 137,
|
|
191
|
-
1118: 162,
|
|
192
|
-
1074: 226,
|
|
193
|
-
1110: 179,
|
|
194
|
-
8230: 133,
|
|
195
|
-
1075: 227,
|
|
196
|
-
1033: 138,
|
|
197
|
-
1076: 228,
|
|
198
|
-
1077: 229,
|
|
199
|
-
8211: 150,
|
|
200
|
-
1078: 230,
|
|
201
|
-
1119: 159,
|
|
202
|
-
1079: 231,
|
|
203
|
-
1042: 194,
|
|
204
|
-
1080: 232,
|
|
205
|
-
1034: 140,
|
|
206
|
-
1025: 168,
|
|
207
|
-
1081: 233,
|
|
208
|
-
1082: 234,
|
|
209
|
-
8212: 151,
|
|
210
|
-
1083: 235,
|
|
211
|
-
1169: 180,
|
|
212
|
-
1084: 236,
|
|
213
|
-
1052: 204,
|
|
214
|
-
1085: 237,
|
|
215
|
-
1035: 142,
|
|
216
|
-
1086: 238,
|
|
217
|
-
1087: 239,
|
|
218
|
-
1088: 240,
|
|
219
|
-
1089: 241,
|
|
220
|
-
1090: 242,
|
|
221
|
-
1036: 141,
|
|
222
|
-
1041: 193,
|
|
223
|
-
1091: 243,
|
|
224
|
-
1092: 244,
|
|
225
|
-
8224: 134,
|
|
226
|
-
1093: 245,
|
|
227
|
-
8470: 185,
|
|
228
|
-
1094: 246,
|
|
229
|
-
1054: 206,
|
|
230
|
-
1095: 247,
|
|
231
|
-
1096: 248,
|
|
232
|
-
8249: 139,
|
|
233
|
-
1097: 249,
|
|
234
|
-
1098: 250,
|
|
235
|
-
1044: 196,
|
|
236
|
-
1099: 251,
|
|
237
|
-
1111: 191,
|
|
238
|
-
1055: 207,
|
|
239
|
-
1100: 252,
|
|
240
|
-
1038: 161,
|
|
241
|
-
8220: 147,
|
|
242
|
-
1101: 253,
|
|
243
|
-
8250: 155,
|
|
244
|
-
1102: 254,
|
|
245
|
-
8216: 145,
|
|
246
|
-
1103: 255,
|
|
247
|
-
1043: 195,
|
|
248
|
-
1105: 184,
|
|
249
|
-
1039: 143,
|
|
250
|
-
1026: 128,
|
|
251
|
-
1106: 144,
|
|
252
|
-
8218: 130,
|
|
253
|
-
1107: 131,
|
|
254
|
-
8217: 146,
|
|
255
|
-
1108: 186,
|
|
256
|
-
1109: 190,
|
|
257
|
-
};
|
|
258
|
-
export function unicodeToWin1251(s) {
|
|
259
|
-
const L = [];
|
|
260
|
-
for (let i = 0; i < s.length; i++) {
|
|
261
|
-
const ord = s.charCodeAt(i);
|
|
262
|
-
if (!(ord in DMap))
|
|
263
|
-
throw new Error(`Character ${s.charAt(i)} isn't supported by win1251!`);
|
|
264
|
-
L.push(String.fromCharCode(DMap[ord]));
|
|
265
|
-
}
|
|
266
|
-
return L.join('');
|
|
267
|
-
}
|
package/dist/errors.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getErrorText = void 0;
|
|
4
|
-
const index_js_1 = require("./type-guard/index.cjs");
|
|
5
|
-
/**
|
|
6
|
-
* Universal function for transforming any errors into readable error text
|
|
7
|
-
*
|
|
8
|
-
* This function can be enhanced with custom handlers using:
|
|
9
|
-
* - `getErrorText.unknownErrorText`
|
|
10
|
-
* - `getErrorText.formatError`
|
|
11
|
-
* - `getErrorText.enhance`
|
|
12
|
-
*/
|
|
13
|
-
const getErrorText = (error) => {
|
|
14
|
-
if (!error) {
|
|
15
|
-
return exports.getErrorText.unknownErrorText;
|
|
16
|
-
}
|
|
17
|
-
if (index_js_1.typeGuard.isString(error)) {
|
|
18
|
-
return error || exports.getErrorText.unknownErrorText;
|
|
19
|
-
}
|
|
20
|
-
if (error instanceof Error) {
|
|
21
|
-
return ((exports.getErrorText.formatError?.(error) ?? error.message) ||
|
|
22
|
-
exports.getErrorText.unknownErrorText);
|
|
23
|
-
}
|
|
24
|
-
if (exports.getErrorText.enhance) {
|
|
25
|
-
return exports.getErrorText.enhance(error) ?? exports.getErrorText.unknownErrorText;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return exports.getErrorText.unknownErrorText;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.getErrorText = getErrorText;
|
|
32
|
-
exports.getErrorText.unknownErrorText = '';
|
|
33
|
-
exports.getErrorText.formatError = null;
|
|
34
|
-
exports.getErrorText.enhance = null;
|
package/dist/errors.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Maybe } from "./utils/types.cjs";
|
|
2
|
-
type GetErrorTextEnhancer = (error: any) => string;
|
|
3
|
-
type GetErrorTextFormatErrorFn = (error: Error) => string;
|
|
4
|
-
/**
|
|
5
|
-
* Universal function for transforming any errors into readable error text
|
|
6
|
-
*
|
|
7
|
-
* This function can be enhanced with custom handlers using:
|
|
8
|
-
* - `getErrorText.unknownErrorText`
|
|
9
|
-
* - `getErrorText.formatError`
|
|
10
|
-
* - `getErrorText.enhance`
|
|
11
|
-
*/
|
|
12
|
-
export declare const getErrorText: {
|
|
13
|
-
(error: unknown): string;
|
|
14
|
-
unknownErrorText: string;
|
|
15
|
-
formatError: Maybe<GetErrorTextFormatErrorFn>;
|
|
16
|
-
enhance: Maybe<GetErrorTextEnhancer>;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAyB;AAE9C,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;AACnD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;YAAW,OAAO;;;;CAqB1C,CAAC"}
|
package/dist/errors.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Maybe } from "./utils/types.js";
|
|
2
|
-
type GetErrorTextEnhancer = (error: any) => string;
|
|
3
|
-
type GetErrorTextFormatErrorFn = (error: Error) => string;
|
|
4
|
-
/**
|
|
5
|
-
* Universal function for transforming any errors into readable error text
|
|
6
|
-
*
|
|
7
|
-
* This function can be enhanced with custom handlers using:
|
|
8
|
-
* - `getErrorText.unknownErrorText`
|
|
9
|
-
* - `getErrorText.formatError`
|
|
10
|
-
* - `getErrorText.enhance`
|
|
11
|
-
*/
|
|
12
|
-
export declare const getErrorText: {
|
|
13
|
-
(error: unknown): string;
|
|
14
|
-
unknownErrorText: string;
|
|
15
|
-
formatError: Maybe<GetErrorTextFormatErrorFn>;
|
|
16
|
-
enhance: Maybe<GetErrorTextEnhancer>;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,yBAAyB;AAE9C,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;AACnD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;YAAW,OAAO;;;;CAqB1C,CAAC"}
|
package/dist/errors.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { typeGuard } from "./type-guard/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Universal function for transforming any errors into readable error text
|
|
4
|
-
*
|
|
5
|
-
* This function can be enhanced with custom handlers using:
|
|
6
|
-
* - `getErrorText.unknownErrorText`
|
|
7
|
-
* - `getErrorText.formatError`
|
|
8
|
-
* - `getErrorText.enhance`
|
|
9
|
-
*/
|
|
10
|
-
export const getErrorText = (error) => {
|
|
11
|
-
if (!error) {
|
|
12
|
-
return getErrorText.unknownErrorText;
|
|
13
|
-
}
|
|
14
|
-
if (typeGuard.isString(error)) {
|
|
15
|
-
return error || getErrorText.unknownErrorText;
|
|
16
|
-
}
|
|
17
|
-
if (error instanceof Error) {
|
|
18
|
-
return ((getErrorText.formatError?.(error) ?? error.message) ||
|
|
19
|
-
getErrorText.unknownErrorText);
|
|
20
|
-
}
|
|
21
|
-
if (getErrorText.enhance) {
|
|
22
|
-
return getErrorText.enhance(error) ?? getErrorText.unknownErrorText;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return getErrorText.unknownErrorText;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
getErrorText.unknownErrorText = '';
|
|
29
|
-
getErrorText.formatError = null;
|
|
30
|
-
getErrorText.enhance = null;
|
package/dist/file.cjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTextFromFile = exports.getBase64FromFile = void 0;
|
|
4
|
-
const getBase64FromFile = (file) => {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
const reader = new FileReader();
|
|
7
|
-
reader.readAsDataURL(file);
|
|
8
|
-
reader.onload = () => {
|
|
9
|
-
resolve(reader.result.toString());
|
|
10
|
-
};
|
|
11
|
-
reader.onerror = (error) => {
|
|
12
|
-
reject(error);
|
|
13
|
-
};
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
exports.getBase64FromFile = getBase64FromFile;
|
|
17
|
-
const getTextFromFile = (file, encoding) => {
|
|
18
|
-
return new Promise((resolve, reject) => {
|
|
19
|
-
const reader = new FileReader();
|
|
20
|
-
reader.readAsText(file, encoding);
|
|
21
|
-
reader.onload = () => {
|
|
22
|
-
resolve(reader.result.toString());
|
|
23
|
-
};
|
|
24
|
-
reader.onerror = (error) => {
|
|
25
|
-
reject(error);
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
exports.getTextFromFile = getTextFromFile;
|
package/dist/file.d.cts
DELETED
package/dist/file.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,oBAW3C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,EAAE,WAAW,MAAM,oBAW5D,CAAC"}
|
package/dist/file.d.ts
DELETED
package/dist/file.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,oBAW3C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,EAAE,WAAW,MAAM,oBAW5D,CAAC"}
|