ugcinc 4.5.62 → 4.5.63

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.
@@ -338,6 +338,20 @@ function TextElement({ segment, scale = 1 }) {
338
338
  }, [autoWidth, calculatedWidth, width, backgroundColor, backgroundOpacity, borderRadiusStyle]);
339
339
  const hasStroke = strokeWidth > 0 && !!strokeColor;
340
340
  const filterId = `te-stroke-${react_1.default.useId().replace(/:/g, '')}`;
341
+ if (hasStroke) {
342
+ console.log('[TextElement] STROKE_DEBUG:', JSON.stringify({
343
+ text: segment.text.substring(0, 50),
344
+ strokeWidth,
345
+ strokeColor,
346
+ filterId,
347
+ paddingTop, paddingRight, paddingBottom, paddingLeft,
348
+ fontSize,
349
+ strokePadPct: Math.max(50, Math.ceil((strokeWidth / fontSize) * 200)),
350
+ autoWidth,
351
+ width,
352
+ calculatedWidth,
353
+ }));
354
+ }
341
355
  // Text style (fill layer)
342
356
  const textStyle = (0, react_1.useMemo)(() => ({
343
357
  fontFamily,
@@ -369,7 +383,7 @@ function TextElement({ segment, scale = 1 }) {
369
383
  const strokeTextStyle = (0, react_1.useMemo)(() => {
370
384
  if (!hasStroke)
371
385
  return undefined;
372
- return {
386
+ const style = {
373
387
  ...textStyle,
374
388
  color: strokeColor,
375
389
  filter: `url(#${filterId})`,
@@ -380,6 +394,16 @@ function TextElement({ segment, scale = 1 }) {
380
394
  bottom: -strokeWidth,
381
395
  padding: `${paddingTop + strokeWidth}px ${paddingRight + strokeWidth}px ${paddingBottom + strokeWidth}px ${paddingLeft + strokeWidth}px`,
382
396
  };
397
+ console.log('[TextElement] STROKE_STYLE:', JSON.stringify({
398
+ filter: style.filter,
399
+ top: style.top,
400
+ left: style.left,
401
+ right: style.right,
402
+ bottom: style.bottom,
403
+ padding: style.padding,
404
+ color: style.color,
405
+ }));
406
+ return style;
383
407
  }, [hasStroke, textStyle, strokeColor, filterId, strokeWidth, paddingTop, paddingRight, paddingBottom, paddingLeft]);
384
408
  // SVG filter for smooth text outline (avoids miter spikes from -webkit-text-stroke)
385
409
  const strokePadPct = Math.max(50, Math.ceil((strokeWidth / fontSize) * 200));
@@ -389,6 +413,11 @@ function TextElement({ segment, scale = 1 }) {
389
413
  // keep layout identical to the fill layer.
390
414
  const renderStrokeText = (text) => {
391
415
  const parts = (0, emoji_1.splitTextAndEmojis)(text);
416
+ console.log('[TextElement] EMOJI_DEBUG:', JSON.stringify({
417
+ text: text.substring(0, 50),
418
+ partsCount: parts.length,
419
+ parts: parts.map(p => ({ type: p.type, content: p.content.substring(0, 10) })),
420
+ }));
392
421
  if (parts.every(p => p.type === 'text'))
393
422
  return text;
394
423
  return parts.map((part, i) => part.type === 'emoji'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.5.62",
3
+ "version": "4.5.63",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",