@canvas-components/print-design-plugin 0.1.7 → 0.1.9

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.
@@ -728,6 +728,7 @@ interface TextElement extends PrintDesignElementBase {
728
728
  fontSize?: number;
729
729
  fontFamily?: string;
730
730
  fontWeight?: string;
731
+ fontStyle?: "normal" | "italic";
731
732
  color?: string;
732
733
  /** 文字颜色的静态或字段绑定模式。@default "static" */
733
734
  colorMode?: "static" | "binding";
@@ -747,6 +748,14 @@ interface TextElement extends PrintDesignElementBase {
747
748
  textDirection?: "horizontal" | "vertical";
748
749
  verticalAlign?: "top" | "middle" | "bottom";
749
750
  lineHeight?: number;
751
+ /** 段落缩进方式;未设置时不缩进。 */
752
+ indentMode?: "none" | "firstLine" | "hanging";
753
+ /** 非负的缩进数值。 */
754
+ indentValue?: number;
755
+ /** 缩进单位;字符按当前有效字号的 1em 计算。 */
756
+ indentUnit?: "char" | PrintDesignUnit;
757
+ /** 分页预断行后的逐行缩进,单位毫米;只用于绘制副本。 */
758
+ prewrappedIndents?: number[];
750
759
  /** 下划线条数;0 表示不绘制。 */
751
760
  underlineCount?: number;
752
761
  underlineStyle?: "solid" | "dashed" | "dotted" | "wavy";
@@ -772,6 +781,43 @@ declare module "@canvas-components/print-design" {
772
781
  }
773
782
  }
774
783
 
784
+ /** 只包含文字和局部字符样式的片段。 */
785
+ interface RichTextRun {
786
+ text: string;
787
+ style?: {
788
+ fontFamily?: string;
789
+ fontSize?: number;
790
+ fontWeight?: string;
791
+ fontStyle?: "normal" | "italic";
792
+ color?: string;
793
+ };
794
+ }
795
+ /** 独立的富文本元素,不接受 HTML 或嵌入节点。 */
796
+ interface RichTextElement extends PrintDesignElementBase {
797
+ type: "richText";
798
+ runs: RichTextRun[];
799
+ fontSize?: number;
800
+ fontFamily?: string;
801
+ fontWeight?: string;
802
+ fontStyle?: "normal" | "italic";
803
+ color?: string;
804
+ textAlign?: "left" | "center" | "right";
805
+ verticalAlign?: "top" | "middle" | "bottom";
806
+ lineHeight?: number;
807
+ indentMode?: "none" | "firstLine" | "hanging";
808
+ indentValue?: number;
809
+ indentUnit?: "char" | PrintDesignUnit;
810
+ /** 分页时预先断行的输出副本。 */
811
+ prewrapped?: boolean;
812
+ /** 预断行的每行缩进,单位毫米。 */
813
+ prewrappedIndents?: number[];
814
+ }
815
+ declare module "@canvas-components/print-design" {
816
+ interface PrintDesignElementTypeMap {
817
+ richText: RichTextElement;
818
+ }
819
+ }
820
+
775
821
  /** 形状元素。 */
776
822
  interface ShapeElement extends PrintDesignElementBase {
777
823
  type: "shape";
@@ -1077,4 +1123,4 @@ declare module "@canvas-components/print-design" {
1077
1123
  }
1078
1124
  }
1079
1125
 
1080
- export { assertNativePluginDependencies as $, type PivotFieldLayout as A, type BarcodeElement as B, type ChartData as C, type DateTimeElement as D, type PivotFilterState as E, type FlowElement as F, type GanttDependency as G, type PivotTableElement as H, type ImageCrop as I, type ProgressElement as J, type TableBorder as K, type ListElement as L, type MoneyUpperElement as M, type TableBorders as N, type TableCell as O, type PrintDesignNativePlugin as P, type QrCodeElement as Q, type RulerElement as R, type ShapeElement as S, type TextElement as T, type TableCellSelectionState as U, type TableColumn as V, type TableConditionalFormat as W, type TableDiagonalTextStyle as X, type TableElement as Y, type TableMergeCell as Z, type WatermarkElement as _, type BrushElement as a, defineNativePlugin as a0, type BrushStrokeStyle as b, type ChartElement as c, type ClockElement as d, type ConnectorElement as e, type ConnectorEndpoint as f, type CoordinateElement as g, type DividerElement as h, type FlowItem as i, type GanttElement as j, type GanttScale as k, type GanttTask as l, type GridCell as m, type GridColumnLoop as n, type GridElement as o, type GridLoop as p, type GridLoopOverflowMarker as q, type GridMark as r, type ImageElement as s, type PackedReport as t, type PackedReportAppendRow as u, type PackedReportValue as v, type PageNumberElement as w, type PivotAggregator as x, type PivotField as y, type PivotFieldArea as z };
1126
+ export { type TableMergeCell as $, type PivotFieldLayout as A, type BarcodeElement as B, type ChartData as C, type DateTimeElement as D, type PivotFilterState as E, type FlowElement as F, type GanttDependency as G, type PivotTableElement as H, type ImageCrop as I, type ProgressElement as J, type RichTextRun as K, type ListElement as L, type MoneyUpperElement as M, type RulerElement as N, type TableBorder as O, type PrintDesignNativePlugin as P, type QrCodeElement as Q, type RichTextElement as R, type ShapeElement as S, type TextElement as T, type TableBorders as U, type TableCell as V, type TableCellSelectionState as W, type TableColumn as X, type TableConditionalFormat as Y, type TableDiagonalTextStyle as Z, type TableElement as _, type BrushElement as a, type WatermarkElement as a0, assertNativePluginDependencies as a1, defineNativePlugin as a2, type BrushStrokeStyle as b, type ChartElement as c, type ClockElement as d, type ConnectorElement as e, type ConnectorEndpoint as f, type CoordinateElement as g, type DividerElement as h, type FlowItem as i, type GanttElement as j, type GanttScale as k, type GanttTask as l, type GridCell as m, type GridColumnLoop as n, type GridElement as o, type GridLoop as p, type GridLoopOverflowMarker as q, type GridMark as r, type ImageElement as s, type PackedReport as t, type PackedReportAppendRow as u, type PackedReportValue as v, type PageNumberElement as w, type PivotAggregator as x, type PivotField as y, type PivotFieldArea as z };
@@ -728,6 +728,7 @@ interface TextElement extends PrintDesignElementBase {
728
728
  fontSize?: number;
729
729
  fontFamily?: string;
730
730
  fontWeight?: string;
731
+ fontStyle?: "normal" | "italic";
731
732
  color?: string;
732
733
  /** 文字颜色的静态或字段绑定模式。@default "static" */
733
734
  colorMode?: "static" | "binding";
@@ -747,6 +748,14 @@ interface TextElement extends PrintDesignElementBase {
747
748
  textDirection?: "horizontal" | "vertical";
748
749
  verticalAlign?: "top" | "middle" | "bottom";
749
750
  lineHeight?: number;
751
+ /** 段落缩进方式;未设置时不缩进。 */
752
+ indentMode?: "none" | "firstLine" | "hanging";
753
+ /** 非负的缩进数值。 */
754
+ indentValue?: number;
755
+ /** 缩进单位;字符按当前有效字号的 1em 计算。 */
756
+ indentUnit?: "char" | PrintDesignUnit;
757
+ /** 分页预断行后的逐行缩进,单位毫米;只用于绘制副本。 */
758
+ prewrappedIndents?: number[];
750
759
  /** 下划线条数;0 表示不绘制。 */
751
760
  underlineCount?: number;
752
761
  underlineStyle?: "solid" | "dashed" | "dotted" | "wavy";
@@ -772,6 +781,43 @@ declare module "@canvas-components/print-design" {
772
781
  }
773
782
  }
774
783
 
784
+ /** 只包含文字和局部字符样式的片段。 */
785
+ interface RichTextRun {
786
+ text: string;
787
+ style?: {
788
+ fontFamily?: string;
789
+ fontSize?: number;
790
+ fontWeight?: string;
791
+ fontStyle?: "normal" | "italic";
792
+ color?: string;
793
+ };
794
+ }
795
+ /** 独立的富文本元素,不接受 HTML 或嵌入节点。 */
796
+ interface RichTextElement extends PrintDesignElementBase {
797
+ type: "richText";
798
+ runs: RichTextRun[];
799
+ fontSize?: number;
800
+ fontFamily?: string;
801
+ fontWeight?: string;
802
+ fontStyle?: "normal" | "italic";
803
+ color?: string;
804
+ textAlign?: "left" | "center" | "right";
805
+ verticalAlign?: "top" | "middle" | "bottom";
806
+ lineHeight?: number;
807
+ indentMode?: "none" | "firstLine" | "hanging";
808
+ indentValue?: number;
809
+ indentUnit?: "char" | PrintDesignUnit;
810
+ /** 分页时预先断行的输出副本。 */
811
+ prewrapped?: boolean;
812
+ /** 预断行的每行缩进,单位毫米。 */
813
+ prewrappedIndents?: number[];
814
+ }
815
+ declare module "@canvas-components/print-design" {
816
+ interface PrintDesignElementTypeMap {
817
+ richText: RichTextElement;
818
+ }
819
+ }
820
+
775
821
  /** 形状元素。 */
776
822
  interface ShapeElement extends PrintDesignElementBase {
777
823
  type: "shape";
@@ -1077,4 +1123,4 @@ declare module "@canvas-components/print-design" {
1077
1123
  }
1078
1124
  }
1079
1125
 
1080
- export { assertNativePluginDependencies as $, type PivotFieldLayout as A, type BarcodeElement as B, type ChartData as C, type DateTimeElement as D, type PivotFilterState as E, type FlowElement as F, type GanttDependency as G, type PivotTableElement as H, type ImageCrop as I, type ProgressElement as J, type TableBorder as K, type ListElement as L, type MoneyUpperElement as M, type TableBorders as N, type TableCell as O, type PrintDesignNativePlugin as P, type QrCodeElement as Q, type RulerElement as R, type ShapeElement as S, type TextElement as T, type TableCellSelectionState as U, type TableColumn as V, type TableConditionalFormat as W, type TableDiagonalTextStyle as X, type TableElement as Y, type TableMergeCell as Z, type WatermarkElement as _, type BrushElement as a, defineNativePlugin as a0, type BrushStrokeStyle as b, type ChartElement as c, type ClockElement as d, type ConnectorElement as e, type ConnectorEndpoint as f, type CoordinateElement as g, type DividerElement as h, type FlowItem as i, type GanttElement as j, type GanttScale as k, type GanttTask as l, type GridCell as m, type GridColumnLoop as n, type GridElement as o, type GridLoop as p, type GridLoopOverflowMarker as q, type GridMark as r, type ImageElement as s, type PackedReport as t, type PackedReportAppendRow as u, type PackedReportValue as v, type PageNumberElement as w, type PivotAggregator as x, type PivotField as y, type PivotFieldArea as z };
1126
+ export { type TableMergeCell as $, type PivotFieldLayout as A, type BarcodeElement as B, type ChartData as C, type DateTimeElement as D, type PivotFilterState as E, type FlowElement as F, type GanttDependency as G, type PivotTableElement as H, type ImageCrop as I, type ProgressElement as J, type RichTextRun as K, type ListElement as L, type MoneyUpperElement as M, type RulerElement as N, type TableBorder as O, type PrintDesignNativePlugin as P, type QrCodeElement as Q, type RichTextElement as R, type ShapeElement as S, type TextElement as T, type TableBorders as U, type TableCell as V, type TableCellSelectionState as W, type TableColumn as X, type TableConditionalFormat as Y, type TableDiagonalTextStyle as Z, type TableElement as _, type BrushElement as a, type WatermarkElement as a0, assertNativePluginDependencies as a1, defineNativePlugin as a2, type BrushStrokeStyle as b, type ChartElement as c, type ClockElement as d, type ConnectorElement as e, type ConnectorEndpoint as f, type CoordinateElement as g, type DividerElement as h, type FlowItem as i, type GanttElement as j, type GanttScale as k, type GanttTask as l, type GridCell as m, type GridColumnLoop as n, type GridElement as o, type GridLoop as p, type GridLoopOverflowMarker as q, type GridMark as r, type ImageElement as s, type PackedReport as t, type PackedReportAppendRow as u, type PackedReportValue as v, type PageNumberElement as w, type PivotAggregator as x, type PivotField as y, type PivotFieldArea as z };