@tongfun/ui 0.0.1-alpha.4 → 0.0.1-alpha.5

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.
@@ -7,6 +7,13 @@ export type LowcodeAgentJSONValue =
7
7
 
8
8
  export type LowcodeAgentFramework = 'vue3'
9
9
 
10
+ /**
11
+ * Material icons use the PascalCase export names exposed by lucide-vue-next.
12
+ * The registry and icon picker must resolve this value without a kebab-case
13
+ * conversion or a custom alias table.
14
+ */
15
+ export type LowcodeAgentLucideIconName = `${Uppercase<string>}${string}`
16
+
10
17
  export type LowcodeAgentComponentCategory =
11
18
  | 'layout'
12
19
  | 'basic'
@@ -148,6 +155,23 @@ export interface LowcodeAgentDynamicSlotSchema {
148
155
  multiple: boolean
149
156
  }
150
157
 
158
+ export interface LowcodeAgentRelationshipSchema {
159
+ type: string
160
+ source: {
161
+ component: string
162
+ path: string
163
+ field?: string
164
+ }
165
+ target: {
166
+ component: string
167
+ path: string
168
+ field?: string
169
+ }
170
+ scope?: string
171
+ validation?: string
172
+ description?: string
173
+ }
174
+
151
175
  export interface LowcodeAgentFieldSchema {
152
176
  fieldType?: string
153
177
  valueType: string | string[]
@@ -162,9 +186,131 @@ export interface LowcodeAgentFieldSchema {
162
186
  labelProp?: string
163
187
  requiredRulePath?: string
164
188
  backendSchema?: Record<string, LowcodeAgentJSONValue>
189
+ wrappedBaseComponent?: string
190
+ wrapperComponent?: string
191
+ formFieldWrapper?: boolean
165
192
  [key: string]: unknown
166
193
  }
167
194
 
195
+ export type LowcodeDataRole =
196
+ | 'object'
197
+ | 'collection'
198
+ | 'scalar'
199
+ | 'tree'
200
+ | 'options'
201
+ | 'pagination'
202
+ | 'status'
203
+
204
+ export type LowcodeRequestPolicy =
205
+ | 'controlled'
206
+ | 'runtime-only'
207
+ | 'disabled'
208
+
209
+ export type LowcodeErrorConsumer =
210
+ | 'external'
211
+ | 'prop'
212
+ | 'slot'
213
+
214
+ export interface LowcodeErrorChannel {
215
+ consumer: LowcodeErrorConsumer
216
+ stateRole: 'ui' | 'diagnostic'
217
+ visibleProp?: string
218
+ titleProp?: string
219
+ descriptionProp?: string
220
+ retryEvent?: string
221
+ }
222
+
223
+ export interface LowcodeNestedDataBinding {
224
+ key: string
225
+ path: string
226
+ role: LowcodeDataRole
227
+ valueType: string
228
+ bindable: boolean
229
+ writable?: boolean
230
+ default?: LowcodeAgentJSONValue
231
+ }
232
+
233
+ export interface LowcodeDataBinding {
234
+ prop: string
235
+ path?: string
236
+ role: LowcodeDataRole
237
+ valueType: string
238
+ bindable: boolean
239
+ writable?: boolean
240
+ default?: LowcodeAgentJSONValue
241
+ nested?: LowcodeNestedDataBinding[]
242
+ updateEvent?: string
243
+ valueEventPath?: string
244
+ errorChannel?: LowcodeErrorChannel
245
+ }
246
+
247
+ export interface LowcodeDesignDataPolicy {
248
+ requestPolicy: LowcodeRequestPolicy
249
+ emptyStateProps?: Record<string, LowcodeAgentJSONValue>
250
+ disabledInternalRequests?: string[]
251
+ note?: string
252
+ }
253
+
254
+ export interface LowcodeColumnContractRef {
255
+ prop: 'columns'
256
+ type: 'PersistableTfColumnDef[]'
257
+ schemaRef: 'TfColumnDef.persistable'
258
+ }
259
+
260
+ export interface LowcodeDataCapability {
261
+ roles: LowcodeDataRole[]
262
+ extends?: string[]
263
+ bindings: LowcodeDataBinding[]
264
+ design: LowcodeDesignDataPolicy
265
+ columnContract?: LowcodeColumnContractRef
266
+ }
267
+
268
+ export interface LowcodePersistableColumnPropertySchema {
269
+ type: string | string[]
270
+ required?: boolean
271
+ default?: LowcodeAgentJSONValue
272
+ options?: LowcodeAgentPropOptionSchema[]
273
+ description?: string
274
+ }
275
+
276
+ export interface LowcodePersistableColumnContractSchema {
277
+ kind: 'interface'
278
+ runtimeType: 'TfColumnDef'
279
+ persistableType: 'PersistableTfColumnDef'
280
+ jsonSafe: true
281
+ fields: Record<string, LowcodePersistableColumnPropertySchema>
282
+ disallowedRuntimeFields: string[]
283
+ description?: string
284
+ }
285
+
286
+ export interface PersistableTfColumnDef {
287
+ field?: string
288
+ fieldId?: string | number
289
+ headerName?: string
290
+ width?: number
291
+ editable?: boolean
292
+ fieldType?: string
293
+ elementPosition?: 'left' | 'center' | 'right'
294
+ required?: boolean
295
+ isQuery?: boolean
296
+ isSum?: boolean
297
+ isChooseSum?: boolean
298
+ isFreeze?: boolean
299
+ isShow?: boolean
300
+ fieldWidth?: number
301
+ fieldIndex?: number
302
+ options?: Array<{ label: string; value: string | number | boolean | null; disabled?: boolean }>
303
+ numberConfig?: Record<string, LowcodeAgentJSONValue>
304
+ decimalConfig?: Record<string, LowcodeAgentJSONValue>
305
+ selectConfig?: Record<string, LowcodeAgentJSONValue>
306
+ basicDataConfig?: Record<string, LowcodeAgentJSONValue>
307
+ tagConfig?: Record<string, LowcodeAgentJSONValue>
308
+ statusConfig?: Record<string, LowcodeAgentJSONValue>
309
+ props?: Record<string, LowcodeAgentJSONValue>
310
+ events?: Record<string, LowcodeAgentJSONValue[]>
311
+ carryMappings?: LowcodeAgentJSONValue[]
312
+ }
313
+
168
314
  export interface LowcodeAgentFieldTypeSchema {
169
315
  name: string
170
316
  title: string
@@ -193,8 +339,14 @@ export interface LowcodeAgentAiCapabilitySchema {
193
339
  }
194
340
 
195
341
  export interface LowcodeAgentLowcodeSchema {
342
+ layout?: {
343
+ heightPolicy?: string
344
+ fallbackMinHeight?: number
345
+ [key: string]: unknown
346
+ }
196
347
  palette: {
197
- icon?: string
348
+ /** A registered PascalCase export name from lucide-vue-next. */
349
+ icon?: LowcodeAgentLucideIconName
198
350
  order?: number
199
351
  draggable?: boolean
200
352
  recommended?: boolean
@@ -223,7 +375,12 @@ export interface LowcodeAgentLowcodeSchema {
223
375
  slots: LowcodeAgentSlotSchema[]
224
376
  container?: LowcodeAgentContainerSchema
225
377
  dynamicSlots?: LowcodeAgentDynamicSlotSchema[]
378
+ relationships?: LowcodeAgentRelationshipSchema[]
379
+ composition?: Record<string, LowcodeAgentJSONValue>
380
+ customTypes?: Record<string, LowcodeAgentJSONValue>
226
381
  field?: LowcodeAgentFieldSchema
382
+ data?: LowcodeDataCapability
383
+ design?: Record<string, LowcodeAgentJSONValue>
227
384
  fieldTypes?: LowcodeAgentFieldTypeSchema[]
228
385
  formAdapter?: {
229
386
  component: string
@@ -283,7 +440,7 @@ export interface LowcodeAgentIconGroupSchema {
283
440
  }
284
441
 
285
442
  export interface LowcodeAgentIconSchema {
286
- name: string
443
+ name: LowcodeAgentLucideIconName
287
444
  label: string
288
445
  category: string
289
446
  keywords?: string[]
@@ -299,14 +456,14 @@ export interface LowcodeAgentIconRegistry {
299
456
  }
300
457
  valueShape: {
301
458
  library: string
302
- name: string
459
+ name: LowcodeAgentLucideIconName
303
460
  }
304
461
  groups: LowcodeAgentIconGroupSchema[]
305
462
  icons: LowcodeAgentIconSchema[]
306
463
  runtimeContract: {
307
464
  saveAs: string
308
465
  resolver: string
309
- fallback: string
466
+ fallback: LowcodeAgentLucideIconName
310
467
  renderHint: string
311
468
  }
312
469
  }