@sitepong/fastnode 0.1.0
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 +81 -0
- package/bin/fastnode.js +13 -0
- package/bin/fastnode.ts +5 -0
- package/dist/actions/index.cjs +7405 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.cts +15 -0
- package/dist/actions/index.d.ts +15 -0
- package/dist/actions/index.mjs +7377 -0
- package/dist/actions/index.mjs.map +1 -0
- package/dist/cert/index.cjs +219 -0
- package/dist/cert/index.cjs.map +1 -0
- package/dist/cert/index.d.cts +4 -0
- package/dist/cert/index.d.ts +4 -0
- package/dist/cert/index.mjs +191 -0
- package/dist/cert/index.mjs.map +1 -0
- package/dist/cert-BmJGtYtb.d.cts +27 -0
- package/dist/cert-owkOFNW8.d.ts +27 -0
- package/dist/cli/index.cjs +7998 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.cts +9 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.mjs +7972 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/client/index.cjs +2592 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +2 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.mjs +2582 -0
- package/dist/client/index.mjs.map +1 -0
- package/dist/context-CymLkfrS.d.cts +13 -0
- package/dist/context-CymLkfrS.d.ts +13 -0
- package/dist/core/index.cjs +281 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.mjs +254 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/deliver/index.cjs +328 -0
- package/dist/deliver/index.cjs.map +1 -0
- package/dist/deliver/index.d.cts +3 -0
- package/dist/deliver/index.d.ts +3 -0
- package/dist/deliver/index.mjs +322 -0
- package/dist/deliver/index.mjs.map +1 -0
- package/dist/enums-B609j2rb.d.cts +20 -0
- package/dist/enums-B609j2rb.d.ts +20 -0
- package/dist/frameit/index.cjs +247 -0
- package/dist/frameit/index.cjs.map +1 -0
- package/dist/frameit/index.d.cts +1 -0
- package/dist/frameit/index.d.ts +1 -0
- package/dist/frameit/index.mjs +242 -0
- package/dist/frameit/index.mjs.map +1 -0
- package/dist/gym/index.cjs +356 -0
- package/dist/gym/index.cjs.map +1 -0
- package/dist/gym/index.d.cts +2 -0
- package/dist/gym/index.d.ts +2 -0
- package/dist/gym/index.mjs +346 -0
- package/dist/gym/index.mjs.map +1 -0
- package/dist/index-1Vu2cRQ2.d.ts +99 -0
- package/dist/index-A5MimeQk.d.ts +72 -0
- package/dist/index-B0yhu_LZ.d.ts +76 -0
- package/dist/index-B9yXicrQ.d.ts +62 -0
- package/dist/index-BFdNOmPJ.d.cts +53 -0
- package/dist/index-BLubSlgK.d.cts +1513 -0
- package/dist/index-BN0ubxjZ.d.ts +70 -0
- package/dist/index-BQJIJlK7.d.cts +70 -0
- package/dist/index-BYonklf3.d.cts +84 -0
- package/dist/index-BYonklf3.d.ts +84 -0
- package/dist/index-BimqCmY8.d.cts +78 -0
- package/dist/index-BimqCmY8.d.ts +78 -0
- package/dist/index-BoU8qt8r.d.cts +59 -0
- package/dist/index-BoU8qt8r.d.ts +59 -0
- package/dist/index-C2yG3wXA.d.cts +95 -0
- package/dist/index-C2yG3wXA.d.ts +95 -0
- package/dist/index-CR3BFPIz.d.cts +77 -0
- package/dist/index-CR3BFPIz.d.ts +77 -0
- package/dist/index-CWNLnSOL.d.cts +99 -0
- package/dist/index-Cp6cjtd-.d.cts +65 -0
- package/dist/index-Cp6cjtd-.d.ts +65 -0
- package/dist/index-D1Izm7qt.d.ts +1513 -0
- package/dist/index-D5eihzwM.d.cts +76 -0
- package/dist/index-DImN9PWc.d.ts +155 -0
- package/dist/index-DfCUVJX1.d.cts +62 -0
- package/dist/index-DfirmFbC.d.ts +32 -0
- package/dist/index-DkvinY7_.d.ts +54 -0
- package/dist/index-DrUpRXRG.d.cts +155 -0
- package/dist/index-EcVvViW8.d.cts +72 -0
- package/dist/index-HRiaaX-Q.d.cts +54 -0
- package/dist/index-TfXqwuac.d.ts +53 -0
- package/dist/index-lt819Jgj.d.cts +32 -0
- package/dist/index.cjs +8464 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.mjs +8410 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lane/index.cjs +7641 -0
- package/dist/lane/index.cjs.map +1 -0
- package/dist/lane/index.d.cts +51 -0
- package/dist/lane/index.d.ts +51 -0
- package/dist/lane/index.mjs +7603 -0
- package/dist/lane/index.mjs.map +1 -0
- package/dist/match/index.cjs +942 -0
- package/dist/match/index.cjs.map +1 -0
- package/dist/match/index.d.cts +5 -0
- package/dist/match/index.d.ts +5 -0
- package/dist/match/index.mjs +913 -0
- package/dist/match/index.mjs.map +1 -0
- package/dist/pem/index.cjs +195 -0
- package/dist/pem/index.cjs.map +1 -0
- package/dist/pem/index.d.cts +3 -0
- package/dist/pem/index.d.ts +3 -0
- package/dist/pem/index.mjs +170 -0
- package/dist/pem/index.mjs.map +1 -0
- package/dist/pilot/index.cjs +206 -0
- package/dist/pilot/index.cjs.map +1 -0
- package/dist/pilot/index.d.cts +3 -0
- package/dist/pilot/index.d.ts +3 -0
- package/dist/pilot/index.mjs +196 -0
- package/dist/pilot/index.mjs.map +1 -0
- package/dist/precheck/index.cjs +277 -0
- package/dist/precheck/index.cjs.map +1 -0
- package/dist/precheck/index.d.cts +3 -0
- package/dist/precheck/index.d.ts +3 -0
- package/dist/precheck/index.mjs +274 -0
- package/dist/precheck/index.mjs.map +1 -0
- package/dist/produce/index.cjs +200 -0
- package/dist/produce/index.cjs.map +1 -0
- package/dist/produce/index.d.cts +3 -0
- package/dist/produce/index.d.ts +3 -0
- package/dist/produce/index.mjs +191 -0
- package/dist/produce/index.mjs.map +1 -0
- package/dist/scan/index.cjs +187 -0
- package/dist/scan/index.cjs.map +1 -0
- package/dist/scan/index.d.cts +1 -0
- package/dist/scan/index.d.ts +1 -0
- package/dist/scan/index.mjs +183 -0
- package/dist/scan/index.mjs.map +1 -0
- package/dist/sigh/index.cjs +203 -0
- package/dist/sigh/index.cjs.map +1 -0
- package/dist/sigh/index.d.cts +3 -0
- package/dist/sigh/index.d.ts +3 -0
- package/dist/sigh/index.mjs +198 -0
- package/dist/sigh/index.mjs.map +1 -0
- package/dist/snapshot/index.cjs +448 -0
- package/dist/snapshot/index.cjs.map +1 -0
- package/dist/snapshot/index.d.cts +1 -0
- package/dist/snapshot/index.d.ts +1 -0
- package/dist/snapshot/index.mjs +438 -0
- package/dist/snapshot/index.mjs.map +1 -0
- package/dist/trainer/index.cjs +395 -0
- package/dist/trainer/index.cjs.map +1 -0
- package/dist/trainer/index.d.cts +1 -0
- package/dist/trainer/index.d.ts +1 -0
- package/dist/trainer/index.mjs +372 -0
- package/dist/trainer/index.mjs.map +1 -0
- package/dist/xcode/index.cjs +188 -0
- package/dist/xcode/index.cjs.map +1 -0
- package/dist/xcode/index.d.cts +1 -0
- package/dist/xcode/index.d.ts +1 -0
- package/dist/xcode/index.mjs +176 -0
- package/dist/xcode/index.mjs.map +1 -0
- package/package.json +223 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var child_process = require('child_process');
|
|
4
|
+
var util = require('util');
|
|
5
|
+
var promises = require('fs/promises');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
|
|
8
|
+
// src/frameit/index.ts
|
|
9
|
+
|
|
10
|
+
// src/frameit/devices.ts
|
|
11
|
+
function buildFrame(d) {
|
|
12
|
+
const [res] = d.resolutions;
|
|
13
|
+
const [a, b] = res;
|
|
14
|
+
const screenWidth = Math.min(a, b);
|
|
15
|
+
const screenHeight = Math.max(a, b);
|
|
16
|
+
let width;
|
|
17
|
+
let height;
|
|
18
|
+
let offsetX;
|
|
19
|
+
let offsetY;
|
|
20
|
+
switch (d.style) {
|
|
21
|
+
case "edge": {
|
|
22
|
+
const padX = Math.round(screenWidth * 0.04);
|
|
23
|
+
const padY = Math.round(screenHeight * 5e-3);
|
|
24
|
+
width = screenWidth + padX * 2;
|
|
25
|
+
height = screenHeight + padY * 2;
|
|
26
|
+
offsetX = padX;
|
|
27
|
+
offsetY = padY;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
case "bezel": {
|
|
31
|
+
const padX = Math.round(screenWidth * 0.05);
|
|
32
|
+
const padY = Math.round(screenHeight * 0.09);
|
|
33
|
+
width = screenWidth + padX * 2;
|
|
34
|
+
height = screenHeight + padY * 2;
|
|
35
|
+
offsetX = padX;
|
|
36
|
+
offsetY = padY;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
case "tablet": {
|
|
40
|
+
const padX = Math.round(screenWidth * 0.05);
|
|
41
|
+
const padY = Math.round(screenHeight * 0.05);
|
|
42
|
+
width = screenWidth + padX * 2;
|
|
43
|
+
height = screenHeight + padY * 2;
|
|
44
|
+
offsetX = padX;
|
|
45
|
+
offsetY = padY;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case "mac": {
|
|
49
|
+
const padX = Math.round(screenWidth * 0.08);
|
|
50
|
+
const padY = Math.round(screenHeight * 0.12);
|
|
51
|
+
width = screenWidth + padX * 2;
|
|
52
|
+
height = screenHeight + padY * 2;
|
|
53
|
+
offsetX = padX;
|
|
54
|
+
offsetY = padY;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
id: d.id,
|
|
60
|
+
name: d.name,
|
|
61
|
+
priority: d.priority,
|
|
62
|
+
width,
|
|
63
|
+
height,
|
|
64
|
+
screenWidth,
|
|
65
|
+
screenHeight,
|
|
66
|
+
screenResolutions: d.resolutions,
|
|
67
|
+
screenOffsetX: offsetX,
|
|
68
|
+
screenOffsetY: offsetY,
|
|
69
|
+
platform: d.platform,
|
|
70
|
+
ppi: d.ppi,
|
|
71
|
+
color: d.color
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
var DEVICE_FRAMES = [
|
|
75
|
+
// ── iPhones 15/16 (post-Fastlane) ──
|
|
76
|
+
buildFrame({ id: "iphone16-pro-max", name: "iPhone 16 Pro Max", priority: 14, resolutions: [[1320, 2868], [2868, 1320]], ppi: 460, color: "Black Titanium", platform: "ios", style: "edge" }),
|
|
77
|
+
buildFrame({ id: "iphone-16-pro", name: "iPhone 16 Pro", priority: 14, resolutions: [[1206, 2622], [2622, 1206]], ppi: 460, color: "Black Titanium", platform: "ios", style: "edge" }),
|
|
78
|
+
buildFrame({ id: "iphone-16-plus", name: "iPhone 16 Plus", priority: 14, resolutions: [[1290, 2796], [2796, 1290]], ppi: 458, color: "Black", platform: "ios", style: "edge" }),
|
|
79
|
+
buildFrame({ id: "iphone-16", name: "iPhone 16", priority: 14, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: "Black", platform: "ios", style: "edge" }),
|
|
80
|
+
buildFrame({ id: "iphone15-pro-max", name: "iPhone 15 Pro Max", priority: 13, resolutions: [[1290, 2796], [2796, 1290]], ppi: 460, color: "Black Titanium", platform: "ios", style: "edge" }),
|
|
81
|
+
buildFrame({ id: "iphone-15-pro", name: "iPhone 15 Pro", priority: 13, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: "Black Titanium", platform: "ios", style: "edge" }),
|
|
82
|
+
buildFrame({ id: "iphone-15-plus", name: "iPhone 15 Plus", priority: 13, resolutions: [[1290, 2796], [2796, 1290]], ppi: 458, color: "Black", platform: "ios", style: "edge" }),
|
|
83
|
+
buildFrame({ id: "iphone-15", name: "iPhone 15", priority: 13, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: "Black", platform: "ios", style: "edge" }),
|
|
84
|
+
// ── iPhones (Fastlane Platform::IOS) ──
|
|
85
|
+
buildFrame({ id: "iphone14-pro-max", name: "iPhone 14 Pro Max", priority: 12, resolutions: [[1290, 2796], [2796, 1290]], ppi: 458, color: "Black", platform: "ios", style: "edge" }),
|
|
86
|
+
buildFrame({ id: "iphone-14-pro", name: "iPhone 14 Pro", priority: 12, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: "Black", platform: "ios", style: "edge" }),
|
|
87
|
+
buildFrame({ id: "iphone-14-plus", name: "iPhone 14 Plus", priority: 12, resolutions: [[1284, 2778], [2778, 1284]], ppi: 458, color: "Midnight", platform: "ios", style: "edge" }),
|
|
88
|
+
buildFrame({ id: "iphone-14", name: "iPhone 14", priority: 12, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: "Midnight", platform: "ios", style: "edge" }),
|
|
89
|
+
buildFrame({ id: "iphone13-pro-max", name: "iPhone 13 Pro Max", priority: 11, resolutions: [[1284, 2778], [2778, 1284]], ppi: 458, color: "Graphite", platform: "ios", style: "edge" }),
|
|
90
|
+
buildFrame({ id: "iphone-13-pro", name: "iPhone 13 Pro", priority: 11, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: "Graphite", platform: "ios", style: "edge" }),
|
|
91
|
+
buildFrame({ id: "iphone-13", name: "iPhone 13", priority: 11, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: "Midnight", platform: "ios", style: "edge" }),
|
|
92
|
+
buildFrame({ id: "iphone-13-mini", name: "iPhone 13 Mini", priority: 11, resolutions: [[1080, 2340], [2340, 1080]], ppi: 476, color: "Midnight", platform: "ios", style: "edge" }),
|
|
93
|
+
buildFrame({ id: "iphone12-pro-max", name: "iPhone 12 Pro Max", priority: 10, resolutions: [[1284, 2778], [2778, 1284]], ppi: 458, color: "Graphite", platform: "ios", style: "edge" }),
|
|
94
|
+
buildFrame({ id: "iphone-12-pro", name: "iPhone 12 Pro", priority: 10, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
95
|
+
buildFrame({ id: "iphone-12", name: "iPhone 12", priority: 10, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: "Black", platform: "ios", style: "edge" }),
|
|
96
|
+
buildFrame({ id: "iphone-12-mini", name: "iPhone 12 Mini", priority: 10, resolutions: [[1125, 2436], [2436, 1125]], ppi: 476, color: "Black", platform: "ios", style: "edge" }),
|
|
97
|
+
buildFrame({ id: "iphone11-pro-max", name: "iPhone 11 Pro Max", priority: 9, resolutions: [[1242, 2688], [2688, 1242]], ppi: 458, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
98
|
+
buildFrame({ id: "iphone-11-pro", name: "iPhone 11 Pro", priority: 9, resolutions: [[1125, 2436], [2436, 1125]], ppi: 458, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
99
|
+
buildFrame({ id: "iphone-11", name: "iPhone 11", priority: 9, resolutions: [[828, 1792], [1792, 828]], ppi: 326, color: "Black", platform: "ios", style: "edge" }),
|
|
100
|
+
buildFrame({ id: "iphone-XS-Max", name: "iPhone XS Max", priority: 8, resolutions: [[1242, 2688], [2688, 1242]], ppi: 458, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
101
|
+
buildFrame({ id: "iphone-XR", name: "iPhone XR", priority: 8, resolutions: [[828, 1792], [1792, 828]], ppi: 326, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
102
|
+
buildFrame({ id: "iphone-XS", name: "iPhone XS", priority: 8, resolutions: [[1125, 2436], [2436, 1125]], ppi: 458, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
103
|
+
buildFrame({ id: "iphone-X", name: "iPhone X", priority: 7, resolutions: [[1125, 2436], [2436, 1125]], ppi: 458, color: "Space Gray", platform: "ios", style: "edge" }),
|
|
104
|
+
buildFrame({ id: "iphone-8", name: "iPhone 8", priority: 6, resolutions: [[750, 1334], [1334, 750]], ppi: 326, color: "Space Gray", platform: "ios", style: "bezel" }),
|
|
105
|
+
buildFrame({ id: "iphone-8-plus", name: "iPhone 8 Plus", priority: 6, resolutions: [[1242, 2208], [2208, 1242]], ppi: 401, color: "Space Gray", platform: "ios", style: "bezel" }),
|
|
106
|
+
buildFrame({ id: "iphone-7", name: "iPhone 7", priority: 5, resolutions: [[750, 1334], [1334, 750]], ppi: 326, color: "Matte Black", platform: "ios", style: "bezel" }),
|
|
107
|
+
buildFrame({ id: "iphone-7-plus", name: "iPhone 7 Plus", priority: 5, resolutions: [[1242, 2208], [2208, 1242]], ppi: 401, color: "Matte Black", platform: "ios", style: "bezel" }),
|
|
108
|
+
buildFrame({ id: "iphone-6s", name: "iPhone 6s", priority: 4, resolutions: [[750, 1334], [1334, 750]], ppi: 326, color: "Space Gray", platform: "ios", style: "bezel" }),
|
|
109
|
+
buildFrame({ id: "iphone-6s-plus", name: "iPhone 6s Plus", priority: 4, resolutions: [[1242, 2208], [2208, 1242]], ppi: 401, color: "Space Gray", platform: "ios", style: "bezel" }),
|
|
110
|
+
buildFrame({ id: "iphone-se", name: "iPhone SE", priority: 3, resolutions: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], ppi: 326, color: "Space Gray", platform: "ios", style: "bezel" }),
|
|
111
|
+
buildFrame({ id: "iphone-5s", name: "iPhone 5s", priority: 2, resolutions: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], ppi: 326, color: "Space Gray", platform: "ios", style: "bezel" }),
|
|
112
|
+
buildFrame({ id: "iphone-5c", name: "iPhone 5c", priority: 2, resolutions: [[640, 1136], [1136, 640]], ppi: 326, color: "White", platform: "ios", style: "bezel" }),
|
|
113
|
+
// ── iPads ──
|
|
114
|
+
buildFrame({ id: "ipadPro11", name: "iPad Pro 11-inch", priority: 1, resolutions: [[1668, 2388], [2388, 1668]], ppi: 265, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
115
|
+
buildFrame({ id: "ipadPro129", name: "iPad Pro 12.9-inch 4th generation", priority: 5, resolutions: [[2048, 2732], [2732, 2048]], ppi: 264, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
116
|
+
buildFrame({ id: "ipadPro129-3gen", name: "iPad Pro 12.9-inch 3rd generation", priority: 4, resolutions: [[2048, 2732], [2732, 2048]], ppi: 264, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
117
|
+
buildFrame({ id: "ipad-pro", name: "iPad Pro", priority: 3, resolutions: [[2048, 2732], [2732, 2048]], ppi: 264, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
118
|
+
buildFrame({ id: "ipad105", name: "iPad Pro 10.5-inch", priority: 1, resolutions: [[1668, 2224], [2224, 1668]], ppi: 265, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
119
|
+
buildFrame({ id: "ipad-10-2", name: "iPad 10.2", priority: 1, resolutions: [[1620, 2160], [2160, 1620]], ppi: 264, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
120
|
+
buildFrame({ id: "ipad-air-2", name: "iPad Air 2", priority: 1, resolutions: [[1536, 2048], [2048, 1536]], ppi: 264, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
121
|
+
buildFrame({ id: "ipad-air-2019", name: "iPad Air 2019", priority: 2, resolutions: [[1668, 2224], [2224, 1668]], ppi: 265, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
122
|
+
buildFrame({ id: "ipad-mini-4", name: "iPad Mini 4", priority: 2, resolutions: [[1536, 2048], [2048, 1536]], ppi: 324, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
123
|
+
buildFrame({ id: "ipad-mini-2019", name: "iPad Mini 2019", priority: 3, resolutions: [[1536, 2048], [2048, 1536]], ppi: 324, color: "Space Gray", platform: "ios", style: "tablet" }),
|
|
124
|
+
// ── Mac ──
|
|
125
|
+
buildFrame({ id: "mac", name: "MacBook", priority: 0, resolutions: [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]], color: "Space Gray", platform: "mac", style: "mac" }),
|
|
126
|
+
// ── Google Pixel (Android) ──
|
|
127
|
+
buildFrame({ id: "google-pixel-5", name: "Google Pixel 5", priority: 10, resolutions: [[1080, 2340], [2340, 1080]], ppi: 432, color: "Just Black", platform: "android", style: "edge" }),
|
|
128
|
+
buildFrame({ id: "google-pixel-4-xl", name: "Google Pixel 4 XL", priority: 9, resolutions: [[1440, 3040], [3040, 1440]], ppi: 537, color: "Just Black", platform: "android", style: "edge" }),
|
|
129
|
+
buildFrame({ id: "google-pixel-4", name: "Google Pixel 4", priority: 9, resolutions: [[1080, 2280], [2280, 1080]], ppi: 444, color: "Just Black", platform: "android", style: "edge" }),
|
|
130
|
+
buildFrame({ id: "google-pixel-3-xl", name: "Google Pixel 3 XL", priority: 7, resolutions: [[1440, 2960], [2960, 1440]], ppi: 523, color: "Just Black", platform: "android", style: "edge" }),
|
|
131
|
+
buildFrame({ id: "google-pixel-3", name: "Google Pixel 3", priority: 7, resolutions: [[1080, 2160], [2160, 1080]], ppi: 443, color: "Just Black", platform: "android", style: "edge" }),
|
|
132
|
+
// ── HTC / Huawei / Motorola (Android, bezeled) ──
|
|
133
|
+
buildFrame({ id: "htc-one-a9", name: "HTC One A9", priority: 6, resolutions: [[1080, 1920], [1920, 1080]], ppi: 441, color: "Black", platform: "android", style: "bezel" }),
|
|
134
|
+
buildFrame({ id: "htc-one-m8", name: "HTC One M8", priority: 3, resolutions: [[1080, 1920], [1920, 1080]], ppi: 441, color: "Black", platform: "android", style: "bezel" }),
|
|
135
|
+
buildFrame({ id: "huawei-p8", name: "Huawei P8", priority: 5, resolutions: [[1080, 1920], [1920, 1080]], ppi: 424, color: "Black", platform: "android", style: "bezel" }),
|
|
136
|
+
buildFrame({ id: "motorola-moto-e", name: "Motorola Moto E", priority: 3, resolutions: [[540, 960], [960, 540]], ppi: 245, color: "Black", platform: "android", style: "bezel" }),
|
|
137
|
+
buildFrame({ id: "motorola-moto-g", name: "Motorola Moto G", priority: 4, resolutions: [[1080, 1920], [1920, 1080]], ppi: 401, platform: "android", style: "bezel" }),
|
|
138
|
+
// ── Nexus (Android, bezeled) ──
|
|
139
|
+
buildFrame({ id: "nexus-4", name: "Nexus 4", priority: 7, resolutions: [[768, 1280], [1820, 768]], ppi: 318, platform: "android", style: "bezel" }),
|
|
140
|
+
buildFrame({ id: "nexus-5x", name: "Nexus 5X", priority: 7, resolutions: [[1080, 1920], [1920, 1080]], ppi: 423, platform: "android", style: "bezel" }),
|
|
141
|
+
buildFrame({ id: "nexus-6p", name: "Nexus 6P", priority: 7, resolutions: [[1440, 2560], [2560, 1440]], ppi: 518, platform: "android", style: "bezel" }),
|
|
142
|
+
buildFrame({ id: "nexus-9", name: "Nexus 9", priority: 7, resolutions: [[1536, 2048], [2048, 1536]], ppi: 281, platform: "android", style: "tablet" }),
|
|
143
|
+
// ── Samsung Galaxy (Android) ──
|
|
144
|
+
buildFrame({ id: "samsung-galaxy-s21", name: "Samsung Galaxy S21", priority: 9, resolutions: [[1080, 2400], [2400, 1080]], ppi: 421, color: "Phantom Black", platform: "android", style: "edge" }),
|
|
145
|
+
buildFrame({ id: "samsung-galaxy-note-10-plus", name: "Samsung Galaxy Note 10+", priority: 7, resolutions: [[1440, 3040], [3040, 1440]], ppi: 498, color: "Aura Black", platform: "android", style: "edge" }),
|
|
146
|
+
buildFrame({ id: "samsung-galaxy-note-10", name: "Samsung Galaxy Note 10", priority: 6, resolutions: [[1080, 2280], [2280, 1080]], ppi: 401, color: "Aura Black", platform: "android", style: "edge" }),
|
|
147
|
+
buildFrame({ id: "samsung-galaxy-note-5", name: "Samsung Galaxy Note 5", priority: 5, resolutions: [[1440, 2560], [2560, 1440]], ppi: 518, color: "Black", platform: "android", style: "bezel" }),
|
|
148
|
+
buildFrame({ id: "samsung-galaxy-s10-plus", name: "Samsung Galaxy S10+", priority: 8, resolutions: [[1440, 3040], [3040, 1440]], ppi: 522, color: "Prism Black", platform: "android", style: "edge" }),
|
|
149
|
+
buildFrame({ id: "samsung-galaxy-s10", name: "Samsung Galaxy S10", priority: 7, resolutions: [[1440, 3040], [3040, 1440]], ppi: 550, color: "Prism Black", platform: "android", style: "edge" }),
|
|
150
|
+
buildFrame({ id: "samsung-galaxy-s9", name: "Samsung Galaxy S9", priority: 6, resolutions: [[1440, 2960], [2960, 1440]], ppi: 570, color: "Midnight Black", platform: "android", style: "edge" }),
|
|
151
|
+
buildFrame({ id: "samsung-galaxy-s8", name: "Samsung Galaxy S8", priority: 5, resolutions: [[1440, 2960], [2960, 1440]], ppi: 570, color: "Midnight Black", platform: "android", style: "edge" }),
|
|
152
|
+
buildFrame({ id: "samsung-galaxy-s7", name: "Samsung Galaxy S7", priority: 4, resolutions: [[1440, 2560], [2560, 1440]], ppi: 577, color: "Black", platform: "android", style: "bezel" }),
|
|
153
|
+
buildFrame({ id: "samsung-galaxy-s5", name: "Samsung Galaxy S5", priority: 3, resolutions: [[1080, 1920], [1920, 1080]], ppi: 432, color: "Black", platform: "android", style: "bezel" }),
|
|
154
|
+
buildFrame({ id: "samsung-galaxy-s3", name: "Samsung Galaxy S3", priority: 3, resolutions: [[720, 1280], [1280, 720]], ppi: 306, platform: "android", style: "bezel" }),
|
|
155
|
+
buildFrame({ id: "samsung-galaxy-s-duos", name: "Samsung Galaxy S Duos", priority: 3, resolutions: [[480, 800], [800, 480]], ppi: 233, platform: "android", style: "bezel" }),
|
|
156
|
+
buildFrame({ id: "samsung-galaxy-grand-prime", name: "Samsung Galaxy Grand Prime", priority: 5, resolutions: [[540, 960], [960, 540]], ppi: 220, color: "Black", platform: "android", style: "bezel" }),
|
|
157
|
+
// ── Xiaomi ──
|
|
158
|
+
buildFrame({ id: "xiaomi-mi-mix-alpha", name: "Xiaomi Mi Mix Alpha", priority: 1, resolutions: [[2088, 2250], [2250, 2088]], ppi: 388, platform: "android", style: "edge" })
|
|
159
|
+
];
|
|
160
|
+
function detectDeviceFromDimensions(width, height) {
|
|
161
|
+
let best = null;
|
|
162
|
+
for (const device of DEVICE_FRAMES) {
|
|
163
|
+
for (const [w, h] of device.screenResolutions) {
|
|
164
|
+
if (w === width && h === height) {
|
|
165
|
+
if (!best || device.priority > best.priority) best = device;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return best;
|
|
171
|
+
}
|
|
172
|
+
function detectDeviceFromFilename(filename) {
|
|
173
|
+
const lower = filename.toLowerCase();
|
|
174
|
+
let best = null;
|
|
175
|
+
const matchesToken = (candidate) => {
|
|
176
|
+
const pattern = candidate.toLowerCase().replace(/[()]/g, "").replace(/[.+^$*?|{}\\[\]]/g, "\\$&").replace(/\\\./g, "\\.?").replace(/[-_\s]+/g, "[-_ ]?");
|
|
177
|
+
return new RegExp(pattern).test(lower);
|
|
178
|
+
};
|
|
179
|
+
for (const device of DEVICE_FRAMES) {
|
|
180
|
+
if (matchesToken(device.name) || matchesToken(device.id)) {
|
|
181
|
+
if (!best || device.priority > best.priority) best = device;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return best;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// src/frameit/index.ts
|
|
188
|
+
var execFileAsync = util.promisify(child_process.execFile);
|
|
189
|
+
async function frameScreenshots(options) {
|
|
190
|
+
const inputDir = options.screenshotsPath;
|
|
191
|
+
const outputDir = options.outputPath ?? inputDir;
|
|
192
|
+
const entries = await promises.readdir(inputDir);
|
|
193
|
+
const imageFiles = entries.filter(
|
|
194
|
+
(f) => [".png", ".jpg", ".jpeg"].includes(path.extname(f).toLowerCase()) && !f.includes("_framed")
|
|
195
|
+
);
|
|
196
|
+
for (const file of imageFiles) {
|
|
197
|
+
const filePath = path.join(inputDir, file);
|
|
198
|
+
const fileStat = await promises.stat(filePath);
|
|
199
|
+
if (!fileStat.isFile()) continue;
|
|
200
|
+
let device = detectDeviceFromFilename(file);
|
|
201
|
+
if (!device) {
|
|
202
|
+
const dims = await getImageDimensions(filePath);
|
|
203
|
+
if (dims) {
|
|
204
|
+
device = detectDeviceFromDimensions(dims.width, dims.height);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (!device) continue;
|
|
208
|
+
const outputFile = path.join(
|
|
209
|
+
outputDir,
|
|
210
|
+
path.basename(file, path.extname(file)) + "_framed.png"
|
|
211
|
+
);
|
|
212
|
+
try {
|
|
213
|
+
await compositeScreenshot(filePath, device, outputFile, options);
|
|
214
|
+
} catch {
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function getImageDimensions(filePath) {
|
|
219
|
+
try {
|
|
220
|
+
const { stdout } = await execFileAsync("identify", ["-format", "%wx%h", filePath]);
|
|
221
|
+
const [w, h] = stdout.trim().split("x").map(Number);
|
|
222
|
+
if (w && h) return { width: w, height: h };
|
|
223
|
+
} catch {
|
|
224
|
+
}
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
async function compositeScreenshot(screenshotPath, device, outputPath, options) {
|
|
228
|
+
const bgColor = options.whiteBackground ? "white" : "none";
|
|
229
|
+
const args = [
|
|
230
|
+
"-size",
|
|
231
|
+
`${device.width}x${device.height}`,
|
|
232
|
+
`xc:${bgColor}`,
|
|
233
|
+
screenshotPath,
|
|
234
|
+
"-geometry",
|
|
235
|
+
`${device.screenWidth}x${device.screenHeight}+${device.screenOffsetX}+${device.screenOffsetY}`,
|
|
236
|
+
"-composite",
|
|
237
|
+
outputPath
|
|
238
|
+
];
|
|
239
|
+
await execFileAsync("convert", args);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
exports.DEVICE_FRAMES = DEVICE_FRAMES;
|
|
243
|
+
exports.detectDeviceFromDimensions = detectDeviceFromDimensions;
|
|
244
|
+
exports.detectDeviceFromFilename = detectDeviceFromFilename;
|
|
245
|
+
exports.frameScreenshots = frameScreenshots;
|
|
246
|
+
//# sourceMappingURL=index.cjs.map
|
|
247
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/frameit/devices.ts","../../src/frameit/index.ts"],"names":["promisify","execFile","readdir","extname","join","stat","basename"],"mappings":";;;;;;;;;;AAuDA,SAAS,WAAW,CAAA,EAA8B;AAEhD,EAAA,MAAM,CAAC,GAAG,CAAA,GAAI,CAAA,CAAE,WAAA;AAChB,EAAA,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,cAAA;AAAA,IACA,WAAA;AAAA,IAAa,CAAA,EAAG,MAAA,CAAO,WAAW,CAAA,CAAA,EAAI,MAAA,CAAO,YAAY,CAAA,CAAA,EAAI,MAAA,CAAO,aAAa,CAAA,CAAA,EAAI,MAAA,CAAO,aAAa,CAAA,CAAA;AAAA,IACzG,YAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,aAAA,CAAc,WAAW,IAAI,CAAA;AACrC","file":"index.cjs","sourcesContent":["/**\n * Device frame definitions ported from Fastlane's `frameit/device_types.rb`.\n *\n * Each device mirrors Fastlane's `Device.new(id, name, priority, resolutions,\n * ppi, color, platform)` declaration. Frame canvas dimensions and screen\n * offsets are computed from the primary screen resolution, because Fastlane\n * resolves those at runtime from the downloaded `offsets.json` in its frames\n * repository — which is not bundled here.\n *\n * For modern edge-to-edge devices (post-2017 iPhones, Pixel 3+, recent Samsung),\n * the frame adds a small 4–7% horizontal bezel. For bezeled devices, padding\n * roughly follows the real chassis (~10% X, ~18% Y). These estimates mean\n * `frameScreenshots` still composites sensibly, but they are not pixel-perfect\n * reproductions of the real frame PNGs.\n *\n * Device names follow Fastlane's `formatted_name_without_apple`: the \"Apple \"\n * prefix is stripped, as are parenthesised suffixes (e.g. \"(3rd generation)\").\n */\n\nexport interface DeviceFrame {\n /** Fastlane device id (slug). Used for filename detection. */\n id: string;\n /** Human-readable device name (matches Fastlane's `formatted_name_without_apple`). */\n name: string;\n /** Priority (from Fastlane). Higher wins when multiple devices match. */\n priority: number;\n /** Frame canvas dimensions (computed). */\n width: number;\n height: number;\n /** Primary screen resolution used for detection and compositing. */\n screenWidth: number;\n screenHeight: number;\n /** All supported screen resolutions [width, height] for detection. */\n screenResolutions: Array<[number, number]>;\n /** Screen-within-frame offset in pixels. */\n screenOffsetX: number;\n screenOffsetY: number;\n platform: \"ios\" | \"android\" | \"mac\";\n /** Optional PPI from Fastlane. */\n ppi?: number;\n /** Default color from Fastlane. */\n color?: string;\n}\n\ninterface ComputeInput {\n id: string;\n name: string;\n priority: number;\n resolutions: Array<[number, number]>;\n ppi?: number;\n color?: string;\n platform: \"ios\" | \"android\" | \"mac\";\n style: \"edge\" | \"bezel\" | \"tablet\" | \"mac\";\n}\n\nfunction buildFrame(d: ComputeInput): DeviceFrame {\n // Pick the portrait resolution (smaller = width)\n const [res] = d.resolutions;\n const [a, b] = res;\n const screenWidth = Math.min(a, b);\n const screenHeight = Math.max(a, b);\n\n let width: number;\n let height: number;\n let offsetX: number;\n let offsetY: number;\n\n switch (d.style) {\n case \"edge\": {\n // Modern edge-to-edge: ~4% X bezel each side, minimal Y bezel\n const padX = Math.round(screenWidth * 0.04);\n const padY = Math.round(screenHeight * 0.005);\n width = screenWidth + padX * 2;\n height = screenHeight + padY * 2;\n offsetX = padX;\n offsetY = padY;\n break;\n }\n case \"bezel\": {\n // Older bezeled phones: ~5% X, ~9% Y each side\n const padX = Math.round(screenWidth * 0.05);\n const padY = Math.round(screenHeight * 0.09);\n width = screenWidth + padX * 2;\n height = screenHeight + padY * 2;\n offsetX = padX;\n offsetY = padY;\n break;\n }\n case \"tablet\": {\n const padX = Math.round(screenWidth * 0.05);\n const padY = Math.round(screenHeight * 0.05);\n width = screenWidth + padX * 2;\n height = screenHeight + padY * 2;\n offsetX = padX;\n offsetY = padY;\n break;\n }\n case \"mac\": {\n const padX = Math.round(screenWidth * 0.08);\n const padY = Math.round(screenHeight * 0.12);\n width = screenWidth + padX * 2;\n height = screenHeight + padY * 2;\n offsetX = padX;\n offsetY = padY;\n break;\n }\n }\n\n return {\n id: d.id,\n name: d.name,\n priority: d.priority,\n width,\n height,\n screenWidth,\n screenHeight,\n screenResolutions: d.resolutions,\n screenOffsetX: offsetX,\n screenOffsetY: offsetY,\n platform: d.platform,\n ppi: d.ppi,\n color: d.color,\n };\n}\n\n/**\n * All devices from Fastlane's `frameit/device_types.rb` (66 entries) plus\n * iPhone 15/16 models that Apple released after Fastlane's last update, and\n * a couple of Samsung Galaxy S21 entries carried over from fastnode's\n * pre-port list. Ordered descending by priority so `detectDevice*` picks the\n * newest/highest priority device when multiple match.\n */\nexport const DEVICE_FRAMES: DeviceFrame[] = [\n // ── iPhones 15/16 (post-Fastlane) ──\n buildFrame({ id: \"iphone16-pro-max\", name: \"iPhone 16 Pro Max\", priority: 14, resolutions: [[1320, 2868], [2868, 1320]], ppi: 460, color: \"Black Titanium\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-16-pro\", name: \"iPhone 16 Pro\", priority: 14, resolutions: [[1206, 2622], [2622, 1206]], ppi: 460, color: \"Black Titanium\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-16-plus\", name: \"iPhone 16 Plus\", priority: 14, resolutions: [[1290, 2796], [2796, 1290]], ppi: 458, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-16\", name: \"iPhone 16\", priority: 14, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone15-pro-max\", name: \"iPhone 15 Pro Max\", priority: 13, resolutions: [[1290, 2796], [2796, 1290]], ppi: 460, color: \"Black Titanium\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-15-pro\", name: \"iPhone 15 Pro\", priority: 13, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: \"Black Titanium\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-15-plus\", name: \"iPhone 15 Plus\", priority: 13, resolutions: [[1290, 2796], [2796, 1290]], ppi: 458, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-15\", name: \"iPhone 15\", priority: 13, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n\n // ── iPhones (Fastlane Platform::IOS) ──\n buildFrame({ id: \"iphone14-pro-max\", name: \"iPhone 14 Pro Max\", priority: 12, resolutions: [[1290, 2796], [2796, 1290]], ppi: 458, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-14-pro\", name: \"iPhone 14 Pro\", priority: 12, resolutions: [[1179, 2556], [2556, 1179]], ppi: 460, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-14-plus\", name: \"iPhone 14 Plus\", priority: 12, resolutions: [[1284, 2778], [2778, 1284]], ppi: 458, color: \"Midnight\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-14\", name: \"iPhone 14\", priority: 12, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: \"Midnight\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone13-pro-max\", name: \"iPhone 13 Pro Max\", priority: 11, resolutions: [[1284, 2778], [2778, 1284]], ppi: 458, color: \"Graphite\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-13-pro\", name: \"iPhone 13 Pro\", priority: 11, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: \"Graphite\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-13\", name: \"iPhone 13\", priority: 11, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: \"Midnight\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-13-mini\", name: \"iPhone 13 Mini\", priority: 11, resolutions: [[1080, 2340], [2340, 1080]], ppi: 476, color: \"Midnight\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone12-pro-max\", name: \"iPhone 12 Pro Max\", priority: 10, resolutions: [[1284, 2778], [2778, 1284]], ppi: 458, color: \"Graphite\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-12-pro\", name: \"iPhone 12 Pro\", priority: 10, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-12\", name: \"iPhone 12\", priority: 10, resolutions: [[1170, 2532], [2532, 1170]], ppi: 460, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-12-mini\", name: \"iPhone 12 Mini\", priority: 10, resolutions: [[1125, 2436], [2436, 1125]], ppi: 476, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone11-pro-max\", name: \"iPhone 11 Pro Max\", priority: 9, resolutions: [[1242, 2688], [2688, 1242]], ppi: 458, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-11-pro\", name: \"iPhone 11 Pro\", priority: 9, resolutions: [[1125, 2436], [2436, 1125]], ppi: 458, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-11\", name: \"iPhone 11\", priority: 9, resolutions: [[828, 1792], [1792, 828]], ppi: 326, color: \"Black\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-XS-Max\", name: \"iPhone XS Max\", priority: 8, resolutions: [[1242, 2688], [2688, 1242]], ppi: 458, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-XR\", name: \"iPhone XR\", priority: 8, resolutions: [[828, 1792], [1792, 828]], ppi: 326, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-XS\", name: \"iPhone XS\", priority: 8, resolutions: [[1125, 2436], [2436, 1125]], ppi: 458, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-X\", name: \"iPhone X\", priority: 7, resolutions: [[1125, 2436], [2436, 1125]], ppi: 458, color: \"Space Gray\", platform: \"ios\", style: \"edge\" }),\n buildFrame({ id: \"iphone-8\", name: \"iPhone 8\", priority: 6, resolutions: [[750, 1334], [1334, 750]], ppi: 326, color: \"Space Gray\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-8-plus\", name: \"iPhone 8 Plus\", priority: 6, resolutions: [[1242, 2208], [2208, 1242]], ppi: 401, color: \"Space Gray\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-7\", name: \"iPhone 7\", priority: 5, resolutions: [[750, 1334], [1334, 750]], ppi: 326, color: \"Matte Black\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-7-plus\", name: \"iPhone 7 Plus\", priority: 5, resolutions: [[1242, 2208], [2208, 1242]], ppi: 401, color: \"Matte Black\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-6s\", name: \"iPhone 6s\", priority: 4, resolutions: [[750, 1334], [1334, 750]], ppi: 326, color: \"Space Gray\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-6s-plus\", name: \"iPhone 6s Plus\", priority: 4, resolutions: [[1242, 2208], [2208, 1242]], ppi: 401, color: \"Space Gray\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-se\", name: \"iPhone SE\", priority: 3, resolutions: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], ppi: 326, color: \"Space Gray\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-5s\", name: \"iPhone 5s\", priority: 2, resolutions: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], ppi: 326, color: \"Space Gray\", platform: \"ios\", style: \"bezel\" }),\n buildFrame({ id: \"iphone-5c\", name: \"iPhone 5c\", priority: 2, resolutions: [[640, 1136], [1136, 640]], ppi: 326, color: \"White\", platform: \"ios\", style: \"bezel\" }),\n\n // ── iPads ──\n buildFrame({ id: \"ipadPro11\", name: \"iPad Pro 11-inch\", priority: 1, resolutions: [[1668, 2388], [2388, 1668]], ppi: 265, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipadPro129\", name: \"iPad Pro 12.9-inch 4th generation\", priority: 5, resolutions: [[2048, 2732], [2732, 2048]], ppi: 264, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipadPro129-3gen\", name: \"iPad Pro 12.9-inch 3rd generation\", priority: 4, resolutions: [[2048, 2732], [2732, 2048]], ppi: 264, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad-pro\", name: \"iPad Pro\", priority: 3, resolutions: [[2048, 2732], [2732, 2048]], ppi: 264, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad105\", name: \"iPad Pro 10.5-inch\", priority: 1, resolutions: [[1668, 2224], [2224, 1668]], ppi: 265, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad-10-2\", name: \"iPad 10.2\", priority: 1, resolutions: [[1620, 2160], [2160, 1620]], ppi: 264, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad-air-2\", name: \"iPad Air 2\", priority: 1, resolutions: [[1536, 2048], [2048, 1536]], ppi: 264, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad-air-2019\", name: \"iPad Air 2019\", priority: 2, resolutions: [[1668, 2224], [2224, 1668]], ppi: 265, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad-mini-4\", name: \"iPad Mini 4\", priority: 2, resolutions: [[1536, 2048], [2048, 1536]], ppi: 324, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n buildFrame({ id: \"ipad-mini-2019\", name: \"iPad Mini 2019\", priority: 3, resolutions: [[1536, 2048], [2048, 1536]], ppi: 324, color: \"Space Gray\", platform: \"ios\", style: \"tablet\" }),\n\n // ── Mac ──\n buildFrame({ id: \"mac\", name: \"MacBook\", priority: 0, resolutions: [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]], color: \"Space Gray\", platform: \"mac\", style: \"mac\" }),\n\n // ── Google Pixel (Android) ──\n buildFrame({ id: \"google-pixel-5\", name: \"Google Pixel 5\", priority: 10, resolutions: [[1080, 2340], [2340, 1080]], ppi: 432, color: \"Just Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"google-pixel-4-xl\", name: \"Google Pixel 4 XL\", priority: 9, resolutions: [[1440, 3040], [3040, 1440]], ppi: 537, color: \"Just Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"google-pixel-4\", name: \"Google Pixel 4\", priority: 9, resolutions: [[1080, 2280], [2280, 1080]], ppi: 444, color: \"Just Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"google-pixel-3-xl\", name: \"Google Pixel 3 XL\", priority: 7, resolutions: [[1440, 2960], [2960, 1440]], ppi: 523, color: \"Just Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"google-pixel-3\", name: \"Google Pixel 3\", priority: 7, resolutions: [[1080, 2160], [2160, 1080]], ppi: 443, color: \"Just Black\", platform: \"android\", style: \"edge\" }),\n\n // ── HTC / Huawei / Motorola (Android, bezeled) ──\n buildFrame({ id: \"htc-one-a9\", name: \"HTC One A9\", priority: 6, resolutions: [[1080, 1920], [1920, 1080]], ppi: 441, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"htc-one-m8\", name: \"HTC One M8\", priority: 3, resolutions: [[1080, 1920], [1920, 1080]], ppi: 441, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"huawei-p8\", name: \"Huawei P8\", priority: 5, resolutions: [[1080, 1920], [1920, 1080]], ppi: 424, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"motorola-moto-e\", name: \"Motorola Moto E\", priority: 3, resolutions: [[540, 960], [960, 540]], ppi: 245, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"motorola-moto-g\", name: \"Motorola Moto G\", priority: 4, resolutions: [[1080, 1920], [1920, 1080]], ppi: 401, platform: \"android\", style: \"bezel\" }),\n\n // ── Nexus (Android, bezeled) ──\n buildFrame({ id: \"nexus-4\", name: \"Nexus 4\", priority: 7, resolutions: [[768, 1280], [1820, 768]], ppi: 318, platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"nexus-5x\", name: \"Nexus 5X\", priority: 7, resolutions: [[1080, 1920], [1920, 1080]], ppi: 423, platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"nexus-6p\", name: \"Nexus 6P\", priority: 7, resolutions: [[1440, 2560], [2560, 1440]], ppi: 518, platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"nexus-9\", name: \"Nexus 9\", priority: 7, resolutions: [[1536, 2048], [2048, 1536]], ppi: 281, platform: \"android\", style: \"tablet\" }),\n\n // ── Samsung Galaxy (Android) ──\n buildFrame({ id: \"samsung-galaxy-s21\", name: \"Samsung Galaxy S21\", priority: 9, resolutions: [[1080, 2400], [2400, 1080]], ppi: 421, color: \"Phantom Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-note-10-plus\", name: \"Samsung Galaxy Note 10+\", priority: 7, resolutions: [[1440, 3040], [3040, 1440]], ppi: 498, color: \"Aura Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-note-10\", name: \"Samsung Galaxy Note 10\", priority: 6, resolutions: [[1080, 2280], [2280, 1080]], ppi: 401, color: \"Aura Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-note-5\", name: \"Samsung Galaxy Note 5\", priority: 5, resolutions: [[1440, 2560], [2560, 1440]], ppi: 518, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"samsung-galaxy-s10-plus\", name: \"Samsung Galaxy S10+\", priority: 8, resolutions: [[1440, 3040], [3040, 1440]], ppi: 522, color: \"Prism Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-s10\", name: \"Samsung Galaxy S10\", priority: 7, resolutions: [[1440, 3040], [3040, 1440]], ppi: 550, color: \"Prism Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-s9\", name: \"Samsung Galaxy S9\", priority: 6, resolutions: [[1440, 2960], [2960, 1440]], ppi: 570, color: \"Midnight Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-s8\", name: \"Samsung Galaxy S8\", priority: 5, resolutions: [[1440, 2960], [2960, 1440]], ppi: 570, color: \"Midnight Black\", platform: \"android\", style: \"edge\" }),\n buildFrame({ id: \"samsung-galaxy-s7\", name: \"Samsung Galaxy S7\", priority: 4, resolutions: [[1440, 2560], [2560, 1440]], ppi: 577, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"samsung-galaxy-s5\", name: \"Samsung Galaxy S5\", priority: 3, resolutions: [[1080, 1920], [1920, 1080]], ppi: 432, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"samsung-galaxy-s3\", name: \"Samsung Galaxy S3\", priority: 3, resolutions: [[720, 1280], [1280, 720]], ppi: 306, platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"samsung-galaxy-s-duos\", name: \"Samsung Galaxy S Duos\", priority: 3, resolutions: [[480, 800], [800, 480]], ppi: 233, platform: \"android\", style: \"bezel\" }),\n buildFrame({ id: \"samsung-galaxy-grand-prime\", name: \"Samsung Galaxy Grand Prime\", priority: 5, resolutions: [[540, 960], [960, 540]], ppi: 220, color: \"Black\", platform: \"android\", style: \"bezel\" }),\n\n // ── Xiaomi ──\n buildFrame({ id: \"xiaomi-mi-mix-alpha\", name: \"Xiaomi Mi Mix Alpha\", priority: 1, resolutions: [[2088, 2250], [2250, 2088]], ppi: 388, platform: \"android\", style: \"edge\" }),\n];\n\n/**\n * Match a device by screenshot pixel dimensions. Returns the highest-priority\n * device whose resolution list contains `(width, height)` in either orientation.\n */\nexport function detectDeviceFromDimensions(\n width: number,\n height: number\n): DeviceFrame | null {\n let best: DeviceFrame | null = null;\n for (const device of DEVICE_FRAMES) {\n for (const [w, h] of device.screenResolutions) {\n if (w === width && h === height) {\n if (!best || device.priority > best.priority) best = device;\n break;\n }\n }\n }\n return best;\n}\n\n/**\n * Match a device by filename substring. Mirrors Fastlane's\n * `Device.detect_device`: a device matches if the filename contains either\n * the formatted name or the slug id. Token separators `-`, `_`, and spaces\n * are treated as equivalent, and `.` inside numeric suffixes (e.g. `12.9`)\n * is optional. Returns the highest-priority match.\n */\nexport function detectDeviceFromFilename(filename: string): DeviceFrame | null {\n const lower = filename.toLowerCase();\n let best: DeviceFrame | null = null;\n\n const matchesToken = (candidate: string): boolean => {\n const pattern = candidate\n .toLowerCase()\n .replace(/[()]/g, \"\")\n .replace(/[.+^$*?|{}\\\\[\\]]/g, \"\\\\$&\")\n .replace(/\\\\\\./g, \"\\\\.?\")\n .replace(/[-_\\s]+/g, \"[-_ ]?\");\n return new RegExp(pattern).test(lower);\n };\n\n for (const device of DEVICE_FRAMES) {\n if (matchesToken(device.name) || matchesToken(device.id)) {\n if (!best || device.priority > best.priority) best = device;\n }\n }\n return best;\n}\n","import { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport { readdir, stat } from \"node:fs/promises\";\nimport { join, extname, basename } from \"node:path\";\nimport { detectDeviceFromDimensions, detectDeviceFromFilename, type DeviceFrame } from \"./devices.js\";\n\nexport { DEVICE_FRAMES, detectDeviceFromDimensions, detectDeviceFromFilename } from \"./devices.js\";\nexport type { DeviceFrame } from \"./devices.js\";\n\nconst execFileAsync = promisify(execFile);\n\nexport interface FrameitOptions {\n screenshotsPath: string;\n outputPath?: string;\n forceDeviceType?: string;\n useDeviceOuterShadow?: boolean;\n whiteBackground?: boolean;\n}\n\nexport async function frameScreenshots(options: FrameitOptions): Promise<void> {\n const inputDir = options.screenshotsPath;\n const outputDir = options.outputPath ?? inputDir;\n\n const entries = await readdir(inputDir);\n const imageFiles = entries.filter((f) =>\n [\".png\", \".jpg\", \".jpeg\"].includes(extname(f).toLowerCase()) &&\n !f.includes(\"_framed\")\n );\n\n for (const file of imageFiles) {\n const filePath = join(inputDir, file);\n const fileStat = await stat(filePath);\n if (!fileStat.isFile()) continue;\n\n // Detect device from filename or dimensions\n let device = detectDeviceFromFilename(file);\n if (!device) {\n const dims = await getImageDimensions(filePath);\n if (dims) {\n device = detectDeviceFromDimensions(dims.width, dims.height);\n }\n }\n\n if (!device) continue;\n\n // Frame the screenshot using ImageMagick\n const outputFile = join(\n outputDir,\n basename(file, extname(file)) + \"_framed.png\"\n );\n\n try {\n await compositeScreenshot(filePath, device, outputFile, options);\n } catch {\n // ImageMagick may not be installed — skip gracefully\n }\n }\n}\n\nasync function getImageDimensions(\n filePath: string\n): Promise<{ width: number; height: number } | null> {\n try {\n const { stdout } = await execFileAsync(\"identify\", [\"-format\", \"%wx%h\", filePath]);\n const [w, h] = stdout.trim().split(\"x\").map(Number);\n if (w && h) return { width: w, height: h };\n } catch {\n // ImageMagick not available\n }\n return null;\n}\n\nasync function compositeScreenshot(\n screenshotPath: string,\n device: DeviceFrame,\n outputPath: string,\n options: FrameitOptions\n): Promise<void> {\n // Create a canvas of the device frame size, composite the screenshot at the offset\n const bgColor = options.whiteBackground ? \"white\" : \"none\";\n\n const args = [\n \"-size\", `${device.width}x${device.height}`,\n `xc:${bgColor}`,\n screenshotPath,\n \"-geometry\", `${device.screenWidth}x${device.screenHeight}+${device.screenOffsetX}+${device.screenOffsetY}`,\n \"-composite\",\n outputPath,\n ];\n\n await execFileAsync(\"convert\", args);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { D as DEVICE_FRAMES, b as DeviceFrame, F as FrameitOptions, d as detectDeviceFromDimensions, a as detectDeviceFromFilename, f as frameScreenshots } from '../index-BYonklf3.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { D as DEVICE_FRAMES, b as DeviceFrame, F as FrameitOptions, d as detectDeviceFromDimensions, a as detectDeviceFromFilename, f as frameScreenshots } from '../index-BYonklf3.js';
|