@hankchen/canvas-editor-vue 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +22 -2
- package/dist/canvas/AlignFloatBar.d.ts +6 -0
- package/dist/canvas/CanvasSurface.d.ts +131 -0
- package/dist/canvas/ContentTypePill.d.ts +14 -0
- package/dist/canvas/ContextMenu.d.ts +14 -0
- package/dist/canvas/FindBar.d.ts +13 -0
- package/dist/canvas/GuidesOverlay.d.ts +18 -0
- package/dist/canvas/Ruler.d.ts +24 -0
- package/dist/canvas/TextEditingOverlay.d.ts +70 -0
- package/dist/canvas/createBand.d.ts +6 -0
- package/dist/canvas/findHighlight.d.ts +12 -0
- package/dist/canvas/gizmo.d.ts +24 -0
- package/dist/canvas/guideSnap.d.ts +3 -0
- package/dist/canvas/index.d.ts +20 -0
- package/dist/canvas/resizeHandles.d.ts +3 -0
- package/dist/canvas/scheduler.d.ts +2 -0
- package/dist/canvas/useDpr.d.ts +10 -0
- package/dist/canvas/useFindSession.d.ts +13 -0
- package/dist/canvas/useTextEditing.d.ts +53 -0
- package/dist/canvas-CS4SmrIO.js +1649 -0
- package/dist/canvas.js +2 -0
- package/dist/completionAnchor-4lhR2kJz.js +273 -0
- package/dist/createLucideIcon-CMq8ZKo2.js +96 -0
- package/dist/dist-DuXLYZZ9.js +341 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +16 -0
- package/dist/layer-panel/LayerPanel.d.ts +32 -0
- package/dist/layer-panel/addMenu.d.ts +18 -0
- package/dist/layer-panel/index.d.ts +7 -0
- package/dist/layer-panel/useLayerPanel.d.ts +12 -0
- package/dist/layer-panel-ArP66_vZ.js +652 -0
- package/dist/layer-panel.js +2 -0
- package/dist/layerPath-BRZK9ka1.js +2160 -0
- package/dist/panel-theme.css +254 -0
- package/dist/property-panel/PropertyField.d.ts +65 -0
- package/dist/property-panel/PropertyPanel.d.ts +6 -0
- package/dist/property-panel/controlStyles.d.ts +17 -0
- package/dist/property-panel/controls.d.ts +3 -0
- package/dist/property-panel/fieldSchema.d.ts +116 -0
- package/dist/property-panel/fields/AlignField.d.ts +11 -0
- package/dist/property-panel/fields/AnchorDisclosureField.d.ts +16 -0
- package/dist/property-panel/fields/BooleanField.d.ts +13 -0
- package/dist/property-panel/fields/BorderField.d.ts +14 -0
- package/dist/property-panel/fields/BorderWidthInput.d.ts +14 -0
- package/dist/property-panel/fields/ColorField.d.ts +13 -0
- package/dist/property-panel/fields/FontField.d.ts +15 -0
- package/dist/property-panel/fields/ImageSrcField.d.ts +20 -0
- package/dist/property-panel/fields/NumberField.d.ts +13 -0
- package/dist/property-panel/fields/PaddingField.d.ts +14 -0
- package/dist/property-panel/fields/PairField.d.ts +19 -0
- package/dist/property-panel/fields/SelectField.d.ts +11 -0
- package/dist/property-panel/fields/ShorthandModeButton.d.ts +13 -0
- package/dist/property-panel/fields/TextField.d.ts +13 -0
- package/dist/property-panel/fields/TextareaField.d.ts +13 -0
- package/dist/property-panel/fields/ValueTypeSegmented.d.ts +10 -0
- package/dist/property-panel/fields/index.d.ts +16 -0
- package/dist/property-panel/fontPicker.d.ts +13 -0
- package/dist/property-panel/imageUpload.d.ts +11 -0
- package/dist/property-panel/index.d.ts +13 -0
- package/dist/property-panel/shorthand.d.ts +28 -0
- package/dist/property-panel/usePropertyPanel.d.ts +51 -0
- package/dist/property-panel/useShorthandMode.d.ts +18 -0
- package/dist/property-panel-jt_rsTVW.js +1719 -0
- package/dist/property-panel.js +2 -0
- package/dist/shared/DropdownMenu.d.ts +47 -0
- package/dist/shared/ExpressionCompletionPopup.d.ts +14 -0
- package/dist/shared/HelpDialog.d.ts +12 -0
- package/dist/shared/PanelIcon.d.ts +14 -0
- package/dist/shared/completion.d.ts +49 -0
- package/dist/shared/completionAnchor.d.ts +28 -0
- package/dist/shared/editableTarget.d.ts +5 -0
- package/dist/shared/expressionContext.d.ts +22 -0
- package/dist/shared/index.d.ts +37 -0
- package/dist/shared/rowsPathCompletionSource.d.ts +3 -0
- package/dist/shared/shortcutsHelp.d.ts +30 -0
- package/dist/shared/uploadFile.d.ts +2 -0
- package/dist/shared/useDataSourceSchema.d.ts +3 -0
- package/dist/shared/useDropdownMenu.d.ts +51 -0
- package/dist/shared/useExpressionCompletion.d.ts +45 -0
- package/dist/shared/useHistory.d.ts +7 -0
- package/dist/shared/usePathCompletion.d.ts +18 -0
- package/dist/shared/useSelection.d.ts +3 -0
- package/dist/shared/useShortcuts.d.ts +2 -0
- package/dist/shared/useShortcutsHelp.d.ts +9 -0
- package/dist/shared/useTransientFeedback.d.ts +10 -0
- package/dist/shared/useViewport.d.ts +3 -0
- package/dist/shared-D9zYUQaw.js +123 -0
- package/dist/shared.js +9 -0
- package/dist/status-bar/StatusBar.d.ts +17 -0
- package/dist/status-bar/index.d.ts +9 -0
- package/dist/status-bar/layerGeometryLabel.d.ts +13 -0
- package/dist/status-bar/layerPathLabel.d.ts +2 -0
- package/dist/status-bar/useDoc.d.ts +3 -0
- package/dist/status-bar-BhhrVoBZ.js +194 -0
- package/dist/status-bar.js +2 -0
- package/dist/style.css +2 -0
- package/dist/uploadFile-CutE_xI-.js +330 -0
- package/dist/useDataSourceSchema-C924m8fc.js +237 -0
- package/dist/usePathCompletion-DkHoGla4.js +228 -0
- package/dist/useShortcutsHelp-DTC3yRil.js +19 -0
- package/dist/useTransientFeedback-gS9Xa9GY.js +477 -0
- package/dist/useViewport-BLe2ise1.js +18 -0
- package/package.json +77 -3
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 属性面板设计令牌(shadcn/ui 语义令牌的面板命名空间版)。
|
|
3
|
+
*
|
|
4
|
+
* 纯 CSS、零构建:令牌全部作用域在面板根 .cn-props 上——面板自带主题、
|
|
5
|
+
* 不向宿主页面渗漏(宿主无需全局变量)。Tailwind 工具类(组件模板内)由
|
|
6
|
+
* 宿主的 tailwind 编译器经 @source 扫描本包源码生成,@theme inline 把下面的
|
|
7
|
+
* --cn-* 映射成 --color-cn-* 颜色族(见 playground/src/style.css 的接线样例)。
|
|
8
|
+
*
|
|
9
|
+
* 宿主接入三步:
|
|
10
|
+
* 1. devDeps 加 tailwindcss + @tailwindcss/vite,vite 插件启用;
|
|
11
|
+
* 2. 应用 css:@import "tailwindcss"; @source "<本包 src 路径>";
|
|
12
|
+
* 3. import '@hankchen/canvas-editor-vue/panel-theme.css'
|
|
13
|
+
*
|
|
14
|
+
* 主题方向:暗色检视面板(precision-instrument)——深蓝灰底、发丝线分隔、
|
|
15
|
+
* 天蓝 accent、表格数字。宿主可覆盖 .cn-props 上的 --cn-* 变量换肤。
|
|
16
|
+
*/
|
|
17
|
+
.cn-props {
|
|
18
|
+
/* 表面与文字 */
|
|
19
|
+
--cn-bg: #0b1220;
|
|
20
|
+
--cn-bg-elevated: #101a2e;
|
|
21
|
+
--cn-fg: #e6edf7;
|
|
22
|
+
--cn-muted: #7c8ca5;
|
|
23
|
+
|
|
24
|
+
/* 边界:容器发丝线 / 输入框描边 */
|
|
25
|
+
--cn-line: #1e2a40;
|
|
26
|
+
--cn-field-line: #2a3a57;
|
|
27
|
+
|
|
28
|
+
/* 图层行卡片描边(工单 08):行级独立卡片的发丝线,介于容器线与输入框线
|
|
29
|
+
之间——只增不改,既有令牌值不动(两板共用本命名空间) */
|
|
30
|
+
--cn-card-line: #23324d;
|
|
31
|
+
|
|
32
|
+
/* 输入底(半透明石板,叠在面板底色上) */
|
|
33
|
+
--cn-field: rgba(148, 163, 184, 0.07);
|
|
34
|
+
|
|
35
|
+
/* accent(天蓝)与其上的可读前景 */
|
|
36
|
+
--cn-accent: #38bdf8;
|
|
37
|
+
--cn-accent-soft: rgba(56, 189, 248, 0.12);
|
|
38
|
+
--cn-on-accent: #06283d;
|
|
39
|
+
|
|
40
|
+
/* 表达式前置色(layer-panel-expression-prefix 工单 02):带标记内容层行内
|
|
41
|
+
片段串的用色(图层面板 .cn-layers__prefix 消费);原型 .ex 色值为参考值 */
|
|
42
|
+
--cn-expression: #5dd3b0;
|
|
43
|
+
|
|
44
|
+
/* 危险/告警(预留) */
|
|
45
|
+
--cn-danger: #f87171;
|
|
46
|
+
|
|
47
|
+
/* 数字/代码用等宽字族(面板的「仪器刻度」字形) */
|
|
48
|
+
--cn-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas,
|
|
49
|
+
monospace;
|
|
50
|
+
|
|
51
|
+
/* 原生控件(number 步进器、color、checkbox)走暗色渲染 */
|
|
52
|
+
color-scheme: dark;
|
|
53
|
+
|
|
54
|
+
background-color: var(--cn-bg);
|
|
55
|
+
color: var(--cn-fg);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* SelectField 的自绘箭头(appearance-none 后由背景 svg 补上指示) */
|
|
59
|
+
.cn-props .cn-select {
|
|
60
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8ca5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
|
61
|
+
background-repeat: no-repeat;
|
|
62
|
+
background-position: right 6px center;
|
|
63
|
+
background-size: 10px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.cn-props .cn-select option {
|
|
67
|
+
background-color: var(--cn-bg-elevated);
|
|
68
|
+
color: var(--cn-fg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* 数据字段表达式态输入框描边(工单 02 落地、工单 06 保留):取值方式切换已
|
|
72
|
+
升级为分段选择器(ValueTypeSegmented,tailwind 配方在组件模板),原 {{ }}
|
|
73
|
+
徽章令牌随控件退役。双类名选择器压过控件上的单类 tailwind border 色 */
|
|
74
|
+
.cn-props .cn-field--expression {
|
|
75
|
+
border-color: var(--cn-accent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* pair 自适应 prefix 切换钮(工票 03):徽章方钮视觉语言(原 {{ }} 徽章钮同族,
|
|
79
|
+
该钮已于工单 06 升级为分段选择器)的「自」字徽章。
|
|
80
|
+
双类名选择器压过控件上的单类 tailwind border 色,无需 !important */
|
|
81
|
+
.cn-props .cn-props__auto-toggle {
|
|
82
|
+
font-size: 9px;
|
|
83
|
+
line-height: 1;
|
|
84
|
+
padding: 3px 3px;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
border: 1px solid var(--cn-field-line);
|
|
87
|
+
color: var(--cn-muted);
|
|
88
|
+
background: transparent;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cn-props .cn-props__auto-toggle:hover {
|
|
93
|
+
color: var(--cn-fg);
|
|
94
|
+
border-color: var(--cn-muted);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cn-props .cn-props__auto-toggle--active {
|
|
98
|
+
border-color: var(--cn-accent);
|
|
99
|
+
color: var(--cn-accent);
|
|
100
|
+
background: var(--cn-accent-soft);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* 简写控件的模式循环钮(工单 04):1/2/4 值模式单按钮循环,徽章方钮视觉语言
|
|
104
|
+
的图标方钮。双类名选择器压过控件上的单类 tailwind
|
|
105
|
+
border 色,无需 !important */
|
|
106
|
+
.cn-props .cn-props__mode-toggle {
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
width: 20px;
|
|
111
|
+
height: 20px;
|
|
112
|
+
padding: 0;
|
|
113
|
+
border-radius: 4px;
|
|
114
|
+
border: 1px solid var(--cn-field-line);
|
|
115
|
+
color: var(--cn-muted);
|
|
116
|
+
background: transparent;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.cn-props .cn-props__mode-toggle:hover {
|
|
121
|
+
color: var(--cn-fg);
|
|
122
|
+
border-color: var(--cn-muted);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* 自适应禁用态的预览值区分展示(工票 03):模板子树的解析盒非文档权威值,
|
|
126
|
+
斜体 + 弱化提示(悬停有完整说明),与声明值一眼可辨 */
|
|
127
|
+
.cn-props .cn-field--preview {
|
|
128
|
+
font-style: italic;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ---- 图层行卡片 + 根层拖拽把手(工单 08)----
|
|
132
|
+
行 = 独立描边卡片条目(非行间分隔线);描边走新增令牌 --cn-card-line,
|
|
133
|
+
既有令牌值不动。行卡片的选中/悬停/落点提示状态与把手样式收口在本文件
|
|
134
|
+
(类名由 LayerPanel.vue 按 ui 分支绑定),不依赖宿主 tailwind 令牌映射;
|
|
135
|
+
行的几何(内距/字号/行距 gap)仍以 tailwind utility 留在组件模板。 */
|
|
136
|
+
.cn-props .cn-layers__row {
|
|
137
|
+
border: 1px solid var(--cn-card-line);
|
|
138
|
+
border-radius: 6px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cn-props .cn-layers__row--hovered {
|
|
142
|
+
border-color: var(--cn-field-line);
|
|
143
|
+
background-color: var(--cn-field);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.cn-props .cn-layers__row--selected {
|
|
147
|
+
border-color: var(--cn-accent);
|
|
148
|
+
background-color: var(--cn-accent-soft);
|
|
149
|
+
color: var(--cn-accent);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* 拖放落点提示:插入边点亮(行上半 = 顶边 before,下半 = 底边 after) */
|
|
153
|
+
.cn-props .cn-layers__row--drop-before {
|
|
154
|
+
border-top-color: var(--cn-accent);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.cn-props .cn-layers__row--drop-after {
|
|
158
|
+
border-bottom-color: var(--cn-accent);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* 六点把手:根层行常显(非 hover 门控),拖拽仅从此处发起;行/格不加把手 */
|
|
162
|
+
.cn-props .cn-layers__handle {
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
width: 14px;
|
|
167
|
+
height: 20px;
|
|
168
|
+
border-radius: 3px;
|
|
169
|
+
color: var(--cn-muted);
|
|
170
|
+
cursor: grab;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.cn-props .cn-layers__handle:hover {
|
|
174
|
+
color: var(--cn-fg);
|
|
175
|
+
background-color: var(--cn-field);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.cn-props .cn-layers__handle:active {
|
|
179
|
+
cursor: grabbing;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* 行内重命名输入框(工单 09):覆盖行标签同槽(flex-1 由模板 utility 承担)——
|
|
183
|
+
accent 描边 + 抬升底色标识编辑态,字号/字族与 .cn-layers__label 对齐 */
|
|
184
|
+
.cn-props .cn-layers__rename-input {
|
|
185
|
+
padding: 0 3px;
|
|
186
|
+
font-family: var(--cn-font-mono);
|
|
187
|
+
font-size: 11px;
|
|
188
|
+
line-height: 16px;
|
|
189
|
+
color: var(--cn-fg);
|
|
190
|
+
background-color: var(--cn-bg-elevated);
|
|
191
|
+
border: 1px solid var(--cn-accent);
|
|
192
|
+
border-radius: 3px;
|
|
193
|
+
outline: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* 表达式前置(layer-panel-expression-prefix 工单 02):带标记内容层行内、拖柄
|
|
197
|
+
与标签之间的等宽小字片段串(内容与全文提示都由内核投影携带,面板零计算)。
|
|
198
|
+
溢出契约(spec 决策 7):名称 flex-1 truncate 先截,前置 flex:none + max-width
|
|
199
|
+
封顶后自身省略——title 提示完整片段串。字号 10.5px 为原型 .ex 参考值,
|
|
200
|
+
line-height 对齐行标签 leading-4,行高不因前置变化 */
|
|
201
|
+
.cn-props .cn-layers__prefix {
|
|
202
|
+
flex: none;
|
|
203
|
+
max-width: 96px;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
text-overflow: ellipsis;
|
|
206
|
+
white-space: nowrap;
|
|
207
|
+
font-family: var(--cn-font-mono);
|
|
208
|
+
font-size: 10.5px;
|
|
209
|
+
line-height: 16px;
|
|
210
|
+
color: var(--cn-expression);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* 隐藏行(layer-panel-ux 工单 10):降不透明度示意不可见态(与闭眼钮常显同源),
|
|
214
|
+
约 50%——选中/悬停描边保持可辨(隐藏 ≠ 不可操作,显隐/属性编辑照常) */
|
|
215
|
+
.cn-props .cn-layers__row--hidden {
|
|
216
|
+
opacity: 0.5;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* 模板子树行(模板创作 spec §2.2 D1):虚线描边卡片区分「声明态结构」与实体
|
|
220
|
+
行/格——选中/悬停态换 accent 虚线(意图锁定,具体令牌与 layer-panel-ux 协调) */
|
|
221
|
+
.cn-props .cn-layers__row--template {
|
|
222
|
+
border-style: dashed;
|
|
223
|
+
border-color: var(--cn-field-line);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.cn-props .cn-layers__row--template.cn-layers__row--hovered {
|
|
227
|
+
border-color: var(--cn-accent);
|
|
228
|
+
border-style: dashed;
|
|
229
|
+
background-color: var(--cn-field);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.cn-props .cn-layers__row--template.cn-layers__row--selected {
|
|
233
|
+
border-color: var(--cn-accent);
|
|
234
|
+
border-style: dashed;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* 非空校验标错(模板创作 spec §2.4 P4):拦截期红框——空串永不落库 */
|
|
238
|
+
.cn-props .cn-field--invalid {
|
|
239
|
+
border-color: var(--cn-danger);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* ---- 表达式补全浮层(content-completion 工单 04)----
|
|
243
|
+
portal 到 body(躲 288px 面板 overflow 裁剪)后脱离面板 DOM 子树,根元素
|
|
244
|
+
自带 .cn-props 重建令牌命名空间;此处只收抬升底色/投影与高亮态(option
|
|
245
|
+
几何以 tailwind utility 留在组件模板)。 */
|
|
246
|
+
.cn-props.cn-completion {
|
|
247
|
+
background-color: var(--cn-bg-elevated);
|
|
248
|
+
box-shadow: 0 16px 40px -12px rgba(2, 6, 23, 0.55);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.cn-props .cn-completion__option--active {
|
|
252
|
+
background-color: var(--cn-accent-soft);
|
|
253
|
+
color: var(--cn-accent);
|
|
254
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ResourceStatus } from '@hankchen/canvas-editor';
|
|
2
|
+
import { FieldDef, FieldDisplay } from './fieldSchema';
|
|
3
|
+
import { CompletionSource } from '../shared/completion';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
field: FieldDef;
|
|
6
|
+
/** 字段当前值(面板已用 readField 解析,ok:false 的字段不会渲染到这) */
|
|
7
|
+
value: unknown;
|
|
8
|
+
/** 数据字段取值方式;undefined = 非 data 字段(无切换钮) */
|
|
9
|
+
dataMode?: 'static' | 'expression';
|
|
10
|
+
/**
|
|
11
|
+
* 补全候选源(面板按字段分发:data 门字段 = 表达式源,rowsPath 标记字段 =
|
|
12
|
+
* 行相对源,工单 03);null = 未注入/无接线/降级(浮层恒闭)。
|
|
13
|
+
*/
|
|
14
|
+
completion?: CompletionSource | null;
|
|
15
|
+
/** pair 子字段的禁用态替代显示(键 = 子字段绝对键);其他控件不传 */
|
|
16
|
+
displays?: Record<string, FieldDisplay>;
|
|
17
|
+
/**
|
|
18
|
+
* 行级动态可见提示(placeholder-padding-hint 工单 02):面板按 schema hint
|
|
19
|
+
* 谓词求值下发(占位态图片层的 padding 行);undefined = 无提示行。
|
|
20
|
+
*/
|
|
21
|
+
hint?: string;
|
|
22
|
+
/**
|
|
23
|
+
* 字段值的物化态(面板按当前值查 ui 切片解析):仅 imageSrc 控件消费
|
|
24
|
+
* (缩略图角标,与画布失败标识同源);undefined = 无记录/不适用。
|
|
25
|
+
*/
|
|
26
|
+
resourceStatus?: ResourceStatus;
|
|
27
|
+
};
|
|
28
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
input: (value: unknown) => any;
|
|
30
|
+
change: (value: unknown) => any;
|
|
31
|
+
"sub-commit": (field: FieldDef, value: unknown, final: boolean) => any;
|
|
32
|
+
"toggle-mode": () => any;
|
|
33
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onInput?: ((value: unknown) => any) | undefined;
|
|
35
|
+
onChange?: ((value: unknown) => any) | undefined;
|
|
36
|
+
"onSub-commit"?: ((field: FieldDef, value: unknown, final: boolean) => any) | undefined;
|
|
37
|
+
"onToggle-mode"?: (() => any) | undefined;
|
|
38
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
controlRef: unknown;
|
|
40
|
+
popupRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
41
|
+
state: import('..').ExpressionCompletionState;
|
|
42
|
+
}> & Readonly<{
|
|
43
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
rootEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
46
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
47
|
+
select: (index: number) => any;
|
|
48
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
49
|
+
rootRef: HTMLDivElement;
|
|
50
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
51
|
+
P: {};
|
|
52
|
+
B: {};
|
|
53
|
+
D: {};
|
|
54
|
+
C: {};
|
|
55
|
+
M: {};
|
|
56
|
+
Defaults: {};
|
|
57
|
+
}, Readonly<{
|
|
58
|
+
state: import('..').ExpressionCompletionState;
|
|
59
|
+
}> & Readonly<{
|
|
60
|
+
onSelect?: ((index: number) => any) | undefined;
|
|
61
|
+
}>, {
|
|
62
|
+
rootEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
63
|
+
}, {}, {}, {}, {}> | null;
|
|
64
|
+
}, any>;
|
|
65
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EditorSession } from '@hankchen/canvas-editor';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
editor: EditorSession;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 面板控件的 shadcn anatomy 配方(暗色面板命名空间)。
|
|
3
|
+
*
|
|
4
|
+
* Tailwind 按文本扫描类名,跨 SFC 复用的配方收口在这里——避免九个控件各写
|
|
5
|
+
* 一遍 input 样式串。令牌语义见 panel-theme.css(--cn-* → @theme inline →
|
|
6
|
+
* --color-cn-* → bg-cn-field 等工具类)。
|
|
7
|
+
*/
|
|
8
|
+
/** 文本/数值输入的共有配方:h-7、圆角、发丝描边、focus 天蓝内环;flex-1 撑满行 */
|
|
9
|
+
export declare const fieldBase: string;
|
|
10
|
+
/** 数值输入:右对齐 + 等宽表格数字(仪器刻度) */
|
|
11
|
+
export declare const numberField = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-field text-[11.5px] leading-none text-cn-fg outline-none transition-[border-color,box-shadow,background-color] duration-100 placeholder:text-cn-muted/60 hover:border-cn-muted/40 focus:border-cn-accent/70 focus:ring-[3px] focus:ring-cn-accent/15 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:border-cn-field-line text-right font-mono tabular-nums";
|
|
12
|
+
/** 文本输入:左对齐 */
|
|
13
|
+
export declare const textField: string;
|
|
14
|
+
/** 多行文本:同配方,改为块级纵向 */
|
|
15
|
+
export declare const textareaField: string;
|
|
16
|
+
/** 原生取色器(type=color):贴边的圆形色票 */
|
|
17
|
+
export declare const colorSwatch: string;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Layer, LayerPath, LayerType, ResourceStatusMap } from '@hankchen/canvas-editor';
|
|
2
|
+
/** 控件种类(与 controls.ts 的组件注册表一一对应) */
|
|
3
|
+
export type FieldControl = 'number' | 'text' | 'textarea' | 'color' | 'select' | 'boolean' | 'pair' | 'anchor' | 'align' | 'padding' | 'border' | 'font' | 'imageSrc';
|
|
4
|
+
/**
|
|
5
|
+
* 自适应 prefix 钮描述(pair 子字段用):key 相对 pair 值对象上的布尔键;
|
|
6
|
+
* 开启 → 本输入禁用。placeholder 是禁用态兜底占位(盒未解析时;正常路径面板
|
|
7
|
+
* 传 layerBoxAt 解析值,宽列随自然宽求值落地与高列同源,autowidth 工单 04)。
|
|
8
|
+
*/
|
|
9
|
+
export interface FieldAutoToggle {
|
|
10
|
+
readonly key: readonly string[];
|
|
11
|
+
readonly placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 禁用态替代显示(pair 自适应列,面板计算后经 PropertyField 下发):
|
|
15
|
+
* value 为展示数值(面板侧已做浮点噪声收整);preview = 模板子树的预览盒
|
|
16
|
+
* 值(非文档权威值),控件据此做区分展示(斜体 + 悬停说明)。
|
|
17
|
+
*/
|
|
18
|
+
export interface FieldDisplay {
|
|
19
|
+
readonly value: number;
|
|
20
|
+
readonly preview: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface FieldDef {
|
|
23
|
+
/** 图层内字段路径(领域形态);画布级字段相对画布根 */
|
|
24
|
+
readonly key: readonly string[];
|
|
25
|
+
readonly label: string;
|
|
26
|
+
readonly control: FieldControl;
|
|
27
|
+
/**
|
|
28
|
+
* 两列语义行(control:'pair' 专用):子字段清单,key 相对 pair 值对象
|
|
29
|
+
* (如 position/shape 对象),数值行内列自描述
|
|
30
|
+
*/
|
|
31
|
+
readonly items?: readonly FieldDef[];
|
|
32
|
+
/** 自适应 prefix 钮(pair 子字段用);缺省 = 无 prefix 的普通数值列 */
|
|
33
|
+
readonly auto?: FieldAutoToggle;
|
|
34
|
+
/** 数据字段:提交走 updateData(按 type 分派到 text/src/value),其余走 updateSpec */
|
|
35
|
+
readonly data?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 补全标记门(rows-path-completion 工单 03,D6):'rowsPath' = 裸路径补全
|
|
38
|
+
* (usePathCompletion,候选源 = 面板 rowsPathSource)——不走 data 门
|
|
39
|
+
* (rowsPath 是结构语义,表达式补全门不适用);缺省 = 无标记(data 门字段
|
|
40
|
+
* 照走 useExpressionCompletion)。
|
|
41
|
+
*/
|
|
42
|
+
readonly completion?: 'rowsPath';
|
|
43
|
+
/** 输入框占位文案(text 控件透传) */
|
|
44
|
+
readonly placeholder?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 标签悬停提示(原生 title 属性,placeholder-padding-hint 工单 01):标签列
|
|
47
|
+
* 定宽截断不占版面,语义预期差类静态文案挂这里(首个消费方 = padding 行
|
|
48
|
+
* 「作用于内容盒」);缺省 = 无
|
|
49
|
+
*/
|
|
50
|
+
readonly title?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 行级动态可见提示(placeholder-padding-hint 工单 02):按选中层与内核资源态
|
|
53
|
+
* 切片求值,非 null 时在行下渲染可见提示行——占位态图片层的 padding 语义
|
|
54
|
+
* (工单 01 悬停 title 的可见性补强面)。纯函数(与内核判定同源),仅图层级
|
|
55
|
+
* 目标求值;缺省 = 无。文案常量 UNDRAWN_CONTENT_HINT 供测试同源断言。
|
|
56
|
+
*/
|
|
57
|
+
readonly hint?: (layer: Layer, statuses: ResourceStatusMap) => string | null;
|
|
58
|
+
/** 非空校验(text 控件):空提交被控件拦截并标错、不落库(spec §2.4 P4) */
|
|
59
|
+
readonly nonEmpty?: boolean;
|
|
60
|
+
/** select 取值域(领域常量原样引用,不自创缩写) */
|
|
61
|
+
readonly domain?: readonly string[];
|
|
62
|
+
readonly min?: number;
|
|
63
|
+
readonly max?: number;
|
|
64
|
+
readonly step?: number;
|
|
65
|
+
/** 数值提交向零截断(PHP intval 同门);padding/lineHeight 等浮点字段不开 */
|
|
66
|
+
readonly integer?: boolean;
|
|
67
|
+
/** 颜色字段允许 null(如背景色 = 无填充) */
|
|
68
|
+
readonly nullable?: boolean;
|
|
69
|
+
/** 权威字段过滤:谓词为假不渲染(不告警);pair 子字段同款语义 */
|
|
70
|
+
readonly visibleWhen?: (layer: Layer) => boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface FieldSection {
|
|
73
|
+
readonly title: string;
|
|
74
|
+
readonly fields: readonly FieldDef[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 占位态图片层的 padding 行提示文案(placeholder-padding-hint 工单 02,工单
|
|
78
|
+
* 原文全角逗号):三种占位态(表达式标记/物化未达 done/内容盒 ≤0)命中即渲染。
|
|
79
|
+
* 导出供消费方与测试同源断言,避免文案字面漂移。
|
|
80
|
+
*/
|
|
81
|
+
export declare const UNDRAWN_CONTENT_HINT = "\u5F53\u524D\u5C42\u5185\u5BB9\u672A\u7ED8\u5236\uFF0Cpadding \u4E0D\u5F71\u54CD\u9884\u89C8";
|
|
82
|
+
/**
|
|
83
|
+
* type → 字段组注册表。结构编辑(行列增删/重排)在图层面板(工单 10/12 与
|
|
84
|
+
* 模板创作 spec §2.2),此处只暴露形状/位置/对齐与数据。
|
|
85
|
+
*/
|
|
86
|
+
export declare const FIELD_SECTIONS_BY_TYPE: Record<LayerType, readonly FieldSection[]>;
|
|
87
|
+
/** 注册表查找的宽容口:白名单之外的 type 串返回空清单(不抛、不告警) */
|
|
88
|
+
export declare function fieldSectionsForType(type: string): readonly FieldSection[];
|
|
89
|
+
/** 图层在容器树里的角色(由路径尾段判定,纯函数) */
|
|
90
|
+
export type LayerRole = 'root' | 'row' | 'cell' | 'content' | 'templateContent';
|
|
91
|
+
export declare function layerRoleAt(path: LayerPath): LayerRole;
|
|
92
|
+
/**
|
|
93
|
+
* pair 子字段的图层根绝对键(code-review 整改:提交折算、禁用态显示键、
|
|
94
|
+
* 角色过滤三处共用这一条规则,防键拼接约定漂移)。
|
|
95
|
+
*/
|
|
96
|
+
export declare function pairItemKey(field: FieldDef, item: FieldDef): readonly string[];
|
|
97
|
+
/**
|
|
98
|
+
* 面板实际渲染的字段组:type 注册表 ∩ 角色权威过滤 ∩ visibleWhen。
|
|
99
|
+
* pair 行按子字段的绝对键(pairItemKey)逐列过滤——部分隐藏 = 行内少一列,
|
|
100
|
+
* 全部隐藏才整行不输出;普通字段过滤后为空即不渲染。过滤后为空的 section
|
|
101
|
+
* 不输出(不渲染空标题)。
|
|
102
|
+
*/
|
|
103
|
+
export declare function fieldSectionsForPath(path: LayerPath, layer: Layer): readonly FieldSection[];
|
|
104
|
+
/** 画布级字段组(未选中图层时):宽/高 */
|
|
105
|
+
export declare const CANVAS_FIELD_SECTIONS: readonly FieldSection[];
|
|
106
|
+
export type FieldReadResult = {
|
|
107
|
+
ok: true;
|
|
108
|
+
value: unknown;
|
|
109
|
+
} | {
|
|
110
|
+
ok: false;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* 沿字段路径读值。严格领域模型字段全定义,undefined 即路径未命中——
|
|
114
|
+
* 面板据此跳过渲染且不告警(未知字段过滤的读侧依据)。
|
|
115
|
+
*/
|
|
116
|
+
export declare function readField(target: unknown, key: readonly string[]): FieldReadResult;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldDef } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: FieldDef;
|
|
4
|
+
modelValue: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (value: string) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChange?: ((value: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Anchor } from '@hankchen/canvas-editor';
|
|
2
|
+
import { FieldDef } from '../fieldSchema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
modelValue: Anchor;
|
|
6
|
+
/** 开合状态(store ui 分支的投影);本组件只上报 toggle,不自持状态 */
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
change: (value: "left" | "center" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right") => any;
|
|
11
|
+
toggle: () => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onChange?: ((value: "left" | "center" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right") => any) | undefined;
|
|
14
|
+
onToggle?: (() => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldDef } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: FieldDef;
|
|
4
|
+
modelValue: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (value: boolean) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChange?: ((value: boolean) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
inputRef: HTMLInputElement;
|
|
12
|
+
}, HTMLLabelElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Border } from '@hankchen/canvas-editor';
|
|
2
|
+
import { FieldDef } from '../fieldSchema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
modelValue: Border;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
input: (value: Border) => any;
|
|
9
|
+
change: (value: Border) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onInput?: ((value: Border) => any) | undefined;
|
|
12
|
+
onChange?: ((value: Border) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 代表边的当前宽度;null = 关(空显示) */
|
|
3
|
+
value: number | null;
|
|
4
|
+
/** 无障碍标签(框语义如 上下/左右/上…) */
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
input: (value: number) => any;
|
|
9
|
+
change: (value: number) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onInput?: ((value: number) => any) | undefined;
|
|
12
|
+
onChange?: ((value: number) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldDef } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: FieldDef;
|
|
4
|
+
modelValue: string | null;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
input: (value: string | null) => any;
|
|
8
|
+
change: (value: string | null) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onInput?: ((value: string | null) => any) | undefined;
|
|
11
|
+
onChange?: ((value: string | null) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldDef } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: FieldDef;
|
|
4
|
+
modelValue: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
input: (value: string) => any;
|
|
8
|
+
change: (value: string) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onInput?: ((value: string) => any) | undefined;
|
|
11
|
+
onChange?: ((value: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
+
fileInput: HTMLInputElement;
|
|
14
|
+
}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ResourceStatus } from '@hankchen/canvas-editor';
|
|
2
|
+
import { FieldDef } from '../fieldSchema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
modelValue: string | null;
|
|
6
|
+
/** 取值方式(面板按 expression 标记派生):表达式态走表达式视觉与退化面 */
|
|
7
|
+
dataMode?: 'static' | 'expression';
|
|
8
|
+
/** 当前 src 的物化态(面板从 ui.resourceStatuses 切片解析下发):角标与画布失败标识同源 */
|
|
9
|
+
resourceStatus?: ResourceStatus;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
input: (value: string) => any;
|
|
13
|
+
change: (value: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onInput?: ((value: string) => any) | undefined;
|
|
16
|
+
onChange?: ((value: string) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
|
+
fileInput: HTMLInputElement;
|
|
19
|
+
}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldDef } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: FieldDef;
|
|
4
|
+
modelValue: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
input: (value: number) => any;
|
|
8
|
+
change: (value: number) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onInput?: ((value: number) => any) | undefined;
|
|
11
|
+
onChange?: ((value: number) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Padding } from '@hankchen/canvas-editor';
|
|
2
|
+
import { FieldDef } from '../fieldSchema';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
modelValue: Padding;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
input: (value: Padding) => any;
|
|
9
|
+
change: (value: Padding) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onInput?: ((value: Padding) => any) | undefined;
|
|
12
|
+
onChange?: ((value: Padding) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FieldDef, FieldDisplay } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 行级标签在本控件外由 PropertyField 渲染;items 自描述列含义 */
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
/** pair 值对象切片(position/shape 等父对象),子字段按相对键读值 */
|
|
6
|
+
modelValue: Record<string, unknown>;
|
|
7
|
+
/** 禁用态替代显示(键 = pairItemKey 的点串);无显示值的禁用列显 auto 占位 */
|
|
8
|
+
displays?: Record<string, FieldDisplay>;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
input: (value: unknown) => any;
|
|
12
|
+
change: (value: unknown) => any;
|
|
13
|
+
"sub-commit": (field: FieldDef, value: unknown, final: boolean) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onInput?: ((value: unknown) => any) | undefined;
|
|
16
|
+
onChange?: ((value: unknown) => any) | undefined;
|
|
17
|
+
"onSub-commit"?: ((field: FieldDef, value: unknown, final: boolean) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldDef } from '../fieldSchema';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: FieldDef;
|
|
4
|
+
modelValue: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (value: string) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChange?: ((value: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSelectElement>;
|
|
11
|
+
export default _default;
|