@flanksource/clicky-ui 0.3.1 → 0.3.3

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 (382) hide show
  1. package/dist/comments/CommentAuthor.cjs +58 -0
  2. package/dist/comments/CommentAuthor.cjs.map +1 -0
  3. package/dist/comments/CommentAuthor.d.ts +17 -0
  4. package/dist/comments/CommentAuthor.d.ts.map +1 -0
  5. package/dist/comments/CommentAuthor.js +58 -0
  6. package/dist/comments/CommentAuthor.js.map +1 -0
  7. package/dist/comments/CommentCard.cjs +343 -0
  8. package/dist/comments/CommentCard.cjs.map +1 -0
  9. package/dist/comments/CommentCard.d.ts +27 -0
  10. package/dist/comments/CommentCard.d.ts.map +1 -0
  11. package/dist/comments/CommentCard.js +343 -0
  12. package/dist/comments/CommentCard.js.map +1 -0
  13. package/dist/comments/CommentComposer.cjs +207 -0
  14. package/dist/comments/CommentComposer.cjs.map +1 -0
  15. package/dist/comments/CommentComposer.d.ts +23 -0
  16. package/dist/comments/CommentComposer.d.ts.map +1 -0
  17. package/dist/comments/CommentComposer.js +207 -0
  18. package/dist/comments/CommentComposer.js.map +1 -0
  19. package/dist/comments/CommentFilterBar.cjs +145 -0
  20. package/dist/comments/CommentFilterBar.cjs.map +1 -0
  21. package/dist/comments/CommentFilterBar.d.ts +15 -0
  22. package/dist/comments/CommentFilterBar.d.ts.map +1 -0
  23. package/dist/comments/CommentFilterBar.js +145 -0
  24. package/dist/comments/CommentFilterBar.js.map +1 -0
  25. package/dist/comments/CommentMarkdown.cjs +156 -0
  26. package/dist/comments/CommentMarkdown.cjs.map +1 -0
  27. package/dist/comments/CommentMarkdown.d.ts +13 -0
  28. package/dist/comments/CommentMarkdown.d.ts.map +1 -0
  29. package/dist/comments/CommentMarkdown.js +156 -0
  30. package/dist/comments/CommentMarkdown.js.map +1 -0
  31. package/dist/comments/CommentProgress.cjs +86 -0
  32. package/dist/comments/CommentProgress.cjs.map +1 -0
  33. package/dist/comments/CommentProgress.d.ts +16 -0
  34. package/dist/comments/CommentProgress.d.ts.map +1 -0
  35. package/dist/comments/CommentProgress.js +86 -0
  36. package/dist/comments/CommentProgress.js.map +1 -0
  37. package/dist/comments/CommentProvider.cjs +99 -0
  38. package/dist/comments/CommentProvider.cjs.map +1 -0
  39. package/dist/comments/CommentProvider.d.ts +19 -0
  40. package/dist/comments/CommentProvider.d.ts.map +1 -0
  41. package/dist/comments/CommentProvider.js +99 -0
  42. package/dist/comments/CommentProvider.js.map +1 -0
  43. package/dist/comments/CommentSidePanel.cjs +219 -0
  44. package/dist/comments/CommentSidePanel.cjs.map +1 -0
  45. package/dist/comments/CommentSidePanel.d.ts +16 -0
  46. package/dist/comments/CommentSidePanel.d.ts.map +1 -0
  47. package/dist/comments/CommentSidePanel.js +219 -0
  48. package/dist/comments/CommentSidePanel.js.map +1 -0
  49. package/dist/comments/CommentThread.cjs +57 -0
  50. package/dist/comments/CommentThread.cjs.map +1 -0
  51. package/dist/comments/CommentThread.d.ts +24 -0
  52. package/dist/comments/CommentThread.d.ts.map +1 -0
  53. package/dist/comments/CommentThread.js +57 -0
  54. package/dist/comments/CommentThread.js.map +1 -0
  55. package/dist/comments/CommentThreadList.cjs +124 -0
  56. package/dist/comments/CommentThreadList.cjs.map +1 -0
  57. package/dist/comments/CommentThreadList.d.ts +25 -0
  58. package/dist/comments/CommentThreadList.d.ts.map +1 -0
  59. package/dist/comments/CommentThreadList.js +124 -0
  60. package/dist/comments/CommentThreadList.js.map +1 -0
  61. package/dist/comments/GroupedComments.cjs +74 -0
  62. package/dist/comments/GroupedComments.cjs.map +1 -0
  63. package/dist/comments/GroupedComments.d.ts +18 -0
  64. package/dist/comments/GroupedComments.d.ts.map +1 -0
  65. package/dist/comments/GroupedComments.js +74 -0
  66. package/dist/comments/GroupedComments.js.map +1 -0
  67. package/dist/comments/MentionTextarea.cjs +253 -0
  68. package/dist/comments/MentionTextarea.cjs.map +1 -0
  69. package/dist/comments/MentionTextarea.d.ts +28 -0
  70. package/dist/comments/MentionTextarea.d.ts.map +1 -0
  71. package/dist/comments/MentionTextarea.js +253 -0
  72. package/dist/comments/MentionTextarea.js.map +1 -0
  73. package/dist/comments/comment-context.cjs +33 -0
  74. package/dist/comments/comment-context.cjs.map +1 -0
  75. package/dist/comments/comment-context.d.ts +32 -0
  76. package/dist/comments/comment-context.d.ts.map +1 -0
  77. package/dist/comments/comment-context.js +33 -0
  78. package/dist/comments/comment-context.js.map +1 -0
  79. package/dist/comments/comment-fixtures.d.ts +11 -0
  80. package/dist/comments/comment-fixtures.d.ts.map +1 -0
  81. package/dist/comments/comment-types.cjs +19 -0
  82. package/dist/comments/comment-types.cjs.map +1 -0
  83. package/dist/comments/comment-types.d.ts +170 -0
  84. package/dist/comments/comment-types.d.ts.map +1 -0
  85. package/dist/comments/comment-types.js +19 -0
  86. package/dist/comments/comment-types.js.map +1 -0
  87. package/dist/comments/comment-utils.cjs +216 -0
  88. package/dist/comments/comment-utils.cjs.map +1 -0
  89. package/dist/comments/comment-utils.d.ts +59 -0
  90. package/dist/comments/comment-utils.d.ts.map +1 -0
  91. package/dist/comments/comment-utils.js +216 -0
  92. package/dist/comments/comment-utils.js.map +1 -0
  93. package/dist/comments.cjs +57 -0
  94. package/dist/comments.cjs.map +1 -0
  95. package/dist/comments.d.ts +16 -0
  96. package/dist/comments.d.ts.map +1 -0
  97. package/dist/comments.js +57 -0
  98. package/dist/comments.js.map +1 -0
  99. package/dist/components/FilterBar.cjs +13 -3
  100. package/dist/components/FilterBar.cjs.map +1 -1
  101. package/dist/components/FilterBar.js +13 -3
  102. package/dist/components/FilterBar.js.map +1 -1
  103. package/dist/components/JsonSchemaForm.cjs +20 -6
  104. package/dist/components/JsonSchemaForm.cjs.map +1 -1
  105. package/dist/components/JsonSchemaForm.d.ts +1 -1
  106. package/dist/components/JsonSchemaForm.d.ts.map +1 -1
  107. package/dist/components/JsonSchemaForm.js +22 -8
  108. package/dist/components/JsonSchemaForm.js.map +1 -1
  109. package/dist/components/NamespacePicker.cjs +52 -0
  110. package/dist/components/NamespacePicker.cjs.map +1 -0
  111. package/dist/components/NamespacePicker.d.ts +17 -0
  112. package/dist/components/NamespacePicker.d.ts.map +1 -0
  113. package/dist/components/NamespacePicker.js +52 -0
  114. package/dist/components/NamespacePicker.js.map +1 -0
  115. package/dist/components/form-lookup-context.cjs +36 -0
  116. package/dist/components/form-lookup-context.cjs.map +1 -0
  117. package/dist/components/form-lookup-context.d.ts +9 -0
  118. package/dist/components/form-lookup-context.d.ts.map +1 -0
  119. package/dist/components/form-lookup-context.js +36 -0
  120. package/dist/components/form-lookup-context.js.map +1 -0
  121. package/dist/components/json-schema-form-discriminator.cjs +67 -0
  122. package/dist/components/json-schema-form-discriminator.cjs.map +1 -0
  123. package/dist/components/json-schema-form-discriminator.d.ts +10 -0
  124. package/dist/components/json-schema-form-discriminator.d.ts.map +1 -0
  125. package/dist/components/json-schema-form-discriminator.js +67 -0
  126. package/dist/components/json-schema-form-discriminator.js.map +1 -0
  127. package/dist/components/json-schema-form-fields.cjs +66 -1
  128. package/dist/components/json-schema-form-fields.cjs.map +1 -1
  129. package/dist/components/json-schema-form-fields.d.ts +7 -0
  130. package/dist/components/json-schema-form-fields.d.ts.map +1 -1
  131. package/dist/components/json-schema-form-fields.js +66 -1
  132. package/dist/components/json-schema-form-fields.js.map +1 -1
  133. package/dist/components/json-schema-form-grid.cjs +92 -0
  134. package/dist/components/json-schema-form-grid.cjs.map +1 -0
  135. package/dist/components/json-schema-form-grid.d.ts +9 -0
  136. package/dist/components/json-schema-form-grid.d.ts.map +1 -0
  137. package/dist/components/json-schema-form-grid.js +92 -0
  138. package/dist/components/json-schema-form-grid.js.map +1 -0
  139. package/dist/components/json-schema-form-render.cjs +20 -3
  140. package/dist/components/json-schema-form-render.cjs.map +1 -1
  141. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  142. package/dist/components/json-schema-form-render.js +22 -5
  143. package/dist/components/json-schema-form-render.js.map +1 -1
  144. package/dist/components/json-schema-form-resolve.cjs +24 -2
  145. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  146. package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
  147. package/dist/components/json-schema-form-resolve.js +24 -2
  148. package/dist/components/json-schema-form-resolve.js.map +1 -1
  149. package/dist/components/json-schema-form-types.d.ts +37 -2
  150. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  151. package/dist/components/json-schema-form-utils.cjs +8 -0
  152. package/dist/components/json-schema-form-utils.cjs.map +1 -1
  153. package/dist/components/json-schema-form-utils.d.ts +1 -0
  154. package/dist/components/json-schema-form-utils.d.ts.map +1 -1
  155. package/dist/components/json-schema-form-utils.js +8 -0
  156. package/dist/components/json-schema-form-utils.js.map +1 -1
  157. package/dist/components/workload-picker-utils.cjs.map +1 -1
  158. package/dist/components/workload-picker-utils.d.ts +11 -1
  159. package/dist/components/workload-picker-utils.d.ts.map +1 -1
  160. package/dist/components/workload-picker-utils.js.map +1 -1
  161. package/dist/components.cjs +6 -0
  162. package/dist/components.cjs.map +1 -1
  163. package/dist/components.d.ts +4 -2
  164. package/dist/components.d.ts.map +1 -1
  165. package/dist/components.js +6 -0
  166. package/dist/components.js.map +1 -1
  167. package/dist/data/Clicky.cjs +225 -60
  168. package/dist/data/Clicky.cjs.map +1 -1
  169. package/dist/data/Clicky.d.ts +7 -1
  170. package/dist/data/Clicky.d.ts.map +1 -1
  171. package/dist/data/Clicky.fixtures.d.ts +3 -1
  172. package/dist/data/Clicky.fixtures.d.ts.map +1 -1
  173. package/dist/data/Clicky.js +226 -61
  174. package/dist/data/Clicky.js.map +1 -1
  175. package/dist/data/ExecutionTree.cjs +68 -0
  176. package/dist/data/ExecutionTree.cjs.map +1 -0
  177. package/dist/data/ExecutionTree.d.ts +40 -0
  178. package/dist/data/ExecutionTree.d.ts.map +1 -0
  179. package/dist/data/ExecutionTree.js +68 -0
  180. package/dist/data/ExecutionTree.js.map +1 -0
  181. package/dist/data/GaugeHoverCard.cjs +35 -0
  182. package/dist/data/GaugeHoverCard.cjs.map +1 -0
  183. package/dist/data/GaugeHoverCard.d.ts +25 -0
  184. package/dist/data/GaugeHoverCard.d.ts.map +1 -0
  185. package/dist/data/GaugeHoverCard.js +35 -0
  186. package/dist/data/GaugeHoverCard.js.map +1 -0
  187. package/dist/data/MarkdownEditor.cjs +616 -0
  188. package/dist/data/MarkdownEditor.cjs.map +1 -0
  189. package/dist/data/MarkdownEditor.d.ts +61 -0
  190. package/dist/data/MarkdownEditor.d.ts.map +1 -0
  191. package/dist/data/MarkdownEditor.js +616 -0
  192. package/dist/data/MarkdownEditor.js.map +1 -0
  193. package/dist/data/MarkdownEditor.model.cjs +27 -0
  194. package/dist/data/MarkdownEditor.model.cjs.map +1 -0
  195. package/dist/data/MarkdownEditor.model.d.ts +38 -0
  196. package/dist/data/MarkdownEditor.model.d.ts.map +1 -0
  197. package/dist/data/MarkdownEditor.model.js +27 -0
  198. package/dist/data/MarkdownEditor.model.js.map +1 -0
  199. package/dist/data/ObjectGraph.cjs +44 -0
  200. package/dist/data/ObjectGraph.cjs.map +1 -0
  201. package/dist/data/ObjectGraph.d.ts +39 -0
  202. package/dist/data/ObjectGraph.d.ts.map +1 -0
  203. package/dist/data/ObjectGraph.js +44 -0
  204. package/dist/data/ObjectGraph.js.map +1 -0
  205. package/dist/data/SchemaViewer.cjs +152 -0
  206. package/dist/data/SchemaViewer.cjs.map +1 -0
  207. package/dist/data/SchemaViewer.d.ts +27 -0
  208. package/dist/data/SchemaViewer.d.ts.map +1 -0
  209. package/dist/data/SchemaViewer.js +152 -0
  210. package/dist/data/SchemaViewer.js.map +1 -0
  211. package/dist/data/TimeseriesCoreBars.cjs +51 -12
  212. package/dist/data/TimeseriesCoreBars.cjs.map +1 -1
  213. package/dist/data/TimeseriesCoreBars.d.ts +32 -5
  214. package/dist/data/TimeseriesCoreBars.d.ts.map +1 -1
  215. package/dist/data/TimeseriesCoreBars.js +51 -12
  216. package/dist/data/TimeseriesCoreBars.js.map +1 -1
  217. package/dist/data/TimeseriesCoreBars.model.cjs +5 -5
  218. package/dist/data/TimeseriesCoreBars.model.cjs.map +1 -1
  219. package/dist/data/TimeseriesCoreBars.model.d.ts +4 -4
  220. package/dist/data/TimeseriesCoreBars.model.d.ts.map +1 -1
  221. package/dist/data/TimeseriesCoreBars.model.js +5 -5
  222. package/dist/data/TimeseriesCoreBars.model.js.map +1 -1
  223. package/dist/data/TimeseriesGauge.cjs +103 -65
  224. package/dist/data/TimeseriesGauge.cjs.map +1 -1
  225. package/dist/data/TimeseriesGauge.d.ts +10 -1
  226. package/dist/data/TimeseriesGauge.d.ts.map +1 -1
  227. package/dist/data/TimeseriesGauge.js +104 -66
  228. package/dist/data/TimeseriesGauge.js.map +1 -1
  229. package/dist/data/WorkloadCard.cjs +4 -4
  230. package/dist/data/WorkloadCard.cjs.map +1 -1
  231. package/dist/data/WorkloadCard.d.ts +3 -2
  232. package/dist/data/WorkloadCard.d.ts.map +1 -1
  233. package/dist/data/WorkloadCard.js +4 -4
  234. package/dist/data/WorkloadCard.js.map +1 -1
  235. package/dist/data/ai/ChatWindow.cjs +11 -19
  236. package/dist/data/ai/ChatWindow.cjs.map +1 -1
  237. package/dist/data/ai/ChatWindow.d.ts +1 -7
  238. package/dist/data/ai/ChatWindow.d.ts.map +1 -1
  239. package/dist/data/ai/ChatWindow.js +11 -19
  240. package/dist/data/ai/ChatWindow.js.map +1 -1
  241. package/dist/data/ai/ChatWindowRequestBody.cjs +20 -0
  242. package/dist/data/ai/ChatWindowRequestBody.cjs.map +1 -0
  243. package/dist/data/ai/ChatWindowRequestBody.d.ts +9 -0
  244. package/dist/data/ai/ChatWindowRequestBody.d.ts.map +1 -0
  245. package/dist/data/ai/ChatWindowRequestBody.js +20 -0
  246. package/dist/data/ai/ChatWindowRequestBody.js.map +1 -0
  247. package/dist/data/chat/Chat.cjs +12 -0
  248. package/dist/data/chat/Chat.cjs.map +1 -1
  249. package/dist/data/chat/Chat.d.ts +8 -1
  250. package/dist/data/chat/Chat.d.ts.map +1 -1
  251. package/dist/data/chat/Chat.js +12 -0
  252. package/dist/data/chat/Chat.js.map +1 -1
  253. package/dist/data/gauge-stats.cjs +19 -0
  254. package/dist/data/gauge-stats.cjs.map +1 -0
  255. package/dist/data/gauge-stats.d.ts +15 -0
  256. package/dist/data/gauge-stats.d.ts.map +1 -0
  257. package/dist/data/gauge-stats.js +19 -0
  258. package/dist/data/gauge-stats.js.map +1 -0
  259. package/dist/data/schema-viewer-model.cjs +436 -0
  260. package/dist/data/schema-viewer-model.cjs.map +1 -0
  261. package/dist/data/schema-viewer-model.d.ts +64 -0
  262. package/dist/data/schema-viewer-model.d.ts.map +1 -0
  263. package/dist/data/schema-viewer-model.js +436 -0
  264. package/dist/data/schema-viewer-model.js.map +1 -0
  265. package/dist/data/version-info.cjs +2 -2
  266. package/dist/data/version-info.js +2 -2
  267. package/dist/data.cjs +23 -0
  268. package/dist/data.cjs.map +1 -1
  269. package/dist/data.d.ts +11 -3
  270. package/dist/data.d.ts.map +1 -1
  271. package/dist/data.js +23 -0
  272. package/dist/data.js.map +1 -1
  273. package/dist/index.cjs +87 -2
  274. package/dist/index.cjs.map +1 -1
  275. package/dist/index.d.ts +1 -0
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +87 -2
  278. package/dist/index.js.map +1 -1
  279. package/dist/rpc/EntityExplorerApp.cjs +102 -143
  280. package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
  281. package/dist/rpc/EntityExplorerApp.d.ts +34 -1
  282. package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
  283. package/dist/rpc/EntityExplorerApp.js +105 -146
  284. package/dist/rpc/EntityExplorerApp.js.map +1 -1
  285. package/dist/rpc/OperationActionBar.cjs +135 -0
  286. package/dist/rpc/OperationActionBar.cjs.map +1 -0
  287. package/dist/rpc/OperationActionBar.d.ts +20 -0
  288. package/dist/rpc/OperationActionBar.d.ts.map +1 -0
  289. package/dist/rpc/OperationActionBar.js +135 -0
  290. package/dist/rpc/OperationActionBar.js.map +1 -0
  291. package/dist/rpc/OperationCatalog.cjs +79 -116
  292. package/dist/rpc/OperationCatalog.cjs.map +1 -1
  293. package/dist/rpc/OperationCatalog.d.ts +8 -1
  294. package/dist/rpc/OperationCatalog.d.ts.map +1 -1
  295. package/dist/rpc/OperationCatalog.js +80 -117
  296. package/dist/rpc/OperationCatalog.js.map +1 -1
  297. package/dist/rpc/OperationCommandPage.cjs +134 -223
  298. package/dist/rpc/OperationCommandPage.cjs.map +1 -1
  299. package/dist/rpc/OperationCommandPage.d.ts +1 -1
  300. package/dist/rpc/OperationCommandPage.d.ts.map +1 -1
  301. package/dist/rpc/OperationCommandPage.js +135 -224
  302. package/dist/rpc/OperationCommandPage.js.map +1 -1
  303. package/dist/rpc/OperationEntityPage.cjs +49 -100
  304. package/dist/rpc/OperationEntityPage.cjs.map +1 -1
  305. package/dist/rpc/OperationEntityPage.d.ts +6 -1
  306. package/dist/rpc/OperationEntityPage.d.ts.map +1 -1
  307. package/dist/rpc/OperationEntityPage.js +50 -101
  308. package/dist/rpc/OperationEntityPage.js.map +1 -1
  309. package/dist/rpc/OperationResultView.cjs +43 -0
  310. package/dist/rpc/OperationResultView.cjs.map +1 -0
  311. package/dist/rpc/OperationResultView.d.ts +30 -0
  312. package/dist/rpc/OperationResultView.d.ts.map +1 -0
  313. package/dist/rpc/OperationResultView.js +43 -0
  314. package/dist/rpc/OperationResultView.js.map +1 -0
  315. package/dist/rpc/SchemaActionForm.cjs +102 -0
  316. package/dist/rpc/SchemaActionForm.cjs.map +1 -0
  317. package/dist/rpc/SchemaActionForm.d.ts +23 -0
  318. package/dist/rpc/SchemaActionForm.d.ts.map +1 -0
  319. package/dist/rpc/SchemaActionForm.js +102 -0
  320. package/dist/rpc/SchemaActionForm.js.map +1 -0
  321. package/dist/rpc/accept-options.cjs.map +1 -1
  322. package/dist/rpc/accept-options.d.ts +0 -1
  323. package/dist/rpc/accept-options.d.ts.map +1 -1
  324. package/dist/rpc/accept-options.js.map +1 -1
  325. package/dist/rpc/apiClient.cjs +34 -2
  326. package/dist/rpc/apiClient.cjs.map +1 -1
  327. package/dist/rpc/apiClient.d.ts +4 -1
  328. package/dist/rpc/apiClient.d.ts.map +1 -1
  329. package/dist/rpc/apiClient.js +34 -2
  330. package/dist/rpc/apiClient.js.map +1 -1
  331. package/dist/rpc/clickyMetadata.cjs +4 -4
  332. package/dist/rpc/clickyMetadata.cjs.map +1 -1
  333. package/dist/rpc/clickyMetadata.d.ts +0 -1
  334. package/dist/rpc/clickyMetadata.d.ts.map +1 -1
  335. package/dist/rpc/clickyMetadata.js +4 -4
  336. package/dist/rpc/clickyMetadata.js.map +1 -1
  337. package/dist/rpc/formMetadata.cjs +1 -0
  338. package/dist/rpc/formMetadata.cjs.map +1 -1
  339. package/dist/rpc/formMetadata.d.ts +6 -1
  340. package/dist/rpc/formMetadata.d.ts.map +1 -1
  341. package/dist/rpc/formMetadata.js +1 -0
  342. package/dist/rpc/formMetadata.js.map +1 -1
  343. package/dist/rpc/rowNavigation.cjs +86 -0
  344. package/dist/rpc/rowNavigation.cjs.map +1 -0
  345. package/dist/rpc/rowNavigation.d.ts +14 -0
  346. package/dist/rpc/rowNavigation.d.ts.map +1 -0
  347. package/dist/rpc/rowNavigation.js +86 -0
  348. package/dist/rpc/rowNavigation.js.map +1 -0
  349. package/dist/rpc/schemaActionPath.cjs +22 -0
  350. package/dist/rpc/schemaActionPath.cjs.map +1 -0
  351. package/dist/rpc/schemaActionPath.d.ts +4 -0
  352. package/dist/rpc/schemaActionPath.d.ts.map +1 -0
  353. package/dist/rpc/schemaActionPath.js +22 -0
  354. package/dist/rpc/schemaActionPath.js.map +1 -0
  355. package/dist/rpc/surfaceIconMap.cjs +35 -0
  356. package/dist/rpc/surfaceIconMap.cjs.map +1 -0
  357. package/dist/rpc/surfaceIconMap.d.ts +3 -0
  358. package/dist/rpc/surfaceIconMap.d.ts.map +1 -0
  359. package/dist/rpc/surfaceIconMap.js +35 -0
  360. package/dist/rpc/surfaceIconMap.js.map +1 -0
  361. package/dist/rpc/types.cjs.map +1 -1
  362. package/dist/rpc/types.d.ts +2 -0
  363. package/dist/rpc/types.d.ts.map +1 -1
  364. package/dist/rpc/types.js.map +1 -1
  365. package/dist/rpc/useOperations.cjs.map +1 -1
  366. package/dist/rpc/useOperations.d.ts +4 -1
  367. package/dist/rpc/useOperations.d.ts.map +1 -1
  368. package/dist/rpc/useOperations.js.map +1 -1
  369. package/dist/rpc.cjs +4 -2
  370. package/dist/rpc.cjs.map +1 -1
  371. package/dist/rpc.d.ts +7 -6
  372. package/dist/rpc.d.ts.map +1 -1
  373. package/dist/rpc.js +4 -2
  374. package/dist/rpc.js.map +1 -1
  375. package/dist/styles.css +1 -1
  376. package/package.json +6 -1
  377. package/dist/rpc/AcceptPicker.cjs +0 -137
  378. package/dist/rpc/AcceptPicker.cjs.map +0 -1
  379. package/dist/rpc/AcceptPicker.d.ts +0 -12
  380. package/dist/rpc/AcceptPicker.d.ts.map +0 -1
  381. package/dist/rpc/AcceptPicker.js +0 -137
  382. package/dist/rpc/AcceptPicker.js.map +0 -1
@@ -0,0 +1,616 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useId, useMemo, useState, useEffect } from "react";
3
+ import { Button } from "../components/button.js";
4
+ import { IconButton } from "../components/IconButton.js";
5
+ import { SegmentedControl } from "../components/SegmentedControl.js";
6
+ import { cn } from "../lib/utils.js";
7
+ import { Clicky } from "./Clicky.js";
8
+ import { Icon } from "./Icon.js";
9
+ import { JsonView } from "./JsonView.js";
10
+ import { Markdown } from "./Markdown.js";
11
+ import { MARKDOWN_EDITOR_PREVIEW_FORMATS, buildMarkdownPreviewUrl } from "./MarkdownEditor.model.js";
12
+ import { UiFileSpreadsheet } from "../icons/components/UiFileSpreadsheet.js";
13
+ import { UiJson } from "../icons/components/UiJson.js";
14
+ import { UiFileText } from "../icons/components/UiFileText.js";
15
+ import { UiMarkdown } from "../icons/components/UiMarkdown.js";
16
+ import { UiFileCode } from "../icons/components/UiFileCode.js";
17
+ import { UiEye } from "../icons/components/UiEye.js";
18
+ import { UiEdit } from "../icons/components/UiEdit.js";
19
+ import { UiRefresh } from "../icons/components/UiRefresh.js";
20
+ import { UiCopy } from "../icons/components/UiCopy.js";
21
+ const FORMAT_META = {
22
+ react: {
23
+ label: "React",
24
+ icon: UiEye
25
+ },
26
+ html: {
27
+ label: "HTML",
28
+ icon: UiFileCode
29
+ },
30
+ markdown: {
31
+ label: "Markdown",
32
+ icon: UiMarkdown
33
+ },
34
+ pdf: {
35
+ label: "PDF",
36
+ icon: UiFileText,
37
+ iconClassName: "text-rose-600 dark:text-rose-400"
38
+ },
39
+ json: {
40
+ label: "JSON",
41
+ icon: UiJson
42
+ },
43
+ csv: {
44
+ label: "CSV",
45
+ icon: UiFileSpreadsheet,
46
+ iconClassName: "text-emerald-600 dark:text-emerald-400"
47
+ },
48
+ excel: {
49
+ label: "Excel",
50
+ icon: UiFileSpreadsheet,
51
+ iconClassName: "text-emerald-700 dark:text-emerald-300"
52
+ }
53
+ };
54
+ function MarkdownEditor({
55
+ value,
56
+ defaultValue = "",
57
+ onChange,
58
+ label = "Markdown",
59
+ placeholder = "Write markdown...",
60
+ previewFormats,
61
+ previewFormat,
62
+ defaultPreviewFormat,
63
+ onPreviewFormatChange,
64
+ previewEndpoint,
65
+ previewMethod = "POST",
66
+ previewHeaders,
67
+ buildPreviewUrl,
68
+ loadPreview,
69
+ clickyData,
70
+ previewDebounceMs = 350,
71
+ minHeight = 420,
72
+ disabled = false,
73
+ readOnly = false,
74
+ className,
75
+ editorClassName,
76
+ previewClassName,
77
+ toolbar
78
+ }) {
79
+ const editorId = useId();
80
+ const formats = useMemo(
81
+ () => normalizePreviewFormats(previewFormats),
82
+ [previewFormats]
83
+ );
84
+ const firstFormat = formats[0] ?? "react";
85
+ const [draft, setDraft] = useState(defaultValue);
86
+ const markdown = value ?? draft;
87
+ const [internalFormat, setInternalFormat] = useState(
88
+ () => normalizeInitialFormat(defaultPreviewFormat, formats) ?? firstFormat
89
+ );
90
+ const activeFormat = formats.includes(previewFormat ?? internalFormat) ? previewFormat ?? internalFormat : firstFormat;
91
+ const [refreshKey, setRefreshKey] = useState(0);
92
+ const [previewState, setPreviewState] = useState({
93
+ status: "idle"
94
+ });
95
+ const contentStyle = useMemo(
96
+ () => ({ minHeight: cssSize(minHeight) }),
97
+ [minHeight]
98
+ );
99
+ const remoteEnabled = Boolean(loadPreview || previewEndpoint || buildPreviewUrl);
100
+ const currentMeta = FORMAT_META[activeFormat];
101
+ const segmentOptions = useMemo(
102
+ () => formats.map((format) => {
103
+ const meta = FORMAT_META[format];
104
+ return {
105
+ id: format,
106
+ label: meta.label,
107
+ icon: meta.icon,
108
+ title: `${meta.label} preview`
109
+ };
110
+ }),
111
+ [formats]
112
+ );
113
+ useEffect(() => {
114
+ if (formats.includes(activeFormat)) return;
115
+ setInternalFormat(firstFormat);
116
+ }, [activeFormat, firstFormat, formats]);
117
+ useEffect(() => {
118
+ if (!remoteEnabled) {
119
+ setPreviewState({ status: "idle" });
120
+ return;
121
+ }
122
+ const controller = new AbortController();
123
+ const timeout = window.setTimeout(() => {
124
+ setPreviewState(
125
+ (current) => current.status === "success" ? { status: "loading", result: current.result } : { status: "loading" }
126
+ );
127
+ resolvePreview({
128
+ markdown,
129
+ format: activeFormat,
130
+ signal: controller.signal,
131
+ previewEndpoint,
132
+ previewMethod,
133
+ previewHeaders,
134
+ buildPreviewUrl,
135
+ loadPreview
136
+ }).then((result) => {
137
+ if (!controller.signal.aborted) {
138
+ setPreviewState({ status: "success", result });
139
+ }
140
+ }).catch((error) => {
141
+ if (controller.signal.aborted) return;
142
+ setPreviewState((current) => ({
143
+ status: "error",
144
+ error: error instanceof Error ? error.message : "Preview failed",
145
+ ...current.status === "loading" && current.result ? { result: current.result } : {}
146
+ }));
147
+ });
148
+ }, Math.max(0, previewDebounceMs));
149
+ return () => {
150
+ window.clearTimeout(timeout);
151
+ controller.abort();
152
+ };
153
+ }, [
154
+ activeFormat,
155
+ buildPreviewUrl,
156
+ loadPreview,
157
+ markdown,
158
+ previewDebounceMs,
159
+ previewEndpoint,
160
+ previewHeaders,
161
+ previewMethod,
162
+ refreshKey,
163
+ remoteEnabled
164
+ ]);
165
+ const updateMarkdown = (next) => {
166
+ if (value === void 0) setDraft(next);
167
+ onChange == null ? void 0 : onChange(next);
168
+ };
169
+ const updateFormat = (next) => {
170
+ if (previewFormat === void 0) setInternalFormat(next);
171
+ onPreviewFormatChange == null ? void 0 : onPreviewFormatChange(next);
172
+ };
173
+ const copySource = () => {
174
+ var _a;
175
+ const clipboard = (_a = globalThis.navigator) == null ? void 0 : _a.clipboard;
176
+ if (clipboard == null ? void 0 : clipboard.writeText) {
177
+ void clipboard.writeText(markdown).catch(() => void 0);
178
+ }
179
+ };
180
+ return /* @__PURE__ */ jsxs("div", { className: cn("rounded-md border border-border bg-card", className), children: [
181
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-density-2 border-b border-border px-density-3 py-density-2", children: [
182
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
183
+ /* @__PURE__ */ jsx(Icon, { icon: UiEdit, className: "text-base text-muted-foreground" }),
184
+ /* @__PURE__ */ jsx(
185
+ "label",
186
+ {
187
+ htmlFor: editorId,
188
+ className: "truncate text-sm font-medium text-card-foreground",
189
+ children: label
190
+ }
191
+ ),
192
+ previewState.status === "loading" && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Refreshing..." })
193
+ ] }),
194
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center justify-end gap-2", children: [
195
+ /* @__PURE__ */ jsx(
196
+ SegmentedControl,
197
+ {
198
+ value: activeFormat,
199
+ options: segmentOptions,
200
+ onChange: updateFormat,
201
+ size: "sm",
202
+ "aria-label": "Markdown preview format",
203
+ className: "max-w-full flex-wrap"
204
+ }
205
+ ),
206
+ remoteEnabled && /* @__PURE__ */ jsx(
207
+ IconButton,
208
+ {
209
+ icon: UiRefresh,
210
+ label: "Refresh preview",
211
+ disabled,
212
+ onClick: () => setRefreshKey((current) => current + 1)
213
+ }
214
+ ),
215
+ /* @__PURE__ */ jsx(IconButton, { icon: UiCopy, label: "Copy markdown", onClick: copySource }),
216
+ toolbar
217
+ ] })
218
+ ] }),
219
+ /* @__PURE__ */ jsxs("div", { className: "grid gap-density-3 p-density-3 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]", children: [
220
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 overflow-hidden rounded-md border border-border bg-background", children: [
221
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border px-density-3 py-density-2 text-xs font-medium text-muted-foreground", children: "Source" }),
222
+ /* @__PURE__ */ jsx(
223
+ "textarea",
224
+ {
225
+ id: editorId,
226
+ value: markdown,
227
+ placeholder,
228
+ disabled,
229
+ readOnly,
230
+ spellCheck: true,
231
+ onChange: (event) => updateMarkdown(event.currentTarget.value),
232
+ className: cn(
233
+ "block w-full resize-y border-0 bg-transparent px-density-3 py-density-3 font-mono text-sm leading-6 text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",
234
+ editorClassName
235
+ ),
236
+ style: contentStyle
237
+ }
238
+ )
239
+ ] }),
240
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 overflow-hidden rounded-md border border-border bg-background", children: [
241
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-b border-border px-density-3 py-density-2 text-xs font-medium text-muted-foreground", children: [
242
+ /* @__PURE__ */ jsx(
243
+ Icon,
244
+ {
245
+ icon: currentMeta.icon,
246
+ className: cn("text-sm", currentMeta.iconClassName)
247
+ }
248
+ ),
249
+ /* @__PURE__ */ jsx("span", { children: currentMeta.label })
250
+ ] }),
251
+ /* @__PURE__ */ jsx(
252
+ "div",
253
+ {
254
+ className: cn(
255
+ "overflow-auto px-density-3 py-density-3",
256
+ previewClassName
257
+ ),
258
+ style: contentStyle,
259
+ children: /* @__PURE__ */ jsx(
260
+ MarkdownEditorPreview,
261
+ {
262
+ format: activeFormat,
263
+ markdown,
264
+ state: previewState,
265
+ clickyData
266
+ }
267
+ )
268
+ }
269
+ )
270
+ ] })
271
+ ] })
272
+ ] });
273
+ }
274
+ function MarkdownEditorPreview({
275
+ format,
276
+ markdown,
277
+ state,
278
+ clickyData
279
+ }) {
280
+ const result = state.status === "success" || state.status === "loading" || state.status === "error" ? state.result : void 0;
281
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-density-3", children: [
282
+ state.status === "error" && /* @__PURE__ */ jsx(PreviewNotice, { title: "Preview failed", message: state.error, tone: "danger" }),
283
+ result ? /* @__PURE__ */ jsx(PreviewResult, { format, result }) : /* @__PURE__ */ jsx(
284
+ LocalPreview,
285
+ {
286
+ format,
287
+ markdown,
288
+ clickyData
289
+ }
290
+ )
291
+ ] });
292
+ }
293
+ function LocalPreview({
294
+ format,
295
+ markdown,
296
+ clickyData
297
+ }) {
298
+ if (format === "react") {
299
+ const data = typeof clickyData === "function" ? clickyData(markdown) : clickyData;
300
+ return data === void 0 ? /* @__PURE__ */ jsx(Markdown, { text: markdown }) : /* @__PURE__ */ jsx(Clicky, { data });
301
+ }
302
+ if (format === "markdown") {
303
+ return /* @__PURE__ */ jsx(TextPreview, { label: "Markdown source", text: markdown });
304
+ }
305
+ return /* @__PURE__ */ jsx(
306
+ PreviewNotice,
307
+ {
308
+ title: `${FORMAT_META[format].label} preview not configured`,
309
+ message: "Pass previewEndpoint or loadPreview to render this format from Clicky."
310
+ }
311
+ );
312
+ }
313
+ function PreviewResult({
314
+ format,
315
+ result
316
+ }) {
317
+ switch (result.kind) {
318
+ case "clicky":
319
+ return /* @__PURE__ */ jsx(Clicky, { data: result.data });
320
+ case "html":
321
+ return /* @__PURE__ */ jsx(HtmlPreview, { html: result.html });
322
+ case "json":
323
+ return /* @__PURE__ */ jsx(JsonView, { data: result.data });
324
+ case "url":
325
+ return /* @__PURE__ */ jsx(UrlPreview, { format, url: result.url });
326
+ case "blob":
327
+ return /* @__PURE__ */ jsx(BlobPreview, { format, result });
328
+ case "text":
329
+ return /* @__PURE__ */ jsx(TextResult, { format, result });
330
+ }
331
+ }
332
+ function TextResult({
333
+ format,
334
+ result
335
+ }) {
336
+ if (format === "react") {
337
+ return /* @__PURE__ */ jsx(Clicky, { data: result.text });
338
+ }
339
+ if (format === "html" || isHtmlContent(result.contentType)) {
340
+ return /* @__PURE__ */ jsx(HtmlPreview, { html: result.text });
341
+ }
342
+ if (format === "json" || isJsonContent(result.contentType)) {
343
+ const parsed = parseJson(result.text);
344
+ return parsed.ok ? /* @__PURE__ */ jsx(JsonView, { data: parsed.value }) : /* @__PURE__ */ jsx(TextPreview, { label: "JSON output", text: result.text });
345
+ }
346
+ return /* @__PURE__ */ jsx(
347
+ TextPreview,
348
+ {
349
+ label: `${FORMAT_META[format].label} output`,
350
+ text: result.text
351
+ }
352
+ );
353
+ }
354
+ function UrlPreview({
355
+ format,
356
+ url
357
+ }) {
358
+ if (format === "react") {
359
+ return /* @__PURE__ */ jsx(Clicky, { url, view: ["clicky"], download: { all: false } });
360
+ }
361
+ if (format === "html") {
362
+ return /* @__PURE__ */ jsx(HtmlPreview, { src: url });
363
+ }
364
+ if (format === "pdf") {
365
+ return /* @__PURE__ */ jsx(FramePreview, { title: "PDF preview", src: url });
366
+ }
367
+ if (format === "excel") {
368
+ return /* @__PURE__ */ jsx(DownloadPreview, { label: "Open Excel workbook", href: url });
369
+ }
370
+ return /* @__PURE__ */ jsx(TextPreview, { label: `${FORMAT_META[format].label} URL`, text: url });
371
+ }
372
+ function BlobPreview({
373
+ format,
374
+ result
375
+ }) {
376
+ const [url, setUrl] = useState();
377
+ useEffect(() => {
378
+ const next = URL.createObjectURL(result.blob);
379
+ setUrl(next);
380
+ return () => URL.revokeObjectURL(next);
381
+ }, [result.blob]);
382
+ if (!url) {
383
+ return /* @__PURE__ */ jsx(PreviewNotice, { title: "Preparing preview", message: "Creating object URL." });
384
+ }
385
+ if (format === "pdf") {
386
+ return /* @__PURE__ */ jsx(FramePreview, { title: "PDF preview", src: url });
387
+ }
388
+ return /* @__PURE__ */ jsx(
389
+ DownloadPreview,
390
+ {
391
+ label: `Open ${FORMAT_META[format].label}`,
392
+ href: url,
393
+ ...result.filename ? { download: result.filename } : {}
394
+ }
395
+ );
396
+ }
397
+ function HtmlPreview({
398
+ html,
399
+ src
400
+ }) {
401
+ return /* @__PURE__ */ jsx(
402
+ FramePreview,
403
+ {
404
+ title: "HTML preview",
405
+ ...src ? { src } : {},
406
+ ...html ? { srcDoc: html } : {},
407
+ sandbox: "allow-same-origin"
408
+ }
409
+ );
410
+ }
411
+ function FramePreview({
412
+ title,
413
+ src,
414
+ srcDoc,
415
+ sandbox
416
+ }) {
417
+ return /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-md border border-border bg-background", children: /* @__PURE__ */ jsx(
418
+ "iframe",
419
+ {
420
+ title,
421
+ ...src ? { src } : {},
422
+ ...srcDoc ? { srcDoc } : {},
423
+ ...sandbox ? { sandbox } : {},
424
+ className: "h-[720px] w-full bg-background"
425
+ }
426
+ ) });
427
+ }
428
+ function DownloadPreview({
429
+ label,
430
+ href,
431
+ download
432
+ }) {
433
+ return /* @__PURE__ */ jsx(
434
+ PreviewNotice,
435
+ {
436
+ title: "Inline preview unavailable",
437
+ message: /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", size: "sm", children: /* @__PURE__ */ jsx(
438
+ "a",
439
+ {
440
+ href,
441
+ target: "_blank",
442
+ rel: "noreferrer",
443
+ ...download ? { download } : {},
444
+ children: label
445
+ }
446
+ ) })
447
+ }
448
+ );
449
+ }
450
+ function TextPreview({ label, text }) {
451
+ return /* @__PURE__ */ jsx(
452
+ "pre",
453
+ {
454
+ "aria-label": label,
455
+ className: "overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-muted/30 px-density-3 py-density-3 font-mono text-xs text-foreground",
456
+ children: text || "No content"
457
+ }
458
+ );
459
+ }
460
+ function PreviewNotice({
461
+ title,
462
+ message,
463
+ tone = "default"
464
+ }) {
465
+ return /* @__PURE__ */ jsxs(
466
+ "div",
467
+ {
468
+ className: cn(
469
+ "rounded-md border p-density-3",
470
+ tone === "danger" ? "border-destructive/30 bg-destructive/5" : "border-border bg-muted/30"
471
+ ),
472
+ children: [
473
+ /* @__PURE__ */ jsx(
474
+ "div",
475
+ {
476
+ className: cn(
477
+ "text-sm font-medium",
478
+ tone === "danger" && "text-destructive"
479
+ ),
480
+ children: title
481
+ }
482
+ ),
483
+ /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: message })
484
+ ]
485
+ }
486
+ );
487
+ }
488
+ function normalizePreviewFormats(formats) {
489
+ const seen = /* @__PURE__ */ new Set();
490
+ const source = formats && formats.length > 0 ? formats : MARKDOWN_EDITOR_PREVIEW_FORMATS;
491
+ for (const format of source) {
492
+ seen.add(format);
493
+ }
494
+ return [...seen];
495
+ }
496
+ function normalizeInitialFormat(format, formats) {
497
+ return format && formats.includes(format) ? format : void 0;
498
+ }
499
+ function cssSize(size) {
500
+ return typeof size === "number" ? `${size}px` : size;
501
+ }
502
+ async function resolvePreview({
503
+ markdown,
504
+ format,
505
+ signal,
506
+ previewEndpoint,
507
+ previewMethod,
508
+ previewHeaders,
509
+ buildPreviewUrl,
510
+ loadPreview
511
+ }) {
512
+ if (loadPreview) {
513
+ return loadPreview({ markdown, format, signal });
514
+ }
515
+ const url = (buildPreviewUrl == null ? void 0 : buildPreviewUrl({ markdown, format })) ?? (previewEndpoint ? buildMarkdownPreviewUrl(previewEndpoint, format) : void 0);
516
+ if (!url) {
517
+ throw new Error("No preview endpoint configured");
518
+ }
519
+ const headers = new Headers(
520
+ typeof previewHeaders === "function" ? previewHeaders({ markdown, format }) : previewHeaders
521
+ );
522
+ headers.set("Accept", previewAccept(format));
523
+ const init = {
524
+ method: previewMethod,
525
+ headers,
526
+ signal
527
+ };
528
+ if (previewMethod !== "GET") {
529
+ headers.set("Content-Type", "text/markdown; charset=utf-8");
530
+ init.body = markdown;
531
+ }
532
+ const response = await fetch(url, init);
533
+ if (!response.ok) {
534
+ throw new Error(
535
+ `Preview failed with ${response.status} ${response.statusText}`.trim()
536
+ );
537
+ }
538
+ const contentType = response.headers.get("Content-Type") ?? "";
539
+ if (format === "pdf" || format === "excel" || isBinaryContent(contentType)) {
540
+ return {
541
+ kind: "blob",
542
+ blob: await response.blob(),
543
+ contentType,
544
+ filename: previewFilename(format)
545
+ };
546
+ }
547
+ const text = await response.text();
548
+ if (format === "react") {
549
+ return { kind: "clicky", data: text };
550
+ }
551
+ if (format === "html" || isHtmlContent(contentType)) {
552
+ return { kind: "html", html: text };
553
+ }
554
+ if (format === "json" || isJsonContent(contentType)) {
555
+ const parsed = parseJson(text);
556
+ return parsed.ok ? { kind: "json", data: parsed.value } : { kind: "text", text, contentType };
557
+ }
558
+ return { kind: "text", text, contentType };
559
+ }
560
+ function previewAccept(format) {
561
+ switch (format) {
562
+ case "react":
563
+ return "application/json+clicky, application/clicky+json;q=0.9, application/json;q=0.8,*/*;q=0.7";
564
+ case "html":
565
+ return "text/html, */*;q=0.7";
566
+ case "markdown":
567
+ return "text/markdown, text/plain;q=0.8,*/*;q=0.7";
568
+ case "pdf":
569
+ return "application/pdf, */*;q=0.7";
570
+ case "json":
571
+ return "application/json, text/plain;q=0.8,*/*;q=0.7";
572
+ case "csv":
573
+ return "text/csv, text/plain;q=0.8,*/*;q=0.7";
574
+ case "excel":
575
+ return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, */*;q=0.7";
576
+ }
577
+ }
578
+ function previewFilename(format) {
579
+ switch (format) {
580
+ case "react":
581
+ return "preview.clicky.json";
582
+ case "html":
583
+ return "preview.html";
584
+ case "markdown":
585
+ return "preview.md";
586
+ case "pdf":
587
+ return "preview.pdf";
588
+ case "json":
589
+ return "preview.json";
590
+ case "csv":
591
+ return "preview.csv";
592
+ case "excel":
593
+ return "preview.xlsx";
594
+ }
595
+ }
596
+ function parseJson(text) {
597
+ try {
598
+ return { ok: true, value: JSON.parse(text) };
599
+ } catch {
600
+ return { ok: false };
601
+ }
602
+ }
603
+ function isJsonContent(contentType) {
604
+ return (contentType == null ? void 0 : contentType.toLowerCase().includes("json")) ?? false;
605
+ }
606
+ function isHtmlContent(contentType) {
607
+ return (contentType == null ? void 0 : contentType.toLowerCase().includes("html")) ?? false;
608
+ }
609
+ function isBinaryContent(contentType) {
610
+ const normalized = (contentType == null ? void 0 : contentType.toLowerCase()) ?? "";
611
+ return normalized.includes("application/pdf") || normalized.includes("spreadsheetml") || normalized.includes("application/vnd.ms-excel");
612
+ }
613
+ export {
614
+ MarkdownEditor
615
+ };
616
+ //# sourceMappingURL=MarkdownEditor.js.map