@cyclone-ui/state 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +187 -0
- package/README.md +302 -0
- package/dist/base/atoms/atom-with-broadcast.cjs +1 -0
- package/dist/base/atoms/atom-with-broadcast.d.cts +13 -0
- package/dist/base/atoms/atom-with-broadcast.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-broadcast.d.mts +13 -0
- package/dist/base/atoms/atom-with-broadcast.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-broadcast.mjs +2 -0
- package/dist/base/atoms/atom-with-broadcast.mjs.map +1 -0
- package/dist/base/atoms/atom-with-compare.cjs +1 -0
- package/dist/base/atoms/atom-with-compare.d.cts +5 -0
- package/dist/base/atoms/atom-with-compare.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-compare.d.mts +5 -0
- package/dist/base/atoms/atom-with-compare.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-compare.mjs +2 -0
- package/dist/base/atoms/atom-with-compare.mjs.map +1 -0
- package/dist/base/atoms/atom-with-debounce.cjs +1 -0
- package/dist/base/atoms/atom-with-debounce.d.cts +12 -0
- package/dist/base/atoms/atom-with-debounce.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-debounce.d.mts +12 -0
- package/dist/base/atoms/atom-with-debounce.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-debounce.mjs +2 -0
- package/dist/base/atoms/atom-with-debounce.mjs.map +1 -0
- package/dist/base/atoms/atom-with-effect.cjs +1 -0
- package/dist/base/atoms/atom-with-effect.d.cts +14 -0
- package/dist/base/atoms/atom-with-effect.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-effect.d.mts +14 -0
- package/dist/base/atoms/atom-with-effect.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-effect.mjs +2 -0
- package/dist/base/atoms/atom-with-effect.mjs.map +1 -0
- package/dist/base/atoms/atom-with-listeners.cjs +1 -0
- package/dist/base/atoms/atom-with-listeners.d.cts +13 -0
- package/dist/base/atoms/atom-with-listeners.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-listeners.d.mts +13 -0
- package/dist/base/atoms/atom-with-listeners.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-listeners.mjs +2 -0
- package/dist/base/atoms/atom-with-listeners.mjs.map +1 -0
- package/dist/base/atoms/atom-with-pending.cjs +1 -0
- package/dist/base/atoms/atom-with-pending.d.cts +12 -0
- package/dist/base/atoms/atom-with-pending.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-pending.d.mts +12 -0
- package/dist/base/atoms/atom-with-pending.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-pending.mjs +2 -0
- package/dist/base/atoms/atom-with-pending.mjs.map +1 -0
- package/dist/base/atoms/atom-with-refresh-and-default.cjs +1 -0
- package/dist/base/atoms/atom-with-refresh-and-default.d.cts +6 -0
- package/dist/base/atoms/atom-with-refresh-and-default.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-refresh-and-default.d.mts +6 -0
- package/dist/base/atoms/atom-with-refresh-and-default.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-refresh-and-default.mjs +2 -0
- package/dist/base/atoms/atom-with-refresh-and-default.mjs.map +1 -0
- package/dist/base/atoms/atom-with-refresh.cjs +1 -0
- package/dist/base/atoms/atom-with-refresh.d.cts +6 -0
- package/dist/base/atoms/atom-with-refresh.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-refresh.d.mts +6 -0
- package/dist/base/atoms/atom-with-refresh.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-refresh.mjs +2 -0
- package/dist/base/atoms/atom-with-refresh.mjs.map +1 -0
- package/dist/base/atoms/atom-with-toggle.cjs +1 -0
- package/dist/base/atoms/atom-with-toggle.d.cts +6 -0
- package/dist/base/atoms/atom-with-toggle.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-toggle.d.mts +6 -0
- package/dist/base/atoms/atom-with-toggle.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-toggle.mjs +2 -0
- package/dist/base/atoms/atom-with-toggle.mjs.map +1 -0
- package/dist/base/atoms/atom-with-web-storage.cjs +1 -0
- package/dist/base/atoms/atom-with-web-storage.d.cts +20 -0
- package/dist/base/atoms/atom-with-web-storage.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-web-storage.d.mts +20 -0
- package/dist/base/atoms/atom-with-web-storage.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-web-storage.mjs +2 -0
- package/dist/base/atoms/atom-with-web-storage.mjs.map +1 -0
- package/dist/base/atoms/atom-with-wrapper.cjs +1 -0
- package/dist/base/atoms/atom-with-wrapper.d.cts +18 -0
- package/dist/base/atoms/atom-with-wrapper.d.cts.map +1 -0
- package/dist/base/atoms/atom-with-wrapper.d.mts +18 -0
- package/dist/base/atoms/atom-with-wrapper.d.mts.map +1 -0
- package/dist/base/atoms/atom-with-wrapper.mjs +2 -0
- package/dist/base/atoms/atom-with-wrapper.mjs.map +1 -0
- package/dist/base/atoms/base-atom.cjs +1 -0
- package/dist/base/atoms/base-atom.mjs +2 -0
- package/dist/base/atoms/base-atom.mjs.map +1 -0
- package/dist/base/atoms/index.cjs +1 -0
- package/dist/base/atoms/index.d.cts +12 -0
- package/dist/base/atoms/index.d.mts +12 -0
- package/dist/base/atoms/index.mjs +1 -0
- package/dist/base/hooks/index.cjs +1 -0
- package/dist/base/hooks/index.d.cts +5 -0
- package/dist/base/hooks/index.d.mts +5 -0
- package/dist/base/hooks/index.mjs +1 -0
- package/dist/base/hooks/use-atom-effect.cjs +1 -0
- package/dist/base/hooks/use-atom-effect.d.cts +11 -0
- package/dist/base/hooks/use-atom-effect.d.cts.map +1 -0
- package/dist/base/hooks/use-atom-effect.d.mts +11 -0
- package/dist/base/hooks/use-atom-effect.d.mts.map +1 -0
- package/dist/base/hooks/use-atom-effect.mjs +2 -0
- package/dist/base/hooks/use-atom-effect.mjs.map +1 -0
- package/dist/base/hooks/use-hydrate-molecule.cjs +1 -0
- package/dist/base/hooks/use-hydrate-molecule.d.cts +11 -0
- package/dist/base/hooks/use-hydrate-molecule.d.cts.map +1 -0
- package/dist/base/hooks/use-hydrate-molecule.d.mts +11 -0
- package/dist/base/hooks/use-hydrate-molecule.d.mts.map +1 -0
- package/dist/base/hooks/use-hydrate-molecule.mjs +2 -0
- package/dist/base/hooks/use-hydrate-molecule.mjs.map +1 -0
- package/dist/base/hooks/use-prepare-atoms.cjs +1 -0
- package/dist/base/hooks/use-prepare-atoms.d.cts +8 -0
- package/dist/base/hooks/use-prepare-atoms.d.cts.map +1 -0
- package/dist/base/hooks/use-prepare-atoms.d.mts +8 -0
- package/dist/base/hooks/use-prepare-atoms.d.mts.map +1 -0
- package/dist/base/hooks/use-prepare-atoms.mjs +2 -0
- package/dist/base/hooks/use-prepare-atoms.mjs.map +1 -0
- package/dist/base/hooks/use-sync-molecule.cjs +1 -0
- package/dist/base/hooks/use-sync-molecule.d.cts +10 -0
- package/dist/base/hooks/use-sync-molecule.d.cts.map +1 -0
- package/dist/base/hooks/use-sync-molecule.d.mts +10 -0
- package/dist/base/hooks/use-sync-molecule.d.mts.map +1 -0
- package/dist/base/hooks/use-sync-molecule.mjs +2 -0
- package/dist/base/hooks/use-sync-molecule.mjs.map +1 -0
- package/dist/base/index.cjs +1 -0
- package/dist/base/index.d.cts +23 -0
- package/dist/base/index.d.mts +23 -0
- package/dist/base/index.mjs +1 -0
- package/dist/base/utilities/create-molecule.cjs +4 -0
- package/dist/base/utilities/create-molecule.d.cts +68 -0
- package/dist/base/utilities/create-molecule.d.cts.map +1 -0
- package/dist/base/utilities/create-molecule.d.mts +68 -0
- package/dist/base/utilities/create-molecule.d.mts.map +1 -0
- package/dist/base/utilities/create-molecule.mjs +5 -0
- package/dist/base/utilities/create-molecule.mjs.map +1 -0
- package/dist/base/utilities/create-web-storage.cjs +1 -0
- package/dist/base/utilities/create-web-storage.d.cts +6 -0
- package/dist/base/utilities/create-web-storage.d.cts.map +1 -0
- package/dist/base/utilities/create-web-storage.d.mts +6 -0
- package/dist/base/utilities/create-web-storage.d.mts.map +1 -0
- package/dist/base/utilities/create-web-storage.mjs +2 -0
- package/dist/base/utilities/create-web-storage.mjs.map +1 -0
- package/dist/base/utilities/debounce.cjs +1 -0
- package/dist/base/utilities/debounce.d.cts +19 -0
- package/dist/base/utilities/debounce.d.cts.map +1 -0
- package/dist/base/utilities/debounce.d.mts +19 -0
- package/dist/base/utilities/debounce.d.mts.map +1 -0
- package/dist/base/utilities/debounce.mjs +2 -0
- package/dist/base/utilities/debounce.mjs.map +1 -0
- package/dist/base/utilities/index.cjs +1 -0
- package/dist/base/utilities/index.d.cts +5 -0
- package/dist/base/utilities/index.d.mts +5 -0
- package/dist/base/utilities/index.mjs +1 -0
- package/dist/base/utilities/is-atom.cjs +1 -0
- package/dist/base/utilities/is-atom.mjs +2 -0
- package/dist/base/utilities/is-atom.mjs.map +1 -0
- package/dist/base/utilities/set-atom-debug.cjs +1 -0
- package/dist/base/utilities/set-atom-debug.d.cts +18 -0
- package/dist/base/utilities/set-atom-debug.d.cts.map +1 -0
- package/dist/base/utilities/set-atom-debug.d.mts +18 -0
- package/dist/base/utilities/set-atom-debug.d.mts.map +1 -0
- package/dist/base/utilities/set-atom-debug.mjs +2 -0
- package/dist/base/utilities/set-atom-debug.mjs.map +1 -0
- package/dist/client/index.cjs +1 -0
- package/dist/client/index.d.cts +8 -0
- package/dist/client/index.d.mts +8 -0
- package/dist/client/index.mjs +1 -0
- package/dist/form/atoms/atom-with-field.cjs +1 -0
- package/dist/form/atoms/atom-with-field.mjs +2 -0
- package/dist/form/atoms/atom-with-field.mjs.map +1 -0
- package/dist/form/atoms/atom-with-messages.cjs +1 -0
- package/dist/form/atoms/atom-with-messages.mjs +2 -0
- package/dist/form/atoms/atom-with-messages.mjs.map +1 -0
- package/dist/form/hooks/index.cjs +1 -0
- package/dist/form/hooks/index.d.cts +4 -0
- package/dist/form/hooks/index.d.mts +4 -0
- package/dist/form/hooks/index.mjs +1 -0
- package/dist/form/hooks/use-field-actions.cjs +1 -0
- package/dist/form/hooks/use-field-actions.d.cts +17 -0
- package/dist/form/hooks/use-field-actions.d.cts.map +1 -0
- package/dist/form/hooks/use-field-actions.d.mts +17 -0
- package/dist/form/hooks/use-field-actions.d.mts.map +1 -0
- package/dist/form/hooks/use-field-actions.mjs +2 -0
- package/dist/form/hooks/use-field-actions.mjs.map +1 -0
- package/dist/form/hooks/use-field-ref.cjs +1 -0
- package/dist/form/hooks/use-field-ref.d.cts +6 -0
- package/dist/form/hooks/use-field-ref.d.cts.map +1 -0
- package/dist/form/hooks/use-field-ref.d.mts +6 -0
- package/dist/form/hooks/use-field-ref.d.mts.map +1 -0
- package/dist/form/hooks/use-field-ref.mjs +2 -0
- package/dist/form/hooks/use-field-ref.mjs.map +1 -0
- package/dist/form/hooks/use-form-actions.cjs +1 -0
- package/dist/form/hooks/use-form-actions.d.cts +13 -0
- package/dist/form/hooks/use-form-actions.d.cts.map +1 -0
- package/dist/form/hooks/use-form-actions.d.mts +13 -0
- package/dist/form/hooks/use-form-actions.d.mts.map +1 -0
- package/dist/form/hooks/use-form-actions.mjs +2 -0
- package/dist/form/hooks/use-form-actions.mjs.map +1 -0
- package/dist/form/index.cjs +1 -0
- package/dist/form/index.d.cts +16 -0
- package/dist/form/index.d.mts +16 -0
- package/dist/form/index.mjs +1 -0
- package/dist/form/molecules/field-molecule.cjs +1 -0
- package/dist/form/molecules/field-molecule.d.cts +9 -0
- package/dist/form/molecules/field-molecule.d.cts.map +1 -0
- package/dist/form/molecules/field-molecule.d.mts +9 -0
- package/dist/form/molecules/field-molecule.d.mts.map +1 -0
- package/dist/form/molecules/field-molecule.mjs +2 -0
- package/dist/form/molecules/field-molecule.mjs.map +1 -0
- package/dist/form/molecules/form-molecule.cjs +1 -0
- package/dist/form/molecules/form-molecule.d.cts +9 -0
- package/dist/form/molecules/form-molecule.d.cts.map +1 -0
- package/dist/form/molecules/form-molecule.d.mts +9 -0
- package/dist/form/molecules/form-molecule.d.mts.map +1 -0
- package/dist/form/molecules/form-molecule.mjs +2 -0
- package/dist/form/molecules/form-molecule.mjs.map +1 -0
- package/dist/form/molecules/index.cjs +1 -0
- package/dist/form/molecules/index.d.cts +3 -0
- package/dist/form/molecules/index.d.mts +3 -0
- package/dist/form/molecules/index.mjs +1 -0
- package/dist/form/providers/FieldProvider.cjs +4 -0
- package/dist/form/providers/FieldProvider.d.cts +10 -0
- package/dist/form/providers/FieldProvider.d.cts.map +1 -0
- package/dist/form/providers/FieldProvider.d.mts +10 -0
- package/dist/form/providers/FieldProvider.d.mts.map +1 -0
- package/dist/form/providers/FieldProvider.mjs +5 -0
- package/dist/form/providers/FieldProvider.mjs.map +1 -0
- package/dist/form/providers/FormProvider.cjs +4 -0
- package/dist/form/providers/FormProvider.d.cts +10 -0
- package/dist/form/providers/FormProvider.d.cts.map +1 -0
- package/dist/form/providers/FormProvider.d.mts +10 -0
- package/dist/form/providers/FormProvider.d.mts.map +1 -0
- package/dist/form/providers/FormProvider.mjs +5 -0
- package/dist/form/providers/FormProvider.mjs.map +1 -0
- package/dist/form/providers/index.cjs +1 -0
- package/dist/form/providers/index.d.cts +3 -0
- package/dist/form/providers/index.d.mts +3 -0
- package/dist/form/providers/index.mjs +1 -0
- package/dist/form/types.cjs +1 -0
- package/dist/form/types.d.cts +288 -0
- package/dist/form/types.d.cts.map +1 -0
- package/dist/form/types.d.mts +288 -0
- package/dist/form/types.d.mts.map +1 -0
- package/dist/form/types.mjs +2 -0
- package/dist/form/types.mjs.map +1 -0
- package/dist/form/utilities/abort-error.cjs +1 -0
- package/dist/form/utilities/abort-error.d.cts +13 -0
- package/dist/form/utilities/abort-error.d.cts.map +1 -0
- package/dist/form/utilities/abort-error.d.mts +13 -0
- package/dist/form/utilities/abort-error.d.mts.map +1 -0
- package/dist/form/utilities/abort-error.mjs +2 -0
- package/dist/form/utilities/abort-error.mjs.map +1 -0
- package/dist/form/utilities/index.cjs +1 -0
- package/dist/form/utilities/index.d.cts +4 -0
- package/dist/form/utilities/index.d.mts +4 -0
- package/dist/form/utilities/index.mjs +1 -0
- package/dist/form/utilities/is-validation-results.cjs +1 -0
- package/dist/form/utilities/is-validation-results.d.cts +6 -0
- package/dist/form/utilities/is-validation-results.d.cts.map +1 -0
- package/dist/form/utilities/is-validation-results.d.mts +6 -0
- package/dist/form/utilities/is-validation-results.d.mts.map +1 -0
- package/dist/form/utilities/is-validation-results.mjs +2 -0
- package/dist/form/utilities/is-validation-results.mjs.map +1 -0
- package/dist/form/utilities/validators.cjs +1 -0
- package/dist/form/utilities/validators.d.cts +6 -0
- package/dist/form/utilities/validators.d.cts.map +1 -0
- package/dist/form/utilities/validators.d.mts +6 -0
- package/dist/form/utilities/validators.d.mts.map +1 -0
- package/dist/form/utilities/validators.mjs +2 -0
- package/dist/form/utilities/validators.mjs.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +34 -0
- package/dist/index.d.mts +34 -0
- package/dist/index.mjs +1 -0
- package/dist/message/components/MessageViewport.cjs +1 -0
- package/dist/message/components/MessageViewport.d.cts +19 -0
- package/dist/message/components/MessageViewport.d.cts.map +1 -0
- package/dist/message/components/MessageViewport.d.mts +19 -0
- package/dist/message/components/MessageViewport.d.mts.map +1 -0
- package/dist/message/components/MessageViewport.mjs +2 -0
- package/dist/message/components/MessageViewport.mjs.map +1 -0
- package/dist/message/components/index.cjs +1 -0
- package/dist/message/components/index.d.cts +2 -0
- package/dist/message/components/index.d.mts +2 -0
- package/dist/message/components/index.mjs +1 -0
- package/dist/message/hooks/index.cjs +1 -0
- package/dist/message/hooks/index.d.cts +2 -0
- package/dist/message/hooks/index.d.mts +2 -0
- package/dist/message/hooks/index.mjs +1 -0
- package/dist/message/hooks/use-message-actions.cjs +1 -0
- package/dist/message/hooks/use-message-actions.d.cts +21 -0
- package/dist/message/hooks/use-message-actions.d.cts.map +1 -0
- package/dist/message/hooks/use-message-actions.d.mts +21 -0
- package/dist/message/hooks/use-message-actions.d.mts.map +1 -0
- package/dist/message/hooks/use-message-actions.mjs +2 -0
- package/dist/message/hooks/use-message-actions.mjs.map +1 -0
- package/dist/message/index.cjs +1 -0
- package/dist/message/index.d.cts +9 -0
- package/dist/message/index.d.mts +9 -0
- package/dist/message/index.mjs +1 -0
- package/dist/message/providers/MessageProvider.cjs +1 -0
- package/dist/message/providers/MessageProvider.d.cts +21 -0
- package/dist/message/providers/MessageProvider.d.cts.map +1 -0
- package/dist/message/providers/MessageProvider.d.mts +21 -0
- package/dist/message/providers/MessageProvider.d.mts.map +1 -0
- package/dist/message/providers/MessageProvider.mjs +2 -0
- package/dist/message/providers/MessageProvider.mjs.map +1 -0
- package/dist/message/providers/index.d.cts +2 -0
- package/dist/message/providers/index.d.mts +2 -0
- package/dist/message/types.d.cts +6 -0
- package/dist/message/types.d.cts.map +1 -0
- package/dist/message/types.d.mts +6 -0
- package/dist/message/types.d.mts.map +1 -0
- package/dist/theme/hooks/index.cjs +1 -0
- package/dist/theme/hooks/index.d.cts +3 -0
- package/dist/theme/hooks/index.d.mts +3 -0
- package/dist/theme/hooks/index.mjs +1 -0
- package/dist/theme/hooks/use-theme-actions.cjs +1 -0
- package/dist/theme/hooks/use-theme-actions.d.cts +11 -0
- package/dist/theme/hooks/use-theme-actions.d.cts.map +1 -0
- package/dist/theme/hooks/use-theme-actions.d.mts +11 -0
- package/dist/theme/hooks/use-theme-actions.d.mts.map +1 -0
- package/dist/theme/hooks/use-theme-actions.mjs +2 -0
- package/dist/theme/hooks/use-theme-actions.mjs.map +1 -0
- package/dist/theme/hooks/use-theme-store.cjs +1 -0
- package/dist/theme/hooks/use-theme-store.d.cts +49 -0
- package/dist/theme/hooks/use-theme-store.d.cts.map +1 -0
- package/dist/theme/hooks/use-theme-store.d.mts +49 -0
- package/dist/theme/hooks/use-theme-store.d.mts.map +1 -0
- package/dist/theme/hooks/use-theme-store.mjs +2 -0
- package/dist/theme/hooks/use-theme-store.mjs.map +1 -0
- package/dist/theme/index.cjs +1 -0
- package/dist/theme/index.d.cts +9 -0
- package/dist/theme/index.d.mts +9 -0
- package/dist/theme/index.mjs +1 -0
- package/dist/theme/molecules/index.cjs +1 -0
- package/dist/theme/molecules/index.d.cts +2 -0
- package/dist/theme/molecules/index.d.mts +2 -0
- package/dist/theme/molecules/index.mjs +1 -0
- package/dist/theme/molecules/theme-molecule.cjs +1 -0
- package/dist/theme/molecules/theme-molecule.d.cts +14 -0
- package/dist/theme/molecules/theme-molecule.d.cts.map +1 -0
- package/dist/theme/molecules/theme-molecule.d.mts +14 -0
- package/dist/theme/molecules/theme-molecule.d.mts.map +1 -0
- package/dist/theme/molecules/theme-molecule.mjs +2 -0
- package/dist/theme/molecules/theme-molecule.mjs.map +1 -0
- package/dist/theme/providers/ThemeProvider.cjs +5 -0
- package/dist/theme/providers/ThemeProvider.d.cts +13 -0
- package/dist/theme/providers/ThemeProvider.d.cts.map +1 -0
- package/dist/theme/providers/ThemeProvider.d.mts +13 -0
- package/dist/theme/providers/ThemeProvider.d.mts.map +1 -0
- package/dist/theme/providers/ThemeProvider.mjs +6 -0
- package/dist/theme/providers/ThemeProvider.mjs.map +1 -0
- package/dist/theme/types.cjs +1 -0
- package/dist/theme/types.d.cts +41 -0
- package/dist/theme/types.d.cts.map +1 -0
- package/dist/theme/types.d.mts +41 -0
- package/dist/theme/types.d.mts.map +1 -0
- package/dist/theme/types.mjs +2 -0
- package/dist/theme/types.mjs.map +1 -0
- package/dist/theme/utilities/theme-helpers.cjs +1 -0
- package/dist/theme/utilities/theme-helpers.d.cts +55 -0
- package/dist/theme/utilities/theme-helpers.d.cts.map +1 -0
- package/dist/theme/utilities/theme-helpers.d.mts +55 -0
- package/dist/theme/utilities/theme-helpers.d.mts.map +1 -0
- package/dist/theme/utilities/theme-helpers.mjs +2 -0
- package/dist/theme/utilities/theme-helpers.mjs.map +1 -0
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +55 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +55 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +0 -0
- package/package.json +146 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Atom, Getter, Setter } from "jotai/vanilla";
|
|
2
|
+
//#region src/base/atoms/atom-with-effect.d.ts
|
|
3
|
+
type Cleanup = () => void;
|
|
4
|
+
type GetterWithPeek = Getter & {
|
|
5
|
+
peek: Getter;
|
|
6
|
+
};
|
|
7
|
+
type SetterWithRecurse = Setter & {
|
|
8
|
+
recurse: Setter;
|
|
9
|
+
};
|
|
10
|
+
type EffectCallback = (get: GetterWithPeek, set: SetterWithRecurse) => void | Cleanup;
|
|
11
|
+
declare function atomWithEffect(effect: EffectCallback): Atom<void>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { EffectCallback, atomWithEffect };
|
|
14
|
+
//# sourceMappingURL=atom-with-effect.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-effect.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-effect.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{atom as e}from"jotai/vanilla";import{isEqual as t}from"@stryke/helpers/is-equal";function n(n){let r=e(0),i=e(()=>({inProgress:0,mounted:!1,promise:void 0,pendingError:void 0,cleanup:void 0,fromCleanup:!1,isRecursing:!1,isRefreshing:!1,get:(()=>{}),set:(()=>{})}),(e,t)=>{let n=e(i);return Object.assign(n,{mounted:!0,get:e,set:t}),t(r,e=>e+1),()=>{n.mounted=!1,s(n),c(n)}});i.onMount=e=>e();let a=e(async e=>{e(r);let a=e(i);if(!a.mounted||a.isRecursing||a.inProgress&&!a.isRefreshing)return a.promise;c(a);let l=new Map,u=t=>{let n=e(t);return l.set(t,n),n};u.peek=e=>a.get(e);let d=(...t)=>{try{return++a.inProgress,a.set(...t)}finally{Array.from(l.keys(),e),--a.inProgress}};d.recurse=(n,...r)=>{if(!a.fromCleanup)try{return a.isRecursing=!0,a.set(n,...r)}finally{a.isRecursing=!1,Array.from(l).some(([n,r])=>!t(e(n),r))&&o(a)}},++a.inProgress;function f(){try{if(a.isRefreshing=!1,!a.mounted)return;s(a),a.cleanup=n(u,d)}catch(e){a.pendingError=e,o(a)}finally{a.promise=void 0,--a.inProgress}}return a.isRefreshing?f():a.promise=Promise.resolve().then(f)});return e(e=>void e(a));function o(e){try{e.isRefreshing=!0,e.set(r,e=>e+1)}finally{e.isRefreshing=!1}}function s(e){if(e.cleanup)try{e.fromCleanup=!0,e.cleanup()}finally{e.fromCleanup=!1,e.cleanup=void 0}}function c(e){if(`e`in e){let t=e.pendingError;throw delete e.pendingError,t}}}export{n as atomWithEffect};
|
|
2
|
+
//# sourceMappingURL=atom-with-effect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-effect.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../utilities/is-atom.cjs"),t=require("./base-atom.cjs");let n=require("jotai"),r=require("react");function i(i){let a=e.isAtom(i)?i:t.baseAtom(i),o=t.baseAtom([]);return[t.baseAtom(e=>e(a),(e,t,n)=>{let r=e(a);t(a,n);let i=e(a);for(let n of e(o))n(e,t,i,r)}),e=>{let t=(0,n.useSetAtom)(o);(0,r.useEffect)(()=>(t(t=>[...t,e]),()=>t(t=>{let n=t.indexOf(e);return[...t.slice(0,n),...t.slice(n+1)]})),[t,e])}]}exports.atomWithListeners=i;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Getter, SetStateAction, Setter, WritableAtom } from "jotai/vanilla";
|
|
2
|
+
//#region src/base/atoms/atom-with-listeners.d.ts
|
|
3
|
+
type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
6
|
+
*
|
|
7
|
+
* @param initialValue - The initial value of the atom
|
|
8
|
+
* @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
|
+
*/
|
|
10
|
+
declare function atomWithListeners<TValue>(initialValue: TValue | WritableAtom<TValue, any, Promise<void> | void>): readonly [WritableAtom<TValue, [arg: SetStateAction<TValue>], void>, (callback: Callback<TValue>) => void];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Callback, atomWithListeners };
|
|
13
|
+
//# sourceMappingURL=atom-with-listeners.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-listeners.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-listeners.ts"],"mappings":";;KA6BY,SAAS,UACnB,KAAK,QACL,KAAK,QACL,QAAQ,OACR,SAAS;;;;;;;iBASK,kBAAkB,QAChC,cAAc,SAAS,aAAa,aAAa,kCAAqB,aAAA,SAAA,KAAA,eAAA,kBAAA,UAkBvC,SAAS"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Getter, SetStateAction, Setter, WritableAtom } from "jotai/vanilla";
|
|
2
|
+
//#region src/base/atoms/atom-with-listeners.d.ts
|
|
3
|
+
type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
6
|
+
*
|
|
7
|
+
* @param initialValue - The initial value of the atom
|
|
8
|
+
* @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
|
|
9
|
+
*/
|
|
10
|
+
declare function atomWithListeners<TValue>(initialValue: TValue | WritableAtom<TValue, any, Promise<void> | void>): readonly [WritableAtom<TValue, [arg: SetStateAction<TValue>], void>, (callback: Callback<TValue>) => void];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Callback, atomWithListeners };
|
|
13
|
+
//# sourceMappingURL=atom-with-listeners.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-listeners.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-listeners.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isAtom as e}from"../utilities/is-atom.mjs";import{baseAtom as t}from"./base-atom.mjs";import{useSetAtom as n}from"jotai";import{useEffect as r}from"react";function i(i){let a=e(i)?i:t(i),o=t([]);return[t(e=>e(a),(e,t,n)=>{let r=e(a);t(a,n);let i=e(a);for(let n of e(o))n(e,t,i,r)}),e=>{let t=n(o);r(()=>(t(t=>[...t,e]),()=>t(t=>{let n=t.indexOf(e);return[...t.slice(0,n),...t.slice(n+1)]})),[t,e])}]}export{i as atomWithListeners};
|
|
2
|
+
//# sourceMappingURL=atom-with-listeners.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-listeners.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./base-atom.cjs");let t=require("@stryke/helpers/noop");const n=new Promise(t.noop),r=()=>e.baseAtom(n);exports.atomWithPending=r;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WithInitialValue } from "../../types.cjs";
|
|
2
|
+
import { PrimitiveAtom } from "jotai";
|
|
3
|
+
//#region src/base/atoms/atom-with-pending.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates an atom that always returns a pending promise.
|
|
6
|
+
*
|
|
7
|
+
* @returns An atom that always returns a pending promise.
|
|
8
|
+
*/
|
|
9
|
+
declare const atomWithPending: <Value>() => PrimitiveAtom<Value> & WithInitialValue<Value>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { atomWithPending };
|
|
12
|
+
//# sourceMappingURL=atom-with-pending.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-pending.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-pending.ts"],"mappings":";;;;;;;;cA8Ba,kBAAmB,YAAU,cAAc,SACtD,iBAAiB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WithInitialValue } from "../../types.mjs";
|
|
2
|
+
import { PrimitiveAtom } from "jotai";
|
|
3
|
+
//#region src/base/atoms/atom-with-pending.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Creates an atom that always returns a pending promise.
|
|
6
|
+
*
|
|
7
|
+
* @returns An atom that always returns a pending promise.
|
|
8
|
+
*/
|
|
9
|
+
declare const atomWithPending: <Value>() => PrimitiveAtom<Value> & WithInitialValue<Value>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { atomWithPending };
|
|
12
|
+
//# sourceMappingURL=atom-with-pending.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-pending.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-pending.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-pending.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./base-atom.cjs"),t=(t,n)=>{let r=e.baseAtom(null);return e.baseAtom(e=>{let i=e(r);return i&&i.refresh===e(t)?i.value:n(e)},(e,n,i)=>{n(r,{refresh:e(t),value:i})})};exports.atomWithRefreshAndDefault=t;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Getter, PrimitiveAtom } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-refresh-and-default.d.ts
|
|
3
|
+
declare const atomWithRefreshAndDefault: <TValue>(refreshAtom: PrimitiveAtom<number>, getDefault: (get: Getter) => TValue) => import("jotai").WritableAtom<TValue, [update: TValue], void>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { atomWithRefreshAndDefault };
|
|
6
|
+
//# sourceMappingURL=atom-with-refresh-and-default.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-refresh-and-default.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh-and-default.ts"],"mappings":";;cAqBa,4BAA6B,QACxC,aAAa,uBACb,aAAa,KAAK,WAAW,2BAAM,aAAA,SAAA,QAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Getter, PrimitiveAtom } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-refresh-and-default.d.ts
|
|
3
|
+
declare const atomWithRefreshAndDefault: <TValue>(refreshAtom: PrimitiveAtom<number>, getDefault: (get: Getter) => TValue) => import("jotai").WritableAtom<TValue, [update: TValue], void>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { atomWithRefreshAndDefault };
|
|
6
|
+
//# sourceMappingURL=atom-with-refresh-and-default.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-refresh-and-default.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh-and-default.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{baseAtom as e}from"./base-atom.mjs";const t=(t,n)=>{let r=e(null);return e(e=>{let i=e(r);return i&&i.refresh===e(t)?i.value:n(e)},(e,n,i)=>{n(r,{refresh:e(t),value:i})})};export{t as atomWithRefreshAndDefault};
|
|
2
|
+
//# sourceMappingURL=atom-with-refresh-and-default.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-refresh-and-default.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./base-atom.cjs");function t(t){let n=e.baseAtom(0);return e.baseAtom(e=>(e(n),t(e)),(e,t)=>t(n,e=>e+1))}exports.atomWithRefresh=t;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Getter } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-refresh.d.ts
|
|
3
|
+
declare function atomWithRefresh<TValue>(fn: (get: Getter) => TValue): import("jotai").WritableAtom<TValue, [], void>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { atomWithRefresh };
|
|
6
|
+
//# sourceMappingURL=atom-with-refresh.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-refresh.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh.ts"],"mappings":";;iBAqBgB,gBAAgB,QAAQ,KAAK,KAAK,WAAW,yBAAM,aAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Getter } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-refresh.d.ts
|
|
3
|
+
declare function atomWithRefresh<TValue>(fn: (get: Getter) => TValue): import("jotai").WritableAtom<TValue, [], void>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { atomWithRefresh };
|
|
6
|
+
//# sourceMappingURL=atom-with-refresh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-refresh.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-refresh.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./base-atom.cjs");function t(t){let n=e.baseAtom(t,(e,t,r)=>{let i=r??!e(n);t(n,i)});return n}exports.atomWithToggle=t;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WritableAtom } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-toggle.d.ts
|
|
3
|
+
declare function atomWithToggle(initialValue?: boolean): WritableAtom<boolean, [boolean | undefined], void>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { atomWithToggle };
|
|
6
|
+
//# sourceMappingURL=atom-with-toggle.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-toggle.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-toggle.ts"],"mappings":";;iBAqBgB,eACd,yBACC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WritableAtom } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-toggle.d.ts
|
|
3
|
+
declare function atomWithToggle(initialValue?: boolean): WritableAtom<boolean, [boolean | undefined], void>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { atomWithToggle };
|
|
6
|
+
//# sourceMappingURL=atom-with-toggle.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-toggle.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-toggle.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-toggle.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../utilities/is-atom.cjs"),t=require("./base-atom.cjs"),n=require("./atom-with-broadcast.cjs"),r=require("./atom-with-debounce.cjs"),i=require("./atom-with-effect.cjs"),a=require("../utilities/create-web-storage.cjs");let o=require("@stryke/type-checks/is-function"),s=require("jotai/utils");const c=()=>a.createWebStorage(()=>localStorage);function l(a,l,u=c(),d){let f=d?.debounceMs??500,p=d?.getOnInit??!0,m=e.isAtom(l)?l:t.baseAtom(l),h=r.atomWithDebounce((0,s.atomWithStorage)(a,e.isAtom(l)?void 0:l,u,{getOnInit:p}),f),g=r.atomWithDebounce(n.atomWithBroadcast(a,e.isAtom(l)?void 0:l),f),_=t.baseAtom(e=>e(m),(e,t,n)=>{let r=(0,o.isFunction)(n)?n(e(m)):n;t(m,r),t(h.debouncedValueAtom,r),t(g.debouncedValueAtom,r)}),v=i.atomWithEffect((e,t)=>{let n=e(g.debouncedValueAtom);n!==e(_)&&t(_,n)});return t.baseAtom(e=>(e(v),e(_)),(e,t,n)=>{t(_,n)})}exports.atomWithWebStorage=l,exports.getWebStorage=c;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PrimitiveAtom, WritableAtom } from "jotai";
|
|
2
|
+
import { atomWithStorage } from "jotai/utils";
|
|
3
|
+
import { AsyncStorage, SyncStorage } from "jotai/vanilla/utils/atomWithStorage";
|
|
4
|
+
import { SetStateAction as SetStateAction$1 } from "react";
|
|
5
|
+
//#region src/base/atoms/atom-with-web-storage.d.ts
|
|
6
|
+
declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TValue>;
|
|
7
|
+
/**
|
|
8
|
+
* Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
9
|
+
*
|
|
10
|
+
* @param key - The key to use for the storage
|
|
11
|
+
* @param initialValue - The initial value of the atom
|
|
12
|
+
* @param webStorage - The storage to use
|
|
13
|
+
* @returns An atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
14
|
+
*/
|
|
15
|
+
declare function atomWithWebStorage<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction$1<TValue>], void>, webStorage?: AsyncStorage<TValue> | SyncStorage<TValue>, options?: {
|
|
16
|
+
debounceMs?: number;
|
|
17
|
+
} & Parameters<typeof atomWithStorage>[3]): WritableAtom<TValue, [SetStateAction$1<TValue>], void>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { atomWithWebStorage, getWebStorage };
|
|
20
|
+
//# sourceMappingURL=atom-with-web-storage.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":";;;;;cAiCa,gBAAiB,aAC5B,aAAa,UAAU,YAAY;;;;;;;;;iBAWrB,mBAAmB,QACjC,aACA,oBACI,cAAc,UACd,SACA,aAAa,SAAS,iBAAe,iBACzC,aACE,aAAa,UAAU,YAAY,SACrC;EAAY;IAAwB,kBAAkB,sBACrD,aAAa,SAAS,iBAAe"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { atomWithStorage } from "jotai/utils";
|
|
2
|
+
import { PrimitiveAtom, WritableAtom } from "jotai";
|
|
3
|
+
import { SetStateAction as SetStateAction$1 } from "react";
|
|
4
|
+
import { AsyncStorage, SyncStorage } from "jotai/vanilla/utils/atomWithStorage";
|
|
5
|
+
//#region src/base/atoms/atom-with-web-storage.d.ts
|
|
6
|
+
declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TValue>;
|
|
7
|
+
/**
|
|
8
|
+
* Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
9
|
+
*
|
|
10
|
+
* @param key - The key to use for the storage
|
|
11
|
+
* @param initialValue - The initial value of the atom
|
|
12
|
+
* @param webStorage - The storage to use
|
|
13
|
+
* @returns An atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
|
|
14
|
+
*/
|
|
15
|
+
declare function atomWithWebStorage<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction$1<TValue>], void>, webStorage?: AsyncStorage<TValue> | SyncStorage<TValue>, options?: {
|
|
16
|
+
debounceMs?: number;
|
|
17
|
+
} & Parameters<typeof atomWithStorage>[3]): WritableAtom<TValue, [SetStateAction$1<TValue>], void>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { atomWithWebStorage, getWebStorage };
|
|
20
|
+
//# sourceMappingURL=atom-with-web-storage.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isAtom as e}from"../utilities/is-atom.mjs";import{baseAtom as t}from"./base-atom.mjs";import{atomWithBroadcast as n}from"./atom-with-broadcast.mjs";import{atomWithDebounce as r}from"./atom-with-debounce.mjs";import{atomWithEffect as i}from"./atom-with-effect.mjs";import{createWebStorage as a}from"../utilities/create-web-storage.mjs";import{isFunction as o}from"@stryke/type-checks/is-function";import{atomWithStorage as s}from"jotai/utils";const c=()=>a(()=>localStorage);function l(a,l,u=c(),d){let f=d?.debounceMs??500,p=d?.getOnInit??!0,m=e(l)?l:t(l),h=r(s(a,e(l)?void 0:l,u,{getOnInit:p}),f),g=r(n(a,e(l)?void 0:l),f),_=t(e=>e(m),(e,t,n)=>{let r=o(n)?n(e(m)):n;t(m,r),t(h.debouncedValueAtom,r),t(g.debouncedValueAtom,r)}),v=i((e,t)=>{let n=e(g.debouncedValueAtom);n!==e(_)&&t(_,n)});return t(e=>(e(v),e(_)),(e,t,n)=>{t(_,n)})}export{l as atomWithWebStorage,c as getWebStorage};
|
|
2
|
+
//# sourceMappingURL=atom-with-web-storage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-web-storage.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./base-atom.cjs");let t=require("@stryke/type-checks/is-function");const n=e=>(0,t.isFunction)(e)?{__fn:e}:e,r=e=>e&&typeof e==`object`&&`__fn`in e?e.__fn:e,i=t=>{let i=e.baseAtom(n(t));return e.baseAtom(e=>r(e(i)),(e,t,r)=>t(i,n(r)))};exports.atomWithWrapper=i;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WritableAtom } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-wrapper.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Create an atom with a wrapper that allows functions as values.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Jotai atoms don't allow functions as values by default. This function is a
|
|
8
|
+
* drop-in replacement for `atom` that wraps functions in an object while
|
|
9
|
+
* leaving non-functions unchanged. The wrapper object should be completely
|
|
10
|
+
* invisible to consumers of the atom.
|
|
11
|
+
*
|
|
12
|
+
* @param initialValue - The initial value of the atom
|
|
13
|
+
* @returns An atom with a wrapper that allows functions as values.
|
|
14
|
+
*/
|
|
15
|
+
declare const atomWithWrapper: <TValue>(initialValue: TValue) => WritableAtom<TValue, [TValue], Promise<void> | void>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { atomWithWrapper };
|
|
18
|
+
//# sourceMappingURL=atom-with-wrapper.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-wrapper.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-wrapper.ts"],"mappings":";;;;;;;;;;;;;;cAiDa,kBAAmB,QAC9B,cAAc,WACb,aAAa,SAAS,SAAS"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WritableAtom } from "jotai";
|
|
2
|
+
//#region src/base/atoms/atom-with-wrapper.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Create an atom with a wrapper that allows functions as values.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Jotai atoms don't allow functions as values by default. This function is a
|
|
8
|
+
* drop-in replacement for `atom` that wraps functions in an object while
|
|
9
|
+
* leaving non-functions unchanged. The wrapper object should be completely
|
|
10
|
+
* invisible to consumers of the atom.
|
|
11
|
+
*
|
|
12
|
+
* @param initialValue - The initial value of the atom
|
|
13
|
+
* @returns An atom with a wrapper that allows functions as values.
|
|
14
|
+
*/
|
|
15
|
+
declare const atomWithWrapper: <TValue>(initialValue: TValue) => WritableAtom<TValue, [TValue], Promise<void> | void>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { atomWithWrapper };
|
|
18
|
+
//# sourceMappingURL=atom-with-wrapper.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-wrapper.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-wrapper.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{baseAtom as e}from"./base-atom.mjs";import{isFunction as t}from"@stryke/type-checks/is-function";const n=e=>t(e)?{__fn:e}:e,r=e=>e&&typeof e==`object`&&`__fn`in e?e.__fn:e,i=t=>{let i=e(n(t));return e(e=>r(e(i)),(e,t,r)=>t(i,n(r)))};export{i as atomWithWrapper};
|
|
2
|
+
//# sourceMappingURL=atom-with-wrapper.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atom-with-wrapper.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../utilities/set-atom-debug.cjs");let t=require("jotai/vanilla");function n(n,r){let i=(0,t.atom)(n,r);return i.setDebugLabel=t=>{e.setAtomDebugLabel(i,t)},i}exports.baseAtom=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-atom.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./atom-with-broadcast.cjs"),t=require("./atom-with-compare.cjs"),n=require("./atom-with-wrapper.cjs"),r=require("./atom-with-debounce.cjs"),i=require("./atom-with-effect.cjs"),a=require("./atom-with-listeners.cjs"),o=require("./atom-with-pending.cjs"),s=require("./atom-with-refresh.cjs"),c=require("./atom-with-refresh-and-default.cjs"),l=require("./atom-with-toggle.cjs"),u=require("./atom-with-web-storage.cjs");exports.atomWithBroadcast=e.atomWithBroadcast,exports.atomWithCompare=t.atomWithCompare,exports.atomWithDebounce=r.atomWithDebounce,exports.atomWithEffect=i.atomWithEffect,exports.atomWithListeners=a.atomWithListeners,exports.atomWithPending=o.atomWithPending,exports.atomWithRefresh=s.atomWithRefresh,exports.atomWithRefreshAndDefault=c.atomWithRefreshAndDefault,exports.atomWithToggle=l.atomWithToggle,exports.atomWithWebStorage=u.atomWithWebStorage,exports.atomWithWrapper=n.atomWithWrapper,exports.getWebStorage=u.getWebStorage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { atomWithBroadcast } from "./atom-with-broadcast.cjs";
|
|
2
|
+
import { atomWithCompare } from "./atom-with-compare.cjs";
|
|
3
|
+
import { atomWithDebounce } from "./atom-with-debounce.cjs";
|
|
4
|
+
import { EffectCallback, atomWithEffect } from "./atom-with-effect.cjs";
|
|
5
|
+
import { Callback, atomWithListeners } from "./atom-with-listeners.cjs";
|
|
6
|
+
import { atomWithPending } from "./atom-with-pending.cjs";
|
|
7
|
+
import { atomWithRefresh } from "./atom-with-refresh.cjs";
|
|
8
|
+
import { atomWithRefreshAndDefault } from "./atom-with-refresh-and-default.cjs";
|
|
9
|
+
import { atomWithToggle } from "./atom-with-toggle.cjs";
|
|
10
|
+
import { atomWithWebStorage, getWebStorage } from "./atom-with-web-storage.cjs";
|
|
11
|
+
import { atomWithWrapper } from "./atom-with-wrapper.cjs";
|
|
12
|
+
export { Callback, EffectCallback, atomWithBroadcast, atomWithCompare, atomWithDebounce, atomWithEffect, atomWithListeners, atomWithPending, atomWithRefresh, atomWithRefreshAndDefault, atomWithToggle, atomWithWebStorage, atomWithWrapper, getWebStorage };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { atomWithBroadcast } from "./atom-with-broadcast.mjs";
|
|
2
|
+
import { atomWithCompare } from "./atom-with-compare.mjs";
|
|
3
|
+
import { atomWithDebounce } from "./atom-with-debounce.mjs";
|
|
4
|
+
import { EffectCallback, atomWithEffect } from "./atom-with-effect.mjs";
|
|
5
|
+
import { Callback, atomWithListeners } from "./atom-with-listeners.mjs";
|
|
6
|
+
import { atomWithPending } from "./atom-with-pending.mjs";
|
|
7
|
+
import { atomWithRefresh } from "./atom-with-refresh.mjs";
|
|
8
|
+
import { atomWithRefreshAndDefault } from "./atom-with-refresh-and-default.mjs";
|
|
9
|
+
import { atomWithToggle } from "./atom-with-toggle.mjs";
|
|
10
|
+
import { atomWithWebStorage, getWebStorage } from "./atom-with-web-storage.mjs";
|
|
11
|
+
import { atomWithWrapper } from "./atom-with-wrapper.mjs";
|
|
12
|
+
export { Callback, EffectCallback, atomWithBroadcast, atomWithCompare, atomWithDebounce, atomWithEffect, atomWithListeners, atomWithPending, atomWithRefresh, atomWithRefreshAndDefault, atomWithToggle, atomWithWebStorage, atomWithWrapper, getWebStorage };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{atomWithBroadcast as e}from"./atom-with-broadcast.mjs";import{atomWithCompare as t}from"./atom-with-compare.mjs";import{atomWithWrapper as n}from"./atom-with-wrapper.mjs";import{atomWithDebounce as r}from"./atom-with-debounce.mjs";import{atomWithEffect as i}from"./atom-with-effect.mjs";import{atomWithListeners as a}from"./atom-with-listeners.mjs";import{atomWithPending as o}from"./atom-with-pending.mjs";import{atomWithRefresh as s}from"./atom-with-refresh.mjs";import{atomWithRefreshAndDefault as c}from"./atom-with-refresh-and-default.mjs";import{atomWithToggle as l}from"./atom-with-toggle.mjs";import{atomWithWebStorage as u,getWebStorage as d}from"./atom-with-web-storage.mjs";export{e as atomWithBroadcast,t as atomWithCompare,r as atomWithDebounce,i as atomWithEffect,a as atomWithListeners,o as atomWithPending,s as atomWithRefresh,c as atomWithRefreshAndDefault,l as atomWithToggle,u as atomWithWebStorage,n as atomWithWrapper,d as getWebStorage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./use-atom-effect.cjs"),t=require("./use-hydrate-molecule.cjs"),n=require("./use-prepare-atoms.cjs"),r=require("./use-sync-molecule.cjs");exports.useAtomEffect=e.useAtomEffect,exports.useHydrateMolecule=t.useHydrateMolecule,exports.usePrepareAtoms=n.usePrepareAtoms,exports.useSyncMolecule=r.useSyncMolecule;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useAtomEffect } from "./use-atom-effect.cjs";
|
|
2
|
+
import { UseHydrateAtoms, useHydrateMolecule } from "./use-hydrate-molecule.cjs";
|
|
3
|
+
import { usePrepareAtoms } from "./use-prepare-atoms.cjs";
|
|
4
|
+
import { UseSyncAtoms, useSyncMolecule } from "./use-sync-molecule.cjs";
|
|
5
|
+
export { UseHydrateAtoms, UseSyncAtoms, useAtomEffect, useHydrateMolecule, usePrepareAtoms, useSyncMolecule };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useAtomEffect } from "./use-atom-effect.mjs";
|
|
2
|
+
import { UseHydrateAtoms, useHydrateMolecule } from "./use-hydrate-molecule.mjs";
|
|
3
|
+
import { usePrepareAtoms } from "./use-prepare-atoms.mjs";
|
|
4
|
+
import { UseSyncAtoms, useSyncMolecule } from "./use-sync-molecule.mjs";
|
|
5
|
+
export { UseHydrateAtoms, UseSyncAtoms, useAtomEffect, useHydrateMolecule, usePrepareAtoms, useSyncMolecule };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useAtomEffect as e}from"./use-atom-effect.mjs";import{useHydrateMolecule as t}from"./use-hydrate-molecule.mjs";import{usePrepareAtoms as n}from"./use-prepare-atoms.mjs";import{useSyncMolecule as r}from"./use-sync-molecule.mjs";export{e as useAtomEffect,t as useHydrateMolecule,n as usePrepareAtoms,r as useSyncMolecule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../atoms/atom-with-effect.cjs");let t=require("jotai/utils"),n=require("@stryke/hooks/use-memo-stable"),r=require("jotai/react");function i(i,a=[]){(0,r.useAtomValue)((0,t.loadable)((0,n.useMemoStable)(()=>e.atomWithEffect(i),a)))}exports.useAtomEffect=i;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EffectCallback } from "../atoms/atom-with-effect.cjs";
|
|
2
|
+
//#region src/base/hooks/use-atom-effect.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A hook that runs a side effect when the component mounts.
|
|
5
|
+
*
|
|
6
|
+
* @param effectFn - The side effect function.
|
|
7
|
+
*/
|
|
8
|
+
declare function useAtomEffect(effectFn: EffectCallback, deps?: any[]): void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useAtomEffect };
|
|
11
|
+
//# sourceMappingURL=use-atom-effect.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-atom-effect.d.cts","names":[],"sources":["../../../src/base/hooks/use-atom-effect.ts"],"mappings":";;;;;;;iBA6BgB,cAAc,UAAU,gBAAgB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EffectCallback } from "../atoms/atom-with-effect.mjs";
|
|
2
|
+
//#region src/base/hooks/use-atom-effect.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A hook that runs a side effect when the component mounts.
|
|
5
|
+
*
|
|
6
|
+
* @param effectFn - The side effect function.
|
|
7
|
+
*/
|
|
8
|
+
declare function useAtomEffect(effectFn: EffectCallback, deps?: any[]): void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useAtomEffect };
|
|
11
|
+
//# sourceMappingURL=use-atom-effect.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-atom-effect.d.mts","names":[],"sources":["../../../src/base/hooks/use-atom-effect.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{atomWithEffect as e}from"../atoms/atom-with-effect.mjs";import{loadable as t}from"jotai/utils";import{useMemoStable as n}from"@stryke/hooks/use-memo-stable";import{useAtomValue as r}from"jotai/react";function i(i,a=[]){r(t(n(()=>e(i),a)))}export{i as useAtomEffect};
|
|
2
|
+
//# sourceMappingURL=use-atom-effect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-atom-effect.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("jotai/utils");const t=(t,n,r)=>{let i=[];for(let e of Object.keys(t)){let r=n[e];r!==void 0&&i.push([t[e],r])}(0,e.useHydrateAtoms)(i,{store:r})};exports.useHydrateMolecule=t;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JotaiStore, WritableAtomRecord } from "../../types.cjs";
|
|
2
|
+
import { useHydrateAtoms } from "jotai/utils";
|
|
3
|
+
//#region src/base/hooks/use-hydrate-molecule.d.ts
|
|
4
|
+
type UseHydrateAtoms<T> = (initialValues: Partial<Record<keyof T, any>>, options?: Parameters<typeof useHydrateAtoms>[1]) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Hydrate atoms with initial values for SSR.
|
|
7
|
+
*/
|
|
8
|
+
declare const useHydrateMolecule: <T extends object>(atoms: WritableAtomRecord<T>, initialValues: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { UseHydrateAtoms, useHydrateMolecule };
|
|
11
|
+
//# sourceMappingURL=use-hydrate-molecule.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hydrate-molecule.d.cts","names":[],"sources":["../../../src/base/hooks/use-hydrate-molecule.ts"],"mappings":";;;KAsBY,gBAAgB,MAC1B,eAAe,QAAQ,aAAa,UACpC,UAAU,kBAAkB;;;;cAMjB,qBAAsB,kBACjC,OAAO,mBAAmB,IAC1B,eAAe,QAAQ,aAAa,cACpC,QAAQ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JotaiStore, WritableAtomRecord } from "../../types.mjs";
|
|
2
|
+
import { useHydrateAtoms } from "jotai/utils";
|
|
3
|
+
//#region src/base/hooks/use-hydrate-molecule.d.ts
|
|
4
|
+
type UseHydrateAtoms<T> = (initialValues: Partial<Record<keyof T, any>>, options?: Parameters<typeof useHydrateAtoms>[1]) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Hydrate atoms with initial values for SSR.
|
|
7
|
+
*/
|
|
8
|
+
declare const useHydrateMolecule: <T extends object>(atoms: WritableAtomRecord<T>, initialValues: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { UseHydrateAtoms, useHydrateMolecule };
|
|
11
|
+
//# sourceMappingURL=use-hydrate-molecule.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hydrate-molecule.d.mts","names":[],"sources":["../../../src/base/hooks/use-hydrate-molecule.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hydrate-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("jotai/vanilla"),t=require("react"),n=require("jotai/react");function r(e,n=(e,t)=>e===t){let[r,i]=(0,t.useState)(e),a=e.length!==r.length||e.some((e,t)=>!n(e,r[t]));return a&&i(e),a?e:r}function i(i,a){let o=r(i);(0,n.useAtomValue)((0,t.useMemo)(()=>(0,e.atom)(e=>{o.map(t=>e(t))}),[o]),a)}exports.usePrepareAtoms=i;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Atom } from "jotai/vanilla";
|
|
2
|
+
import { useAtomValue } from "jotai/react";
|
|
3
|
+
//#region src/base/hooks/use-prepare-atoms.d.ts
|
|
4
|
+
type Options = Parameters<typeof useAtomValue>[1];
|
|
5
|
+
declare function usePrepareAtoms(atoms: Atom<unknown>[], options?: Options): void;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { usePrepareAtoms };
|
|
8
|
+
//# sourceMappingURL=use-prepare-atoms.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-prepare-atoms.d.cts","names":[],"sources":["../../../src/base/hooks/use-prepare-atoms.ts"],"mappings":";;;KAmCK,UAAU,kBAAkB;iBAEjB,gBAAgB,OAAO,iBAAiB,UAAU"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Atom } from "jotai/vanilla";
|
|
2
|
+
import { useAtomValue } from "jotai/react";
|
|
3
|
+
//#region src/base/hooks/use-prepare-atoms.d.ts
|
|
4
|
+
type Options = Parameters<typeof useAtomValue>[1];
|
|
5
|
+
declare function usePrepareAtoms(atoms: Atom<unknown>[], options?: Options): void;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { usePrepareAtoms };
|
|
8
|
+
//# sourceMappingURL=use-prepare-atoms.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-prepare-atoms.d.mts","names":[],"sources":["../../../src/base/hooks/use-prepare-atoms.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{atom as e}from"jotai/vanilla";import{useMemo as t,useState as n}from"react";import{useAtomValue as r}from"jotai/react";function i(e,t=(e,t)=>e===t){let[r,i]=n(e),a=e.length!==r.length||e.some((e,n)=>!t(e,r[n]));return a&&i(e),a?e:r}function a(n,a){let o=i(n);r(t(()=>e(e=>{o.map(t=>e(t))}),[o]),a)}export{a as usePrepareAtoms};
|
|
2
|
+
//# sourceMappingURL=use-prepare-atoms.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-prepare-atoms.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../utilities/is-atom.cjs");let t=require("jotai"),n=require("react");const r=(r,i,a)=>{for(let o of Object.keys(r)){let s=i[o];e.isAtom(s)&&(s=(0,t.useAtomValue)(s));let c=(0,t.useSetAtom)(r[o],{store:a});(0,n.useEffect)(()=>{s!==void 0&&c(s)},[c,s])}};exports.useSyncMolecule=r;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JotaiStore, WritableAtomRecord } from "../../types.cjs";
|
|
2
|
+
//#region src/base/hooks/use-sync-molecule.d.ts
|
|
3
|
+
type UseSyncAtoms<T> = (values: Partial<Record<keyof T, any>>, store?: JotaiStore) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Update atoms with new values on changes.
|
|
6
|
+
*/
|
|
7
|
+
declare const useSyncMolecule: <T extends object>(atoms: WritableAtomRecord<T>, values: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { UseSyncAtoms, useSyncMolecule };
|
|
10
|
+
//# sourceMappingURL=use-sync-molecule.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sync-molecule.d.cts","names":[],"sources":["../../../src/base/hooks/use-sync-molecule.ts"],"mappings":";;KA4BY,aAAa,MACvB,QAAQ,QAAQ,aAAa,UAC7B,QAAQ;;;;cAMG,kBAAmB,kBAC9B,OAAO,mBAAmB,IAC1B,QAAQ,QAAQ,aAAa,cAC7B,QAAQ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { JotaiStore, WritableAtomRecord } from "../../types.mjs";
|
|
2
|
+
//#region src/base/hooks/use-sync-molecule.d.ts
|
|
3
|
+
type UseSyncAtoms<T> = (values: Partial<Record<keyof T, any>>, store?: JotaiStore) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Update atoms with new values on changes.
|
|
6
|
+
*/
|
|
7
|
+
declare const useSyncMolecule: <T extends object>(atoms: WritableAtomRecord<T>, values: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { UseSyncAtoms, useSyncMolecule };
|
|
10
|
+
//# sourceMappingURL=use-sync-molecule.d.mts.map
|