@appartmint/mint 2.3.0 → 2.3.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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Grid Component
3
+ */
4
+ export declare abstract class MintGrid {
5
+ /**
6
+ * Get a valid grid number
7
+ */
8
+ static gridNum(num?: number): number;
9
+ }
10
+ //# sourceMappingURL=grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/ts/imports/components/grid.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,8BAAsB,QAAQ;IAE7B;;OAEG;WACW,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;CAG3C"}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Forward all exports from the components directory
3
3
  */
4
+ export * from './grid';
4
5
  export * from './header';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ts/imports/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ts/imports/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
@@ -9,6 +9,13 @@ export declare abstract class MintMath {
9
9
  * @returns a random integer between min and max
10
10
  */
11
11
  static randomInt(max: number, min?: number): number;
12
+ /**
13
+ * Return a number between min and max
14
+ * @param num - the number to clamp
15
+ * @param min - the minimum value
16
+ * @param max - the maximum value
17
+ * @returns a number between min and max
18
+ */
19
+ static clamp(num: number | undefined | null, min: number, max: number): number;
12
20
  }
13
- export default MintMath;
14
21
  //# sourceMappingURL=math.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/ts/imports/util/math.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,8BAAsB,QAAQ;IAC1B;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,MAAM;CAK1D;AACD,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/ts/imports/util/math.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,8BAAsB,QAAQ;IAC1B;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,MAAM;IAM1D;;;;;;OAMG;WACW,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;CAGrF"}
package/dist/js/index.js CHANGED
@@ -1,5 +1,35 @@
1
1
  /******/ var __webpack_modules__ = ({
2
2
 
3
+ /***/ "./src/ts/imports/components/grid.ts":
4
+ /*!*******************************************!*\
5
+ !*** ./src/ts/imports/components/grid.ts ***!
6
+ \*******************************************/
7
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
+
9
+ __webpack_require__.r(__webpack_exports__);
10
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11
+ /* harmony export */ MintGrid: () => (/* binding */ MintGrid)
12
+ /* harmony export */ });
13
+ /* harmony import */ var _util_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/math */ "./src/ts/imports/util/math.ts");
14
+ /**
15
+ * Imports
16
+ */
17
+
18
+ /**
19
+ * Grid Component
20
+ */
21
+ class MintGrid {
22
+ /**
23
+ * Get a valid grid number
24
+ */
25
+ static gridNum(num) {
26
+ return _util_math__WEBPACK_IMPORTED_MODULE_0__.MintMath.clamp(num, 1, 4);
27
+ }
28
+ }
29
+
30
+
31
+ /***/ }),
32
+
3
33
  /***/ "./src/ts/imports/components/header.ts":
4
34
  /*!*********************************************!*\
5
35
  !*** ./src/ts/imports/components/header.ts ***!
@@ -437,15 +467,18 @@ class MintHeader {
437
467
 
438
468
  __webpack_require__.r(__webpack_exports__);
439
469
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
440
- /* harmony export */ MintHeader: () => (/* reexport safe */ _header__WEBPACK_IMPORTED_MODULE_0__.MintHeader)
470
+ /* harmony export */ MintGrid: () => (/* reexport safe */ _grid__WEBPACK_IMPORTED_MODULE_0__.MintGrid),
471
+ /* harmony export */ MintHeader: () => (/* reexport safe */ _header__WEBPACK_IMPORTED_MODULE_1__.MintHeader)
441
472
  /* harmony export */ });
442
- /* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./header */ "./src/ts/imports/components/header.ts");
473
+ /* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grid */ "./src/ts/imports/components/grid.ts");
474
+ /* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./header */ "./src/ts/imports/components/header.ts");
443
475
  /**
444
476
  * Forward all exports from the components directory
445
477
  */
446
478
 
447
479
 
448
480
 
481
+
449
482
  /***/ }),
450
483
 
451
484
  /***/ "./src/ts/imports/enums/index.ts":
@@ -504,6 +537,7 @@ __webpack_require__.r(__webpack_exports__);
504
537
  /* harmony export */ MintAsync: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.MintAsync),
505
538
  /* harmony export */ MintDisplay: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.MintDisplay),
506
539
  /* harmony export */ MintEvent: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.MintEvent),
540
+ /* harmony export */ MintGrid: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.MintGrid),
507
541
  /* harmony export */ MintHeader: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_0__.MintHeader),
508
542
  /* harmony export */ MintIcon: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.MintIcon),
509
543
  /* harmony export */ MintItem: () => (/* reexport safe */ _models__WEBPACK_IMPORTED_MODULE_2__.MintItem),
@@ -1209,8 +1243,7 @@ class MintList {
1209
1243
 
1210
1244
  __webpack_require__.r(__webpack_exports__);
1211
1245
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1212
- /* harmony export */ MintMath: () => (/* binding */ MintMath),
1213
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1246
+ /* harmony export */ MintMath: () => (/* binding */ MintMath)
1214
1247
  /* harmony export */ });
1215
1248
  /**
1216
1249
  * Math functions for the util library
@@ -1227,9 +1260,17 @@ class MintMath {
1227
1260
  max = Math.floor(max);
1228
1261
  return Math.floor(Math.random() * (max - min) + min);
1229
1262
  }
1263
+ /**
1264
+ * Return a number between min and max
1265
+ * @param num - the number to clamp
1266
+ * @param min - the minimum value
1267
+ * @param max - the maximum value
1268
+ * @returns a number between min and max
1269
+ */
1270
+ static clamp(num, min, max) {
1271
+ return Math.max(Math.min(num ?? min, max), min);
1272
+ }
1230
1273
  }
1231
- ;
1232
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MintMath);
1233
1274
 
1234
1275
 
1235
1276
  /***/ }),
@@ -2051,6 +2092,7 @@ __webpack_require__.r(__webpack_exports__);
2051
2092
  /* harmony export */ MintAsync: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintAsync),
2052
2093
  /* harmony export */ MintDisplay: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintDisplay),
2053
2094
  /* harmony export */ MintEvent: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintEvent),
2095
+ /* harmony export */ MintGrid: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintGrid),
2054
2096
  /* harmony export */ MintHeader: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintHeader),
2055
2097
  /* harmony export */ MintIcon: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintIcon),
2056
2098
  /* harmony export */ MintItem: () => (/* reexport safe */ _imports__WEBPACK_IMPORTED_MODULE_0__.MintItem),
@@ -2081,6 +2123,7 @@ var __webpack_exports__EMintSide = __webpack_exports__.EMintSide;
2081
2123
  var __webpack_exports__MintAsync = __webpack_exports__.MintAsync;
2082
2124
  var __webpack_exports__MintDisplay = __webpack_exports__.MintDisplay;
2083
2125
  var __webpack_exports__MintEvent = __webpack_exports__.MintEvent;
2126
+ var __webpack_exports__MintGrid = __webpack_exports__.MintGrid;
2084
2127
  var __webpack_exports__MintHeader = __webpack_exports__.MintHeader;
2085
2128
  var __webpack_exports__MintIcon = __webpack_exports__.MintIcon;
2086
2129
  var __webpack_exports__MintItem = __webpack_exports__.MintItem;
@@ -2093,6 +2136,6 @@ var __webpack_exports__MintSettings = __webpack_exports__.MintSettings;
2093
2136
  var __webpack_exports__MintText = __webpack_exports__.MintText;
2094
2137
  var __webpack_exports__MintWindow = __webpack_exports__.MintWindow;
2095
2138
  var __webpack_exports__mintColor = __webpack_exports__.mintColor;
2096
- export { __webpack_exports__EMintSide as EMintSide, __webpack_exports__MintAsync as MintAsync, __webpack_exports__MintDisplay as MintDisplay, __webpack_exports__MintEvent as MintEvent, __webpack_exports__MintHeader as MintHeader, __webpack_exports__MintIcon as MintIcon, __webpack_exports__MintItem as MintItem, __webpack_exports__MintList as MintList, __webpack_exports__MintMath as MintMath, __webpack_exports__MintObject as MintObject, __webpack_exports__MintScroll as MintScroll, __webpack_exports__MintSelectors as MintSelectors, __webpack_exports__MintSettings as MintSettings, __webpack_exports__MintText as MintText, __webpack_exports__MintWindow as MintWindow, __webpack_exports__mintColor as mintColor };
2139
+ export { __webpack_exports__EMintSide as EMintSide, __webpack_exports__MintAsync as MintAsync, __webpack_exports__MintDisplay as MintDisplay, __webpack_exports__MintEvent as MintEvent, __webpack_exports__MintGrid as MintGrid, __webpack_exports__MintHeader as MintHeader, __webpack_exports__MintIcon as MintIcon, __webpack_exports__MintItem as MintItem, __webpack_exports__MintList as MintList, __webpack_exports__MintMath as MintMath, __webpack_exports__MintObject as MintObject, __webpack_exports__MintScroll as MintScroll, __webpack_exports__MintSelectors as MintSelectors, __webpack_exports__MintSettings as MintSettings, __webpack_exports__MintText as MintText, __webpack_exports__MintWindow as MintWindow, __webpack_exports__mintColor as mintColor };
2097
2140
 
2098
2141
  //# sourceMappingURL=index.js.map