@gamelearn/arcade-components 1.27.3 → 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: [1, 1],
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',
@@ -700,8 +701,11 @@ var DialogComponent = function DialogComponent(_ref) {
700
701
  });
701
702
 
702
703
  return /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
703
- zIndexRange: [2, 2],
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
  }
@@ -719,7 +723,10 @@ var DialogComponent = function DialogComponent(_ref) {
719
723
  width: '100vw',
720
724
  height: '100vh'
721
725
  },
722
- zIndexRange: [2, 2],
726
+ portal: container ? {
727
+ current: container
728
+ } : undefined,
729
+ zIndexRange: [6, 6],
723
730
  onOcclude: function onOcclude() {},
724
731
  calculatePosition: function calculatePosition() {
725
732
  return [0, 0];
@@ -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.3",
5
+ "version": "1.27.4-hanged-snapshot",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",