@colisweb/rescript-toolkit 2.5.3 → 2.8.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": "2.5.3",
3
+ "version": "2.8.0",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build",
@@ -61,6 +61,31 @@ module Int = {
61
61
  type t = @decco.codec(codec) int
62
62
  }
63
63
 
64
+ module Boolean = {
65
+ let encoder = value => value->Decco.boolToJson
66
+
67
+ let decoder = json =>
68
+ switch Js.Json.classify(json) {
69
+ | JSONFalse => Ok(false)
70
+ | JSONTrue => Ok(true)
71
+ | JSONString(_) =>
72
+ switch Decco.stringFromJson(json) {
73
+ | Ok(value) =>
74
+ switch Decco.boolFromJson(value->bool_of_string->Js.Json.boolean) {
75
+ | Ok(_) as value => value
76
+ | Error(_) as error => error
77
+ }
78
+ | Error(_) => Decco.error(~path="", "Not a boolean", json)
79
+ }
80
+ | _ => Decco.error(~path="", "Not a boolean", json)
81
+ }
82
+
83
+ let codec = (encoder, decoder)
84
+
85
+ @decco
86
+ type t = @decco.codec(codec) bool
87
+ }
88
+
64
89
  module Float = {
65
90
  let encoder = value => value->Decco.floatToJson
66
91
 
@@ -68,6 +68,7 @@ module.exports = {
68
68
  white: defaultColors.white,
69
69
  black: defaultColors.black,
70
70
  transparent: defaultColors.transparent,
71
+ routeWithdraw: "#176693",
71
72
  gray: {
72
73
  100: "#f7fafc",
73
74
  200: "#edf2f7",
@@ -138,6 +139,15 @@ module.exports = {
138
139
  600: "#1A86FF",
139
140
  700: "#006CE6",
140
141
  },
142
+ purple: {
143
+ 50: "#F8F1FF",
144
+ 100: "#DDC8F0",
145
+ 300: "#8787E0",
146
+ 400: "#9151C9",
147
+ 500: "#6C1CB2",
148
+ 600: "#55158B",
149
+ 700: "#411766",
150
+ },
141
151
  },
142
152
  },
143
153
  content: [