@opentiny/tiny-robot 0.3.0-alpha.15 → 0.3.0-alpha.17

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
@@ -327,12 +327,38 @@ submit: () => void;
327
327
  startSpeech: () => void;
328
328
  stopSpeech: () => void;
329
329
  activateTemplateFirstField: () => void;
330
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
331
- [x: string]: any;
332
- } & {
333
- [x: string]: any;
330
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
331
+ clear: () => any;
332
+ blur: (event: FocusEvent) => any;
333
+ cancel: () => any;
334
+ focus: (event: FocusEvent) => any;
335
+ submit: (value: string) => any;
336
+ "update:modelValue": (value: string) => any;
337
+ "update:templateData": (value: UserItem[]) => any;
338
+ "speech-start": () => any;
339
+ "speech-end": (transcript?: string | undefined) => any;
340
+ "speech-interim": (transcript: string) => any;
341
+ "speech-error": (error: Error) => any;
342
+ "suggestion-select": (value: string) => any;
343
+ "escape-press": () => any;
344
+ "reset-template": () => any;
345
+ "files-selected": (files: File[]) => any;
334
346
  }, string, PublicProps, Readonly<SenderProps> & Readonly<{
335
- [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
347
+ onClear?: (() => any) | undefined;
348
+ onBlur?: ((event: FocusEvent) => any) | undefined;
349
+ onCancel?: (() => any) | undefined;
350
+ onFocus?: ((event: FocusEvent) => any) | undefined;
351
+ onSubmit?: ((value: string) => any) | undefined;
352
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
353
+ "onUpdate:templateData"?: ((value: UserItem[]) => any) | undefined;
354
+ "onSpeech-start"?: (() => any) | undefined;
355
+ "onSpeech-end"?: ((transcript?: string | undefined) => any) | undefined;
356
+ "onSpeech-interim"?: ((transcript: string) => any) | undefined;
357
+ "onSpeech-error"?: ((error: Error) => any) | undefined;
358
+ "onSuggestion-select"?: ((value: string) => any) | undefined;
359
+ "onEscape-press"?: (() => any) | undefined;
360
+ "onReset-template"?: (() => any) | undefined;
361
+ "onFiles-selected"?: ((files: File[]) => any) | undefined;
336
362
  }>, {
337
363
  disabled: boolean;
338
364
  modelValue: string;
@@ -1873,7 +1899,13 @@ export declare interface BubbleCommonProps {
1873
1899
  * 如果 Bubble 中的 content 是长度大于 0 的数组,则 contentRenderer 无效。将会使用 BubbleProvider 中注册的渲染器
1874
1900
  */
1875
1901
  contentRenderer?: BubbleContentRenderer;
1876
- hidden?: boolean;
1902
+ /**
1903
+ * 自定义气泡内容字段。比如 customContentField 设置为 'my-content',则 Bubble 优先渲染 my-content 属性到气泡内容
1904
+ */
1905
+ customContentField?: string;
1906
+ /**
1907
+ * 气泡最大宽度
1908
+ */
1877
1909
  maxWidth?: string | number;
1878
1910
  }
1879
1911
 
@@ -1925,20 +1957,26 @@ export declare interface BubbleListProps {
1925
1957
 
1926
1958
  export declare class BubbleMarkdownContentRenderer extends BubbleContentClassRenderer {
1927
1959
  readonly mdConfig: Options;
1928
- readonly dompurifyConfig: Config & {
1929
- disable?: boolean;
1930
- };
1960
+ readonly dompurifyConfig: Config;
1961
+ readonly sanitizeDisabled: boolean;
1962
+ readonly defaultAttrs: Record<string, unknown>;
1931
1963
  private md;
1932
- constructor(mdConfig?: Options, dompurifyConfig?: Config & {
1933
- disable?: boolean;
1934
- });
1964
+ constructor(options?: BubbleMarkdownRendererOptions);
1935
1965
  render(options: {
1936
1966
  content?: string;
1967
+ [key: string]: unknown;
1937
1968
  }): VNode<RendererNode, RendererElement, {
1938
1969
  [key: string]: any;
1939
1970
  }>;
1940
1971
  }
1941
1972
 
1973
+ declare interface BubbleMarkdownRendererOptions {
1974
+ mdConfig?: Options;
1975
+ dompurifyConfig?: Config;
1976
+ sanitizeDisabled?: boolean;
1977
+ defaultAttrs?: Record<string, unknown>;
1978
+ }
1979
+
1942
1980
  export declare interface BubbleProps extends BubbleCommonProps {
1943
1981
  /**
1944
1982
  * 气泡内容
@@ -1959,6 +1997,7 @@ export { BubbleProvider as TrBubbleProvider }
1959
1997
  declare const bubbleProviderInstall: (app: App) => void;
1960
1998
 
1961
1999
  export declare type BubbleRoleConfig = BubbleCommonProps & {
2000
+ hidden?: boolean;
1962
2001
  slots?: BubbleSlots;
1963
2002
  };
1964
2003
 
@@ -2123,11 +2162,31 @@ declare const _default_30: __VLS_WithTemplateSlots_10<typeof __VLS_component_10,
2123
2162
  declare const _default_31: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
2124
2163
 
2125
2164
  declare const _default_32: DefineComponent<__VLS_PublicProps_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2126
- [x: string]: any;
2165
+ "update:visible": (value: boolean) => any;
2127
2166
  } & {
2128
- [x: string]: any;
2167
+ search: (query: string, tab: "installed" | "market") => any;
2168
+ refresh: (tab: "installed" | "market") => any;
2169
+ "update:visible": (visible: boolean) => any;
2170
+ "market-category-change": (category: string) => any;
2171
+ "tab-change": (activeTab: "installed" | "market") => any;
2172
+ "plugin-toggle": (plugin: PluginInfo, enabled: boolean) => any;
2173
+ "plugin-delete": (plugin: PluginInfo) => any;
2174
+ "plugin-add": (plugin: PluginInfo, added: boolean) => any;
2175
+ "plugin-create": (type: "code" | "form", data: PluginCreationData) => any;
2176
+ "tool-toggle": (plugin: PluginInfo, toolId: string, enabled: boolean) => any;
2177
+ "update:activeCount": (count: number) => any;
2129
2178
  }, string, PublicProps, Readonly<__VLS_PublicProps_5> & Readonly<{
2130
- [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
2179
+ onSearch?: ((query: string, tab: "installed" | "market") => any) | undefined;
2180
+ onRefresh?: ((tab: "installed" | "market") => any) | undefined;
2181
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
2182
+ "onMarket-category-change"?: ((category: string) => any) | undefined;
2183
+ "onTab-change"?: ((activeTab: "installed" | "market") => any) | undefined;
2184
+ "onPlugin-toggle"?: ((plugin: PluginInfo, enabled: boolean) => any) | undefined;
2185
+ "onPlugin-delete"?: ((plugin: PluginInfo) => any) | undefined;
2186
+ "onPlugin-add"?: ((plugin: PluginInfo, added: boolean) => any) | undefined;
2187
+ "onPlugin-create"?: ((type: "code" | "form", data: PluginCreationData) => any) | undefined;
2188
+ "onTool-toggle"?: ((plugin: PluginInfo, toolId: string, enabled: boolean) => any) | undefined;
2189
+ "onUpdate:activeCount"?: ((count: number) => any) | undefined;
2131
2190
  }>, {
2132
2191
  title: string;
2133
2192
  loading: boolean;
@@ -28881,10 +28881,10 @@ Tn.version = b9;
28881
28881
  const C9 = { class: "plugin-card__main" }, w9 = ["src"], S9 = { class: "plugin-card__content" }, $9 = { class: "plugin-card__info" }, k9 = { class: "plugin-card__name" }, T9 = {
28882
28882
  key: 0,
28883
28883
  class: "plugin-card__count"
28884
- }, _9 = { class: "plugin-card__desc" }, I9 = { class: "plugin-card__actions" }, E9 = { class: "plugin-card__operations" }, O9 = {
28884
+ }, _9 = ["title"], I9 = { class: "plugin-card__actions" }, E9 = { class: "plugin-card__operations" }, O9 = {
28885
28885
  key: 1,
28886
28886
  class: "plugin-card__add"
28887
- }, M9 = { class: "plugin-card__tools" }, x9 = { class: "plugin-card__tool" }, D9 = { class: "plugin-card__content" }, A9 = { class: "plugin-card__info" }, L9 = { class: "plugin-card__name" }, R9 = { class: "plugin-card__desc" }, V9 = { class: "plugin-card__actions plugin-card__actions--tool" }, N9 = {
28887
+ }, M9 = { class: "plugin-card__tools" }, x9 = { class: "plugin-card__tool" }, D9 = { class: "plugin-card__content" }, A9 = { class: "plugin-card__info" }, L9 = { class: "plugin-card__name" }, R9 = ["title"], V9 = { class: "plugin-card__actions plugin-card__actions--tool" }, N9 = {
28888
28888
  key: 0,
28889
28889
  class: "plugin-card__divider"
28890
28890
  }, P9 = /* @__PURE__ */ rr({
@@ -28935,7 +28935,10 @@ const C9 = { class: "plugin-card__main" }, w9 = ["src"], S9 = { class: "plugin-c
28935
28935
  T("span", k9, j(v.plugin.name), 1),
28936
28936
  v.showToolCount && i.value ? (C(), k("span", T9, j(i.value) + " 个工具 ", 1)) : P("", !0)
28937
28937
  ]),
28938
- T("div", _9, j(v.plugin.description), 1)
28938
+ T("div", {
28939
+ class: "plugin-card__desc",
28940
+ title: v.plugin.description
28941
+ }, j(v.plugin.description), 9, _9)
28939
28942
  ]),
28940
28943
  T("div", I9, [
28941
28944
  G(v.$slots, "actions", {
@@ -29012,7 +29015,10 @@ const C9 = { class: "plugin-card__main" }, w9 = ["src"], S9 = { class: "plugin-c
29012
29015
  T("div", A9, [
29013
29016
  T("span", L9, j(m.name), 1)
29014
29017
  ]),
29015
- T("div", R9, j(m.description), 1)
29018
+ T("div", {
29019
+ class: "plugin-card__desc",
29020
+ title: m.description
29021
+ }, j(m.description), 9, R9)
29016
29022
  ]),
29017
29023
  T("div", V9, [
29018
29024
  E(Oe(jt), {
@@ -29032,7 +29038,7 @@ const C9 = { class: "plugin-card__main" }, w9 = ["src"], S9 = { class: "plugin-c
29032
29038
  })) : P("", !0)
29033
29039
  ], 2));
29034
29040
  }
29035
- }), Ql = /* @__PURE__ */ dr(P9, [["__scopeId", "data-v-dca2ba4f"]]), F9 = (e) => (t) => {
29041
+ }), Ql = /* @__PURE__ */ dr(P9, [["__scopeId", "data-v-dd0580c9"]]), F9 = (e) => (t) => {
29036
29042
  const n = t.target, r = (n == null ? void 0 : n.nodeName) === "INPUT" ? "[type=radio]" : "[role=radio]", o = e.$el.querySelectorAll(r), i = o.length, l = [].indexOf.call(o, n), a = e.$el.querySelectorAll("[role=radio]");
29037
29043
  switch (t.keyCode) {
29038
29044
  case be.ArrowDown: