@fses/workbench-app 0.2.0 → 0.2.2

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 (803) hide show
  1. package/WORKBENCH-CLOSURE.json +80 -0
  2. package/dist/Workspace-fYH2XNdb.js +22699 -0
  3. package/dist/fses-workbench-app.js +2 -2
  4. package/dist/{index-DbH6tMQy.js → index-CbIJlts1.js} +8 -8
  5. package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +2 -2
  6. package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +41 -2
  7. package/dist/internal/personal-workbench/lib/deepAgentQueueState.d.ts +111 -0
  8. package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +72 -0
  9. package/dist/internal/personal-workbench/lib/workbenchSocketClient.d.ts +1 -1
  10. package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +2 -0
  11. package/dist/runtime/index.js +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/{useWorkbenchRuntime-XpOzwm56.js → useWorkbenchRuntime-Ch8lqkjO.js} +6707 -6315
  14. package/node_modules/@byteluck/agentic-protocol/LICENSE +9 -0
  15. package/node_modules/@byteluck/agentic-protocol/README.md +74 -0
  16. package/node_modules/@byteluck/agentic-protocol/dist/index.d.ts +1623 -0
  17. package/node_modules/@byteluck/agentic-protocol/dist/index.mjs +3380 -0
  18. package/node_modules/@byteluck/agentic-protocol/package.json +37 -0
  19. package/node_modules/@byteluck/workbench-skill-contracts/LICENSE +9 -0
  20. package/node_modules/@byteluck/workbench-skill-contracts/dist/index.d.ts +234 -0
  21. package/node_modules/@byteluck/workbench-skill-contracts/dist/index.mjs +394 -0
  22. package/node_modules/@byteluck/workbench-skill-contracts/package.json +37 -0
  23. package/node_modules/@fses/ai-chat/LICENSE +9 -0
  24. package/node_modules/@fses/ai-chat/README.md +320 -0
  25. package/node_modules/@fses/ai-chat/dist/chart-card/data.d.ts +12 -0
  26. package/node_modules/@fses/ai-chat/dist/chart-card/from-markdown.d.ts +11 -0
  27. package/node_modules/@fses/ai-chat/dist/chart-card/from-tool.d.ts +8 -0
  28. package/node_modules/@fses/ai-chat/dist/chart-card/options.d.ts +4 -0
  29. package/node_modules/@fses/ai-chat/dist/chart-card/trace.d.ts +19 -0
  30. package/node_modules/@fses/ai-chat/dist/chart-card/types.d.ts +133 -0
  31. package/node_modules/@fses/ai-chat/dist/components/CardRecommendationDeferredDraft.vue.d.ts +13 -0
  32. package/node_modules/@fses/ai-chat/dist/components/CardRecommendationDraft.vue.d.ts +18 -0
  33. package/node_modules/@fses/ai-chat/dist/components/ChartCardRenderer.vue.d.ts +11 -0
  34. package/node_modules/@fses/ai-chat/dist/components/ChatMessageItem.vue.d.ts +76 -0
  35. package/node_modules/@fses/ai-chat/dist/components/ChatMessageList.vue.d.ts +79 -0
  36. package/node_modules/@fses/ai-chat/dist/components/ChatSender.vue.d.ts +98 -0
  37. package/node_modules/@fses/ai-chat/dist/components/CollapsedToolActivity.vue.d.ts +9 -0
  38. package/node_modules/@fses/ai-chat/dist/components/ContextUsageRing.vue.d.ts +12 -0
  39. package/node_modules/@fses/ai-chat/dist/components/EChartsView.vue.d.ts +6 -0
  40. package/node_modules/@fses/ai-chat/dist/components/FsesAiChat.vue.d.ts +306 -0
  41. package/node_modules/@fses/ai-chat/dist/components/PlanDraftCard.vue.d.ts +19 -0
  42. package/node_modules/@fses/ai-chat/dist/components/ShellExecPanel.vue.d.ts +6 -0
  43. package/node_modules/@fses/ai-chat/dist/components/TaskTodoPlanBar.vue.d.ts +6 -0
  44. package/node_modules/@fses/ai-chat/dist/components/ThinkingShimmer.vue.d.ts +6 -0
  45. package/node_modules/@fses/ai-chat/dist/composables/context-usage.d.ts +11 -0
  46. package/node_modules/@fses/ai-chat/dist/composables/types.d.ts +465 -0
  47. package/node_modules/@fses/ai-chat/dist/composables/useChat.d.ts +2 -0
  48. package/node_modules/@fses/ai-chat/dist/composables/useSystemEChartsIcon.d.ts +11 -0
  49. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +11408 -0
  50. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +25 -0
  51. package/node_modules/@fses/ai-chat/dist/index.d.ts +17 -0
  52. package/node_modules/@fses/ai-chat/dist/plugin.d.ts +8 -0
  53. package/node_modules/@fses/ai-chat/dist/style.css +1 -0
  54. package/node_modules/@fses/ai-chat/dist/utils/assistant-markdown.d.ts +11 -0
  55. package/node_modules/@fses/ai-chat/dist/utils/attachment-upload.d.ts +22 -0
  56. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-config-summary.d.ts +86 -0
  57. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-field-label.d.ts +24 -0
  58. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-source.d.ts +18 -0
  59. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-title-source.d.ts +12 -0
  60. package/node_modules/@fses/ai-chat/dist/utils/chart-card-visibility.d.ts +24 -0
  61. package/node_modules/@fses/ai-chat/dist/utils/derived-process-labels.d.ts +13 -0
  62. package/node_modules/@fses/ai-chat/dist/utils/echarts-recommendation-icon.d.ts +36 -0
  63. package/node_modules/@fses/ai-chat/dist/utils/group-messages.d.ts +30 -0
  64. package/node_modules/@fses/ai-chat/dist/utils/status-activity.d.ts +48 -0
  65. package/node_modules/@fses/ai-chat/dist/utils/system-echarts-template-icons.generated.d.ts +305 -0
  66. package/node_modules/@fses/ai-chat/dist/utils/system-echarts-template.d.ts +20 -0
  67. package/node_modules/@fses/ai-chat/dist/utils/task-todo-plan.d.ts +40 -0
  68. package/node_modules/@fses/ai-chat/dist/utils/workbench-echarts-theme.d.ts +35 -0
  69. package/node_modules/@fses/ai-chat/package.json +81 -0
  70. package/node_modules/@fses/workbench-card/LICENSE +9 -0
  71. package/node_modules/@fses/workbench-card/README.md +81 -0
  72. package/node_modules/@fses/workbench-card/dist/chart/index.d.ts +8 -0
  73. package/node_modules/@fses/workbench-card/dist/fses-workbench-card-echarts-protocol.js +2230 -0
  74. package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +33742 -0
  75. package/node_modules/@fses/workbench-card/dist/fses-workbench-card.js +21238 -0
  76. package/node_modules/@fses/workbench-card/dist/fses-workbench-card.umd.cjs +1 -0
  77. package/node_modules/@fses/workbench-card/dist/index.d.ts +11 -0
  78. package/node_modules/@fses/workbench-card/dist/registry/cardRegistry.d.ts +50 -0
  79. package/node_modules/@fses/workbench-card/dist/registry/compositeCardPatterns.d.ts +39 -0
  80. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateCategories.d.ts +20 -0
  81. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateRegistry.d.ts +1158 -0
  82. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateRegistry.generated.d.ts +1141 -0
  83. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateTypes.d.ts +76 -0
  84. package/node_modules/@fses/workbench-card/dist/registry/index.d.ts +10 -0
  85. package/node_modules/@fses/workbench-card/dist/renderers/WorkbenchBlockRenderer.vue.d.ts +55 -0
  86. package/node_modules/@fses/workbench-card/dist/renderers/chart/ChartRegistry.vue.d.ts +22 -0
  87. package/node_modules/@fses/workbench-card/dist/renderers/chart/EChartsProtocolRenderer.vue.d.ts +34 -0
  88. package/node_modules/@fses/workbench-card/dist/renderers/chart/chartRendererRegistry.d.ts +219 -0
  89. package/node_modules/@fses/workbench-card/dist/renderers/chart/chartResponsiveLayout.d.ts +47 -0
  90. package/node_modules/@fses/workbench-card/dist/renderers/chart/dynamicEchartOption.d.ts +30 -0
  91. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/adapter.d.ts +73 -0
  92. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/composite.converter.d.ts +11 -0
  93. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/configOnly.converter.d.ts +11 -0
  94. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/geo.converter.d.ts +10 -0
  95. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/graphic.converter.d.ts +10 -0
  96. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/layout.converter.d.ts +11 -0
  97. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/network.converter.d.ts +10 -0
  98. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/scene3D.converter.d.ts +11 -0
  99. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/series.converter.d.ts +10 -0
  100. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/table.converter.d.ts +10 -0
  101. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/timeline.converter.d.ts +11 -0
  102. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/transition.converter.d.ts +11 -0
  103. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/tree.converter.d.ts +10 -0
  104. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/tuple.converter.d.ts +10 -0
  105. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/index.d.ts +9 -0
  106. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/merger.d.ts +16 -0
  107. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/types.d.ts +447 -0
  108. package/node_modules/@fses/workbench-card/dist/renderers/chart/echartsRuntimeInteractions.d.ts +30 -0
  109. package/node_modules/@fses/workbench-card/dist/renderers/chart/echartsTitle.d.ts +13 -0
  110. package/node_modules/@fses/workbench-card/dist/renderers/chart/echartsTooltipPortal.d.ts +12 -0
  111. package/node_modules/@fses/workbench-card/dist/renderers/chart/types.d.ts +47 -0
  112. package/node_modules/@fses/workbench-card/dist/renderers/chart/useEchart.d.ts +29 -0
  113. package/node_modules/@fses/workbench-card/dist/renderers/chart/workbenchChartTheme.d.ts +36 -0
  114. package/node_modules/@fses/workbench-card/dist/renderers/custom-canvas/canvasLayoutBindings.d.ts +86 -0
  115. package/node_modules/@fses/workbench-card/dist/renderers/hostBridge.d.ts +61 -0
  116. package/node_modules/@fses/workbench-card/dist/renderers/index.d.ts +17 -0
  117. package/node_modules/@fses/workbench-card/dist/renderers/native/nativeBindings.d.ts +145 -0
  118. package/node_modules/@fses/workbench-card/dist/renderers/nested/nestedBlockBindings.d.ts +107 -0
  119. package/node_modules/@fses/workbench-card/dist/renderers/quickLinkDisplay.d.ts +24 -0
  120. package/node_modules/@fses/workbench-card/dist/renderers/reference-composite/referenceCompositeBindings.d.ts +171 -0
  121. package/node_modules/@fses/workbench-card/dist/renderers/reference-composite/referenceRiskAndStrategyBindings.d.ts +91 -0
  122. package/node_modules/@fses/workbench-card/dist/renderers/resizableTable.d.ts +51 -0
  123. package/node_modules/@fses/workbench-card/dist/renderers/style.css +1 -0
  124. package/node_modules/@fses/workbench-card/dist/renderers/tableDisplay.d.ts +25 -0
  125. package/node_modules/@fses/workbench-card/dist/renderers/useWorkbenchBlockRendererBindings.d.ts +580 -0
  126. package/node_modules/@fses/workbench-card/dist/shell/workbenchVisualShell.d.ts +48 -0
  127. package/node_modules/@fses/workbench-card/dist/style.css +1 -0
  128. package/node_modules/@fses/workbench-card/dist/types/block.d.ts +2011 -0
  129. package/node_modules/@fses/workbench-card/dist/types/canvas.d.ts +25 -0
  130. package/node_modules/@fses/workbench-card/dist/types/echartsProtocol.d.ts +445 -0
  131. package/node_modules/@fses/workbench-card/dist/types/index.d.ts +10 -0
  132. package/node_modules/@fses/workbench-card/dist/types/registry.d.ts +7 -0
  133. package/node_modules/@fses/workbench-card/dist/types/runtime.d.ts +34 -0
  134. package/node_modules/@fses/workbench-card/package.json +83 -0
  135. package/node_modules/@fses/workbench-card/src/chart/index.ts +8 -0
  136. package/node_modules/@fses/workbench-card/src/index.ts +13 -0
  137. package/node_modules/@fses/workbench-card/src/registry/cardRegistry.ts +476 -0
  138. package/node_modules/@fses/workbench-card/src/registry/compositeCardPatterns.ts +206 -0
  139. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateCategories.ts +74 -0
  140. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.js +19950 -0
  141. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.ts +19951 -0
  142. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.ts +32 -0
  143. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateTypes.ts +83 -0
  144. package/node_modules/@fses/workbench-card/src/registry/index.ts +10 -0
  145. package/node_modules/@fses/workbench-card/src/renderers/WorkbenchBlockRenderer.vue +2728 -0
  146. package/node_modules/@fses/workbench-card/src/renderers/chart/ChartRegistry.vue +221 -0
  147. package/node_modules/@fses/workbench-card/src/renderers/chart/EChartsProtocolRenderer.vue +304 -0
  148. package/node_modules/@fses/workbench-card/src/renderers/chart/chartRendererRegistry.ts +311 -0
  149. package/node_modules/@fses/workbench-card/src/renderers/chart/chartResponsiveLayout.ts +172 -0
  150. package/node_modules/@fses/workbench-card/src/renderers/chart/dynamicEchartOption.ts +127 -0
  151. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/adapter.ts +1349 -0
  152. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/composite.converter.ts +71 -0
  153. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/configOnly.converter.ts +45 -0
  154. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/geo.converter.ts +97 -0
  155. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/graphic.converter.ts +59 -0
  156. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/layout.converter.ts +53 -0
  157. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/network.converter.ts +82 -0
  158. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/scene3D.converter.ts +73 -0
  159. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/series.converter.ts +795 -0
  160. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/table.converter.ts +195 -0
  161. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/timeline.converter.ts +62 -0
  162. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/transition.converter.ts +58 -0
  163. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/tree.converter.ts +75 -0
  164. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/tuple.converter.ts +112 -0
  165. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/index.ts +10 -0
  166. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/merger.ts +109 -0
  167. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/types.ts +515 -0
  168. package/node_modules/@fses/workbench-card/src/renderers/chart/echartsRuntimeInteractions.ts +450 -0
  169. package/node_modules/@fses/workbench-card/src/renderers/chart/echartsTitle.ts +94 -0
  170. package/node_modules/@fses/workbench-card/src/renderers/chart/echartsTooltipPortal.ts +140 -0
  171. package/node_modules/@fses/workbench-card/src/renderers/chart/types.ts +53 -0
  172. package/node_modules/@fses/workbench-card/src/renderers/chart/useEchart.ts +1820 -0
  173. package/node_modules/@fses/workbench-card/src/renderers/chart/workbenchChartTheme.ts +240 -0
  174. package/node_modules/@fses/workbench-card/src/renderers/custom-canvas/canvasLayoutBindings.ts +660 -0
  175. package/node_modules/@fses/workbench-card/src/renderers/hostBridge.ts +74 -0
  176. package/node_modules/@fses/workbench-card/src/renderers/index.ts +25 -0
  177. package/node_modules/@fses/workbench-card/src/renderers/native/nativeBindings.ts +1096 -0
  178. package/node_modules/@fses/workbench-card/src/renderers/nested/nestedBlockBindings.ts +1349 -0
  179. package/node_modules/@fses/workbench-card/src/renderers/quickLinkDisplay.ts +53 -0
  180. package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceCompositeBindings.ts +3209 -0
  181. package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceRiskAndStrategyBindings.ts +1004 -0
  182. package/node_modules/@fses/workbench-card/src/renderers/resizableTable.ts +136 -0
  183. package/node_modules/@fses/workbench-card/src/renderers/tableDisplay.ts +140 -0
  184. package/node_modules/@fses/workbench-card/src/renderers/useWorkbenchBlockRendererBindings.ts +3192 -0
  185. package/node_modules/@fses/workbench-card/src/shell/workbenchVisualShell.ts +228 -0
  186. package/node_modules/@fses/workbench-card/src/styles/workbench-card.css +343 -0
  187. package/node_modules/@fses/workbench-card/src/types/block.ts +2496 -0
  188. package/node_modules/@fses/workbench-card/src/types/canvas.ts +30 -0
  189. package/node_modules/@fses/workbench-card/src/types/echartsProtocol.ts +513 -0
  190. package/node_modules/@fses/workbench-card/src/types/index.ts +10 -0
  191. package/node_modules/@fses/workbench-card/src/types/registry.ts +17 -0
  192. package/node_modules/@fses/workbench-card/src/types/runtime.ts +31 -0
  193. package/node_modules/dompurify/LICENSE +568 -0
  194. package/node_modules/dompurify/README.md +523 -0
  195. package/node_modules/dompurify/dist/purify.cjs.d.ts +451 -0
  196. package/node_modules/dompurify/dist/purify.cjs.js +1472 -0
  197. package/node_modules/dompurify/dist/purify.cjs.js.map +1 -0
  198. package/node_modules/dompurify/dist/purify.es.d.mts +448 -0
  199. package/node_modules/dompurify/dist/purify.es.mjs +1470 -0
  200. package/node_modules/dompurify/dist/purify.es.mjs.map +1 -0
  201. package/node_modules/dompurify/dist/purify.js +1478 -0
  202. package/node_modules/dompurify/dist/purify.js.map +1 -0
  203. package/node_modules/dompurify/dist/purify.min.js +3 -0
  204. package/node_modules/dompurify/dist/purify.min.js.map +1 -0
  205. package/node_modules/dompurify/package.json +168 -0
  206. package/node_modules/zod/LICENSE +21 -0
  207. package/node_modules/zod/README.md +208 -0
  208. package/node_modules/zod/index.cjs +33 -0
  209. package/node_modules/zod/index.d.cts +4 -0
  210. package/node_modules/zod/index.d.ts +4 -0
  211. package/node_modules/zod/index.js +4 -0
  212. package/node_modules/zod/package.json +118 -0
  213. package/node_modules/zod/src/index.ts +4 -0
  214. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  215. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  216. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  217. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  218. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  219. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  220. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  221. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  222. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  223. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  224. package/node_modules/zod/src/v3/errors.ts +13 -0
  225. package/node_modules/zod/src/v3/external.ts +6 -0
  226. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  227. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  228. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  229. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  230. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  231. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  232. package/node_modules/zod/src/v3/index.ts +4 -0
  233. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  234. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  235. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  236. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  237. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  238. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  239. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  240. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  241. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  242. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  243. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  244. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  245. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  246. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  247. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  248. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  249. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  250. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  251. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  252. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  253. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  254. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  255. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  256. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  257. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  258. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  259. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  260. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  261. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  262. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  263. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  264. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  265. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  266. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  267. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  268. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  269. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  270. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  271. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  272. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  273. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  274. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  275. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  276. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  277. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  278. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  279. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  280. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  281. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  282. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  283. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  284. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  285. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  286. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  287. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  288. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  289. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  290. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  291. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  292. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  293. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  294. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  295. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  296. package/node_modules/zod/src/v3/types.ts +5136 -0
  297. package/node_modules/zod/src/v4/classic/checks.ts +30 -0
  298. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  299. package/node_modules/zod/src/v4/classic/compat.ts +66 -0
  300. package/node_modules/zod/src/v4/classic/errors.ts +75 -0
  301. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  302. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  303. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  304. package/node_modules/zod/src/v4/classic/parse.ts +33 -0
  305. package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  306. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  307. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  308. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  309. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  310. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  311. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  312. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  313. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  314. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  315. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  316. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  317. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  318. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  319. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  320. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  321. package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  322. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  323. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  324. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  325. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  326. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  327. package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  328. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  329. package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  330. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  331. package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  332. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  333. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  334. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  335. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  336. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  337. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  338. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  339. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  340. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  341. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  342. package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  343. package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  344. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  345. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  346. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  347. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  348. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  349. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  350. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  351. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  352. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  353. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  354. package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  355. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  356. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  357. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  358. package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  359. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  360. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  361. package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  362. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  363. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  364. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  365. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  366. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  367. package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  368. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  369. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  370. package/node_modules/zod/src/v4/core/api.ts +1594 -0
  371. package/node_modules/zod/src/v4/core/checks.ts +1283 -0
  372. package/node_modules/zod/src/v4/core/config.ts +15 -0
  373. package/node_modules/zod/src/v4/core/core.ts +134 -0
  374. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  375. package/node_modules/zod/src/v4/core/errors.ts +424 -0
  376. package/node_modules/zod/src/v4/core/function.ts +176 -0
  377. package/node_modules/zod/src/v4/core/index.ts +15 -0
  378. package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  379. package/node_modules/zod/src/v4/core/parse.ts +94 -0
  380. package/node_modules/zod/src/v4/core/regexes.ts +135 -0
  381. package/node_modules/zod/src/v4/core/registries.ts +96 -0
  382. package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  383. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  384. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  385. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  386. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  387. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  388. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  389. package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  390. package/node_modules/zod/src/v4/core/util.ts +775 -0
  391. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  392. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  393. package/node_modules/zod/src/v4/index.ts +4 -0
  394. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  395. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  396. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  397. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  398. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  399. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  400. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  401. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  402. package/node_modules/zod/src/v4/locales/es.ts +125 -0
  403. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  404. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  405. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  406. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  407. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  408. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  409. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  410. package/node_modules/zod/src/v4/locales/index.ts +39 -0
  411. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  412. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  413. package/node_modules/zod/src/v4/locales/kh.ts +126 -0
  414. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  415. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  416. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  417. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  418. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  419. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  420. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  421. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  422. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  423. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  424. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  425. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  426. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  427. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  428. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  429. package/node_modules/zod/src/v4/locales/ua.ts +126 -0
  430. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  431. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  432. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  433. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  434. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  435. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  436. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  437. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  438. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  439. package/node_modules/zod/src/v4/mini/parse.ts +1 -0
  440. package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  441. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  442. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  443. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  444. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  445. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  446. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  447. package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  448. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  449. package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  450. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  451. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  452. package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  453. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  454. package/node_modules/zod/v3/ZodError.cjs +138 -0
  455. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  456. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  457. package/node_modules/zod/v3/ZodError.js +133 -0
  458. package/node_modules/zod/v3/errors.cjs +17 -0
  459. package/node_modules/zod/v3/errors.d.cts +5 -0
  460. package/node_modules/zod/v3/errors.d.ts +5 -0
  461. package/node_modules/zod/v3/errors.js +9 -0
  462. package/node_modules/zod/v3/external.cjs +22 -0
  463. package/node_modules/zod/v3/external.d.cts +6 -0
  464. package/node_modules/zod/v3/external.d.ts +6 -0
  465. package/node_modules/zod/v3/external.js +6 -0
  466. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  467. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  468. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  469. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  470. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  471. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  472. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  473. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  474. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  475. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  476. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  477. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  478. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  479. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  480. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  481. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  482. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  483. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  484. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  485. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  486. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  487. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  488. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  489. package/node_modules/zod/v3/helpers/util.js +133 -0
  490. package/node_modules/zod/v3/index.cjs +33 -0
  491. package/node_modules/zod/v3/index.d.cts +4 -0
  492. package/node_modules/zod/v3/index.d.ts +4 -0
  493. package/node_modules/zod/v3/index.js +4 -0
  494. package/node_modules/zod/v3/locales/en.cjs +111 -0
  495. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  496. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  497. package/node_modules/zod/v3/locales/en.js +109 -0
  498. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  499. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  500. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  501. package/node_modules/zod/v3/standard-schema.js +1 -0
  502. package/node_modules/zod/v3/types.cjs +3775 -0
  503. package/node_modules/zod/v3/types.d.cts +1031 -0
  504. package/node_modules/zod/v3/types.d.ts +1031 -0
  505. package/node_modules/zod/v3/types.js +3693 -0
  506. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  507. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  508. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  509. package/node_modules/zod/v4/classic/checks.js +1 -0
  510. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  511. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  512. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  513. package/node_modules/zod/v4/classic/coerce.js +17 -0
  514. package/node_modules/zod/v4/classic/compat.cjs +57 -0
  515. package/node_modules/zod/v4/classic/compat.d.cts +46 -0
  516. package/node_modules/zod/v4/classic/compat.d.ts +46 -0
  517. package/node_modules/zod/v4/classic/compat.js +27 -0
  518. package/node_modules/zod/v4/classic/errors.cjs +67 -0
  519. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  520. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  521. package/node_modules/zod/v4/classic/errors.js +41 -0
  522. package/node_modules/zod/v4/classic/external.cjs +70 -0
  523. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  524. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  525. package/node_modules/zod/v4/classic/external.js +18 -0
  526. package/node_modules/zod/v4/classic/index.cjs +33 -0
  527. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  528. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  529. package/node_modules/zod/v4/classic/index.js +4 -0
  530. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  531. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  532. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  533. package/node_modules/zod/v4/classic/iso.js +30 -0
  534. package/node_modules/zod/v4/classic/parse.cjs +32 -0
  535. package/node_modules/zod/v4/classic/parse.d.cts +23 -0
  536. package/node_modules/zod/v4/classic/parse.d.ts +23 -0
  537. package/node_modules/zod/v4/classic/parse.js +6 -0
  538. package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  539. package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  540. package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  541. package/node_modules/zod/v4/classic/schemas.js +1006 -0
  542. package/node_modules/zod/v4/core/api.cjs +1039 -0
  543. package/node_modules/zod/v4/core/api.d.cts +284 -0
  544. package/node_modules/zod/v4/core/api.d.ts +284 -0
  545. package/node_modules/zod/v4/core/api.js +906 -0
  546. package/node_modules/zod/v4/core/checks.cjs +591 -0
  547. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  548. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  549. package/node_modules/zod/v4/core/checks.js +565 -0
  550. package/node_modules/zod/v4/core/core.cjs +67 -0
  551. package/node_modules/zod/v4/core/core.d.cts +49 -0
  552. package/node_modules/zod/v4/core/core.d.ts +49 -0
  553. package/node_modules/zod/v4/core/core.js +61 -0
  554. package/node_modules/zod/v4/core/doc.cjs +39 -0
  555. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  556. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  557. package/node_modules/zod/v4/core/doc.js +35 -0
  558. package/node_modules/zod/v4/core/errors.cjs +226 -0
  559. package/node_modules/zod/v4/core/errors.d.cts +208 -0
  560. package/node_modules/zod/v4/core/errors.d.ts +208 -0
  561. package/node_modules/zod/v4/core/errors.js +195 -0
  562. package/node_modules/zod/v4/core/function.cjs +102 -0
  563. package/node_modules/zod/v4/core/function.d.cts +52 -0
  564. package/node_modules/zod/v4/core/function.d.ts +52 -0
  565. package/node_modules/zod/v4/core/function.js +75 -0
  566. package/node_modules/zod/v4/core/index.cjs +44 -0
  567. package/node_modules/zod/v4/core/index.d.cts +15 -0
  568. package/node_modules/zod/v4/core/index.d.ts +15 -0
  569. package/node_modules/zod/v4/core/index.js +15 -0
  570. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  571. package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  572. package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  573. package/node_modules/zod/v4/core/json-schema.js +1 -0
  574. package/node_modules/zod/v4/core/parse.cjs +87 -0
  575. package/node_modules/zod/v4/core/parse.d.cts +25 -0
  576. package/node_modules/zod/v4/core/parse.d.ts +25 -0
  577. package/node_modules/zod/v4/core/parse.js +57 -0
  578. package/node_modules/zod/v4/core/regexes.cjs +103 -0
  579. package/node_modules/zod/v4/core/regexes.d.cts +62 -0
  580. package/node_modules/zod/v4/core/regexes.d.ts +62 -0
  581. package/node_modules/zod/v4/core/regexes.js +95 -0
  582. package/node_modules/zod/v4/core/registries.cjs +56 -0
  583. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  584. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  585. package/node_modules/zod/v4/core/registries.js +51 -0
  586. package/node_modules/zod/v4/core/schemas.cjs +1748 -0
  587. package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  588. package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  589. package/node_modules/zod/v4/core/schemas.js +1717 -0
  590. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  591. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  592. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  593. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  594. package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  595. package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  596. package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  597. package/node_modules/zod/v4/core/to-json-schema.js +849 -0
  598. package/node_modules/zod/v4/core/util.cjs +539 -0
  599. package/node_modules/zod/v4/core/util.d.cts +183 -0
  600. package/node_modules/zod/v4/core/util.d.ts +183 -0
  601. package/node_modules/zod/v4/core/util.js +493 -0
  602. package/node_modules/zod/v4/core/versions.cjs +8 -0
  603. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  604. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  605. package/node_modules/zod/v4/core/versions.js +5 -0
  606. package/node_modules/zod/v4/index.cjs +22 -0
  607. package/node_modules/zod/v4/index.d.cts +3 -0
  608. package/node_modules/zod/v4/index.d.ts +3 -0
  609. package/node_modules/zod/v4/index.js +3 -0
  610. package/node_modules/zod/v4/locales/ar.cjs +142 -0
  611. package/node_modules/zod/v4/locales/ar.d.cts +4 -0
  612. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  613. package/node_modules/zod/v4/locales/ar.js +116 -0
  614. package/node_modules/zod/v4/locales/az.cjs +141 -0
  615. package/node_modules/zod/v4/locales/az.d.cts +4 -0
  616. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  617. package/node_modules/zod/v4/locales/az.js +115 -0
  618. package/node_modules/zod/v4/locales/be.cjs +190 -0
  619. package/node_modules/zod/v4/locales/be.d.cts +4 -0
  620. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  621. package/node_modules/zod/v4/locales/be.js +164 -0
  622. package/node_modules/zod/v4/locales/ca.cjs +144 -0
  623. package/node_modules/zod/v4/locales/ca.d.cts +4 -0
  624. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  625. package/node_modules/zod/v4/locales/ca.js +118 -0
  626. package/node_modules/zod/v4/locales/cs.cjs +161 -0
  627. package/node_modules/zod/v4/locales/cs.d.cts +4 -0
  628. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  629. package/node_modules/zod/v4/locales/cs.js +135 -0
  630. package/node_modules/zod/v4/locales/de.cjs +142 -0
  631. package/node_modules/zod/v4/locales/de.d.cts +4 -0
  632. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  633. package/node_modules/zod/v4/locales/de.js +116 -0
  634. package/node_modules/zod/v4/locales/en.cjs +145 -0
  635. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  636. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  637. package/node_modules/zod/v4/locales/en.js +117 -0
  638. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  639. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  640. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  641. package/node_modules/zod/v4/locales/eo.js +116 -0
  642. package/node_modules/zod/v4/locales/es.cjs +143 -0
  643. package/node_modules/zod/v4/locales/es.d.cts +4 -0
  644. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  645. package/node_modules/zod/v4/locales/es.js +117 -0
  646. package/node_modules/zod/v4/locales/fa.cjs +148 -0
  647. package/node_modules/zod/v4/locales/fa.d.cts +4 -0
  648. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  649. package/node_modules/zod/v4/locales/fa.js +122 -0
  650. package/node_modules/zod/v4/locales/fi.cjs +148 -0
  651. package/node_modules/zod/v4/locales/fi.d.cts +4 -0
  652. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  653. package/node_modules/zod/v4/locales/fi.js +122 -0
  654. package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  655. package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  656. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  657. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  658. package/node_modules/zod/v4/locales/fr.cjs +142 -0
  659. package/node_modules/zod/v4/locales/fr.d.cts +4 -0
  660. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  661. package/node_modules/zod/v4/locales/fr.js +116 -0
  662. package/node_modules/zod/v4/locales/he.cjs +143 -0
  663. package/node_modules/zod/v4/locales/he.d.cts +4 -0
  664. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  665. package/node_modules/zod/v4/locales/he.js +117 -0
  666. package/node_modules/zod/v4/locales/hu.cjs +143 -0
  667. package/node_modules/zod/v4/locales/hu.d.cts +4 -0
  668. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  669. package/node_modules/zod/v4/locales/hu.js +117 -0
  670. package/node_modules/zod/v4/locales/id.cjs +142 -0
  671. package/node_modules/zod/v4/locales/id.d.cts +4 -0
  672. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  673. package/node_modules/zod/v4/locales/id.js +116 -0
  674. package/node_modules/zod/v4/locales/index.cjs +84 -0
  675. package/node_modules/zod/v4/locales/index.d.cts +39 -0
  676. package/node_modules/zod/v4/locales/index.d.ts +39 -0
  677. package/node_modules/zod/v4/locales/index.js +39 -0
  678. package/node_modules/zod/v4/locales/it.cjs +143 -0
  679. package/node_modules/zod/v4/locales/it.d.cts +4 -0
  680. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  681. package/node_modules/zod/v4/locales/it.js +117 -0
  682. package/node_modules/zod/v4/locales/ja.cjs +141 -0
  683. package/node_modules/zod/v4/locales/ja.d.cts +4 -0
  684. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  685. package/node_modules/zod/v4/locales/ja.js +115 -0
  686. package/node_modules/zod/v4/locales/kh.cjs +143 -0
  687. package/node_modules/zod/v4/locales/kh.d.cts +4 -0
  688. package/node_modules/zod/v4/locales/kh.d.ts +4 -0
  689. package/node_modules/zod/v4/locales/kh.js +117 -0
  690. package/node_modules/zod/v4/locales/ko.cjs +147 -0
  691. package/node_modules/zod/v4/locales/ko.d.cts +4 -0
  692. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  693. package/node_modules/zod/v4/locales/ko.js +121 -0
  694. package/node_modules/zod/v4/locales/mk.cjs +144 -0
  695. package/node_modules/zod/v4/locales/mk.d.cts +4 -0
  696. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  697. package/node_modules/zod/v4/locales/mk.js +118 -0
  698. package/node_modules/zod/v4/locales/ms.cjs +142 -0
  699. package/node_modules/zod/v4/locales/ms.d.cts +4 -0
  700. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  701. package/node_modules/zod/v4/locales/ms.js +116 -0
  702. package/node_modules/zod/v4/locales/nl.cjs +143 -0
  703. package/node_modules/zod/v4/locales/nl.d.cts +4 -0
  704. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  705. package/node_modules/zod/v4/locales/nl.js +117 -0
  706. package/node_modules/zod/v4/locales/no.cjs +142 -0
  707. package/node_modules/zod/v4/locales/no.d.cts +4 -0
  708. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  709. package/node_modules/zod/v4/locales/no.js +116 -0
  710. package/node_modules/zod/v4/locales/ota.cjs +143 -0
  711. package/node_modules/zod/v4/locales/ota.d.cts +4 -0
  712. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  713. package/node_modules/zod/v4/locales/ota.js +117 -0
  714. package/node_modules/zod/v4/locales/pl.cjs +143 -0
  715. package/node_modules/zod/v4/locales/pl.d.cts +4 -0
  716. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  717. package/node_modules/zod/v4/locales/pl.js +117 -0
  718. package/node_modules/zod/v4/locales/ps.cjs +148 -0
  719. package/node_modules/zod/v4/locales/ps.d.cts +4 -0
  720. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  721. package/node_modules/zod/v4/locales/ps.js +122 -0
  722. package/node_modules/zod/v4/locales/pt.cjs +142 -0
  723. package/node_modules/zod/v4/locales/pt.d.cts +4 -0
  724. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  725. package/node_modules/zod/v4/locales/pt.js +116 -0
  726. package/node_modules/zod/v4/locales/ru.cjs +190 -0
  727. package/node_modules/zod/v4/locales/ru.d.cts +4 -0
  728. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  729. package/node_modules/zod/v4/locales/ru.js +164 -0
  730. package/node_modules/zod/v4/locales/sl.cjs +143 -0
  731. package/node_modules/zod/v4/locales/sl.d.cts +4 -0
  732. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  733. package/node_modules/zod/v4/locales/sl.js +117 -0
  734. package/node_modules/zod/v4/locales/sv.cjs +144 -0
  735. package/node_modules/zod/v4/locales/sv.d.cts +4 -0
  736. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  737. package/node_modules/zod/v4/locales/sv.js +118 -0
  738. package/node_modules/zod/v4/locales/ta.cjs +143 -0
  739. package/node_modules/zod/v4/locales/ta.d.cts +4 -0
  740. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  741. package/node_modules/zod/v4/locales/ta.js +117 -0
  742. package/node_modules/zod/v4/locales/th.cjs +143 -0
  743. package/node_modules/zod/v4/locales/th.d.cts +4 -0
  744. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  745. package/node_modules/zod/v4/locales/th.js +117 -0
  746. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  747. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  748. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  749. package/node_modules/zod/v4/locales/tr.js +115 -0
  750. package/node_modules/zod/v4/locales/ua.cjs +143 -0
  751. package/node_modules/zod/v4/locales/ua.d.cts +4 -0
  752. package/node_modules/zod/v4/locales/ua.d.ts +4 -0
  753. package/node_modules/zod/v4/locales/ua.js +117 -0
  754. package/node_modules/zod/v4/locales/ur.cjs +143 -0
  755. package/node_modules/zod/v4/locales/ur.d.cts +4 -0
  756. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  757. package/node_modules/zod/v4/locales/ur.js +117 -0
  758. package/node_modules/zod/v4/locales/vi.cjs +142 -0
  759. package/node_modules/zod/v4/locales/vi.d.cts +4 -0
  760. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  761. package/node_modules/zod/v4/locales/vi.js +116 -0
  762. package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  763. package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  764. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  765. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  766. package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  767. package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  768. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  769. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  770. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  771. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  772. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  773. package/node_modules/zod/v4/mini/checks.js +1 -0
  774. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  775. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  776. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  777. package/node_modules/zod/v4/mini/coerce.js +17 -0
  778. package/node_modules/zod/v4/mini/external.cjs +62 -0
  779. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  780. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  781. package/node_modules/zod/v4/mini/external.js +13 -0
  782. package/node_modules/zod/v4/mini/index.cjs +32 -0
  783. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  784. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  785. package/node_modules/zod/v4/mini/index.js +3 -0
  786. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  787. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  788. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  789. package/node_modules/zod/v4/mini/iso.js +30 -0
  790. package/node_modules/zod/v4/mini/parse.cjs +8 -0
  791. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  792. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  793. package/node_modules/zod/v4/mini/parse.js +1 -0
  794. package/node_modules/zod/v4/mini/schemas.cjs +839 -0
  795. package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  796. package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  797. package/node_modules/zod/v4/mini/schemas.js +732 -0
  798. package/node_modules/zod/v4-mini/index.cjs +17 -0
  799. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  800. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  801. package/node_modules/zod/v4-mini/index.js +1 -0
  802. package/package.json +99 -104
  803. package/dist/Workspace-DMye5DU8.js +0 -43113
@@ -0,0 +1,450 @@
1
+ /**
2
+ * @fileoverview ECharts runtime interaction helpers - shared readability defaults for workbench charts and recommendation previews.
3
+ * @author seadon
4
+ * @created 2026-08-08
5
+ */
6
+ import type { ECharts, EChartsOption } from 'echarts';
7
+ import { withEchartsTooltipPortal } from './echartsTooltipPortal';
8
+
9
+ const WORKBENCH_BAR_MIN_HEIGHT = 2;
10
+ const WORKBENCH_DONUT_HOVER_LABEL_MAX_FONT_SIZE = 16;
11
+ const WORKBENCH_DONUT_HOVER_GRAPHIC_ID = '__workbench_donut_hover_label__';
12
+ const WORKBENCH_HALF_DONUT_PLACEHOLDER_NAME = '__workbench_half_donut_placeholder__';
13
+ const WORKBENCH_HALF_DONUT_PLACEHOLDER_FLAG = '__workbenchHalfDonutPlaceholder';
14
+ const donutHoverCenterBindings = new WeakMap<ECharts, { option: EChartsOption }>();
15
+
16
+ /**
17
+ * Reads a property from a plain object-like option value.
18
+ * @param value - Candidate object value.
19
+ * @param key - Property key.
20
+ * @returns Property value when available.
21
+ */
22
+ function objectValue(value: unknown, key: string): unknown {
23
+ return value && typeof value === 'object' && !Array.isArray(value)
24
+ ? (value as Record<string, unknown>)[key]
25
+ : undefined;
26
+ }
27
+
28
+ /**
29
+ * Checks whether a runtime value is a record.
30
+ * @param value - Candidate runtime value.
31
+ * @returns True when the value can be merged as an option record.
32
+ */
33
+ function isRecord(value: unknown): value is Record<string, unknown> {
34
+ return Boolean(value && typeof value === 'object' && !Array.isArray(value));
35
+ }
36
+
37
+ /**
38
+ * Reads all series records from an ECharts option.
39
+ * @param option - Candidate ECharts option.
40
+ * @returns Series option records.
41
+ */
42
+ function optionSeriesItems(option: EChartsOption): Record<string, unknown>[] {
43
+ const series = objectValue(option, 'series');
44
+ const items = Array.isArray(series) ? series : [series];
45
+ return items.filter(isRecord);
46
+ }
47
+
48
+ /**
49
+ * Caps a numeric option while preserving missing values with a readable default.
50
+ * @param value - Candidate option value.
51
+ * @param fallback - Default value used when the option is missing.
52
+ * @param max - Maximum allowed number.
53
+ * @returns Capped numeric value or the original non-number value.
54
+ */
55
+ function cappedRuntimeNumber(value: unknown, fallback: number, max: number): unknown {
56
+ if (typeof value === 'number' && Number.isFinite(value)) return Math.min(value, max);
57
+ return value === undefined ? fallback : value;
58
+ }
59
+
60
+ /**
61
+ * Checks whether a color is explicitly transparent.
62
+ * @param value - Candidate color option.
63
+ * @returns True when the color should not receive visible bar fallbacks.
64
+ */
65
+ function isTransparentRuntimeColor(value: unknown): boolean {
66
+ if (typeof value !== 'string') return false;
67
+ const normalized = value.replace(/\s+/g, '').toLowerCase();
68
+ return normalized === 'transparent' || normalized === 'rgba(0,0,0,0)' || /rgba\([^,]+,[^,]+,[^,]+,0\)/.test(normalized);
69
+ }
70
+
71
+ /**
72
+ * Checks whether a bar series is only used as an invisible layout helper.
73
+ * @param series - ECharts series option.
74
+ * @returns True for transparent helper bars such as waterfall offsets.
75
+ */
76
+ function isTransparentRuntimeBarSeries(series: Record<string, unknown>): boolean {
77
+ const itemStyle = objectValue(series, 'itemStyle');
78
+ return isTransparentRuntimeColor(objectValue(series, 'color'))
79
+ || isTransparentRuntimeColor(objectValue(itemStyle, 'color'));
80
+ }
81
+
82
+ /**
83
+ * Checks whether a pie radius value represents a visible inner hole.
84
+ * @param value - Inner radius option from ECharts pie series.
85
+ * @returns True when the inner radius is greater than zero.
86
+ */
87
+ function hasRuntimeInnerRadius(value: unknown): boolean {
88
+ if (typeof value === 'number') return value > 0;
89
+ if (typeof value !== 'string') return false;
90
+ const normalized = value.trim();
91
+ if (!normalized || normalized === '0' || normalized === '0%') return false;
92
+ const numeric = Number.parseFloat(normalized);
93
+ return Number.isFinite(numeric) && numeric > 0;
94
+ }
95
+
96
+ /**
97
+ * Checks whether a pie series is rendered as a donut with a center area.
98
+ * @param series - ECharts series option.
99
+ * @returns True for donut/ring pie series.
100
+ */
101
+ function isRuntimeDonutSeries(series: Record<string, unknown>): boolean {
102
+ if (series.type !== 'pie') return false;
103
+ const radius = series.radius;
104
+ return Array.isArray(radius) && hasRuntimeInnerRadius(radius[0]);
105
+ }
106
+
107
+ /**
108
+ * Checks whether a pie series declares a partial-ring geometry.
109
+ * @param series - ECharts pie series option.
110
+ * @returns True when the series should render as a semi-donut.
111
+ */
112
+ function isRuntimeHalfDonutSeries(series: Record<string, unknown>): boolean {
113
+ if (!isRuntimeDonutSeries(series)) return false;
114
+ return typeof series.startAngle === 'number'
115
+ && typeof series.endAngle === 'number'
116
+ && Math.abs(series.endAngle - series.startAngle) > 0
117
+ && Math.abs(series.endAngle - series.startAngle) <= 180;
118
+ }
119
+
120
+ /**
121
+ * Checks whether a pie data item is the internal transparent half-donut filler.
122
+ * @param value - Candidate ECharts data item.
123
+ * @returns True for display-only half-donut placeholders.
124
+ */
125
+ export function isWorkbenchHalfDonutPlaceholderData(value: unknown): boolean {
126
+ return isRecord(value)
127
+ && (
128
+ value[WORKBENCH_HALF_DONUT_PLACEHOLDER_FLAG] === true
129
+ || value.name === WORKBENCH_HALF_DONUT_PLACEHOLDER_NAME
130
+ );
131
+ }
132
+
133
+ /**
134
+ * Reads the numeric value of a pie data item.
135
+ * @param value - Candidate ECharts data item.
136
+ * @returns Finite positive item value, or 0.
137
+ */
138
+ function pieDataItemValue(value: unknown): number {
139
+ const raw = isRecord(value) ? value.value : value;
140
+ const numeric = typeof raw === 'number' ? raw : typeof raw === 'string' ? Number(raw) : Number.NaN;
141
+ return Number.isFinite(numeric) && numeric > 0 ? numeric : 0;
142
+ }
143
+
144
+ /**
145
+ * Creates a transparent filler slice so ECharts 5.x can render half donuts without pie.endAngle support.
146
+ * @param total - Sum of real pie values.
147
+ * @returns Internal display-only pie slice.
148
+ */
149
+ function halfDonutPlaceholderDataItem(total: number): Record<string, unknown> {
150
+ return {
151
+ name: WORKBENCH_HALF_DONUT_PLACEHOLDER_NAME,
152
+ value: total,
153
+ [WORKBENCH_HALF_DONUT_PLACEHOLDER_FLAG]: true,
154
+ itemStyle: { color: 'transparent', opacity: 0 },
155
+ label: { show: false },
156
+ labelLine: { show: false },
157
+ emphasis: {
158
+ disabled: true,
159
+ itemStyle: { color: 'transparent', opacity: 0 },
160
+ label: { show: false },
161
+ },
162
+ select: { disabled: true },
163
+ tooltip: { show: false },
164
+ };
165
+ }
166
+
167
+ /**
168
+ * Applies a legacy-safe half-donut structure while preserving real data items.
169
+ * @param series - ECharts pie series option.
170
+ * @returns Pie series that renders as a half donut in both ECharts 5.x and 6.x.
171
+ */
172
+ function withLegacyHalfDonutPieGeometry(series: Record<string, unknown>): Record<string, unknown> {
173
+ if (!isRuntimeHalfDonutSeries(series) || !Array.isArray(series.data)) return series;
174
+ const realData = series.data.filter(item => !isWorkbenchHalfDonutPlaceholderData(item));
175
+ const total = realData.reduce((sum, item) => sum + pieDataItemValue(item), 0);
176
+ if (total <= 0) return series;
177
+ const { endAngle: _endAngle, ...portableSeries } = series;
178
+ return {
179
+ ...portableSeries,
180
+ data: [...realData, halfDonutPlaceholderDataItem(total)],
181
+ };
182
+ }
183
+
184
+ /**
185
+ * Keeps donut hover labels centered in the ring instead of floating around slices.
186
+ * @param series - ECharts series option.
187
+ * @returns Donut series with centered, bounded emphasis label typography.
188
+ */
189
+ function withReadablePieHoverLabel(series: Record<string, unknown>): Record<string, unknown> {
190
+ if (!isRuntimeDonutSeries(series)) return series;
191
+ const seriesLabel = objectValue(series, 'label');
192
+ const seriesLabelLine = objectValue(series, 'labelLine');
193
+ const emphasis = objectValue(series, 'emphasis');
194
+ const emphasisRecord = isRecord(emphasis) ? emphasis : {};
195
+ const label = objectValue(emphasisRecord, 'label');
196
+ const labelRecord = isRecord(label) ? label : {};
197
+ const {
198
+ width: _seriesLabelWidth,
199
+ overflow: _seriesLabelOverflow,
200
+ ellipsis: _seriesLabelEllipsis,
201
+ distance: _seriesLabelDistance,
202
+ distanceToLabelLine: _seriesLabelDistanceToLabelLine,
203
+ alignTo: _seriesLabelAlignTo,
204
+ edgeDistance: _seriesLabelEdgeDistance,
205
+ bleedMargin: _seriesLabelBleedMargin,
206
+ ...centerSeriesLabel
207
+ } = isRecord(seriesLabel) ? seriesLabel : {};
208
+ const {
209
+ width: _labelWidth,
210
+ overflow: _labelOverflow,
211
+ ellipsis: _labelEllipsis,
212
+ distance: _labelDistance,
213
+ distanceToLabelLine: _labelDistanceToLabelLine,
214
+ alignTo: _labelAlignTo,
215
+ edgeDistance: _labelEdgeDistance,
216
+ bleedMargin: _labelBleedMargin,
217
+ ...centerLabel
218
+ } = labelRecord;
219
+ return {
220
+ ...series,
221
+ label: {
222
+ ...centerSeriesLabel,
223
+ show: false,
224
+ position: 'center',
225
+ align: 'center',
226
+ verticalAlign: 'middle',
227
+ distance: 0,
228
+ offset: [0, 0],
229
+ rotate: 0,
230
+ },
231
+ labelLine: {
232
+ ...(isRecord(seriesLabelLine) ? seriesLabelLine : {}),
233
+ show: false,
234
+ },
235
+ labelLayout: {
236
+ hideOverlap: false,
237
+ },
238
+ emphasis: {
239
+ ...emphasisRecord,
240
+ label: {
241
+ ...centerLabel,
242
+ show: false,
243
+ position: 'center',
244
+ align: 'center',
245
+ verticalAlign: 'middle',
246
+ distance: 0,
247
+ offset: [0, 0],
248
+ rotate: 0,
249
+ fontSize: cappedRuntimeNumber(centerLabel.fontSize, 14, WORKBENCH_DONUT_HOVER_LABEL_MAX_FONT_SIZE),
250
+ fontWeight: centerLabel.fontWeight ?? 600,
251
+ lineHeight: cappedRuntimeNumber(centerLabel.lineHeight, 20, 22),
252
+ },
253
+ },
254
+ };
255
+ }
256
+
257
+ /**
258
+ * Gives non-zero bar values a visible footprint in compressed comparison charts.
259
+ * @param series - ECharts series option.
260
+ * @returns Bar series with a minimum visible height when appropriate.
261
+ */
262
+ function withVisibleBarMinimum(series: Record<string, unknown>): Record<string, unknown> {
263
+ const coordinateSystem = typeof series.coordinateSystem === 'string' ? series.coordinateSystem : '';
264
+ if (
265
+ series.type !== 'bar'
266
+ || (coordinateSystem && coordinateSystem !== 'cartesian2d')
267
+ || series.barMinHeight !== undefined
268
+ || isTransparentRuntimeBarSeries(series)
269
+ ) return series;
270
+ return {
271
+ ...series,
272
+ barMinHeight: WORKBENCH_BAR_MIN_HEIGHT,
273
+ };
274
+ }
275
+
276
+ /**
277
+ * Applies workbench display defaults to all ECharts options before rendering.
278
+ * @param option - ECharts option from generated, materialized, or script renderers.
279
+ * @returns Option with generic readability safeguards.
280
+ */
281
+ export function normalizeWorkbenchChartDisplayDefaults(option: EChartsOption): EChartsOption {
282
+ const series = objectValue(option, 'series');
283
+ if (!Array.isArray(series) && !isRecord(series)) return option;
284
+ const normalizeSeries = (item: unknown) => (
285
+ isRecord(item) ? withLegacyHalfDonutPieGeometry(withReadablePieHoverLabel(withVisibleBarMinimum(item))) : item
286
+ );
287
+ return {
288
+ ...option,
289
+ series: Array.isArray(series) ? series.map(normalizeSeries) : normalizeSeries(series),
290
+ } as EChartsOption;
291
+ }
292
+
293
+ /**
294
+ * Reads one series option as a record by index.
295
+ * @param option - Runtime ECharts option.
296
+ * @param index - Series index from ECharts event params.
297
+ * @returns Series option when present.
298
+ */
299
+ function runtimeSeriesAt(option: EChartsOption, index: number): Record<string, unknown> | null {
300
+ const series = objectValue(option, 'series');
301
+ const item = Array.isArray(series) ? series[index] : index === 0 ? series : undefined;
302
+ return isRecord(item) ? item : null;
303
+ }
304
+
305
+ /**
306
+ * Converts an ECharts center coordinate into pixels.
307
+ * @param value - Center coordinate, number or percentage string.
308
+ * @param size - Chart width or height.
309
+ * @returns Pixel coordinate.
310
+ */
311
+ function chartCenterCoordinate(value: unknown, size: number): number {
312
+ if (typeof value === 'number' && Number.isFinite(value)) return value;
313
+ if (typeof value === 'string') {
314
+ const text = value.trim();
315
+ if (text.endsWith('%')) {
316
+ const percent = Number.parseFloat(text);
317
+ if (Number.isFinite(percent)) return size * percent / 100;
318
+ }
319
+ const numeric = Number.parseFloat(text);
320
+ if (Number.isFinite(numeric)) return numeric;
321
+ }
322
+ return size / 2;
323
+ }
324
+
325
+ /**
326
+ * Converts a pie radius value into pixels.
327
+ * @param value - Radius coordinate, number or percentage string.
328
+ * @param chart - Current ECharts instance.
329
+ * @returns Pixel radius.
330
+ */
331
+ function chartRadiusCoordinate(value: unknown, chart: ECharts): number {
332
+ const base = Math.min(chart.getWidth(), chart.getHeight()) / 2;
333
+ if (typeof value === 'number' && Number.isFinite(value)) return value;
334
+ if (typeof value === 'string') {
335
+ const text = value.trim();
336
+ if (text.endsWith('%')) {
337
+ const percent = Number.parseFloat(text);
338
+ if (Number.isFinite(percent)) return base * percent / 100;
339
+ }
340
+ const numeric = Number.parseFloat(text);
341
+ if (Number.isFinite(numeric)) return numeric;
342
+ }
343
+ return base * 0.42;
344
+ }
345
+
346
+ /**
347
+ * Resolves the center and text width available for a donut hover label.
348
+ * @param series - Donut series option.
349
+ * @param chart - Current ECharts instance.
350
+ * @returns Pixel center and safe text width.
351
+ */
352
+ function donutHoverCenterGeometry(series: Record<string, unknown>, chart: ECharts): { x: number; y: number; width: number } {
353
+ const center = Array.isArray(series.center) ? series.center : ['50%', '50%'];
354
+ const radius = Array.isArray(series.radius) ? series.radius : [];
355
+ const innerRadius = chartRadiusCoordinate(radius[0], chart);
356
+ return {
357
+ x: chartCenterCoordinate(center[0], chart.getWidth()),
358
+ y: chartCenterCoordinate(center[1], chart.getHeight()),
359
+ width: Math.max(72, Math.floor(innerRadius * 2 - 12)),
360
+ };
361
+ }
362
+
363
+ /**
364
+ * Writes the centered donut hover label with ECharts graphic so old label layouts cannot pull it outside the ring.
365
+ * @param chart - Current ECharts instance.
366
+ * @param option - Runtime ECharts option used by the chart.
367
+ * @param seriesIndex - Hovered series index.
368
+ * @param label - Hover label text.
369
+ */
370
+ function setDonutHoverCenterLabel(chart: ECharts, option: EChartsOption, seriesIndex: number, label: string): void {
371
+ const series = runtimeSeriesAt(option, seriesIndex);
372
+ if (!series || !isRuntimeDonutSeries(series) || !label.trim()) return;
373
+ const geometry = donutHoverCenterGeometry(series, chart);
374
+ chart.setOption({
375
+ graphic: [{
376
+ id: WORKBENCH_DONUT_HOVER_GRAPHIC_ID,
377
+ type: 'text',
378
+ x: geometry.x,
379
+ y: geometry.y,
380
+ z: 100,
381
+ silent: true,
382
+ style: {
383
+ text: label.trim(),
384
+ fill: '#1f2937',
385
+ fontSize: WORKBENCH_DONUT_HOVER_LABEL_MAX_FONT_SIZE,
386
+ fontWeight: 600,
387
+ lineHeight: 22,
388
+ width: geometry.width,
389
+ overflow: 'break',
390
+ align: 'center',
391
+ verticalAlign: 'middle',
392
+ },
393
+ }],
394
+ } as EChartsOption);
395
+ }
396
+
397
+ /**
398
+ * Clears the runtime graphic used for donut hover labels.
399
+ * @param chart - Current ECharts instance.
400
+ */
401
+ function clearDonutHoverCenterLabel(chart: ECharts): void {
402
+ chart.setOption({
403
+ graphic: [{
404
+ id: WORKBENCH_DONUT_HOVER_GRAPHIC_ID,
405
+ $action: 'remove',
406
+ }],
407
+ } as EChartsOption);
408
+ }
409
+
410
+ /**
411
+ * Binds generic donut hover behavior after the final runtime option is set.
412
+ * @param chart - Current ECharts instance.
413
+ * @param option - Final runtime ECharts option.
414
+ */
415
+ export function bindWorkbenchEChartsRuntimeInteractions(chart: ECharts, option: EChartsOption): void {
416
+ if (!optionSeriesItems(option).some(isRuntimeDonutSeries)) return;
417
+ const existing = donutHoverCenterBindings.get(chart);
418
+ if (existing) {
419
+ existing.option = option;
420
+ return;
421
+ }
422
+ const binding = { option };
423
+ donutHoverCenterBindings.set(chart, binding);
424
+ chart.on('mouseover', (params: unknown) => {
425
+ const eventParams = params as { seriesType?: string; seriesIndex?: number; name?: unknown; data?: unknown };
426
+ if (eventParams.seriesType !== 'pie' || typeof eventParams.seriesIndex !== 'number') return;
427
+ if (isWorkbenchHalfDonutPlaceholderData(eventParams.data)) return;
428
+ const dataName = objectValue(eventParams.data, 'name');
429
+ const label = typeof eventParams.name === 'string' && eventParams.name.trim()
430
+ ? eventParams.name
431
+ : typeof dataName === 'string'
432
+ ? dataName
433
+ : '';
434
+ setDonutHoverCenterLabel(chart, binding.option, eventParams.seriesIndex, label);
435
+ });
436
+ chart.on('mouseout', (params: unknown) => {
437
+ const eventParams = params as { seriesType?: string };
438
+ if (eventParams.seriesType === 'pie') clearDonutHoverCenterLabel(chart);
439
+ });
440
+ chart.on('globalout', () => clearDonutHoverCenterLabel(chart));
441
+ }
442
+
443
+ /**
444
+ * Applies the shared workbench ECharts runtime option pipeline.
445
+ * @param option - Renderable ECharts option.
446
+ * @returns Option with readability and tooltip interaction defaults.
447
+ */
448
+ export function prepareWorkbenchEChartsRuntimeOption<T extends EChartsOption>(option: T): T {
449
+ return withEchartsTooltipPortal(normalizeWorkbenchChartDisplayDefaults(option)) as T;
450
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @fileoverview ECharts title helpers - hides inner chart titles already represented by card chrome.
3
+ * @author seadon
4
+ * @created 2026-05-20
5
+ */
6
+ import type { EChartsOption } from 'echarts';
7
+
8
+ /**
9
+ * Checks whether a runtime value is a readable object record.
10
+ * @param value - Candidate value.
11
+ * @returns True when the value is a non-null object and not an array.
12
+ */
13
+ function isRecord(value: unknown): value is Record<string, unknown> {
14
+ return Boolean(value && typeof value === 'object' && !Array.isArray(value));
15
+ }
16
+
17
+ /**
18
+ * Reads title text entries that will be hidden by the outer card chrome.
19
+ * @param title - ECharts title option.
20
+ * @returns Hidden title text values.
21
+ */
22
+ function hiddenTitleTexts(title: unknown): string[] {
23
+ const titles = Array.isArray(title) ? title : [title];
24
+ return titles
25
+ .flatMap((item) => {
26
+ if (!isRecord(item)) return [];
27
+ const text = typeof item.text === 'string' ? item.text.trim() : '';
28
+ return text ? [text] : [];
29
+ });
30
+ }
31
+
32
+ /**
33
+ * Replaces series names that still duplicate a hidden inner ECharts title.
34
+ * @param series - ECharts series option.
35
+ * @param titleTexts - Hidden inner title texts.
36
+ * @param cardTitle - Outer workbench card title.
37
+ * @returns Series option without hidden template title names.
38
+ */
39
+ function seriesWithoutHiddenTitleName(
40
+ series: unknown,
41
+ titleTexts: string[],
42
+ cardTitle: string,
43
+ ): unknown {
44
+ if (titleTexts.length === 0 || !cardTitle.trim()) return series;
45
+ const hiddenNames = new Set(titleTexts.map(text => text.trim()).filter(Boolean));
46
+ const nextName = cardTitle.trim();
47
+ const sanitizeOne = (item: unknown) => {
48
+ if (!isRecord(item)) return item;
49
+ const name = typeof item.name === 'string' ? item.name.trim() : '';
50
+ if (!name || !hiddenNames.has(name) || name === nextName) return item;
51
+ return {
52
+ ...item,
53
+ name: nextName,
54
+ };
55
+ };
56
+ return Array.isArray(series) ? series.map(sanitizeOne) : sanitizeOne(series);
57
+ }
58
+
59
+ /**
60
+ * Hides ECharts title entries when the outer card title is already present.
61
+ * @param option - ECharts option.
62
+ * @param cardTitle - Outer card title.
63
+ * @returns ECharts option with duplicated inner title hidden.
64
+ */
65
+ export function hideDuplicateEchartsTitle<T extends EChartsOption | null>(
66
+ option: T,
67
+ cardTitle: string | undefined,
68
+ ): T {
69
+ if (!option || !cardTitle) return option;
70
+
71
+ const title = (option as Record<string, unknown>).title;
72
+ const titleTexts = hiddenTitleTexts(title);
73
+ const series = (option as Record<string, unknown>).series;
74
+ const nextSeries = seriesWithoutHiddenTitleName(series, titleTexts, cardTitle);
75
+
76
+ if (Array.isArray(title)) {
77
+ const nextTitle = title.map((item) => (
78
+ item && typeof item === 'object'
79
+ ? { ...(item as Record<string, unknown>), show: false }
80
+ : item
81
+ ));
82
+ return { ...option, title: nextTitle, series: nextSeries } as T;
83
+ }
84
+
85
+ if (title && typeof title === 'object') {
86
+ return {
87
+ ...option,
88
+ title: { ...(title as Record<string, unknown>), show: false },
89
+ series: nextSeries,
90
+ } as T;
91
+ }
92
+
93
+ return option;
94
+ }
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @fileoverview ECharts tooltip bounds helpers - keeps chart tooltips readable without expanding page width.
3
+ * @author seadon
4
+ * @created 2026-06-23
5
+ */
6
+ import type { EChartsOption } from 'echarts';
7
+
8
+ const TOOLTIP_EXTRA_CSS = [
9
+ 'box-sizing: border-box',
10
+ 'max-width: min(420px, calc(100vw - 24px), 100%)',
11
+ 'white-space: normal',
12
+ 'overflow-wrap: anywhere',
13
+ 'word-break: break-word',
14
+ 'line-height: 1.45',
15
+ 'font-size: 12px',
16
+ 'padding: 8px 10px',
17
+ 'border-radius: 4px',
18
+ 'z-index: 10000',
19
+ ].join('; ');
20
+
21
+ /**
22
+ * Checks whether a runtime value is a plain record.
23
+ * @param value - Unknown runtime value.
24
+ * @returns True when the value can be read as an object map.
25
+ */
26
+ function isPlainRecord(value: unknown): value is Record<string, unknown> {
27
+ return Boolean(value && typeof value === 'object' && !Array.isArray(value));
28
+ }
29
+
30
+ /**
31
+ * Keeps tooltip text readable while preserving custom text colors and weights.
32
+ * @param textStyle - Existing ECharts tooltip text style.
33
+ * @returns Tooltip text style with compact card-friendly sizing.
34
+ */
35
+ function withReadableTooltipTextStyle(textStyle: unknown): Record<string, unknown> {
36
+ const existing = isPlainRecord(textStyle) ? textStyle : {};
37
+ const fontSize = typeof existing.fontSize === 'number' ? Math.min(existing.fontSize, 12) : 12;
38
+ const lineHeight = typeof existing.lineHeight === 'number' ? Math.min(existing.lineHeight, 18) : 18;
39
+ return {
40
+ ...existing,
41
+ fontSize,
42
+ lineHeight,
43
+ };
44
+ }
45
+
46
+ /**
47
+ * Merges ECharts tooltip CSS text without dropping renderer-provided styles.
48
+ * @param extraCssText - Existing tooltip CSS text.
49
+ * @returns CSS text with readable wrapping constraints appended.
50
+ */
51
+ function mergeTooltipExtraCssText(extraCssText: unknown): string {
52
+ const existing = typeof extraCssText === 'string' ? extraCssText.trim().replace(/;$/, '') : '';
53
+ return existing ? `${existing}; ${TOOLTIP_EXTRA_CSS};` : `${TOOLTIP_EXTRA_CSS};`;
54
+ }
55
+
56
+ /**
57
+ * Positions the tooltip around the cursor without letting it overflow the chart viewport.
58
+ * @param point - Cursor point supplied by ECharts.
59
+ * @param _params - ECharts tooltip params.
60
+ * @param dom - Tooltip DOM element.
61
+ * @param _rect - Trigger rect supplied by ECharts.
62
+ * @param size - ECharts tooltip size metadata.
63
+ * @returns Tooltip coordinates within the current chart viewport.
64
+ */
65
+ function readableTooltipPosition(
66
+ point: unknown,
67
+ _params: unknown,
68
+ dom: unknown,
69
+ _rect: unknown,
70
+ size: unknown,
71
+ ): [number, number] {
72
+ const cursor = Array.isArray(point) ? point : [0, 0];
73
+ const sizeRecord = isPlainRecord(size) ? size : {};
74
+ const viewSize = Array.isArray(sizeRecord.viewSize) ? sizeRecord.viewSize : [];
75
+ const contentSize = Array.isArray(sizeRecord.contentSize) ? sizeRecord.contentSize : [];
76
+ const domElement = typeof HTMLElement !== 'undefined' && dom instanceof HTMLElement ? dom : null;
77
+ const width = Math.ceil(domElement?.offsetWidth || Number(contentSize[0]) || 0);
78
+ const height = Math.ceil(domElement?.offsetHeight || Number(contentSize[1]) || 0);
79
+ const viewWidth = Number(viewSize[0]) || (typeof window === 'undefined' ? 0 : window.innerWidth);
80
+ const viewHeight = Number(viewSize[1]) || (typeof window === 'undefined' ? 0 : window.innerHeight);
81
+ const padding = 8;
82
+ const gap = 12;
83
+ const cursorX = Number(cursor[0]) || 0;
84
+ const cursorY = Number(cursor[1]) || 0;
85
+ let x = cursorX + gap;
86
+ let y = cursorY + gap;
87
+ if (viewWidth > 0 && x + width + padding > viewWidth) x = cursorX - width - gap;
88
+ if (viewHeight > 0 && y + height + padding > viewHeight) y = cursorY - height - gap;
89
+ return [
90
+ Math.max(padding, x),
91
+ Math.max(padding, y),
92
+ ];
93
+ }
94
+
95
+ /**
96
+ * Adds bounded tooltip defaults while preserving existing tooltip settings.
97
+ * @param tooltip - Existing ECharts tooltip option.
98
+ * @returns Tooltip option that stays within the chart viewport.
99
+ */
100
+ function withTooltipPortal(tooltip: unknown): Record<string, unknown> {
101
+ const tooltipRecord = tooltip as Record<string, unknown>;
102
+ const {
103
+ appendToBody: _appendToBody,
104
+ appendTo: _appendTo,
105
+ ...safeTooltip
106
+ } = tooltipRecord;
107
+ return {
108
+ ...safeTooltip,
109
+ appendToBody: false,
110
+ confine: true,
111
+ textStyle: withReadableTooltipTextStyle(tooltipRecord.textStyle),
112
+ extraCssText: mergeTooltipExtraCssText(tooltipRecord.extraCssText),
113
+ position: tooltipRecord.position ?? readableTooltipPosition,
114
+ };
115
+ }
116
+
117
+ /**
118
+ * Ensures chart HTML tooltips are appended to body instead of the chart container.
119
+ * @param option - ECharts option generated from a card renderer.
120
+ * @returns Option with tooltip portal defaults applied.
121
+ */
122
+ export function withEchartsTooltipPortal<T extends EChartsOption>(option: T): T {
123
+ const optionRecord = option as Record<string, unknown>;
124
+ if (!Object.prototype.hasOwnProperty.call(optionRecord, 'tooltip')) return option;
125
+ const tooltip = optionRecord.tooltip;
126
+
127
+ if (Array.isArray(tooltip)) {
128
+ return {
129
+ ...option,
130
+ tooltip: tooltip.map((item) => (isPlainRecord(item) ? withTooltipPortal(item) : item)),
131
+ } as T;
132
+ }
133
+
134
+ if (!isPlainRecord(tooltip)) return option;
135
+
136
+ return {
137
+ ...option,
138
+ tooltip: withTooltipPortal(tooltip),
139
+ } as T;
140
+ }