first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
export interface SplitViewColumnProps {
children?: React.ReactNode;
}
export declare function SplitViewColumn(props: SplitViewColumnProps): import("react").JSX.Element;
/**
* @platform iOS 26+
*/
export declare function SplitViewInspector(props: SplitViewColumnProps): import("react").JSX.Element;
//# sourceMappingURL=elements.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/split-view/elements.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAM1D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,+BAE7D"}

18
node_modules/expo-router/build/split-view/elements.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SplitViewColumn = SplitViewColumn;
exports.SplitViewInspector = SplitViewInspector;
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
const experimental_1 = require("react-native-screens/experimental");
function SplitViewColumn(props) {
return (<experimental_1.Split.Column>
<react_native_safe_area_context_1.SafeAreaProvider>{props.children}</react_native_safe_area_context_1.SafeAreaProvider>
</experimental_1.Split.Column>);
}
/**
* @platform iOS 26+
*/
function SplitViewInspector(props) {
return <experimental_1.Split.Inspector>{props.children}</experimental_1.Split.Inspector>;
}
//# sourceMappingURL=elements.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/split-view/elements.tsx"],"names":[],"mappings":";;AAOA,0CAMC;AAKD,gDAEC;AApBD,mFAAkE;AAClE,oEAA0D;AAM1D,SAAgB,eAAe,CAAC,KAA2B;IACzD,OAAO,CACL,CAAC,oBAAK,CAAC,MAAM,CACX;MAAA,CAAC,iDAAgB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,iDAAgB,CACtD;IAAA,EAAE,oBAAK,CAAC,MAAM,CAAC,CAChB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,CAAC,oBAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,oBAAK,CAAC,SAAS,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { Split } from 'react-native-screens/experimental';\n\nexport interface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewColumn(props: SplitViewColumnProps) {\n return (\n <Split.Column>\n <SafeAreaProvider>{props.children}</SafeAreaProvider>\n </Split.Column>\n );\n}\n\n/**\n * @platform iOS 26+\n */\nexport function SplitViewInspector(props: SplitViewColumnProps) {\n return <Split.Inspector>{props.children}</Split.Inspector>;\n}\n"]}

4
node_modules/expo-router/build/split-view/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export { SplitView, SplitViewProps } from './split-view';
export * from './elements';
export { type SplitHostProps } from 'react-native-screens/experimental';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/split-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC"}

21
node_modules/expo-router/build/split-view/index.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SplitView = void 0;
var split_view_1 = require("./split-view");
Object.defineProperty(exports, "SplitView", { enumerable: true, get: function () { return split_view_1.SplitView; } });
__exportStar(require("./elements"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/split-view/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyD;AAAhD,uGAAA,SAAS,OAAA;AAClB,6CAA2B","sourcesContent":["export { SplitView, SplitViewProps } from './split-view';\nexport * from './elements';\nexport { type SplitHostProps } from 'react-native-screens/experimental';\n"]}

View File

@@ -0,0 +1,16 @@
import React, { type ReactNode } from 'react';
import { type SplitHostProps } from 'react-native-screens/experimental';
import { SplitViewColumn, SplitViewInspector } from './elements';
/**
* For full list of supported props, see [`SplitHostProps`](http://github.com/software-mansion/react-native-screens/blob/main/src/components/gamma/split/SplitHost.types.ts#L117)
*/
export interface SplitViewProps extends Omit<SplitHostProps, 'children'> {
children?: ReactNode;
}
declare function SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps): React.JSX.Element;
export declare const SplitView: typeof SplitViewNavigator & {
Column: typeof SplitViewColumn;
Inspector: typeof SplitViewInspector;
};
export {};
//# sourceMappingURL=split-view.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMjE;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,EAAE,cAAc,qBA0D9E;AAED,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}

View File

@@ -0,0 +1,86 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SplitView = void 0;
const react_1 = __importStar(require("react"));
const experimental_1 = require("react-native-screens/experimental");
const elements_1 = require("./elements");
const IsWithinLayoutContext_1 = require("../layouts/IsWithinLayoutContext");
const Navigator_1 = require("../views/Navigator");
const IsWithinSplitViewContext = (0, react_1.createContext)(false);
function SplitViewNavigator({ children, ...splitViewHostProps }) {
if ((0, react_1.use)(IsWithinSplitViewContext)) {
throw new Error('There can only be one SplitView in the navigation hierarchy.');
}
// TODO: Add better way of detecting if SplitView is rendered inside Native navigator.
if ((0, react_1.use)(IsWithinLayoutContext_1.IsWithinLayoutContext)) {
throw new Error('SplitView cannot be used inside another navigator, except for Slot.');
}
if (process.env.EXPO_OS !== 'ios') {
console.warn('SplitView is only supported on iOS. The SplitView will behave like a Slot navigator on other platforms.');
return <Navigator_1.Slot />;
}
const WrappedSlot = () => (<IsWithinLayoutContext_1.IsWithinLayoutContext value>
<Navigator_1.Slot />
</IsWithinLayoutContext_1.IsWithinLayoutContext>);
const allChildrenArray = react_1.default.Children.toArray(children);
const columnChildren = allChildrenArray.filter((child) => (0, react_1.isValidElement)(child) && child.type === elements_1.SplitViewColumn);
const inspectorChildren = allChildrenArray.filter((child) => (0, react_1.isValidElement)(child) && child.type === elements_1.SplitViewInspector);
const numberOfSidebars = columnChildren.length;
const numberOfInspectors = inspectorChildren.length;
if (allChildrenArray.length !== columnChildren.length + inspectorChildren.length) {
console.warn('Only SplitView.Column and SplitView.Inspector components are allowed as direct children of SplitView.');
}
if (numberOfSidebars > 2) {
throw new Error('There can only be two SplitView.Column in the SplitView.');
}
if (numberOfSidebars + numberOfInspectors === 0) {
console.warn('No SplitView.Column and SplitView.Inspector found in SplitView.');
return <Navigator_1.Slot />;
}
// The key is needed, because number of columns cannot be changed dynamically
return (<experimental_1.Split.Host key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>
{columnChildren}
<experimental_1.Split.Column>
<WrappedSlot />
</experimental_1.Split.Column>
{inspectorChildren}
</experimental_1.Split.Host>);
}
exports.SplitView = Object.assign(SplitViewNavigator, {
Column: elements_1.SplitViewColumn,
Inspector: elements_1.SplitViewInspector,
});
//# sourceMappingURL=split-view.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"split-view.js","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],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AAK,6BAAkB,CACtE,CAAC;IACF,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC;IAC/C,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAEpD,IAAI,gBAAgB,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC;QACjF,OAAO,CAAC,IAAI,CACV,uGAAuG,CACxG,CAAC;IACJ,CAAC;IAED,IAAI,gBAAgB,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,gBAAgB,GAAG,kBAAkB,KAAK,CAAC,EAAE,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;QAChF,OAAO,CAAC,gBAAI,CAAC,AAAD,EAAG,CAAC;IAClB,CAAC;IAED,6EAA6E;IAC7E,OAAO,CACL,CAAC,oBAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAC7E;MAAA,CAAC,cAAc,CACf;MAAA,CAAC,oBAAK,CAAC,MAAM,CACX;QAAA,CAAC,WAAW,CAAC,AAAD,EACd;MAAA,EAAE,oBAAK,CAAC,MAAM,CACd;MAAA,CAAC,iBAAiB,CACpB;IAAA,EAAE,oBAAK,CAAC,IAAI,CAAC,CACd,CAAC;AACJ,CAAC;AAEY,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IACzD,MAAM,EAAE,0BAAe;IACvB,SAAS,EAAE,6BAAkB;CAC9B,CAAC,CAAC","sourcesContent":["import React, { createContext, isValidElement, use, type ReactNode } from 'react';\nimport { Split, type SplitHostProps } from 'react-native-screens/experimental';\n\nimport { SplitViewColumn, SplitViewInspector } from './elements';\nimport { IsWithinLayoutContext } from '../layouts/IsWithinLayoutContext';\nimport { Slot } from '../views/Navigator';\n\nconst IsWithinSplitViewContext = createContext(false);\n\n/**\n * For full list of supported props, see [`SplitHostProps`](http://github.com/software-mansion/react-native-screens/blob/main/src/components/gamma/split/SplitHost.types.ts#L117)\n */\nexport interface SplitViewProps extends Omit<SplitHostProps, 'children'> {\n children?: ReactNode;\n}\n\nfunction SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps) {\n if (use(IsWithinSplitViewContext)) {\n throw new Error('There can only be one SplitView in the navigation hierarchy.');\n }\n\n // TODO: Add better way of detecting if SplitView is rendered inside Native navigator.\n if (use(IsWithinLayoutContext)) {\n throw new Error('SplitView cannot be used inside another navigator, except for Slot.');\n }\n\n if (process.env.EXPO_OS !== 'ios') {\n console.warn(\n 'SplitView is only supported on iOS. The SplitView will behave like a Slot navigator on other platforms.'\n );\n return <Slot />;\n }\n\n const WrappedSlot = () => (\n <IsWithinLayoutContext value>\n <Slot />\n </IsWithinLayoutContext>\n );\n\n const allChildrenArray = React.Children.toArray(children);\n const columnChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewColumn\n );\n const inspectorChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewInspector\n );\n const numberOfSidebars = columnChildren.length;\n const numberOfInspectors = inspectorChildren.length;\n\n if (allChildrenArray.length !== columnChildren.length + inspectorChildren.length) {\n console.warn(\n 'Only SplitView.Column and SplitView.Inspector components are allowed as direct children of SplitView.'\n );\n }\n\n if (numberOfSidebars > 2) {\n throw new Error('There can only be two SplitView.Column in the SplitView.');\n }\n\n if (numberOfSidebars + numberOfInspectors === 0) {\n console.warn('No SplitView.Column and SplitView.Inspector found in SplitView.');\n return <Slot />;\n }\n\n // The key is needed, because number of columns cannot be changed dynamically\n return (\n <Split.Host key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>\n {columnChildren}\n <Split.Column>\n <WrappedSlot />\n </Split.Column>\n {inspectorChildren}\n </Split.Host>\n );\n}\n\nexport const SplitView = Object.assign(SplitViewNavigator, {\n Column: SplitViewColumn,\n Inspector: SplitViewInspector,\n});\n"]}