reasonix 0.17.0 → 0.17.1

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/dashboard/app.css CHANGED
@@ -2313,19 +2313,25 @@ textarea:focus {
2313
2313
  }
2314
2314
 
2315
2315
  /* Split view — left half source (CodeMirror), right half preview. */
2316
- .editor-split {
2316
+ .editor-stage {
2317
2317
  flex: 1;
2318
2318
  display: flex;
2319
2319
  min-height: 0;
2320
2320
  overflow: hidden;
2321
2321
  }
2322
- .editor-split-pane {
2322
+ .editor-stage > .editor-host,
2323
+ .editor-stage > .editor-md-preview {
2323
2324
  flex: 1;
2324
2325
  min-width: 0;
2325
- border: none;
2326
- border-radius: 0;
2326
+ min-height: 0;
2327
+ }
2328
+ .editor-stage[data-mode="edit"] > .editor-md-preview {
2329
+ display: none;
2330
+ }
2331
+ .editor-stage[data-mode="preview"] > .editor-host {
2332
+ display: none;
2327
2333
  }
2328
- .editor-split .editor-split-pane + .editor-split-pane {
2334
+ .editor-stage[data-mode="split"] > .editor-host + .editor-md-preview {
2329
2335
  border-left: 1px solid #181a1f;
2330
2336
  }
2331
2337
 
package/dashboard/app.js CHANGED
@@ -3979,7 +3979,13 @@ function EditorPanel({ onClose } = {}) {
3979
3979
  viewRef.current = null;
3980
3980
  }
3981
3981
  };
3982
- }, [cmReady, activeIdx, tabs[activeIdx]?.path, viewMode]);
3982
+ }, [cmReady, activeIdx, tabs[activeIdx]?.path]);
3983
+
3984
+ // Becoming visible after display:none — CM6 measures lazily, force it.
3985
+ useEffect(() => {
3986
+ if (viewMode === "preview") return;
3987
+ viewRef.current?.requestMeasure?.();
3988
+ }, [viewMode]);
3983
3989
 
3984
3990
  const closeTab = useCallback((idx) => {
3985
3991
  const tab = tabsRef.current[idx];
@@ -4220,28 +4226,22 @@ function EditorPanel({ onClose } = {}) {
4220
4226
  ${(() => {
4221
4227
  const isMd = langFromPath(tab.path) === "markdown";
4222
4228
  const mode = isMd ? viewMode : "edit";
4223
- if (mode === "preview") {
4224
- return html`
4225
- <div
4226
- class="editor-host editor-md-preview md"
4227
- dangerouslySetInnerHTML=${{ __html: previewMarked.parse(tab.content ?? "") }}
4228
- ></div>
4229
- `;
4230
- }
4231
- if (mode === "split") {
4232
- return html`
4233
- <div class="editor-split">
4234
- <div ref=${editorContainerRef} class="editor-host editor-split-pane"></div>
4235
- <div
4236
- class="editor-host editor-md-preview md editor-split-pane"
4237
- dangerouslySetInnerHTML=${{
4238
- __html: previewMarked.parse(tab.content ?? ""),
4239
- }}
4240
- ></div>
4241
- </div>
4242
- `;
4243
- }
4244
- return html`<div ref=${editorContainerRef} class="editor-host"></div>`;
4229
+ // Stable DOM across mode toggles CM-managed children + Preact reconciliation don't mix when the host moves.
4230
+ return html`
4231
+ <div class="editor-stage" data-mode=${mode}>
4232
+ <div ref=${editorContainerRef} class="editor-host"></div>
4233
+ ${
4234
+ isMd
4235
+ ? html`<div
4236
+ class="editor-md-preview md"
4237
+ dangerouslySetInnerHTML=${{
4238
+ __html: previewMarked.parse(tab.content ?? ""),
4239
+ }}
4240
+ ></div>`
4241
+ : null
4242
+ }
4243
+ </div>
4244
+ `;
4245
4245
  })()}
4246
4246
  `
4247
4247
  : html`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reasonix",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "DeepSeek-native coding agent: cache-first loop, flash-first cost control, tool-call repair.",
5
5
  "type": "module",
6
6
  "bin": {