@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,49 @@
|
|
|
1
|
+
import { MoleculeScopeOptions } from "../../base/utilities/create-molecule.mjs";
|
|
2
|
+
import { ColorThemeName } from "../types.mjs";
|
|
3
|
+
//#region src/theme/hooks/use-theme-store.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Get the color role scheme for the current theme name
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The following color roles are checked:
|
|
9
|
+
* - base
|
|
10
|
+
* - brand
|
|
11
|
+
* - alternate
|
|
12
|
+
* - accent
|
|
13
|
+
* - link
|
|
14
|
+
* - help
|
|
15
|
+
* - info
|
|
16
|
+
* - warning
|
|
17
|
+
* - danger
|
|
18
|
+
* - success
|
|
19
|
+
* - positive
|
|
20
|
+
* - negative
|
|
21
|
+
*
|
|
22
|
+
* @returns The color role scheme for the theme name or undefined
|
|
23
|
+
*/
|
|
24
|
+
declare const useColorThemeName: () => ColorThemeName | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a color role scheme is set for the current theme name
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* The following color roles are checked:
|
|
30
|
+
* - base
|
|
31
|
+
* - brand
|
|
32
|
+
* - alternate
|
|
33
|
+
* - accent
|
|
34
|
+
* - link
|
|
35
|
+
* - help
|
|
36
|
+
* - info
|
|
37
|
+
* - warning
|
|
38
|
+
* - danger
|
|
39
|
+
* - success
|
|
40
|
+
* - positive
|
|
41
|
+
* - negative
|
|
42
|
+
*
|
|
43
|
+
* @returns An indication if a theme color scheme is set
|
|
44
|
+
*/
|
|
45
|
+
declare const useColorThemeNameExists: () => boolean;
|
|
46
|
+
declare const useThemeMode: (options?: MoleculeScopeOptions) => string;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { useColorThemeName, useColorThemeNameExists, useThemeMode };
|
|
49
|
+
//# sourceMappingURL=use-theme-store.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-theme-store.d.mts","names":[],"sources":["../../../src/theme/hooks/use-theme-store.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ThemeApi as e}from"../molecules/theme-molecule.mjs";import{getThemeColorThemeName as t,themeColorThemeNameExists as n}from"../utilities/theme-helpers.mjs";import{useThemeName as r}from"@tamagui/core";const i=()=>{let e=r();return t(e)},a=()=>{let e=r();return n(e)},o=t=>e.use(t).mode.get();export{i as useColorThemeName,a as useColorThemeNameExists,o as useThemeMode};
|
|
2
|
+
//# sourceMappingURL=use-theme-store.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-theme-store.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./molecules/theme-molecule.cjs"),t=require("./hooks/use-theme-actions.cjs"),n=require("./utilities/theme-helpers.cjs"),r=require("./hooks/use-theme-store.cjs");require("./hooks/index.cjs"),require("./molecules/index.cjs");const i=require("./providers/ThemeProvider.cjs"),a=require("./types.cjs");exports.ColorThemeName=a.ColorThemeName,exports.ThemeApi=e.ThemeApi,exports.ThemeProvider=i.ThemeProvider,exports.getThemeColorThemeName=n.getThemeColorThemeName,exports.themeColorThemeNameExists=n.themeColorThemeNameExists,exports.useColorThemeName=r.useColorThemeName,exports.useColorThemeNameExists=r.useColorThemeNameExists,exports.useThemeActions=t.useThemeActions,exports.useThemeMode=r.useThemeMode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions } from "./types.cjs";
|
|
2
|
+
import { useThemeActions } from "./hooks/use-theme-actions.cjs";
|
|
3
|
+
import { useColorThemeName, useColorThemeNameExists, useThemeMode } from "./hooks/use-theme-store.cjs";
|
|
4
|
+
import "./hooks/index.cjs";
|
|
5
|
+
import { ThemeApi } from "./molecules/theme-molecule.cjs";
|
|
6
|
+
import "./molecules/index.cjs";
|
|
7
|
+
import { ThemeProvider, ThemeProviderProps } from "./providers/ThemeProvider.cjs";
|
|
8
|
+
import { getThemeColorThemeName, themeColorThemeNameExists } from "./utilities/theme-helpers.cjs";
|
|
9
|
+
export { ColorThemeMode, ColorThemeName, ThemeApi, ThemeBaseState, ThemeOptions, ThemeProvider, ThemeProviderProps, getThemeColorThemeName, themeColorThemeNameExists, useColorThemeName, useColorThemeNameExists, useThemeActions, useThemeMode };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions } from "./types.mjs";
|
|
2
|
+
import { useThemeActions } from "./hooks/use-theme-actions.mjs";
|
|
3
|
+
import { useColorThemeName, useColorThemeNameExists, useThemeMode } from "./hooks/use-theme-store.mjs";
|
|
4
|
+
import "./hooks/index.mjs";
|
|
5
|
+
import { ThemeApi } from "./molecules/theme-molecule.mjs";
|
|
6
|
+
import "./molecules/index.mjs";
|
|
7
|
+
import { ThemeProvider, ThemeProviderProps } from "./providers/ThemeProvider.mjs";
|
|
8
|
+
import { getThemeColorThemeName, themeColorThemeNameExists } from "./utilities/theme-helpers.mjs";
|
|
9
|
+
export { ColorThemeMode, ColorThemeName, ThemeApi, ThemeBaseState, ThemeOptions, ThemeProvider, ThemeProviderProps, getThemeColorThemeName, themeColorThemeNameExists, useColorThemeName, useColorThemeNameExists, useThemeActions, useThemeMode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ThemeApi as e}from"./molecules/theme-molecule.mjs";import{useThemeActions as t}from"./hooks/use-theme-actions.mjs";import{getThemeColorThemeName as n,themeColorThemeNameExists as r}from"./utilities/theme-helpers.mjs";import{useColorThemeName as i,useColorThemeNameExists as a,useThemeMode as o}from"./hooks/use-theme-store.mjs";import"./hooks/index.mjs";import"./molecules/index.mjs";import{ThemeProvider as s}from"./providers/ThemeProvider.mjs";import{ColorThemeName as c}from"./types.mjs";export{c as ColorThemeName,e as ThemeApi,s as ThemeProvider,n as getThemeColorThemeName,r as themeColorThemeNameExists,i as useColorThemeName,a as useColorThemeNameExists,t as useThemeActions,o as useThemeMode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./theme-molecule.cjs");exports.ThemeApi=e.ThemeApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ThemeApi as e}from"./theme-molecule.mjs";export{e as ThemeApi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../base/utilities/create-molecule.cjs");let t=require("jotai/utils"),n=require("jotai");const r=e.createMoleculeApi(()=>({items:(0,n.atom)([`light`,`dark`]),mode:(0,t.atomWithReset)(`dark`)}),{type:`theme`});exports.ThemeApi=r;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MoleculeApi } from "../../base/utilities/create-molecule.cjs";
|
|
2
|
+
import "../../index.cjs";
|
|
3
|
+
//#region src/theme/molecules/theme-molecule.d.ts
|
|
4
|
+
declare const ThemeApi: MoleculeApi<{
|
|
5
|
+
items: import("jotai").PrimitiveAtom<string[]> & {
|
|
6
|
+
init: string[];
|
|
7
|
+
};
|
|
8
|
+
mode: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void> & {
|
|
9
|
+
init: string;
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ThemeApi };
|
|
14
|
+
//# sourceMappingURL=theme-molecule.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-molecule.d.cts","names":[],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":";;;cAsBa,UAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MoleculeApi } from "../../base/utilities/create-molecule.mjs";
|
|
2
|
+
import "../../index.mjs";
|
|
3
|
+
//#region src/theme/molecules/theme-molecule.d.ts
|
|
4
|
+
declare const ThemeApi: MoleculeApi<{
|
|
5
|
+
items: import("jotai").PrimitiveAtom<string[]> & {
|
|
6
|
+
init: string[];
|
|
7
|
+
};
|
|
8
|
+
mode: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void> & {
|
|
9
|
+
init: string;
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ThemeApi };
|
|
14
|
+
//# sourceMappingURL=theme-molecule.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-molecule.d.mts","names":[],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createMoleculeApi as e}from"../../base/utilities/create-molecule.mjs";import{atomWithReset as t}from"jotai/utils";import{atom as n}from"jotai";const r=e(()=>({items:n([`light`,`dark`]),mode:t(`dark`)}),{type:`theme`});export{r as ThemeApi};
|
|
2
|
+
//# sourceMappingURL=theme-molecule.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-molecule.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const e=require("../molecules/theme-molecule.cjs");let t=require("react"),n=require("@tamagui/core");const r=({children:t,disableInjectCSS:r=!0,...i})=>{let a=e.ThemeApi.use().mode.get();return<n.TamaguiProvider{...i} defaultTheme={a} disableInjectCSS={r}>
|
|
2
|
+
{t}
|
|
3
|
+
</n.TamaguiProvider>},i=[`light`,`dark`],a=({children:n,defaultMode:a=`dark`,items:o=i,...s})=>{let c=(0,t.useMemo)(()=>{if(typeof window<`u`&&window.matchMedia){if(window.matchMedia(`(prefers-color-scheme: light)`).matches)return`light`;if(window.matchMedia(`(prefers-color-scheme: dark)`).matches)return`dark`}return a},[a]);return<e.ThemeApi.Provider scope="theme" initialState={{mode:c,items:o}}>
|
|
4
|
+
<r{...s}>{n}</r>
|
|
5
|
+
</e.ThemeApi.Provider>};exports.ThemeProvider=a;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ThemeOptions } from "../types.cjs";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
import { CreateTamaguiProps, InferTamaguiConfig, TamaguiProviderProps } from "@tamagui/core";
|
|
4
|
+
//#region src/theme/providers/ThemeProvider.d.ts
|
|
5
|
+
type ThemeStateManagerProps = PropsWithChildren<Omit<TamaguiProviderProps, "defaultTheme"> & {
|
|
6
|
+
disableInjectCSS?: boolean;
|
|
7
|
+
config: InferTamaguiConfig<CreateTamaguiProps>;
|
|
8
|
+
}>;
|
|
9
|
+
type ThemeProviderProps = PropsWithChildren<Partial<ThemeOptions> & ThemeStateManagerProps>;
|
|
10
|
+
declare const ThemeProvider: ({ children, defaultMode, items, ...props }: ThemeProviderProps) => import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ThemeProvider, ThemeProviderProps };
|
|
13
|
+
//# sourceMappingURL=ThemeProvider.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.cts","names":[],"sources":["../../../src/theme/providers/ThemeProvider.tsx"],"mappings":";;;;KA+BK,yBAAyB,kBAC5B,KAAK;EACH;EACA,QAAQ,mBAAmB;;KAInB,qBAAqB,kBAC/B,QAAQ,gBAAgB;cAuBb,kBAAiB,UAAA,aAAA,UAAA,SAK3B,uCAAkB,IAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ThemeOptions } from "../types.mjs";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
|
+
import { CreateTamaguiProps, InferTamaguiConfig, TamaguiProviderProps } from "@tamagui/core";
|
|
4
|
+
//#region src/theme/providers/ThemeProvider.d.ts
|
|
5
|
+
type ThemeStateManagerProps = PropsWithChildren<Omit<TamaguiProviderProps, "defaultTheme"> & {
|
|
6
|
+
disableInjectCSS?: boolean;
|
|
7
|
+
config: InferTamaguiConfig<CreateTamaguiProps>;
|
|
8
|
+
}>;
|
|
9
|
+
type ThemeProviderProps = PropsWithChildren<Partial<ThemeOptions> & ThemeStateManagerProps>;
|
|
10
|
+
declare const ThemeProvider: ({ children, defaultMode, items, ...props }: ThemeProviderProps) => import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ThemeProvider, ThemeProviderProps };
|
|
13
|
+
//# sourceMappingURL=ThemeProvider.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.mts","names":[],"sources":["../../../src/theme/providers/ThemeProvider.tsx"],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{ThemeApi as e}from"../molecules/theme-molecule.mjs";import{useMemo as t}from"react";import{TamaguiProvider as n}from"@tamagui/core";const r=({children:t,disableInjectCSS:r=!0,...i})=>{let a=e.use().mode.get();return<n{...i} defaultTheme={a} disableInjectCSS={r}>
|
|
2
|
+
{t}
|
|
3
|
+
</n>},i=[`light`,`dark`],a=({children:n,defaultMode:a=`dark`,items:o=i,...s})=>{let c=t(()=>{if(typeof window<`u`&&window.matchMedia){if(window.matchMedia(`(prefers-color-scheme: light)`).matches)return`light`;if(window.matchMedia(`(prefers-color-scheme: dark)`).matches)return`dark`}return a},[a]);return<e.Provider scope="theme" initialState={{mode:c,items:o}}>
|
|
4
|
+
<r{...s}>{n}</r>
|
|
5
|
+
</e.Provider>};export{a as ThemeProvider};
|
|
6
|
+
//# sourceMappingURL=ThemeProvider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={PRIMARY:`primary`,SECONDARY:`secondary`,DISCOVERY:`discovery`,INFO:`info`,WARNING:`warning`,DANGER:`danger`,SUCCESS:`success`,POSITIVE:`positive`,NEGATIVE:`negative`};exports.ColorThemeName=e;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/theme/types.d.ts
|
|
2
|
+
type ColorThemeMode = "light" | "dark";
|
|
3
|
+
type ColorThemeName = "primary" | "secondary" | "discovery" | "info" | "warning" | "danger" | "success" | "positive" | "negative";
|
|
4
|
+
declare const ColorThemeName: {
|
|
5
|
+
readonly PRIMARY: "primary";
|
|
6
|
+
readonly SECONDARY: "secondary";
|
|
7
|
+
readonly DISCOVERY: "discovery";
|
|
8
|
+
readonly INFO: "info";
|
|
9
|
+
readonly WARNING: "warning";
|
|
10
|
+
readonly DANGER: "danger";
|
|
11
|
+
readonly SUCCESS: "success";
|
|
12
|
+
readonly POSITIVE: "positive";
|
|
13
|
+
readonly NEGATIVE: "negative";
|
|
14
|
+
};
|
|
15
|
+
interface ThemeOptions {
|
|
16
|
+
/**
|
|
17
|
+
* The theme mode options.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue ["light", "dark"]
|
|
20
|
+
*/
|
|
21
|
+
items: ColorThemeMode[];
|
|
22
|
+
/**
|
|
23
|
+
* The theme mode to default to.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue "dark"
|
|
26
|
+
*/
|
|
27
|
+
defaultMode: ColorThemeMode;
|
|
28
|
+
}
|
|
29
|
+
interface ThemeBaseState {
|
|
30
|
+
/**
|
|
31
|
+
* The theme store options.
|
|
32
|
+
*/
|
|
33
|
+
options: ThemeOptions;
|
|
34
|
+
/**
|
|
35
|
+
* The current theme mode.
|
|
36
|
+
*/
|
|
37
|
+
mode: ColorThemeMode;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions };
|
|
41
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/theme/types.ts"],"mappings":";KAkBY;KAEA;cAWC;;;;;;;;;;;UAYI;;;;;;EAMf,OAAO;;;;;;EAOP,aAAa;;UAGE;;;;EAIf,SAAS;;;;EAKT,MAAM"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/theme/types.d.ts
|
|
2
|
+
type ColorThemeMode = "light" | "dark";
|
|
3
|
+
type ColorThemeName = "primary" | "secondary" | "discovery" | "info" | "warning" | "danger" | "success" | "positive" | "negative";
|
|
4
|
+
declare const ColorThemeName: {
|
|
5
|
+
readonly PRIMARY: "primary";
|
|
6
|
+
readonly SECONDARY: "secondary";
|
|
7
|
+
readonly DISCOVERY: "discovery";
|
|
8
|
+
readonly INFO: "info";
|
|
9
|
+
readonly WARNING: "warning";
|
|
10
|
+
readonly DANGER: "danger";
|
|
11
|
+
readonly SUCCESS: "success";
|
|
12
|
+
readonly POSITIVE: "positive";
|
|
13
|
+
readonly NEGATIVE: "negative";
|
|
14
|
+
};
|
|
15
|
+
interface ThemeOptions {
|
|
16
|
+
/**
|
|
17
|
+
* The theme mode options.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue ["light", "dark"]
|
|
20
|
+
*/
|
|
21
|
+
items: ColorThemeMode[];
|
|
22
|
+
/**
|
|
23
|
+
* The theme mode to default to.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue "dark"
|
|
26
|
+
*/
|
|
27
|
+
defaultMode: ColorThemeMode;
|
|
28
|
+
}
|
|
29
|
+
interface ThemeBaseState {
|
|
30
|
+
/**
|
|
31
|
+
* The theme store options.
|
|
32
|
+
*/
|
|
33
|
+
options: ThemeOptions;
|
|
34
|
+
/**
|
|
35
|
+
* The current theme mode.
|
|
36
|
+
*/
|
|
37
|
+
mode: ColorThemeMode;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions };
|
|
41
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/theme/types.ts"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>{if(e){if(e.includes(`primary`))return`primary`;if(e.includes(`secondary`))return`secondary`;if(e.includes(`discovery`))return`discovery`;if(e.includes(`info`))return`info`;if(e.includes(`warning`))return`warning`;if(e.includes(`danger`))return`danger`;if(e.includes(`success`))return`success`;if(e.includes(`positive`))return`positive`;if(e.includes(`negative`))return`negative`}},t=t=>!!e(t);exports.getThemeColorThemeName=e,exports.themeColorThemeNameExists=t;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ColorThemeName } from "../types.cjs";
|
|
2
|
+
//#region src/theme/utilities/theme-helpers.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Get the color role scheme for the current theme name
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* getThemeColorThemeName('dark') // undefined
|
|
8
|
+
* getThemeColorThemeName('dark_Input') // undefined
|
|
9
|
+
* getThemeColorThemeName('dark_primary_Input') // "primary"
|
|
10
|
+
* getThemeColorThemeName('dark_brand_Input') // "brand"
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* The following color roles are checked:
|
|
14
|
+
* - primary
|
|
15
|
+
* - secondary
|
|
16
|
+
* - discovery
|
|
17
|
+
* - info
|
|
18
|
+
* - warning
|
|
19
|
+
* - danger
|
|
20
|
+
* - success
|
|
21
|
+
* - positive
|
|
22
|
+
* - negative
|
|
23
|
+
*
|
|
24
|
+
* @param theme - The theme name
|
|
25
|
+
* @returns The color role scheme for the theme name or undefined
|
|
26
|
+
*/
|
|
27
|
+
declare const getThemeColorThemeName: (theme?: string) => ColorThemeName | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Check if a color role scheme is set for the current theme name
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* themeColorThemeNameExists('dark') // false
|
|
33
|
+
* themeColorThemeNameExists('dark_Input') // false
|
|
34
|
+
* themeColorThemeNameExists('dark_primary_Input') // true
|
|
35
|
+
* themeColorThemeNameExists('dark_brand_Input') // true
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* The following color roles are checked:
|
|
39
|
+
* - primary
|
|
40
|
+
* - secondary
|
|
41
|
+
* - discovery
|
|
42
|
+
* - info
|
|
43
|
+
* - warning
|
|
44
|
+
* - danger
|
|
45
|
+
* - success
|
|
46
|
+
* - positive
|
|
47
|
+
* - negative
|
|
48
|
+
*
|
|
49
|
+
* @param theme - The theme name
|
|
50
|
+
* @returns An indication if a theme color scheme is set
|
|
51
|
+
*/
|
|
52
|
+
declare const themeColorThemeNameExists: (theme?: string) => boolean;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { getThemeColorThemeName, themeColorThemeNameExists };
|
|
55
|
+
//# sourceMappingURL=theme-helpers.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-helpers.d.cts","names":[],"sources":["../../../src/theme/utilities/theme-helpers.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cA4Ca,yBACX,mBACC;;;;;;;;;;;;;;;;;;;;;;;;;cAkDU,4BAA6B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ColorThemeName } from "../types.mjs";
|
|
2
|
+
//#region src/theme/utilities/theme-helpers.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Get the color role scheme for the current theme name
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* getThemeColorThemeName('dark') // undefined
|
|
8
|
+
* getThemeColorThemeName('dark_Input') // undefined
|
|
9
|
+
* getThemeColorThemeName('dark_primary_Input') // "primary"
|
|
10
|
+
* getThemeColorThemeName('dark_brand_Input') // "brand"
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* The following color roles are checked:
|
|
14
|
+
* - primary
|
|
15
|
+
* - secondary
|
|
16
|
+
* - discovery
|
|
17
|
+
* - info
|
|
18
|
+
* - warning
|
|
19
|
+
* - danger
|
|
20
|
+
* - success
|
|
21
|
+
* - positive
|
|
22
|
+
* - negative
|
|
23
|
+
*
|
|
24
|
+
* @param theme - The theme name
|
|
25
|
+
* @returns The color role scheme for the theme name or undefined
|
|
26
|
+
*/
|
|
27
|
+
declare const getThemeColorThemeName: (theme?: string) => ColorThemeName | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Check if a color role scheme is set for the current theme name
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* themeColorThemeNameExists('dark') // false
|
|
33
|
+
* themeColorThemeNameExists('dark_Input') // false
|
|
34
|
+
* themeColorThemeNameExists('dark_primary_Input') // true
|
|
35
|
+
* themeColorThemeNameExists('dark_brand_Input') // true
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* The following color roles are checked:
|
|
39
|
+
* - primary
|
|
40
|
+
* - secondary
|
|
41
|
+
* - discovery
|
|
42
|
+
* - info
|
|
43
|
+
* - warning
|
|
44
|
+
* - danger
|
|
45
|
+
* - success
|
|
46
|
+
* - positive
|
|
47
|
+
* - negative
|
|
48
|
+
*
|
|
49
|
+
* @param theme - The theme name
|
|
50
|
+
* @returns An indication if a theme color scheme is set
|
|
51
|
+
*/
|
|
52
|
+
declare const themeColorThemeNameExists: (theme?: string) => boolean;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { getThemeColorThemeName, themeColorThemeNameExists };
|
|
55
|
+
//# sourceMappingURL=theme-helpers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-helpers.d.mts","names":[],"sources":["../../../src/theme/utilities/theme-helpers.ts"],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=e=>{if(e){if(e.includes(`primary`))return`primary`;if(e.includes(`secondary`))return`secondary`;if(e.includes(`discovery`))return`discovery`;if(e.includes(`info`))return`info`;if(e.includes(`warning`))return`warning`;if(e.includes(`danger`))return`danger`;if(e.includes(`success`))return`success`;if(e.includes(`positive`))return`positive`;if(e.includes(`negative`))return`negative`}},t=t=>!!e(t);export{e as getThemeColorThemeName,t as themeColorThemeNameExists};
|
|
2
|
+
//# sourceMappingURL=theme-helpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-helpers.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/types.cjs
ADDED
|
File without changes
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Atom, ExtractAtomArgs, ExtractAtomValue, PrimitiveAtom, SetStateAction, WritableAtom, createStore } from "jotai";
|
|
2
|
+
import { FileResult } from "@stryke/types/file";
|
|
3
|
+
import { RESET } from "jotai/utils";
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type JotaiStore = ReturnType<typeof createStore>;
|
|
6
|
+
type SetStateActionWithReset<Value> = Value | typeof RESET | ((prev: Value) => Value | typeof RESET);
|
|
7
|
+
interface WithInitialValue<Value> {
|
|
8
|
+
init: Value;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object
|
|
12
|
+
*/
|
|
13
|
+
type IsAtom<T> = [T] extends [Atom<unknown>] ? true : false;
|
|
14
|
+
/**
|
|
15
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object
|
|
16
|
+
*/
|
|
17
|
+
type IsWritableAtom<T> = [T] extends [WritableAtom<unknown, unknown[], Promise<void> | void>] ? true : false;
|
|
18
|
+
/**
|
|
19
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object without the ability to be read
|
|
20
|
+
*/
|
|
21
|
+
type IsWriteOnlyAtom<T> = [T] extends [WritableAtom<null, unknown[], Promise<void> | void>] ? true : false;
|
|
22
|
+
/**
|
|
23
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object with the ability to reset to it's initial value
|
|
24
|
+
*/
|
|
25
|
+
type IsResetAtom<T> = IsWritableAtom<T> extends true ? ExtractAtomArgs<T> extends [SetStateActionWithReset<infer _U>] ? true : false : false;
|
|
26
|
+
type BaseAtom<TValue, TArgs extends unknown[] = [SetStateAction<TValue>], TResult = void> = WritableAtom<TValue, TArgs, TResult>;
|
|
27
|
+
type AtomRecord<T> = { [K in keyof T]: Atom<T[K]>; };
|
|
28
|
+
/**
|
|
29
|
+
* Constraint for objects whose values are Jotai atoms.
|
|
30
|
+
*
|
|
31
|
+
* Prefer `TState extends AtomRecordConstraint<TState>` over
|
|
32
|
+
* `TState extends AtomRecord<any>` — the latter requires a string index
|
|
33
|
+
* signature and rejects fixed-key interfaces such as `FormAtoms`.
|
|
34
|
+
*/
|
|
35
|
+
type AtomRecordConstraint<T extends object = object> = { [K in keyof T]: Atom<unknown>; };
|
|
36
|
+
type WritableAtomRecord<T extends object = object> = { [K in keyof T]: WritableAtom<T[K], [SetStateAction<T[K]> | typeof RESET], void>; };
|
|
37
|
+
type ExtractAtomRecordValues<T extends AtomRecordConstraint<T>> = { [K in keyof T]: ExtractAtomValue<T[K]>; };
|
|
38
|
+
type ClientFileResult = FileResult & {
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
type SplitAtomAction<TValue> = {
|
|
42
|
+
type: "remove";
|
|
43
|
+
atom: PrimitiveAtom<TValue>;
|
|
44
|
+
} | {
|
|
45
|
+
type: "insert";
|
|
46
|
+
value: TValue;
|
|
47
|
+
before?: PrimitiveAtom<TValue>;
|
|
48
|
+
} | {
|
|
49
|
+
type: "move";
|
|
50
|
+
atom: PrimitiveAtom<TValue>;
|
|
51
|
+
before?: PrimitiveAtom<TValue>;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { AtomRecord, AtomRecordConstraint, BaseAtom, ClientFileResult, ExtractAtomRecordValues, IsAtom, IsResetAtom, IsWritableAtom, IsWriteOnlyAtom, JotaiStore, SetStateActionWithReset, SplitAtomAction, WithInitialValue, WritableAtomRecord };
|
|
55
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;KA8BY,aAAa,kBAAkB;KAE/B,wBAAwB,SAClC,eAAe,UAAU,MAAM,UAAU,eAAe;UACzC,iBAAiB;EAChC,MAAM;;;;;KAMI,OAAO,MAAM,YAAY;;;;KAKzB,eAAe,MAAM,YAC/B,iCAAiC;;;;KAQvB,gBAAgB,MAAM,YAChC,8BAA8B;;;;KAQpB,YAAY,KACtB,eAAe,kBACX,gBAAgB,YAAY,8BAA8B;KAKpD,SACV,QACA,2BAA2B,eAAe,UAC1C,kBACE,aAAa,QAAQ,OAAO;KAEpB,WAAW,QACpB,WAAW,IAAI,KAAK,EAAE;;;;;;;;KAUb,qBAAqB,gCAC9B,WAAW,IAAI;KAGN,mBAAmB,gCAC5B,WAAW,IAAI,aACd,EAAE,KACD,eAAe,EAAE,aAAa;KAKvB,wBAAwB,UAAU,qBAAqB,SAChE,WAAW,IAAI,iBAAiB,EAAE;KAGzB,mBAAmB;EAC7B;;KAGU,gBAAgB;EAEtB;EACA,MAAM,cAAc;;EAGpB;EACA,OAAO;EACP,SAAS,cAAc;;EAGvB;EACA,MAAM,cAAc;EACpB,SAAS,cAAc"}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { RESET } from "jotai/utils";
|
|
2
|
+
import { Atom, ExtractAtomArgs, ExtractAtomValue, PrimitiveAtom, SetStateAction, WritableAtom, createStore } from "jotai";
|
|
3
|
+
import { FileResult } from "@stryke/types/file";
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type JotaiStore = ReturnType<typeof createStore>;
|
|
6
|
+
type SetStateActionWithReset<Value> = Value | typeof RESET | ((prev: Value) => Value | typeof RESET);
|
|
7
|
+
interface WithInitialValue<Value> {
|
|
8
|
+
init: Value;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object
|
|
12
|
+
*/
|
|
13
|
+
type IsAtom<T> = [T] extends [Atom<unknown>] ? true : false;
|
|
14
|
+
/**
|
|
15
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object
|
|
16
|
+
*/
|
|
17
|
+
type IsWritableAtom<T> = [T] extends [WritableAtom<unknown, unknown[], Promise<void> | void>] ? true : false;
|
|
18
|
+
/**
|
|
19
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object without the ability to be read
|
|
20
|
+
*/
|
|
21
|
+
type IsWriteOnlyAtom<T> = [T] extends [WritableAtom<null, unknown[], Promise<void> | void>] ? true : false;
|
|
22
|
+
/**
|
|
23
|
+
* A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object with the ability to reset to it's initial value
|
|
24
|
+
*/
|
|
25
|
+
type IsResetAtom<T> = IsWritableAtom<T> extends true ? ExtractAtomArgs<T> extends [SetStateActionWithReset<infer _U>] ? true : false : false;
|
|
26
|
+
type BaseAtom<TValue, TArgs extends unknown[] = [SetStateAction<TValue>], TResult = void> = WritableAtom<TValue, TArgs, TResult>;
|
|
27
|
+
type AtomRecord<T> = { [K in keyof T]: Atom<T[K]>; };
|
|
28
|
+
/**
|
|
29
|
+
* Constraint for objects whose values are Jotai atoms.
|
|
30
|
+
*
|
|
31
|
+
* Prefer `TState extends AtomRecordConstraint<TState>` over
|
|
32
|
+
* `TState extends AtomRecord<any>` — the latter requires a string index
|
|
33
|
+
* signature and rejects fixed-key interfaces such as `FormAtoms`.
|
|
34
|
+
*/
|
|
35
|
+
type AtomRecordConstraint<T extends object = object> = { [K in keyof T]: Atom<unknown>; };
|
|
36
|
+
type WritableAtomRecord<T extends object = object> = { [K in keyof T]: WritableAtom<T[K], [SetStateAction<T[K]> | typeof RESET], void>; };
|
|
37
|
+
type ExtractAtomRecordValues<T extends AtomRecordConstraint<T>> = { [K in keyof T]: ExtractAtomValue<T[K]>; };
|
|
38
|
+
type ClientFileResult = FileResult & {
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
type SplitAtomAction<TValue> = {
|
|
42
|
+
type: "remove";
|
|
43
|
+
atom: PrimitiveAtom<TValue>;
|
|
44
|
+
} | {
|
|
45
|
+
type: "insert";
|
|
46
|
+
value: TValue;
|
|
47
|
+
before?: PrimitiveAtom<TValue>;
|
|
48
|
+
} | {
|
|
49
|
+
type: "move";
|
|
50
|
+
atom: PrimitiveAtom<TValue>;
|
|
51
|
+
before?: PrimitiveAtom<TValue>;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { AtomRecord, AtomRecordConstraint, BaseAtom, ClientFileResult, ExtractAtomRecordValues, IsAtom, IsResetAtom, IsWritableAtom, IsWriteOnlyAtom, JotaiStore, SetStateActionWithReset, SplitAtomAction, WithInitialValue, WritableAtomRecord };
|
|
55
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":""}
|
package/dist/types.mjs
ADDED
|
File without changes
|