@jxsuite/studio 0.9.0 → 0.10.2
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 +117584 -117551
- package/dist/studio.js.map +103 -100
- package/package.json +29 -29
- package/src/browse/browse.js +21 -19
- package/src/canvas/canvas-helpers.js +121 -0
- package/src/canvas/canvas-live-render.js +292 -0
- package/src/canvas/canvas-render.js +431 -0
- package/src/canvas/canvas-utils.js +33 -69
- package/src/editor/component-inline-edit.js +5 -4
- package/src/editor/content-inline-edit.js +11 -18
- package/src/files/files.js +2 -0
- package/src/panels/block-action-bar.js +8 -4
- package/src/panels/canvas-dnd.js +2 -13
- package/src/panels/imports-panel.js +2 -2
- package/src/panels/left-panel.js +1 -2
- package/src/panels/overlays.js +9 -23
- package/src/panels/panel-events.js +10 -13
- package/src/panels/properties-panel.js +3 -3
- package/src/panels/pseudo-preview.js +7 -14
- package/src/panels/shared.js +1 -1
- package/src/panels/stylebook-panel.js +27 -20
- package/src/platform.js +9 -6
- package/src/settings/{collections-editor.js → content-types-editor.js} +48 -48
- package/src/settings/schema-field-ui.js +1 -1
- package/src/state.js +10 -2
- package/src/store.js +9 -0
- package/src/studio.js +67 -811
- package/src/utils/studio-utils.js +5 -5
- package/src/view.js +0 -2
|
@@ -123,17 +123,17 @@ export function inferInputType(entry) {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* Match a document path to a content
|
|
127
|
-
*
|
|
126
|
+
* Match a document path to a content type and return its schema. Uses simple directory-prefix +
|
|
127
|
+
* extension matching against the content type's `source` glob.
|
|
128
128
|
*
|
|
129
129
|
* @param {string | null} documentPath — project-relative path (e.g. "blog/hello.md")
|
|
130
130
|
* @param {any} projectConfig — parsed project.json
|
|
131
131
|
* @returns {{ name: string; schema: any } | null}
|
|
132
132
|
*/
|
|
133
|
-
export function
|
|
134
|
-
if (!documentPath || !projectConfig?.
|
|
133
|
+
export function findContentTypeSchema(documentPath, projectConfig) {
|
|
134
|
+
if (!documentPath || !projectConfig?.contentTypes) return null;
|
|
135
135
|
for (const [name, def] of Object.entries(
|
|
136
|
-
/** @type {Record<string, any>} */ (projectConfig.
|
|
136
|
+
/** @type {Record<string, any>} */ (projectConfig.contentTypes),
|
|
137
137
|
)) {
|
|
138
138
|
if (!def.source || !def.schema) continue;
|
|
139
139
|
const src = def.source.replace(/^\.\//, "");
|
package/src/view.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
export const view = {
|
|
11
11
|
// Canvas infrastructure
|
|
12
12
|
panzoomWrap: null,
|
|
13
|
-
liveScope: null,
|
|
14
13
|
renderGeneration: 0,
|
|
15
14
|
centerObserver: null,
|
|
16
15
|
needsCenter: true,
|
|
@@ -24,7 +23,6 @@ export const view = {
|
|
|
24
23
|
|
|
25
24
|
// Inline editing
|
|
26
25
|
componentInlineEdit: null,
|
|
27
|
-
pendingInlineEdit: null,
|
|
28
26
|
inlineEditCleanup: null,
|
|
29
27
|
|
|
30
28
|
// Floating UI containers
|