@jxsuite/studio 0.8.0 → 0.10.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/dist/studio.js +156878 -156742
- package/dist/studio.js.map +156 -145
- package/package.json +2 -2
- package/src/canvas/canvas-helpers.js +121 -0
- package/src/canvas/canvas-live-render.js +286 -0
- package/src/canvas/canvas-render.js +429 -0
- package/src/canvas/canvas-utils.js +277 -0
- package/src/editor/component-inline-edit.js +317 -0
- package/src/editor/content-inline-edit.js +213 -0
- package/src/panels/block-action-bar.js +8 -4
- package/src/panels/canvas-dnd.js +154 -0
- package/src/panels/left-panel.js +1 -2
- package/src/panels/overlays.js +9 -23
- package/src/panels/panel-events.js +260 -0
- package/src/panels/preview-render.js +103 -0
- package/src/panels/pseudo-preview.js +57 -0
- package/src/panels/shared.js +1 -1
- package/src/platform.js +9 -6
- package/src/state.js +9 -1
- package/src/store.js +9 -0
- package/src/studio.js +122 -2349
- package/src/utils/edit-display.js +197 -0
- package/src/view.js +0 -2
package/src/state.js
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* mode: string;
|
|
30
30
|
* content: { frontmatter: Record<string, any> };
|
|
31
31
|
* ui: Record<string, any>;
|
|
32
|
+
* canvas: { status: string; scope: any; error: string | null };
|
|
32
33
|
* }} StudioState
|
|
33
34
|
*/
|
|
34
35
|
|
|
@@ -234,6 +235,12 @@ export function createState(doc) {
|
|
|
234
235
|
gitCommitMessage: "", // commit message input
|
|
235
236
|
gitLoading: false, // loading indicator during async ops
|
|
236
237
|
gitError: null, // error message string
|
|
238
|
+
pendingInlineEdit: null, // null | { path, mediaName } — deferred inline edit awaiting canvas readiness
|
|
239
|
+
},
|
|
240
|
+
canvas: {
|
|
241
|
+
status: "idle", // "idle" | "loading" | "ready" | "error"
|
|
242
|
+
scope: null, // $defs scope from runtime buildScope
|
|
243
|
+
error: null, // error message on failure
|
|
237
244
|
},
|
|
238
245
|
};
|
|
239
246
|
}
|
|
@@ -272,6 +279,7 @@ export function fromFlat(S) {
|
|
|
272
279
|
selection,
|
|
273
280
|
hover,
|
|
274
281
|
ui,
|
|
282
|
+
canvas,
|
|
275
283
|
} = S;
|
|
276
284
|
return {
|
|
277
285
|
doc: {
|
|
@@ -286,7 +294,7 @@ export function fromFlat(S) {
|
|
|
286
294
|
history,
|
|
287
295
|
historyIndex,
|
|
288
296
|
},
|
|
289
|
-
session: { selection, hover, ui },
|
|
297
|
+
session: { selection, hover, ui, canvas },
|
|
290
298
|
};
|
|
291
299
|
}
|
|
292
300
|
|
package/src/store.js
CHANGED
|
@@ -324,6 +324,15 @@ export function updateUi(field, value) {
|
|
|
324
324
|
_updateSessionFn({ ui: { [field]: value } });
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Update the canvas async state (status, scope, error).
|
|
329
|
+
*
|
|
330
|
+
* @param {any} patch
|
|
331
|
+
*/
|
|
332
|
+
export function updateCanvas(patch) {
|
|
333
|
+
_updateSessionFn({ canvas: patch });
|
|
334
|
+
}
|
|
335
|
+
|
|
327
336
|
// ─── Subscription system ────────────────────────────────────────────────────
|
|
328
337
|
// Panels subscribe to state changes and decide when to re-render, rather than
|
|
329
338
|
// being called unconditionally from _update/_updateSession.
|