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/random.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFrequencyValue = exports.getMinorRandomBool = exports.getMajorRandomBool = exports.getRandomBool = exports.getRandomSizeArray = exports.getRandomChoice = exports.getRandomInt = exports.getRandomFloat = void 0;
|
|
4
|
-
const getRandomFloat = (min = 0, max = 1) => (Math.random() * (max - min) + min);
|
|
5
|
-
exports.getRandomFloat = getRandomFloat;
|
|
6
|
-
const getRandomInt = (min = 0, max = 1) => min === max ? min : Math.round((0, exports.getRandomFloat)(min, max));
|
|
7
|
-
exports.getRandomInt = getRandomInt;
|
|
8
|
-
const getRandomChoice = (arr) => arr[(0, exports.getRandomInt)(0, arr.length - 1)];
|
|
9
|
-
exports.getRandomChoice = getRandomChoice;
|
|
10
|
-
const getRandomSizeArray = (min = 0, max = 10) => Array.from({ length: (0, exports.getRandomInt)(min, max) }).fill(null);
|
|
11
|
-
exports.getRandomSizeArray = getRandomSizeArray;
|
|
12
|
-
const getRandomBool = () => (0, exports.getRandomInt)(0, 1) === 1;
|
|
13
|
-
exports.getRandomBool = getRandomBool;
|
|
14
|
-
const getMajorRandomBool = () => {
|
|
15
|
-
return (0, exports.getRandomInt)(0, 10) <= 6;
|
|
16
|
-
};
|
|
17
|
-
exports.getMajorRandomBool = getMajorRandomBool;
|
|
18
|
-
const getMinorRandomBool = () => {
|
|
19
|
-
return !(0, exports.getMajorRandomBool)();
|
|
20
|
-
};
|
|
21
|
-
exports.getMinorRandomBool = getMinorRandomBool;
|
|
22
|
-
const getFrequencyValue = (frequency) => {
|
|
23
|
-
return Math.random() < frequency;
|
|
24
|
-
};
|
|
25
|
-
exports.getFrequencyValue = getFrequencyValue;
|
package/dist/random.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const getRandomFloat: <T extends number = number>(min?: number, max?: number) => T;
|
|
2
|
-
export declare const getRandomInt: <T extends number = number>(min?: number, max?: number) => T;
|
|
3
|
-
export declare const getRandomChoice: <T>(arr: T[]) => T;
|
|
4
|
-
export declare const getRandomSizeArray: (min?: number, max?: number) => unknown[];
|
|
5
|
-
export declare const getRandomBool: () => boolean;
|
|
6
|
-
export declare const getMajorRandomBool: () => boolean;
|
|
7
|
-
export declare const getMinorRandomBool: () => boolean;
|
|
8
|
-
export declare const getFrequencyValue: (frequency: number) => boolean;
|
|
9
|
-
//# sourceMappingURL=random.d.ts.map
|
package/dist/random.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../src/random.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,EACtD,YAAO,EACP,YAAO,KACN,CAA6C,CAAC;AAEjD,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,YAAO,EAAE,YAAO,KAAG,CACH,CAAC;AAEzE,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,KAAK,CAAC,EAAE,KAAG,CACR,CAAC;AAEvC,eAAO,MAAM,kBAAkB,GAAI,YAAO,EAAE,YAAQ,cACO,CAAC;AAE5D,eAAO,MAAM,aAAa,eAAiC,CAAC;AAE5D,eAAO,MAAM,kBAAkB,eAE9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,eAE9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,YAElD,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./use-abort-controller.cjs"), exports);
|
|
18
|
-
__exportStar(require("./use-abort-signal.cjs"), exports);
|
|
19
|
-
__exportStar(require("./use-click-outside.cjs"), exports);
|
|
20
|
-
__exportStar(require("./use-constant.cjs"), exports);
|
|
21
|
-
__exportStar(require("./use-define-ref.cjs"), exports);
|
|
22
|
-
__exportStar(require("./use-element-ref.cjs"), exports);
|
|
23
|
-
__exportStar(require("./use-event.cjs"), exports);
|
|
24
|
-
__exportStar(require("./use-event-listener.cjs"), exports);
|
|
25
|
-
__exportStar(require("./use-flag.cjs"), exports);
|
|
26
|
-
__exportStar(require("./use-force-update.cjs"), exports);
|
|
27
|
-
__exportStar(require("./use-initial-height.cjs"), exports);
|
|
28
|
-
__exportStar(require("./use-instance.cjs"), exports);
|
|
29
|
-
__exportStar(require("./use-intersection-observer.cjs"), exports);
|
|
30
|
-
__exportStar(require("./use-last-defined-value.cjs"), exports);
|
|
31
|
-
__exportStar(require("./use-last-value-ref.cjs"), exports);
|
|
32
|
-
__exportStar(require("./use-life-cycle.cjs"), exports);
|
|
33
|
-
__exportStar(require("./use-resize-observer.cjs"), exports);
|
|
34
|
-
__exportStar(require("./use-sync-ref.cjs"), exports);
|
|
35
|
-
__exportStar(require("./use-toggle.cjs"), exports);
|
|
36
|
-
__exportStar(require("./use-value.cjs"), exports);
|
|
37
|
-
__exportStar(require("./use-visibility-state.cjs"), exports);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from "./use-abort-controller.cjs";
|
|
2
|
-
export * from "./use-abort-signal.cjs";
|
|
3
|
-
export * from "./use-click-outside.cjs";
|
|
4
|
-
export * from "./use-constant.cjs";
|
|
5
|
-
export * from "./use-define-ref.cjs";
|
|
6
|
-
export * from "./use-element-ref.cjs";
|
|
7
|
-
export * from "./use-event.cjs";
|
|
8
|
-
export * from "./use-event-listener.cjs";
|
|
9
|
-
export * from "./use-flag.cjs";
|
|
10
|
-
export * from "./use-force-update.cjs";
|
|
11
|
-
export * from "./use-initial-height.cjs";
|
|
12
|
-
export * from "./use-instance.cjs";
|
|
13
|
-
export * from "./use-intersection-observer.cjs";
|
|
14
|
-
export * from "./use-last-defined-value.cjs";
|
|
15
|
-
export * from "./use-last-value-ref.cjs";
|
|
16
|
-
export * from "./use-life-cycle.cjs";
|
|
17
|
-
export * from "./use-resize-observer.cjs";
|
|
18
|
-
export * from "./use-sync-ref.cjs";
|
|
19
|
-
export * from "./use-toggle.cjs";
|
|
20
|
-
export * from "./use-value.cjs";
|
|
21
|
-
export * from "./use-visibility-state.cjs";
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,2CAA0C;AAC1C,uCAAsC;AACtC,wCAAuC;AACvC,mCAAkC;AAClC,qCAAoC;AACpC,sCAAqC;AACrC,gCAA+B;AAC/B,yCAAwC;AACxC,+BAA8B;AAC9B,uCAAsC;AACtC,yCAAwC;AACxC,mCAAkC;AAClC,gDAA+C;AAC/C,6CAA4C;AAC5C,yCAAwC;AACxC,qCAAoC;AACpC,0CAAyC;AACzC,mCAAkC;AAClC,iCAAgC;AAChC,gCAA+B;AAC/B,2CAA0C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export * from "./use-abort-controller.js";
|
|
2
|
-
export * from "./use-abort-signal.js";
|
|
3
|
-
export * from "./use-click-outside.js";
|
|
4
|
-
export * from "./use-constant.js";
|
|
5
|
-
export * from "./use-define-ref.js";
|
|
6
|
-
export * from "./use-element-ref.js";
|
|
7
|
-
export * from "./use-event.js";
|
|
8
|
-
export * from "./use-event-listener.js";
|
|
9
|
-
export * from "./use-flag.js";
|
|
10
|
-
export * from "./use-force-update.js";
|
|
11
|
-
export * from "./use-initial-height.js";
|
|
12
|
-
export * from "./use-instance.js";
|
|
13
|
-
export * from "./use-intersection-observer.js";
|
|
14
|
-
export * from "./use-last-defined-value.js";
|
|
15
|
-
export * from "./use-last-value-ref.js";
|
|
16
|
-
export * from "./use-life-cycle.js";
|
|
17
|
-
export * from "./use-resize-observer.js";
|
|
18
|
-
export * from "./use-sync-ref.js";
|
|
19
|
-
export * from "./use-toggle.js";
|
|
20
|
-
export * from "./use-value.js";
|
|
21
|
-
export * from "./use-visibility-state.js";
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,sCAAsC;AACtC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC,qCAAqC;AACrC,+BAA+B;AAC/B,wCAAwC;AACxC,8BAA8B;AAC9B,sCAAsC;AACtC,wCAAwC;AACxC,kCAAkC;AAClC,+CAA+C;AAC/C,4CAA4C;AAC5C,wCAAwC;AACxC,oCAAoC;AACpC,yCAAyC;AACzC,kCAAkC;AAClC,gCAAgC;AAChC,+BAA+B;AAC/B,0CAA0C"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export * from "./use-abort-controller.js";
|
|
2
|
-
export * from "./use-abort-signal.js";
|
|
3
|
-
export * from "./use-click-outside.js";
|
|
4
|
-
export * from "./use-constant.js";
|
|
5
|
-
export * from "./use-define-ref.js";
|
|
6
|
-
export * from "./use-element-ref.js";
|
|
7
|
-
export * from "./use-event.js";
|
|
8
|
-
export * from "./use-event-listener.js";
|
|
9
|
-
export * from "./use-flag.js";
|
|
10
|
-
export * from "./use-force-update.js";
|
|
11
|
-
export * from "./use-initial-height.js";
|
|
12
|
-
export * from "./use-instance.js";
|
|
13
|
-
export * from "./use-intersection-observer.js";
|
|
14
|
-
export * from "./use-last-defined-value.js";
|
|
15
|
-
export * from "./use-last-value-ref.js";
|
|
16
|
-
export * from "./use-life-cycle.js";
|
|
17
|
-
export * from "./use-resize-observer.js";
|
|
18
|
-
export * from "./use-sync-ref.js";
|
|
19
|
-
export * from "./use-toggle.js";
|
|
20
|
-
export * from "./use-value.js";
|
|
21
|
-
export * from "./use-visibility-state.js";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAbortController = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const use_constant_js_1 = require("./use-constant.cjs");
|
|
6
|
-
const useAbortController = () => {
|
|
7
|
-
const controller = (0, use_constant_js_1.useConstant)(() => new AbortController());
|
|
8
|
-
(0, react_1.useEffect)(() => {
|
|
9
|
-
return () => {
|
|
10
|
-
controller.abort();
|
|
11
|
-
};
|
|
12
|
-
}, []);
|
|
13
|
-
return controller;
|
|
14
|
-
};
|
|
15
|
-
exports.useAbortController = useAbortController;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-abort-controller.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-abort-controller.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,uBAU9B,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAbortSignal = void 0;
|
|
4
|
-
const use_abort_controller_js_1 = require("./use-abort-controller.cjs");
|
|
5
|
-
const useAbortSignal = () => {
|
|
6
|
-
return (0, use_abort_controller_js_1.useAbortController)().signal;
|
|
7
|
-
};
|
|
8
|
-
exports.useAbortSignal = useAbortSignal;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-abort-signal.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-abort-signal.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,mBAE1B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useClickOutside = void 0;
|
|
4
|
-
const use_event_listener_js_1 = require("./use-event-listener.cjs");
|
|
5
|
-
const useClickOutside = ({ contentRef, onClick, options, }) => {
|
|
6
|
-
(0, use_event_listener_js_1.useEventListener)({
|
|
7
|
-
event: 'mousedown',
|
|
8
|
-
handler: (event) => {
|
|
9
|
-
if (contentRef.current &&
|
|
10
|
-
!contentRef.current.contains(event.target)) {
|
|
11
|
-
onClick();
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
options,
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
exports.useClickOutside = useClickOutside;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { MutableRefObject } from 'react';
|
|
2
|
-
type ClickOutsideInput = {
|
|
3
|
-
contentRef: MutableRefObject<HTMLElement | null>;
|
|
4
|
-
onClick: VoidFunction;
|
|
5
|
-
options?: AddEventListenerOptions;
|
|
6
|
-
};
|
|
7
|
-
export declare const useClickOutside: ({ contentRef, onClick, options, }: ClickOutsideInput) => void;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=use-click-outside.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-click-outside.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-click-outside.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAG9C,KAAK,iBAAiB,GAAG;IACvB,UAAU,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,mCAI7B,iBAAiB,SAanB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useConstant = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* React hook for creating a value exactly once.
|
|
7
|
-
* useMemo doesn't give this guarantee unfortunately -
|
|
8
|
-
* https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
|
|
9
|
-
* https://reactjs.org/docs/hooks-reference.html#usememo
|
|
10
|
-
* @param defineValue Function which returns defined value.
|
|
11
|
-
*/
|
|
12
|
-
const useConstant = (defineValue) => {
|
|
13
|
-
const ref = (0, react_1.useRef)();
|
|
14
|
-
if (!ref.current) {
|
|
15
|
-
ref.current = { value: defineValue() };
|
|
16
|
-
}
|
|
17
|
-
return ref.current.value;
|
|
18
|
-
};
|
|
19
|
-
exports.useConstant = useConstant;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React hook for creating a value exactly once.
|
|
3
|
-
* useMemo doesn't give this guarantee unfortunately -
|
|
4
|
-
* https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
|
|
5
|
-
* https://reactjs.org/docs/hooks-reference.html#usememo
|
|
6
|
-
* @param defineValue Function which returns defined value.
|
|
7
|
-
*/
|
|
8
|
-
export declare const useConstant: <T>(defineValue: () => T) => T;
|
|
9
|
-
//# sourceMappingURL=use-constant.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-constant.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-constant.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,aAAa,MAAM,CAAC,KAAG,CAQrD,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDefineRef = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
/**
|
|
6
|
-
* React hook for creating a value exactly once.
|
|
7
|
-
* useMemo doesn't give this guarantee unfortunately -
|
|
8
|
-
* https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
|
|
9
|
-
* https://reactjs.org/docs/hooks-reference.html#usememo
|
|
10
|
-
* @param defineFn Function which returns defined value.
|
|
11
|
-
*/
|
|
12
|
-
const useDefineRef = (defineFn) => {
|
|
13
|
-
const ref = (0, react_1.useRef)(void 0);
|
|
14
|
-
if (!ref.current) {
|
|
15
|
-
ref.current = defineFn();
|
|
16
|
-
}
|
|
17
|
-
return ref;
|
|
18
|
-
};
|
|
19
|
-
exports.useDefineRef = useDefineRef;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type MutableRefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* React hook for creating a value exactly once.
|
|
4
|
-
* useMemo doesn't give this guarantee unfortunately -
|
|
5
|
-
* https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
|
|
6
|
-
* https://reactjs.org/docs/hooks-reference.html#usememo
|
|
7
|
-
* @param defineFn Function which returns defined value.
|
|
8
|
-
*/
|
|
9
|
-
export declare const useDefineRef: <T>(defineFn: () => T) => MutableRefObject<T>;
|
|
10
|
-
//# sourceMappingURL=use-define-ref.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-define-ref.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-define-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAU,MAAM,OAAO,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,UAAU,MAAM,CAAC,KAAG,gBAAgB,CAAC,CAAC,CAQrE,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useElementRef = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useElementRef = (selector) => {
|
|
6
|
-
const ref = (0, react_1.useRef)();
|
|
7
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
8
|
-
ref.current = selector();
|
|
9
|
-
}, []);
|
|
10
|
-
return ref;
|
|
11
|
-
};
|
|
12
|
-
exports.useElementRef = useElementRef;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-element-ref.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-element-ref.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,EAAE,UAAU,MAAM,CAAC,oDAQrE,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useEventListener = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const use_sync_ref_js_1 = require("./use-sync-ref.cjs");
|
|
7
|
-
const useEventListener = ({ event, handler, options, deps = [], node = document, }) => {
|
|
8
|
-
const handlerRef = (0, use_sync_ref_js_1.useSyncRef)(handler);
|
|
9
|
-
(0, react_1.useEffect)(() => {
|
|
10
|
-
const handleEvent = (e) => handlerRef.current(e);
|
|
11
|
-
// @ts-expect-error
|
|
12
|
-
node.addEventListener(event, handleEvent, options);
|
|
13
|
-
// @ts-expect-error
|
|
14
|
-
return () => node.removeEventListener(event, handleEvent, options);
|
|
15
|
-
}, deps);
|
|
16
|
-
};
|
|
17
|
-
exports.useEventListener = useEventListener;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const useEventListener: <EventName extends keyof HTMLElementEventMap>({ event, handler, options, deps, node, }: {
|
|
2
|
-
event: EventName;
|
|
3
|
-
handler: (e: HTMLElementEventMap[EventName]) => void;
|
|
4
|
-
options?: boolean | AddEventListenerOptions;
|
|
5
|
-
deps?: unknown[];
|
|
6
|
-
node?: HTMLElement | Document | Window;
|
|
7
|
-
}) => void;
|
|
8
|
-
//# sourceMappingURL=use-event-listener.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-event-listener.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-event-listener.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,GAAI,SAAS,SAAS,MAAM,mBAAmB,EAAE,0CAM3E;IACD,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;CACxC,SAYA,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useEvent = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* A Hook to define an event handler with an always-stable function identity.
|
|
6
|
-
*
|
|
7
|
-
* borrowed from @gaeron
|
|
8
|
-
* https://github.com/reactjs/rfcs/blob/useevent/text/0000-useevent.md
|
|
9
|
-
*/
|
|
10
|
-
const react_1 = require("react");
|
|
11
|
-
const useEvent = (handler) => {
|
|
12
|
-
const handlerRef = (0, react_1.useRef)(handler);
|
|
13
|
-
// In a real implementation, this would run before layout effects
|
|
14
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
15
|
-
handlerRef.current = handler;
|
|
16
|
-
});
|
|
17
|
-
return (0, react_1.useCallback)((...args) => {
|
|
18
|
-
// In a real implementation, this would throw if called during render
|
|
19
|
-
const fn = handlerRef.current;
|
|
20
|
-
return fn(...args);
|
|
21
|
-
}, []);
|
|
22
|
-
};
|
|
23
|
-
exports.useEvent = useEvent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-event.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-event.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,8BAA6B;AAExD,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,WAAW,EAAE,SAAS,CAAC,KAAG,CAa5D,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFlag = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useFlag = (defaultValue = false) => {
|
|
6
|
-
const [enabled, setEnabled] = (0, react_1.useState)(defaultValue);
|
|
7
|
-
const toggle = (0, react_1.useCallback)(() => setEnabled((value) => !value), []);
|
|
8
|
-
const enable = (0, react_1.useCallback)(() => setEnabled(true), []);
|
|
9
|
-
const disable = (0, react_1.useCallback)(() => setEnabled(false), []);
|
|
10
|
-
const flagObjRef = (0, react_1.useRef)({
|
|
11
|
-
enabled,
|
|
12
|
-
toggle,
|
|
13
|
-
enable,
|
|
14
|
-
disable,
|
|
15
|
-
});
|
|
16
|
-
flagObjRef.current.enabled = enabled;
|
|
17
|
-
return flagObjRef.current;
|
|
18
|
-
};
|
|
19
|
-
exports.useFlag = useFlag;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-flag.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-flag.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,OAAO,GAAI,sBAAoB,KAAG,QAiB9C,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useForceUpdate = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useForceUpdate = () => {
|
|
6
|
-
const [, setState] = (0, react_1.useState)(null);
|
|
7
|
-
return (0, react_1.useCallback)(() => {
|
|
8
|
-
setState({});
|
|
9
|
-
}, []);
|
|
10
|
-
};
|
|
11
|
-
exports.useForceUpdate = useForceUpdate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-force-update.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-force-update.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,kBAM1B,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useInitialHeight = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useInitialHeight = () => {
|
|
6
|
-
const ref = (0, react_1.useRef)(null);
|
|
7
|
-
const [initialHeight, setInitialHeight] = (0, react_1.useState)(undefined);
|
|
8
|
-
(0, react_1.useEffect)(() => {
|
|
9
|
-
if (ref.current && !initialHeight) {
|
|
10
|
-
setInitialHeight(ref.current.offsetHeight);
|
|
11
|
-
}
|
|
12
|
-
}, [initialHeight]);
|
|
13
|
-
return { ref, initialHeight };
|
|
14
|
-
};
|
|
15
|
-
exports.useInitialHeight = useInitialHeight;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-initial-height.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-initial-height.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,WAAW;;;CAarD,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useInstance = exports.createUseInstanceHook = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const use_abort_signal_js_1 = require("./use-abort-signal.cjs");
|
|
6
|
-
const use_constant_js_1 = require("./use-constant.cjs");
|
|
7
|
-
const createUseInstanceHook = (extension) => (factory, config) => {
|
|
8
|
-
const abortSignal = (0, use_abort_signal_js_1.useAbortSignal)();
|
|
9
|
-
const instance = (0, use_constant_js_1.useConstant)(() => factory({
|
|
10
|
-
...extension,
|
|
11
|
-
abortSignal,
|
|
12
|
-
payload: config?.payload,
|
|
13
|
-
}));
|
|
14
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
15
|
-
config?.onUpdate?.(config.payload);
|
|
16
|
-
}, [config?.payload]);
|
|
17
|
-
return instance;
|
|
18
|
-
};
|
|
19
|
-
exports.createUseInstanceHook = createUseInstanceHook;
|
|
20
|
-
/**
|
|
21
|
-
* The `useInstance` hook is used to create and manage an instance of an object
|
|
22
|
-
* that requires access to the root store and an abort signal.
|
|
23
|
-
*
|
|
24
|
-
* You can create YOUR OWN CUSTOM `useInstance` hook using `createUseInstanceHook` if you need
|
|
25
|
-
* to provide some specific data
|
|
26
|
-
*
|
|
27
|
-
* @param factory - A factory function that takes a configuration and returns an instance.
|
|
28
|
-
* @param config - An optional configuration containing additional input parameters and an update function.
|
|
29
|
-
* @returns An instance created by the factory function.
|
|
30
|
-
*/
|
|
31
|
-
exports.useInstance = (0, exports.createUseInstanceHook)();
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type InstanceCreateConfig<TPayload, TExtension = {}> = TExtension & {
|
|
2
|
-
abortSignal: AbortSignal;
|
|
3
|
-
payload: TPayload;
|
|
4
|
-
};
|
|
5
|
-
export declare const createUseInstanceHook: <TExtension = {}>(extension?: TExtension) => <TInstance, TPayload>(factory: (config: InstanceCreateConfig<NoInfer<TPayload>, TExtension>) => TInstance, config?: {
|
|
6
|
-
payload?: TPayload;
|
|
7
|
-
onUpdate?: (payload: TPayload) => void;
|
|
8
|
-
}) => TInstance;
|
|
9
|
-
/**
|
|
10
|
-
* The `useInstance` hook is used to create and manage an instance of an object
|
|
11
|
-
* that requires access to the root store and an abort signal.
|
|
12
|
-
*
|
|
13
|
-
* You can create YOUR OWN CUSTOM `useInstance` hook using `createUseInstanceHook` if you need
|
|
14
|
-
* to provide some specific data
|
|
15
|
-
*
|
|
16
|
-
* @param factory - A factory function that takes a configuration and returns an instance.
|
|
17
|
-
* @param config - An optional configuration containing additional input parameters and an update function.
|
|
18
|
-
* @returns An instance created by the factory function.
|
|
19
|
-
*/
|
|
20
|
-
export declare const useInstance: <TInstance, TPayload>(factory: (config: {
|
|
21
|
-
abortSignal: AbortSignal;
|
|
22
|
-
payload: NoInfer<TPayload>;
|
|
23
|
-
}) => TInstance, config?: {
|
|
24
|
-
payload?: TPayload | undefined;
|
|
25
|
-
onUpdate?: ((payload: TPayload) => void) | undefined;
|
|
26
|
-
} | undefined) => TInstance;
|
|
27
|
-
//# sourceMappingURL=use-instance.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-instance.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-instance.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,CAAC,QAAQ,EAAE,UAAU,GAAG,EAAE,IAAI,UAAU,GAAG;IACzE,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAC/B,UAAU,GAAG,EAAE,EAAE,YAAY,UAAU,MACvC,SAAS,EAAE,QAAQ,EAClB,SAAS,CACP,MAAM,EAAE,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,KACxD,SAAS,EACd,SAAS;IACP,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;CACxC,cAiBF,CAAC;AAEJ;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GArCrB,SAAS,EAAE,QAAQ;iBANP,WAAW;;;;uCAYc,IAAI;2BA+BM,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useIntersectionObserver = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useIntersectionObserver = (callback, options) => {
|
|
6
|
-
const [intersectionObserver] = (0, react_1.useState)(() => new IntersectionObserver(callback, options));
|
|
7
|
-
(0, react_1.useEffect)(() => {
|
|
8
|
-
return () => {
|
|
9
|
-
intersectionObserver.disconnect();
|
|
10
|
-
};
|
|
11
|
-
}, []);
|
|
12
|
-
return intersectionObserver;
|
|
13
|
-
};
|
|
14
|
-
exports.useIntersectionObserver = useIntersectionObserver;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-intersection-observer.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-intersection-observer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,GAClC,UAAU,4BAA4B,EACtC,UAAU,wBAAwB,yBAanC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLastDefinedValue = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useLastDefinedValue = (value) => {
|
|
6
|
-
const ref = (0, react_1.useRef)(value);
|
|
7
|
-
if (value != null) {
|
|
8
|
-
ref.current = value;
|
|
9
|
-
}
|
|
10
|
-
return ref.current;
|
|
11
|
-
};
|
|
12
|
-
exports.useLastDefinedValue = useLastDefinedValue;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-last-defined-value.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-last-defined-value.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAE,OAAO,CAAC,MAM9C,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLastValueRef = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useLastValueRef = (value) => {
|
|
6
|
-
const ref = (0, react_1.useRef)(value);
|
|
7
|
-
if (value != null) {
|
|
8
|
-
ref.current = value;
|
|
9
|
-
}
|
|
10
|
-
return ref;
|
|
11
|
-
};
|
|
12
|
-
exports.useLastValueRef = useLastValueRef;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-last-value-ref.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-last-value-ref.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,2DAQ7D,CAAC"}
|