@colisweb/rescript-toolkit 4.20.6 → 4.21.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "4.20.6",
3
+ "version": "4.21.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -80,6 +80,8 @@ module Make = (Config: IntlConfig) => {
80
80
  let setCurrentLocale = (locale: availableLanguages) => store.dispatch(SetLocale(locale))
81
81
 
82
82
  let useCurrentLocale = () => store.useStore().locale
83
+ let getCurrentLocale = () => store.getState().locale
84
+ let getIntl = () => store.getState().intl
83
85
  let useIntl = () => store.useStore().intl
84
86
 
85
87
  let getDateFnsLocale = locale =>
@@ -23,8 +23,11 @@ module Make: (Config: IntlConfig) =>
23
23
  let locale: availableLanguages
24
24
  let intl: ReactIntl.Intl.t
25
25
  let useIntl: unit => ReactIntl.Intl.t
26
+ let getIntl: unit => ReactIntl.Intl.t
27
+ let getCurrentLocale: unit => availableLanguages
26
28
  let useCurrentLocale: unit => availableLanguages
27
29
  let setCurrentLocale: availableLanguages => unit
30
+
28
31
  let getDateFnsLocale: availableLanguages => DateFns.dateFnsLocale
29
32
 
30
33
  module Provider: {
@@ -27,10 +27,10 @@ let make = (~worker: Msw.worker, ~workerOptions: Msw.startOptions={}, ~className
27
27
  <React.Suspense fallback={<Toolkit__Ui_SpinnerFullScreen />}>
28
28
  <label
29
29
  className={cx([
30
- "fixed top-2 left-1/2 flex flex-row gap-2 items-center justify-center",
30
+ "fixed top-2 left-1/2 flex flex-row gap-2 items-center justify-center z-50",
31
31
  mockEnabled
32
32
  ? "bg-success-100 border-success-400 text-success-700"
33
- : "bg-neutral-100 p-1 border rounded-lg z-50 cursor-pointer",
33
+ : "bg-neutral-100 p-1 border rounded-lg cursor-pointer",
34
34
  className,
35
35
  ])}>
36
36
  <span> {"Mock"->React.string} </span>