@gamelearn/arcade-components 1.27.4 → 1.27.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.
@@ -52,7 +52,8 @@ var AnswerPanel = function AnswerPanel(_ref) {
52
52
  var answer = _ref.answer,
53
53
  flickerPosition = _ref.flickerPosition,
54
54
  _ref$show = _ref.show,
55
- show = _ref$show === void 0 ? false : _ref$show;
55
+ show = _ref$show === void 0 ? false : _ref$show,
56
+ showCorrectSolution = _ref.showCorrectSolution;
56
57
  var words = [];
57
58
  var wordIndex = 0;
58
59
  answer.forEach(function (a) {
@@ -66,7 +67,9 @@ var AnswerPanel = function AnswerPanel(_ref) {
66
67
  wordIndex += 1;
67
68
  }
68
69
 
69
- a.positionInitial = a.index;
70
+ if (!showCorrectSolution) {
71
+ a.positionInitial = a.index;
72
+ }
70
73
  });
71
74
  return words.map(function (word, index) {
72
75
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -503,10 +506,12 @@ var HangedPuzzleComponent = function HangedPuzzleComponent(_ref4) {
503
506
  dir: "auto",
504
507
  className: "puzzle--hanged__solution ".concat(resolvedClass),
505
508
  "data-testid": "".concat(resolvedClass)
506
- }, showCorrectSolution ? /*#__PURE__*/_react.default.createElement(AnswerPanel, {
509
+ }, showCorrectSolution ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(AnswerPanel, {
510
+ showCorrectSolution: showCorrectSolution,
507
511
  answer: answer.split(''),
508
512
  show: true
509
- }) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
513
+ })) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
514
+ showCorrectSolution: showCorrectSolution,
510
515
  flickerPosition: flickerPosition,
511
516
  answer: resolvedAnswer
512
517
  })), /*#__PURE__*/_react.default.createElement("div", {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "author": "Gamelearn",
4
4
  "license": "unlicense",
5
- "version": "1.27.4",
5
+ "version": "1.27.6",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",
@@ -13,7 +13,7 @@
13
13
  "url": "https://github.com/gamelearn/arcade-components"
14
14
  },
15
15
  "dependencies": {
16
- "@gamelearn/arcade-styles": "0.13.1",
16
+ "@gamelearn/arcade-styles": "0.13.2",
17
17
  "@gamelearn/arcade-three-core": "1.13.0",
18
18
  "@react-three/drei": "9.4.3",
19
19
  "@react-three/fiber": "8.0.10",