@hankchen/canvas-editor-vue 0.6.0 → 0.7.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/{useDataSourceSchema-YV8g-lo0.js → DropdownMenu-CeUNKMDQ.js} +70 -78
- package/dist/ExpressionPathPicker-DchGsK70.js +739 -0
- package/dist/{canvas-CX1RdlFC.js → canvas-D3fFnBqG.js} +526 -527
- package/dist/canvas.js +1 -1
- package/dist/index.js +14 -15
- package/dist/layer-panel/TemplateTableForm.d.ts +1 -27
- package/dist/{layer-panel-Cd1e8xNB.js → layer-panel-BouAYiDq.js} +231 -257
- package/dist/layer-panel.js +1 -1
- package/dist/property-panel/PropertyField.d.ts +9 -2
- package/dist/property-panel/fieldSchema.d.ts +16 -10
- package/dist/property-panel/fields/RowsPathField.d.ts +17 -0
- package/dist/property-panel/fields/index.d.ts +1 -0
- package/dist/property-panel/usePropertyPanel.d.ts +11 -2
- package/dist/{property-panel-B32ZBQdf.js → property-panel-DJQJzioT.js} +403 -341
- package/dist/property-panel.js +2 -2
- package/dist/resourceTemplate-D-DKEo7Z.js +33 -0
- package/dist/shared/ExpressionPathPicker.d.ts +9 -2
- package/dist/shared/index.d.ts +13 -10
- package/dist/shared/pathPickerModel.d.ts +16 -3
- package/dist/shared/popupPosition.d.ts +2 -2
- package/dist/shared/rowsPathPickerSource.d.ts +15 -0
- package/dist/shared/useDataSourceSchema.d.ts +9 -1
- package/dist/shared/useExpressionDiagnostics.d.ts +11 -0
- package/dist/{shared-wuupBoZg.js → shared-CRDKDSpa.js} +22 -22
- package/dist/shared.js +9 -10
- package/dist/{status-bar-XMVbRLY9.js → status-bar-DBf5kIXY.js} +69 -67
- package/dist/status-bar.js +1 -1
- package/dist/style.css +1 -1
- package/dist/uploadFile-mXJVPEzm.js +653 -0
- package/dist/{useTransientFeedback-CTjmMmFF.js → useTransientFeedback-BN_O7V2w.js} +43 -28
- package/package.json +2 -2
- package/dist/popupPosition-Ck5Gsvjy.js +0 -526
- package/dist/resourceTemplate-cdcQtp9a.js +0 -246
- package/dist/shared/rowsPathCompletionSource.d.ts +0 -3
- package/dist/shared/usePathCompletion.d.ts +0 -18
- package/dist/uploadFile-D1RY-ji0.js +0 -516
- package/dist/usePathCompletion-Do17CQ6l.js +0 -220
package/dist/layer-panel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./layer-panel-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./layer-panel-BouAYiDq.js";
|
|
2
2
|
export { e as ADD_LAYER_MENU, a as ADD_MENU, s as ADD_RATIO_PRESET_MENU, t as ADD_TEXT_PRESET_MENU, c as LayerPanel, r as PANEL_ADD_MENU, n as TemplateTableForm, i as isUpperHalf, o as useLayerPanel };
|
|
@@ -14,8 +14,9 @@ type __VLS_Props = {
|
|
|
14
14
|
*/
|
|
15
15
|
locked?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
* 补全候选源(面板按字段分发:data
|
|
18
|
-
*
|
|
17
|
+
* 补全候选源(面板按字段分发:data 门 textarea 字段 = 表达式源;资源字段与
|
|
18
|
+
* rowsPath 点选器字段 = 选择器源,经 source 下发进控件);null = 未注入/
|
|
19
|
+
* 无接线/降级(浮层恒闭、选择器无菜单)。
|
|
19
20
|
*/
|
|
20
21
|
completion?: CompletionSource | null;
|
|
21
22
|
/** pair 子字段的禁用态替代显示(键 = 子字段绝对键);其他控件不传 */
|
|
@@ -30,6 +31,12 @@ type __VLS_Props = {
|
|
|
30
31
|
* (缩略图角标,与画布失败标识同源);undefined = 无记录/不适用。
|
|
31
32
|
*/
|
|
32
33
|
resourceStatus?: ResourceStatus;
|
|
34
|
+
/**
|
|
35
|
+
* rowsPath 控件的漂移态(rows-path-picker 工单 03,spec D2):面板按已提交
|
|
36
|
+
* 值判定(rowsPathDrifted)——true 时控件落 cn-field--invalid(红描边经
|
|
37
|
+
* fallthrough 到点选器展示框),菜单不受影响照常可开可重选。其他控件不下发。
|
|
38
|
+
*/
|
|
39
|
+
drifted?: boolean;
|
|
33
40
|
};
|
|
34
41
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
42
|
input: (value: unknown) => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Layer, LayerPath, LayerType, ResourceStatusMap } from '@hankchen/canvas-editor';
|
|
1
|
+
import { Canvas, CanvasBackground, Layer, LayerPath, LayerType, ResourceStatusMap } from '@hankchen/canvas-editor';
|
|
2
2
|
/** 控件种类(与 controls.ts 的组件注册表一一对应) */
|
|
3
|
-
export type FieldControl = 'number' | 'text' | 'textarea' | 'color' | 'select' | 'boolean' | 'pair' | 'anchor' | 'align' | 'padding' | 'border' | 'font' | 'imageSrc' | 'resourceValue';
|
|
3
|
+
export type FieldControl = 'number' | 'text' | 'textarea' | 'color' | 'select' | 'boolean' | 'pair' | 'anchor' | 'align' | 'padding' | 'border' | 'font' | 'imageSrc' | 'resourceValue' | 'rowsPath';
|
|
4
4
|
/**
|
|
5
5
|
* 自适应 prefix 钮描述(pair 子字段用):key 相对 pair 值对象上的布尔键;
|
|
6
6
|
* 开启 → 本输入禁用。placeholder 是禁用态兜底占位(盒未解析时;正常路径面板
|
|
@@ -39,13 +39,6 @@ export interface FieldDef {
|
|
|
39
39
|
* 禁拼接/函数),不走片段级扫描诊断。图片地址/二维码值两类声明。
|
|
40
40
|
*/
|
|
41
41
|
readonly resource?: true;
|
|
42
|
-
/**
|
|
43
|
-
* 补全标记门(rows-path-completion 工单 03,D6):'rowsPath' = 裸路径补全
|
|
44
|
-
* (usePathCompletion,候选源 = 面板 rowsPathSource)——不走 data 门
|
|
45
|
-
* (rowsPath 是结构语义,表达式补全门不适用);缺省 = 无标记(data 门字段
|
|
46
|
-
* 照走 useExpressionCompletion)。
|
|
47
|
-
*/
|
|
48
|
-
readonly completion?: 'rowsPath';
|
|
49
42
|
/** 输入框占位文案(text 控件透传) */
|
|
50
43
|
readonly placeholder?: string;
|
|
51
44
|
/**
|
|
@@ -107,8 +100,21 @@ export declare function pairItemKey(field: FieldDef, item: FieldDef): readonly s
|
|
|
107
100
|
* 不输出(不渲染空标题)。
|
|
108
101
|
*/
|
|
109
102
|
export declare function fieldSectionsForPath(path: LayerPath, layer: Layer): readonly FieldSection[];
|
|
110
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* 画布级字段组(未选中图层时):宽/高 + 背景区段(canvas-background 工单 04)。
|
|
105
|
+
* 背景字段键相对画布根(['background', color|image]),提交由面板折算回整对象
|
|
106
|
+
* 一步事务(usePropertyPanel);背景静态(spec Q3)——imageSrc 不带 data 标记,
|
|
107
|
+
* 无取值方式段、无表达式态,上传缝在静态态展开全形态。
|
|
108
|
+
*/
|
|
111
109
|
export declare const CANVAS_FIELD_SECTIONS: readonly FieldSection[];
|
|
110
|
+
/**
|
|
111
|
+
* 画布级读取视图(canvas-background 工单 04):background null(未设/清空态)投影
|
|
112
|
+
* 为全空值对象——背景字段否则被 readField 的 ok:false 过滤掉,清空后区段即消失、
|
|
113
|
+
* 无法再设置。已设背景原样透出(不拷贝不重整);未打开文档 null。
|
|
114
|
+
*/
|
|
115
|
+
export declare function canvasFieldTarget(canvas: Canvas | null): Canvas | null;
|
|
116
|
+
/** 全空背景值对象(读取投影与提交折算共用的一份底形;kernel 归一门会再收口) */
|
|
117
|
+
export declare const EMPTY_CANVAS_BACKGROUND: CanvasBackground;
|
|
112
118
|
export type FieldReadResult = {
|
|
113
119
|
ok: true;
|
|
114
120
|
value: unknown;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CompletionSource } from '../../shared/completion';
|
|
2
|
+
import { FieldDef } from '../fieldSchema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
modelValue: string;
|
|
6
|
+
/** 候选源(面板 rowsPathSource 注入缝);null = 未绑声明,无菜单只读回显 */
|
|
7
|
+
source?: CompletionSource | null;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
input: (value: string) => any;
|
|
12
|
+
change: (value: string) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onInput?: ((value: string) => any) | undefined;
|
|
15
|
+
onChange?: ((value: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -11,6 +11,7 @@ export { default as FontField } from './FontField';
|
|
|
11
11
|
export { default as NumberField } from './NumberField';
|
|
12
12
|
export { default as PaddingField } from './PaddingField';
|
|
13
13
|
export { default as PairField } from './PairField';
|
|
14
|
+
export { default as RowsPathField } from './RowsPathField';
|
|
14
15
|
export { default as SelectField } from './SelectField';
|
|
15
16
|
export { default as TextField } from './TextField';
|
|
16
17
|
export { default as TextareaField } from './TextareaField';
|
|
@@ -26,10 +26,19 @@ export interface PropertyPanelBinding {
|
|
|
26
26
|
*/
|
|
27
27
|
readonly completionSource: ComputedRef<CompletionSource | null>;
|
|
28
28
|
/**
|
|
29
|
-
* rowsPath
|
|
30
|
-
*
|
|
29
|
+
* rowsPath 字段的级联点选候选源(rows-path-picker 工单 03):起点三分流判别
|
|
30
|
+
* (根层表 = 载荷根 schema;嵌套表 = 外层行 schema 行相对;判别降级 null)+
|
|
31
|
+
* 工单 01 剪枝枚举件按前缀供给(rowsPathPickerSource 组装,候选面剪枝至
|
|
32
|
+
* 「通往行数组的路径」)。起点 null = null 源(门态,菜单钮不渲染,spec D1)。
|
|
31
33
|
*/
|
|
32
34
|
readonly rowsPathSource: ComputedRef<CompletionSource | null>;
|
|
35
|
+
/**
|
|
36
|
+
* 已提交 rowsPath 的漂移态(rows-path-picker 工单 03,spec D2):模板表选中
|
|
37
|
+
* 态下按起点三分流判已提交值——枚举不出或终点非数组 = true(回显标红,菜单
|
|
38
|
+
* 照常可开可重选);未绑声明/字段面外(非模板表目标)恒 false(门态弱提示
|
|
39
|
+
* 替代标红)。
|
|
40
|
+
*/
|
|
41
|
+
readonly rowsPathDrifted: ComputedRef<boolean>;
|
|
33
42
|
/** 锚点折叠区开合(store ui 分支投影,会话内记忆;工票 03) */
|
|
34
43
|
readonly anchorExpanded: ComputedRef<boolean>;
|
|
35
44
|
/**
|