@jxsuite/studio 1.4.0 → 1.5.0
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/canvas.html +51 -0
- package/dist/iframe-entry.js +4 -1
- package/dist/iframe-entry.js.map +3 -3
- package/dist/studio.js +115 -25
- package/dist/studio.js.map +9 -9
- package/fonts/OFL.txt +93 -0
- package/fonts/jetbrains-mono-400.woff2 +0 -0
- package/fonts/jetbrains-mono-500.woff2 +0 -0
- package/fonts/jetbrains-mono-700.woff2 +0 -0
- package/index.html +4631 -0
- package/package.json +13 -10
- package/src/editor/convert-to-component.ts +1 -1
- package/src/editor/convert-to-repeater.ts +1 -1
- package/src/new-project/add-repo-modal.ts +75 -14
- package/src/new-project/new-project-modal.ts +45 -18
- package/src/panels/welcome-screen.ts +15 -1
- package/src/platforms/cloud.ts +5 -3
- package/src/studio.ts +20 -3
- package/src/types.ts +8 -0
package/canvas.html
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Jx Canvas</title>
|
|
7
|
+
<style>
|
|
8
|
+
html,
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
height: 100%;
|
|
12
|
+
/* The iframe is sized to its content and NEVER scrolls internally (the parent canvas pans
|
|
13
|
+
instead, and the parent overlay can't track an internal scroll). Clip here to enforce that:
|
|
14
|
+
when the content is shorter than the fixed 800px query viewport below, the viewport's empty
|
|
15
|
+
excess would otherwise become a scrollbar exposing the white iframe background. */
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
/* Fixed-size query container. The runtime transposes the document's viewport units (vh/vw/…) to
|
|
19
|
+
container units (cqh/cqw/…) in the studio canvas (see runtime `transposeCanvasUnits`), so they
|
|
20
|
+
resolve against THIS predictable design-viewport box instead of the iframe element. That
|
|
21
|
+
decouples them from the iframe's height, so the host can size the iframe to its content height
|
|
22
|
+
(no internal scroll → the parent overlay stays glued) without a `100vh` section feeding back
|
|
23
|
+
into an ever-growing height. `#jx-canvas-root` overflows this box freely (no paint/overflow
|
|
24
|
+
containment) and is what the host measures. */
|
|
25
|
+
#jx-canvas-viewport {
|
|
26
|
+
container-type: size;
|
|
27
|
+
container-name: jx-canvas;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: var(--jx-design-viewport-height, 800px);
|
|
30
|
+
}
|
|
31
|
+
#jx-canvas-root {
|
|
32
|
+
min-height: 100%;
|
|
33
|
+
}
|
|
34
|
+
/* A page's root should fill the design viewport (short pages still look like real pages —
|
|
35
|
+
footer at the bottom, full-height heroes). A component DEFINITION is a fragment, not a page:
|
|
36
|
+
flooring it to the viewport leaves dead space below a short component. When the render stamps
|
|
37
|
+
the root as a definition (see makeStamper's `data-jx-definition-root`), drop the floor so the
|
|
38
|
+
host sizes the iframe to the component's own content. */
|
|
39
|
+
#jx-canvas-root:has(> [data-jx-definition-root]) {
|
|
40
|
+
min-height: 0;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
43
|
+
</head>
|
|
44
|
+
<body>
|
|
45
|
+
<div id="jx-canvas-viewport"><div id="jx-canvas-root"></div></div>
|
|
46
|
+
<!-- Dev: cache-bust so each iframe mount loads the freshest canvas bundle. -->
|
|
47
|
+
<script type="module">
|
|
48
|
+
import(`./dist/iframe-entry.js?t=${Date.now()}`);
|
|
49
|
+
</script>
|
|
50
|
+
</body>
|
|
51
|
+
</html>
|
package/dist/iframe-entry.js
CHANGED
|
@@ -2435,6 +2435,9 @@ function renderNode(def2, state, options) {
|
|
|
2435
2435
|
return renderCustomElementWithProps(def2, localState, options, path);
|
|
2436
2436
|
}
|
|
2437
2437
|
if (def2.$props) {
|
|
2438
|
+
if (tagName.includes("-")) {
|
|
2439
|
+
return renderCustomElementWithProps(def2, localState, options, path);
|
|
2440
|
+
}
|
|
2438
2441
|
const { $props: _$props, ...rest } = def2;
|
|
2439
2442
|
return renderNode(rest, mergeProps(def2, localState), options);
|
|
2440
2443
|
}
|
|
@@ -6949,5 +6952,5 @@ export {
|
|
|
6949
6952
|
bootCanvasIframe
|
|
6950
6953
|
};
|
|
6951
6954
|
|
|
6952
|
-
//# debugId=
|
|
6955
|
+
//# debugId=81835478E00D339C64756E2164756E21
|
|
6953
6956
|
//# sourceMappingURL=iframe-entry.js.map
|