@colisweb/rescript-toolkit 5.31.4 → 5.32.0

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": "5.31.4",
3
+ "version": "5.32.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -73,6 +73,32 @@ module Date = {
73
73
  type t = @spice.codec(codec) date
74
74
  }
75
75
 
76
+ module LocalDatetime = {
77
+ type date = Js.Date.t
78
+
79
+ let encoder: Spice.encoder<date> = date =>
80
+ date->DateFns.formatWithPattern("yyyy-MM-dd'T'HH:mm:ss")->Spice.stringToJson
81
+
82
+ let decoder: Spice.decoder<date> = json =>
83
+ switch Spice.stringFromJson(json) {
84
+ | Ok(v) => Js.Date.fromString(v)->Ok
85
+ | Error(_) as err => err
86
+ }
87
+
88
+ let codec: Spice.codec<date> = (encoder, decoder)
89
+
90
+ @spice
91
+ type t = @spice.codec(codec) date
92
+ }
93
+
94
+ module LocalDateTimeTimeSlot = {
95
+ @spice
96
+ type t = {
97
+ start: LocalDatetime.t,
98
+ end: LocalDatetime.t,
99
+ }
100
+ }
101
+
76
102
  module DatetimeTimeSlot = {
77
103
  @spice
78
104
  type t = {
@@ -6197,3 +6197,12 @@ module FaPalette = {
6197
6197
  external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
6198
6198
  "FaPalette"
6199
6199
  }
6200
+ module FaArrowRight = {
6201
+ @module("react-icons/fa") @react.component
6202
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
6203
+ "FaArrowRight"
6204
+ }
6205
+ module FaHome = {
6206
+ @module("react-icons/fa") @react.component
6207
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element = "FaHome"
6208
+ }