@monkvision/common 4.0.3 → 4.0.6

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.
Files changed (65) hide show
  1. package/README/APP_UTILS.md +52 -0
  2. package/README/HOOKS.md +242 -0
  3. package/README/INTERNATIONALIZATION.md +89 -0
  4. package/README/STATE_MANAGEMENT.md +125 -0
  5. package/README/THEMING.md +70 -0
  6. package/README/UTILITIES.md +254 -0
  7. package/lib/PreventExit/hooks.js +0 -1
  8. package/lib/PreventExit/index.js +0 -1
  9. package/lib/PreventExit/store.js +0 -1
  10. package/lib/apps/analytics.js +0 -1
  11. package/lib/apps/appState.js +0 -1
  12. package/lib/apps/appStateProvider.js +0 -1
  13. package/lib/apps/index.js +0 -1
  14. package/lib/apps/monitoring.js +0 -1
  15. package/lib/apps/searchParams.js +0 -1
  16. package/lib/hooks/index.js +0 -1
  17. package/lib/hooks/useAsyncEffect.js +0 -1
  18. package/lib/hooks/useAsyncInterval.js +0 -1
  19. package/lib/hooks/useInteractiveStatus.js +0 -1
  20. package/lib/hooks/useInterval.js +0 -1
  21. package/lib/hooks/useLoadingState.js +0 -1
  22. package/lib/hooks/useObjectMemo.js +0 -1
  23. package/lib/hooks/useObjectTranslation.js +0 -1
  24. package/lib/hooks/useQueue.js +0 -1
  25. package/lib/hooks/useResponsiveStyle.js +0 -1
  26. package/lib/hooks/useSearchParams.js +0 -1
  27. package/lib/hooks/useSightLabel.js +0 -1
  28. package/lib/hooks/useWindowDimensions.js +0 -1
  29. package/lib/i18n/index.js +0 -1
  30. package/lib/i18n/translations/image.js +0 -1
  31. package/lib/i18n/translations/index.js +0 -1
  32. package/lib/i18n/translations/vehicleParts.js +0 -1
  33. package/lib/i18n/utils.js +0 -1
  34. package/lib/index.js +0 -1
  35. package/lib/state/actions/createdOneImage.js +0 -1
  36. package/lib/state/actions/gotOneInspection.js +0 -1
  37. package/lib/state/actions/index.js +0 -1
  38. package/lib/state/actions/monkAction.js +0 -1
  39. package/lib/state/actions/resetState.js +0 -1
  40. package/lib/state/actions/updatedManyTasks.js +0 -1
  41. package/lib/state/actions/updatedVehicle.js +0 -1
  42. package/lib/state/context.js +0 -1
  43. package/lib/state/hooks.js +0 -1
  44. package/lib/state/index.js +0 -1
  45. package/lib/state/provider.js +0 -1
  46. package/lib/state/reducer.js +0 -1
  47. package/lib/state/state.js +0 -1
  48. package/lib/theme/context.js +0 -1
  49. package/lib/theme/default/index.js +0 -1
  50. package/lib/theme/default/palette.js +0 -1
  51. package/lib/theme/hooks.js +0 -1
  52. package/lib/theme/index.js +0 -1
  53. package/lib/theme/provider.js +0 -1
  54. package/lib/theme/theme.js +0 -1
  55. package/lib/utils/array.utils.js +0 -1
  56. package/lib/utils/browser.utils.js +0 -1
  57. package/lib/utils/color.utils.js +0 -1
  58. package/lib/utils/env.utils.js +0 -1
  59. package/lib/utils/index.js +0 -1
  60. package/lib/utils/mimetype.utils.js +0 -1
  61. package/lib/utils/promise.utils.js +0 -1
  62. package/lib/utils/state.utils.js +0 -1
  63. package/lib/utils/string.utils.js +0 -1
  64. package/lib/utils/zlib.utils.js +0 -1
  65. package/package.json +22 -14
@@ -0,0 +1,254 @@
1
+ # Utilities
2
+ This README page is aimed at providing documentation on a specific part of the `@monkvision/common` package : the
3
+ utility functions. You can refer to [this page](README.md) for more general information on the package.
4
+
5
+ This package exports various utility functions used throughout the MonkJs SDK.
6
+
7
+ # Array Utils
8
+ ### permutations
9
+ ```typescript
10
+ import { permutations } from '@monkvision/common';
11
+
12
+ console.log(permutations([1, 2, 3]));
13
+ // Output : [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]
14
+ ```
15
+ Returns an array containing all the possible permutations of the given array.
16
+
17
+ ### uniq
18
+ ```typescript
19
+ import { uniq } from '@monkvision/common';
20
+
21
+ console.log(uniq([1, 1, 1, 2, 3, 3]));
22
+ // Output : [1, 2, 3]
23
+ ```
24
+ Return a copy of the given array in which all duplicates have been removed.
25
+
26
+ ### flatten
27
+ ```typescript
28
+ import { flatten } from '@monkvision/common';
29
+
30
+ console.log(flatten([ 1, [2, 3], [[4], [5, 6]]]));
31
+ // Output : [1, 2, 3, 4, 5, 6]
32
+ ```
33
+ Flatten the given array.
34
+
35
+ ### flatten
36
+ ```typescript
37
+ import { flatMap } from '@monkvision/common';
38
+
39
+ console.log(flatMap([1, 2, 3], (item: number) => [item, item + 1]));
40
+ // Output : [1, 2, 2, 3, 3, 4]
41
+ ```
42
+ JS implementation of the
43
+ [Array.prototype.flatMap](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap)
44
+ method, available on all versions of JavaScript.
45
+
46
+ ---
47
+
48
+ # Color Utils
49
+ ### getRGBAFromString
50
+ ```typescript
51
+ import { getRGBAFromString } from '@monkvision/common';
52
+
53
+ console.log(JSON.stringify(getRGBAFromString('#AF270CCC')));
54
+ // Output : {"r":175,"g":39,"b":12,"a":0.8}
55
+ ```
56
+ Returns the RGBA values of the given color. The accepted formats are :
57
+ - RGB : `rgb(167, 224, 146)`
58
+ - RGBA : `rgb(167, 224, 146, 0.03)`
59
+ - HEX : `#A7E092`
60
+ - HEX (alpha) : `#A7E09208`
61
+ - HEX (short) : `#AE9`
62
+ - HEX (short + alpha) : `#AE98`
63
+
64
+ This function is case-insensitive and ignores white spaces.
65
+
66
+ ### getHexFromRGBA
67
+ ```typescript
68
+ import { getHexFromRGBA } from '@monkvision/common';
69
+
70
+ console.log(getHexFromRGBA({ r: 111, g: 222, b: 0, a: 0.67 }));
71
+ // Output : #6FDE00AB
72
+ ```
73
+ Converts RGBA values to their hexadecimal representation.
74
+
75
+ ### shadeColor
76
+ ```typescript
77
+ import { shadeColor } from '@monkvision/common';
78
+
79
+ console.log(shadeColor('#FC72A7', 0.7));
80
+ // Output : #FFC2FFFF
81
+ ```
82
+ Apply a shade of black or white over the given color. The amount of shade to apply works as a ratio :
83
+ - use positive values like 0.08 to lighten the color by 8%
84
+ - use negative values like -0.08 to darken the color by 8%
85
+
86
+ ### changeAlpha
87
+ ```typescript
88
+ import { changeAlpha } from '@monkvision/common';
89
+
90
+ console.log(changeAlpha('#FF1234FF', 0.5));
91
+ // Output : #FF123480
92
+ ```
93
+ Returns a new color equal to the given color but with a different alpha value.
94
+
95
+ ### getInteractiveVariants
96
+ ```typescript
97
+ import { getInteractiveVariants } from '@monkvision/common';
98
+
99
+ const variants = getInteractiveVariants('#FC72A7');
100
+ /*
101
+ * variants = {
102
+ * [InteractiveStatus.DEFAULT]: '#FC72A7',
103
+ * [InteractiveStatus.HOVERED]: '#FF7BB4',
104
+ * [InteractiveStatus.ACTIVE]: '#FF80BB',
105
+ * [InteractiveStatus.DISABLED]: '#FC72A7',
106
+ * }
107
+ */
108
+ ```
109
+ Create interactive variants (hovered, active...) for the given color. You can specify as an additional parameter the
110
+ type of variation to use for the interactive colors (lighten or darken the color, default = lighten).
111
+
112
+ ---
113
+
114
+ # Environment Utils
115
+ ### getEnvOrThrow
116
+ ```typescript
117
+ import { getEnvOrThrow } from '@monkvision/common';
118
+
119
+ try {
120
+ const example = getEnvOrThrow('REACT_APP_EXAMPLE');
121
+ console.log('Env var is defined :', example);
122
+ } catch (err) {
123
+ console.log('Env var is not defined');
124
+ }
125
+ ```
126
+ Returns the value of a given environment variable. If the value does not exist, it throws an error.
127
+
128
+ ---
129
+
130
+ # Mimetype Utils
131
+ ### MIMETYPE_FILE_EXTENSIONS
132
+ ```typescript
133
+ import { MIMETYPE_FILE_EXTENSIONS } from '@monkvision/common';
134
+
135
+ console.log(MIMETYPE_FILE_EXTENSIONS['text/plain']);
136
+ // Output : ['txt']
137
+ ```
138
+ Datamap that associates mimetypes to known file extensions corresponding to this mimetype.
139
+
140
+ ### getFileExtensions
141
+ ```typescript
142
+ import { getFileExtensions } from '@monkvision/common';
143
+
144
+ console.log(getFileExtensions('image/jpeg'));
145
+ // Output : ['jpeg', 'jpg']
146
+ ```
147
+ Returns a list of file extensions known to be corresponding to the given mimetype. If no file extension is known for
148
+ this mimetype, this function will throw an error.
149
+
150
+ ### getMimetype
151
+ ```typescript
152
+ import { getMimetype } from '@monkvision/common';
153
+
154
+ console.log(getMimetype('jpg'));
155
+ // Output : 'image/jpeg'
156
+ ```
157
+ Returns the mimetype associated with the given file extension. If the file extension is unknown, this function will
158
+ throw an error.
159
+
160
+ ---
161
+
162
+ # Promise Utils
163
+ ### timeoutPromise
164
+ ```typescript
165
+ import { timeoutPromise } from '@monkvision/common';
166
+
167
+ timeoutPromise(5000).then(() => console.log('Hello!'));
168
+ // Output after 5 seconds : 'Hello!'
169
+ ```
170
+ This function creates and returns a new Promise that will resolve to void after the given amount of milliseconds.
171
+
172
+ ---
173
+
174
+ # State Utils
175
+ ### getInspectionImages
176
+ ```typescript
177
+ import { getInspectionImages } from '@monkvision/common';
178
+
179
+ console.log(getInspectionImages(inspectionId, images, filterRetakes));
180
+ // Returns an array of all the images having the given inspectionId.
181
+ ```
182
+ Utility function that extracts the images of the given inspection. Set `filterRetakes` to `false` to filter retaken
183
+ pictures.
184
+
185
+ ---
186
+
187
+ # String Utils
188
+ ### suffix
189
+ ```typescript
190
+ import { suffix } from '@monkvision/common';
191
+
192
+ console.log(suffix('my-str', { suffix1: true, suffix2: false }));
193
+ // Output : 'my-str suffix1'
194
+ ```
195
+ This function suffixes a string with the given suffixes, only if their value is `true` in the suffixes object param.
196
+
197
+ *Note : The order of the suffixes is not guaranteed.*
198
+
199
+ ### words
200
+ ```typescript
201
+ import { words } from '@monkvision/common';
202
+
203
+ console.log(words('my-str-test'));
204
+ // Output : 'my str test'
205
+ ```
206
+ Split the given string into its composing words.
207
+
208
+ ### capitalize
209
+ ```typescript
210
+ import { capitalize } from '@monkvision/common';
211
+
212
+ console.log(capitalize('my-str-test'));
213
+ // Output : 'My-str-test'
214
+ ```
215
+ Capitalizes (transforms the first character to upper case) the given string.
216
+
217
+ ### uncapitalize
218
+ ```typescript
219
+ import { uncapitalize } from '@monkvision/common';
220
+
221
+ console.log(uncapitalize('My-str-test'));
222
+ // Output : 'my-str-test'
223
+ ```
224
+ Uncapitalizes (transforms the first character to lower case) the given string.
225
+
226
+ ### toCamelCase
227
+ ```typescript
228
+ import { toCamelCase } from '@monkvision/common';
229
+
230
+ console.log(toCamelCase('My-str-test'));
231
+ // Output : 'myStrTest'
232
+ ```
233
+ Converts a string to camel case.
234
+
235
+ ---
236
+
237
+ # Zlib Utils
238
+ ### zlibCompress
239
+ ```typescript
240
+ import { zlibCompress } from '@monkvision/common';
241
+
242
+ console.log(zlibCompress('Hello World!'))
243
+ // Output : 'eJzzSM3JyVcIzy/KSVEEABxJBD4='
244
+ ```
245
+ Compresses and encodes a string in base64 using the ZLib algorithm.
246
+
247
+ ### zlibDecompress
248
+ ```typescript
249
+ import { zlibDecompress } from '@monkvision/common';
250
+
251
+ console.log(zlibDecompress('eJzzSM3JyVcIzy/KSVEEABxJBD4='))
252
+ // Output : 'Hello World!'
253
+ ```
254
+ Decompresses a string that has been encoded in base64 and compressed using the Zlib algorithm.
@@ -24,4 +24,3 @@ function usePreventExit(preventExit) {
24
24
  return (0, hooks_1.useObjectMemo)({ allowRedirect: allowRedirect });
25
25
  }
26
26
  exports.usePreventExit = usePreventExit;
27
- //# sourceMappingURL=hooks.js.map
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./hooks"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -38,4 +38,3 @@ function createPreventExitListener() {
38
38
  };
39
39
  }
40
40
  exports.createPreventExitListener = createPreventExitListener;
41
- //# sourceMappingURL=store.js.map
@@ -13,4 +13,3 @@ function useAppStateAnalytics(_a) {
13
13
  }, [inspectionId, setUserId]);
14
14
  }
15
15
  exports.useAppStateAnalytics = useAppStateAnalytics;
16
- //# sourceMappingURL=analytics.js.map
@@ -8,4 +8,3 @@ var react_1 = require("react");
8
8
  * @see MonkAppState
9
9
  */
10
10
  exports.MonkAppStateContext = (0, react_1.createContext)(null);
11
- //# sourceMappingURL=appState.js.map
@@ -113,4 +113,3 @@ function useMonkAppState(options) {
113
113
  return value;
114
114
  }
115
115
  exports.useMonkAppState = useMonkAppState;
116
- //# sourceMappingURL=appStateProvider.js.map
package/lib/apps/index.js CHANGED
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./appState"), exports);
18
18
  __exportStar(require("./appStateProvider"), exports);
19
19
  __exportStar(require("./searchParams"), exports);
20
- //# sourceMappingURL=index.js.map
@@ -22,4 +22,3 @@ function useAppStateMonitoring(_a) {
22
22
  }, [authToken, setUserId]);
23
23
  }
24
24
  exports.useAppStateMonitoring = useAppStateMonitoring;
25
- //# sourceMappingURL=monitoring.js.map
@@ -78,4 +78,3 @@ function useMonkSearchParams() {
78
78
  return (0, hooks_1.useObjectMemo)({ get: get });
79
79
  }
80
80
  exports.useMonkSearchParams = useMonkSearchParams;
81
- //# sourceMappingURL=searchParams.js.map
@@ -26,4 +26,3 @@ __exportStar(require("./useSearchParams"), exports);
26
26
  __exportStar(require("./useInterval"), exports);
27
27
  __exportStar(require("./useAsyncInterval"), exports);
28
28
  __exportStar(require("./useObjectMemo"), exports);
29
- //# sourceMappingURL=index.js.map
@@ -34,4 +34,3 @@ function useAsyncEffect(effect, deps, handlers) {
34
34
  }, deps);
35
35
  }
36
36
  exports.useAsyncEffect = useAsyncEffect;
37
- //# sourceMappingURL=useAsyncEffect.js.map
@@ -51,4 +51,3 @@ function useAsyncInterval(callback, delay, handlers) {
51
51
  }, [delay]);
52
52
  }
53
53
  exports.useAsyncInterval = useAsyncInterval;
54
- //# sourceMappingURL=useAsyncInterval.js.map
@@ -67,4 +67,3 @@ function useInteractiveStatus(params) {
67
67
  }); }, [hovered, active, params === null || params === void 0 ? void 0 : params.disabled, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp]);
68
68
  }
69
69
  exports.useInteractiveStatus = useInteractiveStatus;
70
- //# sourceMappingURL=useInteractiveStatus.js.map
@@ -24,4 +24,3 @@ function useInterval(callback, delay) {
24
24
  }, [delay]);
25
25
  }
26
26
  exports.useInterval = useInterval;
27
- //# sourceMappingURL=useInterval.js.map
@@ -33,4 +33,3 @@ function useLoadingState(startsLoading) {
33
33
  });
34
34
  }
35
35
  exports.useLoadingState = useLoadingState;
36
- //# sourceMappingURL=useLoadingState.js.map
@@ -17,4 +17,3 @@ function useObjectMemo(object) {
17
17
  return (0, react_1.useMemo)(function () { return object; }, Object.values(object));
18
18
  }
19
19
  exports.useObjectMemo = useObjectMemo;
20
- //# sourceMappingURL=useObjectMemo.js.map
@@ -16,4 +16,3 @@ function useObjectTranslation() {
16
16
  return { tObj: tObj };
17
17
  }
18
18
  exports.useObjectTranslation = useObjectTranslation;
19
- //# sourceMappingURL=useObjectTranslation.js.map
@@ -191,4 +191,3 @@ function useQueue(process, optionsParams) {
191
191
  };
192
192
  }
193
193
  exports.useQueue = useQueue;
194
- //# sourceMappingURL=useQueue.js.map
@@ -61,4 +61,3 @@ function useResponsiveStyle() {
61
61
  return { responsive: responsive };
62
62
  }
63
63
  exports.useResponsiveStyle = useResponsiveStyle;
64
- //# sourceMappingURL=useResponsiveStyle.js.map
@@ -9,4 +9,3 @@ function useSearchParams() {
9
9
  return (0, react_1.useMemo)(function () { return new URL(window.location.toString()).searchParams; }, []);
10
10
  }
11
11
  exports.useSearchParams = useSearchParams;
12
- //# sourceMappingURL=useSearchParams.js.map
@@ -16,4 +16,3 @@ function useSightLabel(_a) {
16
16
  return { label: label };
17
17
  }
18
18
  exports.useSightLabel = useSightLabel;
19
- //# sourceMappingURL=useSightLabel.js.map
@@ -24,4 +24,3 @@ function useWindowDimensions() {
24
24
  return dimensions;
25
25
  }
26
26
  exports.useWindowDimensions = useWindowDimensions;
27
- //# sourceMappingURL=useWindowDimensions.js.map
package/lib/i18n/index.js CHANGED
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./utils"), exports);
18
18
  __exportStar(require("./translations"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -405,4 +405,3 @@ exports.complianceIssueLabels = (_b = {},
405
405
  },
406
406
  },
407
407
  _b);
408
- //# sourceMappingURL=image.js.map
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./vehicleParts"), exports);
18
18
  __exportStar(require("./image"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -458,4 +458,3 @@ exports.vehiclePartLabels = (_a = {},
458
458
  nl: 'BACKGROUND',
459
459
  },
460
460
  _a);
461
- //# sourceMappingURL=vehicleParts.js.map
package/lib/i18n/utils.js CHANGED
@@ -83,4 +83,3 @@ function getLanguage(language) {
83
83
  return types_1.monkLanguages.includes(languagePrefix) ? languagePrefix : 'en';
84
84
  }
85
85
  exports.getLanguage = getLanguage;
86
- //# sourceMappingURL=utils.js.map
package/lib/index.js CHANGED
@@ -21,4 +21,3 @@ __exportStar(require("./i18n"), exports);
21
21
  __exportStar(require("./state"), exports);
22
22
  __exportStar(require("./theme"), exports);
23
23
  __exportStar(require("./utils"), exports);
24
- //# sourceMappingURL=index.js.map
@@ -49,4 +49,3 @@ function createdOneImage(state, action) {
49
49
  return __assign(__assign({}, state), { inspections: __spreadArray([], inspections, true), images: __spreadArray([], images, true) });
50
50
  }
51
51
  exports.createdOneImage = createdOneImage;
52
- //# sourceMappingURL=createdOneImage.js.map
@@ -52,4 +52,3 @@ function gotOneInspection(state, action) {
52
52
  return newState;
53
53
  }
54
54
  exports.gotOneInspection = gotOneInspection;
55
- //# sourceMappingURL=gotOneInspection.js.map
@@ -20,4 +20,3 @@ __exportStar(require("./gotOneInspection"), exports);
20
20
  __exportStar(require("./createdOneImage"), exports);
21
21
  __exportStar(require("./updatedManyTasks"), exports);
22
22
  __exportStar(require("./updatedVehicle"), exports);
23
- //# sourceMappingURL=index.js.map
@@ -27,4 +27,3 @@ var MonkActionType;
27
27
  */
28
28
  MonkActionType["UPDATED_VEHICLE"] = "updated_vehicle";
29
29
  })(MonkActionType = exports.MonkActionType || (exports.MonkActionType = {}));
30
- //# sourceMappingURL=monkAction.js.map
@@ -18,4 +18,3 @@ function resetState() {
18
18
  return (0, state_1.createEmptyMonkState)();
19
19
  }
20
20
  exports.resetState = resetState;
21
- //# sourceMappingURL=resetState.js.map
@@ -44,4 +44,3 @@ function updatedManyTasks(state, action) {
44
44
  return __assign(__assign({}, state), { tasks: __spreadArray([], tasks, true) });
45
45
  }
46
46
  exports.updatedManyTasks = updatedManyTasks;
47
- //# sourceMappingURL=updatedManyTasks.js.map
@@ -47,4 +47,3 @@ function updatedVehicle(state, action) {
47
47
  return __assign(__assign({}, state), { vehicles: __spreadArray([], vehicles, true) });
48
48
  }
49
49
  exports.updatedVehicle = updatedVehicle;
50
- //# sourceMappingURL=updatedVehicle.js.map
@@ -7,4 +7,3 @@ var react_1 = require("react");
7
7
  * the default value is `null`.
8
8
  */
9
9
  exports.MonkContext = (0, react_1.createContext)(null);
10
- //# sourceMappingURL=context.js.map
@@ -17,4 +17,3 @@ function useMonkState() {
17
17
  return stateWithDispatch;
18
18
  }
19
19
  exports.useMonkState = useMonkState;
20
- //# sourceMappingURL=hooks.js.map
@@ -20,4 +20,3 @@ __exportStar(require("./hooks"), exports);
20
20
  __exportStar(require("./provider"), exports);
21
21
  __exportStar(require("./reducer"), exports);
22
22
  __exportStar(require("./state"), exports);
23
- //# sourceMappingURL=index.js.map
@@ -37,4 +37,3 @@ function MonkProvider(_a) {
37
37
  }
38
38
  }
39
39
  exports.MonkProvider = MonkProvider;
40
- //# sourceMappingURL=provider.js.map
@@ -21,4 +21,3 @@ function monkReducer(state, action) {
21
21
  return state;
22
22
  }
23
23
  exports.monkReducer = monkReducer;
24
- //# sourceMappingURL=reducer.js.map
@@ -19,4 +19,3 @@ function createEmptyMonkState() {
19
19
  };
20
20
  }
21
21
  exports.createEmptyMonkState = createEmptyMonkState;
22
- //# sourceMappingURL=state.js.map
@@ -7,4 +7,3 @@ var theme_1 = require("./theme");
7
7
  * A React Context that contains the current Monk theme.
8
8
  */
9
9
  exports.MonkThemeContext = (0, react_1.createContext)((0, theme_1.createTheme)());
10
- //# sourceMappingURL=context.js.map
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./palette"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -66,4 +66,3 @@ exports.MonkDefaultPalette = {
66
66
  base: '#7B61FF',
67
67
  },
68
68
  };
69
- //# sourceMappingURL=palette.js.map
@@ -10,4 +10,3 @@ function useMonkTheme() {
10
10
  return (0, react_1.useContext)(context_1.MonkThemeContext);
11
11
  }
12
12
  exports.useMonkTheme = useMonkTheme;
13
- //# sourceMappingURL=hooks.js.map
@@ -19,4 +19,3 @@ __exportStar(require("./default"), exports);
19
19
  __exportStar(require("./hooks"), exports);
20
20
  __exportStar(require("./provider"), exports);
21
21
  __exportStar(require("./theme"), exports);
22
- //# sourceMappingURL=index.js.map
@@ -26,4 +26,3 @@ function MonkThemeProvider(_a) {
26
26
  return (0, jsx_runtime_1.jsx)(context_1.MonkThemeContext.Provider, __assign({ value: theme }, { children: children }));
27
27
  }
28
28
  exports.MonkThemeProvider = MonkThemeProvider;
29
- //# sourceMappingURL=provider.js.map
@@ -51,4 +51,3 @@ function createTheme(_a) {
51
51
  };
52
52
  }
53
53
  exports.createTheme = createTheme;
54
- //# sourceMappingURL=theme.js.map
@@ -72,4 +72,3 @@ function flatMap(array, map) {
72
72
  return flatten(array.map(map));
73
73
  }
74
74
  exports.flatMap = flatMap;
75
- //# sourceMappingURL=array.utils.js.map
@@ -13,4 +13,3 @@ function isMobileDevice() {
13
13
  userAgent.includes('windows phone'));
14
14
  }
15
15
  exports.isMobileDevice = isMobileDevice;
16
- //# sourceMappingURL=browser.utils.js.map
@@ -152,4 +152,3 @@ function getInteractiveVariants(color, variant) {
152
152
  _a;
153
153
  }
154
154
  exports.getInteractiveVariants = getInteractiveVariants;
155
- //# sourceMappingURL=color.utils.js.map
@@ -13,4 +13,3 @@ function getEnvOrThrow(name) {
13
13
  return value;
14
14
  }
15
15
  exports.getEnvOrThrow = getEnvOrThrow;
16
- //# sourceMappingURL=env.utils.js.map
@@ -23,4 +23,3 @@ __exportStar(require("./zlib.utils"), exports);
23
23
  __exportStar(require("./browser.utils"), exports);
24
24
  __exportStar(require("./env.utils"), exports);
25
25
  __exportStar(require("./state.utils"), exports);
26
- //# sourceMappingURL=index.js.map
@@ -66,4 +66,3 @@ function getMimetype(fileExtension) {
66
66
  return mimetype;
67
67
  }
68
68
  exports.getMimetype = getMimetype;
69
- //# sourceMappingURL=mimetype.utils.js.map
@@ -10,4 +10,3 @@ function timeoutPromise(delayMs) {
10
10
  });
11
11
  }
12
12
  exports.timeoutPromise = timeoutPromise;
13
- //# sourceMappingURL=promise.utils.js.map
@@ -32,4 +32,3 @@ function getInspectionImages(inspectionId, images, filterRetakes) {
32
32
  return filteredRetakes;
33
33
  }
34
34
  exports.getInspectionImages = getInspectionImages;
35
- //# sourceMappingURL=state.utils.js.map
@@ -45,4 +45,3 @@ function toCamelCase(str) {
45
45
  .join('');
46
46
  }
47
47
  exports.toCamelCase = toCamelCase;
48
- //# sourceMappingURL=string.utils.js.map
@@ -27,4 +27,3 @@ function zlibDecompress(str) {
27
27
  return binaryConverter.decode(binary);
28
28
  }
29
29
  exports.zlibDecompress = zlibDecompress;
30
- //# sourceMappingURL=zlib.utils.js.map