@gamelearn/arcade-components 1.27.2 → 1.27.4-hanged-snapshot

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.
@@ -36,14 +36,18 @@ var BubbleWrapper = function BubbleWrapper(_ref) {
36
36
  onLoad(group, bubble);
37
37
  };
38
38
 
39
+ var container = document.querySelector('.screens--container');
39
40
  return /*#__PURE__*/_react.default.createElement("group", {
40
41
  ref: group,
41
42
  position: position
42
43
  }, /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
43
- zIndexRange: [2, 2],
44
+ zIndexRange: [6, 6],
44
45
  calculatePosition: currentMessage.inScene ? undefined : function () {
45
46
  return [0, 0];
46
47
  },
48
+ portal: container ? {
49
+ current: container
50
+ } : undefined,
47
51
  style: currentMessage.inScene ? {
48
52
  position: 'static'
49
53
  } : cleanStyle
@@ -679,6 +679,7 @@ var DialogComponent = function DialogComponent(_ref) {
679
679
  checkBubbleBounds();
680
680
  }
681
681
  });
682
+ var container = document.querySelector('.screens--container');
682
683
  var cleanStyle = {
683
684
  width: '100vw',
684
685
  height: '100vh',
@@ -702,14 +703,16 @@ var DialogComponent = function DialogComponent(_ref) {
702
703
  return /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
703
704
  zIndexRange: [6, 6],
704
705
  style: cleanStyle,
706
+ portal: container ? {
707
+ current: container
708
+ } : undefined,
705
709
  calculatePosition: function calculatePosition() {
706
710
  return [0, 0];
707
711
  }
708
712
  }, /*#__PURE__*/_react.default.createElement(_decisionComponent.default, _extends({
709
713
  inScene: true
710
714
  }, decisionPayload)));
711
- } // 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
712
-
715
+ }
713
716
 
714
717
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, currentMessage.text ? /*#__PURE__*/_react.default.createElement(_BubbleWrapper.default, {
715
718
  position: messagePosition.current.pos,
@@ -720,6 +723,9 @@ var DialogComponent = function DialogComponent(_ref) {
720
723
  width: '100vw',
721
724
  height: '100vh'
722
725
  },
726
+ portal: container ? {
727
+ current: container
728
+ } : undefined,
723
729
  zIndexRange: [6, 6],
724
730
  onOcclude: function onOcclude() {},
725
731
  calculatePosition: function calculatePosition() {
@@ -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,10 @@ 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("p", null, "ESTO"), /*#__PURE__*/_react.default.createElement(AnswerPanel, {
507
510
  answer: answer.split(''),
508
511
  show: true
509
- }) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
512
+ })) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
510
513
  flickerPosition: flickerPosition,
511
514
  answer: resolvedAnswer
512
515
  })), /*#__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.2",
5
+ "version": "1.27.4-hanged-snapshot",
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.0",
16
+ "@gamelearn/arcade-styles": "0.13.1",
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",