tiddy 2.0.2 → 2.0.3

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as vue30 from "vue";
1
+ import * as vue14 from "vue";
2
2
  import { AllowedComponentProps, CSSProperties, Component, ComputedRef, DefineComponent, ExtractPublicPropTypes, PropType, Raw, Slot } from "vue";
3
3
  import * as element_plus0 from "element-plus";
4
4
  import { DialogInstance, DialogProps, FormInstance, FormItemProps, FormItemRule, FormProps, TableColumnInstance, TableInstance } from "element-plus";
@@ -240,19 +240,16 @@ declare const tdformItemProps: {
240
240
  };
241
241
  };
242
242
  type TdFormItemProps = ExtractPublicPropTypes<typeof tdformItemProps> & Partial<FormItemProps>;
243
- declare function widget<T>(p: {
243
+ declare function widget<T>(c: T, props?: PropsOf<T>): {
244
244
  component: T;
245
- widget?: PropsOf<T>;
246
- }): {
247
- component: T;
248
- widget?: PropsOf<T>;
245
+ widget: PropsOf<T> | undefined;
249
246
  };
250
247
  //#endregion
251
248
  //#region src/form/form.vue.d.ts
252
249
  declare function reValidateErrorFields(): void;
253
250
  declare const expose$1: {
254
251
  reValidateErrorFields: typeof reValidateErrorFields;
255
- model: vue30.ComputedRef<unknown>;
252
+ model: vue14.ComputedRef<unknown>;
256
253
  };
257
254
  type __TdFormExpose = typeof expose$1 & FormInstance;
258
255
  declare var __VLS_11$1: {}, __VLS_13$1: {}, __VLS_19$1: {};
@@ -263,34 +260,32 @@ type __VLS_Slots$3 = {} & {
263
260
  } & {
264
261
  suffix?: (props: typeof __VLS_19$1) => any;
265
262
  };
266
- declare const __VLS_base$3: vue30.DefineComponent<vue30.ExtractPropTypes<{
263
+ declare const __VLS_base$3: vue14.DefineComponent<vue14.ExtractPropTypes<{
267
264
  fields: {
268
- type: vue30.PropType<TdFormFieldProps[]>;
265
+ type: vue14.PropType<TdFormFieldProps[]>;
269
266
  default: () => never[];
270
267
  };
271
268
  item: {
272
- type: vue30.PropType<element_plus0.FormItemProps>;
269
+ type: vue14.PropType<element_plus0.FormItemProps>;
273
270
  default: () => {};
274
271
  };
275
- }>, __TdFormExpose, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {
276
- validate: () => any;
272
+ }>, __TdFormExpose, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {
277
273
  submit: (data: any) => any;
278
- }, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
274
+ }, string, vue14.PublicProps, Readonly<vue14.ExtractPropTypes<{
279
275
  fields: {
280
- type: vue30.PropType<TdFormFieldProps[]>;
276
+ type: vue14.PropType<TdFormFieldProps[]>;
281
277
  default: () => never[];
282
278
  };
283
279
  item: {
284
- type: vue30.PropType<element_plus0.FormItemProps>;
280
+ type: vue14.PropType<element_plus0.FormItemProps>;
285
281
  default: () => {};
286
282
  };
287
283
  }>> & Readonly<{
288
- onValidate?: (() => any) | undefined;
289
284
  onSubmit?: ((data: any) => any) | undefined;
290
285
  }>, {
291
286
  fields: TdFormFieldProps[];
292
287
  item: element_plus0.FormItemProps;
293
- }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
288
+ }, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any>;
294
289
  declare const __VLS_export$5: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
295
290
  declare const _default$1: typeof __VLS_export$5;
296
291
  type __VLS_WithSlots$3<T, S> = T & {
@@ -302,37 +297,37 @@ type __VLS_WithSlots$3<T, S> = T & {
302
297
  //#region src/form/form-item.vue.d.ts
303
298
  declare var __VLS_10: string | number, __VLS_11: any;
304
299
  type __VLS_Slots$2 = {} & { [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any };
305
- declare const __VLS_base$2: vue30.DefineComponent<vue30.ExtractPropTypes<{
300
+ declare const __VLS_base$2: vue14.DefineComponent<vue14.ExtractPropTypes<{
306
301
  messageLabel: {
307
- type: vue30.PropType<string | vue30.ComputedRef<string>>;
302
+ type: vue14.PropType<string | vue14.ComputedRef<string>>;
308
303
  default: string;
309
304
  };
310
305
  formatMessage: {
311
- type: vue30.PropType<AnyFunction>;
306
+ type: vue14.PropType<AnyFunction>;
312
307
  default: null;
313
308
  };
314
309
  hideRequiredAsterisk: {
315
- type: vue30.PropType<boolean>;
310
+ type: vue14.PropType<boolean>;
316
311
  default: boolean;
317
312
  };
318
- }>, {}, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
313
+ }>, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<vue14.ExtractPropTypes<{
319
314
  messageLabel: {
320
- type: vue30.PropType<string | vue30.ComputedRef<string>>;
315
+ type: vue14.PropType<string | vue14.ComputedRef<string>>;
321
316
  default: string;
322
317
  };
323
318
  formatMessage: {
324
- type: vue30.PropType<AnyFunction>;
319
+ type: vue14.PropType<AnyFunction>;
325
320
  default: null;
326
321
  };
327
322
  hideRequiredAsterisk: {
328
- type: vue30.PropType<boolean>;
323
+ type: vue14.PropType<boolean>;
329
324
  default: boolean;
330
325
  };
331
326
  }>> & Readonly<{}>, {
332
- messageLabel: string | vue30.ComputedRef<string>;
327
+ messageLabel: string | vue14.ComputedRef<string>;
333
328
  formatMessage: AnyFunction;
334
329
  hideRequiredAsterisk: boolean;
335
- }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
330
+ }, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any>;
336
331
  declare const __VLS_export$4: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
337
332
  declare const _default$3: typeof __VLS_export$4;
338
333
  type __VLS_WithSlots$2<T, S> = T & {
@@ -342,7 +337,7 @@ type __VLS_WithSlots$2<T, S> = T & {
342
337
  };
343
338
  //#endregion
344
339
  //#region src/form/form-field.vue.d.ts
345
- declare const __VLS_export$3: vue30.DefineComponent<{}, {}, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
340
+ declare const __VLS_export$3: vue14.DefineComponent<{}, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any>;
346
341
  declare const _default$2: typeof __VLS_export$3;
347
342
  //#endregion
348
343
  //#region src/form/index.d.ts
@@ -382,19 +377,19 @@ type __VLS_Slots$1 = {} & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof
382
377
  } & {
383
378
  after?: (props: typeof __VLS_19) => any;
384
379
  };
385
- declare const __VLS_base$1: vue30.DefineComponent<vue30.ExtractPropTypes<{
380
+ declare const __VLS_base$1: vue14.DefineComponent<vue14.ExtractPropTypes<{
386
381
  columns: {
387
- type: vue30.PropType<TdTableColumnProps[]>;
382
+ type: vue14.PropType<TdTableColumnProps[]>;
388
383
  default: () => never[];
389
384
  };
390
- }>, TableInstance, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
385
+ }>, TableInstance, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<vue14.ExtractPropTypes<{
391
386
  columns: {
392
- type: vue30.PropType<TdTableColumnProps[]>;
387
+ type: vue14.PropType<TdTableColumnProps[]>;
393
388
  default: () => never[];
394
389
  };
395
390
  }>> & Readonly<{}>, {
396
391
  columns: TdTableColumnProps[];
397
- }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
392
+ }, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any>;
398
393
  declare const __VLS_export$2: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
399
394
  declare const _default$4: typeof __VLS_export$2;
400
395
  type __VLS_WithSlots$1<T, S> = T & {
@@ -404,37 +399,37 @@ type __VLS_WithSlots$1<T, S> = T & {
404
399
  };
405
400
  //#endregion
406
401
  //#region src/table/table-col.vue.d.ts
407
- declare const __VLS_export$1: vue30.DefineComponent<vue30.ExtractPropTypes<{
402
+ declare const __VLS_export$1: vue14.DefineComponent<vue14.ExtractPropTypes<{
408
403
  slots: {
409
- type: vue30.PropType<OrArray<SlotDef>>;
404
+ type: vue14.PropType<OrArray<SlotDef>>;
410
405
  default: () => null;
411
406
  };
412
407
  columns: {
413
- type: vue30.PropType<any[]>;
408
+ type: vue14.PropType<any[]>;
414
409
  default: () => never[];
415
410
  };
416
411
  transform: {
417
- type: vue30.PropType<AnyFunction[]>;
412
+ type: vue14.PropType<AnyFunction[]>;
418
413
  default: () => never[];
419
414
  };
420
- }>, {}, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<vue30.ExtractPropTypes<{
415
+ }>, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<vue14.ExtractPropTypes<{
421
416
  slots: {
422
- type: vue30.PropType<OrArray<SlotDef>>;
417
+ type: vue14.PropType<OrArray<SlotDef>>;
423
418
  default: () => null;
424
419
  };
425
420
  columns: {
426
- type: vue30.PropType<any[]>;
421
+ type: vue14.PropType<any[]>;
427
422
  default: () => never[];
428
423
  };
429
424
  transform: {
430
- type: vue30.PropType<AnyFunction[]>;
425
+ type: vue14.PropType<AnyFunction[]>;
431
426
  default: () => never[];
432
427
  };
433
428
  }>> & Readonly<{}>, {
434
429
  slots: OrArray<SlotDef>;
435
430
  columns: any[];
436
431
  transform: AnyFunction[];
437
- }, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
432
+ }, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any>;
438
433
  declare const _default$5: typeof __VLS_export$1;
439
434
  //#endregion
440
435
  //#region src/table/index.d.ts
@@ -467,7 +462,7 @@ declare var __VLS_13: "default" | "title" | "header" | "footer", __VLS_14: {
467
462
  titleClass?: string | undefined;
468
463
  };
469
464
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any };
470
- declare const __VLS_base: vue30.DefineComponent<{}, __TdDialogExpose, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any>;
465
+ declare const __VLS_base: vue14.DefineComponent<{}, __TdDialogExpose, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any>;
471
466
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
472
467
  declare const _default: typeof __VLS_export;
473
468
  type __VLS_WithSlots<T, S> = T & {
@@ -481,10 +476,10 @@ type Instance = InstanceType<typeof _default>;
481
476
  type TdDialogInstance = Instance & Omit<DialogInstance, keyof Instance & string>;
482
477
  //#endregion
483
478
  //#region src/hooks/use-reuse.d.ts
484
- declare function useReuse(): (vue30.DefineComponent<{}, () => null, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any> | vue30.DefineComponent<{}, () => vue30.VNode<vue30.RendererNode, vue30.RendererElement, {
479
+ declare function useReuse(): (vue14.DefineComponent<{}, () => null, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any> | vue14.DefineComponent<{}, () => vue14.VNode<vue14.RendererNode, vue14.RendererElement, {
485
480
  [key: string]: any;
486
- }>[] | undefined, {}, {}, {}, vue30.ComponentOptionsMixin, vue30.ComponentOptionsMixin, {}, string, vue30.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue30.ComponentProvideOptions, true, {}, any> | vue30.ComputedRef<Readonly<{
487
- [name: string]: vue30.Slot<any> | undefined;
481
+ }>[] | undefined, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, true, {}, any> | vue14.ComputedRef<Readonly<{
482
+ [name: string]: vue14.Slot<any> | undefined;
488
483
  }>>)[];
489
484
  //#endregion
490
485
  //#region src/utils/index.d.ts
package/dist/index.js CHANGED
@@ -213,8 +213,11 @@ const tdformItemProps = {
213
213
  default: false
214
214
  }
215
215
  };
216
- function widget(p) {
217
- return p;
216
+ function widget(c, props) {
217
+ return {
218
+ component: c,
219
+ widget: props
220
+ };
218
221
  }
219
222
 
220
223
  //#endregion
@@ -699,7 +702,7 @@ var form_field_default = form_field_vue_vue_type_script_setup_true_lang_default;
699
702
  var form_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
700
703
  __name: "form",
701
704
  props: formPropsDef,
702
- emits: ["validate", "submit"],
705
+ emits: ["submit"],
703
706
  setup(__props, { expose: __expose, emit: __emit }) {
704
707
  const formRef = useTemplateRef("form");
705
708
  const props = __props;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiddy",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "packageManager": "pnpm@10.11.0",
5
5
  "description": "A set of Vue 3 components based on element-plus",
6
6
  "type": "module",