@rpg-engine/shared 0.9.54 → 0.9.55

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.
@@ -1 +1 @@
1
- {"version":3,"file":"deviceHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/deviceHelpers.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,QAAO,OAEnC,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
1
+ {"version":3,"file":"deviceHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/deviceHelpers.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,QAAO,OAOnC,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,OAG3B,CAAC"}
@@ -1,17 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isMobile = exports.isMobileOrTablet = void 0;
4
+ const core_1 = require("@capacitor/core");
4
5
  const mobile_device_detect_1 = require("mobile-device-detect");
5
6
  const isSmallerThanBreakpoint = (breakpoint) => {
6
7
  const mql = window.matchMedia(`(max-width: ${breakpoint}) and (orientation: portrait), (max-height: ${breakpoint}) and (orientation: landscape)`);
7
8
  return mql.matches;
8
9
  };
9
10
  const isMobileOrTablet = () => {
10
- return mobile_device_detect_1.isMobile !== null && mobile_device_detect_1.isMobile !== void 0 ? mobile_device_detect_1.isMobile : (isSmallerThanBreakpoint("767px") && !isSmallerThanBreakpoint("479px"));
11
+ const platform = core_1.Capacitor.getPlatform();
12
+ return (platform === "ios" ||
13
+ platform === "android" ||
14
+ (mobile_device_detect_1.isMobile !== null && mobile_device_detect_1.isMobile !== void 0 ? mobile_device_detect_1.isMobile : (isSmallerThanBreakpoint("767px") && !isSmallerThanBreakpoint("479px"))));
11
15
  };
12
16
  exports.isMobileOrTablet = isMobileOrTablet;
13
17
  const isMobile = () => {
14
- return mobile_device_detect_1.isMobileOnly !== null && mobile_device_detect_1.isMobileOnly !== void 0 ? mobile_device_detect_1.isMobileOnly : isSmallerThanBreakpoint("479px");
18
+ const platform = core_1.Capacitor.getPlatform();
19
+ return platform === "ios" || platform === "android" || (mobile_device_detect_1.isMobileOnly !== null && mobile_device_detect_1.isMobileOnly !== void 0 ? mobile_device_detect_1.isMobileOnly : isSmallerThanBreakpoint("479px"));
15
20
  };
16
21
  exports.isMobile = isMobile;
17
22
  //# sourceMappingURL=deviceHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deviceHelpers.js","sourceRoot":"","sources":["../../src/helpers/deviceHelpers.ts"],"names":[],"mappings":";;;AAAA,+DAA8G;AAE9G,MAAM,uBAAuB,GAAG,CAAC,UAAkB,EAAW,EAAE;IAC9D,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAC3B,eAAe,UAAU,+CAA+C,UAAU,gCAAgC,CACnH,CAAC;IAEF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAG,GAAY,EAAE;IAC5C,OAAO,+BAAsB,aAAtB,+BAAsB,cAAtB,+BAAsB,GAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AAEK,MAAM,QAAQ,GAAG,GAAY,EAAE;IACpC,OAAO,mCAAkB,aAAlB,mCAAkB,cAAlB,mCAAkB,GAAI,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAChE,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB"}
1
+ {"version":3,"file":"deviceHelpers.js","sourceRoot":"","sources":["../../src/helpers/deviceHelpers.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAC5C,+DAA8G;AAE9G,MAAM,uBAAuB,GAAG,CAAC,UAAkB,EAAW,EAAE;IAC9D,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAC3B,eAAe,UAAU,+CAA+C,UAAU,gCAAgC,CACnH,CAAC;IAEF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAG,GAAY,EAAE;IAC5C,MAAM,QAAQ,GAAG,gBAAS,CAAC,WAAW,EAAE,CAAC;IACzC,OAAO,CACL,QAAQ,KAAK,KAAK;QAClB,QAAQ,KAAK,SAAS;QACtB,CAAC,+BAAsB,aAAtB,+BAAsB,cAAtB,+BAAsB,GAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CACpG,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B;AAEK,MAAM,QAAQ,GAAG,GAAY,EAAE;IACpC,MAAM,QAAQ,GAAG,gBAAS,CAAC,WAAW,EAAE,CAAC;IACzC,OAAO,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,mCAAkB,aAAlB,mCAAkB,cAAlB,mCAAkB,GAAI,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;AAClH,CAAC,CAAC;AAHW,QAAA,QAAQ,YAGnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/shared",
3
- "version": "0.9.54",
3
+ "version": "0.9.55",
4
4
  "description": "Types shared across our API and client",
5
5
  "author": "Definya Team",
6
6
  "homepage": "",
@@ -37,7 +37,10 @@
37
37
  "typescript": "^4.6.4"
38
38
  },
39
39
  "devDependencies": {
40
- "@rpg-engine/shared": "^0.2.51",
40
+ "@capacitor/core": "^6.1.0",
41
41
  "@types/mongoose": "^5.11.97"
42
+ },
43
+ "peerDependencies": {
44
+ "@capacitor/core": "^4.6.3"
42
45
  }
43
46
  }
@@ -1,2 +0,0 @@
1
- export declare const MINIMUM_MINUTES_FOR_WATERING: number;
2
- //# sourceMappingURL=farming.constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"farming.constants.d.ts","sourceRoot":"","sources":["../../src/constants/farming.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,EAAE,MAAW,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MINIMUM_MINUTES_FOR_WATERING = void 0;
4
- exports.MINIMUM_MINUTES_FOR_WATERING = 20;
5
- //# sourceMappingURL=farming.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"farming.constants.js","sourceRoot":"","sources":["../../src/constants/farming.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAW,EAAE,CAAC"}
@@ -1,13 +0,0 @@
1
- export declare enum PlantSocketEvents {
2
- ShowPlantGrowth = "ShowPlantGrowth",
3
- SendGrowthPoint = "SendGrowthPoint"
4
- }
5
- export interface IPlantGrowth {
6
- id: string;
7
- }
8
- export interface IPlantShowGrowth {
9
- status: boolean;
10
- currentCycle: number;
11
- requiredGrowthPoints: number;
12
- }
13
- //# sourceMappingURL=plant.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plant.types.d.ts","sourceRoot":"","sources":["../../src/types/plant.types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PlantSocketEvents = void 0;
4
- var PlantSocketEvents;
5
- (function (PlantSocketEvents) {
6
- PlantSocketEvents["ShowPlantGrowth"] = "ShowPlantGrowth";
7
- PlantSocketEvents["SendGrowthPoint"] = "SendGrowthPoint";
8
- })(PlantSocketEvents = exports.PlantSocketEvents || (exports.PlantSocketEvents = {}));
9
- //# sourceMappingURL=plant.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plant.types.js","sourceRoot":"","sources":["../../src/types/plant.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
@@ -1,7 +0,0 @@
1
- export interface ISimpleTutorialWithKey {
2
- key: string;
3
- }
4
- export declare enum SimpleTutorialSocketEvents {
5
- SimpleTutorialWithKey = "SimpleTutorialWithKey"
6
- }
7
- //# sourceMappingURL=simpleTutorial.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simpleTutorial.d.ts","sourceRoot":"","sources":["../../src/types/simpleTutorial.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;CACb;AAID,oBAAY,0BAA0B;IACpC,qBAAqB,0BAA0B;CAChD"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SimpleTutorialSocketEvents = void 0;
4
- var SimpleTutorialSocketEvents;
5
- (function (SimpleTutorialSocketEvents) {
6
- SimpleTutorialSocketEvents["SimpleTutorialWithKey"] = "SimpleTutorialWithKey";
7
- })(SimpleTutorialSocketEvents = exports.SimpleTutorialSocketEvents || (exports.SimpleTutorialSocketEvents = {}));
8
- //# sourceMappingURL=simpleTutorial.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simpleTutorial.js","sourceRoot":"","sources":["../../src/types/simpleTutorial.ts"],"names":[],"mappings":";;;AAMA,IAAY,0BAEX;AAFD,WAAY,0BAA0B;IACpC,6EAA+C,CAAA;AACjD,CAAC,EAFW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAErC"}