yeet
This commit is contained in:
10
node_modules/@expo/configure-splash-screen/build/ios/BackgroundAsset.d.ts
generated
vendored
Normal file
10
node_modules/@expo/configure-splash-screen/build/ios/BackgroundAsset.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { Color } from '../SplashScreenConfig';
|
||||
/**
|
||||
* Creates imageset containing solid color image that is used as a background for Splash Screen.
|
||||
*/
|
||||
export default function configureAssets(iosProjectPath: string, config: {
|
||||
backgroundColor: Color;
|
||||
darkMode?: {
|
||||
backgroundColor?: Color;
|
||||
};
|
||||
}): Promise<void>;
|
60
node_modules/@expo/configure-splash-screen/build/ios/BackgroundAsset.js
generated
vendored
Normal file
60
node_modules/@expo/configure-splash-screen/build/ios/BackgroundAsset.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const pngjs_1 = require("pngjs");
|
||||
const Contents_json_1 = require("./Contents.json");
|
||||
const PNG_FILENAME = 'background.png';
|
||||
const DARK_PNG_FILENAME = 'dark_background.png';
|
||||
const IMAGESET_PATH = 'Images.xcassets/SplashScreenBackground.imageset';
|
||||
const CONTENTS_PATH = `${IMAGESET_PATH}/Contents.json`;
|
||||
const PNG_PATH = `${IMAGESET_PATH}/${PNG_FILENAME}`;
|
||||
const DARK_PNG_PATH = `${IMAGESET_PATH}/${DARK_PNG_FILENAME}`;
|
||||
async function createContentsJsonFile(iosProjectPath, imageSetPath, darkModeEnabled) {
|
||||
await fs_extra_1.default.mkdirp(path_1.default.resolve(iosProjectPath, IMAGESET_PATH));
|
||||
await Contents_json_1.writeContentsJsonFile(path_1.default.resolve(iosProjectPath, CONTENTS_PATH), PNG_FILENAME, darkModeEnabled ? DARK_PNG_FILENAME : undefined);
|
||||
await fs_extra_1.default.mkdirp(imageSetPath);
|
||||
}
|
||||
async function createPngFile(filePath, color) {
|
||||
const png = new pngjs_1.PNG({
|
||||
width: 1,
|
||||
height: 1,
|
||||
bitDepth: 8,
|
||||
colorType: 6,
|
||||
inputColorType: 6,
|
||||
inputHasAlpha: true,
|
||||
});
|
||||
const [r, g, b, a] = color;
|
||||
const bitmap = new Uint8Array([r, g, b, a * 255]);
|
||||
const buffer = Buffer.from(bitmap);
|
||||
png.data = buffer;
|
||||
return new Promise(resolve => {
|
||||
png.pack().pipe(fs_extra_1.default.createWriteStream(filePath)).on('finish', resolve);
|
||||
});
|
||||
}
|
||||
async function createFiles(iosProjectPath, color, darkModeColor) {
|
||||
await createPngFile(path_1.default.resolve(iosProjectPath, PNG_PATH), color);
|
||||
if (darkModeColor) {
|
||||
await createPngFile(path_1.default.resolve(iosProjectPath, DARK_PNG_PATH), darkModeColor);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates imageset containing solid color image that is used as a background for Splash Screen.
|
||||
*/
|
||||
async function configureAssets(iosProjectPath, config) {
|
||||
var _a;
|
||||
const backgroundColor = config.backgroundColor;
|
||||
const darkModeBackgroundColor = (_a = config.darkMode) === null || _a === void 0 ? void 0 : _a.backgroundColor;
|
||||
const imageSetPath = path_1.default.resolve(iosProjectPath, IMAGESET_PATH);
|
||||
// ensure old SplashScreenBackground imageSet is removed
|
||||
if (await fs_extra_1.default.pathExists(imageSetPath)) {
|
||||
await fs_extra_1.default.remove(imageSetPath);
|
||||
}
|
||||
await createContentsJsonFile(iosProjectPath, imageSetPath, !!darkModeBackgroundColor);
|
||||
await createFiles(iosProjectPath, backgroundColor, darkModeBackgroundColor);
|
||||
}
|
||||
exports.default = configureAssets;
|
||||
//# sourceMappingURL=BackgroundAsset.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/BackgroundAsset.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/BackgroundAsset.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"BackgroundAsset.js","sourceRoot":"","sources":["../../src/ios/BackgroundAsset.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AACxB,iCAA4B;AAG5B,mDAAwD;AAExD,MAAM,YAAY,GAAG,gBAAgB,CAAC;AACtC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEhD,MAAM,aAAa,GAAG,iDAAiD,CAAC;AACxE,MAAM,aAAa,GAAG,GAAG,aAAa,gBAAgB,CAAC;AACvD,MAAM,QAAQ,GAAG,GAAG,aAAa,IAAI,YAAY,EAAE,CAAC;AACpD,MAAM,aAAa,GAAG,GAAG,aAAa,IAAI,iBAAiB,EAAE,CAAC;AAE9D,KAAK,UAAU,sBAAsB,CACnC,cAAsB,EACtB,YAAoB,EACpB,eAAwB;IAExB,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,OAAO,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC,CAAC;IAE7D,MAAM,qCAAqB,CACzB,cAAI,CAAC,OAAO,CAAC,cAAc,EAAE,aAAa,CAAC,EAC3C,YAAY,EACZ,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAChD,CAAC;IAEF,MAAM,kBAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAChC,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,QAAgB,EAAE,KAAY;IACzD,MAAM,GAAG,GAAG,IAAI,WAAG,CAAC;QAClB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,CAAC;QACZ,cAAc,EAAE,CAAC;QACjB,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;IACH,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;IAC3B,MAAM,MAAM,GAAG,IA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,EAAE,eAAe,EAAE,uBAAuB,CAAC,CAAC;AAC9E,CAAC;AArBD,kCAqBC","sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\nimport { PNG } from 'pngjs';\n\nimport { Color } from '../SplashScreenConfig';\nimport { writeContentsJsonFile } from './Contents.json';\n\nconst PNG_FILENAME = 'background.png';\nconst DARK_PNG_FILENAME = 'dark_background.png';\n\nconst IMAGESET_PATH = 'Images.xcassets/SplashScreenBackground.imageset';\nconst CONTENTS_PATH = `${IMAGESET_PATH}/Contents.json`;\nconst PNG_PATH = `${IMAGESET_PATH}/${PNG_FILENAME}`;\nconst DARK_PNG_PATH = `${IMAGESET_PATH}/${DARK_PNG_FILENAME}`;\n\nasync function createContentsJsonFile(\n iosProjectPath: string,\n imageSetPath: string,\n darkModeEnabled: boolean\n) {\n await fs.mkdirp(path.resolve(iosProjectPath, IMAGESET_PATH));\n\n await writeContentsJsonFile(\n path.resolve(iosProjectPath, CONTENTS_PATH),\n PNG_FILENAME,\n darkModeEnabled ? DARK_PNG_FILENAME : undefined\n );\n\n await fs.mkdirp(imageSetPath);\n}\n\nasync function createPngFile(filePath: string, color: Color) {\n const png = new PNG({\n width: 1,\n height: 1,\n bitDepth: 8,\n colorType: 6,\n inputColorType: 6,\n inputHasAlpha: true,\n });\n const [r, g, b, a] = color;\n const bitmap = new Uint8Array([r, g, b, a * 255]);\n const buffer = Buffer.from(bitmap);\n png.data = buffer;\n\n return new Promise(resolve => {\n png.pack().pipe(fs.createWriteStream(filePath)).on('finish', resolve);\n });\n}\n\nasync function createFiles(iosProjectPath: string, color: Color, darkModeColor?: Color) {\n await createPngFile(path.resolve(iosProjectPath, PNG_PATH), color);\n if (darkModeColor) {\n await createPngFile(path.resolve(iosProjectPath, DARK_PNG_PATH), darkModeColor);\n }\n}\n\n/**\n * Creates imageset containing solid color image that is used as a background for Splash Screen.\n */\nexport default async function configureAssets(\n iosProjectPath: string,\n config: {\n backgroundColor: Color;\n darkMode?: {\n backgroundColor?: Color;\n };\n }\n) {\n const backgroundColor = config.backgroundColor;\n const darkModeBackgroundColor = config.darkMode?.backgroundColor;\n\n const imageSetPath = path.resolve(iosProjectPath, IMAGESET_PATH);\n\n // ensure old SplashScreenBackground imageSet is removed\n if (await fs.pathExists(imageSetPath)) {\n await fs.remove(imageSetPath);\n }\n\n await createContentsJsonFile(iosProjectPath, imageSetPath, !!darkModeBackgroundColor);\n await createFiles(iosProjectPath, backgroundColor, darkModeBackgroundColor);\n}\n"]}
|
1
node_modules/@expo/configure-splash-screen/build/ios/Contents.json.d.ts
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/Contents.json.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function writeContentsJsonFile(contentsJsonFilePath: string, filename: string, darkModeFilename?: string): Promise<void>;
|
65
node_modules/@expo/configure-splash-screen/build/ios/Contents.json.js
generated
vendored
Normal file
65
node_modules/@expo/configure-splash-screen/build/ios/Contents.json.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.writeContentsJsonFile = void 0;
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
async function writeContentsJsonFile(contentsJsonFilePath, filename, darkModeFilename) {
|
||||
const images = [
|
||||
{
|
||||
idiom: 'universal',
|
||||
filename,
|
||||
scale: '1x',
|
||||
},
|
||||
{
|
||||
appearances: [
|
||||
{
|
||||
appearance: 'luminosity',
|
||||
value: 'dark',
|
||||
},
|
||||
],
|
||||
idiom: 'universal',
|
||||
filename: darkModeFilename,
|
||||
scale: '1x',
|
||||
},
|
||||
{
|
||||
idiom: 'universal',
|
||||
scale: '2x',
|
||||
},
|
||||
{
|
||||
appearances: [
|
||||
{
|
||||
appearance: 'luminosity',
|
||||
value: 'dark',
|
||||
},
|
||||
],
|
||||
idiom: 'universal',
|
||||
scale: '2x',
|
||||
},
|
||||
{
|
||||
idiom: 'universal',
|
||||
scale: '3x',
|
||||
},
|
||||
{
|
||||
appearances: [
|
||||
{
|
||||
appearance: 'luminosity',
|
||||
value: 'dark',
|
||||
},
|
||||
],
|
||||
idiom: 'universal',
|
||||
scale: '3x',
|
||||
},
|
||||
].filter(el => { var _a, _b; return (((_b = (_a = el.appearances) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value) === 'dark' ? Boolean(darkModeFilename) : true); });
|
||||
const contentsJson = {
|
||||
images,
|
||||
info: {
|
||||
version: 1,
|
||||
author: 'xcode',
|
||||
},
|
||||
};
|
||||
await fs_extra_1.default.writeFile(contentsJsonFilePath, JSON.stringify(contentsJson, null, 2));
|
||||
}
|
||||
exports.writeContentsJsonFile = writeContentsJsonFile;
|
||||
//# sourceMappingURL=Contents.json.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/Contents.json.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/Contents.json.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Contents.json.js","sourceRoot":"","sources":["../../src/ios/Contents.json.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAEnB,KAAK,UAAU,qBAAqB,CACzC,oBAA4B,EAC5B,QAAgB,EAChB,gBAAyB;IAEzB,MAAM,MAAM,GAQN;QACJ;YACE,KAAK,EAAE,WAAoB;YAC3B,QAAQ;YACR,KAAK,EAAE,IAAa;SACrB;QACD;YACE,WAAW,EAAE;gBACX;oBACE,UAAU,EAAE,YAAqB;oBACjC,KAAK,EAAE,MAAe;iBACvB;aACF;YACD,KAAK,EAAE,WAAoB;YAC3B,QAAQ,EAAE,gBAAgB;YAC1B,KAAK,EAAE,IAAa;SACrB;QACD;YACE,KAAK,EAAE,WAAoB;YAC3B,KAAK,EAAE,IAAa;SACrB;QACD;YACE,WAAW,EAAE;gBACX;oBACE,UAAU,EAAE,YAAqB;oBACjC,KAAK,EAAE,MAAe;iBACvB;aACF;YACD,KAAK,EAAE,WAAoB;YAC3B,KAAK,EAAE,IAAa;SACrB;QACD;YACE,KAAK,EAAE,WAAoB;YAC3B,KAAK,EAAE,IAAa;SACrB;QACD;YACE,WAAW,EAAE;gBACX;oBACE,UAAU,EAAE,YAAqB;oBACjC,KAAK,EAAE,MAAe;iBACvB;aACF;YACD,KAAK,EAAE,WAAoB;YAC3B,KAAK,EAAE,IAAa;SACrB;KACF,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,eAAC,OAAA,CAAC,aAAA,EAAE,CAAC,WAAW,0CAAG,CAAC,2CAAG,KAAK,MAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA,EAAA,CAAC,CAAC;IAE3F,MAAM,YAAY,GAAG;QACnB,MAAM;QACN,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,OAAO;SAChB;KACF,CAAC;IAEF,MAAM,kBAAE,CAAC,SAAS,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC;AArED,sDAqEC","sourcesContent":["import fs from 'fs-extra';\n\nexport async function writeContentsJsonFile(\n contentsJsonFilePath: string,\n filename: string,\n darkModeFilename?: string\n) {\n const images: {\n idiom: 'universal';\n filename?: string;\n scale: '1x' | '2x' | '3x';\n appearances?: {\n appearance: 'luminosity';\n value: 'dark';\n }[];\n }[] = [\n {\n idiom: 'universal' as const,\n filename,\n scale: '1x' as const,\n },\n {\n appearances: [\n {\n appearance: 'luminosity' as const,\n value: 'dark' as const,\n },\n ],\n idiom: 'universal' as const,\n filename: darkModeFilename,\n scale: '1x' as const,\n },\n {\n idiom: 'universal' as const,\n scale: '2x' as const,\n },\n {\n appearances: [\n {\n appearance: 'luminosity' as const,\n value: 'dark' as const,\n },\n ],\n idiom: 'universal' as const,\n scale: '2x' as const,\n },\n {\n idiom: 'universal' as const,\n scale: '3x' as const,\n },\n {\n appearances: [\n {\n appearance: 'luminosity' as const,\n value: 'dark' as const,\n },\n ],\n idiom: 'universal' as const,\n scale: '3x' as const,\n },\n ].filter(el => (el.appearances?.[0]?.value === 'dark' ? Boolean(darkModeFilename) : true));\n\n const contentsJson = {\n images,\n info: {\n version: 1,\n author: 'xcode',\n },\n };\n\n await fs.writeFile(contentsJsonFilePath, JSON.stringify(contentsJson, null, 2));\n}\n"]}
|
9
node_modules/@expo/configure-splash-screen/build/ios/ImageAsset.d.ts
generated
vendored
Normal file
9
node_modules/@expo/configure-splash-screen/build/ios/ImageAsset.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Creates imageset containing image for Splash/Launch Screen.
|
||||
*/
|
||||
export default function configureImageAssets(iosProjectPath: string, config?: {
|
||||
image?: string;
|
||||
darkMode?: {
|
||||
image?: string;
|
||||
};
|
||||
}): Promise<void>;
|
46
node_modules/@expo/configure-splash-screen/build/ios/ImageAsset.js
generated
vendored
Normal file
46
node_modules/@expo/configure-splash-screen/build/ios/ImageAsset.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const Contents_json_1 = require("./Contents.json");
|
||||
const PNG_FILENAME = 'splashscreen.png';
|
||||
const DARK_PNG_FILENAME = 'dark_splashscreen.png';
|
||||
const IMAGESET_PATH = 'Images.xcassets/SplashScreen.imageset';
|
||||
const CONTENTS_PATH = `${IMAGESET_PATH}/Contents.json`;
|
||||
const PNG_PATH = `${IMAGESET_PATH}/${PNG_FILENAME}`;
|
||||
const DARK_PNG_PATH = `${IMAGESET_PATH}/${DARK_PNG_FILENAME}`;
|
||||
async function createContentsJsonFile(iosProjectPath, imageSetPath, imagePath, darkModeImagePath) {
|
||||
if (!imagePath) {
|
||||
return;
|
||||
}
|
||||
await fs_extra_1.default.mkdirp(imageSetPath);
|
||||
await Contents_json_1.writeContentsJsonFile(path_1.default.resolve(iosProjectPath, CONTENTS_PATH), PNG_FILENAME, darkModeImagePath && DARK_PNG_FILENAME);
|
||||
}
|
||||
async function copyImageFiles(iosProjectPath, imagePath, darkModeImagePath) {
|
||||
if (imagePath) {
|
||||
await fs_extra_1.default.copyFile(imagePath, path_1.default.resolve(iosProjectPath, PNG_PATH));
|
||||
}
|
||||
if (darkModeImagePath) {
|
||||
await fs_extra_1.default.copyFile(darkModeImagePath, path_1.default.resolve(iosProjectPath, DARK_PNG_PATH));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates imageset containing image for Splash/Launch Screen.
|
||||
*/
|
||||
async function configureImageAssets(iosProjectPath, config = {}) {
|
||||
var _a;
|
||||
const imagePath = config.image;
|
||||
const darkModeImagePath = (_a = config.darkMode) === null || _a === void 0 ? void 0 : _a.image;
|
||||
const imageSetPath = path_1.default.resolve(iosProjectPath, IMAGESET_PATH);
|
||||
// ensure old SplashScreen imageSet is removed
|
||||
if (await fs_extra_1.default.pathExists(imageSetPath)) {
|
||||
await fs_extra_1.default.remove(imageSetPath);
|
||||
}
|
||||
await createContentsJsonFile(iosProjectPath, imageSetPath, imagePath, darkModeImagePath);
|
||||
await copyImageFiles(iosProjectPath, imagePath, darkModeImagePath);
|
||||
}
|
||||
exports.default = configureImageAssets;
|
||||
//# sourceMappingURL=ImageAsset.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/ImageAsset.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/ImageAsset.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ImageAsset.js","sourceRoot":"","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,0CAAE,KAAK,CAAC;IAEjD,MAAM,YAAY,GAAG,cAAI,CAAC,OAAO,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;IAEjE,8CAA8C;IAC9C,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;QACrC,MAAM,kBAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KAC/B;IAED,MAAM,sBAAsB,CAAC,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACzF,MAAM,cAAc,CAAC,cAAc,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;AACrE,CAAC;AArBD,uCAqBC","sourcesContent":["import fs from 'fs-extra';\nimport path from 'path';\n\nimport { writeContentsJsonFile } from './Contents.json';\n\nconst PNG_FILENAME = 'splashscreen.png';\nconst DARK_PNG_FILENAME = 'dark_splashscreen.png';\n\nconst IMAGESET_PATH = 'Images.xcassets/SplashScreen.imageset';\nconst CONTENTS_PATH = `${IMAGESET_PATH}/Contents.json`;\nconst PNG_PATH = `${IMAGESET_PATH}/${PNG_FILENAME}`;\nconst DARK_PNG_PATH = `${IMAGESET_PATH}/${DARK_PNG_FILENAME}`;\n\nasync function createContentsJsonFile(\n iosProjectPath: string,\n imageSetPath: string,\n imagePath?: string,\n darkModeImagePath?: string\n) {\n if (!imagePath) {\n return;\n }\n\n await fs.mkdirp(imageSetPath);\n await writeContentsJsonFile(\n path.resolve(iosProjectPath, CONTENTS_PATH),\n PNG_FILENAME,\n darkModeImagePath && DARK_PNG_FILENAME\n );\n}\n\nasync function copyImageFiles(\n iosProjectPath: string,\n imagePath?: string,\n darkModeImagePath?: string\n) {\n if (imagePath) {\n await fs.copyFile(imagePath, path.resolve(iosProjectPath, PNG_PATH));\n }\n if (darkModeImagePath) {\n await fs.copyFile(darkModeImagePath, path.resolve(iosProjectPath, DARK_PNG_PATH));\n }\n}\n\n/**\n * Creates imageset containing image for Splash/Launch Screen.\n */\nexport default async function configureImageAssets(\n iosProjectPath: string,\n config: {\n image?: string;\n darkMode?: {\n image?: string;\n };\n } = {}\n) {\n const imagePath = config.image;\n const darkModeImagePath = config.darkMode?.image;\n\n const imageSetPath = path.resolve(iosProjectPath, IMAGESET_PATH);\n\n // ensure old SplashScreen imageSet is removed\n if (await fs.pathExists(imageSetPath)) {\n await fs.remove(imageSetPath);\n }\n\n await createContentsJsonFile(iosProjectPath, imageSetPath, imagePath, darkModeImagePath);\n await copyImageFiles(iosProjectPath, imagePath, darkModeImagePath);\n}\n"]}
|
10
node_modules/@expo/configure-splash-screen/build/ios/Info.plist.d.ts
generated
vendored
Normal file
10
node_modules/@expo/configure-splash-screen/build/ios/Info.plist.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { SplashScreenStatusBarStyleType } from '../constants';
|
||||
/**
|
||||
* Configures [INFO_PLIST] to show [STORYBOARD] filename as Splash/Launch Screen.
|
||||
*/
|
||||
export default function configureInfoPlist(iosProjectPath: string, config?: {
|
||||
statusBar?: {
|
||||
hidden?: boolean;
|
||||
style?: SplashScreenStatusBarStyleType;
|
||||
};
|
||||
}): Promise<void>;
|
109
node_modules/@expo/configure-splash-screen/build/ios/Info.plist.js
generated
vendored
Normal file
109
node_modules/@expo/configure-splash-screen/build/ios/Info.plist.js
generated
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const StateManager_1 = __importDefault(require("../utils/StateManager"));
|
||||
const string_utils_1 = require("../utils/string-utils");
|
||||
const INFO_PLIST_FILE_PATH = 'Info.plist';
|
||||
function getUIStatusBarStyle(statusBarStyle) {
|
||||
return `UIStatusBarStyle${statusBarStyle
|
||||
.replace(/(^\w)|(-\w)/g, s => s.toUpperCase())
|
||||
.replace(/-/g, '')}`;
|
||||
}
|
||||
/**
|
||||
* Configures [INFO_PLIST] to show [STORYBOARD] filename as Splash/Launch Screen.
|
||||
*/
|
||||
async function configureInfoPlist(iosProjectPath, config = {}) {
|
||||
var _a, _b;
|
||||
const statusBarHidden = (_a = config.statusBar) === null || _a === void 0 ? void 0 : _a.hidden;
|
||||
const statusBarStyle = (_b = config.statusBar) === null || _b === void 0 ? void 0 : _b.style;
|
||||
const filePath = path_1.default.resolve(iosProjectPath, INFO_PLIST_FILE_PATH);
|
||||
const fileContent = await fs_extra_1.default.readFile(filePath, 'utf-8');
|
||||
const { state: newContent } = new StateManager_1.default(fileContent)
|
||||
// LaunchScreen
|
||||
.applyAction(content => {
|
||||
const [succeeded, newContent] = string_utils_1.replace(content, {
|
||||
replaceContent: '<string>SplashScreen</string>',
|
||||
replacePattern: /(?<=<key>UILaunchStoryboardName<\/key>(.|\n)*?)<string>.*?<\/string>/m,
|
||||
});
|
||||
return [newContent, 'launchScreenReplaced', succeeded];
|
||||
})
|
||||
.applyAction((content, { launchScreenReplaced }) => {
|
||||
if (launchScreenReplaced) {
|
||||
return [content, 'launchScreenInserted', false];
|
||||
}
|
||||
const [succeeded, newContent] = string_utils_1.insert(content, {
|
||||
insertContent: ` <key>UILaunchStoryboardName</key>\n <string>SplashScreen</string>\n`,
|
||||
insertPattern: /<\/dict>/gm,
|
||||
}, true);
|
||||
return [newContent, 'inserted', succeeded];
|
||||
})
|
||||
// StatusBar hiding
|
||||
.applyAction(content => {
|
||||
if (statusBarHidden === undefined) {
|
||||
const [succeeded, newContent] = string_utils_1.replace(content, {
|
||||
replaceContent: '',
|
||||
replacePattern: /^.*<key>UIStatusBarHidden<\/key>(.|\n)*?<.*\/>.*$/m,
|
||||
});
|
||||
return [newContent, 'statusBarHidingRemoved', succeeded];
|
||||
}
|
||||
return [content, 'statusBarHidingRemoved', false];
|
||||
})
|
||||
.applyAction((content, { statusBarHidingRemoved }) => {
|
||||
if (statusBarHidingRemoved || statusBarHidden === undefined) {
|
||||
return [content, 'statusBarHidingReplaced', false];
|
||||
}
|
||||
const [succeeded, newContent] = string_utils_1.replace(content, {
|
||||
replaceContent: String(statusBarHidden),
|
||||
replacePattern: /(?<=<key>UIStatusBarHidden<\/key>(.|\n)*?<).*(?=\/>)/m,
|
||||
});
|
||||
return [newContent, 'statusBarHidingReplaced', succeeded];
|
||||
})
|
||||
.applyAction((content, { statusBarHidingReplaced }) => {
|
||||
if (statusBarHidingReplaced || statusBarHidden === undefined) {
|
||||
return [content, 'statusBarHidingInserted', false];
|
||||
}
|
||||
const [succeeded, newContent] = string_utils_1.insert(content, {
|
||||
insertContent: ` <key>UIStatusBarHidden</key>\n <${statusBarHidden}/>\n`,
|
||||
insertPattern: /<\/dict>/gm,
|
||||
}, true);
|
||||
return [newContent, 'statusBarHidingInserted', succeeded];
|
||||
})
|
||||
// StatusBar style
|
||||
.applyAction(content => {
|
||||
if (statusBarStyle === undefined) {
|
||||
const [succeeded, newContent] = string_utils_1.replace(content, {
|
||||
replacePattern: /^.*<key>UIStatusBarStyle<\/key>(.|\n)*?<string>.*<\/string>.*$/m,
|
||||
replaceContent: '',
|
||||
});
|
||||
return [newContent, 'statusBarStyleRemoved', succeeded];
|
||||
}
|
||||
return [content, 'statusBarStyleRemoved', false];
|
||||
})
|
||||
.applyAction((content, { statusBarStyleRemoved }) => {
|
||||
if (statusBarStyleRemoved || statusBarStyle === undefined) {
|
||||
return [content, 'statusBarStyleReplaced', false];
|
||||
}
|
||||
const [succeeded, newContent] = string_utils_1.replace(content, {
|
||||
replaceContent: getUIStatusBarStyle(statusBarStyle),
|
||||
replacePattern: /(?<=<key>UIStatusBarStyle<\/key>(.|\n)*?<string>).*(?=<\/string>)/m,
|
||||
});
|
||||
return [newContent, 'statusBarStyleReplaced', succeeded];
|
||||
})
|
||||
.applyAction((content, { statusBarStyleReplaced }) => {
|
||||
if (statusBarStyleReplaced || statusBarStyle === undefined) {
|
||||
return [content, 'statusBarStyleInserted', false];
|
||||
}
|
||||
const [succeeded, newContent] = string_utils_1.insert(content, {
|
||||
insertContent: ` <key>UIStatusBarStyle</key>\n <string>${getUIStatusBarStyle(statusBarStyle)}</string>\n`,
|
||||
insertPattern: /<\/dict>/gm,
|
||||
}, true);
|
||||
return [newContent, 'statusBarStyleInserted', succeeded];
|
||||
});
|
||||
await fs_extra_1.default.writeFile(filePath, newContent);
|
||||
}
|
||||
exports.default = configureInfoPlist;
|
||||
//# sourceMappingURL=Info.plist.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/Info.plist.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/Info.plist.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10
node_modules/@expo/configure-splash-screen/build/ios/Paths.d.ts
generated
vendored
Normal file
10
node_modules/@expo/configure-splash-screen/build/ios/Paths.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { XcodeProject } from 'xcode';
|
||||
export declare function getAllXcodeProjectPaths(projectRoot: string): string[];
|
||||
export declare function getAllPBXProjectPaths(projectRoot: string): string[];
|
||||
export declare function getApplicationNativeTarget({ project, projectName, }: {
|
||||
project: XcodeProject;
|
||||
projectName: string;
|
||||
}): {
|
||||
uuid: string;
|
||||
target: import("xcode").PBXNativeTarget;
|
||||
};
|
63
node_modules/@expo/configure-splash-screen/build/ios/Paths.js
generated
vendored
Normal file
63
node_modules/@expo/configure-splash-screen/build/ios/Paths.js
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (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 (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getApplicationNativeTarget = exports.getAllPBXProjectPaths = exports.getAllXcodeProjectPaths = void 0;
|
||||
// Copied over from `@expo/config-plugins/src/ios/Paths`
|
||||
const assert_1 = __importDefault(require("assert"));
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const glob_1 = require("glob");
|
||||
const path = __importStar(require("path"));
|
||||
const ignoredPaths = ['**/@(Carthage|Pods|node_modules)/**'];
|
||||
function getAllXcodeProjectPaths(projectRoot) {
|
||||
const iosFolder = 'ios';
|
||||
const pbxprojPaths = glob_1.sync('**/*.xcodeproj', { cwd: projectRoot, ignore: ignoredPaths })
|
||||
.filter(project => !/test|example|sample/i.test(project) || path.dirname(project) === iosFolder)
|
||||
.sort(project => (path.dirname(project) === iosFolder ? -1 : 1))
|
||||
// sort alphabetically to ensure this works the same across different devices (Fail in CI (linux) without this)
|
||||
.sort();
|
||||
if (!pbxprojPaths.length) {
|
||||
throw new Error(`Failed to locate the ios/*.xcodeproj files relative to path "${projectRoot}".`);
|
||||
}
|
||||
return pbxprojPaths.map(value => path.join(projectRoot, value));
|
||||
}
|
||||
exports.getAllXcodeProjectPaths = getAllXcodeProjectPaths;
|
||||
function getAllPBXProjectPaths(projectRoot) {
|
||||
const projectPaths = getAllXcodeProjectPaths(projectRoot);
|
||||
const paths = projectPaths
|
||||
.map(value => path.join(value, 'project.pbxproj'))
|
||||
.filter(value => fs_extra_1.pathExistsSync(value));
|
||||
if (!paths.length) {
|
||||
throw new Error(`Failed to locate the ios/*.xcodeproj/project.pbxproj files relative to path "${projectRoot}".`);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
exports.getAllPBXProjectPaths = getAllPBXProjectPaths;
|
||||
function getApplicationNativeTarget({ project, projectName, }) {
|
||||
const applicationNativeTarget = project.getTarget('com.apple.product-type.application');
|
||||
assert_1.default(applicationNativeTarget, `Couldn't locate application PBXNativeTarget in '.xcodeproj' file.`);
|
||||
assert_1.default(String(applicationNativeTarget.target.name) === projectName, `Application native target name mismatch. Expected ${projectName}, but found ${applicationNativeTarget.target.name}.`);
|
||||
return applicationNativeTarget;
|
||||
}
|
||||
exports.getApplicationNativeTarget = getApplicationNativeTarget;
|
||||
//# sourceMappingURL=Paths.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/Paths.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/Paths.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Paths.js","sourceRoot":"","sources":["../../src/ios/Paths.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAwD;AACxD,oDAA4B;AAC5B,uCAA0C;AAC1C,+BAAwC;AACxC,2CAA6B;AAG7B,MAAM,YAAY,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAE7D,SAAgB,uBAAuB,CAAC,WAAmB;IACzD,MAAM,SAAS,GAAG,KAAK,CAAC;IACxB,MAAM,YAAY,GAAG,WAAQ,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;SACxF,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC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I,GAAG,CACtH,CAAC;IACF,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAjBD,gEAiBC","sourcesContent":["// Copied over from `@expo/config-plugins/src/ios/Paths`\nimport assert from 'assert';\nimport { pathExistsSync } from 'fs-extra';\nimport { sync as globSync } from 'glob';\nimport * as path from 'path';\nimport { XcodeProject } from 'xcode';\n\nconst ignoredPaths = ['**/@(Carthage|Pods|node_modules)/**'];\n\nexport function getAllXcodeProjectPaths(projectRoot: string): string[] {\n const iosFolder = 'ios';\n const pbxprojPaths = globSync('**/*.xcodeproj', { cwd: projectRoot, ignore: ignoredPaths })\n .filter(project => !/test|example|sample/i.test(project) || path.dirname(project) === iosFolder)\n .sort(project => (path.dirname(project) === iosFolder ? -1 : 1))\n // sort alphabetically to ensure this works the same across different devices (Fail in CI (linux) without this)\n .sort();\n\n if (!pbxprojPaths.length) {\n throw new Error(\n `Failed to locate the ios/*.xcodeproj files relative to path \"${projectRoot}\".`\n );\n }\n return pbxprojPaths.map(value => path.join(projectRoot, value));\n}\n\nexport function getAllPBXProjectPaths(projectRoot: string): string[] {\n const projectPaths = getAllXcodeProjectPaths(projectRoot);\n const paths = projectPaths\n .map(value => path.join(value, 'project.pbxproj'))\n .filter(value => pathExistsSync(value));\n\n if (!paths.length) {\n throw new Error(\n `Failed to locate the ios/*.xcodeproj/project.pbxproj files relative to path \"${projectRoot}\".`\n );\n }\n return paths;\n}\n\nexport function getApplicationNativeTarget({\n project,\n projectName,\n}: {\n project: XcodeProject;\n projectName: string;\n}) {\n const applicationNativeTarget = project.getTarget('com.apple.product-type.application');\n assert(\n applicationNativeTarget,\n `Couldn't locate application PBXNativeTarget in '.xcodeproj' file.`\n );\n assert(\n String(applicationNativeTarget.target.name) === projectName,\n `Application native target name mismatch. Expected ${projectName}, but found ${applicationNativeTarget.target.name}.`\n );\n return applicationNativeTarget;\n}\n"]}
|
10
node_modules/@expo/configure-splash-screen/build/ios/Storyboard.d.ts
generated
vendored
Normal file
10
node_modules/@expo/configure-splash-screen/build/ios/Storyboard.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { SplashScreenImageResizeModeType } from '../constants';
|
||||
import { IosProject } from './pbxproj';
|
||||
/**
|
||||
* Creates [STORYBOARD] file containing ui description of Splash/Launch Screen.
|
||||
* > WARNING: modifies `pbxproj`
|
||||
*/
|
||||
export default function configureStoryboard(iosProject: IosProject, config?: {
|
||||
imageResizeMode?: SplashScreenImageResizeModeType;
|
||||
image?: string;
|
||||
}): Promise<void>;
|
151
node_modules/@expo/configure-splash-screen/build/ios/Storyboard.js
generated
vendored
Normal file
151
node_modules/@expo/configure-splash-screen/build/ios/Storyboard.js
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const constants_1 = require("../constants");
|
||||
const file_utils_1 = require("../utils/file-utils");
|
||||
const xcode_1 = require("../xcode");
|
||||
const STORYBOARD_FILE_PATH = './SplashScreen.storyboard';
|
||||
/**
|
||||
* Modifies `.pbxproj` by:
|
||||
* - adding reference for `.storyboard` file
|
||||
*/
|
||||
function updatePbxProject({ projectName, pbxProject, applicationNativeTarget }) {
|
||||
// Check if `${projectName}/SplashScreen.storyboard` already exists
|
||||
// Path relative to `ios` directory
|
||||
const storyboardFilePath = path_1.default.join(projectName, STORYBOARD_FILE_PATH);
|
||||
if (!pbxProject.hasFile(storyboardFilePath)) {
|
||||
const group = pbxProject.findPBXGroupKey({ name: projectName });
|
||||
if (!group) {
|
||||
throw new Error(`Couldn't locate proper PBXGroup '.xcodeproj' file.`);
|
||||
}
|
||||
xcode_1.addStoryboardFileToProject(pbxProject, storyboardFilePath, {
|
||||
target: applicationNativeTarget.uuid,
|
||||
group,
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates [STORYBOARD] file containing ui description of Splash/Launch Screen.
|
||||
* > WARNING: modifies `pbxproj`
|
||||
*/
|
||||
async function configureStoryboard(iosProject, config = {}) {
|
||||
var _a;
|
||||
const resizeMode = (_a = config.imageResizeMode) !== null && _a !== void 0 ? _a : constants_1.SplashScreenImageResizeMode.CONTAIN;
|
||||
const splashScreenImagePresent = Boolean(config.image);
|
||||
let contentMode;
|
||||
switch (resizeMode) {
|
||||
case constants_1.SplashScreenImageResizeMode.CONTAIN:
|
||||
contentMode = 'scaleAspectFit';
|
||||
break;
|
||||
case constants_1.SplashScreenImageResizeMode.COVER:
|
||||
contentMode = 'scaleAspectFill';
|
||||
break;
|
||||
default:
|
||||
throw new Error(`resizeMode = ${resizeMode} is not supported for iOS platform.`);
|
||||
}
|
||||
const filePath = path_1.default.resolve(iosProject.projectPath, STORYBOARD_FILE_PATH);
|
||||
await file_utils_1.createDirAndWriteFile(filePath, `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document
|
||||
type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
|
||||
version="3.0"
|
||||
toolsVersion="16096"
|
||||
targetRuntime="iOS.CocoaTouch"
|
||||
propertyAccessControl="none"
|
||||
useAutolayout="YES"
|
||||
launchScreen="YES"
|
||||
useTraitCollections="YES"
|
||||
useSafeAreas="YES"
|
||||
colorMatched="YES"
|
||||
initialViewController="EXPO-VIEWCONTROLLER-1"
|
||||
>
|
||||
<device id="retina5_5" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EXPO-SCENE-1">
|
||||
<objects>
|
||||
<viewController
|
||||
storyboardIdentifier="SplashScreenViewController"
|
||||
id="EXPO-VIEWCONTROLLER-1"
|
||||
sceneMemberID="viewController"
|
||||
>
|
||||
<view
|
||||
key="view"
|
||||
userInteractionEnabled="NO"
|
||||
contentMode="scaleToFill"
|
||||
insetsLayoutMarginsFromSafeArea="NO"
|
||||
id="EXPO-ContainerView"
|
||||
userLabel="ContainerView"
|
||||
>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView
|
||||
userInteractionEnabled="NO"
|
||||
contentMode="scaleAspectFill"
|
||||
horizontalHuggingPriority="251"
|
||||
verticalHuggingPriority="251"
|
||||
insetsLayoutMarginsFromSafeArea="NO"
|
||||
image="SplashScreenBackground"
|
||||
translatesAutoresizingMaskIntoConstraints="NO"
|
||||
id="EXPO-SplashScreenBackground"
|
||||
userLabel="SplashScreenBackground"
|
||||
>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
||||
</imageView>${!splashScreenImagePresent
|
||||
? ''
|
||||
: `
|
||||
<imageView
|
||||
clipsSubviews="YES"
|
||||
userInteractionEnabled="NO"
|
||||
contentMode="${contentMode}"
|
||||
horizontalHuggingPriority="251"
|
||||
verticalHuggingPriority="251"
|
||||
translatesAutoresizingMaskIntoConstraints="NO"
|
||||
image="SplashScreen"
|
||||
id="EXPO-SplashScreen"
|
||||
userLabel="SplashScreen"
|
||||
>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
||||
</imageView>`}
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="1gX-mQ-vu6"/>
|
||||
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="6tX-OG-Sck"/>
|
||||
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="ABX-8g-7v4"/>
|
||||
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="jkI-2V-eW5"/>${!splashScreenImagePresent
|
||||
? ''
|
||||
: `
|
||||
<constraint firstItem="EXPO-SplashScreen" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="2VS-Uz-0LU"/>
|
||||
<constraint firstItem="EXPO-SplashScreen" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="LhH-Ei-DKo"/>
|
||||
<constraint firstItem="EXPO-SplashScreen" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="I6l-TP-6fn"/>
|
||||
<constraint firstItem="EXPO-SplashScreen" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="nbp-HC-eaG"/>`}
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="Rmq-lb-GrQ"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="EXPO-PLACEHOLDER-1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="140.625" y="129.4921875"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>${!splashScreenImagePresent
|
||||
? ''
|
||||
: `
|
||||
<image name="SplashScreen" width="414" height="736"/>`}
|
||||
<image name="SplashScreenBackground" width="1" height="1"/>
|
||||
</resources>
|
||||
</document>
|
||||
`);
|
||||
await updatePbxProject(iosProject);
|
||||
}
|
||||
exports.default = configureStoryboard;
|
||||
//# sourceMappingURL=Storyboard.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/Storyboard.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/Storyboard.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/@expo/configure-splash-screen/build/ios/index.d.ts
generated
vendored
Normal file
2
node_modules/@expo/configure-splash-screen/build/ios/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import { IosSplashScreenConfigJSON } from '../SplashScreenConfig';
|
||||
export default function configureIos(projectRootPath: string, config: IosSplashScreenConfigJSON): Promise<void>;
|
25
node_modules/@expo/configure-splash-screen/build/ios/index.js
generated
vendored
Normal file
25
node_modules/@expo/configure-splash-screen/build/ios/index.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs_extra_1 = __importDefault(require("fs-extra"));
|
||||
const validators_1 = require("../validators");
|
||||
const BackgroundAsset_1 = __importDefault(require("./BackgroundAsset"));
|
||||
const ImageAsset_1 = __importDefault(require("./ImageAsset"));
|
||||
const Info_plist_1 = __importDefault(require("./Info.plist"));
|
||||
const Storyboard_1 = __importDefault(require("./Storyboard"));
|
||||
const pbxproj_1 = __importDefault(require("./pbxproj"));
|
||||
async function configureIos(projectRootPath, config) {
|
||||
const validatedConfig = await validators_1.validateIosConfig(config);
|
||||
const iosProject = await pbxproj_1.default(projectRootPath);
|
||||
await Promise.all([
|
||||
Info_plist_1.default(iosProject.projectPath, validatedConfig),
|
||||
ImageAsset_1.default(iosProject.projectPath, validatedConfig),
|
||||
BackgroundAsset_1.default(iosProject.projectPath, validatedConfig),
|
||||
Storyboard_1.default(iosProject, validatedConfig),
|
||||
]);
|
||||
await fs_extra_1.default.writeFile(iosProject.pbxProject.filepath, iosProject.pbxProject.writeSync());
|
||||
}
|
||||
exports.default = configureIos;
|
||||
//# sourceMappingURL=index.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/index.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ios/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0B;AAG1B,8CAAkD;AAClD,wEAAyD;AACzD,8DAA+C;AAC/C,8DAA8C;AAC9C,8DAA+C;AAC/C,wDAAuC;AAExB,KAAK,UAAU,YAAY,CACxC,eAAuB,EACvB,MAAiC;IAEjC,MAAM,eAAe,GAAG,MAAM,8BAAiB,CAAC,MAAM,CAAC,CAAC;IAExD,MAAM,UAAU,GAAG,MAAM,iBAAc,CAAC,eAAe,CAAC,CAAC;IAEzD,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,oBAAkB,CAAC,UAAU,CAAC,WAAW,EAAE,eAAe,CAAC;QAC3D,oBAAmB,CAAC,UAAU,CAAC,WAAW,EAAE,eAAe,CAAC;QAC5D,yBAAwB,CAAC,UAAU,CAAC,WAAW,EAAE,eAAe,CAAC;QACjE,oBAAmB,CAAC,UAAU,EAAE,eAAe,CAAC;KACjD,CAAC,CAAC;IAEH,MAAM,kBAAE,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;AACxF,CAAC;AAhBD,+BAgBC","sourcesContent":["import fs from 'fs-extra';\n\nimport { IosSplashScreenConfigJSON } from '../SplashScreenConfig';\nimport { validateIosConfig } from '../validators';\nimport configureBackgroundAsset from './BackgroundAsset';\nimport configureImageAsset from './ImageAsset';\nimport configureInfoPlist from './Info.plist';\nimport configureStoryboard from './Storyboard';\nimport readPbxProject from './pbxproj';\n\nexport default async function configureIos(\n projectRootPath: string,\n config: IosSplashScreenConfigJSON\n) {\n const validatedConfig = await validateIosConfig(config);\n\n const iosProject = await readPbxProject(projectRootPath);\n\n await Promise.all([\n configureInfoPlist(iosProject.projectPath, validatedConfig),\n configureImageAsset(iosProject.projectPath, validatedConfig),\n configureBackgroundAsset(iosProject.projectPath, validatedConfig),\n configureStoryboard(iosProject, validatedConfig),\n ]);\n\n await fs.writeFile(iosProject.pbxProject.filepath, iosProject.pbxProject.writeSync());\n}\n"]}
|
23
node_modules/@expo/configure-splash-screen/build/ios/pbxproj.d.ts
generated
vendored
Normal file
23
node_modules/@expo/configure-splash-screen/build/ios/pbxproj.d.ts
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
import { PBXNativeTarget, UUID, XcodeProject } from 'xcode';
|
||||
export interface IosProject {
|
||||
projectName: string;
|
||||
/**
|
||||
* Root path to directory containing project source files.
|
||||
*/
|
||||
projectPath: string;
|
||||
/**
|
||||
* pbxProject reference that allows to modify `.pbxproj` file.
|
||||
*/
|
||||
pbxProject: XcodeProject;
|
||||
/**
|
||||
* main application PBXNativeTarget from `.pbxproj` file.
|
||||
*/
|
||||
applicationNativeTarget: {
|
||||
uuid: UUID;
|
||||
target: PBXNativeTarget;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Reads iOS project and locates `.pbxproj` file for further parsing and modifications.
|
||||
*/
|
||||
export default function readPbxProject(projectRootPath: string): Promise<IosProject>;
|
58
node_modules/@expo/configure-splash-screen/build/ios/pbxproj.js
generated
vendored
Normal file
58
node_modules/@expo/configure-splash-screen/build/ios/pbxproj.js
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (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 (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path = __importStar(require("path"));
|
||||
const xcode_1 = __importDefault(require("xcode"));
|
||||
const Paths_1 = require("./Paths");
|
||||
function getProjectConfig(projectRoot) {
|
||||
return {
|
||||
projectPath: Paths_1.getAllXcodeProjectPaths(projectRoot)[0],
|
||||
pbxprojPath: Paths_1.getAllPBXProjectPaths(projectRoot)[0],
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Reads iOS project and locates `.pbxproj` file for further parsing and modifications.
|
||||
*/
|
||||
async function readPbxProject(projectRootPath) {
|
||||
const config = getProjectConfig(projectRootPath);
|
||||
const { projectPath: xcodeProjPath, pbxprojPath } = config;
|
||||
const projectPath = xcodeProjPath.substring(0, xcodeProjPath.length - '.xcodeproj'.length);
|
||||
const projectName = path.basename(projectPath);
|
||||
const pbxProject = xcode_1.default.project(pbxprojPath);
|
||||
await new Promise(resolve => pbxProject.parse(err => {
|
||||
if (err) {
|
||||
throw new Error(`.pbxproj file parsing issue: ${err.message}.`);
|
||||
}
|
||||
resolve();
|
||||
}));
|
||||
const applicationNativeTarget = Paths_1.getApplicationNativeTarget({ project: pbxProject, projectName });
|
||||
return {
|
||||
projectName,
|
||||
projectPath,
|
||||
pbxProject,
|
||||
applicationNativeTarget,
|
||||
};
|
||||
}
|
||||
exports.default = readPbxProject;
|
||||
//# sourceMappingURL=pbxproj.js.map
|
1
node_modules/@expo/configure-splash-screen/build/ios/pbxproj.js.map
generated
vendored
Normal file
1
node_modules/@expo/configure-splash-screen/build/ios/pbxproj.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"pbxproj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BXNativeTarget, UUID, XcodeProject } from 'xcode';\n\nimport {\n getAllPBXProjectPaths,\n getAllXcodeProjectPaths,\n getApplicationNativeTarget,\n} from './Paths';\n\nexport interface IosProject {\n projectName: string;\n /**\n * Root path to directory containing project source files.\n */\n projectPath: string;\n /**\n * pbxProject reference that allows to modify `.pbxproj` file.\n */\n pbxProject: XcodeProject;\n /**\n * main application PBXNativeTarget from `.pbxproj` file.\n */\n applicationNativeTarget: { uuid: UUID; target: PBXNativeTarget };\n}\n\nfunction getProjectConfig(projectRoot: string): { projectPath: string; pbxprojPath: string } {\n return {\n projectPath: getAllXcodeProjectPaths(projectRoot)[0]!,\n pbxprojPath: getAllPBXProjectPaths(projectRoot)[0]!,\n };\n}\n\n/**\n * Reads iOS project and locates `.pbxproj` file for further parsing and modifications.\n */\nexport default async function readPbxProject(projectRootPath: string): Promise<IosProject> {\n const config = getProjectConfig(projectRootPath);\n\n const { projectPath: xcodeProjPath, pbxprojPath } = config;\n\n const projectPath = xcodeProjPath.substring(0, xcodeProjPath.length - '.xcodeproj'.length);\n const projectName = path.basename(projectPath);\n\n const pbxProject = xcode.project(pbxprojPath);\n\n await new Promise<void>(resolve =>\n pbxProject.parse(err => {\n if (err) {\n throw new Error(`.pbxproj file parsing issue: ${err.message}.`);\n }\n resolve();\n })\n );\n\n const applicationNativeTarget = getApplicationNativeTarget({ project: pbxProject, projectName });\n\n return {\n projectName,\n projectPath,\n pbxProject,\n applicationNativeTarget,\n };\n}\n"]}
|
Reference in New Issue
Block a user