@openclaw/feishu 2026.9.5 → 2026.9.6

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 (379) hide show
  1. package/dist/.setup/{channel-C1KrXXJa.mjs → channel-DsndN1sp.mjs} +3 -3
  2. package/dist/.setup/{channel.runtime-Bizuv7WZ.mjs → channel.runtime-tihKUwVI.mjs} +3 -3
  3. package/dist/.setup/{chat-dWJYS63b.mjs → chat-BlvUjdN9.mjs} +1 -1
  4. package/dist/.setup/{monitor-C69OLzgO.mjs → monitor-OTT7VckU.mjs} +4 -3
  5. package/dist/.setup/{monitor.account-zwHb3HKM.mjs → monitor.account-D5j6WomE.mjs} +233 -79
  6. package/dist/.setup/{reply-delivery-result-DFjxGLgX.mjs → reply-delivery-result-CRIHpSze.mjs} +9 -4
  7. package/dist/.setup/{setup-api-CTRwX09n.mjs → setup-api-VAUkwtTi.mjs} +1 -1
  8. package/dist/api.js +4 -4
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/setup-api.js +1 -1
  11. package/dist/setup-entry.js +1 -1
  12. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +13 -0
  13. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -1
  14. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +35 -16
  15. package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +5 -0
  16. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +26 -3
  17. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +13 -0
  18. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -1
  19. package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +37 -17
  20. package/node_modules/micromark-extension-gfm-table/lib/html.js +5 -0
  21. package/node_modules/micromark-extension-gfm-table/lib/syntax.js +29 -2
  22. package/node_modules/micromark-extension-gfm-table/package.json +6 -48
  23. package/node_modules/micromark-extension-gfm-table/readme.md +40 -40
  24. package/node_modules/zod/README.md +2 -2
  25. package/node_modules/zod/compile.cjs +19 -0
  26. package/node_modules/zod/index.cjs +19 -0
  27. package/node_modules/zod/locales/index.cjs +19 -0
  28. package/node_modules/zod/mini/index.cjs +19 -0
  29. package/node_modules/zod/package.json +8 -7
  30. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  31. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  32. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  33. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  34. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  35. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  36. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  37. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  38. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  39. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  40. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  41. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  42. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  43. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  44. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  45. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  46. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  47. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  48. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  49. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  50. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  51. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  52. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  53. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  54. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  55. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  56. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  57. package/node_modules/zod/src/v4/core/api.ts +44 -28
  58. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  59. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  60. package/node_modules/zod/src/v4/core/core.ts +1 -3
  61. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  62. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  63. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  64. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  65. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  66. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  67. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  68. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  69. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  70. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  71. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  72. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  73. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  74. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  75. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  76. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  77. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  78. package/node_modules/zod/src/v4/core/util.ts +218 -147
  79. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  80. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  81. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  82. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  83. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  84. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  85. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  86. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  87. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  88. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  89. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  90. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  91. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  92. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  93. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  94. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  95. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  96. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  97. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  98. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  99. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  100. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  101. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  102. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  103. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  104. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  105. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  106. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  107. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  108. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  109. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  110. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  111. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  112. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  113. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  114. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  115. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  116. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  117. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  118. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  119. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  120. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  121. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  122. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  123. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  124. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  125. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  126. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  127. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  128. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  129. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  130. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  131. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  132. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  133. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  134. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  135. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  136. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  137. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  138. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  139. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  140. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  141. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  142. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  143. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  144. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  145. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  146. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  147. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  148. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  149. package/node_modules/zod/v3/ZodError.cjs +19 -0
  150. package/node_modules/zod/v3/errors.cjs +19 -0
  151. package/node_modules/zod/v3/external.cjs +19 -0
  152. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  153. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  154. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  155. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  156. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  157. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  158. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  159. package/node_modules/zod/v3/index.cjs +19 -0
  160. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  161. package/node_modules/zod/v3/types.cjs +19 -0
  162. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  163. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  164. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  165. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  166. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  167. package/node_modules/zod/v4/classic/external.cjs +22 -1
  168. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  169. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  170. package/node_modules/zod/v4/classic/external.js +1 -1
  171. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  172. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  173. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  174. package/node_modules/zod/v4/classic/index.cjs +19 -0
  175. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  176. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  177. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  178. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  179. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  180. package/node_modules/zod/v4/classic/schemas.js +77 -33
  181. package/node_modules/zod/v4/core/api.cjs +45 -22
  182. package/node_modules/zod/v4/core/api.d.cts +12 -6
  183. package/node_modules/zod/v4/core/api.d.ts +12 -6
  184. package/node_modules/zod/v4/core/api.js +25 -22
  185. package/node_modules/zod/v4/core/checks.cjs +51 -97
  186. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  187. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  188. package/node_modules/zod/v4/core/checks.js +31 -96
  189. package/node_modules/zod/v4/core/compile.cjs +173 -78
  190. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  191. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  192. package/node_modules/zod/v4/core/compile.js +154 -79
  193. package/node_modules/zod/v4/core/core.cjs +20 -1
  194. package/node_modules/zod/v4/core/core.js +1 -1
  195. package/node_modules/zod/v4/core/doc.cjs +26 -2
  196. package/node_modules/zod/v4/core/doc.js +7 -2
  197. package/node_modules/zod/v4/core/errors.cjs +21 -5
  198. package/node_modules/zod/v4/core/errors.js +2 -5
  199. package/node_modules/zod/v4/core/index.cjs +19 -0
  200. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  201. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  202. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  203. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  204. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  205. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  206. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  207. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  208. package/node_modules/zod/v4/core/memoizer.js +69 -23
  209. package/node_modules/zod/v4/core/parse.cjs +56 -16
  210. package/node_modules/zod/v4/core/parse.js +37 -16
  211. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  212. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  213. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  214. package/node_modules/zod/v4/core/regexes.js +10 -4
  215. package/node_modules/zod/v4/core/registries.cjs +19 -0
  216. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  217. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  218. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  219. package/node_modules/zod/v4/core/schemas.js +279 -113
  220. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  221. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  222. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  223. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  224. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  225. package/node_modules/zod/v4/core/util.cjs +177 -143
  226. package/node_modules/zod/v4/core/util.d.cts +25 -4
  227. package/node_modules/zod/v4/core/util.d.ts +25 -4
  228. package/node_modules/zod/v4/core/util.js +156 -143
  229. package/node_modules/zod/v4/core/versions.cjs +21 -2
  230. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  231. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  232. package/node_modules/zod/v4/core/versions.js +2 -2
  233. package/node_modules/zod/v4/core/visit.cjs +19 -0
  234. package/node_modules/zod/v4/index.cjs +19 -0
  235. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  236. package/node_modules/zod/v4/locales/ar.js +2 -0
  237. package/node_modules/zod/v4/locales/az.cjs +2 -0
  238. package/node_modules/zod/v4/locales/az.js +2 -0
  239. package/node_modules/zod/v4/locales/be.cjs +2 -0
  240. package/node_modules/zod/v4/locales/be.js +2 -0
  241. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  242. package/node_modules/zod/v4/locales/bg.js +2 -0
  243. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  244. package/node_modules/zod/v4/locales/bn.js +2 -0
  245. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  246. package/node_modules/zod/v4/locales/ca.js +2 -0
  247. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  248. package/node_modules/zod/v4/locales/ckb.js +2 -0
  249. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  250. package/node_modules/zod/v4/locales/cs.js +2 -0
  251. package/node_modules/zod/v4/locales/da.cjs +2 -0
  252. package/node_modules/zod/v4/locales/da.js +2 -0
  253. package/node_modules/zod/v4/locales/de.cjs +2 -0
  254. package/node_modules/zod/v4/locales/de.js +2 -0
  255. package/node_modules/zod/v4/locales/el.cjs +2 -0
  256. package/node_modules/zod/v4/locales/el.js +2 -0
  257. package/node_modules/zod/v4/locales/en.cjs +2 -0
  258. package/node_modules/zod/v4/locales/en.js +2 -0
  259. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  260. package/node_modules/zod/v4/locales/eo.js +2 -0
  261. package/node_modules/zod/v4/locales/es.cjs +2 -0
  262. package/node_modules/zod/v4/locales/es.js +2 -0
  263. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  264. package/node_modules/zod/v4/locales/fa.js +2 -0
  265. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  266. package/node_modules/zod/v4/locales/fi.js +2 -0
  267. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  268. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  269. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  270. package/node_modules/zod/v4/locales/fr.js +2 -0
  271. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  272. package/node_modules/zod/v4/locales/gu.js +2 -0
  273. package/node_modules/zod/v4/locales/he.cjs +2 -0
  274. package/node_modules/zod/v4/locales/he.js +2 -0
  275. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  276. package/node_modules/zod/v4/locales/hi.js +2 -0
  277. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  278. package/node_modules/zod/v4/locales/hr.js +2 -0
  279. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  280. package/node_modules/zod/v4/locales/hu.js +2 -0
  281. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  282. package/node_modules/zod/v4/locales/hy.js +2 -0
  283. package/node_modules/zod/v4/locales/id.cjs +2 -0
  284. package/node_modules/zod/v4/locales/id.js +2 -0
  285. package/node_modules/zod/v4/locales/index.cjs +22 -1
  286. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  287. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  288. package/node_modules/zod/v4/locales/index.js +1 -0
  289. package/node_modules/zod/v4/locales/is.cjs +2 -0
  290. package/node_modules/zod/v4/locales/is.js +2 -0
  291. package/node_modules/zod/v4/locales/it.cjs +2 -0
  292. package/node_modules/zod/v4/locales/it.js +2 -0
  293. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  294. package/node_modules/zod/v4/locales/ja.js +2 -0
  295. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  296. package/node_modules/zod/v4/locales/ka.js +2 -0
  297. package/node_modules/zod/v4/locales/km.cjs +2 -0
  298. package/node_modules/zod/v4/locales/km.js +2 -0
  299. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  300. package/node_modules/zod/v4/locales/kn.js +2 -0
  301. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  302. package/node_modules/zod/v4/locales/ko.js +2 -0
  303. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  304. package/node_modules/zod/v4/locales/lt.js +2 -0
  305. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  306. package/node_modules/zod/v4/locales/mk.js +2 -0
  307. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  308. package/node_modules/zod/v4/locales/ms.js +2 -0
  309. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  310. package/node_modules/zod/v4/locales/ne.js +2 -0
  311. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  312. package/node_modules/zod/v4/locales/nl.js +2 -0
  313. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  314. package/node_modules/zod/v4/locales/nn.js +2 -0
  315. package/node_modules/zod/v4/locales/no.cjs +2 -0
  316. package/node_modules/zod/v4/locales/no.js +2 -0
  317. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  318. package/node_modules/zod/v4/locales/ota.js +2 -0
  319. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  320. package/node_modules/zod/v4/locales/pl.js +2 -0
  321. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  322. package/node_modules/zod/v4/locales/ps.js +2 -0
  323. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  324. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  325. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  326. package/node_modules/zod/v4/locales/pt.js +2 -0
  327. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  328. package/node_modules/zod/v4/locales/ro.js +2 -0
  329. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  330. package/node_modules/zod/v4/locales/ru.js +2 -0
  331. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  332. package/node_modules/zod/v4/locales/sk.js +2 -0
  333. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  334. package/node_modules/zod/v4/locales/sl.js +2 -0
  335. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  336. package/node_modules/zod/v4/locales/sv.js +2 -0
  337. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  338. package/node_modules/zod/v4/locales/ta.js +2 -0
  339. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  340. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  341. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  342. package/node_modules/zod/v4/locales/tg.js +117 -0
  343. package/node_modules/zod/v4/locales/th.cjs +2 -0
  344. package/node_modules/zod/v4/locales/th.js +2 -0
  345. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  346. package/node_modules/zod/v4/locales/tk.js +2 -0
  347. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  348. package/node_modules/zod/v4/locales/tr.js +2 -0
  349. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  350. package/node_modules/zod/v4/locales/uk.js +2 -0
  351. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  352. package/node_modules/zod/v4/locales/ur.js +2 -0
  353. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  354. package/node_modules/zod/v4/locales/uz.js +2 -0
  355. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  356. package/node_modules/zod/v4/locales/vi.js +2 -0
  357. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  358. package/node_modules/zod/v4/locales/yo.js +2 -0
  359. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  360. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  361. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  362. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  363. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  364. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  365. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  366. package/node_modules/zod/v4/mini/external.cjs +22 -1
  367. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  368. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  369. package/node_modules/zod/v4/mini/external.js +1 -1
  370. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  371. package/node_modules/zod/v4/mini/index.cjs +19 -0
  372. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  373. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  374. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  375. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  376. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  377. package/node_modules/zod/v4/mini/schemas.js +21 -6
  378. package/node_modules/zod/v4-mini/index.cjs +19 -0
  379. package/package.json +6 -6
@@ -1,8 +1,8 @@
1
1
  import { a as resolveDefaultFeishuAccountId, i as listFeishuAccountIds, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-DmU0xYPx.mjs";
2
2
  import { l as normalizeFeishuTarget, s as detectIdType, u as resolveReceiveIdType } from "./conversation-id-H-lUayji.mjs";
3
3
  import { o as normalizeFeishuExternalKey } from "./doctor-contract-w6FpMypv.mjs";
4
- import { c as withFeishuMessageDispatch, o as captureFeishuSendAuthority, r as createFeishuClient, s as runBeforeFeishuMessageDispatch } from "./client-DCwNVFZg.mjs";
5
4
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
5
+ import { c as withFeishuMessageDispatch, o as captureFeishuSendAuthority, r as createFeishuClient, s as runBeforeFeishuMessageDispatch } from "./client-DCwNVFZg.mjs";
6
6
  import { normalizeAccountId, normalizeOptionalAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
7
7
  import { compileAllowlist, resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
8
8
  import { ToolAuthorizationError } from "openclaw/plugin-sdk/channel-actions";
@@ -13,7 +13,7 @@ import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtim
13
13
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { convertMarkdownTables, markdownToIRWithMeta } from "openclaw/plugin-sdk/text-chunking";
15
15
  import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
16
- import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
16
+ import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
17
17
  import fs from "node:fs";
18
18
  import path from "node:path";
19
19
  import { fromMarkdown } from "mdast-util-from-markdown";
@@ -199,7 +199,7 @@ function createFeishuIngressSubject(params) {
199
199
  };
200
200
  }
201
201
  function createFeishuIngressResolver(params) {
202
- return createChannelIngressResolver({
202
+ return getFeishuRuntime().channel.inbound.ingress.createResolver({
203
203
  channelId: "feishu",
204
204
  accountId: normalizeAccountId(params.accountId) ?? "default",
205
205
  identity: feishuIngressIdentity,
@@ -3625,6 +3625,11 @@ async function renderFeishuReplyPayload(payload, ctx) {
3625
3625
  //#endregion
3626
3626
  //#region extensions/feishu/src/reply-delivery-result.ts
3627
3627
  const noVisibleFeishuReplyDelivery = { visibleReplySent: false };
3628
+ function shouldSendNoVisibleReplyFallback(dispatchResult) {
3629
+ const emptyEligibleDispatch = dispatchResult.noVisibleReplyFallbackEligible === true && dispatchResult.settledReceipt?.anyVisibleDelivered !== true;
3630
+ const finalFailedBeforeSend = (dispatchResult.settledReceipt?.counts.final.failedBeforeSend ?? 0) > 0;
3631
+ return dispatchResult.sendPolicyDenied !== true && dispatchResult.sourceReplyDeliveryMode !== "message_tool_only" && (emptyEligibleDispatch || finalFailedBeforeSend);
3632
+ }
3628
3633
  function hasProviderIdentity(result) {
3629
3634
  return Boolean(result && (result.messageId?.trim() || result.receipt?.primaryPlatformMessageId?.trim() || result.receipt?.platformMessageIds.length));
3630
3635
  }
@@ -3660,4 +3665,4 @@ function createFeishuPartialReplyDeliveryError(cause, result) {
3660
3665
  });
3661
3666
  }
3662
3667
  //#endregion
3663
- export { createCommentTypingReactionLifecycle as $, sendStructuredCardFeishu as A, resolveFeishuChatType as At, assertFeishuApiSuccess as B, shouldSuppressFeishuTextForVoiceMedia as C, resolveFeishuDmIngressAccess as Ct, listFeishuThreadMessages as D, resolveFeishuGroupToolPolicy as Dt, getMessageFeishu as E, resolveFeishuGroupSenderActivationIngressAccess as Et, isMentionForwardRequest as F, registerFeishuDriveTools as G, resolveFeishuIdentityEmoji as H, isFeishuGroupChatType as I, unknownToolActionResult as J, feishuExternalToolResult as K, normalizeFeishuEventChatType as L, formatFeishuMediaContent as M, buildFeishuCardActionTextFallback as Mt, extractMentionTargets as N, createFeishuCardInteractionEnvelope as Nt, sendCardFeishu as O, resolveFeishuReplyPolicy as Ot, isFeishuBroadcastMention as P, decodeFeishuCardAction as Pt, cleanupAmbientCommentTypingReaction as Q, parseInteractiveCardContent as R, sendStickerFeishu as S, normalizeFeishuAllowEntry as St, editMessageFeishu as T, resolveFeishuGroupConversationIngressAccess as Tt, resolveFeishuIdentityHeaderTitle as U, buildFeishuMediaFallbackText as V, deliverCommentThreadText as W, resolveAnyEnabledFeishuToolsConfig as X, createFeishuToolClient as Y, resolveFeishuToolAccount as Z, renderFeishuReplyPayload as _, canEnumerateAllFeishuPeers as _t, FEISHU_PRESENTATION_CAPABILITIES as a, buildFeishuCommentTarget as at, saveMessageResourceFeishu as b, resolveFeishuChatReadPreliminaryAuthorization as bt, buildFeishuPresentationCard as c, readNativeFeishuCardJson as ct, feishuCardWithinTableLimit as d, chunkFeishuPostMarkdown as dt, encodeQuery as et, isFeishuCardWithinEnvelope as f, materializeFeishuPostMarkdownSoftBreaks as ft, renderFeishuPresentationPayload as g, canEnumerateAllFeishuGroups as gt, renderFeishuPresentationFallbackText as h, authorizeFeishuChatMemberRead as ht, noVisibleFeishuReplyDelivery as i, requestFeishuApi as it, toFeishuMessageSendResult as j, FEISHU_CARD_INTERACTION_VERSION as jt, sendMessageFeishu as k, normalizeFeishuChatType as kt, buildFeishuPresentationFallback as l, resolveFeishuCardTemplate as lt, readNativeFeishuCard as m, assertFeishuChatReadAllowed as mt, createFeishuReplyDeliveryResult as n, formatFeishuApiError as nt, assertFeishuCardWithinEnvelope as o, normalizeCommentFileType as ot, markRenderedFeishuCard as p, parseFeishuMarkdown as pt, toolExecutionErrorResult as q, mergeFeishuReplyDeliveryResults as r, parseCommentContentElements as rt, buildFeishuPayloadCard as s, parseFeishuCommentTarget as st, createFeishuPartialReplyDeliveryError as t, extractReplyText as tt, consumeFeishuPresentationFallbackMarker as u, chunkFeishuMarkdown as ut, resolveFeishuRichReply as v, isFeishuGroupReadAllowed as vt, chunkFeishuCardMarkdown as w, resolveFeishuGroupConfig as wt, sendMediaFeishu as x, hasExplicitFeishuGroupConfig as xt, withinCardTableLimit as y, isFeishuGroupReadEnabled as yt, parsePostContent as z };
3668
+ export { cleanupAmbientCommentTypingReaction as $, sendMessageFeishu as A, normalizeFeishuChatType as At, parsePostContent as B, sendStickerFeishu as C, normalizeFeishuAllowEntry as Ct, getMessageFeishu as D, resolveFeishuGroupSenderActivationIngressAccess as Dt, editMessageFeishu as E, resolveFeishuGroupConversationIngressAccess as Et, isFeishuBroadcastMention as F, decodeFeishuCardAction as Ft, deliverCommentThreadText as G, buildFeishuMediaFallbackText as H, isMentionForwardRequest as I, toolExecutionErrorResult as J, registerFeishuDriveTools as K, isFeishuGroupChatType as L, toFeishuMessageSendResult as M, FEISHU_CARD_INTERACTION_VERSION as Mt, formatFeishuMediaContent as N, buildFeishuCardActionTextFallback as Nt, listFeishuThreadMessages as O, resolveFeishuGroupToolPolicy as Ot, extractMentionTargets as P, createFeishuCardInteractionEnvelope as Pt, resolveFeishuToolAccount as Q, normalizeFeishuEventChatType as R, sendMediaFeishu as S, hasExplicitFeishuGroupConfig as St, chunkFeishuCardMarkdown as T, resolveFeishuGroupConfig as Tt, resolveFeishuIdentityEmoji as U, assertFeishuApiSuccess as V, resolveFeishuIdentityHeaderTitle as W, createFeishuToolClient as X, unknownToolActionResult as Y, resolveAnyEnabledFeishuToolsConfig as Z, renderFeishuPresentationPayload as _, canEnumerateAllFeishuGroups as _t, shouldSendNoVisibleReplyFallback as a, requestFeishuApi as at, withinCardTableLimit as b, isFeishuGroupReadEnabled as bt, buildFeishuPayloadCard as c, parseFeishuCommentTarget as ct, consumeFeishuPresentationFallbackMarker as d, chunkFeishuMarkdown as dt, createCommentTypingReactionLifecycle as et, feishuCardWithinTableLimit as f, chunkFeishuPostMarkdown as ft, renderFeishuPresentationFallbackText as g, authorizeFeishuChatMemberRead as gt, readNativeFeishuCard as h, assertFeishuChatReadAllowed as ht, noVisibleFeishuReplyDelivery as i, parseCommentContentElements as it, sendStructuredCardFeishu as j, resolveFeishuChatType as jt, sendCardFeishu as k, resolveFeishuReplyPolicy as kt, buildFeishuPresentationCard as l, readNativeFeishuCardJson as lt, markRenderedFeishuCard as m, parseFeishuMarkdown as mt, createFeishuReplyDeliveryResult as n, extractReplyText as nt, FEISHU_PRESENTATION_CAPABILITIES as o, buildFeishuCommentTarget as ot, isFeishuCardWithinEnvelope as p, materializeFeishuPostMarkdownSoftBreaks as pt, feishuExternalToolResult as q, mergeFeishuReplyDeliveryResults as r, formatFeishuApiError as rt, assertFeishuCardWithinEnvelope as s, normalizeCommentFileType as st, createFeishuPartialReplyDeliveryError as t, encodeQuery as tt, buildFeishuPresentationFallback as u, resolveFeishuCardTemplate as ut, renderFeishuReplyPayload as v, canEnumerateAllFeishuPeers as vt, shouldSuppressFeishuTextForVoiceMedia as w, resolveFeishuDmIngressAccess as wt, saveMessageResourceFeishu as x, resolveFeishuChatReadPreliminaryAuthorization as xt, resolveFeishuRichReply as y, isFeishuGroupReadAllowed as yt, parseInteractiveCardContent as z };
@@ -1,3 +1,3 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-C1KrXXJa.mjs";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-DsndN1sp.mjs";
2
2
  import "../setup-api.js";
3
3
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
package/dist/api.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./.setup/conversation-id-H-lUayji.mjs";
2
- import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-C1KrXXJa.mjs";
3
- import { G as registerFeishuDriveTools, J as unknownToolActionResult, K as feishuExternalToolResult, X as resolveAnyEnabledFeishuToolsConfig, Y as createFeishuToolClient, Z as resolveFeishuToolAccount, pt as parseFeishuMarkdown, q as toolExecutionErrorResult, ut as chunkFeishuMarkdown } from "./.setup/reply-delivery-result-DFjxGLgX.mjs";
4
- import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-DCwNVFZg.mjs";
2
+ import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./.setup/channel-DsndN1sp.mjs";
3
+ import { J as toolExecutionErrorResult, K as registerFeishuDriveTools, Q as resolveFeishuToolAccount, X as createFeishuToolClient, Y as unknownToolActionResult, Z as resolveAnyEnabledFeishuToolsConfig, dt as chunkFeishuMarkdown, mt as parseFeishuMarkdown, q as feishuExternalToolResult } from "./.setup/reply-delivery-result-CRIHpSze.mjs";
5
4
  import { t as getFeishuRuntime } from "./.setup/runtime-C5JxBWZp.mjs";
6
- import { o as registerFeishuChatTools } from "./.setup/chat-dWJYS63b.mjs";
5
+ import { f as resolveConfiguredHttpTimeoutMs, r as createFeishuClient } from "./.setup/client-DCwNVFZg.mjs";
6
+ import { o as registerFeishuChatTools } from "./.setup/chat-BlvUjdN9.mjs";
7
7
  import { n as getFeishuThreadBindingManager, t as createFeishuThreadBindingManager } from "./.setup/thread-bindings-BiL1wGqK.mjs";
8
8
  import { n as handleFeishuSubagentEnded, t as handleFeishuSubagentDeliveryTarget } from "./.setup/subagent-hooks-BBfF1hZk.mjs";
9
9
  import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./.setup/channel-C1KrXXJa.mjs";
1
+ import { t as feishuPlugin } from "./.setup/channel-DsndN1sp.mjs";
2
2
  export { feishuPlugin };
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./.setup/channel-C1KrXXJa.mjs";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./.setup/channel-DsndN1sp.mjs";
2
2
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
4
4
  var setup_entry_default = defineBundledChannelSetupEntry({
5
5
  importMetaUrl: import.meta.url,
6
6
  plugin: {
7
- specifier: fileURLToPath(new URL(".setup/setup-api-CTRwX09n.mjs", import.meta.url).href),
7
+ specifier: fileURLToPath(new URL(".setup/setup-api-VAUkwtTi.mjs", import.meta.url).href),
8
8
  exportName: "feishuPlugin"
9
9
  },
10
10
  secrets: {
@@ -15,20 +15,33 @@ export class EditMap {
15
15
  * @type {Array<Change>}
16
16
  */
17
17
  map: Array<Change>;
18
+ /**
19
+ * Changes by index, so `add` does not scan `map` (quadratic on
20
+ * table-heavy documents).
21
+ *
22
+ * @type {Map<number, Change>}
23
+ */
24
+ index: Map<number, Change>;
18
25
  /**
19
26
  * Create an edit: a remove and/or add at a certain place.
20
27
  *
21
28
  * @param {number} index
29
+ * Index at which to apply the edit.
22
30
  * @param {number} remove
31
+ * Count of items to remove at the index.
23
32
  * @param {Array<Event>} add
33
+ * Items to add at the index.
24
34
  * @returns {undefined}
35
+ * Nothing.
25
36
  */
26
37
  add(index: number, remove: number, add: Array<Event>): undefined;
27
38
  /**
28
39
  * Done, change the events.
29
40
  *
30
41
  * @param {Array<Event>} events
42
+ * List of events to apply the edits to.
31
43
  * @returns {undefined}
44
+ * Nothing.
32
45
  */
33
46
  consume(events: Array<Event>): undefined;
34
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAGf;;;;;;;OAOG;IACH,WALW,MAAM,UACN,MAAM,OACN,KAAK,CAAC,KAAK,CAAC,GACV,SAAS,CAIrB;IAeD;;;;;OAKG;IACH,gBAHW,KAAK,CAAC,KAAK,CAAC,GACV,SAAS,CA2DrB;CACF;qBA7GY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
1
+ {"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAEb;;;;;OAKG;IACH,OAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEP;IAGxB;;;;;;;;;;;OAWG;IACH,WATW,MAAM,UAEN,MAAM,OAEN,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CAKrB;IAeD;;;;;;;OAOG;IACH,gBALW,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CA6DrB;CACF;qBA5HY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
@@ -34,15 +34,27 @@ export class EditMap {
34
34
  * @type {Array<Change>}
35
35
  */
36
36
  this.map = []
37
+
38
+ /**
39
+ * Changes by index, so `add` does not scan `map` (quadratic on
40
+ * table-heavy documents).
41
+ *
42
+ * @type {Map<number, Change>}
43
+ */
44
+ this.index = new Map()
37
45
  }
38
46
 
39
47
  /**
40
48
  * Create an edit: a remove and/or add at a certain place.
41
49
  *
42
50
  * @param {number} index
51
+ * Index at which to apply the edit.
43
52
  * @param {number} remove
53
+ * Count of items to remove at the index.
44
54
  * @param {Array<Event>} add
55
+ * Items to add at the index.
45
56
  * @returns {undefined}
57
+ * Nothing.
46
58
  */
47
59
  add(index, remove, add) {
48
60
  addImplementation(this, index, remove, add)
@@ -65,7 +77,9 @@ export class EditMap {
65
77
  * Done, change the events.
66
78
  *
67
79
  * @param {Array<Event>} events
80
+ * List of events to apply the edits to.
68
81
  * @returns {undefined}
82
+ * Nothing.
69
83
  */
70
84
  consume(events) {
71
85
  this.map.sort(function (a, b) {
@@ -124,6 +138,7 @@ export class EditMap {
124
138
 
125
139
  // Truncate everything.
126
140
  this.map.length = 0
141
+ this.index.clear()
127
142
  }
128
143
  }
129
144
 
@@ -131,38 +146,42 @@ export class EditMap {
131
146
  * Create an edit.
132
147
  *
133
148
  * @param {EditMap} editMap
149
+ * Edit map to apply to.
134
150
  * @param {number} at
151
+ * Index at which to apply the edit.
135
152
  * @param {number} remove
153
+ * Count of items to remove at the index.
136
154
  * @param {Array<Event>} add
155
+ * Items to add at the index.
137
156
  * @returns {undefined}
157
+ * Nothing.
138
158
  */
139
159
  function addImplementation(editMap, at, remove, add) {
140
- let index = 0
141
-
142
160
  /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
143
161
  if (remove === 0 && add.length === 0) {
144
162
  return
145
163
  }
146
164
 
147
- while (index < editMap.map.length) {
148
- if (editMap.map[index][0] === at) {
149
- editMap.map[index][1] += remove
165
+ const existing = editMap.index.get(at)
150
166
 
151
- // To do: before not used by tables, use when moving to micromark.
152
- // if (before) {
153
- // add.push(...editMap.map[index][2])
154
- // editMap.map[index][2] = add
155
- // } else {
156
- editMap.map[index][2].push(...add)
157
- // }
167
+ if (existing) {
168
+ existing[1] += remove
158
169
 
159
- return
160
- }
170
+ // To do: before not used by tables, use when moving to micromark.
171
+ // if (before) {
172
+ // add.push(...existing[2])
173
+ // existing[2] = add
174
+ // } else {
175
+ existing[2].push(...add)
176
+ // }
161
177
 
162
- index += 1
178
+ return
163
179
  }
164
180
 
165
- editMap.map.push([at, remove, add])
181
+ /** @type {Change} */
182
+ const change = [at, remove, add]
183
+ editMap.map.push(change)
184
+ editMap.index.set(at, change)
166
185
  }
167
186
 
168
187
  // /**
@@ -138,9 +138,14 @@ export function gfmTableHtml() {
138
138
  }
139
139
 
140
140
  /**
141
+ * Replace escaped characters in table cells.
142
+ *
141
143
  * @param {string} $0
144
+ * Whole.
142
145
  * @param {string} $1
146
+ * Escaped character (either a backslash or a pipe).
143
147
  * @returns {string}
148
+ * Replacement for the escaped character.
144
149
  */
145
150
  function replace($0, $1) {
146
151
  // Pipes work, backslashes don’t (but can’t escape pipes).
@@ -37,6 +37,8 @@ export function gfmTable() {
37
37
  }
38
38
 
39
39
  /**
40
+ * Tokenizer for GFM tables.
41
+ *
40
42
  * @this {TokenizeContext}
41
43
  * @type {Tokenizer}
42
44
  */
@@ -69,14 +71,16 @@ function tokenizeTable(effects, ok, nok) {
69
71
  let index = self.events.length - 1
70
72
 
71
73
  while (index > -1) {
72
- const type = self.events[index][1].type
74
+ const {type} = self.events[index][1]
73
75
  if (
74
76
  type === types.lineEnding ||
75
77
  // Note: markdown-rs uses `whitespace` instead of `linePrefix`
76
78
  type === types.linePrefix
77
- )
79
+ ) {
78
80
  index--
79
- else break
81
+ } else {
82
+ break
83
+ }
80
84
  }
81
85
 
82
86
  const tail = index > -1 ? self.events[index][1].type : null
@@ -797,12 +801,19 @@ function resolveTable(events, context) {
797
801
  * Generate a cell.
798
802
  *
799
803
  * @param {EditMap} map
804
+ * Edit map to apply to.
800
805
  * @param {Readonly<TokenizeContext>} context
806
+ * Tokenize context.
801
807
  * @param {Readonly<Range>} range
808
+ * Range of the cell within events.
802
809
  * @param {RowKind} rowKind
810
+ * Type of row.
803
811
  * @param {number | undefined} rowEnd
812
+ * Index of the end of the row, if known.
804
813
  * @param {Token | undefined} previousCell
814
+ * Previous cell token, if any.
805
815
  * @returns {Token | undefined}
816
+ * Current cell token after flushing, if any.
806
817
  */
807
818
  // eslint-disable-next-line max-params
808
819
  function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
@@ -907,10 +918,17 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
907
918
  * Generate table end (and table body end).
908
919
  *
909
920
  * @param {Readonly<EditMap>} map
921
+ * Edit map to apply to.
910
922
  * @param {Readonly<TokenizeContext>} context
923
+ * Tokenize context.
911
924
  * @param {number} index
925
+ * Index within the events where the table end should be inserted.
912
926
  * @param {Token} table
927
+ * Table token.
913
928
  * @param {Token | undefined} tableBody
929
+ * Table body token, if any.
930
+ * @returns {undefined}
931
+ * Nothing.
914
932
  */
915
933
  // eslint-disable-next-line max-params
916
934
  function flushTableEnd(map, context, index, table, tableBody) {
@@ -930,9 +948,14 @@ function flushTableEnd(map, context, index, table, tableBody) {
930
948
  }
931
949
 
932
950
  /**
951
+ * Get the point (start or end) for a given event in the list of events.
952
+ *
933
953
  * @param {Readonly<Array<Event>>} events
954
+ * List of events.
934
955
  * @param {number} index
956
+ * Index of the event to get the point for.
935
957
  * @returns {Readonly<Point>}
958
+ * Start point for enter and end point for exit.
936
959
  */
937
960
  function getPoint(events, index) {
938
961
  const event = events[index]
@@ -15,20 +15,33 @@ export class EditMap {
15
15
  * @type {Array<Change>}
16
16
  */
17
17
  map: Array<Change>;
18
+ /**
19
+ * Changes by index, so `add` does not scan `map` (quadratic on
20
+ * table-heavy documents).
21
+ *
22
+ * @type {Map<number, Change>}
23
+ */
24
+ index: Map<number, Change>;
18
25
  /**
19
26
  * Create an edit: a remove and/or add at a certain place.
20
27
  *
21
28
  * @param {number} index
29
+ * Index at which to apply the edit.
22
30
  * @param {number} remove
31
+ * Count of items to remove at the index.
23
32
  * @param {Array<Event>} add
33
+ * Items to add at the index.
24
34
  * @returns {undefined}
35
+ * Nothing.
25
36
  */
26
37
  add(index: number, remove: number, add: Array<Event>): undefined;
27
38
  /**
28
39
  * Done, change the events.
29
40
  *
30
41
  * @param {Array<Event>} events
42
+ * List of events to apply the edits to.
31
43
  * @returns {undefined}
44
+ * Nothing.
32
45
  */
33
46
  consume(events: Array<Event>): undefined;
34
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAGf;;;;;;;OAOG;IACH,WALW,MAAM,UACN,MAAM,OACN,KAAK,CAAC,KAAK,CAAC,GACV,SAAS,CAIrB;IAeD;;;;;OAKG;IACH,gBAHW,KAAK,CAAC,KAAK,CAAC,GACV,SAAS,CA2DrB;CACF;qBA7GY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
1
+ {"version":3,"file":"edit-map.d.ts","sourceRoot":"","sources":["edit-map.js"],"names":[],"mappings":"AAAA;;GAEG;AAeH;;;GAGG;AAEH;;GAEG;AACH;IAKI;;;;OAIG;IACH,KAFU,KAAK,CAAC,MAAM,CAAC,CAEV;IAEb;;;;;OAKG;IACH,OAFU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEP;IAGxB;;;;;;;;;;;OAWG;IACH,WATW,MAAM,UAEN,MAAM,OAEN,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CAKrB;IAeD;;;;;;;OAOG;IACH,gBALW,KAAK,CAAC,KAAK,CAAC,GAEV,SAAS,CA6DrB;CACF;qBA5HY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;mBAC9B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;2BAlBb,sBAAsB"}
@@ -34,15 +34,27 @@ export class EditMap {
34
34
  * @type {Array<Change>}
35
35
  */
36
36
  this.map = [];
37
+
38
+ /**
39
+ * Changes by index, so `add` does not scan `map` (quadratic on
40
+ * table-heavy documents).
41
+ *
42
+ * @type {Map<number, Change>}
43
+ */
44
+ this.index = new Map();
37
45
  }
38
46
 
39
47
  /**
40
48
  * Create an edit: a remove and/or add at a certain place.
41
49
  *
42
50
  * @param {number} index
51
+ * Index at which to apply the edit.
43
52
  * @param {number} remove
53
+ * Count of items to remove at the index.
44
54
  * @param {Array<Event>} add
55
+ * Items to add at the index.
45
56
  * @returns {undefined}
57
+ * Nothing.
46
58
  */
47
59
  add(index, remove, add) {
48
60
  addImplementation(this, index, remove, add);
@@ -65,7 +77,9 @@ export class EditMap {
65
77
  * Done, change the events.
66
78
  *
67
79
  * @param {Array<Event>} events
80
+ * List of events to apply the edits to.
68
81
  * @returns {undefined}
82
+ * Nothing.
69
83
  */
70
84
  consume(events) {
71
85
  this.map.sort(function (a, b) {
@@ -117,6 +131,7 @@ export class EditMap {
117
131
 
118
132
  // Truncate everything.
119
133
  this.map.length = 0;
134
+ this.index.clear();
120
135
  }
121
136
  }
122
137
 
@@ -124,35 +139,40 @@ export class EditMap {
124
139
  * Create an edit.
125
140
  *
126
141
  * @param {EditMap} editMap
142
+ * Edit map to apply to.
127
143
  * @param {number} at
144
+ * Index at which to apply the edit.
128
145
  * @param {number} remove
146
+ * Count of items to remove at the index.
129
147
  * @param {Array<Event>} add
148
+ * Items to add at the index.
130
149
  * @returns {undefined}
150
+ * Nothing.
131
151
  */
132
152
  function addImplementation(editMap, at, remove, add) {
133
- let index = 0;
134
-
135
153
  /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
136
154
  if (remove === 0 && add.length === 0) {
137
155
  return;
138
156
  }
139
- while (index < editMap.map.length) {
140
- if (editMap.map[index][0] === at) {
141
- editMap.map[index][1] += remove;
142
-
143
- // To do: before not used by tables, use when moving to micromark.
144
- // if (before) {
145
- // add.push(...editMap.map[index][2])
146
- // editMap.map[index][2] = add
147
- // } else {
148
- editMap.map[index][2].push(...add);
149
- // }
157
+ const existing = editMap.index.get(at);
158
+ if (existing) {
159
+ existing[1] += remove;
160
+
161
+ // To do: before not used by tables, use when moving to micromark.
162
+ // if (before) {
163
+ // add.push(...existing[2])
164
+ // existing[2] = add
165
+ // } else {
166
+ existing[2].push(...add);
167
+ // }
150
168
 
151
- return;
152
- }
153
- index += 1;
169
+ return;
154
170
  }
155
- editMap.map.push([at, remove, add]);
171
+
172
+ /** @type {Change} */
173
+ const change = [at, remove, add];
174
+ editMap.map.push(change);
175
+ editMap.index.set(at, change);
156
176
  }
157
177
 
158
178
  // /**
@@ -120,9 +120,14 @@ export function gfmTableHtml() {
120
120
  }
121
121
 
122
122
  /**
123
+ * Replace escaped characters in table cells.
124
+ *
123
125
  * @param {string} $0
126
+ * Whole.
124
127
  * @param {string} $1
128
+ * Escaped character (either a backslash or a pipe).
125
129
  * @returns {string}
130
+ * Replacement for the escaped character.
126
131
  */
127
132
  function replace($0, $1) {
128
133
  // Pipes work, backslashes don’t (but can’t escape pipes).
@@ -35,6 +35,8 @@ export function gfmTable() {
35
35
  }
36
36
 
37
37
  /**
38
+ * Tokenizer for GFM tables.
39
+ *
38
40
  * @this {TokenizeContext}
39
41
  * @type {Tokenizer}
40
42
  */
@@ -65,10 +67,16 @@ function tokenizeTable(effects, ok, nok) {
65
67
  function start(code) {
66
68
  let index = self.events.length - 1;
67
69
  while (index > -1) {
68
- const type = self.events[index][1].type;
70
+ const {
71
+ type
72
+ } = self.events[index][1];
69
73
  if (type === "lineEnding" ||
70
74
  // Note: markdown-rs uses `whitespace` instead of `linePrefix`
71
- type === "linePrefix") index--;else break;
75
+ type === "linePrefix") {
76
+ index--;
77
+ } else {
78
+ break;
79
+ }
72
80
  }
73
81
  const tail = index > -1 ? self.events[index][1].type : null;
74
82
  const next = tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore;
@@ -688,12 +696,19 @@ function resolveTable(events, context) {
688
696
  * Generate a cell.
689
697
  *
690
698
  * @param {EditMap} map
699
+ * Edit map to apply to.
691
700
  * @param {Readonly<TokenizeContext>} context
701
+ * Tokenize context.
692
702
  * @param {Readonly<Range>} range
703
+ * Range of the cell within events.
693
704
  * @param {RowKind} rowKind
705
+ * Type of row.
694
706
  * @param {number | undefined} rowEnd
707
+ * Index of the end of the row, if known.
695
708
  * @param {Token | undefined} previousCell
709
+ * Previous cell token, if any.
696
710
  * @returns {Token | undefined}
711
+ * Current cell token after flushing, if any.
697
712
  */
698
713
  // eslint-disable-next-line max-params
699
714
  function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
@@ -788,10 +803,17 @@ function flushCell(map, context, range, rowKind, rowEnd, previousCell) {
788
803
  * Generate table end (and table body end).
789
804
  *
790
805
  * @param {Readonly<EditMap>} map
806
+ * Edit map to apply to.
791
807
  * @param {Readonly<TokenizeContext>} context
808
+ * Tokenize context.
792
809
  * @param {number} index
810
+ * Index within the events where the table end should be inserted.
793
811
  * @param {Token} table
812
+ * Table token.
794
813
  * @param {Token | undefined} tableBody
814
+ * Table body token, if any.
815
+ * @returns {undefined}
816
+ * Nothing.
795
817
  */
796
818
  // eslint-disable-next-line max-params
797
819
  function flushTableEnd(map, context, index, table, tableBody) {
@@ -808,9 +830,14 @@ function flushTableEnd(map, context, index, table, tableBody) {
808
830
  }
809
831
 
810
832
  /**
833
+ * Get the point (start or end) for a given event in the list of events.
834
+ *
811
835
  * @param {Readonly<Array<Event>>} events
836
+ * List of events.
812
837
  * @param {number} index
838
+ * Index of the event to get the point for.
813
839
  * @returns {Readonly<Point>}
840
+ * Start point for enter and end point for exit.
814
841
  */
815
842
  function getPoint(events, index) {
816
843
  const event = events[index];
@@ -13,17 +13,17 @@
13
13
  },
14
14
  "description": "micromark extension to support GFM tables",
15
15
  "devDependencies": {
16
- "@types/node": "^22.0.0",
17
- "c8": "^10.0.0",
16
+ "@types/node": "^26.0.0",
17
+ "c8": "^12.0.0",
18
18
  "create-gfm-fixtures": "^2.0.0",
19
19
  "micromark": "^4.0.0",
20
20
  "micromark-build": "^2.0.0",
21
21
  "prettier": "^3.0.0",
22
22
  "remark-cli": "^12.0.0",
23
- "remark-preset-wooorm": "^10.0.0",
23
+ "remark-preset-wooorm": "^11.0.0",
24
24
  "type-coverage": "^2.0.0",
25
- "typescript": "^5.0.0",
26
- "xo": "^0.60.0"
25
+ "typescript": "^6.0.0",
26
+ "xo": "^4.0.0"
27
27
  },
28
28
  "exports": {
29
29
  "development": "./dev/index.js",
@@ -82,47 +82,5 @@
82
82
  "strict": true
83
83
  },
84
84
  "type": "module",
85
- "version": "2.1.1",
86
- "xo": {
87
- "overrides": [
88
- {
89
- "files": [
90
- "**/*.d.ts"
91
- ],
92
- "rules": {
93
- "@typescript-eslint/array-type": [
94
- "error",
95
- {
96
- "default": "generic"
97
- }
98
- ],
99
- "@typescript-eslint/ban-types": [
100
- "error",
101
- {
102
- "extendDefaults": true
103
- }
104
- ],
105
- "@typescript-eslint/consistent-type-definitions": [
106
- "error",
107
- "interface"
108
- ]
109
- }
110
- },
111
- {
112
- "files": [
113
- "test/**/*.js"
114
- ],
115
- "rules": {
116
- "no-await-in-loop": "off"
117
- }
118
- }
119
- ],
120
- "prettier": true,
121
- "rules": {
122
- "complexity": "off",
123
- "max-depth": "off",
124
- "unicorn/no-this-assignment": "off",
125
- "unicorn/prefer-string-replace-all": "off"
126
- }
127
- }
85
+ "version": "2.1.2"
128
86
  }