@celljs/ta 4.14.0 → 4.15.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.
Files changed (410) hide show
  1. package/dist/cli.mjs +106 -7
  2. package/dist/gateway.mjs +156 -46
  3. package/dist/pi/CHANGELOG.md +13 -0
  4. package/dist/pi/package.json +1 -1
  5. package/dist/pi/packages/ta-3d/README.en.md +11 -0
  6. package/dist/pi/packages/ta-3d/README.md +11 -0
  7. package/dist/pi/packages/ta-3d/extension/index.mjs +120 -0
  8. package/dist/pi/packages/ta-3d/lib/extension.d.ts +15 -0
  9. package/dist/pi/packages/ta-3d/lib/extension.js +24 -0
  10. package/dist/pi/packages/ta-3d/lib/i18n.d.ts +19 -0
  11. package/dist/pi/packages/ta-3d/lib/i18n.js +50 -0
  12. package/dist/pi/packages/ta-3d/lib/index.d.ts +7 -0
  13. package/dist/pi/packages/ta-3d/lib/index.js +22 -0
  14. package/dist/pi/packages/ta-3d/lib/react.d.ts +8 -0
  15. package/dist/pi/packages/ta-3d/lib/react.js +8 -0
  16. package/dist/pi/packages/ta-3d/lib/scene-card.d.ts +4 -0
  17. package/dist/pi/packages/ta-3d/lib/scene-card.js +60 -0
  18. package/dist/pi/packages/ta-3d/lib/scene-prompt.d.ts +7 -0
  19. package/dist/pi/packages/ta-3d/lib/scene-prompt.js +15 -0
  20. package/dist/pi/packages/ta-3d/lib/scene-protocol.d.ts +5 -0
  21. package/dist/pi/packages/ta-3d/lib/scene-protocol.js +8 -0
  22. package/dist/pi/packages/ta-3d/lib/scene-spec.d.ts +59 -0
  23. package/dist/pi/packages/ta-3d/lib/scene-spec.js +141 -0
  24. package/dist/pi/packages/ta-3d/lib/scene-view.d.ts +57 -0
  25. package/dist/pi/packages/ta-3d/lib/scene-view.js +339 -0
  26. package/dist/pi/packages/ta-3d/lib/style.d.ts +4 -0
  27. package/dist/pi/packages/ta-3d/lib/style.js +33 -0
  28. package/dist/pi/packages/ta-3d/package.json +58 -0
  29. package/dist/pi/packages/ta-3d/web/index.js +660 -0
  30. package/dist/pi/packages/ta-agents/README.en.md +2 -2
  31. package/dist/pi/packages/ta-agents/README.md +2 -2
  32. package/dist/pi/packages/ta-agents/extension/index.mjs +248 -27
  33. package/dist/pi/packages/ta-agents/lib/acp-agent.d.ts +4 -0
  34. package/dist/pi/packages/ta-agents/lib/acp-agent.js +20 -2
  35. package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +14 -5
  36. package/dist/pi/packages/ta-agents/lib/acp-protocol.js +7 -0
  37. package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +13 -0
  38. package/dist/pi/packages/ta-agents/lib/agent-bindings.js +29 -4
  39. package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +2 -0
  40. package/dist/pi/packages/ta-agents/lib/agent-prompt.js +5 -0
  41. package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +16 -4
  42. package/dist/pi/packages/ta-agents/lib/agent-session.js +34 -4
  43. package/dist/pi/packages/ta-agents/lib/agent-sign-in.d.ts +28 -0
  44. package/dist/pi/packages/ta-agents/lib/agent-sign-in.js +62 -0
  45. package/dist/pi/packages/ta-agents/lib/agent-streamer.d.ts +7 -0
  46. package/dist/pi/packages/ta-agents/lib/agent-streamer.js +40 -3
  47. package/dist/pi/packages/ta-agents/lib/extension.js +12 -0
  48. package/dist/pi/packages/ta-agents/lib/texts.d.ts +86 -22
  49. package/dist/pi/packages/ta-agents/lib/texts.js +101 -21
  50. package/dist/pi/packages/ta-agents/package.json +7 -3
  51. package/dist/pi/packages/ta-bots/extension/index.mjs +81 -10
  52. package/dist/pi/packages/ta-bots/host/index.mjs +165 -53
  53. package/dist/pi/packages/ta-bots/lib/bot-service.d.ts +6 -0
  54. package/dist/pi/packages/ta-bots/lib/bot-service.js +27 -2
  55. package/dist/pi/packages/ta-bots/lib/bot-store.d.ts +8 -1
  56. package/dist/pi/packages/ta-bots/lib/bot-store.js +16 -2
  57. package/dist/pi/packages/ta-bots/lib/i18n.d.ts +3 -0
  58. package/dist/pi/packages/ta-bots/lib/i18n.js +167 -2
  59. package/dist/pi/packages/ta-bots/lib/server-texts.d.ts +0 -1
  60. package/dist/pi/packages/ta-bots/lib/server-texts.js +45 -12
  61. package/dist/pi/packages/ta-bots/lib/weixin-channel.js +3 -1
  62. package/dist/pi/packages/ta-bots/package.json +7 -3
  63. package/dist/pi/packages/ta-bots/web/index.js +203 -1
  64. package/dist/pi/packages/ta-changes/lib/i18n.d.ts +3 -0
  65. package/dist/pi/packages/ta-changes/lib/i18n.js +51 -2
  66. package/dist/pi/packages/ta-changes/package.json +7 -3
  67. package/dist/pi/packages/ta-changes/web/index.js +87 -1
  68. package/dist/pi/packages/ta-channels/extension/index.mjs +78 -13
  69. package/dist/pi/packages/ta-channels/host/index.mjs +121 -56
  70. package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +2 -1
  71. package/dist/pi/packages/ta-channels/lib/agent-cards.js +4 -3
  72. package/dist/pi/packages/ta-channels/lib/handoff.d.ts +5 -4
  73. package/dist/pi/packages/ta-channels/lib/handoff.js +22 -6
  74. package/dist/pi/packages/ta-channels/lib/i18n.d.ts +3 -0
  75. package/dist/pi/packages/ta-channels/lib/i18n.js +361 -2
  76. package/dist/pi/packages/ta-channels/lib/team-ask.d.ts +2 -1
  77. package/dist/pi/packages/ta-channels/lib/team-ask.js +19 -7
  78. package/dist/pi/packages/ta-channels/lib/team.d.ts +2 -2
  79. package/dist/pi/packages/ta-channels/lib/team.js +1 -1
  80. package/dist/pi/packages/ta-channels/package.json +7 -3
  81. package/dist/pi/packages/ta-channels/web/index.js +482 -47
  82. package/dist/pi/packages/ta-computer-use/extension/index.mjs +11 -1
  83. package/dist/pi/packages/ta-computer-use/lib/cua-driver-access.js +20 -2
  84. package/dist/pi/packages/ta-computer-use/package.json +7 -3
  85. package/dist/pi/packages/ta-cron/extension/index.mjs +82 -8
  86. package/dist/pi/packages/ta-cron/host/index.mjs +67 -3
  87. package/dist/pi/packages/ta-cron/lib/editor.js +1 -1
  88. package/dist/pi/packages/ta-cron/lib/i18n.d.ts +3 -0
  89. package/dist/pi/packages/ta-cron/lib/i18n.js +217 -2
  90. package/dist/pi/packages/ta-cron/lib/page.js +14 -4
  91. package/dist/pi/packages/ta-cron/lib/schedule-util.js +29 -3
  92. package/dist/pi/packages/ta-cron/lib/server-texts.d.ts +2 -1
  93. package/dist/pi/packages/ta-cron/lib/server-texts.js +16 -9
  94. package/dist/pi/packages/ta-cron/lib/tasks-view.js +4 -2
  95. package/dist/pi/packages/ta-cron/package.json +7 -3
  96. package/dist/pi/packages/ta-cron/web/index.js +302 -14
  97. package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +3 -0
  98. package/dist/pi/packages/ta-extensions/lib/i18n.js +240 -2
  99. package/dist/pi/packages/ta-extensions/package.json +7 -3
  100. package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +1 -0
  101. package/dist/pi/packages/ta-extensions/web/index.js +329 -42
  102. package/dist/pi/packages/ta-games/README.en.md +1 -1
  103. package/dist/pi/packages/ta-games/README.md +1 -1
  104. package/dist/pi/packages/ta-games/lib/i18n.d.ts +3 -0
  105. package/dist/pi/packages/ta-games/lib/i18n.js +61 -2
  106. package/dist/pi/packages/ta-games/package.json +7 -3
  107. package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +41 -3
  108. package/dist/pi/packages/ta-games/web/index.js +97 -1
  109. package/dist/pi/packages/ta-glance/extension/index.mjs +32 -13
  110. package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +2 -0
  111. package/dist/pi/packages/ta-glance/lib/glance-json.js +38 -16
  112. package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +1 -1
  113. package/dist/pi/packages/ta-glance/lib/glance-prompt.js +1 -0
  114. package/dist/pi/packages/ta-glance/lib/i18n.d.ts +3 -0
  115. package/dist/pi/packages/ta-glance/lib/i18n.js +31 -2
  116. package/dist/pi/packages/ta-glance/package.json +7 -3
  117. package/dist/pi/packages/ta-glance/web/index.js +98 -14
  118. package/dist/pi/packages/ta-initiative/extension/index.mjs +89 -9
  119. package/dist/pi/packages/ta-initiative/host/index.mjs +120 -19
  120. package/dist/pi/packages/ta-initiative/lib/chat-kinds.js +15 -3
  121. package/dist/pi/packages/ta-initiative/lib/cron-proposals.js +20 -3
  122. package/dist/pi/packages/ta-initiative/lib/event-proposals.d.ts +2 -1
  123. package/dist/pi/packages/ta-initiative/lib/event-proposals.js +20 -6
  124. package/dist/pi/packages/ta-initiative/lib/i18n.d.ts +3 -0
  125. package/dist/pi/packages/ta-initiative/lib/i18n.js +151 -2
  126. package/dist/pi/packages/ta-initiative/lib/inbox.js +49 -30
  127. package/dist/pi/packages/ta-initiative/lib/initiative-protocol.d.ts +13 -4
  128. package/dist/pi/packages/ta-initiative/lib/initiative-protocol.js +11 -1
  129. package/dist/pi/packages/ta-initiative/lib/initiative-service.js +1 -1
  130. package/dist/pi/packages/ta-initiative/lib/material-util.d.ts +2 -1
  131. package/dist/pi/packages/ta-initiative/lib/material-util.js +9 -3
  132. package/dist/pi/packages/ta-initiative/lib/review-service.js +1 -1
  133. package/dist/pi/packages/ta-initiative/lib/server-texts.d.ts +2 -1
  134. package/dist/pi/packages/ta-initiative/lib/server-texts.js +11 -4
  135. package/dist/pi/packages/ta-initiative/lib/settings.js +2 -3
  136. package/dist/pi/packages/ta-initiative/lib/style.d.ts +1 -1
  137. package/dist/pi/packages/ta-initiative/lib/style.js +27 -14
  138. package/dist/pi/packages/ta-initiative/package.json +7 -3
  139. package/dist/pi/packages/ta-initiative/web/index.js +289 -55
  140. package/dist/pi/packages/ta-launcher/lib/i18n.d.ts +3 -0
  141. package/dist/pi/packages/ta-launcher/lib/i18n.js +71 -2
  142. package/dist/pi/packages/ta-launcher/package.json +7 -3
  143. package/dist/pi/packages/ta-launcher/web/index.js +107 -1
  144. package/dist/pi/packages/ta-manual/README.en.md +1 -1
  145. package/dist/pi/packages/ta-manual/README.md +1 -1
  146. package/dist/pi/packages/ta-manual/lib/i18n.d.ts +3 -0
  147. package/dist/pi/packages/ta-manual/lib/i18n.js +21 -2
  148. package/dist/pi/packages/ta-manual/lib/manual-util.js +2 -1
  149. package/dist/pi/packages/ta-manual/lib/pictures-c.js +30 -0
  150. package/dist/pi/packages/ta-manual/lib/topics.d.ts +4 -0
  151. package/dist/pi/packages/ta-manual/lib/topics.js +188 -71
  152. package/dist/pi/packages/ta-manual/package.json +7 -3
  153. package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +9 -0
  154. package/dist/pi/packages/ta-manual/web/index.js +405 -119
  155. package/dist/pi/packages/ta-moments/extension/index.mjs +242 -102
  156. package/dist/pi/packages/ta-moments/host/index.mjs +268 -115
  157. package/dist/pi/packages/ta-moments/lib/i18n.d.ts +3 -0
  158. package/dist/pi/packages/ta-moments/lib/i18n.js +170 -3
  159. package/dist/pi/packages/ta-moments/lib/moments-host.js +24 -11
  160. package/dist/pi/packages/ta-moments/lib/page.js +4 -2
  161. package/dist/pi/packages/ta-moments/lib/server-texts.d.ts +10 -12
  162. package/dist/pi/packages/ta-moments/lib/server-texts.js +128 -62
  163. package/dist/pi/packages/ta-moments/lib/talk-host.js +29 -8
  164. package/dist/pi/packages/ta-moments/package.json +7 -3
  165. package/dist/pi/packages/ta-moments/web/index.js +260 -43
  166. package/dist/pi/packages/ta-nearby/extension/index.mjs +229 -32
  167. package/dist/pi/packages/ta-nearby/host/index.mjs +248 -35
  168. package/dist/pi/packages/ta-nearby/lib/i18n.d.ts +3 -0
  169. package/dist/pi/packages/ta-nearby/lib/i18n.js +173 -2
  170. package/dist/pi/packages/ta-nearby/lib/nearby-service.d.ts +2 -4
  171. package/dist/pi/packages/ta-nearby/lib/nearby-service.js +21 -3
  172. package/dist/pi/packages/ta-nearby/lib/page.js +6 -5
  173. package/dist/pi/packages/ta-nearby/lib/server-texts.d.ts +5 -13
  174. package/dist/pi/packages/ta-nearby/lib/server-texts.js +194 -42
  175. package/dist/pi/packages/ta-nearby/package.json +7 -3
  176. package/dist/pi/packages/ta-nearby/web/index.js +216 -9
  177. package/dist/pi/packages/ta-notify/extension/index.mjs +54 -5
  178. package/dist/pi/packages/ta-notify/lib/i18n.d.ts +3 -0
  179. package/dist/pi/packages/ta-notify/lib/i18n.js +53 -2
  180. package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +2 -1
  181. package/dist/pi/packages/ta-notify/lib/server-texts.js +16 -5
  182. package/dist/pi/packages/ta-notify/lib/settings.js +9 -2
  183. package/dist/pi/packages/ta-notify/package.json +7 -3
  184. package/dist/pi/packages/ta-notify/web/index.js +107 -7
  185. package/dist/pi/packages/ta-plot/README.en.md +12 -0
  186. package/dist/pi/packages/ta-plot/README.md +12 -0
  187. package/dist/pi/packages/ta-plot/extension/index.mjs +121 -0
  188. package/dist/pi/packages/ta-plot/lib/extension.d.ts +15 -0
  189. package/dist/pi/packages/ta-plot/lib/extension.js +24 -0
  190. package/dist/pi/packages/ta-plot/lib/i18n.d.ts +14 -0
  191. package/dist/pi/packages/ta-plot/lib/i18n.js +30 -0
  192. package/dist/pi/packages/ta-plot/lib/index.d.ts +7 -0
  193. package/dist/pi/packages/ta-plot/lib/index.js +25 -0
  194. package/dist/pi/packages/ta-plot/lib/plot-expression.d.ts +16 -0
  195. package/dist/pi/packages/ta-plot/lib/plot-expression.js +209 -0
  196. package/dist/pi/packages/ta-plot/lib/plot-painter.d.ts +28 -0
  197. package/dist/pi/packages/ta-plot/lib/plot-painter.js +208 -0
  198. package/dist/pi/packages/ta-plot/lib/plot-prompt.d.ts +7 -0
  199. package/dist/pi/packages/ta-plot/lib/plot-prompt.js +16 -0
  200. package/dist/pi/packages/ta-plot/lib/plot-protocol.d.ts +7 -0
  201. package/dist/pi/packages/ta-plot/lib/plot-protocol.js +10 -0
  202. package/dist/pi/packages/ta-plot/lib/plot-scene.d.ts +65 -0
  203. package/dist/pi/packages/ta-plot/lib/plot-scene.js +427 -0
  204. package/dist/pi/packages/ta-plot/lib/plot-spec.d.ts +86 -0
  205. package/dist/pi/packages/ta-plot/lib/plot-spec.js +165 -0
  206. package/dist/pi/packages/ta-plot/lib/plot-view.d.ts +4 -0
  207. package/dist/pi/packages/ta-plot/lib/plot-view.js +205 -0
  208. package/dist/pi/packages/ta-plot/lib/react.d.ts +8 -0
  209. package/dist/pi/packages/ta-plot/lib/react.js +8 -0
  210. package/dist/pi/packages/ta-plot/lib/style.d.ts +4 -0
  211. package/dist/pi/packages/ta-plot/lib/style.js +47 -0
  212. package/dist/pi/packages/ta-plot/package.json +57 -0
  213. package/dist/pi/packages/ta-plot/web/index.js +1320 -0
  214. package/dist/pi/packages/ta-recall/extension/index.mjs +52 -2
  215. package/dist/pi/packages/ta-recall/host/index.mjs +136 -55
  216. package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +6 -3
  217. package/dist/pi/packages/ta-recall/lib/brief-util.js +26 -5
  218. package/dist/pi/packages/ta-recall/lib/extension-util.d.ts +2 -1
  219. package/dist/pi/packages/ta-recall/lib/extension-util.js +7 -1
  220. package/dist/pi/packages/ta-recall/lib/i18n.d.ts +3 -0
  221. package/dist/pi/packages/ta-recall/lib/i18n.js +89 -2
  222. package/dist/pi/packages/ta-recall/lib/keep-util.d.ts +2 -1
  223. package/dist/pi/packages/ta-recall/lib/keep-util.js +8 -1
  224. package/dist/pi/packages/ta-recall/lib/recall-service.js +5 -3
  225. package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +2 -3
  226. package/dist/pi/packages/ta-recall/lib/server-texts.js +15 -8
  227. package/dist/pi/packages/ta-recall/package.json +7 -3
  228. package/dist/pi/packages/ta-recall/web/index.js +164 -9
  229. package/dist/pi/packages/ta-rooms/extension/index.mjs +60 -3
  230. package/dist/pi/packages/ta-rooms/host/index.mjs +284 -37
  231. package/dist/pi/packages/ta-rooms/lib/dialogs.js +2 -1
  232. package/dist/pi/packages/ta-rooms/lib/double-agents.js +31 -7
  233. package/dist/pi/packages/ta-rooms/lib/double-grants.js +57 -13
  234. package/dist/pi/packages/ta-rooms/lib/double-host.js +31 -5
  235. package/dist/pi/packages/ta-rooms/lib/double-i18n.d.ts +3 -0
  236. package/dist/pi/packages/ta-rooms/lib/double-i18n.js +201 -2
  237. package/dist/pi/packages/ta-rooms/lib/double-tasks.d.ts +2 -1
  238. package/dist/pi/packages/ta-rooms/lib/double-tasks.js +93 -21
  239. package/dist/pi/packages/ta-rooms/lib/double-user.js +1 -1
  240. package/dist/pi/packages/ta-rooms/lib/double-util.d.ts +1 -1
  241. package/dist/pi/packages/ta-rooms/lib/double-util.js +22 -3
  242. package/dist/pi/packages/ta-rooms/lib/doubles-store.js +2 -1
  243. package/dist/pi/packages/ta-rooms/lib/doubles-view.js +8 -1
  244. package/dist/pi/packages/ta-rooms/lib/friend-notices.js +27 -8
  245. package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +3 -0
  246. package/dist/pi/packages/ta-rooms/lib/i18n.js +243 -2
  247. package/dist/pi/packages/ta-rooms/lib/style.d.ts +1 -1
  248. package/dist/pi/packages/ta-rooms/lib/style.js +1 -0
  249. package/dist/pi/packages/ta-rooms/package.json +7 -3
  250. package/dist/pi/packages/ta-rooms/web/index.js +496 -9
  251. package/dist/pi/packages/ta-share/extension/index.mjs +98 -23
  252. package/dist/pi/packages/ta-share/lib/i18n.d.ts +3 -0
  253. package/dist/pi/packages/ta-share/lib/i18n.js +203 -2
  254. package/dist/pi/packages/ta-share/lib/page.js +1 -1
  255. package/dist/pi/packages/ta-share/lib/server-texts.d.ts +2 -1
  256. package/dist/pi/packages/ta-share/lib/server-texts.js +60 -29
  257. package/dist/pi/packages/ta-share/lib/share-dialog.js +3 -1
  258. package/dist/pi/packages/ta-share/lib/style.d.ts +1 -1
  259. package/dist/pi/packages/ta-share/lib/style.js +1 -0
  260. package/dist/pi/packages/ta-share/package.json +7 -3
  261. package/dist/pi/packages/ta-share/web/index.js +246 -4
  262. package/dist/pi/packages/ta-sync/host/index.mjs +170 -25
  263. package/dist/pi/packages/ta-sync/lib/i18n.d.ts +3 -0
  264. package/dist/pi/packages/ta-sync/lib/i18n.js +173 -2
  265. package/dist/pi/packages/ta-sync/lib/migrate-i18n.d.ts +3 -0
  266. package/dist/pi/packages/ta-sync/lib/migrate-i18n.js +183 -2
  267. package/dist/pi/packages/ta-sync/lib/panel.js +4 -1
  268. package/dist/pi/packages/ta-sync/lib/server-texts.d.ts +0 -1
  269. package/dist/pi/packages/ta-sync/lib/server-texts.js +132 -35
  270. package/dist/pi/packages/ta-sync/lib/style.d.ts +1 -1
  271. package/dist/pi/packages/ta-sync/lib/style.js +1 -0
  272. package/dist/pi/packages/ta-sync/package.json +7 -3
  273. package/dist/pi/packages/ta-sync/web/index.js +398 -5
  274. package/dist/pi/packages/ta-sync-cloud/host/index.mjs +52 -23
  275. package/dist/pi/packages/ta-sync-cloud/lib/host.js +49 -20
  276. package/dist/pi/packages/ta-sync-cloud/package.json +7 -3
  277. package/dist/pi/packages/ta-team/README.en.md +1 -1
  278. package/dist/pi/packages/ta-team/README.md +1 -1
  279. package/dist/pi/packages/ta-team/extension/index.mjs +86 -37
  280. package/dist/pi/packages/ta-team/host/index.mjs +130 -43
  281. package/dist/pi/packages/ta-team/lib/dialogs.js +68 -9
  282. package/dist/pi/packages/ta-team/lib/i18n.d.ts +7 -1
  283. package/dist/pi/packages/ta-team/lib/i18n.js +431 -8
  284. package/dist/pi/packages/ta-team/lib/member-dialog.js +30 -25
  285. package/dist/pi/packages/ta-team/lib/page.js +5 -1
  286. package/dist/pi/packages/ta-team/lib/style.d.ts +1 -1
  287. package/dist/pi/packages/ta-team/lib/style.js +11 -4
  288. package/dist/pi/packages/ta-team/lib/team-invites.d.ts +14 -8
  289. package/dist/pi/packages/ta-team/lib/team-invites.js +38 -6
  290. package/dist/pi/packages/ta-team/package.json +7 -3
  291. package/dist/pi/packages/ta-team/web/index.js +688 -102
  292. package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +3 -0
  293. package/dist/pi/packages/ta-workspace/lib/i18n.js +417 -1
  294. package/dist/pi/packages/ta-workspace/package.json +7 -3
  295. package/dist/pi/packages/ta-workspace/web/index.js +504 -40
  296. package/dist/public/assets/GLTFLoader-C8PT6dAj.js +1 -0
  297. package/dist/public/assets/SkeletonUtils-BBAzQdty.js +1 -0
  298. package/dist/public/assets/{abnfDiagram-S7VZAUFO-DMceNIR5.js → abnfDiagram-S7VZAUFO-CD8CaArq.js} +1 -1
  299. package/dist/public/assets/{architecture-WOLXFQ4H-5AdYeEv8.js → architecture-WOLXFQ4H-f2a9bodL.js} +1 -1
  300. package/dist/public/assets/{architectureDiagram-YGSQEFNW-CqkJHg0A.js → architectureDiagram-YGSQEFNW-BCWH9CwO.js} +1 -1
  301. package/dist/public/assets/{blockDiagram-APKKGZFW-BtuHdIjQ.js → blockDiagram-APKKGZFW-fUamQMeJ.js} +1 -1
  302. package/dist/public/assets/{browser-Ds5TwWWr.js → browser-CrMa174j.js} +1 -1
  303. package/dist/public/assets/{c4Diagram-KJ2TOQU5-eebbjTgZ.js → c4Diagram-KJ2TOQU5-CkLtnwp1.js} +1 -1
  304. package/dist/public/assets/{chunk-6MUBBAK2-BjMKSfTf.js → chunk-6MUBBAK2-cwcGPuAH.js} +1 -1
  305. package/dist/public/assets/{chunk-AXFCVDMN-BElluw_7.js → chunk-AXFCVDMN-DNkmkYfC.js} +1 -1
  306. package/dist/public/assets/{chunk-BG4553SI-CUDwpWNL.js → chunk-BG4553SI-C8qbbr2Z.js} +1 -1
  307. package/dist/public/assets/{chunk-DQASFODM-B-92o8Uj.js → chunk-DQASFODM-C-PJ2CrJ.js} +1 -1
  308. package/dist/public/assets/{chunk-HFQBQIA3-pveEMcXK.js → chunk-HFQBQIA3-BYcgxNEL.js} +1 -1
  309. package/dist/public/assets/{chunk-KQLB2F66-m7DKNjYW.js → chunk-KQLB2F66-BTDNzrRl.js} +1 -1
  310. package/dist/public/assets/{chunk-KS47KZWR-CnSSETdj.js → chunk-KS47KZWR-1sGg1pKP.js} +1 -1
  311. package/dist/public/assets/{chunk-LEVMRMFU-Ds7OnJrC.js → chunk-LEVMRMFU-7lAsFwHT.js} +1 -1
  312. package/dist/public/assets/{chunk-M57EVK23-PJSYCuUh.js → chunk-M57EVK23-C8K-ltig.js} +1 -1
  313. package/dist/public/assets/{chunk-OY52VR5R-C3ygRwSC.js → chunk-OY52VR5R-CBe1QL_V.js} +1 -1
  314. package/dist/public/assets/{chunk-QB3YPZ4I-DcFtmZh7.js → chunk-QB3YPZ4I-COhYyyE_.js} +1 -1
  315. package/dist/public/assets/{chunk-R3KSYZAL-B4BOidE6.js → chunk-R3KSYZAL-CREAgaSS.js} +1 -1
  316. package/dist/public/assets/{chunk-STOXU5M4-DcXfwN7k.js → chunk-STOXU5M4-CTl0P8_C.js} +1 -1
  317. package/dist/public/assets/{chunk-TU62E6Q5-B-rpQQxX.js → chunk-TU62E6Q5-B_GG7baF.js} +1 -1
  318. package/dist/public/assets/{chunk-X4PVCEUW-BBtlFSw1.js → chunk-X4PVCEUW-CDrSpVOj.js} +1 -1
  319. package/dist/public/assets/{chunk-XXDRQBXY-Do8BIocv.js → chunk-XXDRQBXY-sKeiDEnC.js} +1 -1
  320. package/dist/public/assets/{classDiagram-v2-L25IHNXF-bhGAODMS.js → classDiagram-v2-L25IHNXF-Cqo1O5FQ.js} +1 -1
  321. package/dist/public/assets/{cose-bilkent-JH36ORCC-B7Qv6Hv_.js → cose-bilkent-JH36ORCC-CTSKeRBe.js} +1 -1
  322. package/dist/public/assets/cynefin-EF2NZ3EQ-CP12ndt7.js +1 -0
  323. package/dist/public/assets/{cynefinDiagram-L36ESFBY-BX-R5Z6L.js → cynefinDiagram-L36ESFBY-67xEPyP9.js} +1 -1
  324. package/dist/public/assets/{d3-selection-D3xgEEla.js → d3-selection-BUiX-3qh.js} +1 -1
  325. package/dist/public/assets/{dagre-SPEB5RXH-MfJ9yO0v.js → dagre-SPEB5RXH-DDw-u3Kg.js} +1 -1
  326. package/dist/public/assets/{diagram-3B7GL73J-DxFRc2vC.js → diagram-3B7GL73J-BBFInaCs.js} +1 -1
  327. package/dist/public/assets/{diagram-DNEMPZML-BcBwOLbM.js → diagram-DNEMPZML-ZdnFKM7-.js} +1 -1
  328. package/dist/public/assets/{diagram-L3MUGCDN--Rw-isPI.js → diagram-L3MUGCDN-CPb04hOv.js} +1 -1
  329. package/dist/public/assets/{diagram-LA4NIPWU-DXkY85UN.js → diagram-LA4NIPWU-P9wHFGDS.js} +1 -1
  330. package/dist/public/assets/{diagram-MHCOC4E2-CbNmfAid.js → diagram-MHCOC4E2-Ce_Cr-t6.js} +1 -1
  331. package/dist/public/assets/{diagram-XPFHEONP-D1nGQjzf.js → diagram-XPFHEONP-CfS34OHW.js} +1 -1
  332. package/dist/public/assets/{dist-B1JMTrET.js → dist-6pZqZEaM.js} +1 -1
  333. package/dist/public/assets/{ebnfDiagram-UZSYDL2S-DGXbVfke.js → ebnfDiagram-UZSYDL2S-BkHabCn2.js} +1 -1
  334. package/dist/public/assets/{editor.api-e3yQoo1r.js → editor.api-CO4Q0NKb.js} +1 -1
  335. package/dist/public/assets/{elk-XV6XMXQE-pA-iT6fg.js → elk-XV6XMXQE-JpreOVeR.js} +1 -1
  336. package/dist/public/assets/{erDiagram-EYBAPDEH-BpgBun7y.js → erDiagram-EYBAPDEH-DDFJwzHx.js} +1 -1
  337. package/dist/public/assets/{eventmodeling-K75KTNOO-CVfyCcul.js → eventmodeling-K75KTNOO-DsnkF6Zc.js} +1 -1
  338. package/dist/public/assets/flowDiagram-MALGAFMO-Djxeacjw.js +1 -0
  339. package/dist/public/assets/{freemarker2-dYGec-fT.js → freemarker2-Cm4NK652.js} +1 -1
  340. package/dist/public/assets/{ganttDiagram-23REXITY-DjLTTWwA.js → ganttDiagram-23REXITY-C7eedoYb.js} +1 -1
  341. package/dist/public/assets/gitGraph-VSP46ZUC-qlWN7ijl.js +1 -0
  342. package/dist/public/assets/{gitGraphDiagram-STJD7YCW-D9m7IVyJ.js → gitGraphDiagram-STJD7YCW-Cuh3ih-z.js} +1 -1
  343. package/dist/public/assets/{handlebars-Bxerz7ci.js → handlebars-BnE51DUi.js} +1 -1
  344. package/dist/public/assets/{html-DlVnGsdp.js → html-7koekDfa.js} +1 -1
  345. package/dist/public/assets/{index-CZmGe9gc.js → index-CQG1XddL.js} +2 -2
  346. package/dist/public/assets/info-OHQRW6UA-jN69V28z.js +1 -0
  347. package/dist/public/assets/{infoDiagram-KBXO4MBG-DoYdhkAy.js → infoDiagram-KBXO4MBG-BY3iq7I8.js} +1 -1
  348. package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Bc0GAInW.js → ishikawaDiagram-M35NCXHK-COjlz24y.js} +1 -1
  349. package/dist/public/assets/ja-BHBiml1x.js +12 -0
  350. package/dist/public/assets/{javascript-DZrowo_I.js → javascript-BUZgUhdn.js} +1 -1
  351. package/dist/public/assets/{journeyDiagram-OPLOXDXO-BM7Dwstu.js → journeyDiagram-OPLOXDXO-DReJE04Q.js} +1 -1
  352. package/dist/public/assets/{jsonMode-Bs30wPr5.js → jsonMode-qPeVDBDp.js} +1 -1
  353. package/dist/public/assets/{kanban-definition-BZKZHSQY-CO-Crrdu.js → kanban-definition-BZKZHSQY-BB0_ePvg.js} +1 -1
  354. package/dist/public/assets/{liquid-dLz9d3ax.js → liquid-CNKL9dLX.js} +1 -1
  355. package/dist/public/assets/{mdx-DO0x92Kn.js → mdx-D1_UzrBc.js} +1 -1
  356. package/dist/public/assets/{mermaid-parser.core-BXwArNvw.js → mermaid-parser.core-DiE3z_tV.js} +3 -3
  357. package/dist/public/assets/{mermaid.core-C6mppfDC.js → mermaid.core-CBCRrLdl.js} +4 -4
  358. package/dist/public/assets/meshopt_decoder.module-DXTYc6wn.js +1 -0
  359. package/dist/public/assets/{mindmap-definition-I2QAS2VK-vcQ2EU4T.js → mindmap-definition-I2QAS2VK-D-Y5fKl1.js} +1 -1
  360. package/dist/public/assets/module-BEbKICB1.js +2475 -0
  361. package/dist/public/assets/module-Egyx6Otv.js +1 -0
  362. package/dist/public/assets/{monaco-J_Pr5zjk.js → monaco--czRbHhk.js} +3 -3
  363. package/dist/public/assets/packet-JDAUHWVQ-Cl8QuXQJ.js +1 -0
  364. package/dist/public/assets/{pegDiagram-FD4XPPHP-DPDrbtS2.js → pegDiagram-FD4XPPHP-1jx5jc73.js} +1 -1
  365. package/dist/public/assets/pie-XZMESJXO-kVGJsGZe.js +1 -0
  366. package/dist/public/assets/{pieDiagram-J4AKIIQI-DXuaepGJ.js → pieDiagram-J4AKIIQI-DGv_WCCu.js} +1 -1
  367. package/dist/public/assets/{python-nnmIOv4s.js → python-DNZu5LjV.js} +1 -1
  368. package/dist/public/assets/{quadrantDiagram-XTYBLID2-BuD_-coZ.js → quadrantDiagram-XTYBLID2-BgY0lf8V.js} +1 -1
  369. package/dist/public/assets/radar-ABXABTNO-Dw71L-n8.js +1 -0
  370. package/dist/public/assets/railroad-I3PHUGI6-DkaUvI4_.js +1 -0
  371. package/dist/public/assets/{railroad-abnf-LNEFI6M7-CkCl68xY.js → railroad-abnf-LNEFI6M7-tZ7rJxwM.js} +1 -1
  372. package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DO3GiRv6.js → railroad-ebnf-DWYD2UWJ-JO6n_1TK.js} +1 -1
  373. package/dist/public/assets/{railroad-peg-JR7BVNR7-DZBsKy4P.js → railroad-peg-JR7BVNR7-Bf0PG2YJ.js} +1 -1
  374. package/dist/public/assets/{railroadDiagram-MRQ6NCDL-BeLq7Mqp.js → railroadDiagram-MRQ6NCDL-BMjog84X.js} +1 -1
  375. package/dist/public/assets/{razor-l2rRITgB.js → razor-DU-x8qSP.js} +1 -1
  376. package/dist/public/assets/{requirementDiagram-Y7LWUY3S-BBizkrON.js → requirementDiagram-Y7LWUY3S-CktbbWjr.js} +1 -1
  377. package/dist/public/assets/{sankeyDiagram-WGJFYUXA-tyo-p7oc.js → sankeyDiagram-WGJFYUXA-CQonOre7.js} +1 -1
  378. package/dist/public/assets/{sequenceDiagram-5NDRBG5M-BSGPbeJX.js → sequenceDiagram-5NDRBG5M-CAe8-JvA.js} +1 -1
  379. package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-Dcdy66MQ.js → stateDiagram-v2-FJ4FJNEA-BrkqOuRm.js} +1 -1
  380. package/dist/public/assets/{swimlanes-UMQ2AFYF-BJfgQyQo.js → swimlanes-UMQ2AFYF-sLpgHBKo.js} +1 -1
  381. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-amBdr5Wc.js +8 -0
  382. package/dist/public/assets/{timeline-definition-SEUHKTQE-Ch8aQwF6.js → timeline-definition-SEUHKTQE-CHE0x-WN.js} +1 -1
  383. package/dist/public/assets/treeView-D4JQ5SDB-DKLyFqZk.js +1 -0
  384. package/dist/public/assets/treemap-SAJKECNS-CRG6ogj8.js +1 -0
  385. package/dist/public/assets/{typescript-LasX-M7S.js → typescript-BrNT2oWW.js} +1 -1
  386. package/dist/public/assets/{usecaseDiagram-AFA6YXN4-BzlSB4R4.js → usecaseDiagram-AFA6YXN4-DwkFRI5R.js} +1 -1
  387. package/dist/public/assets/{vennDiagram-NNMJR3RB-4xaWLrMk.js → vennDiagram-NNMJR3RB-BquQVmJq.js} +1 -1
  388. package/dist/public/assets/wardley-7MLQ67FV-D2jQfflX.js +1 -0
  389. package/dist/public/assets/{wardleyDiagram-S7YFUSEH-C-iK1p-O.js → wardleyDiagram-S7YFUSEH-sNYFUfMe.js} +1 -1
  390. package/dist/public/assets/{xml-CGhYQUqn.js → xml-BY65QKv7.js} +1 -1
  391. package/dist/public/assets/{xychartDiagram-GGNKY7IX-CFsnisdM.js → xychartDiagram-GGNKY7IX-CnWEYuid.js} +1 -1
  392. package/dist/public/assets/{yaml-BcOaPfuH.js → yaml-BMovUwzO.js} +1 -1
  393. package/dist/public/assets/zh-tw-7q-tizR0.js +12 -0
  394. package/dist/public/index.html +1 -1
  395. package/dist/serve/index.mjs +2773 -626
  396. package/package.json +39 -37
  397. package/dist/public/assets/cynefin-EF2NZ3EQ-Dfu5k3iG.js +0 -1
  398. package/dist/public/assets/flowDiagram-MALGAFMO-BHlXeeVG.js +0 -1
  399. package/dist/public/assets/gitGraph-VSP46ZUC-CFVSDv3q.js +0 -1
  400. package/dist/public/assets/info-OHQRW6UA-C_Db4yjo.js +0 -1
  401. package/dist/public/assets/module-C0tELrcJ.js +0 -1
  402. package/dist/public/assets/module-CteT9pTP.js +0 -2405
  403. package/dist/public/assets/packet-JDAUHWVQ-Bw7hmDUU.js +0 -1
  404. package/dist/public/assets/pie-XZMESJXO-cb_eq1B6.js +0 -1
  405. package/dist/public/assets/radar-ABXABTNO-Dqy-xoY_.js +0 -1
  406. package/dist/public/assets/railroad-I3PHUGI6-CBPVCTd3.js +0 -1
  407. package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BWvcVkFg.js +0 -8
  408. package/dist/public/assets/treeView-D4JQ5SDB--XUqgqA6.js +0 -1
  409. package/dist/public/assets/treemap-SAJKECNS-CfrNtG7H.js +0 -1
  410. package/dist/public/assets/wardley-7MLQ67FV-BXBG-txR.js +0 -1
@@ -1,3 +1,42 @@
1
+ // ../ta-protocol/esm/common/language.js
2
+ var TaLanguageUtil;
3
+ (function(TaLanguageUtil2) {
4
+ TaLanguageUtil2.ALL = ["zh-CN", "zh-TW", "en-US", "ja-JP"];
5
+ TaLanguageUtil2.NAMES = { "zh-CN": "简体中文", "zh-TW": "繁體中文", "en-US": "English", "ja-JP": "日本語" };
6
+ function of(tag) {
7
+ const said = (tag !== null && tag !== undefined ? tag : "").toLowerCase().replace(/_/g, "-");
8
+ if (/^zh(\b|-)/.test(said)) {
9
+ return /-hant\b/.test(said) || !/-hans\b/.test(said) && /-(tw|hk|mo)\b/.test(said) ? "zh-TW" : "zh-CN";
10
+ }
11
+ return /^ja(\b|-)/.test(said) ? "ja-JP" : "en-US";
12
+ }
13
+ TaLanguageUtil2.of = of;
14
+ function server(env = typeof process === "undefined" ? {} : process.env) {
15
+ return of(env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG);
16
+ }
17
+ TaLanguageUtil2.server = server;
18
+ function pick(language, words) {
19
+ return words[of(language)];
20
+ }
21
+ TaLanguageUtil2.pick = pick;
22
+ function say(words) {
23
+ return words[server()];
24
+ }
25
+ TaLanguageUtil2.say = say;
26
+ function chinese(language) {
27
+ return of(language).startsWith("zh");
28
+ }
29
+ TaLanguageUtil2.chinese = chinese;
30
+ function cjk(language) {
31
+ return of(language) !== "en-US";
32
+ }
33
+ TaLanguageUtil2.cjk = cjk;
34
+ function list(language, items) {
35
+ return items.join(cjk(language) ? "、" : ", ");
36
+ }
37
+ TaLanguageUtil2.list = list;
38
+ })(TaLanguageUtil || (TaLanguageUtil = {}));
39
+
1
40
  // web-src/i18n.ts
2
41
  var EN = {
3
42
  settingsTitle: "Notifications",
@@ -47,10 +86,59 @@ var ZH = {
47
86
  toolTell: "告诉你",
48
87
  askTitle: "Ta 在问你"
49
88
  };
89
+ var ZH_TW = {
90
+ settingsTitle: "提醒",
91
+ levelLabel: "提醒我",
92
+ levelHint: "正在看的對話不提醒;分身跟進的任務由分身告訴你。",
93
+ levelAll: "每次回覆",
94
+ levelNeeds: "需要我時",
95
+ levelOff: "關閉",
96
+ systemLabel: "系統通知",
97
+ systemHint: "Ta 不在前台時用系統通知提醒。",
98
+ systemAllow: "允許",
99
+ systemOn: "已開啟",
100
+ systemDenied: "已在瀏覽器設定裡關閉",
101
+ systemNone: "此裝置沒有系統通知:Ta 開啟時用橫幅提醒。手機鎖屏推送尚未接入。",
102
+ mutedLabel: "免打擾的對話",
103
+ mutedHint: "只在需要你時提醒。",
104
+ mutedNone: "沒有",
105
+ unmute: "取消免打擾",
106
+ mute: "免打擾",
107
+ mutedNotice: "已對「{name}」免打擾,需要你時仍會提醒",
108
+ untitled: "這個對話",
109
+ toolAsk: "提醒你",
110
+ toolTell: "告訴你",
111
+ askTitle: "Ta 在問你"
112
+ };
113
+ var JA = {
114
+ settingsTitle: "通知",
115
+ levelLabel: "通知する",
116
+ levelHint: "見ている会話は通知しません。分身が追跡するタスクは分身があなたに通知します。",
117
+ levelAll: "すべての回答",
118
+ levelNeeds: "必要な時",
119
+ levelOff: "オフ",
120
+ systemLabel: "システム通知",
121
+ systemHint: "Ta が前面にない場合、システム通知で通知します。",
122
+ systemAllow: "許可",
123
+ systemOn: "オン",
124
+ systemDenied: "ブラウザの設定で有効になっていません",
125
+ systemNone: "このデバイスにはシステム通知がありません。Ta が開いている時は横幅で通知します。スマホのロック画面プッシュはまだセットアップされていません。",
126
+ mutedLabel: "通知オフの会話",
127
+ mutedHint: "必要な時だけ通知します。",
128
+ mutedNone: "なし",
129
+ unmute: "通知オフを取り消す",
130
+ mute: "通知オフ",
131
+ mutedNotice: "「{name}」を通知オフにしました。必要な時は通知します",
132
+ untitled: "この会話",
133
+ toolAsk: "あなたに尋ねる",
134
+ toolTell: "あなたに伝える",
135
+ askTitle: "Ta があなたに尋ねています"
136
+ };
137
+ var WORDS = { "zh-CN": ZH, "zh-TW": ZH_TW, "en-US": EN, "ja-JP": JA };
50
138
  var NotifyWords;
51
139
  ((NotifyWords) => {
52
140
  function of(language) {
53
- return language === "zh-CN" ? ZH : EN;
141
+ return TaLanguageUtil.pick(language, WORDS);
54
142
  }
55
143
  NotifyWords.of = of;
56
144
  function format(text, values) {
@@ -266,6 +354,19 @@ function SystemSetting({ pi }) {
266
354
  className: "ta-notify-state"
267
355
  }, state === "granted" ? words.systemOn : state === "denied" ? words.systemDenied : words.systemNone);
268
356
  }
357
+ function UnmuteButton({ pi, item, label }) {
358
+ const [busy, run] = pi.ui.useBusy();
359
+ const unmute = () => void run(() => pi.callHost("mute", item.target, false).catch((error) => pi.ui.notify(error instanceof Error ? error.message : String(error), "error")));
360
+ return /* @__PURE__ */ React.createElement("button", {
361
+ type: "button",
362
+ className: `ta-button${busy ? " ta-busy" : ""}`,
363
+ "aria-busy": busy || undefined,
364
+ disabled: busy,
365
+ onClick: unmute
366
+ }, busy && /* @__PURE__ */ React.createElement("span", {
367
+ className: "ta-spinner ta-busy-mark"
368
+ }), /* @__PURE__ */ React.createElement("span", null, label));
369
+ }
269
370
  function MutedSetting({ pi }) {
270
371
  const words = NotifyWords.of(pi.ui.language);
271
372
  const [muted] = useStored(pi, Keys.MUTED, NotifyUtil.muted);
@@ -274,7 +375,6 @@ function MutedSetting({ pi }) {
274
375
  className: "ta-notify-state"
275
376
  }, words.mutedNone);
276
377
  }
277
- const unmute = (item) => void pi.callHost("mute", item.target, false).catch((error) => pi.ui.notify(error instanceof Error ? error.message : String(error), "error"));
278
378
  return /* @__PURE__ */ React.createElement("ul", {
279
379
  className: "ta-notify-muted"
280
380
  }, muted.map((item) => /* @__PURE__ */ React.createElement("li", {
@@ -282,11 +382,11 @@ function MutedSetting({ pi }) {
282
382
  }, /* @__PURE__ */ React.createElement("span", {
283
383
  className: "ta-notify-muted-name",
284
384
  title: item.target
285
- }, item.title || words.untitled), /* @__PURE__ */ React.createElement("button", {
286
- type: "button",
287
- className: "ta-button",
288
- onClick: () => unmute(item)
289
- }, words.unmute))));
385
+ }, item.title || words.untitled), /* @__PURE__ */ React.createElement(UnmuteButton, {
386
+ pi,
387
+ item,
388
+ label: words.unmute
389
+ }))));
290
390
  }
291
391
  function notifySettings(pi) {
292
392
  const words = () => NotifyWords.of(pi.ui.language);
@@ -0,0 +1,12 @@
1
+ # Cell - Ta Plot
2
+
3
+ A pi package that comes with Ta (on by default; Settings → Extensions of the web client turns it off): Function plot. When a reply talks of functions and curves, Ta draws them as animated plots rather than describing them or drawing them with a chart of points.
4
+
5
+ - **Functions and curves**: under the Ta service, every turn's system prompt gets a `<ta-plot>` section: to show a function or a curve (a parabola, a hyperbola, sin x, a family of curves, a graph to explain a point), Ta writes a `ta-plot` block (JSON), which the web client draws on a canvas: a grid and axes, curves drawn in one after another, parametric curves, dashed guides (asymptotes, axes of symmetry), labeled points, and with `dot` a point running along the curves.
6
+ - **Moving, dragged**: a param that uses `t` (seconds since shown) moves its curves; a param written as a slider (`{"value", "min", "max", "step"?, "label"?}`) gets a slider under the plot, and moving across the plot drags the first one; a curve with `family` draws itself faintly for a set of values of the slider too, the current one bold: a family of curves.
7
+ - **Surfaces and curves in space**: `surfaces` (z = f(x, y), colored by height without a color) or curves and points with `z` are drawn in a box of the axes on the 3D engine of the page (`ui.Game3D`), turning slowly, turned by dragging; params, sliders and `t` work the same.
8
+ - **Computed, never run**: expressions are read by the package's own parser (numbers, `+ - * / % ^`, parentheses, variables, the functions of Math, pi and e), never run as code; a plot that cannot be drawn says why and shows its text.
9
+ - **Light on power**: it animates only while the card is seen, and stops once drawn when nothing moves.
10
+ - **Elsewhere**: external agents (ta-agents) get the section too; replies to WeChat and WeCom bots draw no plot; blocks of language `plot` are drawn as well (the name the user extension had).
11
+
12
+ The format is in `web-src/plot-spec.ts`, the prompt in `web-src/plot-prompt.ts`, expressions in `web-src/plot-expression.ts`.
@@ -0,0 +1,12 @@
1
+ # Cell - Ta Plot
2
+
3
+ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展 关闭):函数图像。回复里讲到函数和曲线时,Ta 直接把它画成带动画的图像,而不是用文字描述或拿点拼图。
4
+
5
+ - **画函数和曲线**:在 Ta 服务下,每一轮的系统提示里多一段 `<ta-plot>`:要展示函数或曲线(抛物线、双曲线、sin x、一族曲线、解释某个概念的图)时,写一个 `ta-plot` 代码块(JSON),Web 把它画在画布上:网格与坐标轴、逐条画出的曲线、参数方程、虚线(渐近线、对称轴)、标注点,`dot` 让一个小点沿曲线跑。
6
+ - **会动、可拖**:参数用到 `t`(显示后的秒数)时曲线跟着动;参数写成滑块(`{"value", "min", "max", "step"?, "label"?}`)时下方出现滑条,在图上左右拖动也能调第一个滑块;曲线加 `family` 后,会把滑块取的一组值淡淡地都画出来,当前值加粗,即曲线族。
7
+ - **曲面与空间曲线**:写 `surfaces`(z = f(x, y),不给颜色就按高度着色)或带 `z` 的曲线、点时,用页面的 3D 引擎(`ui.Game3D`)画在一个坐标盒里,慢慢自转,拖动旋转;参数、滑块和 `t` 照样可用。
8
+ - **只算不跑**:表达式由包自己的解析器读(数字、`+ - * / % ^`、括号、变量、Math 的函数与 pi、e),从不当作代码执行;画不出来时显示原因和原文。
9
+ - **省电**:动画只在卡片可见时跑,没有会动的东西时画完就停。
10
+ - **别处**:外部 Agent(ta-agents)也会拿到这段写法;发到微信、企业微信机器人的回复不画图;`plot` 语言的代码块也照样画(原先的用户扩展用这个名字)。
11
+
12
+ 格式见 `web-src/plot-spec.ts`,提示词见 `web-src/plot-prompt.ts`,表达式见 `web-src/plot-expression.ts`。
@@ -0,0 +1,121 @@
1
+ // ../ta-protocol/esm/common/ta-extension-host.js
2
+ var TA_HOST_EVENT = "ta:host";
3
+ var TaHostUtil;
4
+ (function(TaHostUtil2) {
5
+ TaHostUtil2.WAIT_MS = 1000;
6
+ function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
7
+ return new Promise((resolve) => {
8
+ let heard = false;
9
+ let answered = false;
10
+ const timer = setTimeout(() => resolve(undefined), waitMs);
11
+ const request = {
12
+ name,
13
+ heard: () => {
14
+ heard = true;
15
+ },
16
+ resolve: (answer) => {
17
+ answered = true;
18
+ clearTimeout(timer);
19
+ resolve(answer);
20
+ }
21
+ };
22
+ events.emit(TA_HOST_EVENT, request);
23
+ if (!heard && !answered) {
24
+ clearTimeout(timer);
25
+ resolve(undefined);
26
+ }
27
+ });
28
+ }
29
+ TaHostUtil2.reach = reach;
30
+ function marked(systemPrompt, mark) {
31
+ return role(systemPrompt).includes(mark);
32
+ }
33
+ TaHostUtil2.marked = marked;
34
+ function role(systemPrompt) {
35
+ if (!systemPrompt) {
36
+ return "";
37
+ }
38
+ const open = `<addendum>
39
+ `;
40
+ const start = systemPrompt.indexOf(open);
41
+ const context = systemPrompt.indexOf(`<project_context>
42
+ `);
43
+ if (start < 0 || context >= 0 && context < start) {
44
+ return "";
45
+ }
46
+ const end = systemPrompt.indexOf(`
47
+ </addendum>`, start);
48
+ return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
49
+ }
50
+ TaHostUtil2.role = role;
51
+ })(TaHostUtil || (TaHostUtil = {}));
52
+ var TA_ASK_ENTRY = "ta-ask";
53
+ var TaAskUtil;
54
+ (function(TaAskUtil2) {
55
+ const LENGTH = 120;
56
+ function entry(question) {
57
+ const line = question.replace(/\s+/g, " ").trim();
58
+ return { question: line.length > LENGTH ? `${line.slice(0, LENGTH - 1)}…` : line };
59
+ }
60
+ TaAskUtil2.entry = entry;
61
+ function asking(entries) {
62
+ var _a;
63
+ for (let i = entries.length - 1;i >= 0; i--) {
64
+ const entry2 = entries[i];
65
+ if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
66
+ return;
67
+ }
68
+ if (entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY) {
69
+ return read(entry2);
70
+ }
71
+ }
72
+ return;
73
+ }
74
+ TaAskUtil2.asking = asking;
75
+ function next(asked, entry2) {
76
+ var _a;
77
+ if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
78
+ return;
79
+ }
80
+ return entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY ? read(entry2) : asked;
81
+ }
82
+ TaAskUtil2.next = next;
83
+ function read(found) {
84
+ var _a;
85
+ const question = (_a = found.data) === null || _a === undefined ? undefined : _a.question;
86
+ if (typeof question !== "string" || !question.trim()) {
87
+ return;
88
+ }
89
+ const at = found.timestamp ? Date.parse(found.timestamp) : Number.NaN;
90
+ return { question: entry(question).question, at: Number.isNaN(at) ? 0 : at };
91
+ }
92
+ })(TaAskUtil || (TaAskUtil = {}));
93
+
94
+ // web-src/plot-protocol.ts
95
+ var NAME = "@celljs/ta-plot";
96
+ var LANGUAGE = "ta-plot";
97
+
98
+ // web-src/plot-prompt.ts
99
+ var PLOT_PROMPT = `To show the user a function or a curve (a parabola, a hyperbola, sin x, a family of curves with a parameter to drag, a surface z = f(x, y), a curve in space, a graph to explain a point), write a fenced block of language ${LANGUAGE} holding JSON rather than describing it or drawing it with a chart of points; Ta draws it, animated:
100
+ {"title"?: string, "x": [min, max], "y": [min, max], "params"?: {"a": "1.5 + 0.5*sin(t)", "b": 1}, "curves": [...], "points"?: [{"x": 0, "y": 0, "label": "vertex"}], "dot"?: true}
101
+ A param may instead be a slider the user drags, {"c": {"value": 1, "min": -2, "max": 3, "step"?: 0.1, "label"?: string}}, also dragged by moving across the plot; give one whenever the user wants to see how a param changes a curve. A curve with "family": "c" (or {"param": "c", "count": 11}) also draws itself faintly for evenly spaced values of the slider c, the current one bold: a family of curves; add its envelope as a dashed curve when there is one.
102
+ A curve is {"y": "a*x^2"} (y of x, over the x range) or {"x": "a*cosh(s)", "y": "b*sinh(s)", "s": [-2, 2]} (parametric, s over its range), with "label"?, "dash"?: true (asymptotes, axes of symmetry, guides) and "color"? (a CSS color).
103
+ In space: "surfaces": [{"z": "sin(x)*cos(y)", "label"?, "color"?}] (z of x and y, over the x and y ranges, colored by height without a color), a curve with "z" too ({"x": "cos(s)", "y": "sin(s)", "z": "s/4", "s": [0, 12]}) and points with "z"; an optional "z": [min, max]. Ta draws it in 3D, turning slowly, the user turns it by dragging; params, sliders and t work the same.
104
+ Expressions: numbers, + - * / ^ %, parentheses, x, y (of a surface), s, t (seconds since shown: a param or curve that uses it moves), the params (a param may use the sliders and the params before it), and sin cos tan asin acos atan atan2 sinh cosh tanh asinh acosh atanh sqrt cbrt abs exp log log2 log10 pow min max floor ceil round sign hypot pi e. Curves draw in when shown; dot puts a point running along the solid curves. Point coordinates may be expressions too. Labels and title in the user's language, short.`;
105
+
106
+ // web-src/extension.ts
107
+ function activate(pi) {
108
+ let served;
109
+ const underServe = () => served ??= TaHostUtil.reach(pi.events, NAME).then((answer) => answer !== undefined);
110
+ pi.on("session_start", () => {
111
+ underServe();
112
+ });
113
+ pi.on("before_agent_start", async (event) => {
114
+ if (await underServe()) {
115
+ event.systemPromptOptions.sections = { ...event.systemPromptOptions.sections, [LANGUAGE]: PLOT_PROMPT };
116
+ }
117
+ });
118
+ }
119
+ export {
120
+ activate as default
121
+ };
@@ -0,0 +1,15 @@
1
+ /** The little of pi's extension API this uses. */
2
+ interface Pi {
3
+ events: {
4
+ emit(event: string, data: unknown): void;
5
+ };
6
+ on(event: string, handler: (event: never) => unknown): unknown;
7
+ }
8
+ /**
9
+ * The pi extension, in every session: tells the model to show functions and curves as a `ta-plot` block
10
+ * (PLOT_PROMPT), a section of pi's system prompt of its own. Only under ta serve, whose pages draw the plots; under
11
+ * `ta` alone, in a terminal, the prompt stays as pi's.
12
+ */
13
+ export default function activate(pi: Pi): void;
14
+ export {};
15
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = activate;
4
+ const ta_extension_host_1 = require("@celljs/ta-protocol/lib/common/ta-extension-host");
5
+ const plot_prompt_1 = require("./plot-prompt");
6
+ const plot_protocol_1 = require("./plot-protocol");
7
+ /**
8
+ * The pi extension, in every session: tells the model to show functions and curves as a `ta-plot` block
9
+ * (PLOT_PROMPT), a section of pi's system prompt of its own. Only under ta serve, whose pages draw the plots; under
10
+ * `ta` alone, in a terminal, the prompt stays as pi's.
11
+ */
12
+ function activate(pi) {
13
+ let served;
14
+ const underServe = () => (served !== null && served !== void 0 ? served : (served = ta_extension_host_1.TaHostUtil.reach(pi.events, plot_protocol_1.NAME).then(answer => answer !== undefined)));
15
+ pi.on('session_start', () => {
16
+ void underServe();
17
+ });
18
+ pi.on('before_agent_start', async (event) => {
19
+ if (await underServe()) {
20
+ event.systemPromptOptions.sections = { ...event.systemPromptOptions.sections, [plot_protocol_1.LANGUAGE]: plot_prompt_1.PLOT_PROMPT };
21
+ }
22
+ });
23
+ }
24
+ //# sourceMappingURL=extension.js.map
@@ -0,0 +1,14 @@
1
+ import { type TaLanguage } from '@celljs/ta-protocol/lib/common/language';
2
+ import type { Language } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
3
+ declare const EN: {
4
+ drawing: string;
5
+ failed: string;
6
+ };
7
+ type Words = typeof EN;
8
+ /** The words of each language of Ta, checked by scripts/check-i18n.ts. */
9
+ export declare const WORDS: Readonly<Record<TaLanguage, Words>>;
10
+ export declare namespace PlotWords {
11
+ function of(language: Language): Words;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlotWords = exports.WORDS = void 0;
4
+ const language_1 = require("@celljs/ta-protocol/lib/common/language");
5
+ const EN = {
6
+ drawing: 'Drawing the plot…',
7
+ failed: 'This plot cannot be drawn: {reason}',
8
+ };
9
+ const ZH = {
10
+ drawing: '正在画图…',
11
+ failed: '这张图画不出来:{reason}',
12
+ };
13
+ const ZH_TW = {
14
+ drawing: '正在畫圖…',
15
+ failed: '這張圖畫不出來:{reason}',
16
+ };
17
+ const JA = {
18
+ drawing: 'グラフを描画中…',
19
+ failed: 'このグラフは描けません:{reason}',
20
+ };
21
+ /** The words of each language of Ta, checked by scripts/check-i18n.ts. */
22
+ exports.WORDS = { 'zh-CN': ZH, 'zh-TW': ZH_TW, 'en-US': EN, 'ja-JP': JA };
23
+ var PlotWords;
24
+ (function (PlotWords) {
25
+ function of(language) {
26
+ return language_1.TaLanguageUtil.pick(language, exports.WORDS);
27
+ }
28
+ PlotWords.of = of;
29
+ })(PlotWords || (exports.PlotWords = PlotWords = {}));
30
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1,7 @@
1
+ import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
2
+ /**
3
+ * The page side of Function plot: a `ta-plot` block of a reply drawn as an animated plot. The pi extension
4
+ * (extension.ts) tells the model to write such a block for functions and curves.
5
+ */
6
+ export default function activate(pi: WebExtensionAPI): () => void;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = activate;
4
+ const plot_protocol_1 = require("./plot-protocol");
5
+ const plot_view_1 = require("./plot-view");
6
+ const react_1 = require("./react");
7
+ const style_1 = require("./style");
8
+ /**
9
+ * The page side of Function plot: a `ta-plot` block of a reply drawn as an animated plot. The pi extension
10
+ * (extension.ts) tells the model to write such a block for functions and curves.
11
+ */
12
+ function activate(pi) {
13
+ (0, react_1.bind)(pi.React);
14
+ // An older app shows the block as code.
15
+ if (!pi.registerCodeRenderer) {
16
+ return () => undefined;
17
+ }
18
+ const removeStyle = (0, style_1.injectStyle)();
19
+ const view = (0, plot_view_1.plotView)(pi);
20
+ for (const language of [plot_protocol_1.LANGUAGE, ...plot_protocol_1.ALIASES]) {
21
+ pi.registerCodeRenderer(language, view);
22
+ }
23
+ return removeStyle;
24
+ }
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
1
+ /** The value of an expression for the values of its variables, in the order they were named. */
2
+ export type PlotEvaluate = (scope: readonly number[]) => number;
3
+ /**
4
+ * The expressions of a plot: numbers, + - * / % ^ (or **), parentheses, the variables named and the functions and
5
+ * constants of Math. Parsed here, never run as code, so that a block of a reply can do nothing but compute.
6
+ */
7
+ export declare namespace PlotExpression {
8
+ interface Compiled {
9
+ evaluate: PlotEvaluate;
10
+ /** The variables it reads. */
11
+ uses: ReadonlySet<string>;
12
+ }
13
+ /** Throws an Error that says what is wrong for an expression it cannot read. */
14
+ function compile(text: string | number, names: readonly string[]): Compiled;
15
+ }
16
+ //# sourceMappingURL=plot-expression.d.ts.map
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlotExpression = void 0;
4
+ /** Functions of Math an expression may call, with how many arguments each takes (`undefined`: one or more). */
5
+ const FUNCTIONS = new Map(Object.entries({
6
+ sin: [Math.sin, 1],
7
+ cos: [Math.cos, 1],
8
+ tan: [Math.tan, 1],
9
+ asin: [Math.asin, 1],
10
+ acos: [Math.acos, 1],
11
+ atan: [Math.atan, 1],
12
+ atan2: [Math.atan2, 2],
13
+ sinh: [Math.sinh, 1],
14
+ cosh: [Math.cosh, 1],
15
+ tanh: [Math.tanh, 1],
16
+ asinh: [Math.asinh, 1],
17
+ acosh: [Math.acosh, 1],
18
+ atanh: [Math.atanh, 1],
19
+ sqrt: [Math.sqrt, 1],
20
+ cbrt: [Math.cbrt, 1],
21
+ abs: [Math.abs, 1],
22
+ exp: [Math.exp, 1],
23
+ log: [Math.log, 1],
24
+ ln: [Math.log, 1],
25
+ log2: [Math.log2, 1],
26
+ log10: [Math.log10, 1],
27
+ pow: [Math.pow, 2],
28
+ min: [Math.min, undefined],
29
+ max: [Math.max, undefined],
30
+ floor: [Math.floor, 1],
31
+ ceil: [Math.ceil, 1],
32
+ round: [Math.round, 1],
33
+ sign: [Math.sign, 1],
34
+ hypot: [Math.hypot, undefined],
35
+ }));
36
+ const CONSTANTS = new Map(Object.entries({ pi: Math.PI, PI: Math.PI, e: Math.E, E: Math.E }));
37
+ /** A number, a name or an operator, after any space. */
38
+ const TOKEN = /\s*(?:(\d+(?:\.\d*)?(?:[eE][+-]?\d+)?|\.\d+(?:[eE][+-]?\d+)?)|([A-Za-z_]\w*)|(\*\*|[-+*/%^(),]))/y;
39
+ /** Longer than any expression of a plot; a longer one is refused rather than parsed. */
40
+ const MAX_LENGTH = 2000;
41
+ /**
42
+ * The expressions of a plot: numbers, + - * / % ^ (or **), parentheses, the variables named and the functions and
43
+ * constants of Math. Parsed here, never run as code, so that a block of a reply can do nothing but compute.
44
+ */
45
+ var PlotExpression;
46
+ (function (PlotExpression) {
47
+ /** Throws an Error that says what is wrong for an expression it cannot read. */
48
+ function compile(text, names) {
49
+ return new PlotParser(String(text), names).parse();
50
+ }
51
+ PlotExpression.compile = compile;
52
+ })(PlotExpression || (exports.PlotExpression = PlotExpression = {}));
53
+ class PlotParser {
54
+ constructor(text, names) {
55
+ this.text = text;
56
+ this.names = names;
57
+ this.at = 0;
58
+ this.uses = new Set();
59
+ this.tokens = PlotParser.tokenize(text);
60
+ }
61
+ parse() {
62
+ const evaluate = this.sum();
63
+ if (this.at < this.tokens.length) {
64
+ throw this.unexpected();
65
+ }
66
+ return { evaluate, uses: this.uses };
67
+ }
68
+ sum() {
69
+ let left = this.product();
70
+ for (let operator = this.operator('+', '-'); operator; operator = this.operator('+', '-')) {
71
+ const a = left;
72
+ const b = this.product();
73
+ left = operator === '+' ? scope => a(scope) + b(scope) : scope => a(scope) - b(scope);
74
+ }
75
+ return left;
76
+ }
77
+ product() {
78
+ let left = this.unary();
79
+ for (let operator = this.operator('*', '/', '%'); operator; operator = this.operator('*', '/', '%')) {
80
+ const a = left;
81
+ const b = this.unary();
82
+ left = operator === '*' ? scope => a(scope) * b(scope) : operator === '/' ? scope => a(scope) / b(scope) : scope => a(scope) % b(scope);
83
+ }
84
+ return left;
85
+ }
86
+ /** A sign binds looser than a power: -x^2 is -(x^2). */
87
+ unary() {
88
+ const sign = this.operator('-', '+');
89
+ if (sign) {
90
+ const value = this.unary();
91
+ return sign === '-' ? scope => -value(scope) : value;
92
+ }
93
+ return this.power();
94
+ }
95
+ /** Right to left: 2^3^2 is 2^(3^2). */
96
+ power() {
97
+ const base = this.primary();
98
+ if (this.operator('^', '**')) {
99
+ const exponent = this.unary();
100
+ return scope => base(scope) ** exponent(scope);
101
+ }
102
+ return base;
103
+ }
104
+ primary() {
105
+ const token = this.tokens[this.at++];
106
+ if (!token) {
107
+ throw new Error(`Unfinished expression: ${this.text}`);
108
+ }
109
+ if (token.kind === 'number') {
110
+ const value = token.value;
111
+ return () => value;
112
+ }
113
+ if (token.kind === 'operator') {
114
+ if (token.value !== '(') {
115
+ this.at--;
116
+ throw this.unexpected();
117
+ }
118
+ const inner = this.sum();
119
+ this.expect(')');
120
+ return inner;
121
+ }
122
+ return this.operator('(') ? this.call(token.value) : this.variable(token.value);
123
+ }
124
+ variable(name) {
125
+ const index = this.names.indexOf(name);
126
+ if (index >= 0) {
127
+ this.uses.add(name);
128
+ return scope => scope[index];
129
+ }
130
+ const constant = CONSTANTS.get(name);
131
+ if (constant !== undefined) {
132
+ const value = constant;
133
+ return () => value;
134
+ }
135
+ throw new Error(`Unknown name: ${name}`);
136
+ }
137
+ call(name) {
138
+ const known = FUNCTIONS.get(name);
139
+ if (!known) {
140
+ throw new Error(`Unknown function: ${name}`);
141
+ }
142
+ const [fn, arity] = known;
143
+ const args = [this.sum()];
144
+ while (this.operator(',')) {
145
+ args.push(this.sum());
146
+ }
147
+ this.expect(')');
148
+ if (arity !== undefined && args.length !== arity) {
149
+ throw new Error(`${name} takes ${arity} argument${arity === 1 ? '' : 's'}`);
150
+ }
151
+ if (args.length === 1) {
152
+ const [a] = args;
153
+ return scope => fn(a(scope));
154
+ }
155
+ if (args.length === 2) {
156
+ const [a, b] = args;
157
+ return scope => fn(a(scope), b(scope));
158
+ }
159
+ return scope => fn(...args.map(arg => arg(scope)));
160
+ }
161
+ /** The next token, taken, when it is one of `operators`. */
162
+ operator(...operators) {
163
+ const token = this.tokens[this.at];
164
+ if ((token === null || token === void 0 ? void 0 : token.kind) === 'operator' && operators.includes(token.value)) {
165
+ this.at++;
166
+ return token.value;
167
+ }
168
+ return undefined;
169
+ }
170
+ expect(operator) {
171
+ if (!this.operator(operator)) {
172
+ throw this.unexpected(operator);
173
+ }
174
+ }
175
+ unexpected(expected) {
176
+ const token = this.tokens[this.at];
177
+ const found = token ? `"${token.value}"` : 'the end';
178
+ return new Error(`${expected ? `Expected "${expected}" but found` : 'Unexpected'} ${found} in: ${this.text}`);
179
+ }
180
+ static tokenize(text) {
181
+ if (text.length > MAX_LENGTH) {
182
+ throw new Error('Expression too long');
183
+ }
184
+ const tokens = [];
185
+ let at = 0;
186
+ while (at < text.length) {
187
+ TOKEN.lastIndex = at;
188
+ const match = TOKEN.exec(text);
189
+ if (!match) {
190
+ if (!text.slice(at).trim()) {
191
+ break;
192
+ }
193
+ throw new Error(`Unsupported character "${text.slice(at).trim()[0]}" in: ${text}`);
194
+ }
195
+ at = TOKEN.lastIndex;
196
+ if (match[1] !== undefined) {
197
+ tokens.push({ kind: 'number', value: Number(match[1]) });
198
+ }
199
+ else if (match[2] !== undefined) {
200
+ tokens.push({ kind: 'name', value: match[2] });
201
+ }
202
+ else {
203
+ tokens.push({ kind: 'operator', value: match[3] });
204
+ }
205
+ }
206
+ return tokens;
207
+ }
208
+ }
209
+ //# sourceMappingURL=plot-expression.js.map