@hankchen/canvas-editor-vue 0.7.0 → 0.8.0

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/canvas.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-D3fFnBqG.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-DuvO27sj.js";
2
2
  export { e as AlignFloatBar, n as CanvasSurface, a as ContextMenu, f as EditOverlayToolbar, l as FindBar, m as GuidesOverlay, d as Ruler, c as TextEditingOverlay, u as createGizmoOverlayPainter, h as createRafScheduler, t as drawCreateRubberBand, s as drawFindMatches, p as drawSelectionGizmo, r as useDpr, o as useFindSession, g as useTextEditing, i as watchDprChanges };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-D3fFnBqG.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./canvas-DuvO27sj.js";
2
2
  import { a as _, c as v, i as y, l as b, n as x, o as S, r as C, s as w, t as T } from "./layer-panel-BouAYiDq.js";
3
- import { a as E, c as D, d as O, f as k, i as A, l as j, n as M, o as N, r as P, s as F, t as I, u as L } from "./property-panel-DJQJzioT.js";
3
+ import { a as E, c as D, d as O, f as k, i as A, l as j, n as M, o as N, r as P, s as F, t as I, u as L } from "./property-panel-BkfqRva4.js";
4
4
  import { a as R, c as z, i as B, n as V, o as H, r as U, s as W, t as G } from "./ExpressionPathPicker-DchGsK70.js";
5
5
  import { n as K, t as q } from "./resourceTemplate-D-DKEo7Z.js";
6
6
  import { a as J, d as Y, i as X, n as Z, o as Q, s as $, t as ee, u as te } from "./useTransientFeedback-BN_O7V2w.js";
@@ -58,6 +58,11 @@ export interface FieldDef {
58
58
  readonly nonEmpty?: boolean;
59
59
  /** select 取值域(领域常量原样引用,不自创缩写) */
60
60
  readonly domain?: readonly string[];
61
+ /**
62
+ * select 选项显示名(value → 标签,image-fit 工单 05「适配」):缺省 = 原值
63
+ * 显示。值仍提交 wire 原值,文案只呈现
64
+ */
65
+ readonly optionLabels?: Readonly<Record<string, string>>;
61
66
  readonly min?: number;
62
67
  readonly max?: number;
63
68
  readonly step?: number;
@@ -115,6 +120,13 @@ export declare const CANVAS_FIELD_SECTIONS: readonly FieldSection[];
115
120
  export declare function canvasFieldTarget(canvas: Canvas | null): Canvas | null;
116
121
  /** 全空背景值对象(读取投影与提交折算共用的一份底形;kernel 归一门会再收口) */
117
122
  export declare const EMPTY_CANVAS_BACKGROUND: CanvasBackground;
123
+ /**
124
+ * 图层级读取视图(image-fit 工单 05,canvasFieldTarget 同门):ImageLayer 的 fit
125
+ * 缺省态(wire 无键 = cover)投影为 cover——适配字段否则被 readField 的 ok:false
126
+ * 过滤掉,选中任一未声明的图片层「适配」行即消失。已声明(含未知值)与非图片层
127
+ * 原样透传(不拷贝不重整);投影只作用读侧,提交仍走 updateSpec 直写文档
128
+ */
129
+ export declare function layerFieldTarget(layer: Layer): Layer;
118
130
  export type FieldReadResult = {
119
131
  ok: true;
120
132
  value: unknown;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 源图内在尺寸读数(image-fit 工单 05 搭车项,ADR 0023):像素 + 宽高比一行文本,
3
+ * 作者判断 cover/contain 的直接依据。纯函数零 DOM——缩略图 img 装载完成后由
4
+ * 控件以 naturalWidth/naturalHeight 调用,Node 无 DOM 环境可测。
5
+ */
6
+ /** 宽高比显示:整数比(约化后两侧 ≤32,如 16:9)优先,否则两位小数比(如 1.77:1) */
7
+ export declare function aspectRatioLabel(width: number, height: number): string;
8
+ /** 整行读数(「1920×1080 · 16:9」形态);非法尺寸(≤0/非有限值)返回 null 不渲染 */
9
+ export declare function intrinsicSizeLabel(width: number, height: number): string | null;