@gamepark/react-game 6.38.4 → 6.38.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 (168) hide show
  1. package/dist/components/PlayerPanel/Counters.d.ts +3 -2
  2. package/dist/components/PlayerPanel/Counters.js +21 -12
  3. package/dist/components/PlayerPanel/Counters.js.map +1 -1
  4. package/dist/components/PlayerPanel/StyledPlayerPanel.js +7 -31
  5. package/dist/components/PlayerPanel/StyledPlayerPanel.js.map +1 -1
  6. package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.js +6 -4
  7. package/dist/components/dialogs/RulesDialog/LocationRulesDialogContent.js.map +1 -1
  8. package/dist/components/material/utils/getBestDropMove.d.ts +1 -1
  9. package/dist/locators/Locator.d.ts +3 -1
  10. package/dist/locators/Locator.js.map +1 -1
  11. package/package.json +4 -4
  12. package/dist/components/Chat/Chat.d.ts +0 -3
  13. package/dist/components/Chat/Chat.js +0 -80
  14. package/dist/components/Chat/Chat.js.map +0 -1
  15. package/dist/components/Chat/ChatMessage.d.ts +0 -7
  16. package/dist/components/Chat/ChatMessage.js +0 -29
  17. package/dist/components/Chat/ChatMessage.js.map +0 -1
  18. package/dist/components/Chat/ChatMessageAuthor.d.ts +0 -3
  19. package/dist/components/Chat/ChatMessageAuthor.js +0 -34
  20. package/dist/components/Chat/ChatMessageAuthor.js.map +0 -1
  21. package/dist/components/Chat/ChatTextInput.d.ts +0 -7
  22. package/dist/components/Chat/ChatTextInput.js +0 -44
  23. package/dist/components/Chat/ChatTextInput.js.map +0 -1
  24. package/dist/components/Chat/SignInToChat.d.ts +0 -1
  25. package/dist/components/Chat/SignInToChat.js +0 -35
  26. package/dist/components/Chat/SignInToChat.js.map +0 -1
  27. package/dist/components/Chat/index.d.ts +0 -5
  28. package/dist/components/Chat/index.js +0 -22
  29. package/dist/components/Chat/index.js.map +0 -1
  30. package/dist/components/Header/PlayerTurnHeader.d.ts +0 -11
  31. package/dist/components/Header/PlayerTurnHeader.js +0 -37
  32. package/dist/components/Header/PlayerTurnHeader.js.map +0 -1
  33. package/dist/components/Header/SimultaneousHeader.d.ts +0 -8
  34. package/dist/components/Header/SimultaneousHeader.js +0 -35
  35. package/dist/components/Header/SimultaneousHeader.js.map +0 -1
  36. package/dist/components/JournalTabs/History/ActionHistoryEntry.d.ts +0 -12
  37. package/dist/components/JournalTabs/History/ActionHistoryEntry.js +0 -62
  38. package/dist/components/JournalTabs/History/ActionHistoryEntry.js.map +0 -1
  39. package/dist/components/JournalTabs/History/MaterialHistory.d.ts +0 -10
  40. package/dist/components/JournalTabs/History/MaterialHistory.js +0 -3
  41. package/dist/components/JournalTabs/History/MaterialHistory.js.map +0 -1
  42. package/dist/components/JournalTabs/History/PlayerActionHistory.d.ts +0 -8
  43. package/dist/components/JournalTabs/History/PlayerActionHistory.js +0 -42
  44. package/dist/components/JournalTabs/History/PlayerActionHistory.js.map +0 -1
  45. package/dist/components/JournalTabs/History/PlayerHistoryEntry.d.ts +0 -8
  46. package/dist/components/JournalTabs/History/PlayerHistoryEntry.js +0 -44
  47. package/dist/components/JournalTabs/History/PlayerHistoryEntry.js.map +0 -1
  48. package/dist/components/JournalTabs/History/StartHistory.d.ts +0 -2
  49. package/dist/components/JournalTabs/History/StartHistory.js +0 -30
  50. package/dist/components/JournalTabs/History/StartHistory.js.map +0 -1
  51. package/dist/components/material/Dices/DiceDescription.d.ts +0 -10
  52. package/dist/components/material/Dices/DiceDescription.js +0 -56
  53. package/dist/components/material/Dices/DiceDescription.js.map +0 -1
  54. package/dist/components/material/GameTable/DraggableStockItem.d.ts +0 -4
  55. package/dist/components/material/GameTable/DraggableStockItem.js +0 -82
  56. package/dist/components/material/GameTable/DraggableStockItem.js.map +0 -1
  57. package/dist/components/material/GameTable/FocusableElement.d.ts +0 -13
  58. package/dist/components/material/GameTable/FocusableElement.js +0 -63
  59. package/dist/components/material/GameTable/FocusableElement.js.map +0 -1
  60. package/dist/components/material/GameTable/FocusableLocation.d.ts +0 -8
  61. package/dist/components/material/GameTable/FocusableLocation.js +0 -37
  62. package/dist/components/material/GameTable/FocusableLocation.js.map +0 -1
  63. package/dist/components/material/GameTable/FocusableLocations.d.ts +0 -0
  64. package/dist/components/material/GameTable/FocusableLocations.js +0 -2
  65. package/dist/components/material/GameTable/FocusableLocations.js.map +0 -1
  66. package/dist/components/material/GameTable/GameTableContent.d.ts +0 -18
  67. package/dist/components/material/GameTable/GameTableContent.js +0 -63
  68. package/dist/components/material/GameTable/GameTableContent.js.map +0 -1
  69. package/dist/components/material/GameTable/focus/FocusableElement.d.ts +0 -13
  70. package/dist/components/material/GameTable/focus/FocusableElement.js +0 -63
  71. package/dist/components/material/GameTable/focus/FocusableElement.js.map +0 -1
  72. package/dist/components/material/GameTable/focus/FocusableLocation.d.ts +0 -8
  73. package/dist/components/material/GameTable/focus/FocusableLocation.js +0 -38
  74. package/dist/components/material/GameTable/focus/FocusableLocation.js.map +0 -1
  75. package/dist/components/material/GameTable/focus/LocationsWithFocus.d.ts +0 -9
  76. package/dist/components/material/GameTable/focus/LocationsWithFocus.js +0 -45
  77. package/dist/components/material/GameTable/focus/LocationsWithFocus.js.map +0 -1
  78. package/dist/components/material/GameTable/locations.utils.d.ts +0 -0
  79. package/dist/components/material/GameTable/locations.utils.js +0 -2
  80. package/dist/components/material/GameTable/locations.utils.js.map +0 -1
  81. package/dist/components/material/ItemMenu.js.map +0 -1
  82. package/dist/components/material/MaterialAnimations.d.ts +0 -25
  83. package/dist/components/material/MaterialAnimations.js +0 -219
  84. package/dist/components/material/MaterialAnimations.js.map +0 -1
  85. package/dist/components/material/MaterialGameAnimations.d.ts +0 -10
  86. package/dist/components/material/MaterialGameAnimations.js +0 -47
  87. package/dist/components/material/MaterialGameAnimations.js.map +0 -1
  88. package/dist/components/material/animations/adjustRotation.d.ts +0 -1
  89. package/dist/components/material/animations/adjustRotation.js +0 -67
  90. package/dist/components/material/animations/adjustRotation.js.map +0 -1
  91. package/dist/components/material/animations/isMovedOrDeletedItem.util.d.ts +0 -3
  92. package/dist/components/material/animations/isMovedOrDeletedItem.util.js +0 -26
  93. package/dist/components/material/animations/isMovedOrDeletedItem.util.js.map +0 -1
  94. package/dist/components/material/animations/itemMovementCss.util.d.ts +0 -2
  95. package/dist/components/material/animations/itemMovementCss.util.js +0 -13
  96. package/dist/components/material/animations/itemMovementCss.util.js.map +0 -1
  97. package/dist/components/material/locations/HexGridDropArea.d.ts +0 -11
  98. package/dist/components/material/locations/HexGridDropArea.js +0 -74
  99. package/dist/components/material/locations/HexGridDropArea.js.map +0 -1
  100. package/dist/components/material/utils/IsMoveOnItem.d.ts +0 -2
  101. package/dist/components/material/utils/IsMoveOnItem.js +0 -12
  102. package/dist/components/material/utils/IsMoveOnItem.js.map +0 -1
  103. package/dist/components/material/utils/getItemFromContext.d.ts +0 -3
  104. package/dist/components/material/utils/getItemFromContext.js +0 -10
  105. package/dist/components/material/utils/getItemFromContext.js.map +0 -1
  106. package/dist/components/menus/ContrastThemeButton/ContrastThemeButton.d.ts +0 -4
  107. package/dist/components/menus/ContrastThemeButton/ContrastThemeButton.js +0 -27
  108. package/dist/components/menus/ContrastThemeButton/ContrastThemeButton.js.map +0 -1
  109. package/dist/components/menus/ContrastThemeButton/index.d.ts +0 -1
  110. package/dist/components/menus/ContrastThemeButton/index.js +0 -18
  111. package/dist/components/menus/ContrastThemeButton/index.js.map +0 -1
  112. package/dist/components/tutorial/FocusableElement.d.ts +0 -0
  113. package/dist/components/tutorial/FocusableElement.js +0 -2
  114. package/dist/components/tutorial/FocusableElement.js.map +0 -1
  115. package/dist/hooks/useCloseHelpDialog.d.ts +0 -1
  116. package/dist/hooks/useCloseHelpDialog.js +0 -14
  117. package/dist/hooks/useCloseHelpDialog.js.map +0 -1
  118. package/dist/hooks/useContrastTheme.d.ts +0 -7
  119. package/dist/hooks/useContrastTheme.js +0 -27
  120. package/dist/hooks/useContrastTheme.js.map +0 -1
  121. package/dist/hooks/useGameHistory.d.ts +0 -1
  122. package/dist/hooks/useGameHistory.js +0 -13
  123. package/dist/hooks/useGameHistory.js.map +0 -1
  124. package/dist/hooks/useHistory.d.ts +0 -6
  125. package/dist/hooks/useHistory.js +0 -85
  126. package/dist/hooks/useHistory.js.map +0 -1
  127. package/dist/hooks/useMaterialAnimations.d.ts +0 -2
  128. package/dist/hooks/useMaterialAnimations.js +0 -17
  129. package/dist/hooks/useMaterialAnimations.js.map +0 -1
  130. package/dist/hooks/useMaterials.d.ts +0 -2
  131. package/dist/hooks/useMaterials.js +0 -10
  132. package/dist/hooks/useMaterials.js.map +0 -1
  133. package/dist/hooks/useRulesStep.d.ts +0 -2
  134. package/dist/hooks/useRulesStep.js +0 -10
  135. package/dist/hooks/useRulesStep.js.map +0 -1
  136. package/dist/hooks/useScale.d.ts +0 -1
  137. package/dist/hooks/useScale.js +0 -16
  138. package/dist/hooks/useScale.js.map +0 -1
  139. package/dist/locators/GridLocator.d.ts +0 -13
  140. package/dist/locators/GridLocator.js +0 -59
  141. package/dist/locators/GridLocator.js.map +0 -1
  142. package/dist/locators/ItemLocator.d.ts +0 -49
  143. package/dist/locators/ItemLocator.js +0 -144
  144. package/dist/locators/ItemLocator.js.map +0 -1
  145. package/dist/locators/LineLocator.d.ts +0 -12
  146. package/dist/locators/LineLocator.js +0 -77
  147. package/dist/locators/LineLocator.js.map +0 -1
  148. package/dist/translation/index.d.ts +0 -1
  149. package/dist/translation/index.js +0 -18
  150. package/dist/translation/index.js.map +0 -1
  151. package/dist/translation/setupTranslation.d.ts +0 -5
  152. package/dist/translation/setupTranslation.js +0 -33
  153. package/dist/translation/setupTranslation.js.map +0 -1
  154. package/dist/utilities/animations.constants.d.ts +0 -16
  155. package/dist/utilities/animations.constants.js +0 -62
  156. package/dist/utilities/animations.constants.js.map +0 -1
  157. package/dist/utilities/animations.util.d.ts +0 -4
  158. package/dist/utilities/animations.util.js +0 -71
  159. package/dist/utilities/animations.util.js.map +0 -1
  160. package/dist/utilities/bounds.util.d.ts +0 -7
  161. package/dist/utilities/bounds.util.js +0 -77
  162. package/dist/utilities/bounds.util.js.map +0 -1
  163. package/dist/utilities/calculation.util.d.ts +0 -2
  164. package/dist/utilities/calculation.util.js +0 -12
  165. package/dist/utilities/calculation.util.js.map +0 -1
  166. package/dist/utilities/zoom.util.d.ts +0 -1
  167. package/dist/utilities/zoom.util.js +0 -14
  168. package/dist/utilities/zoom.util.js.map +0 -1
@@ -1,77 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.LineLocator = void 0;
30
- var ItemLocator_1 = require("./ItemLocator");
31
- var LineLocator = (function (_super) {
32
- __extends(LineLocator, _super);
33
- function LineLocator() {
34
- var _this = _super !== null && _super.apply(this, arguments) || this;
35
- _this.coordinates = { x: 0, y: 0, z: 0 };
36
- return _this;
37
- }
38
- LineLocator.prototype.getPosition = function (item, context) {
39
- var _a, _b, _c, _d, _e;
40
- var coordinates = this.getCoordinates(item, context);
41
- var index = this.getItemIndex(item, context);
42
- var delta = this.getDelta(item, context);
43
- if (this.getDeltaMax) {
44
- var count = this.countItems(item.location, context);
45
- if (count > 1) {
46
- var deltaMax = this.getDeltaMax(item, context);
47
- delta = __assign(__assign({}, delta), { z: delta.z === undefined ? (_b = (_a = context.material[context.type]) === null || _a === void 0 ? void 0 : _a.thickness) !== null && _b !== void 0 ? _b : 0.05 : delta.z });
48
- delta.x = this.getDeltaValue(delta.x, deltaMax.x, count);
49
- delta.y = this.getDeltaValue(delta.y, deltaMax.y, count);
50
- delta.z = this.getDeltaValue(delta.z, deltaMax.z, count);
51
- }
52
- }
53
- return { x: coordinates.x + index * ((_c = delta.x) !== null && _c !== void 0 ? _c : 0), y: coordinates.y + index * ((_d = delta.y) !== null && _d !== void 0 ? _d : 0), z: coordinates.z + index * ((_e = delta.z) !== null && _e !== void 0 ? _e : 0) };
54
- };
55
- LineLocator.prototype.getDeltaValue = function (delta, max, count) {
56
- if (delta === void 0) { delta = 0; }
57
- if (max !== undefined && max > 0)
58
- return Math.min(delta, max / (count - 1));
59
- if (max !== undefined && max < 0)
60
- return Math.max(delta, max / (count - 1));
61
- return delta;
62
- };
63
- LineLocator.prototype.getCoordinates = function (_item, _context) {
64
- return this.coordinates;
65
- };
66
- LineLocator.prototype.getDelta = function (_item, _context) {
67
- var _a;
68
- return (_a = this.delta) !== null && _a !== void 0 ? _a : {};
69
- };
70
- LineLocator.prototype.getDeltaMax = function (_item, _context) {
71
- var _a;
72
- return (_a = this.deltaMax) !== null && _a !== void 0 ? _a : {};
73
- };
74
- return LineLocator;
75
- }(ItemLocator_1.ItemLocator));
76
- exports.LineLocator = LineLocator;
77
- //# sourceMappingURL=LineLocator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineLocator.js","sourceRoot":"","sources":["../../src/locators/LineLocator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAwD;AAExD;IAA2H,+BAAoB;IAA/I;QAAA,qEAyCC;QAjBC,iBAAW,GAAgB,EAAE,CAA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use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./setupTranslation"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/translation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC"}
@@ -1,5 +0,0 @@
1
- import { InitOptions, Resource } from 'i18next';
2
- import 'dayjs/locale/de';
3
- import 'dayjs/locale/fr';
4
- import 'dayjs/locale/ru';
5
- export declare const setupTranslation: (translations: Resource, options?: InitOptions) => void;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.setupTranslation = void 0;
18
- var i18next_1 = __importDefault(require("i18next"));
19
- var i18next_icu_1 = __importDefault(require("i18next-icu"));
20
- var dayjs_1 = __importDefault(require("dayjs"));
21
- require("dayjs/locale/de");
22
- require("dayjs/locale/fr");
23
- require("dayjs/locale/ru");
24
- var react_i18next_1 = require("react-i18next");
25
- var setupTranslation = function (translations, options) {
26
- i18next_1.default.use(react_i18next_1.initReactI18next).use(i18next_icu_1.default);
27
- var query = new URLSearchParams(window.location.search);
28
- var locale = query.get('locale') || 'en';
29
- i18next_1.default.init(__assign({ lng: locale, debug: process.env.NODE_ENV === 'development', fallbackLng: 'en', keySeparator: false, nsSeparator: false, resources: translations }, options)).catch(function (error) { return console.error(error); });
30
- dayjs_1.default.locale(locale);
31
- };
32
- exports.setupTranslation = setupTranslation;
33
- //# sourceMappingURL=setupTranslation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupTranslation.js","sourceRoot":"","sources":["../../src/translation/setupTranslation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAsD;AACtD,4DAA6B;AAC7B,gDAAyB;AACzB,2BAAwB;AACxB,2BAAwB;AACxB,2BAAwB;AACxB,+CAA8C;AAEvC,IAAM,gBAAgB,GAAG,UAAC,YAAsB,EAAE,OAAqB;IAC5E,iBAAO,CAAC,GAAG,CAAC,gCAAgB,CAAC,CAAC,GAAG,CAAC,qBAAG,CAAC,CAAA;IAEtC,IAAM,KAAK,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACzD,IAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAA;IAE1C,iBAAO,CAAC,IAAI,YACV,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAC7C,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,KAAK,EACnB,WAAW,EAAE,KAAK,EAClB,SAAS,EAAE,YAAY,IACpB,OAAO,EACV,CAAC,KAAK,CAAC,UAAA,KAAK,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAApB,CAAoB,CAAC,CAAA;IAEvC,eAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACtB,CAAC,CAAA;AAjBY,QAAA,gBAAgB,oBAiB5B"}
@@ -1,16 +0,0 @@
1
- export declare const animations: {
2
- easeOut: (t: number) => number;
3
- linear: (t: number) => number;
4
- easeInQuad: (t: number) => number;
5
- easeOutQuad: (t: number) => number;
6
- easeInOutQuad: (t: number) => number;
7
- easeInCubic: (t: number) => number;
8
- easeOutCubic: (t: number) => number;
9
- easeInOutCubic: (t: number) => number;
10
- easeInQuart: (t: number) => number;
11
- easeOutQuart: (t: number) => number;
12
- easeInOutQuart: (t: number) => number;
13
- easeInQuint: (t: number) => number;
14
- easeOutQuint: (t: number) => number;
15
- easeInOutQuint: (t: number) => number;
16
- };
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.animations = void 0;
4
- var easeOut = function (t) {
5
- return -Math.cos(t * Math.PI) / 2 + 0.5;
6
- };
7
- var linear = function (t) {
8
- return t;
9
- };
10
- var easeInQuad = function (t) {
11
- return t * t;
12
- };
13
- var easeOutQuad = function (t) {
14
- return t * (2 - t);
15
- };
16
- var easeInOutQuad = function (t) {
17
- return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
18
- };
19
- var easeInCubic = function (t) {
20
- return t * t * t;
21
- };
22
- var easeOutCubic = function (t) {
23
- return --t * t * t + 1;
24
- };
25
- var easeInOutCubic = function (t) {
26
- return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
27
- };
28
- var easeInQuart = function (t) {
29
- return t * t * t * t;
30
- };
31
- var easeOutQuart = function (t) {
32
- return 1 - --t * t * t * t;
33
- };
34
- var easeInOutQuart = function (t) {
35
- return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;
36
- };
37
- var easeInQuint = function (t) {
38
- return t * t * t * t * t;
39
- };
40
- var easeOutQuint = function (t) {
41
- return 1 + --t * t * t * t * t;
42
- };
43
- var easeInOutQuint = function (t) {
44
- return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;
45
- };
46
- exports.animations = {
47
- easeOut: easeOut,
48
- linear: linear,
49
- easeInQuad: easeInQuad,
50
- easeOutQuad: easeOutQuad,
51
- easeInOutQuad: easeInOutQuad,
52
- easeInCubic: easeInCubic,
53
- easeOutCubic: easeOutCubic,
54
- easeInOutCubic: easeInOutCubic,
55
- easeInQuart: easeInQuart,
56
- easeOutQuart: easeOutQuart,
57
- easeInOutQuart: easeInOutQuart,
58
- easeInQuint: easeInQuint,
59
- easeOutQuint: easeOutQuint,
60
- easeInOutQuint: easeInOutQuint
61
- };
62
- //# sourceMappingURL=animations.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animations.constants.js","sourceRoot":"","sources":["../../src/utilities/animations.constants.ts"],"names":[],"mappings":";;;AAOA,IAAM,OAAO,GAAG,UAAC,CAAS;IACxB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;AACzC,CAAC,CAAA;AAED,IAAM,MAAM,GAAG,UAAC,CAAS;IACvB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,IAAM,UAAU,GAAG,UAAC,CAAS;IAC3B,OAAO,CAAC,GAAG,CAAC,CAAA;AACd,CAAC,CAAA;AAED,IAAM,WAAW,GAAG,UAAC,CAAS;IAC5B,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;AACpB,CAAC,CAAA;AAED,IAAM,aAAa,GAAG,UAAC,CAAS;IAC9B,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CA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O,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAChC,CAAC,CAAA;AAED,IAAM,cAAc,GAAG,UAAU,CAAS;IACxC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACxE,CAAC,CAAA;AAEY,QAAA,UAAU,GAAG;IACxB,OAAO,SAAA;IACP,MAAM,QAAA;IACN,UAAU,YAAA;IACV,WAAW,aAAA;IACX,aAAa,eAAA;IACb,WAAW,aAAA;IACX,YAAY,cAAA;IACZ,cAAc,gBAAA;IACd,WAAW,aAAA;IACX,YAAY,cAAA;IACZ,cAAc,gBAAA;IACd,WAAW,aAAA;IACX,YAAY,cAAA;IACZ,cAAc,gBAAA;CACf,CAAA"}
@@ -1,4 +0,0 @@
1
- import { ReactZoomPanPinchContext, StateType } from 'react-zoom-pan-pinch';
2
- export declare const handleCancelAnimation: (contextInstance: ReactZoomPanPinchContext) => void;
3
- export declare function handleSetupAnimation(contextInstance: ReactZoomPanPinchContext, animationName: string, animationTime: number, callback: (step: number) => void): void;
4
- export declare function animate(contextInstance: ReactZoomPanPinchContext, targetState: StateType, animationTime: number, animationName: string): void;
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.animate = exports.handleSetupAnimation = exports.handleCancelAnimation = void 0;
4
- var animations_constants_1 = require("./animations.constants");
5
- var handleCancelAnimationFrame = function (animation) {
6
- if (typeof animation === 'number') {
7
- cancelAnimationFrame(animation);
8
- }
9
- };
10
- var handleCancelAnimation = function (contextInstance) {
11
- if (!contextInstance.mounted)
12
- return;
13
- handleCancelAnimationFrame(contextInstance.animation);
14
- contextInstance.animate = false;
15
- contextInstance.animation = null;
16
- contextInstance.velocity = null;
17
- };
18
- exports.handleCancelAnimation = handleCancelAnimation;
19
- function handleSetupAnimation(contextInstance, animationName, animationTime, callback) {
20
- if (!contextInstance.mounted)
21
- return;
22
- var startTime = new Date().getTime();
23
- var lastStep = 1;
24
- (0, exports.handleCancelAnimation)(contextInstance);
25
- contextInstance.animation = function () {
26
- if (!contextInstance.mounted) {
27
- return handleCancelAnimationFrame(contextInstance.animation);
28
- }
29
- var frameTime = new Date().getTime() - startTime;
30
- var animationProgress = frameTime / animationTime;
31
- var animationType = animations_constants_1.animations[animationName];
32
- var step = animationType(animationProgress);
33
- if (frameTime >= animationTime) {
34
- callback(lastStep);
35
- contextInstance.animation = null;
36
- }
37
- else if (contextInstance.animation) {
38
- callback(step);
39
- requestAnimationFrame(contextInstance.animation);
40
- }
41
- };
42
- requestAnimationFrame(contextInstance.animation);
43
- }
44
- exports.handleSetupAnimation = handleSetupAnimation;
45
- function isValidTargetState(targetState) {
46
- var scale = targetState.scale, positionX = targetState.positionX, positionY = targetState.positionY;
47
- return !(Number.isNaN(scale) || Number.isNaN(positionX) || Number.isNaN(positionY));
48
- }
49
- function animate(contextInstance, targetState, animationTime, animationName) {
50
- var isValid = isValidTargetState(targetState);
51
- if (!contextInstance.mounted || !isValid)
52
- return;
53
- var setTransformState = contextInstance.setTransformState;
54
- var _a = contextInstance.transformState, scale = _a.scale, positionX = _a.positionX, positionY = _a.positionY;
55
- var scaleDiff = targetState.scale - scale;
56
- var positionXDiff = targetState.positionX - positionX;
57
- var positionYDiff = targetState.positionY - positionY;
58
- if (animationTime === 0) {
59
- setTransformState(targetState.scale, targetState.positionX, targetState.positionY);
60
- }
61
- else {
62
- handleSetupAnimation(contextInstance, animationName, animationTime, function (step) {
63
- var newScale = scale + scaleDiff * step;
64
- var newPositionX = positionX + positionXDiff * step;
65
- var newPositionY = positionY + positionYDiff * step;
66
- setTransformState(newScale, newPositionX, newPositionY);
67
- });
68
- }
69
- }
70
- exports.animate = animate;
71
- //# sourceMappingURL=animations.util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animations.util.js","sourceRoot":"","sources":["../../src/utilities/animations.util.ts"],"names":[],"mappings":";;;AAGA,+DAAmD;AAGnD,IAAM,0BAA0B,GAAG,UAAC,SAA+B;IACjE,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,oBAAoB,CAAC,SAAS,CAAC,CAAA;KAChC;AACH,CAAC,CAAA;AAEM,IAAM,qBAAqB,GAAG,UACnC,eAAyC;IAEzC,IAAI,CAAC,eAAe,CAAC,OAAO;QAAE,OAAM;IACpC,0BAA0B,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;IAErD,eAAe,CAAC,OAAO,GAAG,KAAK,CAAA;IAC/B,eAAe,CAAC,SAAS,GAAG,IAAI,CAAA;IAChC,eAAe,CAAC,QAAQ,GAAG,IAAI,CAAA;AACjC,CAAC,CAAA;AATY,QAAA,qBAAqB,yBASjC;AAED,SAAgB,oBAAoB,CAClC,eAAyC,EACzC,aAAqB,EACrB,aAAqB,EACrB,QAAgC;IAEhC,IAAI,CAAC,eAAe,CAAC,OAAO;QAAE,OAAM;IACpC,IAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;IACtC,IAAM,QAAQ,GAAG,CAAC,CAAA;IAGlB,IAAA,6BAAqB,EAAC,eAAe,CAAC,CAAA;IAGtC,eAAe,CAAC,SAAS,GAAG;QAC1B,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE;YAC5B,OAAO,0BAA0B,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;SAC7D;QAED,IAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAA;QAClD,IAAM,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAA;QACnD,IAAM,aAAa,GAAG,iCAAU,CAAC,aAAa,CAAC,CAAA;QAE/C,IAAM,IAAI,GAA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aAAa,KAAK,CAAC,EAAE;QACvB,iBAAiB,CACf,WAAW,CAAC,KAAK,EACjB,WAAW,CAAC,SAAS,EACrB,WAAW,CAAC,SAAS,CACtB,CAAA;KACF;SAAM;QAEL,oBAAoB,CAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAC,IAAY;YACX,IAAM,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI,CAAA;YACzC,IAAM,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CAAA;YACrD,IAAM,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CAAA;YAErD,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,CAAA;QACzD,CAAC,CACF,CAAA;KACF;AACH,CAAC;AArCD,0BAqCC"}
@@ -1,7 +0,0 @@
1
- import { BoundsType, PositionType, ReactZoomPanPinchContext } from 'react-zoom-pan-pinch';
2
- export declare function getComponentsSizes(wrapperComponent: HTMLDivElement, contentComponent: HTMLDivElement, newScale: number): any;
3
- export declare const getBounds: (wrapperWidth: number, newContentWidth: number, diffWidth: number, wrapperHeight: number, newContentHeight: number, diffHeight: number, centerZoomedOut: boolean) => BoundsType;
4
- export declare const calculateBounds: (contextInstance: ReactZoomPanPinchContext, newScale: number) => BoundsType;
5
- export declare const boundLimiter: (value: number, minBound: number, maxBound: number, isActive: boolean) => number;
6
- export declare const handleCalculateBounds: (contextInstance: ReactZoomPanPinchContext, newScale: number) => BoundsType;
7
- export declare function getMouseBoundedPosition(positionX: number, positionY: number, bounds: BoundsType, limitToBounds: boolean, paddingValueX: number, paddingValueY: number, wrapperComponent: HTMLDivElement | null): PositionType;
@@ -1,77 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMouseBoundedPosition = exports.handleCalculateBounds = exports.boundLimiter = exports.calculateBounds = exports.getBounds = exports.getComponentsSizes = void 0;
4
- var calculation_util_1 = require("./calculation.util");
5
- function getComponentsSizes(wrapperComponent, contentComponent, newScale) {
6
- var wrapperWidth = wrapperComponent.offsetWidth;
7
- var wrapperHeight = wrapperComponent.offsetHeight;
8
- var contentWidth = contentComponent.offsetWidth;
9
- var contentHeight = contentComponent.offsetHeight;
10
- var newContentWidth = contentWidth * newScale;
11
- var newContentHeight = contentHeight * newScale;
12
- var newDiffWidth = wrapperWidth - newContentWidth;
13
- var newDiffHeight = wrapperHeight - newContentHeight;
14
- return {
15
- wrapperWidth: wrapperWidth,
16
- wrapperHeight: wrapperHeight,
17
- newContentWidth: newContentWidth,
18
- newDiffWidth: newDiffWidth,
19
- newContentHeight: newContentHeight,
20
- newDiffHeight: newDiffHeight
21
- };
22
- }
23
- exports.getComponentsSizes = getComponentsSizes;
24
- var getBounds = function (wrapperWidth, newContentWidth, diffWidth, wrapperHeight, newContentHeight, diffHeight, centerZoomedOut) {
25
- var scaleWidthFactor = wrapperWidth > newContentWidth
26
- ? diffWidth * (centerZoomedOut ? 1 : 0.5)
27
- : 0;
28
- var scaleHeightFactor = wrapperHeight > newContentHeight
29
- ? diffHeight * (centerZoomedOut ? 1 : 0.5)
30
- : 0;
31
- var minPositionX = wrapperWidth - newContentWidth - scaleWidthFactor;
32
- var maxPositionX = scaleWidthFactor;
33
- var minPositionY = wrapperHeight - newContentHeight - scaleHeightFactor;
34
- var maxPositionY = scaleHeightFactor;
35
- return { minPositionX: minPositionX, maxPositionX: maxPositionX, minPositionY: minPositionY, maxPositionY: maxPositionY };
36
- };
37
- exports.getBounds = getBounds;
38
- var calculateBounds = function (contextInstance, newScale) {
39
- var wrapperComponent = contextInstance.wrapperComponent, contentComponent = contextInstance.contentComponent;
40
- var centerZoomedOut = contextInstance.setup.centerZoomedOut;
41
- if (!wrapperComponent || !contentComponent) {
42
- throw new Error('Components are not mounted');
43
- }
44
- var _a = getComponentsSizes(wrapperComponent, contentComponent, newScale), wrapperWidth = _a.wrapperWidth, wrapperHeight = _a.wrapperHeight, newContentWidth = _a.newContentWidth, newDiffWidth = _a.newDiffWidth, newContentHeight = _a.newContentHeight, newDiffHeight = _a.newDiffHeight;
45
- return (0, exports.getBounds)(wrapperWidth, newContentWidth, newDiffWidth, wrapperHeight, newContentHeight, newDiffHeight, Boolean(centerZoomedOut));
46
- };
47
- exports.calculateBounds = calculateBounds;
48
- var boundLimiter = function (value, minBound, maxBound, isActive) {
49
- if (!isActive)
50
- return (0, calculation_util_1.roundNumber)(value, 2);
51
- if (value < minBound)
52
- return (0, calculation_util_1.roundNumber)(minBound, 2);
53
- if (value > maxBound)
54
- return (0, calculation_util_1.roundNumber)(maxBound, 2);
55
- return (0, calculation_util_1.roundNumber)(value, 2);
56
- };
57
- exports.boundLimiter = boundLimiter;
58
- var handleCalculateBounds = function (contextInstance, newScale) {
59
- var bounds = (0, exports.calculateBounds)(contextInstance, newScale);
60
- contextInstance.bounds = bounds;
61
- return bounds;
62
- };
63
- exports.handleCalculateBounds = handleCalculateBounds;
64
- function getMouseBoundedPosition(positionX, positionY, bounds, limitToBounds, paddingValueX, paddingValueY, wrapperComponent) {
65
- var minPositionX = bounds.minPositionX, minPositionY = bounds.minPositionY, maxPositionX = bounds.maxPositionX, maxPositionY = bounds.maxPositionY;
66
- var paddingX = 0;
67
- var paddingY = 0;
68
- if (wrapperComponent) {
69
- paddingX = paddingValueX;
70
- paddingY = paddingValueY;
71
- }
72
- var x = (0, exports.boundLimiter)(positionX, minPositionX - paddingX, maxPositionX + paddingX, limitToBounds);
73
- var y = (0, exports.boundLimiter)(positionY, minPositionY - paddingY, maxPositionY + paddingY, limitToBounds);
74
- return { x: x, y: y };
75
- }
76
- exports.getMouseBoundedPosition = getMouseBoundedPosition;
77
- //# sourceMappingURL=bounds.util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bounds.util.js","sourceRoot":"","sources":["../../src/utilities/bounds.util.ts"],"names":[],"mappings":";;;AAIA,uDAAgD;AAEhD,SAAgB,kBAAkB,CAChC,gBAAgC,EAChC,gBAAgC,EAChC,QAAgB;IAEhB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CAAA;AAC9B,CAAC,CAAA;AAVY,QAAA,YAAY,gBAUxB;AAEM,IAAM,qBAAqB,GAAG,UACnC,eAAyC,EACzC,QAAgB;IAEhB,IAAM,MAAM,GAAG,IAAA,uBAAe,EAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;IAGzD,eAAe,CAAC,MAAM,GAAG,MAAM,CAAA;IAC/B,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AATY,QAAA,qBAAqB,yBASjC;AAED,SAAgB,uBAAuB,CACrC,SAAiB,EACjB,SAAiB,EACjB,MAAkB,EAClB,aAAsB,EACtB,aAAqB,EACrB,aAAqB,EACrB,gBAAuC;IAE/B,IAAA,YAAY,GAA+C,MAAM,aAArD,EAAE,YAAY,GAAiC,MAAM,aAAvC,EAAE,YAAY,GAAmB,MAAM,aAAzB,EAAE,YAAY,GAAK,MAAM,aAAX,CAAW;IAEzE,IAAI,QAAQ,GAAG,CAAC,CAAA;IAChB,IAAI,QAAQ,GAAG,CAAC,CAAA;IAEhB,IAAI,gBAAgB,EAAE;QACpB,QAAQ,GAAG,aAAa,CAAA;QACxB,QAAQ,GAAG,aAAa,CAAA;KACzB;IAED,IAAM,CAAC,GAAG,IAAA,oBAAY,EACpB,SAAS,EACT,YAAY,GAAG,QAAQ,EACvB,YAAY,GAAG,QAAQ,EACvB,aAAa,CACd,CAAA;IAED,IAAM,CAAC,GAAG,IAAA,oBAAY,EACpB,SAAS,EACT,YAAY,GAAG,QAAQ,EACvB,YAAY,GAAG,QAAQ,EACvB,aAAa,CACd,CAAA;IACD,OAAO,EAAE,CAAC,GAAA,EAAE,CAAC,GAAA,EAAE,CAAA;AACjB,CAAC;AAjCD,0DAiCC"}
@@ -1,2 +0,0 @@
1
- export declare const roundNumber: (num: number, decimal: number) => number;
2
- export declare const checkIsNumber: (num: any, defaultValue: number) => number;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkIsNumber = exports.roundNumber = void 0;
4
- var roundNumber = function (num, decimal) {
5
- return Number(num.toFixed(decimal));
6
- };
7
- exports.roundNumber = roundNumber;
8
- var checkIsNumber = function (num, defaultValue) {
9
- return typeof num === "number" ? num : defaultValue;
10
- };
11
- exports.checkIsNumber = checkIsNumber;
12
- //# sourceMappingURL=calculation.util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calculation.util.js","sourceRoot":"","sources":["../../src/utilities/calculation.util.ts"],"names":[],"mappings":";;;AAQO,IAAM,WAAW,GAAG,UAAC,GAAW,EAAE,OAAe;IACtD,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAOK,IAAM,aAAa,GAAG,UAAC,GAAQ,EAAE,YAAoB;IAC1D,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB"}
@@ -1 +0,0 @@
1
- export declare function checkZoomBounds(zoom: number, minScale: number, maxScale: number, zoomPadding: number, enablePadding: boolean): number;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkZoomBounds = void 0;
4
- function checkZoomBounds(zoom, minScale, maxScale, zoomPadding, enablePadding) {
5
- var scalePadding = enablePadding ? zoomPadding : 0;
6
- var minScaleWithPadding = minScale - scalePadding;
7
- if (!Number.isNaN(maxScale) && zoom >= maxScale)
8
- return maxScale;
9
- if (!Number.isNaN(minScale) && zoom <= minScaleWithPadding)
10
- return minScaleWithPadding;
11
- return zoom;
12
- }
13
- exports.checkZoomBounds = checkZoomBounds;
14
- //# sourceMappingURL=zoom.util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zoom.util.js","sourceRoot":"","sources":["../../src/utilities/zoom.util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,eAAe,CAC7B,IAAY,EACZ,QAAgB,EAChB,QAAgB,EAChB,WAAmB,EACnB,aAAsB;IAEtB,IAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IACpD,IAAM,mBAAmB,GAAG,QAAQ,GAAG,YAAY,CAAA;IAEnD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAChE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,mBAAmB;QACxD,OAAO,mBAAmB,CAAA;IAC5B,OAAO,IAAI,CAAA;AACb,CAAC;AAdD,0CAcC"}