@xaui/native 0.9.1-alpha.19 → 0.9.1-alpha.20

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.
@@ -0,0 +1,143 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
5
+
6
+ // src/components/view/grid.tsx
7
+ var _react = require('react');
8
+ var _reactnative = require('react-native');
9
+
10
+ // src/components/view/grid.context.ts
11
+
12
+ var GridContext = _react.createContext.call(void 0, null);
13
+ var GridProvider = GridContext.Provider;
14
+ function useGrid() {
15
+ const value = _react.useContext.call(void 0, GridContext);
16
+ if (value === null) {
17
+ throw new Error(
18
+ "XAUI: Grid.Item must be rendered inside a Grid \u2014 it spans that grid\u2019s columns, and outside one there is nothing to span."
19
+ );
20
+ }
21
+ return value;
22
+ }
23
+ function spanWidth({ cellWidth, columns, gap }, span) {
24
+ const clamped = Math.min(Math.max(Math.floor(span), 1), columns);
25
+ if (cellWidth === void 0) return `${100 / columns * clamped}%`;
26
+ return cellWidth * clamped + gap * (clamped - 1);
27
+ }
28
+
29
+ // src/components/view/grid.tsx
30
+ var _jsxruntime = require('react/jsx-runtime');
31
+ var GridRoot = _react.forwardRef.call(void 0, function Grid({ children, columns = 2, gap = 0, style, onLayout, ...props }, ref) {
32
+ const [width, setWidth] = _react.useState.call(void 0, );
33
+ const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
34
+ const safeColumns = Math.max(Math.floor(columns), 1);
35
+ const cellWidth = width === void 0 ? void 0 : (width - gap * (safeColumns - 1)) / safeColumns;
36
+ const context = _react.useMemo.call(void 0,
37
+ () => ({ cellWidth, columns: safeColumns, gap }),
38
+ [cellWidth, safeColumns, gap]
39
+ );
40
+ const handleLayout = (event) => {
41
+ const next = event.nativeEvent.layout.width;
42
+ if (next > 0 && next !== width) setWidth(next);
43
+ _optionalChain([onLayout, 'optionalCall', _ => _(event)]);
44
+ };
45
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GridProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
46
+ _reactnative.View,
47
+ {
48
+ ref,
49
+ onLayout: handleLayout,
50
+ style: [
51
+ { flexDirection: "row", flexWrap: "wrap", rowGap: gap, columnGap: gap },
52
+ styleProps,
53
+ style
54
+ ],
55
+ ...rest,
56
+ children: _react.Children.map(
57
+ children,
58
+ (child) => isGridItem(child) ? child : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { width: spanWidth(context, 1) }, children: child })
59
+ )
60
+ }
61
+ ) });
62
+ });
63
+ GridRoot.displayName = "XAUI.Grid";
64
+ function isGridItem(child) {
65
+ if (child === null || typeof child !== "object") return false;
66
+ const type = child.type;
67
+ return _optionalChain([type, 'optionalAccess', _2 => _2.displayName]) === "XAUI.Grid.Item";
68
+ }
69
+
70
+ // src/components/view/grid-item.tsx
71
+
72
+
73
+
74
+ var GridItem = _react.forwardRef.call(void 0, function GridItem2({ children, span = 1, style, ...props }, ref) {
75
+ const grid = useGrid();
76
+ const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
77
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
78
+ _reactnative.View,
79
+ {
80
+ ref,
81
+ style: [{ width: spanWidth(grid, span) }, styleProps, style],
82
+ ...rest,
83
+ children
84
+ }
85
+ );
86
+ });
87
+ GridItem.displayName = "XAUI.Grid.Item";
88
+
89
+ // src/components/view/stack.tsx
90
+
91
+
92
+
93
+ var StackRoot = _react.forwardRef.call(void 0, function Stack({ children, asChild = false, style, ...props }, ref) {
94
+ const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
95
+ const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
96
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ position: "relative" }, styleProps, style], ...rest, children });
97
+ });
98
+ StackRoot.displayName = "XAUI.Stack";
99
+
100
+ // src/components/view/stack-item.tsx
101
+
102
+
103
+
104
+ var StackItem = _react.forwardRef.call(void 0, function StackItem2({ children, asChild = false, style, ...props }, ref) {
105
+ const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
106
+ const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
107
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ position: "absolute" }, styleProps, style], ...rest, children });
108
+ });
109
+ StackItem.displayName = "XAUI.Stack.Item";
110
+
111
+ // src/components/view/row.tsx
112
+
113
+
114
+
115
+ var Row = _react.forwardRef.call(void 0, function Row2({ children, asChild = false, style, ...props }, ref) {
116
+ const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
117
+ const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
118
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "row" }, styleProps, style], ...rest, children });
119
+ });
120
+ Row.displayName = "XAUI.Row";
121
+
122
+ // src/components/view/column.tsx
123
+
124
+
125
+
126
+ var Column = _react.forwardRef.call(void 0, function Column2({ children, asChild = false, style, ...props }, ref) {
127
+ const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
128
+ const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
129
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "column" }, styleProps, style], ...rest, children });
130
+ });
131
+ Column.displayName = "XAUI.Column";
132
+
133
+ // src/components/view/index.ts
134
+ var Stack2 = Object.assign(StackRoot, { Item: StackItem });
135
+ var Grid2 = Object.assign(GridRoot, { Item: GridItem });
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ exports.useGrid = useGrid; exports.Row = Row; exports.Column = Column; exports.Stack = Stack2; exports.Grid = Grid2;
@@ -0,0 +1,143 @@
1
+ import {
2
+ Slot,
3
+ useStyleProps
4
+ } from "./chunk-EXX6ATAS.js";
5
+
6
+ // src/components/view/grid.tsx
7
+ import { Children, forwardRef, useMemo, useState } from "react";
8
+ import { View } from "react-native";
9
+
10
+ // src/components/view/grid.context.ts
11
+ import { createContext, useContext } from "react";
12
+ var GridContext = createContext(null);
13
+ var GridProvider = GridContext.Provider;
14
+ function useGrid() {
15
+ const value = useContext(GridContext);
16
+ if (value === null) {
17
+ throw new Error(
18
+ "XAUI: Grid.Item must be rendered inside a Grid \u2014 it spans that grid\u2019s columns, and outside one there is nothing to span."
19
+ );
20
+ }
21
+ return value;
22
+ }
23
+ function spanWidth({ cellWidth, columns, gap }, span) {
24
+ const clamped = Math.min(Math.max(Math.floor(span), 1), columns);
25
+ if (cellWidth === void 0) return `${100 / columns * clamped}%`;
26
+ return cellWidth * clamped + gap * (clamped - 1);
27
+ }
28
+
29
+ // src/components/view/grid.tsx
30
+ import { jsx } from "react/jsx-runtime";
31
+ var GridRoot = forwardRef(function Grid({ children, columns = 2, gap = 0, style, onLayout, ...props }, ref) {
32
+ const [width, setWidth] = useState();
33
+ const [styleProps, rest] = useStyleProps(props);
34
+ const safeColumns = Math.max(Math.floor(columns), 1);
35
+ const cellWidth = width === void 0 ? void 0 : (width - gap * (safeColumns - 1)) / safeColumns;
36
+ const context = useMemo(
37
+ () => ({ cellWidth, columns: safeColumns, gap }),
38
+ [cellWidth, safeColumns, gap]
39
+ );
40
+ const handleLayout = (event) => {
41
+ const next = event.nativeEvent.layout.width;
42
+ if (next > 0 && next !== width) setWidth(next);
43
+ onLayout?.(event);
44
+ };
45
+ return /* @__PURE__ */ jsx(GridProvider, { value: context, children: /* @__PURE__ */ jsx(
46
+ View,
47
+ {
48
+ ref,
49
+ onLayout: handleLayout,
50
+ style: [
51
+ { flexDirection: "row", flexWrap: "wrap", rowGap: gap, columnGap: gap },
52
+ styleProps,
53
+ style
54
+ ],
55
+ ...rest,
56
+ children: Children.map(
57
+ children,
58
+ (child) => isGridItem(child) ? child : /* @__PURE__ */ jsx(View, { style: { width: spanWidth(context, 1) }, children: child })
59
+ )
60
+ }
61
+ ) });
62
+ });
63
+ GridRoot.displayName = "XAUI.Grid";
64
+ function isGridItem(child) {
65
+ if (child === null || typeof child !== "object") return false;
66
+ const type = child.type;
67
+ return type?.displayName === "XAUI.Grid.Item";
68
+ }
69
+
70
+ // src/components/view/grid-item.tsx
71
+ import { forwardRef as forwardRef2 } from "react";
72
+ import { View as View2 } from "react-native";
73
+ import { jsx as jsx2 } from "react/jsx-runtime";
74
+ var GridItem = forwardRef2(function GridItem2({ children, span = 1, style, ...props }, ref) {
75
+ const grid = useGrid();
76
+ const [styleProps, rest] = useStyleProps(props);
77
+ return /* @__PURE__ */ jsx2(
78
+ View2,
79
+ {
80
+ ref,
81
+ style: [{ width: spanWidth(grid, span) }, styleProps, style],
82
+ ...rest,
83
+ children
84
+ }
85
+ );
86
+ });
87
+ GridItem.displayName = "XAUI.Grid.Item";
88
+
89
+ // src/components/view/stack.tsx
90
+ import { forwardRef as forwardRef3 } from "react";
91
+ import { View as View3 } from "react-native";
92
+ import { jsx as jsx3 } from "react/jsx-runtime";
93
+ var StackRoot = forwardRef3(function Stack({ children, asChild = false, style, ...props }, ref) {
94
+ const [styleProps, rest] = useStyleProps(props);
95
+ const Root = asChild ? Slot : View3;
96
+ return /* @__PURE__ */ jsx3(Root, { ref, style: [{ position: "relative" }, styleProps, style], ...rest, children });
97
+ });
98
+ StackRoot.displayName = "XAUI.Stack";
99
+
100
+ // src/components/view/stack-item.tsx
101
+ import { forwardRef as forwardRef4 } from "react";
102
+ import { View as View4 } from "react-native";
103
+ import { jsx as jsx4 } from "react/jsx-runtime";
104
+ var StackItem = forwardRef4(function StackItem2({ children, asChild = false, style, ...props }, ref) {
105
+ const [styleProps, rest] = useStyleProps(props);
106
+ const Root = asChild ? Slot : View4;
107
+ return /* @__PURE__ */ jsx4(Root, { ref, style: [{ position: "absolute" }, styleProps, style], ...rest, children });
108
+ });
109
+ StackItem.displayName = "XAUI.Stack.Item";
110
+
111
+ // src/components/view/row.tsx
112
+ import { forwardRef as forwardRef5 } from "react";
113
+ import { View as View5 } from "react-native";
114
+ import { jsx as jsx5 } from "react/jsx-runtime";
115
+ var Row = forwardRef5(function Row2({ children, asChild = false, style, ...props }, ref) {
116
+ const [styleProps, rest] = useStyleProps(props);
117
+ const Root = asChild ? Slot : View5;
118
+ return /* @__PURE__ */ jsx5(Root, { ref, style: [{ flexDirection: "row" }, styleProps, style], ...rest, children });
119
+ });
120
+ Row.displayName = "XAUI.Row";
121
+
122
+ // src/components/view/column.tsx
123
+ import { forwardRef as forwardRef6 } from "react";
124
+ import { View as View6 } from "react-native";
125
+ import { jsx as jsx6 } from "react/jsx-runtime";
126
+ var Column = forwardRef6(function Column2({ children, asChild = false, style, ...props }, ref) {
127
+ const [styleProps, rest] = useStyleProps(props);
128
+ const Root = asChild ? Slot : View6;
129
+ return /* @__PURE__ */ jsx6(Root, { ref, style: [{ flexDirection: "column" }, styleProps, style], ...rest, children });
130
+ });
131
+ Column.displayName = "XAUI.Column";
132
+
133
+ // src/components/view/index.ts
134
+ var Stack2 = Object.assign(StackRoot, { Item: StackItem });
135
+ var Grid2 = Object.assign(GridRoot, { Item: GridItem });
136
+
137
+ export {
138
+ useGrid,
139
+ Row,
140
+ Column,
141
+ Stack2 as Stack,
142
+ Grid2 as Grid
143
+ };
@@ -1,10 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkBFB6K4M7cjs = require('../../chunk-BFB6K4M7.cjs');
4
+
5
+
6
+
7
+ var _chunk33QILJJHcjs = require('../../chunk-33QILJJH.cjs');
5
8
  require('../../chunk-EVXZGNPA.cjs');
6
9
  require('../../chunk-MC7SY2QH.cjs');
7
10
 
8
11
 
9
12
 
10
- exports.Column = _chunkBFB6K4M7cjs.Column; exports.Row = _chunkBFB6K4M7cjs.Row;
13
+
14
+
15
+
16
+ exports.Column = _chunk33QILJJHcjs.Column; exports.Grid = _chunk33QILJJHcjs.Grid; exports.Row = _chunk33QILJJHcjs.Row; exports.Stack = _chunk33QILJJHcjs.Stack; exports.useGrid = _chunk33QILJJHcjs.useGrid;
@@ -53,6 +53,23 @@ declare const Column: react.ForwardRefExoticComponent<Omit<react_native.ViewProp
53
53
  children?: react.ReactNode;
54
54
  } & Omit<ViewStyleProps, "flexDirection" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "asChild"> & react.RefAttributes<View>>;
55
55
 
56
+ type GridContextValue = {
57
+ /**
58
+ * The width of one column in points, or `undefined` on the very first render — the grid
59
+ * has not been measured yet. A cell falls back to a percentage for that one frame.
60
+ */
61
+ cellWidth: number | undefined;
62
+ columns: number;
63
+ gap: number;
64
+ };
65
+ /**
66
+ * R10 — the resolved geometry a cell needs, published by the root that measured it.
67
+ *
68
+ * Strict, and named: a `Grid.Item` outside a `Grid` has no column width to span, and
69
+ * failing with the component's name beats rendering a cell of arbitrary size.
70
+ */
71
+ declare function useGrid(): GridContextValue;
72
+
56
73
  type AxisOwnProps = {
57
74
  /** R12 — the child element becomes the axis, keeping its direction. */
58
75
  asChild?: boolean;
@@ -73,5 +90,63 @@ type AxisOwnProps = {
73
90
  type AxisProps = Omit<ViewProps, 'style'> & AxisOwnProps & Omit<ViewStyleProps, keyof AxisOwnProps | keyof ViewProps | 'flexDirection'>;
74
91
  type RowProps = AxisProps;
75
92
  type ColumnProps = AxisProps;
93
+ /**
94
+ * `Stack` and `Stack.Item` take the full R14 set: unlike the axes, neither claims a style
95
+ * key as its identity. `position` is set by each of them and remains overridable, because
96
+ * a layer that has to be `relative` for one screen should not need a different component.
97
+ */
98
+ type StackProps = Omit<ViewProps, 'style'> & AxisOwnProps & Omit<ViewStyleProps, keyof AxisOwnProps | keyof ViewProps>;
99
+ type StackItemProps = StackProps;
100
+ type GridOwnProps = {
101
+ /** How many columns. Floored, and never below one. @default 2 */
102
+ columns?: number;
103
+ /**
104
+ * The space between cells, in points — React Native's `gap`, taken as a prop because the
105
+ * root has to read it to size the columns. @default 0
106
+ */
107
+ gap?: number;
108
+ style?: StyleProp<ViewStyle>;
109
+ children?: ReactNode;
110
+ };
111
+ /**
112
+ * No `asChild`: the root measures itself through `onLayout` and publishes the result, so
113
+ * it has to be the node it renders. `flexDirection`, `flexWrap` and the three gap keys are
114
+ * withheld for the same reason — they are the grid's mechanism, not its decoration.
115
+ */
116
+ type GridProps = Omit<ViewProps, 'style'> & GridOwnProps & Omit<ViewStyleProps, keyof GridOwnProps | keyof ViewProps | 'flexDirection' | 'flexWrap' | 'columnGap' | 'rowGap'>;
117
+ type GridItemOwnProps = {
118
+ /** How many columns the cell covers. Clamped to the grid's count. @default 1 */
119
+ span?: number;
120
+ style?: StyleProp<ViewStyle>;
121
+ children?: ReactNode;
122
+ };
123
+ /** `width` is the grid's answer, so it is not a prop here. */
124
+ type GridItemProps = Omit<ViewProps, 'style'> & GridItemOwnProps & Omit<ViewStyleProps, keyof GridItemOwnProps | keyof ViewProps | 'width'>;
125
+
126
+ /** Overlaying is composed: the root is the containing block, `Item` is a layer in it. */
127
+ declare const Stack: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
128
+ asChild?: boolean;
129
+ style?: react_native.StyleProp<react_native.ViewStyle>;
130
+ children?: react.ReactNode;
131
+ } & Omit<ViewStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "asChild"> & react.RefAttributes<react_native.View>> & {
132
+ Item: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
133
+ asChild?: boolean;
134
+ style?: react_native.StyleProp<react_native.ViewStyle>;
135
+ children?: react.ReactNode;
136
+ } & Omit<ViewStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "asChild"> & react.RefAttributes<react_native.View>>;
137
+ };
138
+ /** Every child is a cell; `Item` is the one that spans more than a column. */
139
+ declare const Grid: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
140
+ columns?: number;
141
+ gap?: number;
142
+ style?: react_native.StyleProp<react_native.ViewStyle>;
143
+ children?: react.ReactNode;
144
+ } & Omit<ViewStyleProps, "columnGap" | "flexDirection" | "flexWrap" | "gap" | "rowGap" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "columns"> & react.RefAttributes<react_native.View>> & {
145
+ Item: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
146
+ span?: number;
147
+ style?: react_native.StyleProp<react_native.ViewStyle>;
148
+ children?: react.ReactNode;
149
+ } & Omit<ViewStyleProps, "width" | "pointerEvents" | "span" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture"> & react.RefAttributes<react_native.View>>;
150
+ };
76
151
 
77
- export { type AxisProps, Column, type ColumnProps, Row, type RowProps };
152
+ export { type AxisProps, Column, type ColumnProps, Grid, type GridContextValue, type GridItemProps, type GridProps, Row, type RowProps, Stack, type StackItemProps, type StackProps, useGrid };
@@ -53,6 +53,23 @@ declare const Column: react.ForwardRefExoticComponent<Omit<react_native.ViewProp
53
53
  children?: react.ReactNode;
54
54
  } & Omit<ViewStyleProps, "flexDirection" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "asChild"> & react.RefAttributes<View>>;
55
55
 
56
+ type GridContextValue = {
57
+ /**
58
+ * The width of one column in points, or `undefined` on the very first render — the grid
59
+ * has not been measured yet. A cell falls back to a percentage for that one frame.
60
+ */
61
+ cellWidth: number | undefined;
62
+ columns: number;
63
+ gap: number;
64
+ };
65
+ /**
66
+ * R10 — the resolved geometry a cell needs, published by the root that measured it.
67
+ *
68
+ * Strict, and named: a `Grid.Item` outside a `Grid` has no column width to span, and
69
+ * failing with the component's name beats rendering a cell of arbitrary size.
70
+ */
71
+ declare function useGrid(): GridContextValue;
72
+
56
73
  type AxisOwnProps = {
57
74
  /** R12 — the child element becomes the axis, keeping its direction. */
58
75
  asChild?: boolean;
@@ -73,5 +90,63 @@ type AxisOwnProps = {
73
90
  type AxisProps = Omit<ViewProps, 'style'> & AxisOwnProps & Omit<ViewStyleProps, keyof AxisOwnProps | keyof ViewProps | 'flexDirection'>;
74
91
  type RowProps = AxisProps;
75
92
  type ColumnProps = AxisProps;
93
+ /**
94
+ * `Stack` and `Stack.Item` take the full R14 set: unlike the axes, neither claims a style
95
+ * key as its identity. `position` is set by each of them and remains overridable, because
96
+ * a layer that has to be `relative` for one screen should not need a different component.
97
+ */
98
+ type StackProps = Omit<ViewProps, 'style'> & AxisOwnProps & Omit<ViewStyleProps, keyof AxisOwnProps | keyof ViewProps>;
99
+ type StackItemProps = StackProps;
100
+ type GridOwnProps = {
101
+ /** How many columns. Floored, and never below one. @default 2 */
102
+ columns?: number;
103
+ /**
104
+ * The space between cells, in points — React Native's `gap`, taken as a prop because the
105
+ * root has to read it to size the columns. @default 0
106
+ */
107
+ gap?: number;
108
+ style?: StyleProp<ViewStyle>;
109
+ children?: ReactNode;
110
+ };
111
+ /**
112
+ * No `asChild`: the root measures itself through `onLayout` and publishes the result, so
113
+ * it has to be the node it renders. `flexDirection`, `flexWrap` and the three gap keys are
114
+ * withheld for the same reason — they are the grid's mechanism, not its decoration.
115
+ */
116
+ type GridProps = Omit<ViewProps, 'style'> & GridOwnProps & Omit<ViewStyleProps, keyof GridOwnProps | keyof ViewProps | 'flexDirection' | 'flexWrap' | 'columnGap' | 'rowGap'>;
117
+ type GridItemOwnProps = {
118
+ /** How many columns the cell covers. Clamped to the grid's count. @default 1 */
119
+ span?: number;
120
+ style?: StyleProp<ViewStyle>;
121
+ children?: ReactNode;
122
+ };
123
+ /** `width` is the grid's answer, so it is not a prop here. */
124
+ type GridItemProps = Omit<ViewProps, 'style'> & GridItemOwnProps & Omit<ViewStyleProps, keyof GridItemOwnProps | keyof ViewProps | 'width'>;
125
+
126
+ /** Overlaying is composed: the root is the containing block, `Item` is a layer in it. */
127
+ declare const Stack: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
128
+ asChild?: boolean;
129
+ style?: react_native.StyleProp<react_native.ViewStyle>;
130
+ children?: react.ReactNode;
131
+ } & Omit<ViewStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "asChild"> & react.RefAttributes<react_native.View>> & {
132
+ Item: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
133
+ asChild?: boolean;
134
+ style?: react_native.StyleProp<react_native.ViewStyle>;
135
+ children?: react.ReactNode;
136
+ } & Omit<ViewStyleProps, "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "asChild"> & react.RefAttributes<react_native.View>>;
137
+ };
138
+ /** Every child is a cell; `Item` is the one that spans more than a column. */
139
+ declare const Grid: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
140
+ columns?: number;
141
+ gap?: number;
142
+ style?: react_native.StyleProp<react_native.ViewStyle>;
143
+ children?: react.ReactNode;
144
+ } & Omit<ViewStyleProps, "columnGap" | "flexDirection" | "flexWrap" | "gap" | "rowGap" | "pointerEvents" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "columns"> & react.RefAttributes<react_native.View>> & {
145
+ Item: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
146
+ span?: number;
147
+ style?: react_native.StyleProp<react_native.ViewStyle>;
148
+ children?: react.ReactNode;
149
+ } & Omit<ViewStyleProps, "width" | "pointerEvents" | "span" | "style" | "children" | "id" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "hitSlop" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture"> & react.RefAttributes<react_native.View>>;
150
+ };
76
151
 
77
- export { type AxisProps, Column, type ColumnProps, Row, type RowProps };
152
+ export { type AxisProps, Column, type ColumnProps, Grid, type GridContextValue, type GridItemProps, type GridProps, Row, type RowProps, Stack, type StackItemProps, type StackProps, useGrid };
@@ -1,10 +1,16 @@
1
1
  import {
2
2
  Column,
3
- Row
4
- } from "../../chunk-MAYVGK6W.js";
3
+ Grid,
4
+ Row,
5
+ Stack,
6
+ useGrid
7
+ } from "../../chunk-JXLRHKCQ.js";
5
8
  import "../../chunk-EXX6ATAS.js";
6
9
  import "../../chunk-GGW42MY4.js";
7
10
  export {
8
11
  Column,
9
- Row
12
+ Grid,
13
+ Row,
14
+ Stack,
15
+ useGrid
10
16
  };
package/dist/index.cjs CHANGED
@@ -13,7 +13,10 @@ var _chunkUBA6AEY6cjs = require('./chunk-UBA6AEY6.cjs');
13
13
 
14
14
 
15
15
 
16
- var _chunkBFB6K4M7cjs = require('./chunk-BFB6K4M7.cjs');
16
+
17
+
18
+
19
+ var _chunk33QILJJHcjs = require('./chunk-33QILJJH.cjs');
17
20
 
18
21
 
19
22
 
@@ -187,4 +190,7 @@ function usePrevious(value) {
187
190
 
188
191
 
189
192
 
190
- exports.Button = _chunk6ARON3XTcjs.Button; exports.Column = _chunkBFB6K4M7cjs.Column; exports.FEEDBACK_OVERLAY = _chunkA4VD4MHKcjs.FEEDBACK_OVERLAY; exports.HIGHLIGHT_DURATION = _chunkA4VD4MHKcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkA4VD4MHKcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkA4VD4MHKcjs.Icon; exports.IconContext = _chunkA4VD4MHKcjs.IconContext; exports.PRESS_DURATION = _chunkA4VD4MHKcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkA4VD4MHKcjs.PRESS_SCALE; exports.Portal = _chunk2WMVDMFVcjs.Portal; exports.PortalContext = _chunk2WMVDMFVcjs.PortalContext; exports.PortalHost = _chunk2WMVDMFVcjs.PortalHost; exports.PressableFeedback = _chunkA4VD4MHKcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkA4VD4MHKcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkA4VD4MHKcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkA4VD4MHKcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkA4VD4MHKcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkA4VD4MHKcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkA4VD4MHKcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkA4VD4MHKcjs.RIPPLE_START_SCALE; exports.Row = _chunkBFB6K4M7cjs.Row; exports.SCALE_REFERENCE_WIDTH = _chunkA4VD4MHKcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunkEVXZGNPAcjs.Slot; exports.TextSpan = _chunkUBA6AEY6cjs.TextSpan; exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.Typography = _chunkUBA6AEY6cjs.Typography; exports.XAUIProvider = _chunkBHTFIZTQcjs.XAUIProvider; exports.buildRadius = _chunkBHTFIZTQcjs.buildRadius; exports.buildShadows = _chunkBHTFIZTQcjs.buildShadows; exports.buttonRecipe = _chunk6ARON3XTcjs.buttonRecipe; exports.childrenToString = _chunkEVXZGNPAcjs.childrenToString; exports.createRecipe = _chunkUVO4GFSWcjs.createRecipe; exports.createSlotContext = _chunkEVXZGNPAcjs.createSlotContext; exports.createTheme = _chunkBHTFIZTQcjs.createTheme; exports.defaultTheme = _chunkBHTFIZTQcjs.defaultTheme; exports.deriveColors = _chunkBHTFIZTQcjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.markOverlay = _chunkA4VD4MHKcjs.markOverlay; exports.mergeProps = _chunkEVXZGNPAcjs.mergeProps; exports.mergeRefs = _chunkEVXZGNPAcjs.mergeRefs; exports.palette = _chunkBHTFIZTQcjs.palette; exports.pressScaleFor = _chunkA4VD4MHKcjs.pressScaleFor; exports.primitives = _chunkBHTFIZTQcjs.primitives; exports.resolveAnimation = _chunkA4VD4MHKcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkA4VD4MHKcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkA4VD4MHKcjs.rippleRadiusFor; exports.sourceKeys = _chunkBHTFIZTQcjs.sourceKeys; exports.tokens = _chunkBHTFIZTQcjs.tokens; exports.typographyRecipe = _chunkUBA6AEY6cjs.typographyRecipe; exports.useButton = _chunk6ARON3XTcjs.useButton; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useControllableState = useControllableState; exports.useFeedback = _chunkA4VD4MHKcjs.useFeedback; exports.useIconContext = _chunkA4VD4MHKcjs.useIconContext; exports.useMergedRef = useMergedRef; exports.usePressState = _chunk6ARON3XTcjs.usePressState; exports.usePrevious = usePrevious; exports.useStyleProps = _chunkEVXZGNPAcjs.useStyleProps; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
193
+
194
+
195
+
196
+ exports.Button = _chunk6ARON3XTcjs.Button; exports.Column = _chunk33QILJJHcjs.Column; exports.FEEDBACK_OVERLAY = _chunkA4VD4MHKcjs.FEEDBACK_OVERLAY; exports.Grid = _chunk33QILJJHcjs.Grid; exports.HIGHLIGHT_DURATION = _chunkA4VD4MHKcjs.HIGHLIGHT_DURATION; exports.HIGHLIGHT_OPACITY = _chunkA4VD4MHKcjs.HIGHLIGHT_OPACITY; exports.Icon = _chunkA4VD4MHKcjs.Icon; exports.IconContext = _chunkA4VD4MHKcjs.IconContext; exports.PRESS_DURATION = _chunkA4VD4MHKcjs.PRESS_DURATION; exports.PRESS_SCALE = _chunkA4VD4MHKcjs.PRESS_SCALE; exports.Portal = _chunk2WMVDMFVcjs.Portal; exports.PortalContext = _chunk2WMVDMFVcjs.PortalContext; exports.PortalHost = _chunk2WMVDMFVcjs.PortalHost; exports.PressableFeedback = _chunkA4VD4MHKcjs.PressableFeedback; exports.RIPPLE_CONFIRM_DURATION = _chunkA4VD4MHKcjs.RIPPLE_CONFIRM_DURATION; exports.RIPPLE_EXPAND_DURATION = _chunkA4VD4MHKcjs.RIPPLE_EXPAND_DURATION; exports.RIPPLE_FADE_IN = _chunkA4VD4MHKcjs.RIPPLE_FADE_IN; exports.RIPPLE_FADE_OUT = _chunkA4VD4MHKcjs.RIPPLE_FADE_OUT; exports.RIPPLE_FADE_OUT_DELAY = _chunkA4VD4MHKcjs.RIPPLE_FADE_OUT_DELAY; exports.RIPPLE_OPACITY = _chunkA4VD4MHKcjs.RIPPLE_OPACITY; exports.RIPPLE_START_SCALE = _chunkA4VD4MHKcjs.RIPPLE_START_SCALE; exports.Row = _chunk33QILJJHcjs.Row; exports.SCALE_REFERENCE_WIDTH = _chunkA4VD4MHKcjs.SCALE_REFERENCE_WIDTH; exports.Slot = _chunkEVXZGNPAcjs.Slot; exports.Stack = _chunk33QILJJHcjs.Stack; exports.TextSpan = _chunkUBA6AEY6cjs.TextSpan; exports.ThemeContext = _chunk57SJ4LJFcjs.ThemeContext; exports.Typography = _chunkUBA6AEY6cjs.Typography; exports.XAUIProvider = _chunkBHTFIZTQcjs.XAUIProvider; exports.buildRadius = _chunkBHTFIZTQcjs.buildRadius; exports.buildShadows = _chunkBHTFIZTQcjs.buildShadows; exports.buttonRecipe = _chunk6ARON3XTcjs.buttonRecipe; exports.childrenToString = _chunkEVXZGNPAcjs.childrenToString; exports.createRecipe = _chunkUVO4GFSWcjs.createRecipe; exports.createSlotContext = _chunkEVXZGNPAcjs.createSlotContext; exports.createTheme = _chunkBHTFIZTQcjs.createTheme; exports.defaultTheme = _chunkBHTFIZTQcjs.defaultTheme; exports.deriveColors = _chunkBHTFIZTQcjs.deriveColors; exports.deriveTint = _chunk57SJ4LJFcjs.deriveTint; exports.markOverlay = _chunkA4VD4MHKcjs.markOverlay; exports.mergeProps = _chunkEVXZGNPAcjs.mergeProps; exports.mergeRefs = _chunkEVXZGNPAcjs.mergeRefs; exports.palette = _chunkBHTFIZTQcjs.palette; exports.pressScaleFor = _chunkA4VD4MHKcjs.pressScaleFor; exports.primitives = _chunkBHTFIZTQcjs.primitives; exports.resolveAnimation = _chunkA4VD4MHKcjs.resolveAnimation; exports.resolveSlotAnimation = _chunkA4VD4MHKcjs.resolveSlotAnimation; exports.rippleRadiusFor = _chunkA4VD4MHKcjs.rippleRadiusFor; exports.sourceKeys = _chunkBHTFIZTQcjs.sourceKeys; exports.tokens = _chunkBHTFIZTQcjs.tokens; exports.typographyRecipe = _chunkUBA6AEY6cjs.typographyRecipe; exports.useButton = _chunk6ARON3XTcjs.useButton; exports.useColorMode = _chunk57SJ4LJFcjs.useColorMode; exports.useControllableState = useControllableState; exports.useFeedback = _chunkA4VD4MHKcjs.useFeedback; exports.useGrid = _chunk33QILJJHcjs.useGrid; exports.useIconContext = _chunkA4VD4MHKcjs.useIconContext; exports.useMergedRef = useMergedRef; exports.usePressState = _chunk6ARON3XTcjs.usePressState; exports.usePrevious = usePrevious; exports.useStyleProps = _chunkEVXZGNPAcjs.useStyleProps; exports.useThemeColor = _chunk57SJ4LJFcjs.useThemeColor; exports.useXAUITheme = _chunk57SJ4LJFcjs.useXAUITheme;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.cjs';
2
2
  export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.cjs';
3
- export { AxisProps, Column, ColumnProps, Row, RowProps } from './components/view/index.cjs';
3
+ export { AxisProps, Column, ColumnProps, Grid, GridContextValue, GridItemProps, GridProps, Row, RowProps, Stack, StackItemProps, StackProps, useGrid } from './components/view/index.cjs';
4
4
  import { RefCallback } from 'react';
5
5
  import { PossibleRef } from './system/index.cjs';
6
6
  export { AsChildProps, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, Slot, SlotProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.js';
2
2
  export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.js';
3
- export { AxisProps, Column, ColumnProps, Row, RowProps } from './components/view/index.js';
3
+ export { AxisProps, Column, ColumnProps, Grid, GridContextValue, GridItemProps, GridProps, Row, RowProps, Stack, StackItemProps, StackProps, useGrid } from './components/view/index.js';
4
4
  import { RefCallback } from 'react';
5
5
  import { PossibleRef } from './system/index.js';
6
6
  export { AsChildProps, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, Slot, SlotProps, childrenToString, createSlotContext, markOverlay, mergeProps, mergeRefs, pressScaleFor, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.js';
package/dist/index.js CHANGED
@@ -12,8 +12,11 @@ import {
12
12
  } from "./chunk-RMLFMRWL.js";
13
13
  import {
14
14
  Column,
15
- Row
16
- } from "./chunk-MAYVGK6W.js";
15
+ Grid,
16
+ Row,
17
+ Stack,
18
+ useGrid
19
+ } from "./chunk-JXLRHKCQ.js";
17
20
  import {
18
21
  Portal,
19
22
  PortalContext,
@@ -130,6 +133,7 @@ export {
130
133
  Button,
131
134
  Column,
132
135
  FEEDBACK_OVERLAY,
136
+ Grid,
133
137
  HIGHLIGHT_DURATION,
134
138
  HIGHLIGHT_OPACITY,
135
139
  Icon,
@@ -150,6 +154,7 @@ export {
150
154
  Row,
151
155
  SCALE_REFERENCE_WIDTH,
152
156
  Slot,
157
+ Stack,
153
158
  TextSpan,
154
159
  ThemeContext,
155
160
  Typography,
@@ -180,6 +185,7 @@ export {
180
185
  useColorMode,
181
186
  useControllableState,
182
187
  useFeedback,
188
+ useGrid,
183
189
  useIconContext,
184
190
  useMergedRef,
185
191
  usePressState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaui/native",
3
- "version": "0.9.1-alpha.19",
3
+ "version": "0.9.1-alpha.20",
4
4
  "description": "Composition-first React Native UI components with native animations powered by Reanimated",
5
5
  "keywords": [
6
6
  "react-native",
@@ -1,31 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkEVXZGNPAcjs = require('./chunk-EVXZGNPA.cjs');
5
-
6
- // src/components/view/row.tsx
7
- var _react = require('react');
8
- var _reactnative = require('react-native');
9
- var _jsxruntime = require('react/jsx-runtime');
10
- var Row = _react.forwardRef.call(void 0, function Row2({ children, asChild = false, style, ...props }, ref) {
11
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
12
- const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
13
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "row" }, styleProps, style], ...rest, children });
14
- });
15
- Row.displayName = "XAUI.Row";
16
-
17
- // src/components/view/column.tsx
18
-
19
-
20
-
21
- var Column = _react.forwardRef.call(void 0, function Column2({ children, asChild = false, style, ...props }, ref) {
22
- const [styleProps, rest] = _chunkEVXZGNPAcjs.useStyleProps.call(void 0, props);
23
- const Root = asChild ? _chunkEVXZGNPAcjs.Slot : _reactnative.View;
24
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Root, { ref, style: [{ flexDirection: "column" }, styleProps, style], ...rest, children });
25
- });
26
- Column.displayName = "XAUI.Column";
27
-
28
-
29
-
30
-
31
- exports.Row = Row; exports.Column = Column;
@@ -1,31 +0,0 @@
1
- import {
2
- Slot,
3
- useStyleProps
4
- } from "./chunk-EXX6ATAS.js";
5
-
6
- // src/components/view/row.tsx
7
- import { forwardRef } from "react";
8
- import { View } from "react-native";
9
- import { jsx } from "react/jsx-runtime";
10
- var Row = forwardRef(function Row2({ children, asChild = false, style, ...props }, ref) {
11
- const [styleProps, rest] = useStyleProps(props);
12
- const Root = asChild ? Slot : View;
13
- return /* @__PURE__ */ jsx(Root, { ref, style: [{ flexDirection: "row" }, styleProps, style], ...rest, children });
14
- });
15
- Row.displayName = "XAUI.Row";
16
-
17
- // src/components/view/column.tsx
18
- import { forwardRef as forwardRef2 } from "react";
19
- import { View as View2 } from "react-native";
20
- import { jsx as jsx2 } from "react/jsx-runtime";
21
- var Column = forwardRef2(function Column2({ children, asChild = false, style, ...props }, ref) {
22
- const [styleProps, rest] = useStyleProps(props);
23
- const Root = asChild ? Slot : View2;
24
- return /* @__PURE__ */ jsx2(Root, { ref, style: [{ flexDirection: "column" }, styleProps, style], ...rest, children });
25
- });
26
- Column.displayName = "XAUI.Column";
27
-
28
- export {
29
- Row,
30
- Column
31
- };