@opentiny/tiny-robot 0.4.2-alpha.6 → 0.4.2-alpha.7

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.
Files changed (260) hide show
  1. package/dist/action-group/index.js +4 -4
  2. package/dist/anchor/index.js +44 -44
  3. package/dist/drag-overlay/index.js +1 -1
  4. package/dist/dropdown-menu/index.js +1 -1
  5. package/dist/index.d.ts +5018 -49
  6. package/dist/index.js +3 -3
  7. package/dist/index2.js +2 -2
  8. package/dist/index4.js +20 -20
  9. package/dist/index6.js +142 -143
  10. package/dist/index7.js +28 -28
  11. package/dist/index8.js +8 -8
  12. package/dist/sender/index.js +2 -2
  13. package/dist/sender-actions/index.js +1 -1
  14. package/dist/style.css +1 -1
  15. package/dist/suggestion-pills/index.js +1 -1
  16. package/dist/suggestion-popover/index.js +1 -1
  17. package/dist/theme-provider/index.js +41 -32
  18. package/dist/useSlotRefs.js +1 -1
  19. package/dist/utils.js +1 -1
  20. package/package.json +3 -22
  21. package/dist/action-group/ActionGroup.vue.d.ts +0 -26
  22. package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
  23. package/dist/action-group/index.d.ts +0 -12
  24. package/dist/action-group/index.type.d.ts +0 -17
  25. package/dist/anchor/components/AnchorItem.vue.d.ts +0 -24
  26. package/dist/anchor/components/AnchorList.vue.d.ts +0 -20
  27. package/dist/anchor/components/AnchorOverlay.vue.d.ts +0 -33
  28. package/dist/anchor/components/AnchorSearch.vue.d.ts +0 -7
  29. package/dist/anchor/composables/index.d.ts +0 -5
  30. package/dist/anchor/composables/useActiveSync.d.ts +0 -10
  31. package/dist/anchor/composables/useFloatingOffset.d.ts +0 -6
  32. package/dist/anchor/composables/useNavController.d.ts +0 -12
  33. package/dist/anchor/composables/useOverlayInteractions.d.ts +0 -6
  34. package/dist/anchor/composables/useTargetFeedback.d.ts +0 -5
  35. package/dist/anchor/defaults.d.ts +0 -16
  36. package/dist/anchor/index.d.ts +0 -7
  37. package/dist/anchor/index.type.d.ts +0 -60
  38. package/dist/anchor/index.vue.d.ts +0 -159
  39. package/dist/anchor/internal.type.d.ts +0 -103
  40. package/dist/anchor/utils/scroll.d.ts +0 -7
  41. package/dist/anchor/utils/target.d.ts +0 -6
  42. package/dist/attachments/components/FileCard.vue.d.ts +0 -18
  43. package/dist/attachments/components/ImagePreview.vue.d.ts +0 -17
  44. package/dist/attachments/components/index.d.ts +0 -2
  45. package/dist/attachments/composables/index.d.ts +0 -5
  46. package/dist/attachments/composables/useFileCard.d.ts +0 -15
  47. package/dist/attachments/composables/useFileType.d.ts +0 -20
  48. package/dist/attachments/composables/useImagePreview.d.ts +0 -18
  49. package/dist/attachments/composables/useListType.d.ts +0 -11
  50. package/dist/attachments/index.d.ts +0 -7
  51. package/dist/attachments/index.type.d.ts +0 -70
  52. package/dist/attachments/index.vue.d.ts +0 -27
  53. package/dist/attachments/utils.d.ts +0 -3
  54. package/dist/base-popper/components/Popper.vue.d.ts +0 -28
  55. package/dist/base-popper/index.d.ts +0 -2
  56. package/dist/base-popper/index.vue.d.ts +0 -41
  57. package/dist/bubble/Bubble.vue.d.ts +0 -39
  58. package/dist/bubble/BubbleBoxWrapper.vue.d.ts +0 -22
  59. package/dist/bubble/BubbleContentWrapper.vue.d.ts +0 -16
  60. package/dist/bubble/BubbleItem.vue.d.ts +0 -36
  61. package/dist/bubble/BubbleList.vue.d.ts +0 -41
  62. package/dist/bubble/BubbleProvider.vue.d.ts +0 -18
  63. package/dist/bubble/composables/index.d.ts +0 -10
  64. package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +0 -18
  65. package/dist/bubble/composables/useBubbleContentRenderer.d.ts +0 -18
  66. package/dist/bubble/composables/useBubbleStateChange.d.ts +0 -2
  67. package/dist/bubble/composables/useBubbleStore.d.ts +0 -16
  68. package/dist/bubble/composables/useContentResolver.d.ts +0 -5
  69. package/dist/bubble/composables/useCopyCleanup.d.ts +0 -6
  70. package/dist/bubble/composables/useMessageContent.d.ts +0 -5
  71. package/dist/bubble/composables/useMessageGroup.d.ts +0 -4
  72. package/dist/bubble/composables/useOmitMessageFields.d.ts +0 -12
  73. package/dist/bubble/composables/useToolCall.d.ts +0 -25
  74. package/dist/bubble/constants.d.ts +0 -42
  75. package/dist/bubble/index.d.ts +0 -19
  76. package/dist/bubble/index.type.d.ts +0 -171
  77. package/dist/bubble/renderers/Box.vue.d.ts +0 -18
  78. package/dist/bubble/renderers/Image.vue.d.ts +0 -4
  79. package/dist/bubble/renderers/Loading.vue.d.ts +0 -4
  80. package/dist/bubble/renderers/Markdown.vue.d.ts +0 -4
  81. package/dist/bubble/renderers/Reasoning.vue.d.ts +0 -9
  82. package/dist/bubble/renderers/Text.vue.d.ts +0 -4
  83. package/dist/bubble/renderers/Tool.vue.d.ts +0 -14
  84. package/dist/bubble/renderers/ToolRole.vue.d.ts +0 -4
  85. package/dist/bubble/renderers/Tools.vue.d.ts +0 -4
  86. package/dist/bubble/renderers/allRenderers.d.ts +0 -93
  87. package/dist/bubble/renderers/defaultRenderers.d.ts +0 -27
  88. package/dist/bubble/utils.d.ts +0 -7
  89. package/dist/chat/components/ChatConversation.vue.d.ts +0 -267
  90. package/dist/chat/components/ChatLauncherButton.vue.d.ts +0 -12
  91. package/dist/chat/components/ChatMcpTrigger.vue.d.ts +0 -30
  92. package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +0 -6
  93. package/dist/chat/components/ChatWelcome.vue.d.ts +0 -14
  94. package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +0 -7
  95. package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +0 -7
  96. package/dist/chat/components/icons/index.d.ts +0 -5
  97. package/dist/chat/composables/useChatConversation.d.ts +0 -37
  98. package/dist/chat/composables/useChatMcp.d.ts +0 -29
  99. package/dist/chat/composables/useChatModel.d.ts +0 -27
  100. package/dist/chat/index.d.ts +0 -9
  101. package/dist/chat/index.js +0 -13902
  102. package/dist/chat/index.type.d.ts +0 -92
  103. package/dist/chat/index.vue.d.ts +0 -51
  104. package/dist/chat/locale.d.ts +0 -12
  105. package/dist/chat/mcpServers.d.ts +0 -3
  106. package/dist/container/index.d.ts +0 -7
  107. package/dist/container/index.type.d.ts +0 -20
  108. package/dist/container/index.vue.d.ts +0 -32
  109. package/dist/conversations/index.d.ts +0 -7
  110. package/dist/conversations/index.vue.d.ts +0 -2
  111. package/dist/drag-overlay/constants.d.ts +0 -17
  112. package/dist/drag-overlay/directives/vDropzone.d.ts +0 -14
  113. package/dist/drag-overlay/index.d.ts +0 -7
  114. package/dist/drag-overlay/index.type.d.ts +0 -105
  115. package/dist/drag-overlay/index.vue.d.ts +0 -20
  116. package/dist/dropdown-menu/composables/usePopperHover.d.ts +0 -6
  117. package/dist/dropdown-menu/index.d.ts +0 -7
  118. package/dist/dropdown-menu/index.type.d.ts +0 -42
  119. package/dist/dropdown-menu/index.vue.d.ts +0 -217
  120. package/dist/feedback/components/SourceList.vue.d.ts +0 -11
  121. package/dist/feedback/components/index.d.ts +0 -1
  122. package/dist/feedback/index.d.ts +0 -7
  123. package/dist/feedback/index.type.d.ts +0 -25
  124. package/dist/feedback/index.vue.d.ts +0 -13
  125. package/dist/flow-layout-buttons/index.d.ts +0 -7
  126. package/dist/flow-layout-buttons/index.type.d.ts +0 -35
  127. package/dist/flow-layout-buttons/index.vue.d.ts +0 -22
  128. package/dist/history/components/Empty.vue.d.ts +0 -7
  129. package/dist/history/components/MenuList.vue.d.ts +0 -24
  130. package/dist/history/composables/useRenameEditor.d.ts +0 -22
  131. package/dist/history/constants.d.ts +0 -1
  132. package/dist/history/index.d.ts +0 -7
  133. package/dist/history/index.type.d.ts +0 -33
  134. package/dist/history/index.vue.d.ts +0 -18
  135. package/dist/icon-button/index.d.ts +0 -7
  136. package/dist/icon-button/index.type.d.ts +0 -7
  137. package/dist/icon-button/index.vue.d.ts +0 -6
  138. package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +0 -9
  139. package/dist/mcp-add-form/components/FormEditor.vue.d.ts +0 -10
  140. package/dist/mcp-add-form/components/index.d.ts +0 -2
  141. package/dist/mcp-add-form/index.d.ts +0 -7
  142. package/dist/mcp-add-form/index.type.d.ts +0 -19
  143. package/dist/mcp-add-form/index.vue.d.ts +0 -13
  144. package/dist/mcp-server-picker/components/NoData.vue.d.ts +0 -7
  145. package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +0 -40
  146. package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +0 -15
  147. package/dist/mcp-server-picker/components/index.d.ts +0 -3
  148. package/dist/mcp-server-picker/index.d.ts +0 -7
  149. package/dist/mcp-server-picker/index.type.d.ts +0 -99
  150. package/dist/mcp-server-picker/index.vue.d.ts +0 -71
  151. package/dist/prompts/index.d.ts +0 -12
  152. package/dist/prompts/index.type.d.ts +0 -59
  153. package/dist/prompts/prompt.vue.d.ts +0 -5
  154. package/dist/prompts/prompts.vue.d.ts +0 -20
  155. package/dist/sender/components/editor-content/index.vue.d.ts +0 -4
  156. package/dist/sender/components/footer/index.vue.d.ts +0 -38
  157. package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +0 -43
  158. package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +0 -32
  159. package/dist/sender/composables/index.d.ts +0 -7
  160. package/dist/sender/composables/useAutoSize.d.ts +0 -5
  161. package/dist/sender/composables/useEditor.d.ts +0 -13
  162. package/dist/sender/composables/useKeyboardShortcuts.d.ts +0 -7
  163. package/dist/sender/composables/useModeSwitch.d.ts +0 -4
  164. package/dist/sender/composables/useSenderCore.d.ts +0 -31
  165. package/dist/sender/composables/useSlotScope.d.ts +0 -10
  166. package/dist/sender/context/index.d.ts +0 -6
  167. package/dist/sender/context/types.d.ts +0 -7
  168. package/dist/sender/extensions/constants.d.ts +0 -94
  169. package/dist/sender/extensions/index.d.ts +0 -12
  170. package/dist/sender/extensions/mention/commands.d.ts +0 -20
  171. package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +0 -18
  172. package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +0 -19
  173. package/dist/sender/extensions/mention/extension.d.ts +0 -6
  174. package/dist/sender/extensions/mention/index.d.ts +0 -22
  175. package/dist/sender/extensions/mention/plugin.d.ts +0 -16
  176. package/dist/sender/extensions/mention/types.d.ts +0 -126
  177. package/dist/sender/extensions/mention/utils.d.ts +0 -34
  178. package/dist/sender/extensions/suggestion/extension.d.ts +0 -8
  179. package/dist/sender/extensions/suggestion/index.d.ts +0 -20
  180. package/dist/sender/extensions/suggestion/plugin.d.ts +0 -21
  181. package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +0 -46
  182. package/dist/sender/extensions/suggestion/types.d.ts +0 -254
  183. package/dist/sender/extensions/suggestion/utils/filter.d.ts +0 -29
  184. package/dist/sender/extensions/suggestion/utils/highlight.d.ts +0 -73
  185. package/dist/sender/extensions/template/block/extension.d.ts +0 -6
  186. package/dist/sender/extensions/template/block/plugins.d.ts +0 -13
  187. package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +0 -14
  188. package/dist/sender/extensions/template/commands.d.ts +0 -31
  189. package/dist/sender/extensions/template/extension.d.ts +0 -6
  190. package/dist/sender/extensions/template/index.d.ts +0 -21
  191. package/dist/sender/extensions/template/select/dropdown-manager.d.ts +0 -23
  192. package/dist/sender/extensions/template/select/extension.d.ts +0 -5
  193. package/dist/sender/extensions/template/select/plugins.d.ts +0 -34
  194. package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +0 -20
  195. package/dist/sender/extensions/template/types.d.ts +0 -100
  196. package/dist/sender/extensions/template/utils.d.ts +0 -20
  197. package/dist/sender/extensions/utils/id-generator.d.ts +0 -16
  198. package/dist/sender/extensions/utils/index.d.ts +0 -7
  199. package/dist/sender/extensions/utils/keyboard.d.ts +0 -49
  200. package/dist/sender/extensions/utils/position.d.ts +0 -25
  201. package/dist/sender/index.d.ts +0 -136
  202. package/dist/sender/index.type.d.ts +0 -302
  203. package/dist/sender/index.vue.d.ts +0 -90
  204. package/dist/sender/types/base.d.ts +0 -239
  205. package/dist/sender/types/components.d.ts +0 -68
  206. package/dist/sender/types/composables.d.ts +0 -122
  207. package/dist/sender/types/context.d.ts +0 -132
  208. package/dist/sender/types/slots.d.ts +0 -67
  209. package/dist/sender/utils/countGraphemes.d.ts +0 -1
  210. package/dist/sender-actions/action-button/index.vue.d.ts +0 -23
  211. package/dist/sender-actions/clear-button/index.vue.d.ts +0 -2
  212. package/dist/sender-actions/clear-button/useClearButtonState.d.ts +0 -6
  213. package/dist/sender-actions/default-actions/index.vue.d.ts +0 -17
  214. package/dist/sender-actions/index.d.ts +0 -21
  215. package/dist/sender-actions/index.type.d.ts +0 -7
  216. package/dist/sender-actions/submit-button/index.vue.d.ts +0 -2
  217. package/dist/sender-actions/types/common.d.ts +0 -40
  218. package/dist/sender-actions/types/index.d.ts +0 -5
  219. package/dist/sender-actions/types/tooltip.d.ts +0 -7
  220. package/dist/sender-actions/upload-button/index.type.d.ts +0 -57
  221. package/dist/sender-actions/upload-button/index.vue.d.ts +0 -16
  222. package/dist/sender-actions/utils/tooltip.d.ts +0 -8
  223. package/dist/sender-actions/voice-button/index.type.d.ts +0 -78
  224. package/dist/sender-actions/voice-button/index.vue.d.ts +0 -43
  225. package/dist/sender-actions/voice-button/speech.types.d.ts +0 -40
  226. package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +0 -10
  227. package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +0 -40
  228. package/dist/sender-actions/word-counter/index.vue.d.ts +0 -2
  229. package/dist/sender-compat/index.d.ts +0 -7
  230. package/dist/sender-compat/index.type.d.ts +0 -91
  231. package/dist/sender-compat/index.vue.d.ts +0 -532
  232. package/dist/shared/composables/createTeleport.d.ts +0 -2
  233. package/dist/shared/composables/index.d.ts +0 -5
  234. package/dist/shared/composables/useAutoScroll.d.ts +0 -25
  235. package/dist/shared/composables/useSlotRefs.d.ts +0 -12
  236. package/dist/shared/composables/useTeleportTarget.d.ts +0 -11
  237. package/dist/shared/composables/useTouchDevice.d.ts +0 -3
  238. package/dist/shared/utils.d.ts +0 -7
  239. package/dist/suggestion-pills/components/PillButton.vue.d.ts +0 -16
  240. package/dist/suggestion-pills/components/index.d.ts +0 -1
  241. package/dist/suggestion-pills/index.d.ts +0 -13
  242. package/dist/suggestion-pills/index.type.d.ts +0 -45
  243. package/dist/suggestion-pills/index.vue.d.ts +0 -44
  244. package/dist/suggestion-popover/components/Backdrop.vue.d.ts +0 -5
  245. package/dist/suggestion-popover/components/Header.vue.d.ts +0 -4
  246. package/dist/suggestion-popover/components/Loading.vue.d.ts +0 -17
  247. package/dist/suggestion-popover/components/NoData.vue.d.ts +0 -17
  248. package/dist/suggestion-popover/components/Tooltip.vue.d.ts +0 -19
  249. package/dist/suggestion-popover/index.d.ts +0 -7
  250. package/dist/suggestion-popover/index.type.d.ts +0 -80
  251. package/dist/suggestion-popover/index.vue.d.ts +0 -262
  252. package/dist/theme-provider/constants.d.ts +0 -6
  253. package/dist/theme-provider/index.d.ts +0 -9
  254. package/dist/theme-provider/index.type.d.ts +0 -18
  255. package/dist/theme-provider/index.vue.d.ts +0 -32
  256. package/dist/theme-provider/useTheme.d.ts +0 -11
  257. package/dist/useTheme.js +0 -22
  258. package/dist/welcome/index.d.ts +0 -7
  259. package/dist/welcome/index.type.d.ts +0 -10
  260. package/dist/welcome/index.vue.d.ts +0 -18
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as J, useSlots as K, computed as i, openBlock as a, createElementBlock as m, normalizeClass as w, renderSlot as H, createBlock as S, resolveDynamicComponent as A, toDisplayString as ne, createCommentVNode as M, useModel as le, ref as d, watch as R, nextTick as N, createElementVNode as $, Fragment as D, renderList as z, isVNode as G, createVNode as U, Transition as se, withCtx as re, unref as ae, mergeModels as j } from "vue";
2
2
  import { IconArrowUp as ie } from "@opentiny/tiny-robot-svgs";
3
- import { c as ce, u as q, w as ue, o as fe, d as de } from "../index4.js";
3
+ import { c as ce, a as q, f as ue, o as fe, g as de } from "../index4.js";
4
4
  import { u as me } from "../useSlotRefs.js";
5
5
  import { _ as Q } from "../_plugin-vue_export-helper.js";
6
6
  const pe = { key: 0 }, ge = /* @__PURE__ */ J({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as h, openBlock as o, createElementBlock as C, createCommentVNode as z, createBlock as E, resolveDynamicComponent as wA, createVNode as a, unref as c, createElementVNode as r, toDisplayString as X, renderSlot as i, useModel as N, ref as P, computed as l, watch as y, Transition as nA, withCtx as p, normalizeStyle as x, normalizeClass as b, mergeModels as V, Fragment as lA, renderList as QA, createTextVNode as sA } from "vue";
2
2
  import { IconSparkles as vA, IconNoData as cA, IconClose as iA } from "@opentiny/tiny-robot-svgs";
3
- import { b as CA, f as rA, j as FA, m as HA, c as EA, o as aA } from "../index4.js";
3
+ import { d as CA, k as rA, l as FA, w as HA, c as EA, o as aA } from "../index4.js";
4
4
  import { u as IA, c as kA, B as dA } from "../index8.js";
5
5
  import uA from "../flow-layout-buttons/index.js";
6
6
  import UA from "../icon-button/index.js";
@@ -1,9 +1,7 @@
1
- import { defineComponent as M, useModel as h, ref as g, onUnmounted as E, computed as T, provide as d, watchEffect as p, watch as f, renderSlot as v, mergeModels as O } from "vue";
2
- import { T as D, C as y, R as _, S, b as C, a as R } from "../useTheme.js";
3
- import { u as N } from "../useTheme.js";
4
- const l = /* @__PURE__ */ M({
1
+ import { defineComponent as C, useModel as f, ref as O, onUnmounted as S, computed as D, provide as m, watchEffect as _, watch as g, renderSlot as w, mergeModels as b, inject as u, readonly as v } from "vue";
2
+ const k = "data-tr-theme", A = "data-tr-color-mode", y = Symbol("theme"), E = Symbol("colorMode"), T = Symbol("resolvedColorMode"), p = Symbol("systemColorMode"), i = /* @__PURE__ */ C({
5
3
  __name: "index",
6
- props: /* @__PURE__ */ O({
4
+ props: /* @__PURE__ */ b({
7
5
  colorMode: {},
8
6
  targetElement: { default: "html" },
9
7
  theme: {},
@@ -20,7 +18,7 @@ const l = /* @__PURE__ */ M({
20
18
  }),
21
19
  emits: ["update:theme", "update:colorMode"],
22
20
  setup(o) {
23
- const t = o, c = () => {
21
+ const t = o, r = () => {
24
22
  if (!t.storage) return {};
25
23
  let e = {};
26
24
  try {
@@ -28,47 +26,58 @@ const l = /* @__PURE__ */ M({
28
26
  } catch {
29
27
  }
30
28
  return e;
31
- }, u = (e) => {
29
+ }, d = (e) => {
32
30
  if (!t.storage) return;
33
- const m = { ...c(), ...e };
34
- t.storage.setItem(t.storageKey, JSON.stringify(m));
35
- }, r = h(o, "theme"), a = h(o, "colorMode");
31
+ const h = { ...r(), ...e };
32
+ t.storage.setItem(t.storageKey, JSON.stringify(h));
33
+ }, n = f(o, "theme"), a = f(o, "colorMode");
36
34
  if (t.storage) {
37
- const e = c();
38
- typeof e.theme == "string" && (r.value = e.theme), (e.colorMode === "auto" || e.colorMode === "light" || e.colorMode === "dark") && (a.value = e.colorMode);
35
+ const e = r();
36
+ typeof e.theme == "string" && (n.value = e.theme), (e.colorMode === "auto" || e.colorMode === "light" || e.colorMode === "dark") && (a.value = e.colorMode);
39
37
  }
40
- const n = g("light");
38
+ const s = O("light");
41
39
  if (typeof window < "u") {
42
40
  const e = window.matchMedia("(prefers-color-scheme: dark)");
43
- n.value = e.matches ? "dark" : "light";
44
- const s = (m) => {
45
- n.value = m.matches ? "dark" : "light";
41
+ s.value = e.matches ? "dark" : "light";
42
+ const c = (h) => {
43
+ s.value = h.matches ? "dark" : "light";
46
44
  };
47
- e.addEventListener("change", s), E(() => {
48
- e.removeEventListener("change", s);
45
+ e.addEventListener("change", c), S(() => {
46
+ e.removeEventListener("change", c);
49
47
  });
50
48
  }
51
- const i = T(() => a.value === "auto" ? n.value : a.value);
52
- return d(D, r), d(y, a), d(_, i), d(S, n), p(
49
+ const l = D(() => a.value === "auto" ? s.value : a.value);
50
+ return m(y, n), m(E, a), m(T, l), m(p, s), _(
53
51
  () => {
54
52
  if (typeof document > "u") return;
55
53
  const e = document.querySelector(t.targetElement);
56
- e && (e.setAttribute(C, r.value), e.setAttribute(R, i.value));
54
+ e && (e.setAttribute(k, n.value), e.setAttribute(A, l.value));
57
55
  },
58
56
  { flush: "post" }
59
- ), f(r, (e) => {
60
- u({ theme: e });
61
- }), f(a, (e) => {
62
- u({ colorMode: e });
63
- }), (e, s) => v(e.$slots, "default");
57
+ ), g(n, (e) => {
58
+ d({ theme: e });
59
+ }), g(a, (e) => {
60
+ d({ colorMode: e });
61
+ }), (e, c) => w(e.$slots, "default");
64
62
  }
65
- });
66
- l.name = "TrThemeProvider";
67
- const k = function(o) {
68
- o.component(l.name, l);
63
+ }), M = "Theme context not available, cannot set theme data. Consider using ThemeProvider to wrap your app.", N = () => {
64
+ const o = u(y), t = u(E), r = u(T), d = u(p), n = (l) => o ? (o.value = l, !0) : (console.warn(M), !1), a = () => !t || !r ? (console.warn(M), !1) : (t.value = r.value === "light" ? "dark" : "light", !0), s = (l) => t ? (t.value = l, !0) : (console.warn(M), !1);
65
+ return {
66
+ theme: o,
67
+ colorMode: t,
68
+ resolvedColorMode: r ? v(r) : void 0,
69
+ systemColorMode: d ? v(d) : void 0,
70
+ setTheme: n,
71
+ toggleColorMode: a,
72
+ setColorMode: s
73
+ };
69
74
  };
70
- l.install = k;
75
+ i.name = "TrThemeProvider";
76
+ const R = function(o) {
77
+ o.component(i.name, i);
78
+ };
79
+ i.install = R;
71
80
  export {
72
- l as default,
81
+ i as default,
73
82
  N as useTheme
74
83
  };
@@ -1,4 +1,4 @@
1
- import { u as v } from "./index4.js";
1
+ import { a as v } from "./index4.js";
2
2
  import { computed as f, Fragment as d, ref as h, watch as p } from "vue";
3
3
  function E(l, i) {
4
4
  const u = f(() => {
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as i } from "./index4.js";
1
+ import { u as i } from "./index4.js";
2
2
  function e(t) {
3
3
  if (typeof t == "number") return `${t}px`;
4
4
  const r = t == null ? void 0 : t.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-robot",
3
- "version": "0.4.2-alpha.6",
3
+ "version": "0.4.2-alpha.7",
4
4
  "license": "MIT",
5
5
  "description": "TinyRobot 是一个 AI 对话组件库,提供了丰富的 AI 交互组件,助力开发者快速构建企业级 AI 应用;同时也是一个智能助手,支持普通 AI 问答、也支持集成 MCP Server,让 AI 真正帮人“干活”。",
6
6
  "homepage": "https://docs.opentiny.design/tiny-robot/",
@@ -35,23 +35,6 @@
35
35
  "type": "module",
36
36
  "main": "./dist/index.js",
37
37
  "module": "./dist/index.js",
38
- "types": "./dist/index.d.ts",
39
- "exports": {
40
- ".": {
41
- "types": "./dist/index.d.ts",
42
- "import": "./dist/index.js"
43
- },
44
- "./experimental": {
45
- "types": "./dist/chat/index.d.ts",
46
- "import": "./dist/chat/index.js"
47
- },
48
- "./chat": null,
49
- "./dist/style.css": "./dist/style.css",
50
- "./*": {
51
- "types": "./dist/*/index.d.ts",
52
- "import": "./dist/*/index.js"
53
- }
54
- },
55
38
  "sideEffects": [
56
39
  "**/*.css"
57
40
  ],
@@ -71,9 +54,7 @@
71
54
  },
72
55
  "dependencies": {
73
56
  "@floating-ui/dom": "^1.6.0",
74
- "@modelcontextprotocol/sdk": "^1.18.1",
75
- "@opentiny/tiny-robot-kit": "0.4.2-alpha.6",
76
- "@opentiny/tiny-robot-svgs": "0.4.2-alpha.6",
57
+ "@opentiny/tiny-robot-svgs": "0.4.2-alpha.7",
77
58
  "@opentiny/vue": "^3.20.0",
78
59
  "@tiptap/core": "3.17.1",
79
60
  "@tiptap/extension-character-count": "3.17.1",
@@ -109,5 +90,5 @@
109
90
  "@tiptap/extension-bubble-menu": "3.17.1",
110
91
  "@tiptap/extension-floating-menu": "3.17.1"
111
92
  },
112
- "gitHead": "9c5e401df9d908c7c30fe1ec9887061b9e8160a9"
93
+ "gitHead": "6713e6fd0f9a7239d940e5402fec6b8d81bce365"
113
94
  }
@@ -1,26 +0,0 @@
1
- import { ActionGroupProps, ActionGroupSlots } from './index.type';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: Readonly<ActionGroupSlots> & ActionGroupSlots;
5
- refs: {
6
- moreBtnRef: HTMLSpanElement;
7
- dropDownRef: HTMLUListElement;
8
- };
9
- rootEl: HTMLDivElement;
10
- };
11
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<ActionGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
- "item-click": (name: string) => any;
14
- }, string, import('vue').PublicProps, Readonly<ActionGroupProps> & Readonly<{
15
- "onItem-click"?: ((name: string) => any) | undefined;
16
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
17
- moreBtnRef: HTMLSpanElement;
18
- dropDownRef: HTMLUListElement;
19
- }, HTMLDivElement>;
20
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
- export default _default;
22
- type __VLS_WithTemplateSlots<T, S> = T & {
23
- new (): {
24
- $slots: S;
25
- };
26
- };
@@ -1,18 +0,0 @@
1
- import { ActionGroupItemProps } from './index.type';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {}): any;
6
- };
7
- refs: {};
8
- rootEl: any;
9
- };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<ActionGroupItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ActionGroupItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
- export default _default;
14
- type __VLS_WithTemplateSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
@@ -1,12 +0,0 @@
1
- import { App } from 'vue';
2
- import { default as ActionGroup } from './ActionGroup.vue';
3
- import { default as ActionGroupItemComp } from './ActionGroupItem.vue';
4
- declare const install: <T>(app: App<T>) => void;
5
- declare const _default: typeof ActionGroup & {
6
- install: typeof install;
7
- };
8
- export default _default;
9
- declare const installActionGroupItem: <T>(app: App<T>) => void;
10
- export declare const ActionGroupItem: typeof ActionGroupItemComp & {
11
- install: typeof installActionGroupItem;
12
- };
@@ -1,17 +0,0 @@
1
- import { VNode } from 'vue';
2
- export interface ActionGroupProps {
3
- maxNum?: number;
4
- showTooltip?: boolean;
5
- dropDownShowLabelOnly?: boolean;
6
- }
7
- export interface ActionGroupEvents {
8
- (e: 'item-click', name: string): void;
9
- }
10
- export interface ActionGroupSlots {
11
- default: () => VNode | VNode[];
12
- moreBtn: () => VNode;
13
- }
14
- export interface ActionGroupItemProps {
15
- name: string;
16
- label: string;
17
- }
@@ -1,24 +0,0 @@
1
- import { AnchorItemProps, AnchorItemSlots } from '../internal.type';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: Readonly<AnchorItemSlots> & AnchorItemSlots;
5
- refs: {
6
- itemButtonRef: HTMLButtonElement;
7
- };
8
- rootEl: HTMLLIElement;
9
- };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<AnchorItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- select: (item: import('../index.type').AnchorItem) => any;
13
- }, string, import('vue').PublicProps, Readonly<AnchorItemProps> & Readonly<{
14
- onSelect?: ((item: import('../index.type').AnchorItem) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16
- itemButtonRef: HTMLButtonElement;
17
- }, HTMLLIElement>;
18
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
- export default _default;
20
- type __VLS_WithTemplateSlots<T, S> = T & {
21
- new (): {
22
- $slots: S;
23
- };
24
- };
@@ -1,20 +0,0 @@
1
- import { AnchorListProps, AnchorListSlots } from '../internal.type';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: Readonly<AnchorListSlots> & AnchorListSlots;
5
- refs: {};
6
- rootEl: HTMLUListElement;
7
- };
8
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
- declare const __VLS_component: import('vue').DefineComponent<AnchorListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
- select: (item: import('../index.type').AnchorItem) => any;
11
- }, string, import('vue').PublicProps, Readonly<AnchorListProps> & Readonly<{
12
- onSelect?: ((item: import('../index.type').AnchorItem) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLUListElement>;
14
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
- export default _default;
16
- type __VLS_WithTemplateSlots<T, S> = T & {
17
- new (): {
18
- $slots: S;
19
- };
20
- };
@@ -1,33 +0,0 @@
1
- import { AnchorOverlayProps } from '../internal.type';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- search?(_: {}): any;
6
- default?(_: {}): any;
7
- };
8
- refs: {
9
- hostEl: HTMLDivElement;
10
- overlayEl: HTMLDivElement;
11
- navEl: HTMLElement;
12
- };
13
- rootEl: HTMLDivElement;
14
- };
15
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: import('vue').DefineComponent<AnchorOverlayProps, {
17
- hostEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
18
- overlayEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
19
- navEl: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
20
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AnchorOverlayProps> & Readonly<{}>, {
21
- floatingOffset: number;
22
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
23
- hostEl: HTMLDivElement;
24
- overlayEl: HTMLDivElement;
25
- navEl: HTMLElement;
26
- }, HTMLDivElement>;
27
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
- export default _default;
29
- type __VLS_WithTemplateSlots<T, S> = T & {
30
- new (): {
31
- $slots: S;
32
- };
33
- };
@@ -1,7 +0,0 @@
1
- import { AnchorSearchProps } from '../internal.type';
2
- declare const _default: import('vue').DefineComponent<AnchorSearchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
- "update:searchQuery": (value: string) => any;
4
- }, string, import('vue').PublicProps, Readonly<AnchorSearchProps> & Readonly<{
5
- "onUpdate:searchQuery"?: ((value: string) => any) | undefined;
6
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
7
- export default _default;
@@ -1,5 +0,0 @@
1
- export * from './useNavController';
2
- export * from './useActiveSync';
3
- export * from './useFloatingOffset';
4
- export * from './useOverlayInteractions';
5
- export * from './useTargetFeedback';
@@ -1,10 +0,0 @@
1
- import { AnchorActiveSyncOptions } from '../internal.type';
2
- export declare function useActiveSync(options: AnchorActiveSyncOptions): {
3
- activeId: import('vue').ComputedRef<string | undefined>;
4
- scrollTo: (id: string) => void;
5
- sync: () => void;
6
- clearPendingScroll: () => void;
7
- releaseSelectionLock: () => void;
8
- handleUserScrollIntent: () => void;
9
- handleScrollIntentKeydown: (event: KeyboardEvent) => void;
10
- };
@@ -1,6 +0,0 @@
1
- import { AnchorFloatingOffsetOptions } from '../internal.type';
2
- export declare function useFloatingOffset(options: AnchorFloatingOffsetOptions): {
3
- offset: import('vue').Ref<number, number>;
4
- sync: () => void;
5
- resizeTargets: import('vue').ComputedRef<HTMLElement[]>;
6
- };
@@ -1,12 +0,0 @@
1
- import { AnchorControllerOptions, AnchorFilteredItem } from '../internal.type';
2
- export declare function useNavController(options: AnchorControllerOptions): {
3
- expanded: import('vue').ComputedRef<boolean>;
4
- searchQuery: import('vue').ComputedRef<string>;
5
- filteredItems: import('vue').ComputedRef<AnchorFilteredItem[]>;
6
- highlightedIndex: import('vue').ComputedRef<number>;
7
- highlightedId: import('vue').ComputedRef<string>;
8
- setExpanded: (value: boolean) => void;
9
- setSearchQuery: (value: string) => void;
10
- getHighlightedItem: () => import('../index.type').AnchorItem;
11
- handleNavigationKeydown: (event: KeyboardEvent) => boolean;
12
- };
@@ -1,6 +0,0 @@
1
- import { AnchorOverlayInteractionsOptions } from '../internal.type';
2
- export declare function useOverlayInteractions(options: AnchorOverlayInteractionsOptions): {
3
- handleKeydown: (event: KeyboardEvent) => void;
4
- handleMouseLeave: () => void;
5
- handleFocusOut: (event: FocusEvent) => void;
6
- };
@@ -1,5 +0,0 @@
1
- import { AnchorTargetFeedbackOptions } from '../internal.type';
2
- export declare function useTargetFeedback(options: AnchorTargetFeedbackOptions): {
3
- activate: (id: string) => void;
4
- clear: () => void;
5
- };
@@ -1,16 +0,0 @@
1
- import { AnchorHighlightSegment, AnchorItem, AnchorSearchMatcher } from './index.type';
2
- export declare const defaultAnchorSearchMatcher: AnchorSearchMatcher;
3
- export declare function defaultAnchorActiveResolver(options: {
4
- viewport: {
5
- top: number;
6
- scrollTop: number;
7
- clientHeight: number;
8
- scrollHeight: number;
9
- };
10
- anchors: Array<{
11
- id: string;
12
- el: HTMLElement;
13
- }>;
14
- activeOffset?: number;
15
- }): string | undefined;
16
- export declare function ensureAnchorSegments(item: AnchorItem, segments: false | AnchorHighlightSegment[]): AnchorHighlightSegment[];
@@ -1,7 +0,0 @@
1
- import { App } from 'vue';
2
- import { default as Anchor } from './index.vue';
3
- declare const install: <T>(app: App<T>) => void;
4
- declare const _default: typeof Anchor & {
5
- install: typeof install;
6
- };
7
- export default _default;
@@ -1,60 +0,0 @@
1
- import { VNode } from 'vue';
2
- export interface AnchorItem {
3
- id: string;
4
- label: string;
5
- searchText?: string;
6
- tooltipText?: string;
7
- meta?: Record<string, unknown>;
8
- }
9
- export interface AnchorHighlightSegment {
10
- text: string;
11
- highlighted: boolean;
12
- }
13
- export type AnchorSearchMatcher = (item: AnchorItem, searchQuery: string) => false | AnchorHighlightSegment[];
14
- export type AnchorPlacement = 'left' | 'right';
15
- export type AnchorExpandTrigger = 'hover' | 'manual';
16
- export interface AnchorSearchOptions {
17
- placeholder?: string;
18
- matcher?: AnchorSearchMatcher;
19
- clearOnCollapse?: boolean;
20
- }
21
- export interface AnchorProps {
22
- items: AnchorItem[];
23
- scrollContainer?: HTMLElement | null;
24
- activeId?: string;
25
- activeOffset?: number;
26
- expanded?: boolean;
27
- searchQuery?: string;
28
- placement?: AnchorPlacement;
29
- expandTrigger?: AnchorExpandTrigger;
30
- searchOptions?: AnchorSearchOptions;
31
- tooltipDelay?: number;
32
- targetFeedbackClass?: string;
33
- targetFeedbackDuration?: number;
34
- emptyText?: string;
35
- }
36
- export interface AnchorEmits {
37
- 'update:activeId': [value: string | undefined];
38
- 'update:expanded': [value: boolean];
39
- 'update:searchQuery': [value: string];
40
- select: [item: AnchorItem];
41
- }
42
- export interface AnchorSlots {
43
- item?: (slotProps: {
44
- item: AnchorItem;
45
- segments: AnchorHighlightSegment[];
46
- active: boolean;
47
- expanded: boolean;
48
- highlighted: boolean;
49
- }) => VNode | VNode[];
50
- marker?: (slotProps: {
51
- item: AnchorItem;
52
- active: boolean;
53
- }) => VNode | VNode[];
54
- search?: (slotProps: {
55
- searchQuery: string;
56
- setSearchQuery: (value: string) => void;
57
- searchOptions: AnchorSearchOptions;
58
- }) => VNode | VNode[];
59
- empty?: () => VNode | VNode[];
60
- }