castle-web-cli 0.4.68 → 0.4.69

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.
@@ -8,7 +8,7 @@
8
8
  import React, { useEffect, useRef, useState } from 'react';
9
9
  import { onBeforeRestart, writeFile } from 'castle-web-sdk';
10
10
  import { formatJson, getFileKind, initialFiles, parseJsonFile } from '../engine/files';
11
- import { MainEditor } from '../engine/ui';
11
+ import { MainEditor, styles } from '../engine/ui';
12
12
  import { CodeEditor } from './CodeEditor';
13
13
  import { DrawingEditor } from './DrawingEditor';
14
14
  import { FileTree } from './FileBrowser';
@@ -100,14 +100,7 @@ export function SingleEditor({ path, editor }) {
100
100
  body = <CodeEditor path={path} text={text} onChange={onChange} bare />;
101
101
  }
102
102
  return (
103
- <div
104
- style={{
105
- display: 'grid',
106
- gridTemplateColumns: '1fr',
107
- width: '100vw',
108
- height: '100vh',
109
- background: 'var(--castle-workspace-bg)',
110
- }}>
103
+ <div className={styles.panelBare}>
111
104
  <MainEditor>{body}</MainEditor>
112
105
  </div>
113
106
  );
@@ -935,3 +935,33 @@
935
935
  word-break: break-all;
936
936
  }
937
937
  }
938
+
939
+ /* Bare (panel) editor wrapper: fills the panel iframe; single column. */
940
+ .panelBare {
941
+ display: grid;
942
+ grid-template-columns: 1fr;
943
+ width: 100vw;
944
+ height: 100vh;
945
+ background: var(--castle-workspace-bg);
946
+ }
947
+ /* In a panel the editor toolbar (play / undo / add) must stay visible even
948
+ below 860px -- it normally moves into the mobile header, which bare mode
949
+ removes. Keep it; the inspector still drops below at narrow widths. */
950
+ @media (max-width: 860px) {
951
+ /* restore the 48px tools row the narrow layout drops, show the toolbar, and
952
+ put the stage back in row 2 (the narrow layout moves it up into row 1). */
953
+ .panelBare .sceneWorkspace,
954
+ .panelBare .drawingEditor {
955
+ grid-template-rows: 48px minmax(0, 1fr);
956
+ }
957
+ .panelBare .sceneTools {
958
+ display: grid;
959
+ }
960
+ .panelBare .drawingTools {
961
+ display: flex;
962
+ }
963
+ .panelBare .stageWrap,
964
+ .panelBare .drawingCanvasWrap {
965
+ grid-row: 2;
966
+ }
967
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "castle-web-cli",
3
- "version": "0.4.68",
3
+ "version": "0.4.69",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "castle-web": "./dist/index.js"