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

31
node_modules/expo-router/plugin/build/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,31 @@
import { ConfigPlugin } from 'expo/config-plugins';
declare const withRouter: ConfigPlugin<{
/** Production origin URL where assets in the public folder are hosted. The fetch function is polyfilled to support relative requests from this origin in production, development origin is inferred using the Expo CLI development server. */
origin?: string;
/** A more specific origin URL used in the `expo-router/head` module for iOS handoff. Defaults to `origin`. */
headOrigin?: string;
/** Should Async Routes be enabled. `production` is currently web-only and will be disabled on native. */
root?: string;
/** Should Async Routes be enabled, currently only `development` is supported. */
asyncRoutes?: string | {
android?: string;
ios?: string;
web?: string;
default?: string;
};
/** Should the sitemap be generated. Defaults to `true` */
sitemap?: boolean;
/** Generate partial typed routes */
partialTypedGroups?: boolean;
/** A list of headers that are set on every route response from the server */
headers: Record<string, string | string[]>;
/** Enable experimental server middleware support with a `+middleware.ts` file. Requires `web.output: 'server'` to be set in app config. */
unstable_useServerMiddleware?: boolean;
/** Enable experimental data loader support. Requires `web.output: 'static'` to be set in app config. */
unstable_useServerDataLoaders?: boolean;
/** Enable experimental server-side rendering. When enabled with `web.output: 'server'`, HTML is rendered at request time instead of being pre-rendered at build time. */
unstable_useServerRendering?: boolean;
/** Enable automatic app rerender on color scheme changes. Defaults to `true`. */
adaptiveColors?: boolean;
} | void>;
export default withRouter;

48
node_modules/expo-router/plugin/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const schema_utils_1 = require("@expo/schema-utils");
const config_plugins_1 = require("expo/config-plugins");
const schema = require('../options.json');
const withExpoHeadIos = (config) => {
return (0, config_plugins_1.withInfoPlist)(config, (config) => {
// TODO: Add a way to enable this...
// config.modResults.CoreSpotlightContinuation = true;
// $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route
if (!Array.isArray(config.modResults.NSUserActivityTypes)) {
config.modResults.NSUserActivityTypes = [];
}
// This ensures that stored `NSUserActivityType`s can be opened in-app.
// This is important for moving between native devices or from opening a link that was saved
// in a Quick Note or Siri Reminder.
const activityType = '$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route';
if (!config.modResults.NSUserActivityTypes.includes(activityType)) {
config.modResults.NSUserActivityTypes.push(activityType);
}
return config;
});
};
const withGammaScreens = (config) => {
return (0, config_plugins_1.withPodfile)(config, (config) => {
if (!config.modResults.contents.includes('RNS_GAMMA_ENABLED')) {
config.modResults.contents = `# Set by expo-router. This enables Fabric-only features from react-native-screens\nENV['RNS_GAMMA_ENABLED'] ||= '1'\n${config.modResults.contents}`;
}
return config;
});
};
const withRouter = (config, _props) => {
const props = _props || {};
(0, schema_utils_1.validate)(schema, props);
withExpoHeadIos(config);
withGammaScreens(config);
return {
...config,
extra: {
...config.extra,
router: {
...config.extra?.router,
...props,
},
},
};
};
exports.default = withRouter;

1
node_modules/expo-router/plugin/jest.config.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = require('expo-module-scripts/jest-preset-plugin');

185
node_modules/expo-router/plugin/options.json generated vendored Normal file
View File

@@ -0,0 +1,185 @@
{
"title": "expo-router config plugin options",
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Props",
"definitions": {
"AsyncRouteOption": {
"description": "Should Async Routes be enabled. `production` is currently web-only and will be disabled on native.",
"oneOf": [
{
"type": "string",
"enum": ["development", "production"]
},
{
"type": "boolean"
}
]
},
"Props": {
"type": "object",
"properties": {
"origin": {
"description": "Production origin URL where assets in the public folder are hosted. The fetch function is polyfilled to support relative requests from this origin in production, development origin is inferred using the Expo CLI development server.",
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
}
]
},
"headOrigin": {
"description": "A more specific origin URL used in the `expo-router/head` module for iOS handoff. Defaults to `origin`.",
"type": "string"
},
"root": {
"description": "Changes the routes directory from `app` to another value. Defaults to `app`. Avoid using this property.",
"type": "string"
},
"platformRoutes": {
"description": "Enable or disable platform-specific routes. Defaults to `true`.",
"type": "boolean"
},
"sitemap": {
"description": "Enable or disable automatically generated routes. Defaults to `true`.",
"type": "boolean"
},
"asyncRoutes": {
"description": "Should Async Routes be enabled. `production` is currently web-only and will be disabled on native.",
"oneOf": [
{
"$ref": "#/definitions/AsyncRouteOption"
},
{
"type": "object",
"properties": {
"ios": {
"$ref": "#/definitions/AsyncRouteOption"
},
"android": {
"$ref": "#/definitions/AsyncRouteOption"
},
"web": {
"$ref": "#/definitions/AsyncRouteOption"
},
"default": {
"$ref": "#/definitions/AsyncRouteOption"
}
},
"additionalProperties": true
}
]
},
"partialRouteTypes": {
"description": "Enable or disable partial route type generation. Defaults to `true`.",
"type": "boolean"
},
"redirects": {
"description": "Enable static redirects. Defaults to `true`.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": ["source", "destination"],
"properties": {
"source": {
"description": "The previous file path that this route should redirect from",
"type": "string"
},
"destination": {
"description": "The target file path that this route should redirect to",
"type": "string"
},
"permanent": {
"description": "Whether the redirect is temporary or permanent. Defaults to `false`.",
"type": "boolean",
"default": false
},
"methods": {
"description": "HTTP methods that should be redirected. Omit to redirect all methods.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"]
}
}
}
}
},
"rewrites": {
"description": "Enable static rewrites",
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"required": ["source", "destination"],
"properties": {
"source": {
"description": "The previous file path that should be rewritten",
"type": "string"
},
"destination": {
"description": "The target file path that this route should rewrite",
"type": "string"
},
"methods": {
"description": "HTTP methods that should be rewritten. Omit to rewrite all methods.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"]
}
}
}
}
},
"headers": {
"description": "A list of headers that are set on every route response from the server",
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"unstable_useServerMiddleware": {
"description": "Enable experimental server middleware support with a `+middleware.ts` file. Requires `web.output: 'server'` to be set in app config.",
"type": "boolean",
"default": false
},
"unstable_useServerDataLoaders": {
"description": "Enable experimental data loader support. This is only supported for `web.output: 'static'` outputs at the moment.",
"type": "boolean",
"default": false
},
"unstable_useServerRendering": {
"description": "Enable experimental server-side rendering. When enabled with `web.output: 'server'`, HTML is rendered at request time instead of being pre-rendered at build time.",
"type": "boolean",
"default": false
},
"disableSynchronousScreensUpdates": {
"description": "Disable synchronous layout updates for native screens.",
"type": "boolean",
"default": false
},
"adaptiveColors": {
"description": "Rerender the app on color scheme changes. When enabled, the app tree will rerender when the system theme changes (light/dark mode). Defaults to `true`.",
"type": "boolean",
"default": true
}
},
"additionalProperties": false
}
}
}

79
node_modules/expo-router/plugin/src/index.ts generated vendored Normal file
View File

@@ -0,0 +1,79 @@
import { validate } from '@expo/schema-utils';
import { ConfigPlugin, withInfoPlist, withPodfile } from 'expo/config-plugins';
const schema = require('../options.json');
const withExpoHeadIos: ConfigPlugin = (config) => {
return withInfoPlist(config, (config) => {
// TODO: Add a way to enable this...
// config.modResults.CoreSpotlightContinuation = true;
// $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route
if (!Array.isArray(config.modResults.NSUserActivityTypes)) {
config.modResults.NSUserActivityTypes = [];
}
// This ensures that stored `NSUserActivityType`s can be opened in-app.
// This is important for moving between native devices or from opening a link that was saved
// in a Quick Note or Siri Reminder.
const activityType = '$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route';
if (!config.modResults.NSUserActivityTypes.includes(activityType)) {
config.modResults.NSUserActivityTypes.push(activityType);
}
return config;
});
};
const withGammaScreens: ConfigPlugin = (config) => {
return withPodfile(config, (config) => {
if (!config.modResults.contents.includes('RNS_GAMMA_ENABLED')) {
config.modResults.contents = `# Set by expo-router. This enables Fabric-only features from react-native-screens\nENV['RNS_GAMMA_ENABLED'] ||= '1'\n${config.modResults.contents}`;
}
return config;
});
};
const withRouter: ConfigPlugin<
{
/** Production origin URL where assets in the public folder are hosted. The fetch function is polyfilled to support relative requests from this origin in production, development origin is inferred using the Expo CLI development server. */
origin?: string;
/** A more specific origin URL used in the `expo-router/head` module for iOS handoff. Defaults to `origin`. */
headOrigin?: string;
/** Should Async Routes be enabled. `production` is currently web-only and will be disabled on native. */
root?: string;
/** Should Async Routes be enabled, currently only `development` is supported. */
asyncRoutes?: string | { android?: string; ios?: string; web?: string; default?: string };
/** Should the sitemap be generated. Defaults to `true` */
sitemap?: boolean;
/** Generate partial typed routes */
partialTypedGroups?: boolean;
/** A list of headers that are set on every route response from the server */
headers: Record<string, string | string[]>;
/** Enable experimental server middleware support with a `+middleware.ts` file. Requires `web.output: 'server'` to be set in app config. */
unstable_useServerMiddleware?: boolean;
/** Enable experimental data loader support. Requires `web.output: 'static'` to be set in app config. */
unstable_useServerDataLoaders?: boolean;
/** Enable experimental server-side rendering. When enabled with `web.output: 'server'`, HTML is rendered at request time instead of being pre-rendered at build time. */
unstable_useServerRendering?: boolean;
/** Enable automatic app rerender on color scheme changes. Defaults to `true`. */
adaptiveColors?: boolean;
} | void
> = (config, _props) => {
const props = _props || {};
validate(schema, props);
withExpoHeadIos(config);
withGammaScreens(config);
return {
...config,
extra: {
...config.extra,
router: {
...config.extra?.router,
...props,
},
},
};
};
export default withRouter;

9
node_modules/expo-router/plugin/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "expo-module-scripts/tsconfig.plugin",
"compilerOptions": {
"outDir": "build",
"rootDir": "src"
},
"include": ["./src"],
"exclude": ["**/__mocks__/*", "**/__tests__/*"]
}