ugcinc-render 1.8.158 → 1.8.159
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/dist/{chunk-6FOED2J2.mjs → chunk-4EZKUSAN.mjs} +19 -2
- package/dist/index.js +22 -3
- package/dist/index.mjs +4 -2
- package/dist/utils/index.js +19 -2
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ async function preloadFonts() {
|
|
|
67
67
|
const sfPro = new FontFace(
|
|
68
68
|
"SF Pro",
|
|
69
69
|
`url(${FONT_URLS.apple.regular})`,
|
|
70
|
-
{ weight: "
|
|
70
|
+
{ weight: "1 999" }
|
|
71
71
|
);
|
|
72
72
|
console.log(`[ugcinc-render/fonts] Loading SF Pro from: ${FONT_URLS.apple.regular}`);
|
|
73
73
|
await sfPro.load();
|
|
@@ -78,6 +78,21 @@ async function preloadFonts() {
|
|
|
78
78
|
console.error(`[ugcinc-render/fonts] Failed to load SF Pro:`, errorMsg);
|
|
79
79
|
fontResults.push({ name: "SF Pro", status: "error", error: errorMsg });
|
|
80
80
|
}
|
|
81
|
+
try {
|
|
82
|
+
const sfProDisplay = new FontFace(
|
|
83
|
+
"SF Pro Display",
|
|
84
|
+
`url(${FONT_URLS.apple.regular})`,
|
|
85
|
+
{ weight: "1 999" }
|
|
86
|
+
);
|
|
87
|
+
console.log(`[ugcinc-render/fonts] Loading SF Pro Display from: ${FONT_URLS.apple.regular}`);
|
|
88
|
+
await sfProDisplay.load();
|
|
89
|
+
document.fonts.add(sfProDisplay);
|
|
90
|
+
fontResults.push({ name: "SF Pro Display", status: "success" });
|
|
91
|
+
} catch (err) {
|
|
92
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
93
|
+
console.error(`[ugcinc-render/fonts] Failed to load SF Pro Display:`, errorMsg);
|
|
94
|
+
fontResults.push({ name: "SF Pro Display", status: "error", error: errorMsg });
|
|
95
|
+
}
|
|
81
96
|
try {
|
|
82
97
|
const appleEmoji = new FontFace(
|
|
83
98
|
"Apple Color Emoji",
|
|
@@ -111,14 +126,16 @@ function areFontsLoaded() {
|
|
|
111
126
|
const tiktokRegular = document.fonts.check('normal 16px "TikTok Sans"');
|
|
112
127
|
const tiktokBold = document.fonts.check('bold 16px "TikTok Sans"');
|
|
113
128
|
const sfPro = document.fonts.check('normal 16px "SF Pro"');
|
|
129
|
+
const sfProDisplay = document.fonts.check('normal 16px "SF Pro Display"');
|
|
114
130
|
const appleEmoji = document.fonts.check('normal 16px "Apple Color Emoji"');
|
|
115
131
|
console.log("[ugcinc-render/fonts] areFontsLoaded check:", {
|
|
116
132
|
tiktokRegular,
|
|
117
133
|
tiktokBold,
|
|
118
134
|
sfPro,
|
|
135
|
+
sfProDisplay,
|
|
119
136
|
appleEmoji
|
|
120
137
|
});
|
|
121
|
-
return tiktokRegular && tiktokBold && sfPro && appleEmoji;
|
|
138
|
+
return tiktokRegular && tiktokBold && sfPro && sfProDisplay && appleEmoji;
|
|
122
139
|
}
|
|
123
140
|
function debugFontStatus() {
|
|
124
141
|
console.log("[ugcinc-render/fonts] === FONT DEBUG STATUS ===");
|
package/dist/index.js
CHANGED
|
@@ -461,7 +461,7 @@ async function preloadFonts() {
|
|
|
461
461
|
const sfPro = new FontFace(
|
|
462
462
|
"SF Pro",
|
|
463
463
|
`url(${FONT_URLS.apple.regular})`,
|
|
464
|
-
{ weight: "
|
|
464
|
+
{ weight: "1 999" }
|
|
465
465
|
);
|
|
466
466
|
console.log(`[ugcinc-render/fonts] Loading SF Pro from: ${FONT_URLS.apple.regular}`);
|
|
467
467
|
await sfPro.load();
|
|
@@ -472,6 +472,21 @@ async function preloadFonts() {
|
|
|
472
472
|
console.error(`[ugcinc-render/fonts] Failed to load SF Pro:`, errorMsg);
|
|
473
473
|
fontResults.push({ name: "SF Pro", status: "error", error: errorMsg });
|
|
474
474
|
}
|
|
475
|
+
try {
|
|
476
|
+
const sfProDisplay = new FontFace(
|
|
477
|
+
"SF Pro Display",
|
|
478
|
+
`url(${FONT_URLS.apple.regular})`,
|
|
479
|
+
{ weight: "1 999" }
|
|
480
|
+
);
|
|
481
|
+
console.log(`[ugcinc-render/fonts] Loading SF Pro Display from: ${FONT_URLS.apple.regular}`);
|
|
482
|
+
await sfProDisplay.load();
|
|
483
|
+
document.fonts.add(sfProDisplay);
|
|
484
|
+
fontResults.push({ name: "SF Pro Display", status: "success" });
|
|
485
|
+
} catch (err) {
|
|
486
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
487
|
+
console.error(`[ugcinc-render/fonts] Failed to load SF Pro Display:`, errorMsg);
|
|
488
|
+
fontResults.push({ name: "SF Pro Display", status: "error", error: errorMsg });
|
|
489
|
+
}
|
|
475
490
|
try {
|
|
476
491
|
const appleEmoji = new FontFace(
|
|
477
492
|
"Apple Color Emoji",
|
|
@@ -505,14 +520,16 @@ function areFontsLoaded() {
|
|
|
505
520
|
const tiktokRegular = document.fonts.check('normal 16px "TikTok Sans"');
|
|
506
521
|
const tiktokBold = document.fonts.check('bold 16px "TikTok Sans"');
|
|
507
522
|
const sfPro = document.fonts.check('normal 16px "SF Pro"');
|
|
523
|
+
const sfProDisplay = document.fonts.check('normal 16px "SF Pro Display"');
|
|
508
524
|
const appleEmoji = document.fonts.check('normal 16px "Apple Color Emoji"');
|
|
509
525
|
console.log("[ugcinc-render/fonts] areFontsLoaded check:", {
|
|
510
526
|
tiktokRegular,
|
|
511
527
|
tiktokBold,
|
|
512
528
|
sfPro,
|
|
529
|
+
sfProDisplay,
|
|
513
530
|
appleEmoji
|
|
514
531
|
});
|
|
515
|
-
return tiktokRegular && tiktokBold && sfPro && appleEmoji;
|
|
532
|
+
return tiktokRegular && tiktokBold && sfPro && sfProDisplay && appleEmoji;
|
|
516
533
|
}
|
|
517
534
|
function debugFontStatus() {
|
|
518
535
|
console.log("[ugcinc-render/fonts] === FONT DEBUG STATUS ===");
|
|
@@ -3316,7 +3333,9 @@ function BaseDmComposition({
|
|
|
3316
3333
|
}
|
|
3317
3334
|
if (typeof document !== "undefined" && document.fonts) {
|
|
3318
3335
|
const sfProLoaded = document.fonts.check('normal 51px "SF Pro"');
|
|
3319
|
-
|
|
3336
|
+
const sfProDisplayLoaded = document.fonts.check('normal 51px "SF Pro Display"');
|
|
3337
|
+
const appleEmojiLoaded = document.fonts.check('normal 51px "Apple Color Emoji"');
|
|
3338
|
+
console.log("[BaseDmComposition] Font check - SF Pro:", sfProLoaded, "SF Pro Display:", sfProDisplayLoaded, "Apple Color Emoji:", appleEmojiLoaded);
|
|
3320
3339
|
}
|
|
3321
3340
|
};
|
|
3322
3341
|
loadFonts().then(() => {
|
package/dist/index.mjs
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
resolveCaptionStyle,
|
|
48
48
|
resolveElementPositions,
|
|
49
49
|
wrapText
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-4EZKUSAN.mjs";
|
|
51
51
|
|
|
52
52
|
// src/types/element.ts
|
|
53
53
|
var DIMENSION_PRESETS = {
|
|
@@ -2379,7 +2379,9 @@ function BaseDmComposition({
|
|
|
2379
2379
|
}
|
|
2380
2380
|
if (typeof document !== "undefined" && document.fonts) {
|
|
2381
2381
|
const sfProLoaded = document.fonts.check('normal 51px "SF Pro"');
|
|
2382
|
-
|
|
2382
|
+
const sfProDisplayLoaded = document.fonts.check('normal 51px "SF Pro Display"');
|
|
2383
|
+
const appleEmojiLoaded = document.fonts.check('normal 51px "Apple Color Emoji"');
|
|
2384
|
+
console.log("[BaseDmComposition] Font check - SF Pro:", sfProLoaded, "SF Pro Display:", sfProDisplayLoaded, "Apple Color Emoji:", appleEmojiLoaded);
|
|
2383
2385
|
}
|
|
2384
2386
|
};
|
|
2385
2387
|
loadFonts().then(() => {
|
package/dist/utils/index.js
CHANGED
|
@@ -140,7 +140,7 @@ async function preloadFonts() {
|
|
|
140
140
|
const sfPro = new FontFace(
|
|
141
141
|
"SF Pro",
|
|
142
142
|
`url(${FONT_URLS.apple.regular})`,
|
|
143
|
-
{ weight: "
|
|
143
|
+
{ weight: "1 999" }
|
|
144
144
|
);
|
|
145
145
|
console.log(`[ugcinc-render/fonts] Loading SF Pro from: ${FONT_URLS.apple.regular}`);
|
|
146
146
|
await sfPro.load();
|
|
@@ -151,6 +151,21 @@ async function preloadFonts() {
|
|
|
151
151
|
console.error(`[ugcinc-render/fonts] Failed to load SF Pro:`, errorMsg);
|
|
152
152
|
fontResults.push({ name: "SF Pro", status: "error", error: errorMsg });
|
|
153
153
|
}
|
|
154
|
+
try {
|
|
155
|
+
const sfProDisplay = new FontFace(
|
|
156
|
+
"SF Pro Display",
|
|
157
|
+
`url(${FONT_URLS.apple.regular})`,
|
|
158
|
+
{ weight: "1 999" }
|
|
159
|
+
);
|
|
160
|
+
console.log(`[ugcinc-render/fonts] Loading SF Pro Display from: ${FONT_URLS.apple.regular}`);
|
|
161
|
+
await sfProDisplay.load();
|
|
162
|
+
document.fonts.add(sfProDisplay);
|
|
163
|
+
fontResults.push({ name: "SF Pro Display", status: "success" });
|
|
164
|
+
} catch (err) {
|
|
165
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
166
|
+
console.error(`[ugcinc-render/fonts] Failed to load SF Pro Display:`, errorMsg);
|
|
167
|
+
fontResults.push({ name: "SF Pro Display", status: "error", error: errorMsg });
|
|
168
|
+
}
|
|
154
169
|
try {
|
|
155
170
|
const appleEmoji = new FontFace(
|
|
156
171
|
"Apple Color Emoji",
|
|
@@ -184,14 +199,16 @@ function areFontsLoaded() {
|
|
|
184
199
|
const tiktokRegular = document.fonts.check('normal 16px "TikTok Sans"');
|
|
185
200
|
const tiktokBold = document.fonts.check('bold 16px "TikTok Sans"');
|
|
186
201
|
const sfPro = document.fonts.check('normal 16px "SF Pro"');
|
|
202
|
+
const sfProDisplay = document.fonts.check('normal 16px "SF Pro Display"');
|
|
187
203
|
const appleEmoji = document.fonts.check('normal 16px "Apple Color Emoji"');
|
|
188
204
|
console.log("[ugcinc-render/fonts] areFontsLoaded check:", {
|
|
189
205
|
tiktokRegular,
|
|
190
206
|
tiktokBold,
|
|
191
207
|
sfPro,
|
|
208
|
+
sfProDisplay,
|
|
192
209
|
appleEmoji
|
|
193
210
|
});
|
|
194
|
-
return tiktokRegular && tiktokBold && sfPro && appleEmoji;
|
|
211
|
+
return tiktokRegular && tiktokBold && sfPro && sfProDisplay && appleEmoji;
|
|
195
212
|
}
|
|
196
213
|
function debugFontStatus() {
|
|
197
214
|
console.log("[ugcinc-render/fonts] === FONT DEBUG STATUS ===");
|
package/dist/utils/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.159",
|
|
4
4
|
"description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|