@formepdf/react 0.6.0 → 0.6.2

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/serialize.js CHANGED
@@ -600,6 +600,10 @@ const TEXT_OVERFLOW_MAP = {
600
600
  'ellipsis': 'Ellipsis',
601
601
  'clip': 'Clip',
602
602
  };
603
+ const LINE_BREAKING_MAP = {
604
+ 'optimal': 'optimal',
605
+ 'greedy': 'greedy',
606
+ };
603
607
  const OVERFLOW_MAP = {
604
608
  'visible': 'Visible',
605
609
  'hidden': 'Hidden',
@@ -746,6 +750,8 @@ export function mapStyle(style) {
746
750
  result.direction = style.direction;
747
751
  if (style.textOverflow !== undefined)
748
752
  result.textOverflow = TEXT_OVERFLOW_MAP[style.textOverflow];
753
+ if (style.lineBreaking !== undefined)
754
+ result.lineBreaking = LINE_BREAKING_MAP[style.lineBreaking];
749
755
  if (style.overflow !== undefined)
750
756
  result.overflow = OVERFLOW_MAP[style.overflow];
751
757
  // Color
package/dist/types.d.ts CHANGED
@@ -98,6 +98,8 @@ export interface Style {
98
98
  direction?: 'ltr' | 'rtl' | 'auto';
99
99
  /** Text overflow behavior: 'wrap' (default), 'ellipsis' (truncate with ...), 'clip' (truncate). */
100
100
  textOverflow?: 'wrap' | 'ellipsis' | 'clip';
101
+ /** Line breaking algorithm: 'optimal' (Knuth-Plass, default) or 'greedy'. */
102
+ lineBreaking?: 'optimal' | 'greedy';
101
103
  /** Overflow behavior: 'visible' (default) or 'hidden' (clips children to bounds). */
102
104
  overflow?: 'visible' | 'hidden';
103
105
  color?: string;
@@ -601,6 +603,7 @@ export interface FormeStyle {
601
603
  lang?: string;
602
604
  direction?: string;
603
605
  textOverflow?: string;
606
+ lineBreaking?: string;
604
607
  overflow?: string;
605
608
  color?: FormeColor;
606
609
  backgroundColor?: FormeColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formepdf/react",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "JSX-to-JSON serializer for Forme PDF engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",