@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 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>
@@ -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=EF2E01BCBF5955F664756E2164756E21
6955
+ //# debugId=81835478E00D339C64756E2164756E21
6953
6956
  //# sourceMappingURL=iframe-entry.js.map