@pyscript/core 0.7.20 → 0.7.21
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/{core-Cz8iaUzQ.js → core-sBnamIWa.js} +3 -3
- package/dist/{core-Cz8iaUzQ.js.map → core-sBnamIWa.js.map} +1 -1
- package/dist/core.js +1 -1
- package/dist/{deprecations-manager-BaAOQ4p4.js → deprecations-manager-DC1RTcPP.js} +2 -2
- package/dist/{deprecations-manager-BaAOQ4p4.js.map → deprecations-manager-DC1RTcPP.js.map} +1 -1
- package/dist/{donkey-CWNMpJZK.js → donkey-YlGMUXVD.js} +2 -2
- package/dist/{donkey-CWNMpJZK.js.map → donkey-YlGMUXVD.js.map} +1 -1
- package/dist/{error-BcolKHui.js → error-BrYdZkC6.js} +2 -2
- package/dist/{error-BcolKHui.js.map → error-BrYdZkC6.js.map} +1 -1
- package/dist/{mpy-BaNgArhS.js → mpy-BjH5wfDe.js} +2 -2
- package/dist/{mpy-BaNgArhS.js.map → mpy-BjH5wfDe.js.map} +1 -1
- package/dist/{py-CEiMF5cB.js → py-B0L6A1Wn.js} +2 -2
- package/dist/{py-CEiMF5cB.js.map → py-B0L6A1Wn.js.map} +1 -1
- package/dist/{py-editor-vNDtOICD.js → py-editor-CWysCTSY.js} +2 -2
- package/dist/{py-editor-vNDtOICD.js.map → py-editor-CWysCTSY.js.map} +1 -1
- package/dist/{py-game-D0htIcjf.js → py-game-DIrEcQ7l.js} +2 -2
- package/dist/{py-game-D0htIcjf.js.map → py-game-DIrEcQ7l.js.map} +1 -1
- package/dist/{py-terminal-D2PoPBeX.js → py-terminal-BVoWSEkj.js} +2 -2
- package/dist/{py-terminal-D2PoPBeX.js.map → py-terminal-BVoWSEkj.js.map} +1 -1
- package/package.json +1 -1
- package/src/plugins/py-editor.js +5 -3
package/src/plugins/py-editor.js
CHANGED
|
@@ -388,8 +388,7 @@ const init = async (script, type, interpreter) => {
|
|
|
388
388
|
};
|
|
389
389
|
|
|
390
390
|
if (isSetup) {
|
|
391
|
-
|
|
392
|
-
notifyEditor();
|
|
391
|
+
context.handleEvent({ currentTarget: null, script }).then(notifyEditor);
|
|
393
392
|
return;
|
|
394
393
|
}
|
|
395
394
|
|
|
@@ -419,7 +418,10 @@ const init = async (script, type, interpreter) => {
|
|
|
419
418
|
// avoid inheriting styles from the outer component
|
|
420
419
|
const styles = [':host { all: initial; }'];
|
|
421
420
|
const rows = script.getAttribute("rows");
|
|
422
|
-
if (rows)
|
|
421
|
+
if (rows) {
|
|
422
|
+
const maxHeight = Math.floor(parseInt(rows) * 18.5) + 'px';
|
|
423
|
+
styles.push(`.cm-editor { height: auto; max-height: ${maxHeight}; }`);
|
|
424
|
+
}
|
|
423
425
|
parent.innerHTML = `<style>${styles.join("\n")}</style>`;
|
|
424
426
|
|
|
425
427
|
target.appendChild(boxDiv);
|