@seedgrid/fe-components 2026.3.31-1 → 2026.3.31-3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SgScreen.d.ts","sourceRoot":"","sources":["../../src/layout/SgScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CA8EtD;yBA9Ee,QAAQ"}
1
+ {"version":3,"file":"SgScreen.d.ts","sourceRoot":"","sources":["../../src/layout/SgScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,2CA0CtD;yBA1Ce,QAAQ"}
@@ -1,46 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
3
  import { cn, renderDockContent, toCssSpace } from "./sgDocking";
5
4
  export function SgScreen(props) {
6
5
  const { fullscreen = true, width, height, padding, className, style, children, ...rest } = props;
7
- const ref = React.useRef(null);
8
- const [measuredSize, setMeasuredSize] = React.useState({});
9
- React.useLayoutEffect(() => {
10
- if (!fullscreen) {
11
- setMeasuredSize({});
12
- return;
13
- }
14
- const element = ref.current;
15
- const parent = element?.parentElement;
16
- if (!element || !parent)
17
- return;
18
- const update = () => {
19
- setMeasuredSize({
20
- width: parent.clientWidth || undefined,
21
- height: parent.clientHeight || undefined
22
- });
23
- };
24
- update();
25
- const observer = new ResizeObserver(update);
26
- observer.observe(parent);
27
- window.addEventListener("resize", update);
28
- return () => {
29
- observer.disconnect();
30
- window.removeEventListener("resize", update);
31
- };
32
- }, [fullscreen]);
33
- return (_jsx("div", { ref: ref, className: cn("relative box-border flex flex-1 self-stretch min-h-0 min-w-0 max-h-full max-w-full overflow-hidden", className), style: {
6
+ return (_jsx("div", { className: cn("relative box-border flex flex-1 self-stretch min-h-0 min-w-0 max-h-full max-w-full overflow-hidden", className), style: {
34
7
  ...style,
35
8
  ...(width !== undefined
36
9
  ? { width: toCssSpace(width) }
37
- : fullscreen && measuredSize.width !== undefined
38
- ? { width: `${measuredSize.width}px` }
10
+ : fullscreen
11
+ ? { width: "100%" }
39
12
  : null),
40
13
  ...(height !== undefined
41
14
  ? { height: toCssSpace(height) }
42
- : fullscreen && measuredSize.height !== undefined
43
- ? { height: `${measuredSize.height}px` }
15
+ : fullscreen
16
+ ? { height: "100dvh" }
44
17
  : null),
45
18
  padding: toCssSpace(padding)
46
19
  }, ...rest, children: _jsx("div", { className: "flex flex-1 min-h-0 min-w-0 flex-col", children: renderDockContent({
@@ -71,7 +71,7 @@ function renderDockItem(item, index, axis) {
71
71
  ...(item.minHeightPx !== undefined ? { minHeight: `${item.minHeightPx}px` } : null),
72
72
  ...(heightCss !== undefined
73
73
  ? { height: heightCss, flex: `0 0 ${heightCss}` }
74
- : { height: "100%", flex: "1 1 0%" })
74
+ : { height: "auto", flex: "0 0 auto" })
75
75
  }, "w-full min-w-0");
76
76
  }
77
77
  if (axis === "left" || axis === "right") {
@@ -83,7 +83,7 @@ function renderDockItem(item, index, axis) {
83
83
  ...(item.minWidthPx !== undefined ? { minWidth: `${item.minWidthPx}px` } : null),
84
84
  ...(widthCss !== undefined
85
85
  ? { width: widthCss, flex: `0 0 ${widthCss}` }
86
- : { width: "100%", flex: "1 1 0%" })
86
+ : { width: "auto", flex: "0 0 auto" })
87
87
  }, "h-full min-h-0 min-w-0");
88
88
  }
89
89
  return cloneWithLayout(item.node, item.key ?? `client-${index}`, {