@opentiny/tiny-robot 0.3.0-rc.6 → 0.3.1-alpha.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/dist/index.d.ts CHANGED
@@ -338,7 +338,7 @@ clear: () => any;
338
338
  blur: (event: FocusEvent) => any;
339
339
  cancel: () => any;
340
340
  focus: (event: FocusEvent) => any;
341
- submit: (value: string) => any;
341
+ submit: (value: string, templateData?: UserItem[] | undefined) => any;
342
342
  "update:modelValue": (value: string) => any;
343
343
  "update:templateData": (value: UserItem[]) => any;
344
344
  "speech-start": () => any;
@@ -349,12 +349,16 @@ submit: (value: string) => any;
349
349
  "escape-press": () => any;
350
350
  "reset-template": () => any;
351
351
  "files-selected": (files: File[]) => any;
352
+ "trigger-char": (char: string, position: {
353
+ top: number;
354
+ left: number;
355
+ }) => any;
352
356
  }, string, PublicProps, Readonly<SenderProps> & Readonly<{
353
357
  onClear?: (() => any) | undefined;
354
358
  onBlur?: ((event: FocusEvent) => any) | undefined;
355
359
  onCancel?: (() => any) | undefined;
356
360
  onFocus?: ((event: FocusEvent) => any) | undefined;
357
- onSubmit?: ((value: string) => any) | undefined;
361
+ onSubmit?: ((value: string, templateData?: UserItem[] | undefined) => any) | undefined;
358
362
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
359
363
  "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
360
364
  "onSpeech-start"?: (() => any) | undefined;
@@ -365,6 +369,10 @@ onSubmit?: ((value: string) => any) | undefined;
365
369
  "onEscape-press"?: (() => any) | undefined;
366
370
  "onReset-template"?: (() => any) | undefined;
367
371
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
372
+ "onTrigger-char"?: ((char: string, position: {
373
+ top: number;
374
+ left: number;
375
+ }) => any) | undefined;
368
376
  }>, {
369
377
  disabled: boolean;
370
378
  modelValue: string;
@@ -397,13 +405,22 @@ maxRows: number;
397
405
  }> & Readonly<{
398
406
  onSubmit?: (() => any) | undefined;
399
407
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
408
+ "onTrigger-char"?: ((char: string, position: {
409
+ top: number;
410
+ left: number;
411
+ }) => any) | undefined;
400
412
  }>, {
401
413
  clearHistory: () => void;
402
414
  activateFirstField: () => void;
415
+ focusToEnd: () => void;
403
416
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
404
417
  "update:modelValue": (value: UserItem[]) => any;
405
418
  } & {
406
419
  submit: () => any;
420
+ "trigger-char": (char: string, position: {
421
+ top: number;
422
+ left: number;
423
+ }) => any;
407
424
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
408
425
  editorRef: HTMLDivElement;
409
426
  }, HTMLDivElement, ComponentProvideOptions, {
@@ -423,9 +440,14 @@ maxRows: number;
423
440
  }> & Readonly<{
424
441
  onSubmit?: (() => any) | undefined;
425
442
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
443
+ "onTrigger-char"?: ((char: string, position: {
444
+ top: number;
445
+ left: number;
446
+ }) => any) | undefined;
426
447
  }>, {
427
448
  clearHistory: () => void;
428
449
  activateFirstField: () => void;
450
+ focusToEnd: () => void;
429
451
  }, {}, {}, {}, {}> | null;
430
452
  inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
431
453
  _constants: {
@@ -1251,13 +1273,22 @@ declare function __VLS_template_7(): {
1251
1273
  }> & Readonly<{
1252
1274
  onSubmit?: (() => any) | undefined;
1253
1275
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1276
+ "onTrigger-char"?: ((char: string, position: {
1277
+ top: number;
1278
+ left: number;
1279
+ }) => any) | undefined;
1254
1280
  }>, {
1255
1281
  clearHistory: () => void;
1256
1282
  activateFirstField: () => void;
1283
+ focusToEnd: () => void;
1257
1284
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1258
1285
  "update:modelValue": (value: UserItem[]) => any;
1259
1286
  } & {
1260
1287
  submit: () => any;
1288
+ "trigger-char": (char: string, position: {
1289
+ top: number;
1290
+ left: number;
1291
+ }) => any;
1261
1292
  }, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
1262
1293
  editorRef: HTMLDivElement;
1263
1294
  }, HTMLDivElement, ComponentProvideOptions, {
@@ -1277,9 +1308,14 @@ declare function __VLS_template_7(): {
1277
1308
  }> & Readonly<{
1278
1309
  onSubmit?: (() => any) | undefined;
1279
1310
  "onUpdate:modelValue"?: ((value: UserItem[]) => any) | undefined;
1311
+ "onTrigger-char"?: ((char: string, position: {
1312
+ top: number;
1313
+ left: number;
1314
+ }) => any) | undefined;
1280
1315
  }>, {
1281
1316
  clearHistory: () => void;
1282
1317
  activateFirstField: () => void;
1318
+ focusToEnd: () => void;
1283
1319
  }, {}, {}, {}, {}> | null;
1284
1320
  inputRef: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
1285
1321
  _constants: {
@@ -1919,10 +1955,9 @@ declare type BaseCardProps = Pick<AttachmentListProps, 'fileIcons' | 'disabled'
1919
1955
 
1920
1956
  export declare type BaseFileType = 'image' | 'pdf' | 'word' | 'excel' | 'ppt' | 'folder' | 'other';
1921
1957
 
1922
- declare interface BaseTextItem {
1958
+ declare interface BaseItem {
1923
1959
  id: string;
1924
- type: string;
1925
- content: string;
1960
+ readonly?: boolean;
1926
1961
  }
1927
1962
 
1928
1963
  declare const Bubble: typeof _default_18 & {
@@ -2923,7 +2958,7 @@ export declare interface RejectionReason {
2923
2958
  export declare type SenderEmits = {
2924
2959
  (e: 'update:modelValue', value: string): void;
2925
2960
  (e: 'update:templateData', value: UserItem[]): void;
2926
- (e: 'submit', value: string): void;
2961
+ (e: 'submit', value: string, templateData?: UserItem[]): void;
2927
2962
  (e: 'clear'): void;
2928
2963
  (e: 'speech-start'): void;
2929
2964
  (e: 'speech-end', transcript?: string): void;
@@ -2936,6 +2971,10 @@ export declare type SenderEmits = {
2936
2971
  (e: 'cancel'): void;
2937
2972
  (e: 'reset-template'): void;
2938
2973
  (e: 'files-selected', files: File[]): void;
2974
+ (e: 'trigger-char', char: string, position: {
2975
+ top: number;
2976
+ left: number;
2977
+ }): void;
2939
2978
  };
2940
2979
 
2941
2980
  export declare interface SenderProps {
@@ -3157,14 +3196,16 @@ export declare interface SuggestionTextPart {
3157
3196
  isMatch: boolean;
3158
3197
  }
3159
3198
 
3160
- declare interface TemplateItem extends BaseTextItem {
3199
+ declare interface TemplateItem extends BaseItem {
3161
3200
  type: 'template';
3201
+ content: string;
3162
3202
  prefix: string;
3163
3203
  suffix: string;
3164
3204
  }
3165
3205
 
3166
- declare interface TextItem extends BaseTextItem {
3206
+ declare interface TextItem extends BaseItem {
3167
3207
  type: 'text';
3208
+ content: string;
3168
3209
  }
3169
3210
 
3170
3211
  export declare interface ThemeProviderProps {
@@ -3209,7 +3250,14 @@ export declare interface UrlAttachment extends BaseAttachment {
3209
3250
  rawFile?: File;
3210
3251
  }
3211
3252
 
3212
- export declare type UserItem = UserTextItem | UserTemplateItem;
3253
+ export declare type UserItem = UserTextItem | UserTemplateItem | UserSkillItem;
3254
+
3255
+ export declare type UserSkillItem = {
3256
+ id?: string;
3257
+ type: 'skill';
3258
+ label: string;
3259
+ value: string;
3260
+ };
3213
3261
 
3214
3262
  export declare type UserTemplateItem = Omit<Pick<TemplateItem, 'type' | 'content'>, 'id'> & {
3215
3263
  id?: TemplateItem['id'];