@novely/solid-renderer 0.10.3 → 0.10.4

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/dist/index.jsx CHANGED
@@ -2553,16 +2553,22 @@ var Game = (props) => {
2553
2553
  setAuto
2554
2554
  }));
2555
2555
  createRenderEffect((_p$) => {
2556
- const _v$5 = background(), _v$6 = !!props.state.dialog.visible, _v$7 = !props.state.dialog.visible, _v$8 = !(props.state.dialog.character && props.state.dialog.emotion), _v$9 = !props.state.dialog.content, _v$10 = Boolean(props.state.text.content), _v$11 = !props.state.text.content, _v$12 = !!(data.media.hyperWide() && !controlPanelMenuExpanded()), _v$13 = !!(data.media.hyperWide() && controlPanelMenuExpanded());
2556
+ const _v$5 = background(), _v$6 = Object.values(props.state.characters).reduce((acc, char) => {
2557
+ if (char.visible) {
2558
+ return acc + 1;
2559
+ }
2560
+ return acc;
2561
+ }, 0), _v$7 = !!props.state.dialog.visible, _v$8 = !props.state.dialog.visible, _v$9 = !(props.state.dialog.character && props.state.dialog.emotion), _v$10 = !props.state.dialog.content, _v$11 = Boolean(props.state.text.content), _v$12 = !props.state.text.content, _v$13 = !!(data.media.hyperWide() && !controlPanelMenuExpanded()), _v$14 = !!(data.media.hyperWide() && controlPanelMenuExpanded());
2557
2562
  _p$._v$5 = style(_el$, _v$5, _p$._v$5);
2558
- _v$6 !== _p$._v$6 && _el$3.classList.toggle("action-dialog--visible", _p$._v$6 = _v$6);
2559
- _v$7 !== _p$._v$7 && _el$3.classList.toggle("action-dialog--hidden", _p$._v$7 = _v$7);
2560
- _v$8 !== _p$._v$8 && setAttribute(_el$4, "data-no-person", _p$._v$8 = _v$8);
2561
- _v$9 !== _p$._v$9 && setAttribute(_el$4, "aria-disabled", _p$._v$9 = _v$9);
2562
- _v$10 !== _p$._v$10 && setAttribute(_el$27, "data-shown", _p$._v$10 = _v$10);
2563
- _v$11 !== _p$._v$11 && setAttribute(_el$27, "aria-disabled", _p$._v$11 = _v$11);
2564
- _v$12 !== _p$._v$12 && _el$32.classList.toggle("control-panel-container--wide-closed", _p$._v$12 = _v$12);
2565
- _v$13 !== _p$._v$13 && _el$32.classList.toggle("control-panel-container--wide-open", _p$._v$13 = _v$13);
2563
+ _v$6 !== _p$._v$6 && ((_p$._v$6 = _v$6) != null ? _el$2.style.setProperty("--shown-characters-count", _v$6) : _el$2.style.removeProperty("--shown-characters-count"));
2564
+ _v$7 !== _p$._v$7 && _el$3.classList.toggle("action-dialog--visible", _p$._v$7 = _v$7);
2565
+ _v$8 !== _p$._v$8 && _el$3.classList.toggle("action-dialog--hidden", _p$._v$8 = _v$8);
2566
+ _v$9 !== _p$._v$9 && setAttribute(_el$4, "data-no-person", _p$._v$9 = _v$9);
2567
+ _v$10 !== _p$._v$10 && setAttribute(_el$4, "aria-disabled", _p$._v$10 = _v$10);
2568
+ _v$11 !== _p$._v$11 && setAttribute(_el$27, "data-shown", _p$._v$11 = _v$11);
2569
+ _v$12 !== _p$._v$12 && setAttribute(_el$27, "aria-disabled", _p$._v$12 = _v$12);
2570
+ _v$13 !== _p$._v$13 && _el$32.classList.toggle("control-panel-container--wide-closed", _p$._v$13 = _v$13);
2571
+ _v$14 !== _p$._v$14 && _el$32.classList.toggle("control-panel-container--wide-open", _p$._v$14 = _v$14);
2566
2572
  return _p$;
2567
2573
  }, {
2568
2574
  _v$5: void 0,
@@ -2573,7 +2579,8 @@ var Game = (props) => {
2573
2579
  _v$10: void 0,
2574
2580
  _v$11: void 0,
2575
2581
  _v$12: void 0,
2576
- _v$13: void 0
2582
+ _v$13: void 0,
2583
+ _v$14: void 0
2577
2584
  });
2578
2585
  return _el$;
2579
2586
  })();
@@ -71,7 +71,7 @@
71
71
  }
72
72
  .characters > canvas {
73
73
  min-width: unset;
74
- max-width: 50%;
74
+ max-width: calc(100% / max(2, var(--shown-characters-count)));
75
75
  max-height: 85%;
76
76
  position: relative;
77
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novely/solid-renderer",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"