@canvas-components/print-design 0.1.14 → 0.1.16
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/index.cjs +1 -1
- package/dist/index.d.cts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -8353,7 +8353,7 @@ function isPrintDesignRecordCollection(value) {
|
|
|
8353
8353
|
}
|
|
8354
8354
|
|
|
8355
8355
|
// package.json
|
|
8356
|
-
var version = "0.1.
|
|
8356
|
+
var version = "0.1.16";
|
|
8357
8357
|
|
|
8358
8358
|
exports.DEFAULT_PRINT_DESIGN_DEBUG_OPTIONS = DEFAULT_PRINT_DESIGN_DEBUG_OPTIONS;
|
|
8359
8359
|
exports.PRINT_DESIGN_CSS_DPI = PRINT_DESIGN_CSS_DPI;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/** 设计器显示单位;文档和打印计算始终使用毫米。 */
|
|
2
|
-
type PrintDesignUnit = "mm" | "cm" | "in" | "pt" | "px";
|
|
3
|
-
/** 每个显示单位对应的毫米数;px 按 CSS 96 DPI 换算。 */
|
|
4
|
-
declare const PRINT_DESIGN_UNIT_MM: Record<PrintDesignUnit, number>;
|
|
5
|
-
/** 将毫米值转换为界面显示值。 */
|
|
6
|
-
declare function toDisplayUnit(mm: number, unit?: PrintDesignUnit): number;
|
|
7
|
-
/** 将界面输入值转换回毫米。 */
|
|
8
|
-
declare function fromDisplayUnit(value: number, unit?: PrintDesignUnit): number;
|
|
9
|
-
/** 格式化辅助线和测距标签。 */
|
|
10
|
-
declare function formatDisplayUnit(mm: number, unit?: PrintDesignUnit): string;
|
|
11
|
-
|
|
12
1
|
/** 读取自有字段,支持点路径和数字数组索引,不访问原型链。 */
|
|
13
2
|
declare function resolvePrintDesignDataPath(data: Record<string, unknown>, path: string): unknown;
|
|
14
3
|
/** 数组绑定按原顺序逐项换行拼接,忽略缺失值和对象,保留 0 与 false。 */
|
|
@@ -1085,7 +1074,19 @@ declare class PrintDesignComponentRegistry {
|
|
|
1085
1074
|
list(): readonly PrintDesignComponentRenderer[];
|
|
1086
1075
|
}
|
|
1087
1076
|
|
|
1077
|
+
/** 设计器显示单位;文档和打印计算始终使用毫米。 */
|
|
1078
|
+
type PrintDesignUnit = "mm" | "cm" | "in" | "pt" | "px";
|
|
1079
|
+
/** 每个显示单位对应的毫米数;px 按 CSS 96 DPI 换算。 */
|
|
1080
|
+
declare const PRINT_DESIGN_UNIT_MM: Record<PrintDesignUnit, number>;
|
|
1081
|
+
/** 将毫米值转换为界面显示值。 */
|
|
1082
|
+
declare function toDisplayUnit(mm: number, unit?: PrintDesignUnit): number;
|
|
1083
|
+
/** 将界面输入值转换回毫米。 */
|
|
1084
|
+
declare function fromDisplayUnit(value: number, unit?: PrintDesignUnit): number;
|
|
1085
|
+
/** 格式化辅助线和测距标签。 */
|
|
1086
|
+
declare function formatDisplayUnit(mm: number, unit?: PrintDesignUnit): string;
|
|
1087
|
+
|
|
1088
1088
|
/** 设计文档当前支持的 schema 版本。 */
|
|
1089
|
+
|
|
1089
1090
|
declare const PRINT_DESIGN_SCHEMA_VERSION = 1;
|
|
1090
1091
|
/** 元素共有的毫米坐标与编辑状态。 */
|
|
1091
1092
|
interface PrintDesignElementBase {
|
|
@@ -2335,6 +2336,6 @@ interface PrintDesignRecordCollection {
|
|
|
2335
2336
|
/** 识别包含记录数组的对象,不把普通对象当作数据行。 */
|
|
2336
2337
|
declare function isPrintDesignRecordCollection(value: unknown): value is PrintDesignRecordCollection;
|
|
2337
2338
|
|
|
2338
|
-
var version = "0.1.
|
|
2339
|
+
var version = "0.1.16";
|
|
2339
2340
|
|
|
2340
2341
|
export { DEFAULT_PRINT_DESIGN_DEBUG_OPTIONS, type ElementDrawContext, PRINT_DESIGN_CSS_DPI, PRINT_DESIGN_DEFAULT_FONT_FAMILY, PRINT_DESIGN_MM_PER_INCH, PRINT_DESIGN_SCHEMA_VERSION, PRINT_DESIGN_UNIT_MM, version as PRINT_DESIGN_VERSION, PrintDesign, type PrintDesignAgentApi, type PrintDesignAgentComponentCatalog, type PrintDesignAgentToolDefinition, type PrintDesignComponentBoundaryResize, type PrintDesignComponentCellContextTarget, type PrintDesignComponentCellEditor, type PrintDesignComponentCellHit, type PrintDesignComponentCellSelection, type PrintDesignComponentCellSelectionBehavior, type PrintDesignComponentCellSelectionContext, type PrintDesignComponentCellSelectionState, type PrintDesignComponentClickContext, type PrintDesignComponentCommands, type PrintDesignComponentConnection, type PrintDesignComponentCrop, type PrintDesignComponentDebugContext, type PrintDesignComponentDebugRegion, type PrintDesignComponentEditHandleContext, type PrintDesignComponentHandleContext, type PrintDesignComponentHandleDrag, type PrintDesignComponentHitContext, type PrintDesignComponentPathDrawing, type PrintDesignComponentPointerContext, type PrintDesignComponentPointerStroke, PrintDesignComponentRegistry, type PrintDesignComponentRenderer, type PrintDesignComponentResource, type PrintDesignComponentSelectionContext, type PrintDesignComponentSelector, type PrintDesignComponentSelectorDrawContext, type PrintDesignComponentSourceCreate, type PrintDesignConnectionAnchorContext, type PrintDesignConnectionCreateHandle, type PrintDesignCropRect, type PrintDesignDataField, type PrintDesignDebugOptions, type PrintDesignDocument, type PrintDesignElement, type PrintDesignElementBase, type PrintDesignElementTypeMap, type PrintDesignExportOptions, type PrintDesignHtmlOptions, type PrintDesignInlineTextEditor, type PrintDesignInlineTextPresentation, type PrintDesignLayerAlignment, type PrintDesignLayerNode, type PrintDesignOptions, type PrintDesignOrientation, type PrintDesignPage, type PrintDesignPageMargins, type PrintDesignPluginRenderer, type PrintDesignRecordCollection, type PrintDesignSelection, type PrintDesignToolDebugContribution, type PrintDesignToolDebugRegion, type PrintDesignUnit, type TransformPoint, buildPrintDesignLayerTree, builtinPrintDesignComponentRegistry, canvasPointToPageMillimeters, clonePrintDesignDocument, createPrintDesignAgentApi, createPrintDesignDocument, createPrintDesignId, createPrintDesignPage, createPrintDesignPrintFrame, cssColor, cssFont, cssNumber, definePrintDesignComponentRenderer, definePrintDesignPluginRenderer, drawPrintDesignElement, drawPrintDesignPage, elementTransformCss, elementTransformHomography, escapeHtml, formatDisplayUnit, fromDisplayUnit, getPrintDesignAlignmentUnits, getPrintDesignDataFields, getPrintDesignElementDataConfig, getPrintDesignPageSize, getSelectionRect, hitTestPrintDesignPage, inverseTransformPoint, isPrintDesignColorValue, isPrintDesignRecordCollection, materializePrintDesignDocument, millimetersToPixels, paginatePrintDesignDocument, parsePrintDesignDocument, pixelsToMillimeters, preparePrintDesignCanvasPage, printDesignAgentTools, printPrintDesignHtml, printPrintDesignHtmlInFrame, projectTransformPoint, renderPrintDesignHtmlFrame, renderPrintDesignPageToCanvas, resolveDesignText, resolvePrintDesignBinding, resolvePrintDesignDataPath, resolvePrintDesignDebugOptions, resolvePrintDesignElementData, resolvePrintDesignElementVisible, resolvePrintDesignFontFamily, resolvePrintDesignPageVisible, rotatePoint, serializePrintDesignDocument, stringifyPrintDesignBinding, toDisplayUnit, transformPrintDesignToHtml, transformPrintDesignToHtmlAsync, transformPrintDesignToHtmlBatches, transformRect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/** 设计器显示单位;文档和打印计算始终使用毫米。 */
|
|
2
|
-
type PrintDesignUnit = "mm" | "cm" | "in" | "pt" | "px";
|
|
3
|
-
/** 每个显示单位对应的毫米数;px 按 CSS 96 DPI 换算。 */
|
|
4
|
-
declare const PRINT_DESIGN_UNIT_MM: Record<PrintDesignUnit, number>;
|
|
5
|
-
/** 将毫米值转换为界面显示值。 */
|
|
6
|
-
declare function toDisplayUnit(mm: number, unit?: PrintDesignUnit): number;
|
|
7
|
-
/** 将界面输入值转换回毫米。 */
|
|
8
|
-
declare function fromDisplayUnit(value: number, unit?: PrintDesignUnit): number;
|
|
9
|
-
/** 格式化辅助线和测距标签。 */
|
|
10
|
-
declare function formatDisplayUnit(mm: number, unit?: PrintDesignUnit): string;
|
|
11
|
-
|
|
12
1
|
/** 读取自有字段,支持点路径和数字数组索引,不访问原型链。 */
|
|
13
2
|
declare function resolvePrintDesignDataPath(data: Record<string, unknown>, path: string): unknown;
|
|
14
3
|
/** 数组绑定按原顺序逐项换行拼接,忽略缺失值和对象,保留 0 与 false。 */
|
|
@@ -1085,7 +1074,19 @@ declare class PrintDesignComponentRegistry {
|
|
|
1085
1074
|
list(): readonly PrintDesignComponentRenderer[];
|
|
1086
1075
|
}
|
|
1087
1076
|
|
|
1077
|
+
/** 设计器显示单位;文档和打印计算始终使用毫米。 */
|
|
1078
|
+
type PrintDesignUnit = "mm" | "cm" | "in" | "pt" | "px";
|
|
1079
|
+
/** 每个显示单位对应的毫米数;px 按 CSS 96 DPI 换算。 */
|
|
1080
|
+
declare const PRINT_DESIGN_UNIT_MM: Record<PrintDesignUnit, number>;
|
|
1081
|
+
/** 将毫米值转换为界面显示值。 */
|
|
1082
|
+
declare function toDisplayUnit(mm: number, unit?: PrintDesignUnit): number;
|
|
1083
|
+
/** 将界面输入值转换回毫米。 */
|
|
1084
|
+
declare function fromDisplayUnit(value: number, unit?: PrintDesignUnit): number;
|
|
1085
|
+
/** 格式化辅助线和测距标签。 */
|
|
1086
|
+
declare function formatDisplayUnit(mm: number, unit?: PrintDesignUnit): string;
|
|
1087
|
+
|
|
1088
1088
|
/** 设计文档当前支持的 schema 版本。 */
|
|
1089
|
+
|
|
1089
1090
|
declare const PRINT_DESIGN_SCHEMA_VERSION = 1;
|
|
1090
1091
|
/** 元素共有的毫米坐标与编辑状态。 */
|
|
1091
1092
|
interface PrintDesignElementBase {
|
|
@@ -2335,6 +2336,6 @@ interface PrintDesignRecordCollection {
|
|
|
2335
2336
|
/** 识别包含记录数组的对象,不把普通对象当作数据行。 */
|
|
2336
2337
|
declare function isPrintDesignRecordCollection(value: unknown): value is PrintDesignRecordCollection;
|
|
2337
2338
|
|
|
2338
|
-
var version = "0.1.
|
|
2339
|
+
var version = "0.1.16";
|
|
2339
2340
|
|
|
2340
2341
|
export { DEFAULT_PRINT_DESIGN_DEBUG_OPTIONS, type ElementDrawContext, PRINT_DESIGN_CSS_DPI, PRINT_DESIGN_DEFAULT_FONT_FAMILY, PRINT_DESIGN_MM_PER_INCH, PRINT_DESIGN_SCHEMA_VERSION, PRINT_DESIGN_UNIT_MM, version as PRINT_DESIGN_VERSION, PrintDesign, type PrintDesignAgentApi, type PrintDesignAgentComponentCatalog, type PrintDesignAgentToolDefinition, type PrintDesignComponentBoundaryResize, type PrintDesignComponentCellContextTarget, type PrintDesignComponentCellEditor, type PrintDesignComponentCellHit, type PrintDesignComponentCellSelection, type PrintDesignComponentCellSelectionBehavior, type PrintDesignComponentCellSelectionContext, type PrintDesignComponentCellSelectionState, type PrintDesignComponentClickContext, type PrintDesignComponentCommands, type PrintDesignComponentConnection, type PrintDesignComponentCrop, type PrintDesignComponentDebugContext, type PrintDesignComponentDebugRegion, type PrintDesignComponentEditHandleContext, type PrintDesignComponentHandleContext, type PrintDesignComponentHandleDrag, type PrintDesignComponentHitContext, type PrintDesignComponentPathDrawing, type PrintDesignComponentPointerContext, type PrintDesignComponentPointerStroke, PrintDesignComponentRegistry, type PrintDesignComponentRenderer, type PrintDesignComponentResource, type PrintDesignComponentSelectionContext, type PrintDesignComponentSelector, type PrintDesignComponentSelectorDrawContext, type PrintDesignComponentSourceCreate, type PrintDesignConnectionAnchorContext, type PrintDesignConnectionCreateHandle, type PrintDesignCropRect, type PrintDesignDataField, type PrintDesignDebugOptions, type PrintDesignDocument, type PrintDesignElement, type PrintDesignElementBase, type PrintDesignElementTypeMap, type PrintDesignExportOptions, type PrintDesignHtmlOptions, type PrintDesignInlineTextEditor, type PrintDesignInlineTextPresentation, type PrintDesignLayerAlignment, type PrintDesignLayerNode, type PrintDesignOptions, type PrintDesignOrientation, type PrintDesignPage, type PrintDesignPageMargins, type PrintDesignPluginRenderer, type PrintDesignRecordCollection, type PrintDesignSelection, type PrintDesignToolDebugContribution, type PrintDesignToolDebugRegion, type PrintDesignUnit, type TransformPoint, buildPrintDesignLayerTree, builtinPrintDesignComponentRegistry, canvasPointToPageMillimeters, clonePrintDesignDocument, createPrintDesignAgentApi, createPrintDesignDocument, createPrintDesignId, createPrintDesignPage, createPrintDesignPrintFrame, cssColor, cssFont, cssNumber, definePrintDesignComponentRenderer, definePrintDesignPluginRenderer, drawPrintDesignElement, drawPrintDesignPage, elementTransformCss, elementTransformHomography, escapeHtml, formatDisplayUnit, fromDisplayUnit, getPrintDesignAlignmentUnits, getPrintDesignDataFields, getPrintDesignElementDataConfig, getPrintDesignPageSize, getSelectionRect, hitTestPrintDesignPage, inverseTransformPoint, isPrintDesignColorValue, isPrintDesignRecordCollection, materializePrintDesignDocument, millimetersToPixels, paginatePrintDesignDocument, parsePrintDesignDocument, pixelsToMillimeters, preparePrintDesignCanvasPage, printDesignAgentTools, printPrintDesignHtml, printPrintDesignHtmlInFrame, projectTransformPoint, renderPrintDesignHtmlFrame, renderPrintDesignPageToCanvas, resolveDesignText, resolvePrintDesignBinding, resolvePrintDesignDataPath, resolvePrintDesignDebugOptions, resolvePrintDesignElementData, resolvePrintDesignElementVisible, resolvePrintDesignFontFamily, resolvePrintDesignPageVisible, rotatePoint, serializePrintDesignDocument, stringifyPrintDesignBinding, toDisplayUnit, transformPrintDesignToHtml, transformPrintDesignToHtmlAsync, transformPrintDesignToHtmlBatches, transformRect };
|
package/dist/index.js
CHANGED
|
@@ -8351,6 +8351,6 @@ function isPrintDesignRecordCollection(value) {
|
|
|
8351
8351
|
}
|
|
8352
8352
|
|
|
8353
8353
|
// package.json
|
|
8354
|
-
var version = "0.1.
|
|
8354
|
+
var version = "0.1.16";
|
|
8355
8355
|
|
|
8356
8356
|
export { DEFAULT_PRINT_DESIGN_DEBUG_OPTIONS, PRINT_DESIGN_CSS_DPI, PRINT_DESIGN_DEFAULT_FONT_FAMILY, PRINT_DESIGN_MM_PER_INCH, PRINT_DESIGN_SCHEMA_VERSION, PRINT_DESIGN_UNIT_MM, version as PRINT_DESIGN_VERSION, PrintDesign, PrintDesignComponentRegistry, buildPrintDesignLayerTree, builtinPrintDesignComponentRegistry, canvasPointToPageMillimeters, clonePrintDesignDocument, createPrintDesignAgentApi, createPrintDesignDocument, createPrintDesignId, createPrintDesignPage, createPrintDesignPrintFrame, cssColor, cssFont, cssNumber, definePrintDesignComponentRenderer, definePrintDesignPluginRenderer, drawPrintDesignElement, drawPrintDesignPage, elementTransformCss, elementTransformHomography, escapeHtml, formatDisplayUnit, fromDisplayUnit, getPrintDesignAlignmentUnits, getPrintDesignDataFields, getPrintDesignElementDataConfig, getPrintDesignPageSize, getSelectionRect, hitTestPrintDesignPage, inverseTransformPoint, isPrintDesignColorValue, isPrintDesignRecordCollection, materializePrintDesignDocument, millimetersToPixels, paginatePrintDesignDocument, parsePrintDesignDocument, pixelsToMillimeters, preparePrintDesignCanvasPage, printDesignAgentTools, printPrintDesignHtml, printPrintDesignHtmlInFrame, projectTransformPoint, renderPrintDesignHtmlFrame, renderPrintDesignPageToCanvas, resolveDesignText, resolvePrintDesignBinding, resolvePrintDesignDataPath, resolvePrintDesignDebugOptions, resolvePrintDesignElementData, resolvePrintDesignElementVisible, resolvePrintDesignFontFamily, resolvePrintDesignPageVisible, rotatePoint2 as rotatePoint, serializePrintDesignDocument, stringifyPrintDesignBinding, toDisplayUnit, transformPrintDesignToHtml, transformPrintDesignToHtmlAsync, transformPrintDesignToHtmlBatches, transformRect };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canvas-components/print-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Framework-agnostic Canvas print design engine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@canvas-components/icons": "0.1.2",
|
|
30
|
-
"@canvas-components/utils": "0.2.
|
|
30
|
+
"@canvas-components/utils": "0.2.11"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsup --config tsup.config.ts"
|