@gamelearn/arcade-components 1.4.30-fix1 → 1.4.30-fix2
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/README.md
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
# Arcade Components
|
|
2
|
-
> librería de componentes para Arcade (aka engine 2.0)
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/arcade-components) [](https://standardjs.com)
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
yarn add @gamelearn/arcade-components
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```jsx
|
|
15
|
-
import React, { Component } from 'react';
|
|
16
|
-
|
|
17
|
-
import { Button } from 'arcade-components';
|
|
18
|
-
|
|
19
|
-
export default class App extends Component {
|
|
20
|
-
render() {
|
|
21
|
-
return (
|
|
22
|
-
<div>
|
|
23
|
-
<Button>Enjoy</Button>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Generar version hotfix para arcade/master-stg
|
|
32
|
-
|
|
33
|
-
Para generar una version hotfix nos vamos al commit que desplego la version que utiliza actualmente arcade/master-stg y creamos una rama sobre ella.
|
|
34
|
-
|
|
35
|
-
Generamos los cambios o hacemos cherrypick de ellos si ya estan creados y una vez terminemos con los cambios tendremos que cambiar la version del package.json a una tal que asi :
|
|
36
|
-
|
|
37
|
-
`"version": "1.3.5-fix-1",`
|
|
38
|
-
|
|
39
|
-
Habiendo cambiado ya la version pasaremos a publicarla en dos pasos:
|
|
40
|
-
* Generar una nueva carpeta dist con `yarn compile`
|
|
41
|
-
* Publicar la versión a npm: `npm publish`
|
|
42
|
-
|
|
43
|
-
Una vez publicada en npm ir a la versión master de arcade y sustituir la versión de arcade-components.
|
|
44
|
-
|
|
45
|
-
## Available Scripts
|
|
46
|
-
|
|
47
|
-
Para ver Storybook en local
|
|
48
|
-
|
|
49
|
-
### `yarn start`
|
|
50
|
-
|
|
51
|
-
Para compilar la librería a dist
|
|
52
|
-
|
|
53
|
-
### `yarn compile`
|
|
54
|
-
|
|
55
|
-
Para dejar a babel observando cambios y ejecuntando auto-compilación puedes pasarle --watch
|
|
56
|
-
|
|
57
|
-
`yarn compile --watch`
|
|
58
|
-
|
|
59
|
-
### `yarn generate <componentName>`
|
|
60
|
-
|
|
61
|
-
Para añadir un componente nuevo se recomienda usar el generador automático que hara el scaffolding básico de dicho componente, coge el nombre como primer parámetro y si lo llamas sin parámetro te lo preguntará por el prompt.
|
|
62
|
-
|
|
63
|
-
`yarn generate`
|
|
64
|
-
|
|
65
|
-
## How to link arcade-components in other repos (WIP)
|
|
66
|
-
|
|
67
|
-
Para trabajar con arcade-components en local si necesidad de subir a git ni a npm no podemos trabajar con `yarn link` ya que da un error con los hooks de react.
|
|
68
|
-
|
|
69
|
-
Cómo solución alternativa podemos instalar `yalc` que permite publicar el paquete en local e importarlo desde `arcade`.
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
yarn global add yalc
|
|
73
|
-
```
|
|
74
|
-
Si teneis problemas instalándolo en global :
|
|
75
|
-
yarn global add yalc --prefix /usr/local
|
|
76
|
-
|
|
77
|
-
Para generar el paquete en el store local:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
yarn
|
|
81
|
-
yarn compile
|
|
82
|
-
yalc publish o yarn yalc publish
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Después, en el repositorio de `arcade` tendremos que linkar el paquete generado de la siguiente forma:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
yalc link @gamelearn/arcade-components
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Y voilá, ya podremos trabajar con arcade y arcade-components en local sin publicar nada.
|
|
92
|
-
|
|
93
|
-
Una vez terminemos de trabajar con el paquete linkado en `arcade`, no nos olvidemos de borrar el link:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
yalc remove --all
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## License
|
|
100
|
-
|
|
101
|
-
UNLICENSED © [gamelearn](https://github.com/gamelearn)
|
|
1
|
+
# Arcade Components
|
|
2
|
+
> librería de componentes para Arcade (aka engine 2.0)
|
|
3
|
+
|
|
4
|
+
[](https://www.npmjs.com/package/arcade-components) [](https://standardjs.com)
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
yarn add @gamelearn/arcade-components
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
import React, { Component } from 'react';
|
|
16
|
+
|
|
17
|
+
import { Button } from 'arcade-components';
|
|
18
|
+
|
|
19
|
+
export default class App extends Component {
|
|
20
|
+
render() {
|
|
21
|
+
return (
|
|
22
|
+
<div>
|
|
23
|
+
<Button>Enjoy</Button>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Generar version hotfix para arcade/master-stg
|
|
32
|
+
|
|
33
|
+
Para generar una version hotfix nos vamos al commit que desplego la version que utiliza actualmente arcade/master-stg y creamos una rama sobre ella.
|
|
34
|
+
|
|
35
|
+
Generamos los cambios o hacemos cherrypick de ellos si ya estan creados y una vez terminemos con los cambios tendremos que cambiar la version del package.json a una tal que asi :
|
|
36
|
+
|
|
37
|
+
`"version": "1.3.5-fix-1",`
|
|
38
|
+
|
|
39
|
+
Habiendo cambiado ya la version pasaremos a publicarla en dos pasos:
|
|
40
|
+
* Generar una nueva carpeta dist con `yarn compile`
|
|
41
|
+
* Publicar la versión a npm: `npm publish`
|
|
42
|
+
|
|
43
|
+
Una vez publicada en npm ir a la versión master de arcade y sustituir la versión de arcade-components.
|
|
44
|
+
|
|
45
|
+
## Available Scripts
|
|
46
|
+
|
|
47
|
+
Para ver Storybook en local
|
|
48
|
+
|
|
49
|
+
### `yarn start`
|
|
50
|
+
|
|
51
|
+
Para compilar la librería a dist
|
|
52
|
+
|
|
53
|
+
### `yarn compile`
|
|
54
|
+
|
|
55
|
+
Para dejar a babel observando cambios y ejecuntando auto-compilación puedes pasarle --watch
|
|
56
|
+
|
|
57
|
+
`yarn compile --watch`
|
|
58
|
+
|
|
59
|
+
### `yarn generate <componentName>`
|
|
60
|
+
|
|
61
|
+
Para añadir un componente nuevo se recomienda usar el generador automático que hara el scaffolding básico de dicho componente, coge el nombre como primer parámetro y si lo llamas sin parámetro te lo preguntará por el prompt.
|
|
62
|
+
|
|
63
|
+
`yarn generate`
|
|
64
|
+
|
|
65
|
+
## How to link arcade-components in other repos (WIP)
|
|
66
|
+
|
|
67
|
+
Para trabajar con arcade-components en local si necesidad de subir a git ni a npm no podemos trabajar con `yarn link` ya que da un error con los hooks de react.
|
|
68
|
+
|
|
69
|
+
Cómo solución alternativa podemos instalar `yalc` que permite publicar el paquete en local e importarlo desde `arcade`.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
yarn global add yalc
|
|
73
|
+
```
|
|
74
|
+
Si teneis problemas instalándolo en global :
|
|
75
|
+
yarn global add yalc --prefix /usr/local
|
|
76
|
+
|
|
77
|
+
Para generar el paquete en el store local:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
yarn
|
|
81
|
+
yarn compile
|
|
82
|
+
yalc publish o yarn yalc publish
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Después, en el repositorio de `arcade` tendremos que linkar el paquete generado de la siguiente forma:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
yalc link @gamelearn/arcade-components
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Y voilá, ya podremos trabajar con arcade y arcade-components en local sin publicar nada.
|
|
92
|
+
|
|
93
|
+
Una vez terminemos de trabajar con el paquete linkado en `arcade`, no nos olvidemos de borrar el link:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
yalc remove --all
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
UNLICENSED © [gamelearn](https://github.com/gamelearn)
|
|
@@ -34,13 +34,11 @@ var Board = function Board(_ref) {
|
|
|
34
34
|
currentOrder = _ref.currentOrder,
|
|
35
35
|
setCurrentOrder = _ref.setCurrentOrder,
|
|
36
36
|
handleError = _ref.handleError,
|
|
37
|
-
endPuzzle = _ref.endPuzzle,
|
|
38
37
|
feedbackIsShown = _ref.feedbackIsShown,
|
|
39
38
|
resolvePuzzle = _ref.resolvePuzzle,
|
|
40
39
|
soundActions = _ref.soundActions,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
forceFlipCard = _ref.forceFlipCard;
|
|
40
|
+
onFinish = _ref.onFinish,
|
|
41
|
+
handleSuccess = _ref.handleSuccess;
|
|
44
42
|
|
|
45
43
|
var _useState = (0, _react.useState)(Array(cards.length).fill(false)),
|
|
46
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -57,6 +55,11 @@ var Board = function Board(_ref) {
|
|
|
57
55
|
correctCards = _useState6[0],
|
|
58
56
|
setCorrectCards = _useState6[1];
|
|
59
57
|
|
|
58
|
+
var _useState7 = (0, _react.useState)(false),
|
|
59
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
60
|
+
finished = _useState8[0],
|
|
61
|
+
setFinished = _useState8[1];
|
|
62
|
+
|
|
60
63
|
var _soundActions = _slicedToArray(soundActions, 1),
|
|
61
64
|
play = _soundActions[0];
|
|
62
65
|
|
|
@@ -66,14 +69,6 @@ var Board = function Board(_ref) {
|
|
|
66
69
|
var isOrderBased = cards.filter(function (card) {
|
|
67
70
|
return card.order;
|
|
68
71
|
}).length > 0;
|
|
69
|
-
var flipTimer;
|
|
70
|
-
(0, _react.useEffect)(function () {
|
|
71
|
-
if (forceFlipCard) {
|
|
72
|
-
setForceFlipCard(false);
|
|
73
|
-
reset();
|
|
74
|
-
clearTimeout(flipTimer);
|
|
75
|
-
}
|
|
76
|
-
}, [flipTimer, forceFlipCard, reset, setForceFlipCard]);
|
|
77
72
|
var reset = (0, _react.useCallback)(function () {
|
|
78
73
|
setFlipped(Array(cards.length).fill(false)); // reset it to the original length
|
|
79
74
|
|
|
@@ -83,9 +78,9 @@ var Board = function Board(_ref) {
|
|
|
83
78
|
}, [cards.length, setCurrentOrder]);
|
|
84
79
|
|
|
85
80
|
var timedReset = function timedReset() {
|
|
86
|
-
|
|
81
|
+
setTimeout(function () {
|
|
87
82
|
reset();
|
|
88
|
-
},
|
|
83
|
+
}, 1000);
|
|
89
84
|
};
|
|
90
85
|
|
|
91
86
|
function flipACard(index) {
|
|
@@ -94,12 +89,6 @@ var Board = function Board(_ref) {
|
|
|
94
89
|
setFlipped(tempFlipped);
|
|
95
90
|
}
|
|
96
91
|
|
|
97
|
-
var timedFlipped = function timedFlipped(index) {
|
|
98
|
-
setTimeout(function () {
|
|
99
|
-
flipACard(index);
|
|
100
|
-
}, 3000);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
92
|
var flipAllCorrect = (0, _react.useCallback)(function () {
|
|
104
93
|
var arrayToFlip = [];
|
|
105
94
|
cards.forEach(function (card, index) {
|
|
@@ -116,10 +105,11 @@ var Board = function Board(_ref) {
|
|
|
116
105
|
}, [flipAllCorrect, resolvePuzzle]);
|
|
117
106
|
(0, _react.useEffect)(function () {
|
|
118
107
|
if (correctCards === numberOfCorrectCards && numberOfCorrectCards > 0) {
|
|
119
|
-
|
|
108
|
+
onFinish();
|
|
109
|
+
setFinished(true);
|
|
120
110
|
setCorrectCards(0);
|
|
121
111
|
}
|
|
122
|
-
}, [correctCards,
|
|
112
|
+
}, [correctCards, onFinish, numberOfCorrectCards]);
|
|
123
113
|
|
|
124
114
|
var handleCorrect = function handleCorrect(index) {
|
|
125
115
|
flipACard(index);
|
|
@@ -128,6 +118,8 @@ var Board = function Board(_ref) {
|
|
|
128
118
|
};
|
|
129
119
|
|
|
130
120
|
var _handleClick = function handleClick(index) {
|
|
121
|
+
if (finished) return;
|
|
122
|
+
|
|
131
123
|
if (!feedbackIsShown) {
|
|
132
124
|
play('click-ui');
|
|
133
125
|
|
|
@@ -156,8 +148,8 @@ var Board = function Board(_ref) {
|
|
|
156
148
|
|
|
157
149
|
// fails and resets
|
|
158
150
|
handleError(((_cards$index2 = cards[index]) === null || _cards$index2 === void 0 ? void 0 : _cards$index2.id) || null);
|
|
151
|
+
timedReset();
|
|
159
152
|
flipACard(index);
|
|
160
|
-
timedFlipped();
|
|
161
153
|
}
|
|
162
154
|
}
|
|
163
155
|
};
|
|
@@ -182,15 +174,13 @@ var Board = function Board(_ref) {
|
|
|
182
174
|
Board.defaultProps = {
|
|
183
175
|
setCurrentOrder: function setCurrentOrder() {},
|
|
184
176
|
handleError: function handleError() {},
|
|
185
|
-
|
|
177
|
+
onFinish: function onFinish() {},
|
|
186
178
|
handleSuccess: function handleSuccess() {},
|
|
187
|
-
setForceFlipCard: function setForceFlipCard() {},
|
|
188
179
|
documentsDict: {},
|
|
189
180
|
cards: [],
|
|
190
181
|
currentOrder: 1,
|
|
191
182
|
resolvePuzzle: false,
|
|
192
|
-
feedbackIsShown: false
|
|
193
|
-
forceFlipCard: false
|
|
183
|
+
feedbackIsShown: false
|
|
194
184
|
};
|
|
195
185
|
var _default = Board;
|
|
196
186
|
exports.default = _default;
|
package/dist/components/cards-selector-puzzle-component/components/CardsSelectorPuzzleComponent.js
CHANGED
|
@@ -40,6 +40,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
42
|
var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
43
|
+
var _info$solution2;
|
|
44
|
+
|
|
43
45
|
var emitEvent = _ref.emitEvent,
|
|
44
46
|
info = _ref.info,
|
|
45
47
|
cards = _ref.cards,
|
|
@@ -92,11 +94,6 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
92
94
|
var _soundActions = _slicedToArray(soundActions, 1),
|
|
93
95
|
playSound = _soundActions[0];
|
|
94
96
|
|
|
95
|
-
var _useState17 = (0, _react.useState)(false),
|
|
96
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
97
|
-
forceFlipCard = _useState18[0],
|
|
98
|
-
setForceFlipCard = _useState18[1];
|
|
99
|
-
|
|
100
97
|
var translate = function translate(id) {
|
|
101
98
|
return emitEvent({
|
|
102
99
|
type: 'translate',
|
|
@@ -118,24 +115,14 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
118
115
|
payload: rewardsData
|
|
119
116
|
});
|
|
120
117
|
}, [emitEvent]);
|
|
121
|
-
|
|
122
|
-
var endPuzzle = function endPuzzle() {
|
|
118
|
+
var endPuzzle = (0, _react.useCallback)(function () {
|
|
123
119
|
var _info$solution, _specificFeedbacks$co;
|
|
124
120
|
|
|
125
121
|
emitEvent({
|
|
126
122
|
type: 'hidePuzzleButtons',
|
|
127
123
|
payload: true
|
|
128
124
|
});
|
|
129
|
-
|
|
130
|
-
if (info.solution.right.desc) {
|
|
131
|
-
setFeedBackText(info.solution.right.desc);
|
|
132
|
-
setFeedbackResult(true);
|
|
133
|
-
setFeedbackIsShown(true);
|
|
134
|
-
} else {
|
|
135
|
-
setFeedbackResult(true);
|
|
136
|
-
setFeedbackIsShown(true);
|
|
137
|
-
setFinished(true);
|
|
138
|
-
}
|
|
125
|
+
setFeedbackResult(true);
|
|
139
126
|
|
|
140
127
|
var _info$solution$right = info === null || info === void 0 ? void 0 : (_info$solution = info.solution) === null || _info$solution === void 0 ? void 0 : _info$solution.right,
|
|
141
128
|
rewards = _info$solution$right.rewards;
|
|
@@ -144,16 +131,16 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
144
131
|
return spReward.rewards;
|
|
145
132
|
}).flat()) || [];
|
|
146
133
|
var rewardsData = [].concat(_toConsumableArray(accRewards), _toConsumableArray(rewards), _toConsumableArray(specificRewards));
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
134
|
+
playSound('score');
|
|
135
|
+
closeFeedbackAndShowPoints(rewardsData);
|
|
136
|
+
}, [accRewards, closeFeedbackAndShowPoints, emitEvent, info === null || info === void 0 ? void 0 : (_info$solution2 = info.solution) === null || _info$solution2 === void 0 ? void 0 : _info$solution2.right, playSound, specificFeedbacks === null || specificFeedbacks === void 0 ? void 0 : specificFeedbacks.correctFeedbacks]);
|
|
137
|
+
|
|
138
|
+
var onFinish = function onFinish() {
|
|
139
|
+
setFinished(true);
|
|
151
140
|
};
|
|
152
141
|
|
|
153
142
|
var handleFeedbackFuncionOnClose = function handleFeedbackFuncionOnClose() {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (feedbackResult) {
|
|
143
|
+
if (feedbackResult || finished) {
|
|
157
144
|
endPuzzle();
|
|
158
145
|
} else {
|
|
159
146
|
setFeedbackResult(false);
|
|
@@ -166,10 +153,6 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
166
153
|
}
|
|
167
154
|
|
|
168
155
|
setFeedBackText('');
|
|
169
|
-
|
|
170
|
-
if (!feedbackResult && !isCorrect) {
|
|
171
|
-
setForceFlipCard(true);
|
|
172
|
-
}
|
|
173
156
|
};
|
|
174
157
|
|
|
175
158
|
var handleSuccessPick = function handleSuccessPick(cardId) {
|
|
@@ -182,23 +165,17 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
182
165
|
|
|
183
166
|
if (pickedCard !== null && pickedCard !== void 0 && pickedCard.desc) {
|
|
184
167
|
setFeedBackText(pickedCard.desc);
|
|
185
|
-
} else {
|
|
186
|
-
setTimeout(function () {
|
|
187
|
-
playSound('score');
|
|
188
|
-
handleFeedbackFuncionOnClose(true);
|
|
189
|
-
emitEvent({
|
|
190
|
-
type: 'hidePuzzleButtons',
|
|
191
|
-
payload: false
|
|
192
|
-
});
|
|
193
|
-
}, 2000);
|
|
194
168
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
emitEvent({
|
|
198
|
-
type: 'hidePuzzleButtons',
|
|
199
|
-
payload: true
|
|
200
|
-
});
|
|
169
|
+
} else if (info.solution.right.desc) {
|
|
170
|
+
setFeedBackText(info.solution.right.desc);
|
|
201
171
|
}
|
|
172
|
+
|
|
173
|
+
playSound('score');
|
|
174
|
+
setFeedbackIsShown(true);
|
|
175
|
+
emitEvent({
|
|
176
|
+
type: 'hidePuzzleButtons',
|
|
177
|
+
payload: true
|
|
178
|
+
});
|
|
202
179
|
};
|
|
203
180
|
|
|
204
181
|
var handleError = function handleError(cardId) {
|
|
@@ -283,17 +260,16 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
283
260
|
setCurrentOrder: setCurrentOrder,
|
|
284
261
|
currentOrder: currentOrder,
|
|
285
262
|
cards: cards,
|
|
286
|
-
|
|
263
|
+
onFinish: onFinish,
|
|
287
264
|
handleError: handleError,
|
|
288
265
|
feedbackIsShown: feedbackIsShown,
|
|
289
266
|
resolvePuzzle: resolvePuzzle,
|
|
290
267
|
soundActions: soundActions,
|
|
291
|
-
handleSuccess: handleSuccessPick
|
|
292
|
-
forceFlipCard: forceFlipCard,
|
|
293
|
-
setForceFlipCard: setForceFlipCard
|
|
268
|
+
handleSuccess: handleSuccessPick
|
|
294
269
|
})), feedbackIsShown && /*#__PURE__*/_react.default.createElement(_feedbackComponent.default, {
|
|
295
270
|
success: feedbackResult || rightPick,
|
|
296
271
|
text: feedBackText,
|
|
272
|
+
hasTimeout: !feedBackText,
|
|
297
273
|
translate: translate,
|
|
298
274
|
functionOnClose: handleFeedbackFuncionOnClose
|
|
299
275
|
}));
|
package/package.json
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@gamelearn/arcade-components",
|
|
3
|
-
"author": "Gamelearn",
|
|
4
|
-
"license": "unlicense",
|
|
5
|
-
"version": "1.4.30-
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"README.md"
|
|
10
|
-
],
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/gamelearn/arcade-components"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@gamelearn/arcade-three-core": "1.0.1",
|
|
17
|
-
"@react-three/drei": "^7.20.0",
|
|
18
|
-
"@react-three/fiber": "^7.0.17",
|
|
19
|
-
"@testing-library/jest-dom": "5.11.4",
|
|
20
|
-
"@testing-library/react": "11.1.0",
|
|
21
|
-
"@testing-library/user-event": "13.5.0",
|
|
22
|
-
"global": "^4.4.0",
|
|
23
|
-
"hls.js": "0.12.4",
|
|
24
|
-
"html-react-parser": "^1.4.0",
|
|
25
|
-
"interactjs": "^1.10.11",
|
|
26
|
-
"konva": "^7.2.5",
|
|
27
|
-
"prop-types": "15.7.2",
|
|
28
|
-
"react-konva": "^17.0.2-0",
|
|
29
|
-
"react-konva-utils": "^0.2.0",
|
|
30
|
-
"react-pdf": "5.2.0",
|
|
31
|
-
"react-promise-suspense": "0.3.3",
|
|
32
|
-
"react-typist": "^2.0.5",
|
|
33
|
-
"three": "0.132.2",
|
|
34
|
-
"web-vitals": "0.2.4"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"start": "npm run storybook",
|
|
38
|
-
"clean": "rimraf dist",
|
|
39
|
-
"watch": "npx nodemon -e js --ignore dist --exec \"yarn compile && yalc push --changed\"",
|
|
40
|
-
"compile": "npm run clean && cross-env NODE_ENV=production babel src -d dist --ignore src/**/*.stories.js,src/**/*.test.js,src/setupTests.js",
|
|
41
|
-
"test": "react-scripts test",
|
|
42
|
-
"eject": "react-scripts eject",
|
|
43
|
-
"storybook": "start-storybook -p 6006 -s public",
|
|
44
|
-
"build-storybook": "build-storybook -o build",
|
|
45
|
-
"generate": "plop",
|
|
46
|
-
"lint": "npx eslint src --ext js,json",
|
|
47
|
-
"lint:fix": "npx eslint src --ext js,json --fix",
|
|
48
|
-
"lint:quiet": "npx eslint src --ext js,json --quiet"
|
|
49
|
-
},
|
|
50
|
-
"browserslist": {
|
|
51
|
-
"production": [
|
|
52
|
-
">0.2%",
|
|
53
|
-
"not dead",
|
|
54
|
-
"not op_mini all"
|
|
55
|
-
],
|
|
56
|
-
"development": [
|
|
57
|
-
"last 1 chrome version",
|
|
58
|
-
"last 1 firefox version",
|
|
59
|
-
"last 1 safari version"
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
63
|
-
"@babel/cli": "7.12.10",
|
|
64
|
-
"@babel/eslint-parser": "^7.15.8",
|
|
65
|
-
"@babel/preset-env": "7.12.11",
|
|
66
|
-
"@babel/preset-react": "7.12.10",
|
|
67
|
-
"@gamelearn/arcade-styles": "0.5.11",
|
|
68
|
-
"@gamelearn/version": "^1.3.1",
|
|
69
|
-
"@react-three/test-renderer": "6.0.6",
|
|
70
|
-
"@storybook/addon-actions": "6.1.11",
|
|
71
|
-
"@storybook/addon-essentials": "6.1.11",
|
|
72
|
-
"@storybook/addon-links": "6.1.11",
|
|
73
|
-
"@storybook/addons": "^6.3.8",
|
|
74
|
-
"@storybook/node-logger": "6.1.11",
|
|
75
|
-
"@storybook/preset-create-react-app": "3.1.5",
|
|
76
|
-
"@storybook/react": "6.1.11",
|
|
77
|
-
"@storybook/theming": "^6.3.8",
|
|
78
|
-
"babel-loader": "8.2.2",
|
|
79
|
-
"cross-env": "7.0.3",
|
|
80
|
-
"eslint-config-airbnb": "^18.2.1",
|
|
81
|
-
"eslint-config-prettier": "^8.3.0",
|
|
82
|
-
"eslint-plugin-json-format": "^2.0.1",
|
|
83
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
84
|
-
"husky": "4.3.0",
|
|
85
|
-
"nodemon": "^2.0.13",
|
|
86
|
-
"plop": "^2.7.4",
|
|
87
|
-
"prettier": "^2.5.0",
|
|
88
|
-
"react": "0.0.0-experimental-27659559e",
|
|
89
|
-
"react-dom": "0.0.0-experimental-27659559e",
|
|
90
|
-
"react-scripts": "4.0.1",
|
|
91
|
-
"rimraf": "3.0.2"
|
|
92
|
-
},
|
|
93
|
-
"jest": {
|
|
94
|
-
"transformIgnorePatterns": [
|
|
95
|
-
"node_modules/(?!(three)/)"
|
|
96
|
-
],
|
|
97
|
-
"moduleNameMapper": {
|
|
98
|
-
"^react-pdf$": "react-pdf/dist/umd/entry.jest",
|
|
99
|
-
"^react-konva-utils$": "react-pdf/dist/umd/entry.jest"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"husky": {
|
|
103
|
-
"hooks": {
|
|
104
|
-
"prepare-commit-msg": "bash node_modules/@gamelearn/version/scripts/update_version.sh -p hooks.config ${HUSKY_GIT_PARAMS}",
|
|
105
|
-
"post-commit": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config",
|
|
106
|
-
"post-merge": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@gamelearn/arcade-components",
|
|
3
|
+
"author": "Gamelearn",
|
|
4
|
+
"license": "unlicense",
|
|
5
|
+
"version": "1.4.30-fix2",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/gamelearn/arcade-components"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@gamelearn/arcade-three-core": "1.0.1",
|
|
17
|
+
"@react-three/drei": "^7.20.0",
|
|
18
|
+
"@react-three/fiber": "^7.0.17",
|
|
19
|
+
"@testing-library/jest-dom": "5.11.4",
|
|
20
|
+
"@testing-library/react": "11.1.0",
|
|
21
|
+
"@testing-library/user-event": "13.5.0",
|
|
22
|
+
"global": "^4.4.0",
|
|
23
|
+
"hls.js": "0.12.4",
|
|
24
|
+
"html-react-parser": "^1.4.0",
|
|
25
|
+
"interactjs": "^1.10.11",
|
|
26
|
+
"konva": "^7.2.5",
|
|
27
|
+
"prop-types": "15.7.2",
|
|
28
|
+
"react-konva": "^17.0.2-0",
|
|
29
|
+
"react-konva-utils": "^0.2.0",
|
|
30
|
+
"react-pdf": "5.2.0",
|
|
31
|
+
"react-promise-suspense": "0.3.3",
|
|
32
|
+
"react-typist": "^2.0.5",
|
|
33
|
+
"three": "0.132.2",
|
|
34
|
+
"web-vitals": "0.2.4"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"start": "npm run storybook",
|
|
38
|
+
"clean": "rimraf dist",
|
|
39
|
+
"watch": "npx nodemon -e js --ignore dist --exec \"yarn compile && yalc push --changed\"",
|
|
40
|
+
"compile": "npm run clean && cross-env NODE_ENV=production babel src -d dist --ignore src/**/*.stories.js,src/**/*.test.js,src/setupTests.js",
|
|
41
|
+
"test": "react-scripts test",
|
|
42
|
+
"eject": "react-scripts eject",
|
|
43
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
44
|
+
"build-storybook": "build-storybook -o build",
|
|
45
|
+
"generate": "plop",
|
|
46
|
+
"lint": "npx eslint src --ext js,json",
|
|
47
|
+
"lint:fix": "npx eslint src --ext js,json --fix",
|
|
48
|
+
"lint:quiet": "npx eslint src --ext js,json --quiet"
|
|
49
|
+
},
|
|
50
|
+
"browserslist": {
|
|
51
|
+
"production": [
|
|
52
|
+
">0.2%",
|
|
53
|
+
"not dead",
|
|
54
|
+
"not op_mini all"
|
|
55
|
+
],
|
|
56
|
+
"development": [
|
|
57
|
+
"last 1 chrome version",
|
|
58
|
+
"last 1 firefox version",
|
|
59
|
+
"last 1 safari version"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@babel/cli": "7.12.10",
|
|
64
|
+
"@babel/eslint-parser": "^7.15.8",
|
|
65
|
+
"@babel/preset-env": "7.12.11",
|
|
66
|
+
"@babel/preset-react": "7.12.10",
|
|
67
|
+
"@gamelearn/arcade-styles": "0.5.11",
|
|
68
|
+
"@gamelearn/version": "^1.3.1",
|
|
69
|
+
"@react-three/test-renderer": "6.0.6",
|
|
70
|
+
"@storybook/addon-actions": "6.1.11",
|
|
71
|
+
"@storybook/addon-essentials": "6.1.11",
|
|
72
|
+
"@storybook/addon-links": "6.1.11",
|
|
73
|
+
"@storybook/addons": "^6.3.8",
|
|
74
|
+
"@storybook/node-logger": "6.1.11",
|
|
75
|
+
"@storybook/preset-create-react-app": "3.1.5",
|
|
76
|
+
"@storybook/react": "6.1.11",
|
|
77
|
+
"@storybook/theming": "^6.3.8",
|
|
78
|
+
"babel-loader": "8.2.2",
|
|
79
|
+
"cross-env": "7.0.3",
|
|
80
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
81
|
+
"eslint-config-prettier": "^8.3.0",
|
|
82
|
+
"eslint-plugin-json-format": "^2.0.1",
|
|
83
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
84
|
+
"husky": "4.3.0",
|
|
85
|
+
"nodemon": "^2.0.13",
|
|
86
|
+
"plop": "^2.7.4",
|
|
87
|
+
"prettier": "^2.5.0",
|
|
88
|
+
"react": "0.0.0-experimental-27659559e",
|
|
89
|
+
"react-dom": "0.0.0-experimental-27659559e",
|
|
90
|
+
"react-scripts": "4.0.1",
|
|
91
|
+
"rimraf": "3.0.2"
|
|
92
|
+
},
|
|
93
|
+
"jest": {
|
|
94
|
+
"transformIgnorePatterns": [
|
|
95
|
+
"node_modules/(?!(three)/)"
|
|
96
|
+
],
|
|
97
|
+
"moduleNameMapper": {
|
|
98
|
+
"^react-pdf$": "react-pdf/dist/umd/entry.jest",
|
|
99
|
+
"^react-konva-utils$": "react-pdf/dist/umd/entry.jest"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"husky": {
|
|
103
|
+
"hooks": {
|
|
104
|
+
"prepare-commit-msg": "bash node_modules/@gamelearn/version/scripts/update_version.sh -p hooks.config ${HUSKY_GIT_PARAMS}",
|
|
105
|
+
"post-commit": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config",
|
|
106
|
+
"post-merge": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|