yummies 5.4.5 → 5.4.7
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/assets/logo.png +0 -0
- package/assets/logo.pxz +0 -0
- package/{dist/common.d.ts → common.d.ts} +1 -1
- package/common.d.ts.map +1 -0
- package/{dist/complex → complex}/global-config.d.ts +1 -1
- package/complex/global-config.d.ts.map +1 -0
- package/complex/index.d.ts +4 -0
- package/complex/index.d.ts.map +1 -0
- package/complex/index.js +3 -0
- package/{dist/complex → complex}/modules-factory.d.ts +1 -1
- package/complex/modules-factory.d.ts.map +1 -0
- package/cookie.d.ts +3 -0
- package/{dist/cookie.d.ts.map → cookie.d.ts.map} +1 -1
- package/{dist/date-time.d.ts → date-time.d.ts} +1 -1
- package/date-time.d.ts.map +1 -0
- package/{dist/date-time.js → date-time.js} +4 -4
- package/{dist/errors.d.ts → errors.d.ts} +1 -1
- package/errors.d.ts.map +1 -0
- package/{dist/errors.js → errors.js} +1 -1
- package/format/_exports.d.ts +5 -0
- package/format/_exports.d.ts.map +1 -0
- package/format/_exports.js +4 -0
- package/format/index.d.ts +3 -0
- package/{dist/format → format}/index.d.ts.map +1 -1
- package/{dist/format → format}/index.js +1 -1
- package/{dist/format → format}/number.d.ts +1 -1
- package/format/number.d.ts.map +1 -0
- package/{dist/format → format}/number.js +3 -3
- package/{dist/format → format}/percent.d.ts +2 -2
- package/format/percent.d.ts.map +1 -0
- package/{dist/format → format}/percent.js +3 -3
- package/{dist/html.d.ts → html.d.ts} +1 -1
- package/html.d.ts.map +1 -0
- package/{dist/html.js → html.js} +1 -1
- package/{dist/imports.js → imports.js} +1 -1
- package/{dist/math.d.ts → math.d.ts} +1 -1
- package/math.d.ts.map +1 -0
- package/{dist/media.js → media.js} +1 -1
- package/{dist/mobx → mobx}/apply-observable.d.ts +1 -1
- package/mobx/apply-observable.d.ts.map +1 -0
- package/{dist/mobx → mobx}/create-enhanced-atom.d.ts +1 -1
- package/mobx/create-enhanced-atom.d.ts.map +1 -0
- package/{dist/mobx → mobx}/deep-observable-struct.d.ts +1 -1
- package/mobx/deep-observable-struct.d.ts.map +1 -0
- package/{dist/mobx → mobx}/deep-observable-struct.js +1 -1
- package/{dist/mobx → mobx}/get-mobx-administration.d.ts +1 -1
- package/mobx/get-mobx-administration.d.ts.map +1 -0
- package/mobx/index.d.ts +6 -0
- package/mobx/index.d.ts.map +1 -0
- package/mobx/index.js +5 -0
- package/package.json +350 -340
- package/parser/_exports.d.ts +4 -0
- package/parser/_exports.d.ts.map +1 -0
- package/parser/_exports.js +3 -0
- package/parser/index.d.ts +3 -0
- package/{dist/parser → parser}/index.d.ts.map +1 -1
- package/{dist/parser → parser}/index.js +1 -1
- package/{dist/parser → parser}/number.d.ts +1 -1
- package/parser/number.d.ts.map +1 -0
- package/{dist/parser → parser}/number.js +2 -2
- package/{dist/parser → parser}/percent.d.ts +2 -2
- package/parser/percent.d.ts.map +1 -0
- package/{dist/parser → parser}/percent.js +1 -1
- package/{dist/parser → parser}/string.d.ts +1 -1
- package/parser/string.d.ts.map +1 -0
- package/{dist/parser → parser}/string.js +1 -1
- package/react/hooks/index.d.ts +22 -0
- package/react/hooks/index.d.ts.map +1 -0
- package/react/hooks/index.js +21 -0
- package/{dist/react → react}/hooks/use-abort-controller.js +1 -1
- package/{dist/react → react}/hooks/use-abort-signal.js +1 -1
- package/{dist/react → react}/hooks/use-click-outside.js +1 -1
- package/{dist/react → react}/hooks/use-event-listener.js +1 -1
- package/react/hooks/use-event.d.ts +3 -0
- package/{dist/react → react}/hooks/use-event.d.ts.map +1 -1
- package/{dist/react → react}/hooks/use-instance.js +2 -2
- package/{dist/react → react}/hooks/use-life-cycle.js +1 -1
- package/{dist/react → react}/hooks/use-resize-observer.js +1 -1
- package/react/index.d.ts +2 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +1 -0
- package/{dist/type-guard → type-guard}/_exports.d.ts +1 -1
- package/type-guard/_exports.d.ts.map +1 -0
- package/type-guard/index.d.ts +3 -0
- package/{dist/type-guard → type-guard}/index.d.ts.map +1 -1
- package/{dist/type-guard → type-guard}/index.js +1 -1
- package/dist/async.cjs +0 -70
- package/dist/async.d.cts +0 -28
- package/dist/async.d.cts.map +0 -1
- 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.map +0 -1
- 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/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.map +0 -1
- 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.map +0 -1
- 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/css.cjs +0 -28
- package/dist/css.d.cts +0 -36
- package/dist/css.d.cts.map +0 -1
- package/dist/data.cjs +0 -58
- package/dist/data.d.cts +0 -4
- package/dist/data.d.cts.map +0 -1
- 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.map +0 -1
- package/dist/device.cjs +0 -28
- package/dist/device.d.cts +0 -8
- package/dist/device.d.cts.map +0 -1
- package/dist/encodings.cjs +0 -270
- package/dist/encodings.d.cts +0 -2
- package/dist/encodings.d.cts.map +0 -1
- 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.map +0 -1
- package/dist/file.cjs +0 -29
- package/dist/file.d.cts +0 -3
- package/dist/file.d.cts.map +0 -1
- 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/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/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.map +0 -1
- 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.map +0 -1
- 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/html.cjs +0 -202
- package/dist/html.d.cts +0 -44
- package/dist/html.d.cts.map +0 -1
- package/dist/html.d.ts.map +0 -1
- package/dist/id.cjs +0 -76
- package/dist/id.d.cts +0 -63
- package/dist/id.d.cts.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/math.cjs +0 -23
- package/dist/math.d.cts +0 -13
- package/dist/math.d.cts.map +0 -1
- package/dist/math.d.ts.map +0 -1
- package/dist/media.cjs +0 -115
- package/dist/media.d.cts +0 -20
- package/dist/media.d.cts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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/ms.cjs +0 -22
- package/dist/ms.d.cts +0 -19
- package/dist/ms.d.cts.map +0 -1
- package/dist/number.cjs +0 -16
- package/dist/number.d.cts +0 -8
- package/dist/number.d.cts.map +0 -1
- 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/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.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- package/dist/price.cjs +0 -21
- package/dist/price.d.cts +0 -6
- package/dist/price.d.cts.map +0 -1
- package/dist/random.cjs +0 -25
- package/dist/random.d.cts +0 -9
- package/dist/random.d.cts.map +0 -1
- 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-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-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-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-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-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-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.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-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-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-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-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-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-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-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-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-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-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-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-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-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/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/storage.cjs +0 -48
- package/dist/storage.d.cts +0 -39
- package/dist/storage.d.cts.map +0 -1
- package/dist/text.cjs +0 -53
- package/dist/text.d.cts +0 -15
- package/dist/text.d.cts.map +0 -1
- 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.map +0 -1
- 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/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/utils/types.cjs +0 -2
- package/utils/types.d.cts +0 -395
- package/utils/types.d.cts.map +0 -1
- /package/{dist/async.d.ts → async.d.ts} +0 -0
- /package/{dist/async.d.ts.map → async.d.ts.map} +0 -0
- /package/{dist/async.js → async.js} +0 -0
- /package/{dist/common.js → common.js} +0 -0
- /package/{dist/complex → complex}/counter.d.ts +0 -0
- /package/{dist/complex → complex}/counter.d.ts.map +0 -0
- /package/{dist/complex → complex}/counter.js +0 -0
- /package/{dist/complex → complex}/global-config.js +0 -0
- /package/{dist/complex → complex}/modules-factory.js +0 -0
- /package/{dist/cookie.js → cookie.js} +0 -0
- /package/{dist/css.d.ts → css.d.ts} +0 -0
- /package/{dist/css.d.ts.map → css.d.ts.map} +0 -0
- /package/{dist/css.js → css.js} +0 -0
- /package/{dist/data.d.ts → data.d.ts} +0 -0
- /package/{dist/data.d.ts.map → data.d.ts.map} +0 -0
- /package/{dist/data.js → data.js} +0 -0
- /package/{dist/device.d.ts → device.d.ts} +0 -0
- /package/{dist/device.d.ts.map → device.d.ts.map} +0 -0
- /package/{dist/device.js → device.js} +0 -0
- /package/{dist/encodings.d.ts → encodings.d.ts} +0 -0
- /package/{dist/encodings.d.ts.map → encodings.d.ts.map} +0 -0
- /package/{dist/encodings.js → encodings.js} +0 -0
- /package/{dist/file.d.ts → file.d.ts} +0 -0
- /package/{dist/file.d.ts.map → file.d.ts.map} +0 -0
- /package/{dist/file.js → file.js} +0 -0
- /package/{dist/format → format}/constants.d.ts +0 -0
- /package/{dist/format → format}/constants.d.ts.map +0 -0
- /package/{dist/format → format}/constants.js +0 -0
- /package/{dist/format → format}/skip-spaces.d.ts +0 -0
- /package/{dist/format → format}/skip-spaces.d.ts.map +0 -0
- /package/{dist/format → format}/skip-spaces.js +0 -0
- /package/{dist/id.d.ts → id.d.ts} +0 -0
- /package/{dist/id.d.ts.map → id.d.ts.map} +0 -0
- /package/{dist/id.js → id.js} +0 -0
- /package/{dist/imports.d.ts → imports.d.ts} +0 -0
- /package/{dist/imports.d.ts.map → imports.d.ts.map} +0 -0
- /package/{dist/math.js → math.js} +0 -0
- /package/{dist/media.d.ts → media.d.ts} +0 -0
- /package/{dist/media.d.ts.map → media.d.ts.map} +0 -0
- /package/{dist/mobx → mobx}/apply-observable.js +0 -0
- /package/{dist/mobx → mobx}/create-enhanced-atom.js +0 -0
- /package/{dist/mobx → mobx}/get-mobx-administration.js +0 -0
- /package/{dist/mobx → mobx}/lazy-observe.d.ts +0 -0
- /package/{dist/mobx → mobx}/lazy-observe.d.ts.map +0 -0
- /package/{dist/mobx → mobx}/lazy-observe.js +0 -0
- /package/{dist/ms.d.ts → ms.d.ts} +0 -0
- /package/{dist/ms.d.ts.map → ms.d.ts.map} +0 -0
- /package/{dist/ms.js → ms.js} +0 -0
- /package/{dist/number.d.ts → number.d.ts} +0 -0
- /package/{dist/number.d.ts.map → number.d.ts.map} +0 -0
- /package/{dist/number.js → number.js} +0 -0
- /package/{dist/price.d.ts → price.d.ts} +0 -0
- /package/{dist/price.d.ts.map → price.d.ts.map} +0 -0
- /package/{dist/price.js → price.js} +0 -0
- /package/{dist/random.d.ts → random.d.ts} +0 -0
- /package/{dist/random.d.ts.map → random.d.ts.map} +0 -0
- /package/{dist/random.js → random.js} +0 -0
- /package/{dist/react → react}/hooks/use-abort-controller.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-abort-controller.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-abort-signal.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-abort-signal.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-click-outside.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-click-outside.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-constant.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-constant.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-constant.js +0 -0
- /package/{dist/react → react}/hooks/use-define-ref.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-define-ref.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-define-ref.js +0 -0
- /package/{dist/react → react}/hooks/use-element-ref.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-element-ref.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-element-ref.js +0 -0
- /package/{dist/react → react}/hooks/use-event-listener.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-event-listener.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-event.js +0 -0
- /package/{dist/react → react}/hooks/use-flag.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-flag.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-flag.js +0 -0
- /package/{dist/react → react}/hooks/use-force-update.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-force-update.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-force-update.js +0 -0
- /package/{dist/react → react}/hooks/use-initial-height.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-initial-height.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-initial-height.js +0 -0
- /package/{dist/react → react}/hooks/use-instance.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-instance.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-intersection-observer.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-intersection-observer.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-intersection-observer.js +0 -0
- /package/{dist/react → react}/hooks/use-last-defined-value.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-last-defined-value.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-last-defined-value.js +0 -0
- /package/{dist/react → react}/hooks/use-last-value-ref.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-last-value-ref.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-last-value-ref.js +0 -0
- /package/{dist/react → react}/hooks/use-life-cycle.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-life-cycle.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-resize-observer.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-resize-observer.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-sync-ref.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-sync-ref.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-sync-ref.js +0 -0
- /package/{dist/react → react}/hooks/use-toggle.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-toggle.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-toggle.js +0 -0
- /package/{dist/react → react}/hooks/use-value.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-value.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-value.js +0 -0
- /package/{dist/react → react}/hooks/use-visibility-state.d.ts +0 -0
- /package/{dist/react → react}/hooks/use-visibility-state.d.ts.map +0 -0
- /package/{dist/react → react}/hooks/use-visibility-state.js +0 -0
- /package/{dist/sound.d.ts → sound.d.ts} +0 -0
- /package/{dist/sound.d.ts.map → sound.d.ts.map} +0 -0
- /package/{dist/sound.js → sound.js} +0 -0
- /package/{dist/storage.d.ts → storage.d.ts} +0 -0
- /package/{dist/storage.d.ts.map → storage.d.ts.map} +0 -0
- /package/{dist/storage.js → storage.js} +0 -0
- /package/{dist/text.d.ts → text.d.ts} +0 -0
- /package/{dist/text.d.ts.map → text.d.ts.map} +0 -0
- /package/{dist/text.js → text.js} +0 -0
- /package/{dist/type-guard → type-guard}/_exports.js +0 -0
- /package/{dist/vibrate.d.ts → vibrate.d.ts} +0 -0
- /package/{dist/vibrate.d.ts.map → vibrate.d.ts.map} +0 -0
- /package/{dist/vibrate.js → vibrate.js} +0 -0
package/dist/html.cjs
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isPrefersLightTheme = exports.isPrefersDarkTheme = exports.calcScrollbarWidth = exports.startViewTransitionSafety = exports.checkElementHasParent = exports.sanitizeHtml = exports.globalScrollIntoViewForY = exports.skipEvent = exports.collectOffsetTop = exports.downloadUsingAnchor = exports.getComputedColor = void 0;
|
|
7
|
-
exports.wrapTextToTagLink = wrapTextToTagLink;
|
|
8
|
-
exports.getElementInnerHeight = getElementInnerHeight;
|
|
9
|
-
exports.getElementInnerWidth = getElementInnerWidth;
|
|
10
|
-
const dompurify_1 = __importDefault(require("dompurify"));
|
|
11
|
-
const media_js_1 = require("./media.cjs");
|
|
12
|
-
/**
|
|
13
|
-
* Вытаскивает RGB из любого цвета
|
|
14
|
-
*
|
|
15
|
-
* Не рекомендуется к использованию так как вызывает reflow
|
|
16
|
-
*/
|
|
17
|
-
const getComputedColor = (color) => {
|
|
18
|
-
if (!color)
|
|
19
|
-
return null;
|
|
20
|
-
const d = document.createElement('div');
|
|
21
|
-
d.style.color = color;
|
|
22
|
-
document.body.append(d);
|
|
23
|
-
const rgbcolor = globalThis.getComputedStyle(d).color;
|
|
24
|
-
const match = /rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+[.d+]*)*\)/g.exec(rgbcolor);
|
|
25
|
-
d.remove();
|
|
26
|
-
if (!match)
|
|
27
|
-
return null;
|
|
28
|
-
return `${match[1]}, ${match[2]}, ${match[3]}`;
|
|
29
|
-
};
|
|
30
|
-
exports.getComputedColor = getComputedColor;
|
|
31
|
-
const downloadUsingAnchor = (urlOrBlob, fileName) => {
|
|
32
|
-
const url = (0, media_js_1.blobToUrl)(urlOrBlob);
|
|
33
|
-
const a = document.createElement('a');
|
|
34
|
-
a.href = url;
|
|
35
|
-
a.download = fileName ?? 'file';
|
|
36
|
-
a.target = '_blank';
|
|
37
|
-
document.body.append(a);
|
|
38
|
-
a.click();
|
|
39
|
-
a.remove();
|
|
40
|
-
};
|
|
41
|
-
exports.downloadUsingAnchor = downloadUsingAnchor;
|
|
42
|
-
/**
|
|
43
|
-
* Surrounds string in an anchor tag
|
|
44
|
-
*/
|
|
45
|
-
function wrapTextToTagLink(link) {
|
|
46
|
-
const descr = String(link).replace(/^(https?:\/{0,2})?(w{3}\.)?/, 'www.');
|
|
47
|
-
if (!/^https?:\/{2}/.test(link))
|
|
48
|
-
link = `http://${link}`;
|
|
49
|
-
return `<a href=${link} target="_blank">${descr}</a>`;
|
|
50
|
-
}
|
|
51
|
-
const collectOffsetTop = (element) => {
|
|
52
|
-
let offsetTop = 0;
|
|
53
|
-
let node = element;
|
|
54
|
-
while (node != null) {
|
|
55
|
-
offsetTop += node.offsetTop;
|
|
56
|
-
node = node.parentElement;
|
|
57
|
-
}
|
|
58
|
-
return offsetTop;
|
|
59
|
-
};
|
|
60
|
-
exports.collectOffsetTop = collectOffsetTop;
|
|
61
|
-
const skipEvent = (e) => {
|
|
62
|
-
e.preventDefault();
|
|
63
|
-
e.stopPropagation();
|
|
64
|
-
return false;
|
|
65
|
-
};
|
|
66
|
-
exports.skipEvent = skipEvent;
|
|
67
|
-
const globalScrollIntoViewForY = (node) => {
|
|
68
|
-
const scrollContainer = document.body;
|
|
69
|
-
const pageHeight = window.innerHeight;
|
|
70
|
-
const nodeBounding = node.getBoundingClientRect();
|
|
71
|
-
const scrollPagesCount = scrollContainer.scrollHeight / pageHeight;
|
|
72
|
-
const scrollPageNumber = Math.min(Math.max(nodeBounding.top / pageHeight, 1), scrollPagesCount);
|
|
73
|
-
window.scroll({
|
|
74
|
-
top: scrollPageNumber * pageHeight,
|
|
75
|
-
behavior: 'smooth',
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
exports.globalScrollIntoViewForY = globalScrollIntoViewForY;
|
|
79
|
-
const sanitizeDefaults = {
|
|
80
|
-
ALLOWED_TAGS: [
|
|
81
|
-
'a',
|
|
82
|
-
'article',
|
|
83
|
-
'b',
|
|
84
|
-
'blockquote',
|
|
85
|
-
'br',
|
|
86
|
-
'caption',
|
|
87
|
-
'code',
|
|
88
|
-
'del',
|
|
89
|
-
'details',
|
|
90
|
-
'div',
|
|
91
|
-
'em',
|
|
92
|
-
'h1',
|
|
93
|
-
'h2',
|
|
94
|
-
'h3',
|
|
95
|
-
'h4',
|
|
96
|
-
'h5',
|
|
97
|
-
'h6',
|
|
98
|
-
'hr',
|
|
99
|
-
'i',
|
|
100
|
-
'img',
|
|
101
|
-
'ins',
|
|
102
|
-
'kbd',
|
|
103
|
-
'li',
|
|
104
|
-
'main',
|
|
105
|
-
'ol',
|
|
106
|
-
'p',
|
|
107
|
-
'pre',
|
|
108
|
-
'section',
|
|
109
|
-
'span',
|
|
110
|
-
'strong',
|
|
111
|
-
'sub',
|
|
112
|
-
'summary',
|
|
113
|
-
'sup',
|
|
114
|
-
'table',
|
|
115
|
-
'tbody',
|
|
116
|
-
'td',
|
|
117
|
-
'th',
|
|
118
|
-
'thead',
|
|
119
|
-
'tr',
|
|
120
|
-
'u',
|
|
121
|
-
'ul',
|
|
122
|
-
],
|
|
123
|
-
ALLOWED_ATTR: ['href', 'target', 'name', 'src', 'class'],
|
|
124
|
-
};
|
|
125
|
-
const sanitizeHtml = (html, config) => {
|
|
126
|
-
return dompurify_1.default.sanitize(html || '', {
|
|
127
|
-
...sanitizeDefaults,
|
|
128
|
-
...config,
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
exports.sanitizeHtml = sanitizeHtml;
|
|
132
|
-
const checkElementHasParent = (element, parent) => {
|
|
133
|
-
let node = element;
|
|
134
|
-
if (!parent)
|
|
135
|
-
return false;
|
|
136
|
-
while (node != null) {
|
|
137
|
-
if (node === parent) {
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
node = node.parentElement;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return false;
|
|
145
|
-
};
|
|
146
|
-
exports.checkElementHasParent = checkElementHasParent;
|
|
147
|
-
/**
|
|
148
|
-
* Executes a function within a view transition if supported by the browser.
|
|
149
|
-
*
|
|
150
|
-
* @param {VoidFunction} fn - The function to be executed.
|
|
151
|
-
* @returns {ViewTransition} - The result of the executed function.
|
|
152
|
-
*
|
|
153
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition | MDN: Document.startViewTransition}
|
|
154
|
-
*/
|
|
155
|
-
const startViewTransitionSafety = (fn, params) => {
|
|
156
|
-
if (document.startViewTransition && !params?.disabled) {
|
|
157
|
-
return document.startViewTransition(fn);
|
|
158
|
-
}
|
|
159
|
-
fn();
|
|
160
|
-
};
|
|
161
|
-
exports.startViewTransitionSafety = startViewTransitionSafety;
|
|
162
|
-
/**
|
|
163
|
-
* Вычисляет размер скроллбара
|
|
164
|
-
*/
|
|
165
|
-
const calcScrollbarWidth = () => {
|
|
166
|
-
const outer = document.createElement('div');
|
|
167
|
-
outer.style.visibility = 'hidden';
|
|
168
|
-
outer.style.width = '100px';
|
|
169
|
-
outer.style.overflow = 'scroll';
|
|
170
|
-
document.body.append(outer);
|
|
171
|
-
const inner = document.createElement('div');
|
|
172
|
-
inner.style.width = '100%';
|
|
173
|
-
outer.append(inner);
|
|
174
|
-
const scrollbarWidth = outer.offsetWidth - inner.offsetWidth;
|
|
175
|
-
outer.parentNode?.removeChild(outer);
|
|
176
|
-
return scrollbarWidth;
|
|
177
|
-
};
|
|
178
|
-
exports.calcScrollbarWidth = calcScrollbarWidth;
|
|
179
|
-
/**
|
|
180
|
-
* Calculates the inner height of an HTML element, accounting for padding.
|
|
181
|
-
*/
|
|
182
|
-
function getElementInnerHeight(element) {
|
|
183
|
-
const { clientHeight } = element;
|
|
184
|
-
const { paddingTop, paddingBottom } = getComputedStyle(element);
|
|
185
|
-
return (clientHeight -
|
|
186
|
-
Number.parseFloat(paddingTop) -
|
|
187
|
-
Number.parseFloat(paddingBottom));
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Calculates the inner width of an HTML element, accounting for padding.
|
|
191
|
-
*/
|
|
192
|
-
function getElementInnerWidth(el) {
|
|
193
|
-
const { clientWidth } = el;
|
|
194
|
-
const { paddingLeft, paddingRight } = getComputedStyle(el);
|
|
195
|
-
return (clientWidth -
|
|
196
|
-
Number.parseFloat(paddingLeft) -
|
|
197
|
-
Number.parseFloat(paddingRight));
|
|
198
|
-
}
|
|
199
|
-
const isPrefersDarkTheme = () => !!globalThis.matchMedia?.('(prefers-color-scheme: dark)')?.matches;
|
|
200
|
-
exports.isPrefersDarkTheme = isPrefersDarkTheme;
|
|
201
|
-
const isPrefersLightTheme = () => !!globalThis.matchMedia?.('(prefers-color-scheme: light)')?.matches;
|
|
202
|
-
exports.isPrefersLightTheme = isPrefersLightTheme;
|
package/dist/html.d.cts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type Config as DOMPurifyConfig } from 'dompurify';
|
|
2
|
-
import type { Maybe } from "./utils/types.cjs";
|
|
3
|
-
/**
|
|
4
|
-
* Вытаскивает RGB из любого цвета
|
|
5
|
-
*
|
|
6
|
-
* Не рекомендуется к использованию так как вызывает reflow
|
|
7
|
-
*/
|
|
8
|
-
export declare const getComputedColor: (color?: string) => string | null;
|
|
9
|
-
export declare const downloadUsingAnchor: (urlOrBlob: string | Blob, fileName?: string) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Surrounds string in an anchor tag
|
|
12
|
-
*/
|
|
13
|
-
export declare function wrapTextToTagLink(link: string): string;
|
|
14
|
-
export declare const collectOffsetTop: (element: HTMLElement | null) => number;
|
|
15
|
-
export declare const skipEvent: (e: Event) => boolean;
|
|
16
|
-
export declare const globalScrollIntoViewForY: (node: HTMLElement) => void;
|
|
17
|
-
export declare const sanitizeHtml: (html: Maybe<string>, config?: DOMPurifyConfig) => string;
|
|
18
|
-
export declare const checkElementHasParent: (element: HTMLElement | null, parent: Maybe<HTMLElement>) => boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Executes a function within a view transition if supported by the browser.
|
|
21
|
-
*
|
|
22
|
-
* @param {VoidFunction} fn - The function to be executed.
|
|
23
|
-
* @returns {ViewTransition} - The result of the executed function.
|
|
24
|
-
*
|
|
25
|
-
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition | MDN: Document.startViewTransition}
|
|
26
|
-
*/
|
|
27
|
-
export declare const startViewTransitionSafety: (fn: VoidFunction, params?: {
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
}) => ViewTransition | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Вычисляет размер скроллбара
|
|
32
|
-
*/
|
|
33
|
-
export declare const calcScrollbarWidth: () => number;
|
|
34
|
-
/**
|
|
35
|
-
* Calculates the inner height of an HTML element, accounting for padding.
|
|
36
|
-
*/
|
|
37
|
-
export declare function getElementInnerHeight(element: HTMLElement): number;
|
|
38
|
-
/**
|
|
39
|
-
* Calculates the inner width of an HTML element, accounting for padding.
|
|
40
|
-
*/
|
|
41
|
-
export declare function getElementInnerWidth(el: HTMLElement): number;
|
|
42
|
-
export declare const isPrefersDarkTheme: () => boolean;
|
|
43
|
-
export declare const isPrefersLightTheme: () => boolean;
|
|
44
|
-
//# sourceMappingURL=html.d.ts.map
|
package/dist/html.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,KAAK,MAAM,IAAI,eAAe,EAAE,MAAM,WAAW,CAAC;AAGtE,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAyB;AAE9C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAe1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,GAAG,IAAI,EACxB,WAAW,MAAM,SAgBlB,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,UAI7C;AAED,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,GAAG,IAAI,WAU3D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,GAAG,KAAK,YAKjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,WAAW,SAezD,CAAC;AAiDF,eAAO,MAAM,YAAY,GAAI,MAAM,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,eAAe,WAKzE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,WAAW,GAAG,IAAI,EAC3B,QAAQ,KAAK,CAAC,WAAW,CAAC,YAe3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACpC,IAAI,YAAY,EAChB,SAAS;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAMhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,cAmB9B,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,UAQzD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,UAQnD;AAED,eAAO,MAAM,kBAAkB,eACqC,CAAC;AAErE,eAAO,MAAM,mBAAmB,eACqC,CAAC"}
|
package/dist/html.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,KAAK,MAAM,IAAI,eAAe,EAAE,MAAM,WAAW,CAAC;AAGtE,OAAO,KAAK,EAAE,KAAK,EAAE,yBAAyB;AAE9C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,IAe1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,GAAG,IAAI,EACxB,WAAW,MAAM,SAgBlB,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,UAI7C;AAED,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,GAAG,IAAI,WAU3D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,GAAG,KAAK,YAKjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,WAAW,SAezD,CAAC;AAiDF,eAAO,MAAM,YAAY,GAAI,MAAM,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,eAAe,WAKzE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,WAAW,GAAG,IAAI,EAC3B,QAAQ,KAAK,CAAC,WAAW,CAAC,YAe3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,GACpC,IAAI,YAAY,EAChB,SAAS;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAMhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,cAmB9B,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,UAQzD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,WAAW,UAQnD;AAED,eAAO,MAAM,kBAAkB,eACqC,CAAC;AAErE,eAAO,MAAM,mBAAmB,eACqC,CAAC"}
|
package/dist/id.cjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateStackBasedId = exports.generateLinearNumericId = exports.createLinearNumericIdGenerator = exports.generateNumericShortId = exports.generateNumericId = exports.generateShortId = exports.generateId = void 0;
|
|
4
|
-
const nanoid_1 = require("nanoid");
|
|
5
|
-
const DIGITS = '0123456789';
|
|
6
|
-
const LATIN_CHARS = 'abcdefghijklmnopqrstuvwxyz';
|
|
7
|
-
const ALPHABET = `${LATIN_CHARS}${DIGITS}`;
|
|
8
|
-
/**
|
|
9
|
-
* Использует алфавит abcdefghijklmnopqrstuvwxyz0123456789
|
|
10
|
-
* Размер 6
|
|
11
|
-
*/
|
|
12
|
-
exports.generateId = (0, nanoid_1.customAlphabet)(ALPHABET, 6);
|
|
13
|
-
/**
|
|
14
|
-
* Использует алфавит abcdefghijklmnopqrstuvwxyz0123456789
|
|
15
|
-
* Размер 4
|
|
16
|
-
*/
|
|
17
|
-
exports.generateShortId = (0, nanoid_1.customAlphabet)(ALPHABET, 4);
|
|
18
|
-
/**
|
|
19
|
-
* Использует алфавит 0123456789
|
|
20
|
-
* Размер 6
|
|
21
|
-
*/
|
|
22
|
-
exports.generateNumericId = (0, nanoid_1.customAlphabet)(DIGITS, 6);
|
|
23
|
-
/**
|
|
24
|
-
* Использует алфавит 0123456789
|
|
25
|
-
* Размер 4
|
|
26
|
-
*/
|
|
27
|
-
exports.generateNumericShortId = (0, nanoid_1.customAlphabet)(DIGITS, 4);
|
|
28
|
-
/**
|
|
29
|
-
* Создает функцию, которая будет создавать уникальную строку, уникальность которой основана на порядке вызова этой функции
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* generateLinearNumericId = createLinearNumericIdGenerator(6);
|
|
34
|
-
* generateLinearNumericId() // '000000'
|
|
35
|
-
* generateLinearNumericId() // '000001'
|
|
36
|
-
* ...
|
|
37
|
-
* generateLinearNumericId() // '999999'
|
|
38
|
-
* generateLinearNumericId() // '1000000'
|
|
39
|
-
* ...
|
|
40
|
-
* generateLinearNumericId() // '9999999'
|
|
41
|
-
* generateLinearNumericId() // '10000000'
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* @param size размер
|
|
45
|
-
* @returns {()=>string}
|
|
46
|
-
*/
|
|
47
|
-
const createLinearNumericIdGenerator = (size = 9) => {
|
|
48
|
-
let lastCount = 0;
|
|
49
|
-
return () => {
|
|
50
|
-
return (lastCount++).toString().padStart(size, '0');
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
exports.createLinearNumericIdGenerator = createLinearNumericIdGenerator;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* generateLinearNumericId() // '000000000'
|
|
59
|
-
* generateLinearNumericId() // '000000001'
|
|
60
|
-
* ...
|
|
61
|
-
* generateLinearNumericId() // '999999999'
|
|
62
|
-
* generateLinearNumericId() // '1000000000'
|
|
63
|
-
* ...
|
|
64
|
-
* generateLinearNumericId() // '9999999999'
|
|
65
|
-
* generateLinearNumericId() // '10000000000'
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
exports.generateLinearNumericId = (0, exports.createLinearNumericIdGenerator)();
|
|
70
|
-
/**
|
|
71
|
-
* Is not recommended to use.
|
|
72
|
-
*
|
|
73
|
-
* Generates execution stack based pseudo-id (just sliced string from error stack)
|
|
74
|
-
*/
|
|
75
|
-
const generateStackBasedId = () => new Error().stack.split('\n').slice(1, 4).join('');
|
|
76
|
-
exports.generateStackBasedId = generateStackBasedId;
|
package/dist/id.d.cts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Использует алфавит abcdefghijklmnopqrstuvwxyz0123456789
|
|
3
|
-
* Размер 6
|
|
4
|
-
*/
|
|
5
|
-
export declare const generateId: (size?: number) => string;
|
|
6
|
-
/**
|
|
7
|
-
* Использует алфавит abcdefghijklmnopqrstuvwxyz0123456789
|
|
8
|
-
* Размер 4
|
|
9
|
-
*/
|
|
10
|
-
export declare const generateShortId: (size?: number) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Использует алфавит 0123456789
|
|
13
|
-
* Размер 6
|
|
14
|
-
*/
|
|
15
|
-
export declare const generateNumericId: (size?: number) => string;
|
|
16
|
-
/**
|
|
17
|
-
* Использует алфавит 0123456789
|
|
18
|
-
* Размер 4
|
|
19
|
-
*/
|
|
20
|
-
export declare const generateNumericShortId: (size?: number) => string;
|
|
21
|
-
/**
|
|
22
|
-
* Создает функцию, которая будет создавать уникальную строку, уникальность которой основана на порядке вызова этой функции
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* generateLinearNumericId = createLinearNumericIdGenerator(6);
|
|
27
|
-
* generateLinearNumericId() // '000000'
|
|
28
|
-
* generateLinearNumericId() // '000001'
|
|
29
|
-
* ...
|
|
30
|
-
* generateLinearNumericId() // '999999'
|
|
31
|
-
* generateLinearNumericId() // '1000000'
|
|
32
|
-
* ...
|
|
33
|
-
* generateLinearNumericId() // '9999999'
|
|
34
|
-
* generateLinearNumericId() // '10000000'
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @param size размер
|
|
38
|
-
* @returns {()=>string}
|
|
39
|
-
*/
|
|
40
|
-
export declare const createLinearNumericIdGenerator: (size?: number) => () => string;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* generateLinearNumericId() // '000000000'
|
|
46
|
-
* generateLinearNumericId() // '000000001'
|
|
47
|
-
* ...
|
|
48
|
-
* generateLinearNumericId() // '999999999'
|
|
49
|
-
* generateLinearNumericId() // '1000000000'
|
|
50
|
-
* ...
|
|
51
|
-
* generateLinearNumericId() // '9999999999'
|
|
52
|
-
* generateLinearNumericId() // '10000000000'
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export declare const generateLinearNumericId: () => string;
|
|
57
|
-
/**
|
|
58
|
-
* Is not recommended to use.
|
|
59
|
-
*
|
|
60
|
-
* Generates execution stack based pseudo-id (just sliced string from error stack)
|
|
61
|
-
*/
|
|
62
|
-
export declare const generateStackBasedId: () => string;
|
|
63
|
-
//# sourceMappingURL=id.d.ts.map
|
package/dist/id.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,eAAO,MAAM,UAAU,2BAA8B,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,eAAe,2BAA8B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,2BAA4B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,sBAAsB,2BAA4B,CAAC;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,8BAA8B,GAAI,OAAM,MAAU,iBAK9D,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,cAAmC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,cACoB,CAAC"}
|
package/dist/imports.cjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unpackAsyncModule = exports.fetchLazyModule = void 0;
|
|
4
|
-
const async_js_1 = require("./async.cjs");
|
|
5
|
-
/**
|
|
6
|
-
* Функция ленивой загрузки модуля, с возможностью вызова доп. попыток
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* fetchLazyModule(() => import("./test.ts"), 3) // начнет загрузку test.ts
|
|
10
|
-
* // Произошла ошибка загрузки test.ts, тогда fetchLazyModule повторно вызовет fn()
|
|
11
|
-
* // Вызывать будет столько раз сколько указано attempts (по умолчанию 3)
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
const fetchLazyModule = async (fetchModule, attempts = 3, delay = 1000) => {
|
|
15
|
-
const attemptsArray = Array.from({
|
|
16
|
-
length: attempts,
|
|
17
|
-
}).fill(fetchModule);
|
|
18
|
-
let lastError = null;
|
|
19
|
-
for await (const attempt of attemptsArray) {
|
|
20
|
-
try {
|
|
21
|
-
if (lastError !== null) {
|
|
22
|
-
await (0, async_js_1.sleep)(delay);
|
|
23
|
-
}
|
|
24
|
-
return await attempt();
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
lastError = error;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
throw lastError;
|
|
31
|
-
};
|
|
32
|
-
exports.fetchLazyModule = fetchLazyModule;
|
|
33
|
-
const unpackAsyncModule = async (maybeModule) => {
|
|
34
|
-
if (maybeModule instanceof Promise) {
|
|
35
|
-
const data = (await maybeModule);
|
|
36
|
-
if (data.default) {
|
|
37
|
-
return data.default;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return maybeModule;
|
|
44
|
-
};
|
|
45
|
-
exports.unpackAsyncModule = unpackAsyncModule;
|
package/dist/imports.d.cts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Функция ленивой загрузки модуля, с возможностью вызова доп. попыток
|
|
3
|
-
* @example
|
|
4
|
-
* ```ts
|
|
5
|
-
* fetchLazyModule(() => import("./test.ts"), 3) // начнет загрузку test.ts
|
|
6
|
-
* // Произошла ошибка загрузки test.ts, тогда fetchLazyModule повторно вызовет fn()
|
|
7
|
-
* // Вызывать будет столько раз сколько указано attempts (по умолчанию 3)
|
|
8
|
-
* ```
|
|
9
|
-
*/
|
|
10
|
-
export declare const fetchLazyModule: <T>(fetchModule: () => Promise<T>, attempts?: number, delay?: number) => Promise<T>;
|
|
11
|
-
export type PackedAsyncModule<T> = Promise<T | {
|
|
12
|
-
default: T;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const unpackAsyncModule: <T>(maybeModule: T | PackedAsyncModule<T>) => Promise<T>;
|
|
15
|
-
//# sourceMappingURL=imports.d.ts.map
|
package/dist/imports.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAU,CAAC,EACrC,aAAa,MAAM,OAAO,CAAC,CAAC,CAAC,EAC7B,iBAAY,EACZ,cAAY,KACX,OAAO,CAAC,CAAC,CAkBX,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAE/D,eAAO,MAAM,iBAAiB,GAAU,CAAC,EACvC,aAAa,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,KACpC,OAAO,CAAC,CAAC,CAYX,CAAC"}
|
package/dist/math.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.percentFrom = void 0;
|
|
4
|
-
exports.degToRad = degToRad;
|
|
5
|
-
exports.radToDeg = radToDeg;
|
|
6
|
-
function degToRad(deg) {
|
|
7
|
-
return deg * (Math.PI / 180);
|
|
8
|
-
}
|
|
9
|
-
function radToDeg(rad) {
|
|
10
|
-
return rad * (180 / Math.PI);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Получить процент от числа
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* percentFrom(500, 2000) // 25
|
|
17
|
-
* percentFrom(1000, 2000) // 50
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
const percentFrom = (value, from) => {
|
|
21
|
-
return ((value ?? 0) / (from ?? 0)) * 100 || 0;
|
|
22
|
-
};
|
|
23
|
-
exports.percentFrom = percentFrom;
|
package/dist/math.d.cts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Maybe } from "./utils/types.cjs";
|
|
2
|
-
export declare function degToRad(deg: number): number;
|
|
3
|
-
export declare function radToDeg(rad: number): number;
|
|
4
|
-
/**
|
|
5
|
-
* Получить процент от числа
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* percentFrom(500, 2000) // 25
|
|
9
|
-
* percentFrom(1000, 2000) // 50
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export declare const percentFrom: (value: Maybe<number>, from: Maybe<number>) => number;
|
|
13
|
-
//# sourceMappingURL=math.d.ts.map
|
package/dist/math.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../src/math.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAyB;AAE9C,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,WAEpE,CAAC"}
|
package/dist/math.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../src/math.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,yBAAyB;AAE9C,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,WAEpE,CAAC"}
|
package/dist/media.cjs
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isBase64Image = exports.isHttpUrl = exports.rotateImage = exports.renderImage = exports.imageToBlob = exports.fileToBlob = exports.blobToUrl = void 0;
|
|
4
|
-
exports.blobToBase64 = blobToBase64;
|
|
5
|
-
exports.decodeDataUrl = decodeDataUrl;
|
|
6
|
-
const math_js_1 = require("./math.cjs");
|
|
7
|
-
function blobToBase64(blob) {
|
|
8
|
-
return new Promise((resolve, reject) => {
|
|
9
|
-
const reader = new FileReader();
|
|
10
|
-
reader.onloadend = () => resolve(reader.result);
|
|
11
|
-
reader.onerror = reject;
|
|
12
|
-
reader.readAsDataURL(blob);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
const blobToUrl = (urlOrBlob) => urlOrBlob instanceof Blob ? URL.createObjectURL(urlOrBlob) : urlOrBlob;
|
|
16
|
-
exports.blobToUrl = blobToUrl;
|
|
17
|
-
const fileToBlob = (file) => {
|
|
18
|
-
return new Blob([file], { type: file.type });
|
|
19
|
-
};
|
|
20
|
-
exports.fileToBlob = fileToBlob;
|
|
21
|
-
const imageToBlob = (imageElement, mimeType = 'image/png') => {
|
|
22
|
-
const canvas = document.createElement('canvas');
|
|
23
|
-
canvas.width = imageElement.naturalWidth || 300;
|
|
24
|
-
canvas.height = imageElement.naturalHeight || 300;
|
|
25
|
-
canvas.getContext('2d').drawImage(imageElement, 0, 0);
|
|
26
|
-
const dataUri = canvas.toDataURL(mimeType, 1);
|
|
27
|
-
const base64data = dataUri.split(',')[1];
|
|
28
|
-
const base64MimeType = dataUri.split(';')[0].slice(5);
|
|
29
|
-
const bytes = globalThis.atob(base64data);
|
|
30
|
-
const buf = new ArrayBuffer(bytes.length);
|
|
31
|
-
const array = new Uint8Array(buf);
|
|
32
|
-
for (let index = 0; index < bytes.length; index++) {
|
|
33
|
-
array[index] = bytes.charCodeAt(index);
|
|
34
|
-
}
|
|
35
|
-
const blob = new Blob([array], { type: base64MimeType });
|
|
36
|
-
return blob;
|
|
37
|
-
};
|
|
38
|
-
exports.imageToBlob = imageToBlob;
|
|
39
|
-
/**
|
|
40
|
-
* Загружает и отрисовывает изображение с использованием Image
|
|
41
|
-
*
|
|
42
|
-
* @returns {Promise<HTMLImageElement>}
|
|
43
|
-
*/
|
|
44
|
-
const renderImage = (urlOrBlob) => new Promise((resolve, reject) => {
|
|
45
|
-
const image = new Image();
|
|
46
|
-
image.src = (0, exports.blobToUrl)(urlOrBlob);
|
|
47
|
-
image.onload = () => resolve(image);
|
|
48
|
-
image.onerror = () => reject();
|
|
49
|
-
});
|
|
50
|
-
exports.renderImage = renderImage;
|
|
51
|
-
function cropImageFromCanvas(context) {
|
|
52
|
-
const canvas = context.canvas;
|
|
53
|
-
let w = canvas.width;
|
|
54
|
-
let h = canvas.height;
|
|
55
|
-
const pix = { x: [], y: [] };
|
|
56
|
-
const imageData = context.getImageData(0, 0, canvas.width, canvas.height);
|
|
57
|
-
let x;
|
|
58
|
-
let y;
|
|
59
|
-
let index;
|
|
60
|
-
for (y = 0; y < h; y++) {
|
|
61
|
-
for (x = 0; x < w; x++) {
|
|
62
|
-
index = (y * w + x) * 4;
|
|
63
|
-
if (imageData.data[index + 3] > 0) {
|
|
64
|
-
pix.x.push(x);
|
|
65
|
-
pix.y.push(y);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
pix.x.sort((a, b) => a - b);
|
|
70
|
-
pix.y.sort((a, b) => a - b);
|
|
71
|
-
const n = pix.x.length - 1;
|
|
72
|
-
w = 1 + pix.x[n] - pix.x[0];
|
|
73
|
-
h = 1 + pix.y[n] - pix.y[0];
|
|
74
|
-
const cut = context.getImageData(pix.x[0], pix.y[0], w, h);
|
|
75
|
-
canvas.width = w;
|
|
76
|
-
canvas.height = h;
|
|
77
|
-
context.putImageData(cut, 0, 0);
|
|
78
|
-
return canvas;
|
|
79
|
-
}
|
|
80
|
-
// TODO: ломает iphone с огромными изображениями
|
|
81
|
-
const rotateImage = (image, angle) => {
|
|
82
|
-
const maxSize = Math.max(image.width, image.height);
|
|
83
|
-
const canvas = document.createElement('canvas');
|
|
84
|
-
canvas.width = maxSize;
|
|
85
|
-
canvas.height = maxSize;
|
|
86
|
-
const context = canvas.getContext('2d');
|
|
87
|
-
context.save();
|
|
88
|
-
context.translate(canvas.width / 2, canvas.height / 2);
|
|
89
|
-
context.rotate((0, math_js_1.degToRad)(angle));
|
|
90
|
-
context.drawImage(image, -image.width / 2, -image.height / 2);
|
|
91
|
-
context.restore();
|
|
92
|
-
cropImageFromCanvas(context);
|
|
93
|
-
return (0, exports.renderImage)(canvas.toDataURL('image/png'));
|
|
94
|
-
};
|
|
95
|
-
exports.rotateImage = rotateImage;
|
|
96
|
-
/*
|
|
97
|
-
* Returning object which contains base64 data and mime type of passed data url string.
|
|
98
|
-
* */
|
|
99
|
-
function decodeDataUrl(url) {
|
|
100
|
-
const regex = /^data:(.*);base64,\s?(.*)$/;
|
|
101
|
-
const matches = new RegExp(regex).exec(url);
|
|
102
|
-
return {
|
|
103
|
-
mimeType: matches?.[1],
|
|
104
|
-
data: matches?.[2],
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
const isHttpUrl = (url) => {
|
|
108
|
-
return url.startsWith('https://') || url.startsWith('http://');
|
|
109
|
-
};
|
|
110
|
-
exports.isHttpUrl = isHttpUrl;
|
|
111
|
-
const isBase64Image = (str) => {
|
|
112
|
-
const { mimeType, data } = decodeDataUrl(str);
|
|
113
|
-
return !!(data && mimeType?.startsWith('image/'));
|
|
114
|
-
};
|
|
115
|
-
exports.isBase64Image = isBase64Image;
|
package/dist/media.d.cts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare function blobToBase64(blob: Blob): Promise<string>;
|
|
2
|
-
export declare const blobToUrl: (urlOrBlob: string | Blob) => string;
|
|
3
|
-
export declare const fileToBlob: (file: File) => Blob;
|
|
4
|
-
export declare const imageToBlob: (imageElement: HTMLImageElement, mimeType?: string) => Blob;
|
|
5
|
-
/**
|
|
6
|
-
* Загружает и отрисовывает изображение с использованием Image
|
|
7
|
-
*
|
|
8
|
-
* @returns {Promise<HTMLImageElement>}
|
|
9
|
-
*/
|
|
10
|
-
export declare const renderImage: (urlOrBlob: Blob | string) => Promise<HTMLImageElement>;
|
|
11
|
-
export declare const rotateImage: (image: HTMLImageElement, angle: number) => Promise<HTMLImageElement>;
|
|
12
|
-
interface DecodedDataUrl {
|
|
13
|
-
mimeType?: string;
|
|
14
|
-
data?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function decodeDataUrl(url: string): DecodedDataUrl;
|
|
17
|
-
export declare const isHttpUrl: (url: string) => boolean;
|
|
18
|
-
export declare const isBase64Image: (str: string) => boolean;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=media.d.ts.map
|
package/dist/media.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxD;AAED,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,GAAG,IAAI,WACsB,CAAC;AAEzE,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,SAEpC,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,cAAc,gBAAgB,EAC9B,WAAU,MAAoB,SAwB/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,WAAW,IAAI,GAAG,MAAM,8BAMhD,CAAC;AAoCL,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,EAAE,OAAO,MAAM,8BAajE,CAAC;AAEF,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAKD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAQzD;AAED,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,OAEvC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,OAG3C,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyObservable = void 0;
|
|
4
|
-
const mobx_1 = require("mobx");
|
|
5
|
-
const applyObservable = (context, annotationsArray, useDecorators) => {
|
|
6
|
-
if (useDecorators) {
|
|
7
|
-
annotationsArray.forEach(([field, annotation]) => {
|
|
8
|
-
annotation(context, field);
|
|
9
|
-
});
|
|
10
|
-
(0, mobx_1.makeObservable)(context);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
(0, mobx_1.makeObservable)(context, Object.fromEntries(annotationsArray));
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
exports.applyObservable = applyObservable;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AnyObject } from "../utils/types.cjs";
|
|
2
|
-
export type ObservableAnnotationsArray = [string, any][];
|
|
3
|
-
export declare const applyObservable: (context: AnyObject, annotationsArray: ObservableAnnotationsArray, useDecorators?: boolean) => void;
|
|
4
|
-
//# sourceMappingURL=apply-observable.d.ts.map
|