@proulr/sdui-components 0.1.91 → 0.1.92

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proulr/sdui-components",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "type": "module",
5
5
  "main": "./src/renderer/index.ts",
6
6
  "types": "./src/renderer/index.ts",
@@ -8,6 +8,8 @@ import { SduiLayoutDebugFrame } from './sdui-layout-debug';
8
8
  type Props = {
9
9
  screen: SduiScreen;
10
10
  onAction: (actionId: string, vars?: Record<string, string>) => void;
11
+ /** Host já decidiu a coluna (ou a dispensou: tela self-managed / rail) — sem teto aqui. */
12
+ fillWidth?: boolean;
11
13
  };
12
14
 
13
15
  /** Blocos overlay (FAB etc.) — não competem por flex com o Scroll. */
@@ -38,9 +40,16 @@ const SduiScreenBlock = memo(function SduiScreenBlock({ block, data, onAction }:
38
40
  );
39
41
  });
40
42
 
41
- export const SduiScreenRenderer = memo(function SduiScreenRenderer({ screen, onAction }: Props) {
43
+ export const SduiScreenRenderer = memo(function SduiScreenRenderer({
44
+ screen,
45
+ onAction,
46
+ fillWidth = false,
47
+ }: Props) {
42
48
  return (
43
- <SduiLayoutDebugFrame layer="renderer" style={styles.screen}>
49
+ <SduiLayoutDebugFrame
50
+ layer="renderer"
51
+ style={[styles.screen, fillWidth ? styles.screenFillWidth : null]}
52
+ >
44
53
  {screen.blocks.map((block) => (
45
54
  <SduiScreenBlock key={block.id} block={block} data={screen.data} onAction={onAction} />
46
55
  ))}
@@ -62,6 +71,10 @@ const styles = StyleSheet.create({
62
71
  alignSelf: 'center',
63
72
  backgroundColor: colors.bg,
64
73
  },
74
+ screenFillWidth: {
75
+ maxWidth: '100%',
76
+ alignSelf: 'stretch',
77
+ },
65
78
  block: { flex: 1, minHeight: 0 },
66
79
  overlayBlock: {
67
80
  ...StyleSheet.absoluteFill,