bundo-appgen 0.0.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +253 -0
- package/bin.mjs +21 -0
- package/lib/bin/bin.mjs +1141 -0
- package/lib/bin/plugin-sandbox-runner.mjs +105 -0
- package/lib/commonjs/index.js +125 -0
- package/lib/module/chunk-bhc5nymd.js +12 -0
- package/lib/module/chunk-dvyy3g4j.js +25 -0
- package/lib/module/chunk-ynqw05p0.js +70 -0
- package/lib/module/config/apple/create-osx-appiconset.js +6 -0
- package/lib/module/config/apple/index.js +7 -0
- package/lib/module/config/index.js +8 -0
- package/lib/module/index.js +8 -0
- package/lib/typescript/config/apple/asset-catalog-format/app-icon/index.d.ts +3 -0
- package/lib/typescript/config/apple/asset-catalog-format/app-icon/index.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/app-icon/set-type.d.ts +42 -0
- package/lib/typescript/config/apple/asset-catalog-format/app-icon/set-type.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/app-icon/size.d.ts +21 -0
- package/lib/typescript/config/apple/asset-catalog-format/app-icon/size.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/appearances.d.ts +13 -0
- package/lib/typescript/config/apple/asset-catalog-format/appearances.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/idiom.d.ts +5 -0
- package/lib/typescript/config/apple/asset-catalog-format/idiom.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/color-space.d.ts +2 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/color-space.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/compression-type.d.ts +2 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/compression-type.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/display-gamut.d.ts +2 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/display-gamut.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/index.d.ts +6 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/index.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/language-direction.d.ts +2 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/language-direction.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/scale.d.ts +9 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/scale.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/set-type.d.ts +58 -0
- package/lib/typescript/config/apple/asset-catalog-format/image/set-type.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalog-format/index.d.ts +5 -0
- package/lib/typescript/config/apple/asset-catalog-format/index.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalogs-namespaced.d.ts +5 -0
- package/lib/typescript/config/apple/asset-catalogs-namespaced.d.ts.map +1 -0
- package/lib/typescript/config/apple/asset-catalogs.d.ts +73 -0
- package/lib/typescript/config/apple/asset-catalogs.d.ts.map +1 -0
- package/lib/typescript/config/apple/create-osx-appiconset.d.mts +72 -0
- package/lib/typescript/config/apple/create-osx-appiconset.d.mts.map +1 -0
- package/lib/typescript/config/apple/data.d.ts +103 -0
- package/lib/typescript/config/apple/data.d.ts.map +1 -0
- package/lib/typescript/config/apple/index.d.mts +8 -0
- package/lib/typescript/config/apple/index.d.mts.map +1 -0
- package/lib/typescript/config/apple/info-plist-value.d.ts +8 -0
- package/lib/typescript/config/apple/info-plist-value.d.ts.map +1 -0
- package/lib/typescript/config/apple/info-plist.d.ts +4 -0
- package/lib/typescript/config/apple/info-plist.d.ts.map +1 -0
- package/lib/typescript/config/apple/string-catalog.d.ts +2 -0
- package/lib/typescript/config/apple/string-catalog.d.ts.map +1 -0
- package/lib/typescript/config/data.d.ts +50 -0
- package/lib/typescript/config/data.d.ts.map +1 -0
- package/lib/typescript/config/index.d.mts +5 -0
- package/lib/typescript/config/index.d.mts.map +1 -0
- package/lib/typescript/config/plugin-item.d.ts +2 -0
- package/lib/typescript/config/plugin-item.d.ts.map +1 -0
- package/lib/typescript/config/plugin-registry.d.ts +3 -0
- package/lib/typescript/config/plugin-registry.d.ts.map +1 -0
- package/lib/typescript/index.d.mts +3 -0
- package/lib/typescript/index.d.mts.map +1 -0
- package/lib/typescript/plugin/apple/context.d.ts +28 -0
- package/lib/typescript/plugin/apple/context.d.ts.map +1 -0
- package/lib/typescript/plugin/apple/files.d.ts +7 -0
- package/lib/typescript/plugin/apple/files.d.ts.map +1 -0
- package/lib/typescript/plugin/apple/index.d.ts +6 -0
- package/lib/typescript/plugin/apple/index.d.ts.map +1 -0
- package/lib/typescript/plugin/apple/pod-spec-source-from-cocoapods.d.ts +5 -0
- package/lib/typescript/plugin/apple/pod-spec-source-from-cocoapods.d.ts.map +1 -0
- package/lib/typescript/plugin/apple/pod-spec-source-from-git.d.ts +11 -0
- package/lib/typescript/plugin/apple/pod-spec-source-from-git.d.ts.map +1 -0
- package/lib/typescript/plugin/apple/pod-spec-source-from-local.d.ts +7 -0
- package/lib/typescript/plugin/apple/pod-spec-source-from-local.d.ts.map +1 -0
- package/lib/typescript/plugin/context.d.ts +9 -0
- package/lib/typescript/plugin/context.d.ts.map +1 -0
- package/lib/typescript/plugin/index.d.ts +3 -0
- package/lib/typescript/plugin/index.d.ts.map +1 -0
- package/package.json +49 -0
- package/src/_bin/_global-vars/_global-vars.mts +47 -0
- package/src/_bin/_global-vars/index.mts +30 -0
- package/src/_bin/_main/_check-config-validity.mts +94 -0
- package/src/_bin/_main/_evaluate-plugin-registry.mts +181 -0
- package/src/_bin/_main/_exec-plugin-runner/_spawn-plugin-sandbox-runner.mts +149 -0
- package/src/_bin/_main/_exec-plugin-runner/exec-plugin-runner.mts +92 -0
- package/src/_bin/_main/_exec-plugin-runner/index.mts +1 -0
- package/src/_bin/_main/_get-config.mts +64 -0
- package/src/_bin/_main/_helpers/config/get-name.mts +24 -0
- package/src/_bin/_main/_helpers/config/get-project-name.mts +27 -0
- package/src/_bin/_main/_helpers/config/index.mts +2 -0
- package/src/_bin/_main/_helpers/index.mts +2 -0
- package/src/_bin/_main/_helpers/platform/compatibility-error.mts +7 -0
- package/src/_bin/_main/_helpers/platform/data.ts +9 -0
- package/src/_bin/_main/_helpers/platform/get-data.mts +48 -0
- package/src/_bin/_main/_helpers/platform/index.mts +4 -0
- package/src/_bin/_main/_helpers/platform/is-compatible.mts +30 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_init-appiconsets.mts +223 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_init-imagesets.mts +241 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/appearances.mts +24 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/idiom.mts +22 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/image/compression-type.mts +15 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/image/display-gamut.mts +12 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/image/index.mts +3 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/image/language-direction.mts +12 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/_metadata-check/index.mts +3 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/create-asset-catalogs.mts +54 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-asset-catalogs/index.mts +1 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-string-catalogs/create-string-catalog.mts +134 -0
- package/src/_bin/_main/_init-template/_init-apple/_create-string-catalogs/index.mts +1 -0
- package/src/_bin/_main/_init-template/_init-apple/_mod-files/_app-delegate-swift.mts +62 -0
- package/src/_bin/_main/_init-template/_init-apple/_mod-files/_podfile.mts +31 -0
- package/src/_bin/_main/_init-template/_init-apple/_mod-files/index.mts +1 -0
- package/src/_bin/_main/_init-template/_init-apple/_mod-files/mod-files.mts +17 -0
- package/src/_bin/_main/_init-template/_init-apple/index.mts +1 -0
- package/src/_bin/_main/_init-template/_init-apple/init-apple.mts +81 -0
- package/src/_bin/_main/_init-template/index.mts +1 -0
- package/src/_bin/_main/_init-template/init-template.mts +39 -0
- package/src/_bin/_main/_mod-plugin/index.mts +1 -0
- package/src/_bin/_main/_mod-plugin/mod-plugin.mts +77 -0
- package/src/_bin/_main/_xcodegen/_create-project-spec/_init-resources.mts +86 -0
- package/src/_bin/_main/_xcodegen/_create-project-spec/create-project-spec.mts +216 -0
- package/src/_bin/_main/_xcodegen/_create-project-spec/index.mts +1 -0
- package/src/_bin/_main/_xcodegen/_mod-known-regions/index.ts +1 -0
- package/src/_bin/_main/_xcodegen/_mod-known-regions/mod-known-regions.mts +52 -0
- package/src/_bin/_main/_xcodegen/index.mts +1 -0
- package/src/_bin/_main/_xcodegen/xcodegen.mts +46 -0
- package/src/_bin/_main/index.mts +1 -0
- package/src/_bin/_main/main.mts +160 -0
- package/src/_bin/bin.mts +68 -0
- package/src/_bin/plugin-sandbox-runner/_exec-plugins.mts +135 -0
- package/src/_bin/plugin-sandbox-runner/argv-json.ts +20 -0
- package/src/_bin/plugin-sandbox-runner/evaluated-plugin-registry.ts +12 -0
- package/src/_bin/plugin-sandbox-runner/index.ts +3 -0
- package/src/_bin/plugin-sandbox-runner/plugin-runner-context-result.ts +33 -0
- package/src/_bin/plugin-sandbox-runner/plugin-sandbox-runner.mts +68 -0
- package/src/config/apple/asset-catalog-format/app-icon/index.ts +2 -0
- package/src/config/apple/asset-catalog-format/app-icon/set-type.ts +59 -0
- package/src/config/apple/asset-catalog-format/app-icon/size.ts +37 -0
- package/src/config/apple/asset-catalog-format/appearances.ts +10 -0
- package/src/config/apple/asset-catalog-format/idiom.ts +16 -0
- package/src/config/apple/asset-catalog-format/image/color-space.ts +3 -0
- package/src/config/apple/asset-catalog-format/image/compression-type.ts +6 -0
- package/src/config/apple/asset-catalog-format/image/display-gamut.ts +3 -0
- package/src/config/apple/asset-catalog-format/image/index.ts +6 -0
- package/src/config/apple/asset-catalog-format/image/language-direction.ts +3 -0
- package/src/config/apple/asset-catalog-format/image/scale.ts +11 -0
- package/src/config/apple/asset-catalog-format/image/set-type.ts +85 -0
- package/src/config/apple/asset-catalog-format/index.ts +4 -0
- package/src/config/apple/asset-catalogs-namespaced.ts +13 -0
- package/src/config/apple/asset-catalogs.ts +76 -0
- package/src/config/apple/create-osx-appiconset.mts +135 -0
- package/src/config/apple/data.ts +123 -0
- package/src/config/apple/index.mts +7 -0
- package/src/config/apple/info-plist-value.ts +16 -0
- package/src/config/apple/info-plist.ts +6 -0
- package/src/config/apple/string-catalog.ts +0 -0
- package/src/config/data.ts +59 -0
- package/src/config/index.mts +4 -0
- package/src/config/plugin-item.ts +4 -0
- package/src/config/plugin-registry.ts +5 -0
- package/src/index.mts +2 -0
- package/src/plugin/apple/context.ts +68 -0
- package/src/plugin/apple/files.ts +14 -0
- package/src/plugin/apple/index.ts +5 -0
- package/src/plugin/apple/pod-spec-source-from-cocoapods.ts +9 -0
- package/src/plugin/apple/pod-spec-source-from-git.ts +13 -0
- package/src/plugin/apple/pod-spec-source-from-local.ts +6 -0
- package/src/plugin/context.ts +12 -0
- package/src/plugin/index.ts +2 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/_bin/plugin-sandbox-runner/plugin-sandbox-runner.mts
|
|
4
|
+
import yargs from "yargs";
|
|
5
|
+
import * as YargsHelpers from "yargs/helpers";
|
|
6
|
+
|
|
7
|
+
// src/_bin/plugin-sandbox-runner/_exec-plugins.mts
|
|
8
|
+
import * as node_fs from "node:fs";
|
|
9
|
+
import * as node_path from "node:path";
|
|
10
|
+
async function execPlugins({
|
|
11
|
+
projectDirectory,
|
|
12
|
+
projectName,
|
|
13
|
+
registry
|
|
14
|
+
}) {
|
|
15
|
+
if (!registry?.length) {
|
|
16
|
+
throw new Error("Not a valid Evaluated Plugin Registry array.");
|
|
17
|
+
}
|
|
18
|
+
const paths = {
|
|
19
|
+
templates: {
|
|
20
|
+
macos: node_path.join(projectDirectory, "macos")
|
|
21
|
+
}
|
|
22
|
+
}, contextResult = {
|
|
23
|
+
macos: {
|
|
24
|
+
files: {
|
|
25
|
+
Podfile: node_fs.readFileSync(node_path.join(paths.templates.macos, "Podfile"), "utf8"),
|
|
26
|
+
Project: {
|
|
27
|
+
"AppDelegate.swift": node_fs.readFileSync(node_path.join(paths.templates.macos, projectName, "AppDelegate.swift"), "utf8")
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
infoPlist: {}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
for (const plugin of registry) {
|
|
34
|
+
const pluginMainFn = await import(plugin.mainPath).then((mod) => {
|
|
35
|
+
return mod.default;
|
|
36
|
+
});
|
|
37
|
+
try {
|
|
38
|
+
await pluginMainFn({
|
|
39
|
+
get macos() {
|
|
40
|
+
return {
|
|
41
|
+
get files() {
|
|
42
|
+
return {
|
|
43
|
+
get Podfile() {
|
|
44
|
+
return contextResult.macos.files.Podfile;
|
|
45
|
+
},
|
|
46
|
+
set Podfile(value) {
|
|
47
|
+
contextResult.macos.files.Podfile = value;
|
|
48
|
+
},
|
|
49
|
+
get Project() {
|
|
50
|
+
return {
|
|
51
|
+
get "AppDelegate.swift"() {
|
|
52
|
+
return contextResult.macos.files.Project["AppDelegate.swift"];
|
|
53
|
+
},
|
|
54
|
+
set "AppDelegate.swift"(value) {
|
|
55
|
+
contextResult.macos.files.Project["AppDelegate.swift"] = value;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
infoPlist: contextResult.macos.infoPlist
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
parameter: plugin.parameter
|
|
65
|
+
});
|
|
66
|
+
} catch (err) {
|
|
67
|
+
if (err instanceof Error) {
|
|
68
|
+
throw new Error(plugin.name + `${err.stack ? `
|
|
69
|
+
` + err.stack : ""}`);
|
|
70
|
+
}
|
|
71
|
+
throw err;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return contextResult;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// src/_bin/plugin-sandbox-runner/plugin-sandbox-runner.mts
|
|
78
|
+
try {
|
|
79
|
+
const argv = yargs(YargsHelpers.hideBin(process.argv)).options({
|
|
80
|
+
json: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "See bundo-appgen/src/_bin/plugin-sandbox-runner/_argv-json.ts"
|
|
83
|
+
}
|
|
84
|
+
}).parseSync(), argvJSON = JSON.parse(argv.json || "");
|
|
85
|
+
if (!argvJSON.evaluatedPluginRegistry?.length) {
|
|
86
|
+
throw new Error("Not a valid Evaluated Plugin Registry array.");
|
|
87
|
+
}
|
|
88
|
+
const result = await execPlugins({
|
|
89
|
+
projectDirectory: argvJSON.projectDirectory,
|
|
90
|
+
projectName: argvJSON.projectName,
|
|
91
|
+
registry: argvJSON.evaluatedPluginRegistry
|
|
92
|
+
});
|
|
93
|
+
process.send?.(JSON.stringify({
|
|
94
|
+
...result,
|
|
95
|
+
messageID: argvJSON.messageID
|
|
96
|
+
}));
|
|
97
|
+
} catch (err) {
|
|
98
|
+
if (err instanceof Error && err.message) {
|
|
99
|
+
console.error("\x1B[31mPlugin Sandbox Runner Error\x1B[0m: " + err.message);
|
|
100
|
+
process.exitCode = 1;
|
|
101
|
+
} else {
|
|
102
|
+
console.error("Unknown error. Please report it to https://github.com/RakaDoank/bundo.rn", { cause: err });
|
|
103
|
+
process.exitCode = 1;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toCommonJS = (from) => {
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
10
|
+
if (entry)
|
|
11
|
+
return entry;
|
|
12
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
__moduleCache.set(from, entry);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, {
|
|
32
|
+
get: all[name],
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/index.mts
|
|
40
|
+
var exports_src = {};
|
|
41
|
+
__export(exports_src, {
|
|
42
|
+
Config: () => exports_config
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(exports_src);
|
|
45
|
+
|
|
46
|
+
// src/config/index.mts
|
|
47
|
+
var exports_config = {};
|
|
48
|
+
__export(exports_config, {
|
|
49
|
+
Apple: () => exports_apple
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// src/config/apple/index.mts
|
|
53
|
+
var exports_apple = {};
|
|
54
|
+
__export(exports_apple, {
|
|
55
|
+
createOSXappiconset: () => createOSXappiconset
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// src/config/apple/create-osx-appiconset.mts
|
|
59
|
+
function createOSXappiconset(data) {
|
|
60
|
+
return {
|
|
61
|
+
name: data.name,
|
|
62
|
+
images: [
|
|
63
|
+
{
|
|
64
|
+
path: data.images["16x16"] || data.images["1024x1024"],
|
|
65
|
+
size: "16x16",
|
|
66
|
+
idiom: "mac",
|
|
67
|
+
scale: "1x"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
path: data.images["32x32"] || data.images["1024x1024"],
|
|
71
|
+
size: "16x16",
|
|
72
|
+
idiom: "mac",
|
|
73
|
+
scale: "2x"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
path: data.images["32x32"] || data.images["1024x1024"],
|
|
77
|
+
size: "32x32",
|
|
78
|
+
idiom: "mac",
|
|
79
|
+
scale: "1x"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
path: data.images["64x64"] || data.images["1024x1024"],
|
|
83
|
+
size: "32x32",
|
|
84
|
+
idiom: "mac",
|
|
85
|
+
scale: "2x"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
path: data.images["128x128"] || data.images["1024x1024"],
|
|
89
|
+
size: "128x128",
|
|
90
|
+
idiom: "mac",
|
|
91
|
+
scale: "1x"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
path: data.images["256x256"] || data.images["1024x1024"],
|
|
95
|
+
size: "128x128",
|
|
96
|
+
idiom: "mac",
|
|
97
|
+
scale: "2x"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
path: data.images["256x256"] || data.images["1024x1024"],
|
|
101
|
+
size: "256x256",
|
|
102
|
+
idiom: "mac",
|
|
103
|
+
scale: "1x"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
path: data.images["512x512"] || data.images["1024x1024"],
|
|
107
|
+
size: "256x256",
|
|
108
|
+
idiom: "mac",
|
|
109
|
+
scale: "2x"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
path: data.images["512x512"] || data.images["1024x1024"],
|
|
113
|
+
size: "512x512",
|
|
114
|
+
idiom: "mac",
|
|
115
|
+
scale: "1x"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
path: data.images["1024x1024"],
|
|
119
|
+
size: "512x512",
|
|
120
|
+
idiom: "mac",
|
|
121
|
+
scale: "2x"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createOSXappiconset2
|
|
3
|
+
} from "./chunk-ynqw05p0.js";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __returnValue = (v) => v;
|
|
6
|
+
function __exportSetter(name, newValue) {
|
|
7
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
8
|
+
}
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
set: __exportSetter.bind(all, name)
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// src/config/apple/index.mts
|
|
20
|
+
var exports_apple = {};
|
|
21
|
+
__export(exports_apple, {
|
|
22
|
+
createOSXappiconset: () => createOSXappiconset2
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { __export, exports_apple };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/config/apple/create-osx-appiconset.mts
|
|
2
|
+
function createOSXappiconset2(data) {
|
|
3
|
+
return {
|
|
4
|
+
name: data.name,
|
|
5
|
+
images: [
|
|
6
|
+
{
|
|
7
|
+
path: data.images["16x16"] || data.images["1024x1024"],
|
|
8
|
+
size: "16x16",
|
|
9
|
+
idiom: "mac",
|
|
10
|
+
scale: "1x"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
path: data.images["32x32"] || data.images["1024x1024"],
|
|
14
|
+
size: "16x16",
|
|
15
|
+
idiom: "mac",
|
|
16
|
+
scale: "2x"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
path: data.images["32x32"] || data.images["1024x1024"],
|
|
20
|
+
size: "32x32",
|
|
21
|
+
idiom: "mac",
|
|
22
|
+
scale: "1x"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
path: data.images["64x64"] || data.images["1024x1024"],
|
|
26
|
+
size: "32x32",
|
|
27
|
+
idiom: "mac",
|
|
28
|
+
scale: "2x"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: data.images["128x128"] || data.images["1024x1024"],
|
|
32
|
+
size: "128x128",
|
|
33
|
+
idiom: "mac",
|
|
34
|
+
scale: "1x"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
path: data.images["256x256"] || data.images["1024x1024"],
|
|
38
|
+
size: "128x128",
|
|
39
|
+
idiom: "mac",
|
|
40
|
+
scale: "2x"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: data.images["256x256"] || data.images["1024x1024"],
|
|
44
|
+
size: "256x256",
|
|
45
|
+
idiom: "mac",
|
|
46
|
+
scale: "1x"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
path: data.images["512x512"] || data.images["1024x1024"],
|
|
50
|
+
size: "256x256",
|
|
51
|
+
idiom: "mac",
|
|
52
|
+
scale: "2x"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
path: data.images["512x512"] || data.images["1024x1024"],
|
|
56
|
+
size: "512x512",
|
|
57
|
+
idiom: "mac",
|
|
58
|
+
scale: "1x"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: data.images["1024x1024"],
|
|
62
|
+
size: "512x512",
|
|
63
|
+
idiom: "mac",
|
|
64
|
+
scale: "2x"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { createOSXappiconset2 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/app-icon/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,QAAQ,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Appearances } from "../appearances";
|
|
2
|
+
import type { Idiom } from "../idiom";
|
|
3
|
+
import type * as Image from "../image";
|
|
4
|
+
import type { Size } from "./size";
|
|
5
|
+
export interface SetType {
|
|
6
|
+
name: string;
|
|
7
|
+
images: {
|
|
8
|
+
appearances?: Appearances;
|
|
9
|
+
"display-gamut"?: Image.DisplayGamut;
|
|
10
|
+
/**
|
|
11
|
+
* @default "universal"
|
|
12
|
+
*/
|
|
13
|
+
idiom?: Idiom;
|
|
14
|
+
/**
|
|
15
|
+
* The filename in the path will be used as the filename property for the `Contents.json`.
|
|
16
|
+
* Currently only support for PNG file.
|
|
17
|
+
*/
|
|
18
|
+
path: string;
|
|
19
|
+
/**
|
|
20
|
+
* - 16x16 - An OS X icon
|
|
21
|
+
* - 20x20 - An iPhone or iPad notification icon
|
|
22
|
+
* - 24x24 - A 38mm Apple Watch notification center icon
|
|
23
|
+
* - 27.5x27.5 - A 42mm Apple Watch notification center icon
|
|
24
|
+
* - 29x29 - An iPhone or iPad settings icon for iOS 7 or later. An Apple Watch companion settings icon
|
|
25
|
+
* - 32x32 - An OS X icon
|
|
26
|
+
* - 40x40 - An iPhone or iPad Spotlight search results icon on iOS 7 or later. The main Apple Watch app icon.
|
|
27
|
+
* - 44x44 - An Apple Watch long-look notification icon
|
|
28
|
+
* - 60x60 - The main iPhone app icon for iOS 7 or later
|
|
29
|
+
* - 76x76 - The main iPad app icon for iOS 7 or later
|
|
30
|
+
* - 83.5x83.5 - The main iPad Pro app icon
|
|
31
|
+
* - 86x86 - A 38mm Apple Watch short-look notification icon
|
|
32
|
+
* - 98x98 - A 42mm Apple Watch short-look notification icon
|
|
33
|
+
* - 128x128 - An OS X icon
|
|
34
|
+
* - 256x256 - An OS X icon
|
|
35
|
+
* - 512x512 - An OS X icon
|
|
36
|
+
* - 1024x1024 - The App Store icon
|
|
37
|
+
*/
|
|
38
|
+
size: Size;
|
|
39
|
+
scale?: Exclude<Image.Scale, "3x">;
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=set-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-type.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/app-icon/set-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EACX,KAAK,EACL,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,KAAK,KAAK,MAAM,UAAU,CAAA;AAEtC,OAAO,KAAK,EACX,IAAI,EACJ,MAAM,QAAQ,CAAA;AAEf,MAAM,WAAW,OAAO;IAEvB,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,EAAE;QAEP,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B,eAAe,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;QACrC;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC;QACd;;;WAGG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;;;;;;;;;;;;;;;;;WAkBG;QACH,IAAI,EAAE,IAAI,CAAC;QAKX,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;KAClC,EAAE,CAAC;CAEJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - 16x16 - An OS X icon
|
|
3
|
+
* - 20x20 - An iPhone or iPad notification icon
|
|
4
|
+
* - 24x24 - A 38mm Apple Watch notification center icon
|
|
5
|
+
* - 27.5x27.5 - A 42mm Apple Watch notification center icon
|
|
6
|
+
* - 29x29 - An iPhone or iPad settings icon for iOS 7 or later. An Apple Watch companion settings icon
|
|
7
|
+
* - 32x32 - An OS X icon
|
|
8
|
+
* - 40x40 - An iPhone or iPad Spotlight search results icon on iOS 7 or later. The main Apple Watch app icon.
|
|
9
|
+
* - 44x44 - An Apple Watch long-look notification icon
|
|
10
|
+
* - 60x60 - The main iPhone app icon for iOS 7 or later
|
|
11
|
+
* - 76x76 - The main iPad app icon for iOS 7 or later
|
|
12
|
+
* - 83.5x83.5 - The main iPad Pro app icon
|
|
13
|
+
* - 86x86 - A 38mm Apple Watch short-look notification icon
|
|
14
|
+
* - 98x98 - A 42mm Apple Watch short-look notification icon
|
|
15
|
+
* - 128x128 - An OS X icon
|
|
16
|
+
* - 256x256 - An OS X icon
|
|
17
|
+
* - 512x512 - An OS X icon
|
|
18
|
+
* - 1024x1024 - The App Store icon
|
|
19
|
+
*/
|
|
20
|
+
export type Size = "16x16" | "20x20" | "24x24" | "27.5x27.5" | "29x29" | "32x32" | "40x40" | "44x44" | "60x60" | "76x76" | "83.5x83.5" | "86x86" | "98x98" | "128x128" | "256x256" | "512x512" | "1024x1024";
|
|
21
|
+
//# sourceMappingURL=size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/app-icon/size.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,IAAI,GACb,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We mock this value from Xcode.
|
|
3
|
+
* Xcode generates "appearances" with array value, even the image is only one appearance variant per image.
|
|
4
|
+
*
|
|
5
|
+
* Probably, they have plan for the appearances in the future.
|
|
6
|
+
*/
|
|
7
|
+
export type Appearances = [
|
|
8
|
+
{
|
|
9
|
+
appearance: "luminosity" | "contrast";
|
|
10
|
+
value: "light" | "dark";
|
|
11
|
+
}
|
|
12
|
+
];
|
|
13
|
+
//# sourceMappingURL=appearances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearances.d.ts","sourceRoot":"","sources":["../../../../../src/config/apple/asset-catalog-format/appearances.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IAAC;QAC1B,UAAU,EAAE,YAAY,GAAG,UAAU,CAAC;QACtC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;KACxB;CAAC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @see https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/ImageSetType.html#//apple_ref/doc/uid/TP40015170-CH25-SW2
|
|
3
|
+
*/
|
|
4
|
+
export type Idiom = "appLauncher" | "companionSettings" | "ios-marketing" | "iphone" | "ipad" | "mac" | "notificationCenter" | "quickLook" | "tv" | "universal" | "watch" | "watch-marketing";
|
|
5
|
+
//# sourceMappingURL=idiom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idiom.d.ts","sourceRoot":"","sources":["../../../../../src/config/apple/asset-catalog-format/idiom.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,KAAK,GACd,aAAa,GACb,mBAAmB,GACnB,eAAe,GACf,QAAQ,GACR,MAAM,GACN,KAAK,GACL,oBAAoB,GACpB,WAAW,GACX,IAAI,GACJ,WAAW,GACX,OAAO,GACP,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-space.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/color-space.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GACnB,MAAM,GACN,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compression-type.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/compression-type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACxB,WAAW,GACX,oBAAoB,GACpB,wBAAwB,GACxB,UAAU,GACV,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-gamut.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/display-gamut.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACrB,MAAM,GACN,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/index.ts"],"names":[],"mappings":"AACA,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,iBAAiB,CAAA;AACpC,mBAAmB,sBAAsB,CAAA;AACzC,mBAAmB,SAAS,CAAA;AAC5B,mBAAmB,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-direction.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/language-direction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAC1B,eAAe,GACf,eAAe,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - 1x - Targeted for unscaled displays
|
|
3
|
+
* - 2x - Targeted for Retina displays
|
|
4
|
+
* - 3x - Targeted for Retina displays with higher density such as those on the iPhone 6 Plus
|
|
5
|
+
*
|
|
6
|
+
* @see https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/ImageSetType.html#//apple_ref/doc/uid/TP40015170-CH25-SW3
|
|
7
|
+
*/
|
|
8
|
+
export type Scale = "1x" | "2x" | "3x";
|
|
9
|
+
//# sourceMappingURL=scale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/scale.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,GACd,IAAI,GACJ,IAAI,GACJ,IAAI,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Appearances } from "../appearances";
|
|
2
|
+
import type { Idiom } from "../idiom";
|
|
3
|
+
import type { CompressionType } from "./compression-type";
|
|
4
|
+
import type { DisplayGamut } from "./display-gamut";
|
|
5
|
+
import type { LanguageDirection } from "./language-direction";
|
|
6
|
+
import type { Scale } from "./scale";
|
|
7
|
+
/**
|
|
8
|
+
* @see https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/ImageSetType.html
|
|
9
|
+
*/
|
|
10
|
+
export interface SetType {
|
|
11
|
+
/**
|
|
12
|
+
* This is the actual image name and also be used for the .imageset folder name.
|
|
13
|
+
*
|
|
14
|
+
* For example, if the name is `FooBar`, a "FooBar.imageset" directory will be created under our Asset Catalogs directory template.
|
|
15
|
+
* You can check later at "macos/<Project>/Assets.xcassets/FooBar.imageset".
|
|
16
|
+
*
|
|
17
|
+
* Then, you can access use the image in React Native by the name,
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { Image } from "react-native"
|
|
20
|
+
*
|
|
21
|
+
* export function Component() {
|
|
22
|
+
* return (<>
|
|
23
|
+
* <Image source={{ uri: "FooBar" }}/>
|
|
24
|
+
*
|
|
25
|
+
* // if a namespace is given
|
|
26
|
+
* <Image source={{ uri: "WithNamespace/FooBar" }}/>
|
|
27
|
+
* </>)
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
images: {
|
|
33
|
+
appearances?: Appearances;
|
|
34
|
+
"compression-type"?: CompressionType;
|
|
35
|
+
"display-gamut"?: DisplayGamut;
|
|
36
|
+
/**
|
|
37
|
+
* @default "universal"
|
|
38
|
+
*/
|
|
39
|
+
idiom?: Idiom;
|
|
40
|
+
languageDirection?: LanguageDirection;
|
|
41
|
+
/**
|
|
42
|
+
* The filename in the path will be used as the filename property for the `Contents.json`.
|
|
43
|
+
*
|
|
44
|
+
* The file itself supported for
|
|
45
|
+
* - .heif
|
|
46
|
+
* - .heic
|
|
47
|
+
* - .jpg
|
|
48
|
+
* - .jpeg
|
|
49
|
+
* - .png
|
|
50
|
+
*/
|
|
51
|
+
path: string;
|
|
52
|
+
/**
|
|
53
|
+
* @default "1x"
|
|
54
|
+
*/
|
|
55
|
+
scale?: Scale;
|
|
56
|
+
}[];
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=set-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-type.d.ts","sourceRoot":"","sources":["../../../../../../src/config/apple/asset-catalog-format/image/set-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EACX,KAAK,EACL,MAAM,UAAU,CAAA;AAMjB,OAAO,KAAK,EACX,eAAe,EACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACX,YAAY,EACZ,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EACX,iBAAiB,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EACX,KAAK,EACL,MAAM,SAAS,CAAA;AAEhB;;GAEG;AACH,MAAM,WAAW,OAAO;IAEvB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,EAAE;QAEP,WAAW,CAAC,EAAE,WAAW,CAAC;QAG1B,kBAAkB,CAAC,EAAE,eAAe,CAAC;QACrC,eAAe,CAAC,EAAE,YAAY,CAAC;QAC/B;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;QACtC;;;;;;;;;WASG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC;KACd,EAAE,CAAC;CAEJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/config/apple/asset-catalog-format/index.ts"],"names":[],"mappings":"AAAA,YAAY,KAAK,OAAO,MAAM,YAAY,CAAA;AAC1C,mBAAmB,eAAe,CAAA;AAClC,mBAAmB,SAAS,CAAA;AAC5B,YAAY,KAAK,KAAK,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-catalogs-namespaced.d.ts","sourceRoot":"","sources":["../../../../src/config/apple/asset-catalogs-namespaced.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,MAAM,kBAAkB,CAAA;AAEzB,MAAM,MAAM,uBAAuB,GAChC,aAAa,GACb;KAKA,SAAS,IAAI,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,GAAG,uBAAuB,EAAE,aAAa,CAAC;CACpF,CAAA"}
|