@wakastellar/ui 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1098) hide show
  1. package/README.md +17 -14
  2. package/dist/_virtual/_rolldown/runtime.cjs.js +1 -0
  3. package/dist/{chunk-BJivcVNn.mjs → _virtual/_rolldown/runtime.es.js} +4 -11
  4. package/dist/blocks/_shared/identity/InviteUserPanel.cjs.js +1 -0
  5. package/dist/blocks/_shared/identity/InviteUserPanel.d.ts +13 -0
  6. package/dist/blocks/_shared/identity/InviteUserPanel.es.js +93 -0
  7. package/dist/blocks/_shared/identity/RoleSelect.cjs.js +1 -0
  8. package/dist/blocks/_shared/identity/RoleSelect.d.ts +24 -0
  9. package/dist/blocks/_shared/identity/RoleSelect.es.js +24 -0
  10. package/dist/blocks/_shared/identity/SidePushLayout.cjs.js +1 -0
  11. package/dist/blocks/_shared/identity/SidePushLayout.d.ts +10 -0
  12. package/dist/blocks/_shared/identity/SidePushLayout.es.js +93 -0
  13. package/dist/blocks/_shared/identity/index.d.ts +3 -0
  14. package/dist/blocks/_shared/identity/types.d.ts +26 -0
  15. package/dist/blocks/activity-timeline/index.cjs.js +1 -0
  16. package/dist/blocks/activity-timeline/index.es.js +428 -0
  17. package/dist/blocks/antivirus-dashboard/index.cjs.js +1 -0
  18. package/dist/blocks/antivirus-dashboard/index.es.js +462 -0
  19. package/dist/blocks/api-keys-manager/index.cjs.js +1 -0
  20. package/dist/blocks/api-keys-manager/index.d.ts +37 -0
  21. package/dist/blocks/api-keys-manager/index.es.js +367 -0
  22. package/dist/blocks/apm-overview/index.cjs.js +1 -0
  23. package/dist/blocks/apm-overview/index.es.js +597 -0
  24. package/dist/blocks/auth-2fa/index.cjs.js +3 -0
  25. package/dist/blocks/auth-2fa/index.es.js +466 -0
  26. package/dist/blocks/avatar-upload/index.cjs.js +1 -0
  27. package/dist/blocks/avatar-upload/index.d.ts +22 -0
  28. package/dist/blocks/avatar-upload/index.es.js +191 -0
  29. package/dist/blocks/calendar-view/index.cjs.js +1 -0
  30. package/dist/blocks/calendar-view/index.es.js +455 -0
  31. package/dist/blocks/chat/index.cjs.js +1 -0
  32. package/dist/blocks/chat/index.es.js +534 -0
  33. package/dist/blocks/chat/widget.cjs.js +1 -0
  34. package/dist/blocks/chat/widget.es.js +236 -0
  35. package/dist/blocks/chat-interface/index.cjs.js +1 -0
  36. package/dist/blocks/chat-interface/index.es.js +446 -0
  37. package/dist/blocks/checkout-flow/index.cjs.js +1 -0
  38. package/dist/blocks/checkout-flow/index.es.js +640 -0
  39. package/dist/blocks/cicd-builder/index.cjs.js +1 -0
  40. package/dist/blocks/cicd-builder/index.es.js +616 -0
  41. package/dist/blocks/clamav-service-status/index.cjs.js +1 -0
  42. package/dist/blocks/clamav-service-status/index.es.js +392 -0
  43. package/dist/blocks/cloud-cost-dashboard/index.cjs.js +1 -0
  44. package/dist/blocks/cloud-cost-dashboard/index.es.js +593 -0
  45. package/dist/blocks/container-orchestrator/index.cjs.js +1 -0
  46. package/dist/blocks/container-orchestrator/index.es.js +674 -0
  47. package/dist/blocks/dashboard/index.cjs.js +1 -0
  48. package/dist/blocks/dashboard/index.es.js +273 -0
  49. package/dist/blocks/dashboard-kpi/index.cjs.js +1 -0
  50. package/dist/blocks/dashboard-kpi/index.es.js +345 -0
  51. package/dist/blocks/database-admin/index.cjs.js +1 -0
  52. package/dist/blocks/database-admin/index.es.js +662 -0
  53. package/dist/blocks/deployment-dashboard/index.cjs.js +1 -0
  54. package/dist/blocks/deployment-dashboard/index.es.js +523 -0
  55. package/dist/blocks/empty-states/index.cjs.js +1 -0
  56. package/dist/blocks/empty-states/index.es.js +306 -0
  57. package/dist/blocks/error-pages/index.cjs.js +1 -0
  58. package/dist/blocks/error-pages/index.es.js +249 -0
  59. package/dist/blocks/faq/index.cjs.js +1 -0
  60. package/dist/blocks/faq/index.es.js +266 -0
  61. package/dist/blocks/file-manager/index.cjs.js +1 -0
  62. package/dist/blocks/file-manager/index.es.js +498 -0
  63. package/dist/blocks/file-scan-uploader/index.cjs.js +1 -0
  64. package/dist/blocks/file-scan-uploader/index.es.js +257 -0
  65. package/dist/blocks/footer/index.cjs.js +1 -0
  66. package/dist/blocks/footer/index.es.js +87 -0
  67. package/dist/blocks/gitops-sync-status/index.cjs.js +1 -0
  68. package/dist/blocks/gitops-sync-status/index.es.js +580 -0
  69. package/dist/blocks/header/index.cjs.js +1 -0
  70. package/dist/blocks/header/index.es.js +170 -0
  71. package/dist/blocks/headtab/index.cjs.js +1 -0
  72. package/dist/blocks/headtab/index.es.js +58 -0
  73. package/dist/blocks/i18n-editor/index.cjs.js +1 -0
  74. package/dist/blocks/i18n-editor/index.es.js +719 -0
  75. package/dist/blocks/incident-manager/index.cjs.js +1 -0
  76. package/dist/blocks/incident-manager/index.es.js +608 -0
  77. package/dist/blocks/index.d.ts +6 -0
  78. package/dist/blocks/infrastructure-map/index.cjs.js +1 -0
  79. package/dist/blocks/infrastructure-map/index.es.js +573 -0
  80. package/dist/blocks/kanban-board/index.cjs.js +1 -0
  81. package/dist/blocks/kanban-board/index.es.js +474 -0
  82. package/dist/blocks/landing/index.cjs.js +1 -0
  83. package/dist/blocks/landing/index.es.js +390 -0
  84. package/dist/blocks/language-selector/index.cjs.js +1 -0
  85. package/dist/blocks/language-selector/index.es.js +57 -0
  86. package/dist/blocks/layout/index.cjs.js +1 -0
  87. package/dist/blocks/layout/index.es.js +85 -0
  88. package/dist/blocks/login/index.cjs.js +1 -0
  89. package/dist/blocks/login/index.es.js +246 -0
  90. package/dist/blocks/on-call-schedule/index.cjs.js +1 -0
  91. package/dist/blocks/on-call-schedule/index.es.js +496 -0
  92. package/dist/blocks/player-profile/index.cjs.js +1 -0
  93. package/dist/blocks/player-profile/index.es.js +529 -0
  94. package/dist/blocks/pricing/index.cjs.js +1 -0
  95. package/dist/blocks/pricing/index.es.js +405 -0
  96. package/dist/blocks/profile/index.cjs.js +1 -0
  97. package/dist/blocks/profile/index.es.js +450 -0
  98. package/dist/blocks/profile-list/index.cjs.js +1 -0
  99. package/dist/blocks/profile-list/index.d.ts +26 -0
  100. package/dist/blocks/profile-list/index.es.js +148 -0
  101. package/dist/blocks/quarantine-manager/index.cjs.js +1 -0
  102. package/dist/blocks/quarantine-manager/index.es.js +429 -0
  103. package/dist/blocks/release-notes/index.cjs.js +1 -0
  104. package/dist/blocks/release-notes/index.es.js +632 -0
  105. package/dist/blocks/scan-history-log/index.cjs.js +1 -0
  106. package/dist/blocks/scan-history-log/index.es.js +357 -0
  107. package/dist/blocks/scan-policy-editor/index.cjs.js +1 -0
  108. package/dist/blocks/scan-policy-editor/index.es.js +409 -0
  109. package/dist/blocks/scan-report-generator/index.cjs.js +1 -0
  110. package/dist/blocks/scan-report-generator/index.es.js +581 -0
  111. package/dist/blocks/settings/index.cjs.js +1 -0
  112. package/dist/blocks/settings/index.es.js +348 -0
  113. package/dist/blocks/sidebar/index.cjs.js +1 -0
  114. package/dist/blocks/sidebar/index.es.js +348 -0
  115. package/dist/blocks/signature-database-manager/index.cjs.js +1 -0
  116. package/dist/blocks/signature-database-manager/index.es.js +423 -0
  117. package/dist/blocks/team-form/index.cjs.js +1 -0
  118. package/dist/blocks/team-form/index.d.ts +26 -0
  119. package/dist/blocks/team-form/index.es.js +179 -0
  120. package/dist/blocks/threat-alert-banner/index.cjs.js +1 -0
  121. package/dist/blocks/threat-alert-banner/index.d.ts +1 -1
  122. package/dist/blocks/threat-alert-banner/index.es.js +265 -0
  123. package/dist/blocks/user-management/index.cjs.js +1 -0
  124. package/dist/blocks/user-management/index.d.ts +19 -92
  125. package/dist/blocks/user-management/index.es.js +241 -0
  126. package/dist/blocks/waka-doc-shell/index.cjs.js +2 -0
  127. package/dist/blocks/waka-doc-shell/index.es.js +139 -0
  128. package/dist/blocks/wizard/index.cjs.js +1 -0
  129. package/dist/blocks/wizard/index.es.js +342 -0
  130. package/dist/charts.cjs.js +1 -1
  131. package/dist/charts.es.js +12 -2
  132. package/dist/cli/index.cjs +1940 -908
  133. package/dist/components/DataTable/DataTable.cjs.js +1 -0
  134. package/dist/components/DataTable/DataTable.es.js +217 -0
  135. package/dist/components/DataTable/DataTableAdvanced.cjs.js +1 -0
  136. package/dist/components/DataTable/DataTableAdvanced.es.js +356 -0
  137. package/dist/components/DataTable/DataTableColumnResizer.cjs.js +1 -0
  138. package/dist/components/DataTable/DataTableColumnResizer.d.ts +4 -3
  139. package/dist/components/DataTable/DataTableColumnResizer.es.js +28 -0
  140. package/dist/components/DataTable/DataTableContextMenu.cjs.js +2 -0
  141. package/dist/components/DataTable/DataTableContextMenu.es.js +93 -0
  142. package/dist/components/DataTable/DataTableEditCell.cjs.js +1 -0
  143. package/dist/components/DataTable/DataTableEditCell.d.ts +2 -2
  144. package/dist/components/DataTable/DataTableEditCell.es.js +165 -0
  145. package/dist/components/DataTable/DataTableFilters.cjs.js +1 -0
  146. package/dist/components/DataTable/DataTableFilters.d.ts +3 -3
  147. package/dist/components/DataTable/DataTableFilters.es.js +461 -0
  148. package/dist/components/DataTable/DataTableGrouping.cjs.js +1 -0
  149. package/dist/components/DataTable/DataTableGrouping.d.ts +17 -6
  150. package/dist/components/DataTable/DataTableGrouping.es.js +88 -0
  151. package/dist/components/DataTable/DataTablePagination.cjs.js +1 -0
  152. package/dist/components/DataTable/DataTablePagination.d.ts +3 -1
  153. package/dist/components/DataTable/DataTablePagination.es.js +135 -0
  154. package/dist/components/DataTable/DataTableSelection.cjs.js +1 -0
  155. package/dist/components/DataTable/DataTableSelection.d.ts +18 -12
  156. package/dist/components/DataTable/DataTableSelection.es.js +157 -0
  157. package/dist/components/DataTable/DataTableToolbar.cjs.js +1 -0
  158. package/dist/components/DataTable/DataTableToolbar.es.js +178 -0
  159. package/dist/components/DataTable/hooks/useDataTable.cjs.js +1 -0
  160. package/dist/components/DataTable/hooks/useDataTable.d.ts +2 -2
  161. package/dist/components/DataTable/hooks/useDataTable.es.js +87 -0
  162. package/dist/components/DataTable/hooks/useDataTableAdvanced.cjs.js +1 -0
  163. package/dist/components/DataTable/hooks/useDataTableAdvanced.es.js +191 -0
  164. package/dist/components/DataTable/hooks/useDataTableEdit.cjs.js +1 -0
  165. package/dist/components/DataTable/hooks/useDataTableEdit.d.ts +2 -2
  166. package/dist/components/DataTable/hooks/useDataTableEdit.es.js +86 -0
  167. package/dist/components/DataTable/hooks/useDataTableExport.cjs.js +6 -0
  168. package/dist/components/DataTable/hooks/useDataTableExport.d.ts +13 -1
  169. package/dist/{useDataTableImport-z5avsB21.mjs → components/DataTable/hooks/useDataTableExport.es.js} +3 -136
  170. package/dist/components/DataTable/hooks/useDataTableImport.cjs.js +2 -0
  171. package/dist/components/DataTable/hooks/useDataTableImport.es.js +138 -0
  172. package/dist/components/DataTable/hooks/useDataTableTheme.cjs.js +1 -0
  173. package/dist/components/DataTable/hooks/useDataTableTheme.es.js +142 -0
  174. package/dist/components/DataTable/hooks/useDataTableVirtualization.cjs.js +1 -0
  175. package/dist/components/DataTable/hooks/useDataTableVirtualization.d.ts +2 -2
  176. package/dist/components/DataTable/hooks/useDataTableVirtualization.es.js +50 -0
  177. package/dist/components/DataTable/hooks/useTableLayout.cjs.js +1 -0
  178. package/dist/components/DataTable/hooks/useTableLayout.es.js +52 -0
  179. package/dist/components/DataTable/types.d.ts +15 -15
  180. package/dist/components/DataTable/utils.cjs.js +4 -0
  181. package/dist/components/DataTable/utils.d.ts +10 -7
  182. package/dist/components/DataTable/utils.es.js +62 -0
  183. package/dist/components/accordion/index.cjs.js +1 -0
  184. package/dist/components/accordion/index.es.js +35 -0
  185. package/dist/components/alert/index.cjs.js +1 -0
  186. package/dist/components/alert/index.d.ts +3 -3
  187. package/dist/components/alert/index.es.js +34 -0
  188. package/dist/components/alert-dialog/index.cjs.js +1 -0
  189. package/dist/components/alert-dialog/index.es.js +54 -0
  190. package/dist/components/aspect-ratio/index.cjs.js +1 -0
  191. package/dist/components/aspect-ratio/index.es.js +6 -0
  192. package/dist/components/avatar/index.cjs.js +1 -0
  193. package/dist/components/avatar/index.es.js +26 -0
  194. package/dist/components/badge/index.cjs.js +1 -0
  195. package/dist/components/badge/index.d.ts +3 -3
  196. package/dist/{badge-BvqcaobM.mjs → components/badge/index.es.js} +3 -2
  197. package/dist/components/button/index.cjs.js +1 -0
  198. package/dist/components/button/index.d.ts +4 -4
  199. package/dist/{separator-DDQs13_a.mjs → components/button/index.es.js} +8 -18
  200. package/dist/components/calendar/index.cjs.js +1 -0
  201. package/dist/components/calendar/index.es.js +45 -0
  202. package/dist/components/card/index.cjs.js +1 -0
  203. package/dist/components/card/index.es.js +44 -0
  204. package/dist/components/checkbox/index.cjs.js +1 -0
  205. package/dist/components/checkbox/index.es.js +19 -0
  206. package/dist/components/code/index.cjs.js +2 -0
  207. package/dist/components/code/index.d.ts +4 -4
  208. package/dist/components/code/index.es.js +139 -0
  209. package/dist/components/collapsible/index.cjs.js +1 -0
  210. package/dist/components/collapsible/index.es.js +6 -0
  211. package/dist/components/command/index.cjs.js +1 -0
  212. package/dist/components/command/index.es.js +73 -0
  213. package/dist/components/context-menu/index.cjs.js +1 -0
  214. package/dist/components/context-menu/index.es.js +72 -0
  215. package/dist/components/dialog/index.cjs.js +1 -0
  216. package/dist/components/dialog/index.es.js +50 -0
  217. package/dist/components/dropdown-menu/index.cjs.js +1 -0
  218. package/dist/components/dropdown-menu/index.es.js +73 -0
  219. package/dist/components/editor/blocks/index.cjs.js +1 -0
  220. package/dist/components/editor/blocks/index.es.js +29 -0
  221. package/dist/components/editor/blocks/waka-acceptance-criteria-block.cjs.js +1 -0
  222. package/dist/components/editor/blocks/waka-acceptance-criteria-block.es.js +221 -0
  223. package/dist/components/editor/blocks/waka-ai-assist-block.cjs.js +1 -0
  224. package/dist/components/editor/blocks/waka-ai-assist-block.es.js +212 -0
  225. package/dist/components/editor/blocks/waka-api-endpoint-block.cjs.js +11 -0
  226. package/dist/components/editor/blocks/waka-api-endpoint-block.es.js +324 -0
  227. package/dist/components/editor/blocks/waka-code-playground-block.cjs.js +3 -0
  228. package/dist/components/editor/blocks/waka-code-playground-block.es.js +279 -0
  229. package/dist/components/editor/blocks/waka-comment-thread-block.cjs.js +1 -0
  230. package/dist/components/editor/blocks/waka-comment-thread-block.es.js +269 -0
  231. package/dist/components/editor/blocks/waka-diagram-block.cjs.js +9 -0
  232. package/dist/components/editor/blocks/waka-diagram-block.es.js +262 -0
  233. package/dist/components/editor/blocks/waka-embed-block.cjs.js +1 -0
  234. package/dist/components/editor/blocks/waka-embed-block.es.js +301 -0
  235. package/dist/components/editor/blocks/waka-slash-menu-block.cjs.js +1 -0
  236. package/dist/components/editor/blocks/waka-slash-menu-block.es.js +296 -0
  237. package/dist/components/editor/blocks/waka-user-story-block.cjs.js +1 -0
  238. package/dist/components/editor/blocks/waka-user-story-block.es.js +200 -0
  239. package/dist/components/editor/blocks/waka-version-diff-block.cjs.js +1 -0
  240. package/dist/components/editor/blocks/waka-version-diff-block.es.js +371 -0
  241. package/dist/components/editor/waka-ai-writer.cjs.js +27 -0
  242. package/dist/components/editor/waka-ai-writer.es.js +302 -0
  243. package/dist/components/editor/waka-collaborative-editor.cjs.js +1 -0
  244. package/dist/components/editor/waka-collaborative-editor.es.js +238 -0
  245. package/dist/components/editor/waka-diff-viewer.cjs.js +1 -0
  246. package/dist/components/editor/waka-diff-viewer.es.js +255 -0
  247. package/dist/components/editor/waka-dnd-editor.cjs.js +1 -0
  248. package/dist/components/editor/waka-dnd-editor.es.js +161 -0
  249. package/dist/components/editor/waka-document-editor.cjs.js +1 -0
  250. package/dist/components/editor/waka-document-editor.es.js +276 -0
  251. package/dist/components/editor/waka-editor-elements.cjs.js +1 -0
  252. package/dist/components/editor/waka-editor-elements.es.js +168 -0
  253. package/dist/components/editor/waka-editor-leaves.cjs.js +1 -0
  254. package/dist/components/editor/waka-editor-leaves.es.js +72 -0
  255. package/dist/components/editor/waka-editor-plugins.cjs.js +1 -0
  256. package/dist/{waka-editor-plugins-_0WFrkKK.mjs → components/editor/waka-editor-plugins.es.js} +20 -38
  257. package/dist/components/editor/waka-editor-toolbar.cjs.js +1 -0
  258. package/dist/components/editor/waka-editor-toolbar.es.js +253 -0
  259. package/dist/components/editor/waka-editor.cjs.js +2 -0
  260. package/dist/components/editor/waka-editor.es.js +174 -0
  261. package/dist/components/editor/waka-floating-toolbar.cjs.js +1 -0
  262. package/dist/components/editor/waka-floating-toolbar.es.js +159 -0
  263. package/dist/components/editor/waka-markdown-editor.cjs.js +1 -0
  264. package/dist/components/editor/waka-markdown-editor.es.js +212 -0
  265. package/dist/components/editor/waka-mention-editor.cjs.js +1 -0
  266. package/dist/components/editor/waka-mention-editor.es.js +234 -0
  267. package/dist/components/editor/waka-slash-menu.cjs.js +1 -0
  268. package/dist/components/editor/waka-slash-menu.es.js +302 -0
  269. package/dist/components/editor/waka-spec-editor.cjs.js +1 -0
  270. package/dist/components/editor/waka-spec-editor.es.js +1099 -0
  271. package/dist/components/error-boundary/ErrorBoundary.d.ts +1 -1
  272. package/dist/components/form/index.cjs.js +1 -0
  273. package/dist/components/form/index.es.js +79 -0
  274. package/dist/components/hover-card/index.cjs.js +1 -0
  275. package/dist/components/hover-card/index.es.js +16 -0
  276. package/dist/components/index.d.ts +2 -0
  277. package/dist/components/input/index.cjs.js +1 -0
  278. package/dist/{input-B8pxqKEs.mjs → components/input/index.es.js} +3 -2
  279. package/dist/components/input-otp/index.cjs.js +1 -0
  280. package/dist/components/input-otp/index.es.js +94 -0
  281. package/dist/components/label/index.cjs.js +1 -0
  282. package/dist/components/label/index.d.ts +1 -1
  283. package/dist/components/label/index.es.js +15 -0
  284. package/dist/components/language-selector/index.cjs.js +1 -0
  285. package/dist/components/language-selector/index.es.js +200 -0
  286. package/dist/components/menubar/index.cjs.js +1 -0
  287. package/dist/components/menubar/index.es.js +87 -0
  288. package/dist/components/navigation-menu/index.cjs.js +1 -0
  289. package/dist/components/navigation-menu/index.d.ts +1 -1
  290. package/dist/components/navigation-menu/index.es.js +59 -0
  291. package/dist/components/popover/index.cjs.js +1 -0
  292. package/dist/components/popover/index.es.js +16 -0
  293. package/dist/components/progress/index.cjs.js +1 -0
  294. package/dist/components/progress/index.es.js +19 -0
  295. package/dist/components/radio-group/index.cjs.js +1 -0
  296. package/dist/components/radio-group/index.es.js +25 -0
  297. package/dist/components/resizable/index.cjs.js +1 -0
  298. package/dist/components/resizable/index.d.ts +24 -0
  299. package/dist/components/resizable/index.es.js +27 -0
  300. package/dist/components/scroll-area/index.cjs.js +1 -0
  301. package/dist/components/scroll-area/index.es.js +30 -0
  302. package/dist/components/select/index.cjs.js +1 -0
  303. package/dist/components/select/index.es.js +70 -0
  304. package/dist/components/separator/index.cjs.js +1 -0
  305. package/dist/components/separator/index.es.js +16 -0
  306. package/dist/components/sheet/index.cjs.js +1 -0
  307. package/dist/components/sheet/index.d.ts +3 -3
  308. package/dist/components/sheet/index.es.js +59 -0
  309. package/dist/components/skeleton/index.cjs.js +1 -0
  310. package/dist/components/skeleton/index.es.js +12 -0
  311. package/dist/components/slider/index.cjs.js +1 -0
  312. package/dist/components/slider/index.es.js +21 -0
  313. package/dist/components/switch/index.cjs.js +1 -0
  314. package/dist/components/switch/index.es.js +15 -0
  315. package/dist/components/table/index.cjs.js +1 -0
  316. package/dist/components/table/index.es.js +58 -0
  317. package/dist/components/tabs/index.cjs.js +1 -0
  318. package/dist/components/tabs/index.es.js +26 -0
  319. package/dist/components/textarea/index.cjs.js +1 -0
  320. package/dist/components/textarea/index.es.js +13 -0
  321. package/dist/components/theme-selector/index.cjs.js +1 -0
  322. package/dist/components/theme-selector/index.es.js +220 -0
  323. package/dist/components/toast/index.cjs.js +1 -0
  324. package/dist/components/toast/index.d.ts +3 -3
  325. package/dist/components/toast/index.es.js +54 -0
  326. package/dist/components/toaster/index.cjs.js +1 -0
  327. package/dist/components/toaster/index.es.js +23 -0
  328. package/dist/components/toggle/index.cjs.js +1 -0
  329. package/dist/components/toggle/index.d.ts +8 -8
  330. package/dist/components/toggle/index.es.js +35 -0
  331. package/dist/components/toggle-group/index.cjs.js +1 -0
  332. package/dist/components/toggle-group/index.d.ts +12 -0
  333. package/dist/components/toggle-group/index.es.js +39 -0
  334. package/dist/components/tooltip/index.cjs.js +1 -0
  335. package/dist/components/tooltip/index.es.js +15 -0
  336. package/dist/components/typography/index.cjs.js +1 -0
  337. package/dist/components/typography/index.d.ts +20 -20
  338. package/dist/components/typography/index.es.js +138 -0
  339. package/dist/components/waka-3d-pie-chart/index.cjs.js +1 -0
  340. package/dist/components/waka-3d-pie-chart/index.d.ts +4 -4
  341. package/dist/components/waka-3d-pie-chart/index.es.js +197 -0
  342. package/dist/components/waka-achievement-unlock/index.cjs.js +77 -0
  343. package/dist/components/waka-achievement-unlock/index.d.ts +2 -2
  344. package/dist/components/waka-achievement-unlock/index.es.js +349 -0
  345. package/dist/components/waka-activity-feed/index.cjs.js +15 -0
  346. package/dist/components/waka-activity-feed/index.es.js +315 -0
  347. package/dist/components/waka-ad-banner/index.cjs.js +1 -0
  348. package/dist/components/waka-ad-banner/index.es.js +183 -0
  349. package/dist/components/waka-ad-fallback/index.cjs.js +1 -0
  350. package/dist/components/waka-ad-fallback/index.es.js +99 -0
  351. package/dist/components/waka-ad-inline/index.cjs.js +1 -0
  352. package/dist/components/waka-ad-inline/index.es.js +57 -0
  353. package/dist/components/waka-ad-interstitial/index.cjs.js +1 -0
  354. package/dist/components/waka-ad-interstitial/index.d.ts +1 -1
  355. package/dist/components/waka-ad-interstitial/index.es.js +192 -0
  356. package/dist/components/waka-ad-placeholder/index.cjs.js +7 -0
  357. package/dist/components/waka-ad-placeholder/index.es.js +50 -0
  358. package/dist/components/waka-ad-provider/index.cjs.js +1 -0
  359. package/dist/components/waka-ad-provider/index.d.ts +2 -2
  360. package/dist/components/waka-ad-provider/index.es.js +173 -0
  361. package/dist/components/waka-ad-sidebar/index.cjs.js +1 -0
  362. package/dist/components/waka-ad-sidebar/index.es.js +61 -0
  363. package/dist/components/waka-ad-sticky-footer/index.cjs.js +1 -0
  364. package/dist/components/waka-ad-sticky-footer/index.d.ts +1 -1
  365. package/dist/components/waka-ad-sticky-footer/index.es.js +52 -0
  366. package/dist/components/waka-address-autocomplete/index.cjs.js +60 -0
  367. package/dist/components/waka-address-autocomplete/index.es.js +563 -0
  368. package/dist/components/waka-admincrumb/index.cjs.js +1 -0
  369. package/dist/components/waka-admincrumb/index.d.ts +9 -7
  370. package/dist/components/waka-admincrumb/index.es.js +193 -0
  371. package/dist/components/waka-alert-panel/index.cjs.js +1 -0
  372. package/dist/components/waka-alert-panel/index.es.js +420 -0
  373. package/dist/components/waka-alert-stack/index.cjs.js +1 -0
  374. package/dist/components/waka-alert-stack/index.es.js +410 -0
  375. package/dist/components/waka-allocation-matrix/index.cjs.js +19 -0
  376. package/dist/components/waka-allocation-matrix/index.es.js +735 -0
  377. package/dist/components/waka-approval-chain/index.cjs.js +1 -0
  378. package/dist/components/waka-approval-chain/index.es.js +357 -0
  379. package/dist/components/waka-artifact-list/index.cjs.js +1 -0
  380. package/dist/components/waka-artifact-list/index.es.js +302 -0
  381. package/dist/components/waka-audit-log/index.cjs.js +2 -0
  382. package/dist/components/waka-audit-log/index.es.js +829 -0
  383. package/dist/components/waka-autocomplete/index.cjs.js +1 -0
  384. package/dist/components/waka-autocomplete/index.es.js +171 -0
  385. package/dist/components/waka-badge-showcase/index.cjs.js +50 -0
  386. package/dist/components/waka-badge-showcase/index.es.js +395 -0
  387. package/dist/components/waka-barcode/index.cjs.js +1 -0
  388. package/dist/components/waka-barcode/index.es.js +205 -0
  389. package/dist/components/waka-biometric-prompt/index.cjs.js +52 -0
  390. package/dist/components/waka-biometric-prompt/index.es.js +334 -0
  391. package/dist/components/waka-bottom-sheet/index.cjs.js +1 -0
  392. package/dist/components/waka-bottom-sheet/index.d.ts +3 -3
  393. package/dist/components/waka-bottom-sheet/index.es.js +242 -0
  394. package/dist/components/waka-breadcrumb/index.cjs.js +1 -0
  395. package/dist/components/waka-breadcrumb/index.es.js +179 -0
  396. package/dist/components/waka-breadcrumb-path/index.cjs.js +1 -0
  397. package/dist/components/waka-breadcrumb-path/index.es.js +247 -0
  398. package/dist/components/waka-budget-burn/index.cjs.js +20 -0
  399. package/dist/components/waka-budget-burn/index.es.js +746 -0
  400. package/dist/components/waka-build-matrix/index.cjs.js +1 -0
  401. package/dist/components/waka-build-matrix/index.es.js +349 -0
  402. package/dist/components/waka-capacity-planner/index.cjs.js +28 -0
  403. package/dist/components/waka-capacity-planner/index.es.js +559 -0
  404. package/dist/components/waka-carousel/index.cjs.js +1 -0
  405. package/dist/components/waka-carousel/index.es.js +380 -0
  406. package/dist/components/waka-cart-summary/index.cjs.js +1 -0
  407. package/dist/components/waka-cart-summary/index.es.js +498 -0
  408. package/dist/components/waka-challenge-timer/index.cjs.js +38 -0
  409. package/dist/components/waka-challenge-timer/index.es.js +633 -0
  410. package/dist/components/waka-charts/WakaAreaChart.cjs.js +1 -0
  411. package/dist/components/waka-charts/WakaAreaChart.es.js +146 -0
  412. package/dist/components/waka-charts/WakaBarChart.cjs.js +1 -0
  413. package/dist/components/waka-charts/WakaBarChart.es.js +113 -0
  414. package/dist/components/waka-charts/WakaChart.cjs.js +1 -0
  415. package/dist/components/waka-charts/WakaChart.es.js +99 -0
  416. package/dist/components/waka-charts/WakaLineChart.cjs.js +1 -0
  417. package/dist/components/waka-charts/WakaLineChart.es.js +119 -0
  418. package/dist/components/waka-charts/WakaMiniChart.cjs.js +1 -0
  419. package/dist/components/waka-charts/WakaMiniChart.es.js +60 -0
  420. package/dist/components/waka-charts/WakaPieChart.cjs.js +1 -0
  421. package/dist/components/waka-charts/WakaPieChart.es.js +84 -0
  422. package/dist/components/waka-charts/WakaSparkline.cjs.js +1 -0
  423. package/dist/components/waka-charts/WakaSparkline.es.js +170 -0
  424. package/dist/components/waka-charts/dataTableHelpers.cjs.js +1 -0
  425. package/dist/components/waka-charts/dataTableHelpers.d.ts +1 -1
  426. package/dist/components/waka-charts/dataTableHelpers.es.js +50 -0
  427. package/dist/components/waka-charts/hooks/useChartTheme.cjs.js +1 -0
  428. package/dist/components/waka-charts/hooks/useChartTheme.es.js +67 -0
  429. package/dist/components/waka-charts/hooks/useRechartsLoader.cjs.js +1 -0
  430. package/dist/components/waka-charts/hooks/useRechartsLoader.es.js +45 -0
  431. package/dist/components/waka-charts/types.cjs.js +1 -0
  432. package/dist/components/waka-charts/types.es.js +32 -0
  433. package/dist/components/waka-chat-bubble/index.cjs.js +1 -0
  434. package/dist/components/waka-chat-bubble/index.d.ts +5 -5
  435. package/dist/components/waka-chat-bubble/index.es.js +472 -0
  436. package/dist/components/waka-checklist/index.cjs.js +40 -0
  437. package/dist/components/waka-checklist/index.es.js +543 -0
  438. package/dist/components/waka-checkout-stepper/index.cjs.js +1 -0
  439. package/dist/components/waka-checkout-stepper/index.es.js +379 -0
  440. package/dist/components/waka-cohort-table/index.cjs.js +2 -0
  441. package/dist/components/waka-cohort-table/index.d.ts +3 -3
  442. package/dist/components/waka-cohort-table/index.es.js +459 -0
  443. package/dist/components/waka-color-picker/index.cjs.js +5 -0
  444. package/dist/components/waka-color-picker/index.es.js +283 -0
  445. package/dist/components/waka-combo-counter/index.cjs.js +134 -0
  446. package/dist/components/waka-combo-counter/index.es.js +372 -0
  447. package/dist/components/waka-combobox/index.cjs.js +1 -0
  448. package/dist/components/waka-combobox/index.d.ts +2 -2
  449. package/dist/components/waka-combobox/index.es.js +234 -0
  450. package/dist/components/waka-command-bar/index.cjs.js +1 -0
  451. package/dist/components/waka-command-bar/index.d.ts +1 -1
  452. package/dist/components/waka-command-bar/index.es.js +240 -0
  453. package/dist/components/waka-compare-period/index.cjs.js +16 -0
  454. package/dist/components/waka-compare-period/index.es.js +684 -0
  455. package/dist/components/waka-config-comparator/index.cjs.js +1 -0
  456. package/dist/components/waka-config-comparator/index.es.js +336 -0
  457. package/dist/components/waka-connection-matrix/index.cjs.js +1 -0
  458. package/dist/components/waka-connection-matrix/index.d.ts +4 -4
  459. package/dist/components/waka-connection-matrix/index.es.js +739 -0
  460. package/dist/components/waka-container-list/index.cjs.js +1 -0
  461. package/dist/components/waka-container-list/index.es.js +330 -0
  462. package/dist/components/waka-content-recommendation/index.cjs.js +1 -0
  463. package/dist/components/waka-content-recommendation/index.d.ts +1 -1
  464. package/dist/components/waka-content-recommendation/index.es.js +194 -0
  465. package/dist/components/waka-contribution-graph/index.cjs.js +1 -0
  466. package/dist/components/waka-contribution-graph/index.es.js +323 -0
  467. package/dist/components/waka-cost-breakdown/index.cjs.js +1 -0
  468. package/dist/components/waka-cost-breakdown/index.d.ts +2 -2
  469. package/dist/components/waka-cost-breakdown/index.es.js +555 -0
  470. package/dist/components/waka-coupon-input/index.cjs.js +36 -0
  471. package/dist/components/waka-coupon-input/index.es.js +231 -0
  472. package/dist/components/waka-credit-activity-feed/index.cjs.js +17 -0
  473. package/dist/components/waka-credit-activity-feed/index.es.js +170 -0
  474. package/dist/components/waka-credit-alert/index.cjs.js +1 -0
  475. package/dist/components/waka-credit-alert/index.es.js +98 -0
  476. package/dist/components/waka-credit-balance/index.cjs.js +1 -0
  477. package/dist/components/waka-credit-balance/index.es.js +225 -0
  478. package/dist/components/waka-credit-breakdown/index.cjs.js +1 -0
  479. package/dist/components/waka-credit-breakdown/index.es.js +249 -0
  480. package/dist/components/waka-credit-burn-rate/index.cjs.js +1 -0
  481. package/dist/components/waka-credit-burn-rate/index.es.js +252 -0
  482. package/dist/components/waka-credit-card-input/index.cjs.js +1 -0
  483. package/dist/components/waka-credit-card-input/index.es.js +807 -0
  484. package/dist/components/waka-credit-history/index.cjs.js +1 -0
  485. package/dist/components/waka-credit-history/index.es.js +425 -0
  486. package/dist/components/waka-credit-meter/index.cjs.js +11 -0
  487. package/dist/components/waka-credit-meter/index.es.js +305 -0
  488. package/dist/components/waka-credit-pricing-pack/index.cjs.js +1 -0
  489. package/dist/components/waka-credit-pricing-pack/index.es.js +105 -0
  490. package/dist/components/waka-credit-projection/index.cjs.js +1 -0
  491. package/dist/components/waka-credit-projection/index.es.js +212 -0
  492. package/dist/components/waka-credit-quota/index.cjs.js +1 -0
  493. package/dist/components/waka-credit-quota/index.es.js +232 -0
  494. package/dist/components/waka-credit-receipt/index.cjs.js +1 -0
  495. package/dist/components/waka-credit-receipt/index.es.js +158 -0
  496. package/dist/components/waka-credit-top-up/index.cjs.js +1 -0
  497. package/dist/components/waka-credit-top-up/index.es.js +255 -0
  498. package/dist/components/waka-credit-transaction/index.cjs.js +1 -0
  499. package/dist/components/waka-credit-transaction/index.es.js +147 -0
  500. package/dist/components/waka-credit-transfer-form/index.cjs.js +1 -0
  501. package/dist/components/waka-credit-transfer-form/index.es.js +226 -0
  502. package/dist/components/waka-credit-usage-chart/index.cjs.js +1 -0
  503. package/dist/components/waka-credit-usage-chart/index.es.js +204 -0
  504. package/dist/components/waka-daily-reward/index.cjs.js +44 -0
  505. package/dist/components/waka-daily-reward/index.d.ts +2 -2
  506. package/dist/components/waka-daily-reward/index.es.js +404 -0
  507. package/dist/components/waka-database-card/index.cjs.js +1 -0
  508. package/dist/components/waka-database-card/index.es.js +390 -0
  509. package/dist/components/waka-date-range-picker/index.cjs.js +1 -0
  510. package/dist/components/waka-date-range-picker/index.d.ts +5 -5
  511. package/dist/components/waka-date-range-picker/index.es.js +203 -0
  512. package/dist/components/waka-datetime-picker/index.cjs.js +1 -0
  513. package/dist/components/waka-datetime-picker/index.es.js +359 -0
  514. package/dist/components/waka-datetime-picker.form-integration/index.cjs.js +1 -0
  515. package/dist/components/waka-datetime-picker.form-integration/index.d.ts +4 -4
  516. package/dist/components/waka-datetime-picker.form-integration/index.es.js +36 -0
  517. package/dist/components/waka-dependency-tree/index.cjs.js +1 -0
  518. package/dist/components/waka-dependency-tree/index.es.js +368 -0
  519. package/dist/components/waka-deployment-lane/index.cjs.js +1 -0
  520. package/dist/components/waka-deployment-lane/index.es.js +295 -0
  521. package/dist/components/waka-device-trust/index.cjs.js +13 -0
  522. package/dist/components/waka-device-trust/index.d.ts +3 -3
  523. package/dist/components/waka-device-trust/index.es.js +683 -0
  524. package/dist/components/waka-doc-breadcrumb/index.cjs.js +1 -0
  525. package/dist/components/waka-doc-breadcrumb/index.d.ts +1 -1
  526. package/dist/components/waka-doc-breadcrumb/index.es.js +22 -0
  527. package/dist/components/waka-doc-callout/index.cjs.js +1 -0
  528. package/dist/components/waka-doc-callout/index.es.js +58 -0
  529. package/dist/components/waka-doc-code-block/index.cjs.js +2 -0
  530. package/dist/components/waka-doc-code-block/index.es.js +72 -0
  531. package/dist/components/waka-doc-nav/index.cjs.js +1 -0
  532. package/dist/components/waka-doc-nav/index.es.js +74 -0
  533. package/dist/components/waka-doc-renderer/index.cjs.js +2 -0
  534. package/dist/components/waka-doc-renderer/index.es.js +163 -0
  535. package/dist/components/waka-doc-search/index.cjs.js +1 -0
  536. package/dist/components/waka-doc-search/index.es.js +96 -0
  537. package/dist/components/waka-doc-table/index.cjs.js +1 -0
  538. package/dist/components/waka-doc-table/index.es.js +17 -0
  539. package/dist/components/waka-doc-toc/index.cjs.js +1 -0
  540. package/dist/components/waka-doc-toc/index.d.ts +1 -1
  541. package/dist/components/waka-doc-toc/index.es.js +49 -0
  542. package/dist/components/waka-doc-toolbar/index.cjs.js +1 -0
  543. package/dist/components/waka-doc-toolbar/index.es.js +82 -0
  544. package/dist/components/waka-doc-version/index.cjs.js +1 -0
  545. package/dist/components/waka-doc-version/index.es.js +56 -0
  546. package/dist/components/waka-dock/index.cjs.js +1 -0
  547. package/dist/components/waka-dock/index.es.js +111 -0
  548. package/dist/components/waka-drawer/index.cjs.js +1 -0
  549. package/dist/components/waka-drawer/index.es.js +137 -0
  550. package/dist/components/waka-empty-state/index.cjs.js +30 -0
  551. package/dist/components/waka-empty-state/index.es.js +185 -0
  552. package/dist/components/waka-env-var-editor/index.cjs.js +2 -0
  553. package/dist/components/waka-env-var-editor/index.es.js +289 -0
  554. package/dist/components/waka-error-shake/index.cjs.js +62 -0
  555. package/dist/components/waka-error-shake/index.d.ts +1 -1
  556. package/dist/components/waka-error-shake/index.es.js +167 -0
  557. package/dist/components/waka-feature-announcement/index.cjs.js +57 -0
  558. package/dist/components/waka-feature-announcement/index.d.ts +1 -1
  559. package/dist/components/waka-feature-announcement/index.es.js +429 -0
  560. package/dist/components/waka-feature-flag-row/index.cjs.js +1 -0
  561. package/dist/components/waka-feature-flag-row/index.es.js +305 -0
  562. package/dist/components/waka-file-upload/index.cjs.js +1 -0
  563. package/dist/components/waka-file-upload/index.es.js +201 -0
  564. package/dist/components/waka-floating-nav/index.cjs.js +1 -0
  565. package/dist/components/waka-floating-nav/index.es.js +139 -0
  566. package/dist/components/waka-flow-diagram/index.cjs.js +13 -0
  567. package/dist/components/waka-flow-diagram/index.d.ts +3 -3
  568. package/dist/components/waka-flow-diagram/index.es.js +272 -0
  569. package/dist/components/waka-funnel-chart/index.cjs.js +13 -0
  570. package/dist/components/waka-funnel-chart/index.es.js +347 -0
  571. package/dist/components/waka-glow-card/index.cjs.js +1 -0
  572. package/dist/components/waka-glow-card/index.es.js +146 -0
  573. package/dist/components/waka-goal-progress/index.cjs.js +35 -0
  574. package/dist/components/waka-goal-progress/index.es.js +473 -0
  575. package/dist/components/waka-haptic-button/index.cjs.js +15 -0
  576. package/dist/components/waka-haptic-button/index.d.ts +5 -5
  577. package/dist/components/waka-haptic-button/index.es.js +199 -0
  578. package/dist/components/waka-health-pulse/index.cjs.js +84 -0
  579. package/dist/components/waka-health-pulse/index.es.js +326 -0
  580. package/dist/components/waka-heatmap/index.cjs.js +1 -0
  581. package/dist/components/waka-heatmap/index.es.js +607 -0
  582. package/dist/components/waka-hotspot/index.cjs.js +1 -0
  583. package/dist/components/waka-hotspot/index.d.ts +2 -2
  584. package/dist/components/waka-hotspot/index.es.js +281 -0
  585. package/dist/components/waka-image/index.cjs.js +1 -0
  586. package/dist/components/waka-image/index.es.js +189 -0
  587. package/dist/components/waka-incident-timeline/index.cjs.js +1 -0
  588. package/dist/components/waka-incident-timeline/index.es.js +372 -0
  589. package/dist/components/waka-invoice-preview/index.cjs.js +1 -0
  590. package/dist/components/waka-invoice-preview/index.es.js +514 -0
  591. package/dist/components/waka-kanban/index.cjs.js +1 -0
  592. package/dist/components/waka-kanban/index.es.js +326 -0
  593. package/dist/components/waka-kpi-dashboard/index.cjs.js +1 -0
  594. package/dist/components/waka-kpi-dashboard/index.es.js +386 -0
  595. package/dist/components/waka-kubernetes-overview/index.cjs.js +1 -0
  596. package/dist/components/waka-kubernetes-overview/index.es.js +725 -0
  597. package/dist/components/waka-leaderboard/index.cjs.js +17 -0
  598. package/dist/components/waka-leaderboard/index.d.ts +3 -3
  599. package/dist/components/waka-leaderboard/index.es.js +361 -0
  600. package/dist/components/waka-level-progress/index.cjs.js +57 -0
  601. package/dist/components/waka-level-progress/index.es.js +359 -0
  602. package/dist/components/waka-liquid-button/index.cjs.js +36 -0
  603. package/dist/components/waka-liquid-button/index.d.ts +5 -5
  604. package/dist/components/waka-liquid-button/index.es.js +312 -0
  605. package/dist/components/waka-loading-orbit/index.cjs.js +21 -0
  606. package/dist/components/waka-loading-orbit/index.d.ts +3 -3
  607. package/dist/components/waka-loading-orbit/index.es.js +298 -0
  608. package/dist/components/waka-log-viewer/index.cjs.js +4 -0
  609. package/dist/components/waka-log-viewer/index.es.js +318 -0
  610. package/dist/components/waka-loot-box/index.cjs.js +137 -0
  611. package/dist/components/waka-loot-box/index.es.js +511 -0
  612. package/dist/components/waka-magic-link/index.cjs.js +9 -0
  613. package/dist/components/waka-magic-link/index.es.js +191 -0
  614. package/dist/components/waka-magnetic-button/index.cjs.js +29 -0
  615. package/dist/components/waka-magnetic-button/index.d.ts +5 -5
  616. package/dist/components/waka-magnetic-button/index.es.js +281 -0
  617. package/dist/components/waka-mention-input/index.cjs.js +1 -0
  618. package/dist/components/waka-mention-input/index.es.js +448 -0
  619. package/dist/components/waka-metric-sparkline/index.cjs.js +1 -0
  620. package/dist/components/waka-metric-sparkline/index.d.ts +1 -1
  621. package/dist/components/waka-metric-sparkline/index.es.js +327 -0
  622. package/dist/components/waka-migration-list/index.cjs.js +35 -0
  623. package/dist/components/waka-migration-list/index.es.js +337 -0
  624. package/dist/components/waka-milestone-road/index.cjs.js +45 -0
  625. package/dist/components/waka-milestone-road/index.es.js +646 -0
  626. package/dist/components/waka-modal/index.cjs.js +1 -0
  627. package/dist/components/waka-modal/index.es.js +148 -0
  628. package/dist/components/waka-morph-button/index.cjs.js +42 -0
  629. package/dist/components/waka-morph-button/index.d.ts +6 -6
  630. package/dist/components/waka-morph-button/index.es.js +264 -0
  631. package/dist/components/waka-network-topology/index.cjs.js +1 -0
  632. package/dist/components/waka-network-topology/index.es.js +550 -0
  633. package/dist/components/waka-notifications/index.cjs.js +1 -0
  634. package/dist/components/waka-notifications/index.es.js +282 -0
  635. package/dist/components/waka-number-input/index.cjs.js +1 -0
  636. package/dist/components/waka-number-input/index.d.ts +4 -4
  637. package/dist/components/waka-number-input/index.es.js +178 -0
  638. package/dist/components/waka-orbital-menu/index.cjs.js +1 -0
  639. package/dist/components/waka-orbital-menu/index.es.js +243 -0
  640. package/dist/components/waka-order-tracker/index.cjs.js +1 -0
  641. package/dist/components/waka-order-tracker/index.es.js +538 -0
  642. package/dist/components/waka-outstream-video/index.cjs.js +1 -0
  643. package/dist/components/waka-outstream-video/index.d.ts +1 -1
  644. package/dist/components/waka-outstream-video/index.es.js +132 -0
  645. package/dist/components/waka-pagination/index.cjs.js +1 -0
  646. package/dist/components/waka-pagination/index.es.js +183 -0
  647. package/dist/components/waka-password-strength/index.cjs.js +25 -0
  648. package/dist/components/waka-password-strength/index.d.ts +1 -1
  649. package/dist/components/waka-password-strength/index.es.js +345 -0
  650. package/dist/components/waka-payment-method-picker/index.cjs.js +1 -0
  651. package/dist/components/waka-payment-method-picker/index.d.ts +3 -3
  652. package/dist/components/waka-payment-method-picker/index.es.js +520 -0
  653. package/dist/components/waka-permission-matrix/index.cjs.js +20 -0
  654. package/dist/components/waka-permission-matrix/index.es.js +597 -0
  655. package/dist/components/waka-phone-input/index.cjs.js +1 -0
  656. package/dist/components/waka-phone-input/index.es.js +707 -0
  657. package/dist/components/waka-pipeline-view/index.cjs.js +18 -0
  658. package/dist/components/waka-pipeline-view/index.es.js +272 -0
  659. package/dist/components/waka-player-card/index.cjs.js +27 -0
  660. package/dist/components/waka-player-card/index.es.js +451 -0
  661. package/dist/components/waka-pod-card/index.cjs.js +1 -0
  662. package/dist/components/waka-pod-card/index.es.js +431 -0
  663. package/dist/components/waka-points-popup/index.cjs.js +1 -0
  664. package/dist/components/waka-points-popup/index.d.ts +3 -3
  665. package/dist/components/waka-points-popup/index.es.js +168 -0
  666. package/dist/components/waka-power-up/index.cjs.js +82 -0
  667. package/dist/components/waka-power-up/index.es.js +477 -0
  668. package/dist/components/waka-presence-indicator/index.cjs.js +15 -0
  669. package/dist/components/waka-presence-indicator/index.es.js +533 -0
  670. package/dist/components/waka-pricing-table/index.cjs.js +15 -0
  671. package/dist/components/waka-pricing-table/index.d.ts +1 -1
  672. package/dist/components/waka-pricing-table/index.es.js +445 -0
  673. package/dist/components/waka-product-card/index.cjs.js +25 -0
  674. package/dist/components/waka-product-card/index.es.js +337 -0
  675. package/dist/components/waka-progress-onboarding/index.cjs.js +32 -0
  676. package/dist/components/waka-progress-onboarding/index.d.ts +1 -1
  677. package/dist/components/waka-progress-onboarding/index.es.js +375 -0
  678. package/dist/components/waka-pull-to-refresh/index.cjs.js +1 -0
  679. package/dist/components/waka-pull-to-refresh/index.d.ts +3 -3
  680. package/dist/components/waka-pull-to-refresh/index.es.js +224 -0
  681. package/dist/components/waka-qrcode/index.cjs.js +1 -0
  682. package/dist/components/waka-qrcode/index.es.js +105 -0
  683. package/dist/components/waka-query-explain/index.cjs.js +7 -0
  684. package/dist/components/waka-query-explain/index.es.js +519 -0
  685. package/dist/components/waka-quest-card/index.cjs.js +40 -0
  686. package/dist/components/waka-quest-card/index.es.js +562 -0
  687. package/dist/components/waka-quota-bar/index.cjs.js +11 -0
  688. package/dist/components/waka-quota-bar/index.d.ts +1 -1
  689. package/dist/components/waka-quota-bar/index.es.js +387 -0
  690. package/dist/components/waka-radar-score/index.cjs.js +1 -0
  691. package/dist/components/waka-radar-score/index.d.ts +4 -4
  692. package/dist/components/waka-radar-score/index.es.js +213 -0
  693. package/dist/components/waka-rank-badge/index.cjs.js +49 -0
  694. package/dist/components/waka-rank-badge/index.es.js +394 -0
  695. package/dist/components/waka-rating-input/index.cjs.js +16 -0
  696. package/dist/components/waka-rating-input/index.es.js +223 -0
  697. package/dist/components/waka-reaction-picker/index.cjs.js +1 -0
  698. package/dist/components/waka-reaction-picker/index.es.js +2351 -0
  699. package/dist/components/waka-region-map/index.cjs.js +1 -0
  700. package/dist/components/waka-region-map/index.es.js +572 -0
  701. package/dist/components/waka-resource-gauge/index.cjs.js +6 -0
  702. package/dist/components/waka-resource-gauge/index.es.js +344 -0
  703. package/dist/components/waka-resource-pool/index.cjs.js +54 -0
  704. package/dist/components/waka-resource-pool/index.d.ts +2 -2
  705. package/dist/components/waka-resource-pool/index.es.js +604 -0
  706. package/dist/components/waka-rich-text-editor/index.cjs.js +1 -0
  707. package/dist/components/waka-rich-text-editor/index.es.js +337 -0
  708. package/dist/components/waka-rollback-slider/index.cjs.js +13 -0
  709. package/dist/components/waka-rollback-slider/index.es.js +451 -0
  710. package/dist/components/waka-sankey-diagram/index.cjs.js +31 -0
  711. package/dist/components/waka-sankey-diagram/index.es.js +494 -0
  712. package/dist/components/waka-schedule-picker/index.cjs.js +1 -0
  713. package/dist/components/waka-schedule-picker/index.es.js +527 -0
  714. package/dist/components/waka-scratch-card/index.cjs.js +61 -0
  715. package/dist/components/waka-scratch-card/index.es.js +373 -0
  716. package/dist/components/waka-season-pass/index.cjs.js +60 -0
  717. package/dist/components/waka-season-pass/index.d.ts +1 -1
  718. package/dist/components/waka-season-pass/index.es.js +463 -0
  719. package/dist/components/waka-secret-card/index.cjs.js +1 -0
  720. package/dist/components/waka-secret-card/index.es.js +291 -0
  721. package/dist/components/waka-security-scan-result/index.cjs.js +1 -0
  722. package/dist/components/waka-security-scan-result/index.es.js +446 -0
  723. package/dist/components/waka-security-score/index.cjs.js +10 -0
  724. package/dist/components/waka-security-score/index.es.js +650 -0
  725. package/dist/components/waka-segmented-control/index.cjs.js +1 -0
  726. package/dist/components/waka-segmented-control/index.d.ts +2 -2
  727. package/dist/components/waka-segmented-control/index.es.js +96 -0
  728. package/dist/components/waka-server-rack/index.cjs.js +11 -0
  729. package/dist/components/waka-server-rack/index.es.js +579 -0
  730. package/dist/components/waka-service-graph/index.cjs.js +1 -0
  731. package/dist/components/waka-service-graph/index.es.js +444 -0
  732. package/dist/components/waka-session-manager/index.cjs.js +1 -0
  733. package/dist/components/waka-session-manager/index.d.ts +3 -3
  734. package/dist/components/waka-session-manager/index.es.js +401 -0
  735. package/dist/components/waka-signature-pad/index.cjs.js +1 -0
  736. package/dist/components/waka-signature-pad/index.es.js +376 -0
  737. package/dist/components/waka-skeleton-wave/index.cjs.js +15 -0
  738. package/dist/components/waka-skeleton-wave/index.d.ts +3 -3
  739. package/dist/components/waka-skeleton-wave/index.es.js +254 -0
  740. package/dist/components/waka-skill-tree/index.cjs.js +65 -0
  741. package/dist/components/waka-skill-tree/index.es.js +630 -0
  742. package/dist/components/waka-sla-tracker/index.cjs.js +1 -0
  743. package/dist/components/waka-sla-tracker/index.es.js +471 -0
  744. package/dist/components/waka-slider-range/index.cjs.js +1 -0
  745. package/dist/components/waka-slider-range/index.es.js +382 -0
  746. package/dist/components/waka-spin-wheel/index.cjs.js +24 -0
  747. package/dist/components/waka-spin-wheel/index.es.js +267 -0
  748. package/dist/components/waka-spinner/index.cjs.js +18 -0
  749. package/dist/components/waka-spinner/index.d.ts +3 -3
  750. package/dist/components/waka-spinner/index.es.js +171 -0
  751. package/dist/components/waka-sponsored-badge/index.cjs.js +1 -0
  752. package/dist/components/waka-sponsored-badge/index.es.js +52 -0
  753. package/dist/components/waka-sponsored-card/index.cjs.js +1 -0
  754. package/dist/components/waka-sponsored-card/index.d.ts +1 -1
  755. package/dist/components/waka-sponsored-card/index.es.js +198 -0
  756. package/dist/components/waka-sponsored-feed/index.cjs.js +1 -0
  757. package/dist/components/waka-sponsored-feed/index.es.js +48 -0
  758. package/dist/components/waka-spotlight/index.cjs.js +1 -0
  759. package/dist/components/waka-spotlight/index.d.ts +1 -1
  760. package/dist/components/waka-spotlight/index.es.js +291 -0
  761. package/dist/components/waka-stat/index.cjs.js +1 -0
  762. package/dist/components/waka-stat/index.d.ts +1 -1
  763. package/dist/components/waka-stat/index.es.js +243 -0
  764. package/dist/components/waka-stats-hexagon/index.cjs.js +1 -0
  765. package/dist/components/waka-stats-hexagon/index.d.ts +1 -1
  766. package/dist/components/waka-stats-hexagon/index.es.js +565 -0
  767. package/dist/components/waka-status-matrix/index.cjs.js +1 -0
  768. package/dist/components/waka-status-matrix/index.es.js +304 -0
  769. package/dist/components/waka-stepper/index.cjs.js +1 -0
  770. package/dist/components/waka-stepper/index.es.js +188 -0
  771. package/dist/components/waka-streak-counter/index.cjs.js +25 -0
  772. package/dist/components/waka-streak-counter/index.es.js +196 -0
  773. package/dist/components/waka-success-explosion/index.cjs.js +6 -0
  774. package/dist/components/waka-success-explosion/index.d.ts +1 -1
  775. package/dist/components/waka-success-explosion/index.es.js +243 -0
  776. package/dist/components/waka-swipe-card/index.cjs.js +1 -0
  777. package/dist/components/waka-swipe-card/index.d.ts +3 -3
  778. package/dist/components/waka-swipe-card/index.es.js +347 -0
  779. package/dist/components/waka-tabs-morph/index.cjs.js +1 -0
  780. package/dist/components/waka-tabs-morph/index.d.ts +2 -2
  781. package/dist/components/waka-tabs-morph/index.es.js +176 -0
  782. package/dist/components/waka-tag-input/index.cjs.js +1 -0
  783. package/dist/components/waka-tag-input/index.d.ts +1 -1
  784. package/dist/components/waka-tag-input/index.es.js +387 -0
  785. package/dist/components/waka-team-banner/index.cjs.js +112 -0
  786. package/dist/components/waka-team-banner/index.es.js +625 -0
  787. package/dist/components/waka-terminal-output/index.cjs.js +2 -0
  788. package/dist/components/waka-terminal-output/index.es.js +460 -0
  789. package/dist/components/waka-test-report/index.cjs.js +2 -0
  790. package/dist/components/waka-test-report/index.es.js +452 -0
  791. package/dist/components/waka-theme-creator/index.cjs.js +32 -0
  792. package/dist/components/waka-theme-creator/index.es.js +457 -0
  793. package/dist/components/waka-theme-manager/index.cjs.js +1 -0
  794. package/dist/components/waka-theme-manager/index.d.ts +3 -3
  795. package/dist/components/waka-theme-manager/index.es.js +485 -0
  796. package/dist/components/waka-thread-view/index.cjs.js +18 -0
  797. package/dist/components/waka-thread-view/index.es.js +384 -0
  798. package/dist/components/waka-tilt-card/index.cjs.js +1 -0
  799. package/dist/components/waka-tilt-card/index.es.js +148 -0
  800. package/dist/components/waka-time-picker/index.cjs.js +1 -0
  801. package/dist/components/waka-time-picker/index.es.js +292 -0
  802. package/dist/components/waka-timeline/index.cjs.js +1 -0
  803. package/dist/components/waka-timeline/index.es.js +192 -0
  804. package/dist/components/waka-tooltip-tour/index.cjs.js +11 -0
  805. package/dist/components/waka-tooltip-tour/index.d.ts +1 -1
  806. package/dist/components/waka-tooltip-tour/index.es.js +348 -0
  807. package/dist/components/waka-tour-guide/index.cjs.js +24 -0
  808. package/dist/components/waka-tour-guide/index.d.ts +1 -1
  809. package/dist/components/waka-tour-guide/index.es.js +390 -0
  810. package/dist/components/waka-tournament-bracket/index.cjs.js +20 -0
  811. package/dist/components/waka-tournament-bracket/index.d.ts +3 -3
  812. package/dist/components/waka-tournament-bracket/index.es.js +648 -0
  813. package/dist/components/waka-trace-viewer/index.cjs.js +1 -0
  814. package/dist/components/waka-trace-viewer/index.es.js +341 -0
  815. package/dist/components/waka-tree/index.cjs.js +1 -0
  816. package/dist/components/waka-tree/index.es.js +197 -0
  817. package/dist/components/waka-treemap-chart/index.cjs.js +1 -0
  818. package/dist/components/waka-treemap-chart/index.es.js +433 -0
  819. package/dist/components/waka-two-factor-setup/index.cjs.js +3 -0
  820. package/dist/components/waka-two-factor-setup/index.es.js +611 -0
  821. package/dist/components/waka-typewriter/index.cjs.js +29 -0
  822. package/dist/components/waka-typewriter/index.es.js +199 -0
  823. package/dist/components/waka-typing-indicator/index.cjs.js +71 -0
  824. package/dist/components/waka-typing-indicator/index.d.ts +3 -3
  825. package/dist/components/waka-typing-indicator/index.es.js +242 -0
  826. package/dist/components/waka-versus-card/index.cjs.js +57 -0
  827. package/dist/components/waka-versus-card/index.d.ts +1 -1
  828. package/dist/components/waka-versus-card/index.es.js +467 -0
  829. package/dist/components/waka-video/index.cjs.js +1 -0
  830. package/dist/components/waka-video/index.es.js +253 -0
  831. package/dist/components/waka-video-ad/index.cjs.js +1 -0
  832. package/dist/components/waka-video-ad/index.d.ts +1 -1
  833. package/dist/components/waka-video-ad/index.es.js +253 -0
  834. package/dist/components/waka-video-call/index.cjs.js +11 -0
  835. package/dist/components/waka-video-call/index.d.ts +2 -2
  836. package/dist/components/waka-video-call/index.es.js +604 -0
  837. package/dist/components/waka-video-overlay/index.cjs.js +1 -0
  838. package/dist/components/waka-video-overlay/index.d.ts +1 -1
  839. package/dist/components/waka-video-overlay/index.es.js +172 -0
  840. package/dist/components/waka-virtual-list/index.cjs.js +1 -0
  841. package/dist/components/waka-virtual-list/index.es.js +138 -0
  842. package/dist/components/waka-voice-message/index.cjs.js +1 -0
  843. package/dist/components/waka-voice-message/index.es.js +393 -0
  844. package/dist/components/waka-welcome-modal/index.cjs.js +41 -0
  845. package/dist/components/waka-welcome-modal/index.es.js +354 -0
  846. package/dist/components/waka-xp-bar/index.cjs.js +87 -0
  847. package/dist/components/waka-xp-bar/index.es.js +381 -0
  848. package/dist/context/admincrumb-context.cjs.js +1 -0
  849. package/dist/context/admincrumb-context.d.ts +1 -1
  850. package/dist/context/admincrumb-context.es.js +78 -0
  851. package/dist/context/language-context.cjs.js +1 -0
  852. package/dist/context/language-context.es.js +95 -0
  853. package/dist/context/theme-context.cjs.js +1 -0
  854. package/dist/context/theme-context.es.js +117 -0
  855. package/dist/context/theme-provider.cjs.js +3 -0
  856. package/dist/context/theme-provider.es.js +274 -0
  857. package/dist/context/waka-provider.cjs.js +1 -0
  858. package/dist/context/waka-provider.es.js +115 -0
  859. package/dist/doc.cjs.js +1 -2
  860. package/dist/doc.es.js +12 -131
  861. package/dist/editor.cjs.js +1 -48
  862. package/dist/editor.es.js +27 -6468
  863. package/dist/export.cjs.js +1 -1
  864. package/dist/export.es.js +2 -1
  865. package/dist/hooks/use-toast.cjs.js +1 -0
  866. package/dist/hooks/use-toast.es.js +100 -0
  867. package/dist/hooks/use-translation.cjs.js +1 -0
  868. package/dist/hooks/use-translation.d.ts +2 -1
  869. package/dist/hooks/use-translation.es.js +29 -0
  870. package/dist/index.cjs.js +1 -2656
  871. package/dist/index.d.ts +3 -1
  872. package/dist/index.es.js +357 -94880
  873. package/dist/lib/i18n.cjs.js +1 -0
  874. package/dist/lib/i18n.d.ts +1 -1
  875. package/dist/lib/i18n.es.js +27 -0
  876. package/dist/locales/default-resources.cjs.js +1 -0
  877. package/dist/locales/default-resources.d.ts +155 -0
  878. package/dist/locales/default-resources.es.js +150 -0
  879. package/dist/{exceljs.min-BQi0sACt.js → node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/dist/exceljs.min.cjs.js} +13 -13
  880. package/dist/{exceljs.min-M0HhQgNK.mjs → node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/dist/exceljs.min.es.js} +21 -21
  881. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-bash.cjs.js +1 -0
  882. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-bash.es.js +176 -0
  883. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-csharp.cjs.js +1 -0
  884. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-csharp.es.js +237 -0
  885. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-css.cjs.js +1 -0
  886. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-css.es.js +56 -0
  887. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-docker.cjs.js +1 -0
  888. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-docker.es.js +76 -0
  889. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-git.cjs.js +1 -0
  890. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-git.es.js +15 -0
  891. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-go.cjs.js +1 -0
  892. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-go.es.js +21 -0
  893. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-java.cjs.js +1 -0
  894. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-java.es.js +100 -0
  895. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-javascript.cjs.js +1 -0
  896. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-javascript.es.js +102 -0
  897. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-json.cjs.js +1 -0
  898. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-json.es.js +26 -0
  899. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-jsx.cjs.js +1 -0
  900. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-jsx.es.js +47 -0
  901. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.cjs.js +1 -0
  902. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.es.js +251 -0
  903. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-php.cjs.js +1 -0
  904. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-php.es.js +278 -0
  905. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-python.cjs.js +1 -0
  906. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-python.es.js +60 -0
  907. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-ruby.cjs.js +1 -0
  908. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-ruby.es.js +157 -0
  909. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-rust.cjs.js +1 -0
  910. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-rust.es.js +93 -0
  911. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-scss.cjs.js +1 -0
  912. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-scss.es.js +53 -0
  913. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-sql.cjs.js +1 -0
  914. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-sql.es.js +30 -0
  915. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-tsx.cjs.js +1 -0
  916. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-tsx.es.js +9 -0
  917. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.cjs.js +1 -0
  918. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.es.js +39 -0
  919. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-yaml.cjs.js +1 -0
  920. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-yaml.es.js +69 -0
  921. package/dist/node_modules/.pnpm/react-resizable-panels@4.11.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-resizable-panels/dist/react-resizable-panels.cjs.js +1 -0
  922. package/dist/node_modules/.pnpm/react-resizable-panels@4.11.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-resizable-panels/dist/react-resizable-panels.es.js +1542 -0
  923. package/dist/rich-text.cjs.js +1 -1
  924. package/dist/rich-text.es.js +1 -1
  925. package/dist/utils/cn.cjs.js +1 -0
  926. package/dist/utils/cn.d.ts +2 -1
  927. package/dist/utils/cn.es.js +6 -0
  928. package/dist/utils/datetime-helpers.cjs.js +1 -0
  929. package/dist/utils/datetime-helpers.es.js +182 -0
  930. package/dist/utils/local-date.cjs.js +1 -0
  931. package/dist/utils/local-date.d.ts +28 -0
  932. package/dist/utils/local-date.es.js +12 -0
  933. package/dist/utils/security.cjs.js +1 -0
  934. package/dist/utils/security.es.js +61 -0
  935. package/dist/utils/theme-loader.cjs.js +1 -0
  936. package/dist/utils/theme-loader.d.ts +1 -1
  937. package/dist/utils/theme-loader.es.js +124 -0
  938. package/dist/utils/tweak.cjs.js +1 -0
  939. package/dist/{cn-Bpd_xIzI.mjs → utils/tweak.es.js} +1 -4
  940. package/package.json +68 -29
  941. package/src/blocks/_shared/identity/InviteUserPanel.tsx +91 -0
  942. package/src/blocks/_shared/identity/RoleSelect.tsx +61 -0
  943. package/src/blocks/_shared/identity/SidePushLayout.tsx +135 -0
  944. package/src/blocks/_shared/identity/index.ts +3 -0
  945. package/src/blocks/_shared/identity/types.ts +29 -0
  946. package/src/blocks/api-keys-manager/ApiKeysManager.stories.tsx +62 -0
  947. package/src/blocks/api-keys-manager/WakaApiKeysManager.mdx +32 -0
  948. package/src/blocks/api-keys-manager/index.tsx +442 -0
  949. package/src/blocks/avatar-upload/AvatarUpload.stories.tsx +27 -0
  950. package/src/blocks/avatar-upload/WakaAvatarUpload.mdx +31 -0
  951. package/src/blocks/avatar-upload/index.tsx +258 -0
  952. package/src/blocks/empty-states/index.tsx +1 -1
  953. package/src/blocks/index.ts +9 -0
  954. package/src/blocks/on-call-schedule/index.tsx +1 -1
  955. package/src/blocks/profile-list/ProfileList.stories.tsx +29 -0
  956. package/src/blocks/profile-list/WakaProfileList.mdx +22 -0
  957. package/src/blocks/profile-list/index.tsx +193 -0
  958. package/src/blocks/scan-report-generator/index.tsx +3 -2
  959. package/src/blocks/team-form/TeamForm.stories.tsx +64 -0
  960. package/src/blocks/team-form/WakaTeamForm.mdx +32 -0
  961. package/src/blocks/team-form/index.tsx +193 -0
  962. package/src/blocks/theme-creator-block/index.tsx +2 -2
  963. package/src/blocks/user-management/UserManagement.stories.tsx +61 -403
  964. package/src/blocks/user-management/WakaUserManagement.mdx +32 -0
  965. package/src/blocks/user-management/index.tsx +286 -968
  966. package/src/blocks/waka-doc-shell/index.tsx +1 -1
  967. package/src/components/DataTable/DataTable.tsx +6 -4
  968. package/src/components/DataTable/DataTableAdvanced.tsx +8 -22
  969. package/src/components/DataTable/DataTableColumnResizer.tsx +9 -3
  970. package/src/components/DataTable/DataTableContextMenu.tsx +2 -2
  971. package/src/components/DataTable/DataTableEditCell.tsx +18 -14
  972. package/src/components/DataTable/DataTableFilters.tsx +42 -25
  973. package/src/components/DataTable/DataTableGrouping.tsx +22 -10
  974. package/src/components/DataTable/DataTablePagination.tsx +28 -8
  975. package/src/components/DataTable/DataTableSelection.tsx +31 -25
  976. package/src/components/DataTable/DataTableToolbar.tsx +1 -1
  977. package/src/components/DataTable/hooks/useDataTable.ts +15 -1
  978. package/src/components/DataTable/hooks/useDataTableAdvanced.ts +10 -6
  979. package/src/components/DataTable/hooks/useDataTableEdit.ts +3 -3
  980. package/src/components/DataTable/hooks/useDataTableExport.ts +22 -9
  981. package/src/components/DataTable/hooks/useDataTableImport.ts +12 -12
  982. package/src/components/DataTable/hooks/useDataTableVirtualization.ts +1 -1
  983. package/src/components/DataTable/types.ts +15 -15
  984. package/src/components/DataTable/utils.ts +16 -17
  985. package/src/components/calendar/index.tsx +35 -27
  986. package/src/components/code/index.tsx +13 -3
  987. package/src/components/editor/blocks/waka-diagram-block.tsx +72 -6
  988. package/src/components/editor/waka-ai-writer.tsx +40 -26
  989. package/src/components/editor/waka-collaborative-editor.tsx +49 -24
  990. package/src/components/editor/waka-diff-viewer.tsx +23 -5
  991. package/src/components/editor/waka-dnd-editor.tsx +25 -13
  992. package/src/components/editor/waka-document-editor.tsx +54 -31
  993. package/src/components/editor/waka-editor.tsx +11 -13
  994. package/src/components/editor/waka-floating-toolbar.tsx +20 -9
  995. package/src/components/editor/waka-markdown-editor.tsx +21 -20
  996. package/src/components/editor/waka-mention-editor.tsx +27 -17
  997. package/src/components/editor/waka-slash-menu.tsx +48 -15
  998. package/src/components/editor/waka-spec-editor.tsx +28 -18
  999. package/src/components/index.ts +2 -0
  1000. package/src/components/input-otp/index.tsx +3 -1
  1001. package/src/components/resizable/Resizable.mdx +73 -0
  1002. package/src/components/resizable/Resizable.stories.tsx +74 -0
  1003. package/src/components/resizable/index.tsx +63 -0
  1004. package/src/components/toaster/Toaster.stories.tsx +1 -1
  1005. package/src/components/toaster/index.tsx +1 -1
  1006. package/src/components/toggle-group/ToggleGroup.mdx +62 -0
  1007. package/src/components/toggle-group/ToggleGroup.stories.tsx +85 -0
  1008. package/src/components/toggle-group/index.tsx +61 -0
  1009. package/src/components/typography/index.tsx +1 -1
  1010. package/src/components/waka-ad-provider/index.tsx +2 -2
  1011. package/src/components/waka-admincrumb/index.tsx +2 -2
  1012. package/src/components/waka-allocation-matrix/index.tsx +8 -3
  1013. package/src/components/waka-audit-log/index.tsx +4 -3
  1014. package/src/components/waka-autocomplete/index.tsx +1 -1
  1015. package/src/components/waka-capacity-planner/index.tsx +4 -1
  1016. package/src/components/waka-carousel/index.tsx +3 -1
  1017. package/src/components/waka-cart-summary/index.tsx +8 -3
  1018. package/src/components/waka-charts/hooks/useRechartsLoader.ts +18 -16
  1019. package/src/components/waka-cohort-table/index.tsx +2 -1
  1020. package/src/components/waka-compare-period/index.tsx +11 -1
  1021. package/src/components/waka-contribution-graph/index.tsx +3 -8
  1022. package/src/components/waka-credit-balance/index.tsx +1 -1
  1023. package/src/components/waka-credit-card-input/index.tsx +2 -2
  1024. package/src/components/waka-credit-meter/index.tsx +1 -1
  1025. package/src/components/waka-datetime-picker/index.tsx +15 -6
  1026. package/src/components/waka-datetime-picker.form-integration/index.tsx +1 -1
  1027. package/src/components/waka-doc-code-block/index.tsx +13 -4
  1028. package/src/components/waka-doc-renderer/index.tsx +1 -1
  1029. package/src/components/waka-dock/index.tsx +1 -1
  1030. package/src/components/waka-funnel-chart/index.tsx +13 -8
  1031. package/src/components/waka-goal-progress/index.tsx +6 -1
  1032. package/src/components/waka-hotspot/index.tsx +1 -1
  1033. package/src/components/waka-invoice-preview/index.tsx +6 -1
  1034. package/src/components/waka-kubernetes-overview/index.tsx +10 -6
  1035. package/src/components/waka-level-progress/index.tsx +2 -1
  1036. package/src/components/waka-log-viewer/index.tsx +3 -1
  1037. package/src/components/waka-magnetic-button/index.tsx +1 -1
  1038. package/src/components/waka-mention-input/index.tsx +10 -1
  1039. package/src/components/waka-order-tracker/index.tsx +4 -2
  1040. package/src/components/waka-pod-card/index.tsx +10 -2
  1041. package/src/components/waka-presence-indicator/index.tsx +1 -1
  1042. package/src/components/waka-quest-card/index.tsx +10 -2
  1043. package/src/components/waka-rating-input/index.tsx +7 -4
  1044. package/src/components/waka-reaction-picker/index.tsx +12 -2
  1045. package/src/components/waka-resource-gauge/index.tsx +6 -4
  1046. package/src/components/waka-resource-pool/index.tsx +6 -3
  1047. package/src/components/waka-schedule-picker/index.tsx +6 -4
  1048. package/src/components/waka-season-pass/index.tsx +1 -1
  1049. package/src/components/waka-skill-tree/index.tsx +4 -1
  1050. package/src/components/waka-sla-tracker/index.tsx +4 -1
  1051. package/src/components/waka-spotlight/index.tsx +1 -1
  1052. package/src/components/waka-status-matrix/index.tsx +1 -11
  1053. package/src/components/waka-success-explosion/index.tsx +8 -1
  1054. package/src/components/waka-theme-creator/index.tsx +1 -1
  1055. package/src/components/waka-thread-view/index.tsx +3 -1
  1056. package/src/components/waka-tooltip-tour/index.tsx +1 -1
  1057. package/src/components/waka-tournament-bracket/index.tsx +44 -34
  1058. package/src/components/waka-treemap-chart/index.tsx +10 -7
  1059. package/src/components/waka-video/index.tsx +1 -1
  1060. package/src/components/waka-xp-bar/index.tsx +1 -1
  1061. package/dist/badge-B2Kw7ew3.js +0 -1
  1062. package/dist/chunk-FDd1SASZ.js +0 -1
  1063. package/dist/cn-DEeiGoUV.js +0 -1
  1064. package/dist/components/DataTable/examples/EditExample.d.ts +0 -2
  1065. package/dist/hooks/useToast.d.ts +0 -44
  1066. package/dist/input-vHHUMve1.js +0 -1
  1067. package/dist/security-ClfRkelC.mjs +0 -120
  1068. package/dist/security-DwyLk9h1.js +0 -1
  1069. package/dist/separator-DviMy-io.js +0 -1
  1070. package/dist/textarea-C4AbqFOT.mjs +0 -23
  1071. package/dist/textarea-jycisJkk.js +0 -1
  1072. package/dist/types/index.d.ts +0 -1
  1073. package/dist/types-CUCT8Mwf.js +0 -1
  1074. package/dist/types-DXkPQFit.mjs +0 -935
  1075. package/dist/useDataTableImport-DNU1m8NO.js +0 -7
  1076. package/dist/waka-doc-renderer-22MUZbyl.js +0 -3
  1077. package/dist/waka-doc-renderer-BZ3DtCzv.mjs +0 -1678
  1078. package/dist/waka-editor-plugins-DO4BF3o_.js +0 -1
  1079. package/dist/waka-rich-text-editor-DcZuIQ-q.js +0 -1
  1080. package/dist/waka-rich-text-editor-SOKYDdDP.mjs +0 -348
  1081. package/src/components/DataTable/DataTableBody.tsx +0 -216
  1082. package/src/components/DataTable/DataTableCell.tsx +0 -172
  1083. package/src/components/DataTable/DataTableConflictResolver.tsx +0 -478
  1084. package/src/components/DataTable/DataTableFilterBuilder.tsx +0 -519
  1085. package/src/components/DataTable/DataTableHeader.tsx +0 -172
  1086. package/src/components/DataTable/DataTableSyncStatus.tsx +0 -281
  1087. package/src/components/DataTable/__tests__/DataTableAdvanced.test.tsx +0 -426
  1088. package/src/components/DataTable/__tests__/DataTableEdit.test.tsx +0 -329
  1089. package/src/components/DataTable/__tests__/useDataTableAdvanced.test.ts +0 -455
  1090. package/src/components/DataTable/examples/EditExample.tsx +0 -166
  1091. package/src/components/DataTable/formatters/index.ts +0 -335
  1092. package/src/components/DataTable/hooks/__tests__/useDataTableEdit.test.ts +0 -239
  1093. package/src/components/DataTable/hooks/useDataTableAdvancedFilters.ts +0 -637
  1094. package/src/components/DataTable/hooks/useDataTableColumnTemplates.ts +0 -186
  1095. package/src/components/DataTable/hooks/useDataTableOffline.ts +0 -481
  1096. package/src/components/DataTable/services/IndexedDBService.ts +0 -504
  1097. package/src/components/DataTable/templates/index.tsx +0 -804
  1098. package/src/components/DataTable/workers/exportWorker.ts +0 -213
package/dist/doc.es.js CHANGED
@@ -1,132 +1,13 @@
1
1
  "use client";
2
- import { t as e } from "./cn-Bpd_xIzI.mjs";
3
- import { n as t } from "./separator-DDQs13_a.mjs";
4
- import { a as n, c as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./waka-doc-renderer-BZ3DtCzv.mjs";
5
- import * as f from "react";
6
- import { Menu as p, X as m } from "lucide-react";
7
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
8
- //#region src/blocks/waka-doc-shell/index.tsx
9
- function _({ content: a, mode: o = "view", canEdit: d = !1, onModeChange: _, onChange: y, debounceMs: b = 1500, saveStatus: x = "idle", navItems: S, activePageId: C, onPageChange: w, breadcrumbs: T, onBreadcrumbClick: E, searchPages: D, onSearchSelect: O, versions: k, currentVersion: A, onVersionChange: j, className: M }) {
10
- let [N, P] = f.useState([]), [F, I] = f.useState(!1), [L, R] = f.useState(a);
11
- f.useEffect(() => {
12
- R(a);
13
- }, [a]);
14
- let z = f.useRef(), B = f.useCallback((e) => {
15
- R(e), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
16
- y?.(e);
17
- }, b);
18
- }, [y, b]);
19
- f.useEffect(() => () => {
20
- z.current && clearTimeout(z.current);
21
- }, []);
22
- let V = S && S.length > 0, H = D && D.length > 0, U = k && k.length > 0 && A;
23
- return /* @__PURE__ */ g("div", {
24
- className: e("relative flex min-h-screen", M),
25
- children: [
26
- V && /* @__PURE__ */ h(t, {
27
- variant: "ghost",
28
- size: "icon",
29
- className: "fixed left-4 top-4 z-50 lg:hidden",
30
- onClick: () => I(!F),
31
- children: h(F ? m : p, { className: "h-5 w-5" })
32
- }),
33
- V && /* @__PURE__ */ h("aside", {
34
- className: e("fixed inset-y-0 left-0 z-40 w-72 shrink-0 border-r border-border/50 bg-background/95 backdrop-blur-md transition-transform duration-300 lg:relative lg:translate-x-0", F ? "translate-x-0" : "-translate-x-full"),
35
- children: /* @__PURE__ */ g("div", {
36
- className: "flex h-full flex-col gap-4 overflow-y-auto p-4",
37
- children: [
38
- H && /* @__PURE__ */ h(s, {
39
- pages: D,
40
- onSelect: (e) => {
41
- O?.(e), I(!1);
42
- }
43
- }),
44
- U && /* @__PURE__ */ h(n, {
45
- versions: k,
46
- current: A,
47
- onVersionChange: j
48
- }),
49
- /* @__PURE__ */ h(l, {
50
- items: S,
51
- activeId: C,
52
- onItemClick: (e) => {
53
- w?.(e), I(!1);
54
- }
55
- })
56
- ]
57
- })
58
- }),
59
- V && F && /* @__PURE__ */ h("div", {
60
- className: "fixed inset-0 z-30 bg-black/50 lg:hidden",
61
- onClick: () => I(!1)
62
- }),
63
- /* @__PURE__ */ g("main", {
64
- className: "flex min-w-0 flex-1 gap-8",
65
- children: [/* @__PURE__ */ g("div", {
66
- className: "mx-auto w-full max-w-3xl px-4 py-8 lg:px-8",
67
- children: [/* @__PURE__ */ g("div", {
68
- className: "mb-6 flex flex-col gap-3",
69
- children: [T && T.length > 0 && /* @__PURE__ */ h(c, {
70
- items: T,
71
- onItemClick: E
72
- }), /* @__PURE__ */ h(i, {
73
- content: L,
74
- mode: o,
75
- canEdit: d,
76
- onModeChange: _,
77
- saveStatus: x
78
- })]
79
- }), o === "view" ? /* @__PURE__ */ h(u, {
80
- content: L,
81
- onHeadingsExtracted: P
82
- }) : /* @__PURE__ */ h(v, {
83
- content: L,
84
- onChange: B,
85
- onHeadingsExtracted: P
86
- })]
87
- }), N.length > 0 && /* @__PURE__ */ h("aside", {
88
- className: "hidden w-56 shrink-0 py-8 xl:block",
89
- children: /* @__PURE__ */ h(r, { items: N })
90
- })]
91
- })
92
- ]
93
- });
94
- }
95
- function v({ content: e, onChange: t, onHeadingsExtracted: n }) {
96
- let [r, i] = f.useState(null);
97
- return f.useEffect(() => {
98
- (async () => {
99
- try {
100
- let { WakaRichTextEditor: e } = await import("./waka-rich-text-editor-SOKYDdDP.mjs").then((e) => e.n);
101
- i(() => e);
102
- } catch {}
103
- })();
104
- }, []), f.useEffect(() => {
105
- let t = [], r = e.split("\n");
106
- for (let e of r) {
107
- let n = e.match(/^(#{2,4})\s+(.+)$/);
108
- if (n) {
109
- let e = n[1].length, r = n[2].replace(/[`*_~]/g, ""), i = r.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-");
110
- t.push({
111
- id: i,
112
- text: r,
113
- level: e
114
- });
115
- }
116
- }
117
- n(t);
118
- }, [e, n]), r ? /* @__PURE__ */ h(r, {
119
- value: e,
120
- onChange: t,
121
- placeholder: "Écrivez votre documentation...",
122
- minHeight: 400,
123
- editable: !0
124
- }) : /* @__PURE__ */ h("textarea", {
125
- value: e,
126
- onChange: (e) => t(e.target.value),
127
- className: "min-h-[400px] w-full rounded-lg border border-border/50 bg-background p-4 font-mono text-sm focus:outline-none focus:ring-2 focus:ring-primary/50",
128
- placeholder: "Écrivez en markdown..."
129
- });
130
- }
131
- //#endregion
132
- export { c as WakaDocBreadcrumb, d as WakaDocCallout, a as WakaDocCodeBlock, l as WakaDocNav, u as WakaDocRenderer, s as WakaDocSearch, _ as WakaDocShell, o as WakaDocTable, r as WakaDocToc, i as WakaDocToolbar, n as WakaDocVersion };
2
+ import { WakaDocCallout as e } from "./components/waka-doc-callout/index.es.js";
3
+ import { WakaDocCodeBlock as t } from "./components/waka-doc-code-block/index.es.js";
4
+ import { WakaDocToc as n } from "./components/waka-doc-toc/index.es.js";
5
+ import { WakaDocNav as r } from "./components/waka-doc-nav/index.es.js";
6
+ import { WakaDocSearch as i } from "./components/waka-doc-search/index.es.js";
7
+ import { WakaDocVersion as a } from "./components/waka-doc-version/index.es.js";
8
+ import { WakaDocToolbar as o } from "./components/waka-doc-toolbar/index.es.js";
9
+ import { WakaDocBreadcrumb as s } from "./components/waka-doc-breadcrumb/index.es.js";
10
+ import { WakaDocTable as c } from "./components/waka-doc-table/index.es.js";
11
+ import { WakaDocRenderer as l } from "./components/waka-doc-renderer/index.es.js";
12
+ import { WakaDocShell as u } from "./blocks/waka-doc-shell/index.es.js";
13
+ export { s as WakaDocBreadcrumb, e as WakaDocCallout, t as WakaDocCodeBlock, r as WakaDocNav, l as WakaDocRenderer, i as WakaDocSearch, u as WakaDocShell, c as WakaDocTable, n as WakaDocToc, o as WakaDocToolbar, a as WakaDocVersion };
@@ -1,48 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunk-FDd1SASZ.js`),t=require(`./cn-DEeiGoUV.js`),n=require(`./security-DwyLk9h1.js`),r=require(`./badge-B2Kw7ew3.js`),i=require(`./separator-DviMy-io.js`),a=require(`./textarea-jycisJkk.js`),o=require(`./waka-editor-plugins-DO4BF3o_.js`);let s=require(`react`);s=e.r(s);let c=require(`lucide-react`),l=require(`react/jsx-runtime`);function u(e,t){try{t(e.chain().focus())}catch{}}function d(e,t,n){try{return e.isActive(t,n)}catch{return!1}}var f={bold:{icon:c.Bold,label:`Gras`,shortcut:`Ctrl+B`,action:e=>u(e,e=>e.toggleBold().run()),isActive:e=>d(e,`bold`)},italic:{icon:c.Italic,label:`Italique`,shortcut:`Ctrl+I`,action:e=>u(e,e=>e.toggleItalic().run()),isActive:e=>d(e,`italic`)},underline:{icon:c.Underline,label:`Souligné`,shortcut:`Ctrl+U`,action:e=>u(e,e=>e.toggleUnderline().run()),isActive:e=>d(e,`underline`)},strikethrough:{icon:c.Strikethrough,label:`Barré`,shortcut:`Ctrl+Shift+S`,action:e=>u(e,e=>e.toggleStrike().run()),isActive:e=>d(e,`strikethrough`)},code:{icon:c.Code,label:`Code`,shortcut:`Ctrl+E`,action:e=>u(e,e=>e.toggleCode().run()),isActive:e=>d(e,`code`)},highlight:{icon:c.Highlighter,label:`Surligné`,action:e=>u(e,e=>e.toggleHighlight().run()),isActive:e=>d(e,`highlight`)},h1:{icon:c.Heading1,label:`Titre 1`,action:e=>{try{e.tf.h1.toggle()}catch{u(e,e=>e.toggleHeading({level:1}).run())}},isActive:e=>d(e,`heading`,{level:1})},h2:{icon:c.Heading2,label:`Titre 2`,action:e=>{try{e.tf.h2.toggle()}catch{u(e,e=>e.toggleHeading({level:2}).run())}},isActive:e=>d(e,`heading`,{level:2})},h3:{icon:c.Heading3,label:`Titre 3`,action:e=>{try{e.tf.h3.toggle()}catch{u(e,e=>e.toggleHeading({level:3}).run())}},isActive:e=>d(e,`heading`,{level:3})},blockquote:{icon:c.Quote,label:`Citation`,action:e=>{try{e.tf.blockquote.toggle()}catch{u(e,e=>e.toggleBlockquote().run())}},isActive:e=>d(e,`blockquote`)},callout:{icon:c.MessageSquarePlus,label:`Callout`,action:e=>{try{e.tf.callout.insert()}catch{}},isActive:e=>d(e,`callout`)},table:{icon:c.Table,label:`Tableau`,action:e=>{try{e.tf.table.insert({rows:3,cols:3})}catch{}},isActive:e=>d(e,`table`)},columns:{icon:c.Columns2,label:`Colonnes`,action:e=>{try{e.tf.column.insert()}catch{}},isActive:e=>d(e,`column_group`)},link:{icon:c.Link,label:`Lien`,shortcut:`Ctrl+K`,action:e=>{try{e.tf.link.toggle()}catch{}},isActive:e=>d(e,`a`)},image:{icon:c.Image,label:`Image`,action:e=>{try{e.tf.image.insert({url:``})}catch{}},isActive:()=>!1},separator:{icon:c.Minus,label:`Séparateur`,action:e=>{try{u(e,e=>e.insertBreak().run())}catch{}},isActive:()=>!1},ai:{icon:c.Sparkles,label:`Assistant IA`,action:()=>{},isActive:()=>!1}},p=[[`bold`,`italic`,`underline`,`strikethrough`,`code`,`highlight`],[`h1`,`h2`,`h3`],[`blockquote`,`callout`,`table`,`columns`],[`link`,`image`,`separator`]];function m({groups:e=p,editor:r,className:a,enableAI:o=!1,onAIClick:c}){let u=s.useMemo(()=>o?[...e,[`ai`]]:e,[e,o]);return(0,l.jsx)(n.l,{delayDuration:300,children:(0,l.jsx)(`div`,{role:`toolbar`,"aria-label":`Barre d'outils de formatage`,className:t.t(`flex flex-wrap items-center gap-0.5 p-1`,`border-b bg-muted/30`,a),children:u.map((e,t)=>(0,l.jsxs)(s.Fragment,{children:[t>0&&(0,l.jsx)(i.t,{orientation:`vertical`,className:`mx-1 h-6`}),e.map(e=>{let t=f[e];if(!t)return null;let a=t.isActive?.(r)??!1,o=t.shortcut?`${t.label} (${t.shortcut})`:t.label,s=t.icon;return(0,l.jsxs)(n.s,{children:[(0,l.jsx)(n.u,{asChild:!0,children:(0,l.jsx)(i.n,{type:`button`,variant:a?`secondary`:`ghost`,size:`icon`,className:`h-7 w-7`,onClick:()=>{if(e===`ai`&&c){c();return}t.action(r)},"aria-label":t.label,"aria-pressed":a,children:(0,l.jsx)(s,{className:`h-4 w-4`})})}),(0,l.jsx)(n.c,{side:`bottom`,className:`text-xs`,children:o})]},e)})]},t))})})}m.displayName=`WakaEditorToolbar`;var h=s.forwardRef(({value:e,onChange:t,readOnly:n=!1,placeholder:r=`Commencez a ecrire...`,className:i,editorClassName:a,minHeight:o=200,label:c,description:u,error:d,preset:f=`standard`,enableAI:m=!1,enableMarkdown:h=!1,enableMedia:v=!1,enableMentions:y=!1,enableDnD:b=!1,enableTOC:x=!1,toolbarGroups:S=p,hideToolbar:C=!1,onAIClick:w,extraPlugins:T,editorRef:E},D)=>{let[O,k]=s.useState(null),[A,j]=s.useState(!1);return s.useEffect(()=>{let e=!1;return(async()=>{try{let[t,n]=await Promise.all([import(`platejs/react`),Promise.resolve().then(()=>require(`./waka-editor-plugins-DO4BF3o_.js`)).then(e=>e.g)]),r=await n.loadCorePlugins(),i=n.getPresetLoaders(f),a=await Promise.all(i.map(e=>e())),o=[];h&&o.push(n.loadMarkdownPlugin()),v&&o.push(n.loadMediaPlugins()),y&&o.push(n.loadMentionPlugins()),b&&o.push(n.loadDndPlugin()),x&&o.push(n.loadTocPlugin());let s=await Promise.all(o),c=[...r,...a.flat(),...s.flat(),...T??[]];e||k({components:{Plate:t.Plate,PlateContent:t.PlateContent,usePlateEditor:t.usePlateEditor},plugins:c})}catch{e||j(!0)}})(),()=>{e=!0}},[f,h,v,y,b,x,T]),O?(0,l.jsx)(g,{ref:D,components:O.components,plugins:O.plugins,value:e,onChange:t,readOnly:n,placeholder:r,className:i,editorClassName:a,minHeight:o,label:c,description:u,error:d,enableAI:m,toolbarGroups:S,hideToolbar:C,onAIClick:w,editorRef:E}):(0,l.jsx)(_,{ref:D,value:e,onChange:t,placeholder:r,className:i,minHeight:o,label:c,description:u,error:d,loading:!A,readOnly:n})});h.displayName=`WakaEditor`;var g=s.forwardRef(({components:{Plate:e,PlateContent:n,usePlateEditor:r},plugins:i,value:o,onChange:c,readOnly:u=!1,placeholder:d,className:f,editorClassName:p,minHeight:h,label:g,description:_,error:v,enableAI:y,toolbarGroups:b,hideToolbar:x,onAIClick:S,editorRef:C},w)=>{let T=r({plugins:i,value:o??[{type:`p`,children:[{text:``}]}]});return s.useEffect(()=>{C&&(C.current=T)},[T,C]),(0,l.jsxs)(`div`,{ref:w,className:t.t(`space-y-1.5`,f),children:[g&&(0,l.jsx)(a.n,{children:g}),_&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:_}),(0,l.jsx)(e,{editor:T,onChange:c?({value:e})=>c(e):void 0,readOnly:u,children:(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden`,v&&`border-destructive`,u&&`opacity-80`),children:[!x&&!u&&(0,l.jsx)(m,{editor:T,groups:b,enableAI:y,onAIClick:S}),(0,l.jsx)(`div`,{style:{minHeight:h},children:(0,l.jsx)(n,{placeholder:d,readOnly:u,className:t.t(`prose prose-sm max-w-none p-3`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,p)})})]})}),v&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:v})]})});g.displayName=`PlateEditorInner`;var _=s.forwardRef(({value:e,onChange:n,placeholder:r,className:i,minHeight:o,label:c,description:u,error:d,loading:f,readOnly:p},m)=>{let h=s.useMemo(()=>{if(!e)return``;let t=e=>e.map(e=>typeof e.text==`string`?e.text:e.children?t(e.children):``).join(`
2
- `);return t(e)},[e]);return(0,l.jsxs)(`div`,{ref:m,className:t.t(`space-y-1.5`,i),children:[c&&(0,l.jsx)(a.n,{children:c}),u&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:u}),(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(a.t,{value:h,onChange:e=>{n?.([{type:`p`,children:[{text:e.target.value}]}])},placeholder:r,disabled:f||p,style:{minHeight:o},className:t.t(d&&`border-destructive`)}),f&&(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50 rounded-lg`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:`Chargement de l'editeur...`})})]}),d&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:d})]})});_.displayName=`FallbackEditor`;function v(e,t){try{t(e)}catch{}}function y(e,t){try{return e.isActive(t)}catch{return!1}}var b=[{key:`bold`,icon:c.Bold,label:`Gras`,shortcut:`Ctrl+B`,action:e=>v(e,e=>e.chain().focus().toggleBold().run()),isActive:e=>y(e,`bold`)},{key:`italic`,icon:c.Italic,label:`Italique`,shortcut:`Ctrl+I`,action:e=>v(e,e=>e.chain().focus().toggleItalic().run()),isActive:e=>y(e,`italic`)},{key:`underline`,icon:c.Underline,label:`Souligne`,shortcut:`Ctrl+U`,action:e=>v(e,e=>e.chain().focus().toggleUnderline().run()),isActive:e=>y(e,`underline`)},{key:`strikethrough`,icon:c.Strikethrough,label:`Barre`,action:e=>v(e,e=>e.chain().focus().toggleStrike().run()),isActive:e=>y(e,`strikethrough`)},{key:`code`,icon:c.Code,label:`Code`,shortcut:`Ctrl+E`,action:e=>v(e,e=>e.chain().focus().toggleCode().run()),isActive:e=>y(e,`code`)},{key:`highlight`,icon:c.Highlighter,label:`Surligner`,action:e=>v(e,e=>e.chain().focus().toggleHighlight().run()),isActive:e=>y(e,`highlight`)},{key:`link`,icon:c.Link,label:`Lien`,shortcut:`Ctrl+K`,action:e=>{try{e.tf.link.toggle()}catch{}},isActive:e=>y(e,`a`)}],x=s.forwardRef(({editor:e,buttons:t=b,enableAI:n=!1,onAIClick:r,className:i,disableFloating:a=!1},o)=>{let[u,d]=s.useState(null);s.useEffect(()=>{a||import(`@platejs/floating`).then(e=>{e.useFloatingToolbar&&d(()=>e.useFloatingToolbar)}).catch(()=>{})},[a]);let f=s.useMemo(()=>n?[...t,{key:`ai`,icon:c.Sparkles,label:`Demander a l'IA`,action:()=>r?.(),isActive:()=>!1}]:t,[t,n,r]);return u?(0,l.jsx)(w,{ref:o,editor:e,buttons:f,className:i,floatingHook:u}):(0,l.jsx)(C,{ref:o,editor:e,buttons:f,className:i})});x.displayName=`WakaFloatingToolbar`;function S({toolbarRef:e,toolbarProps:n,hidden:r,buttons:i,editor:a,className:o}){return r?null:(0,l.jsx)(`div`,{ref:e,...n??{},className:t.t(`flex items-center gap-0.5 p-1`,`rounded-lg border bg-popover shadow-lg`,`animate-in fade-in-0 zoom-in-95`,o),role:`toolbar`,"aria-label":`Barre d'outils flottante`,children:i.map(e=>{let n=e.isActive?.(a)??!1,r=e.icon;return(0,l.jsx)(`button`,{type:`button`,title:e.shortcut?`${e.label} (${e.shortcut})`:e.label,"aria-label":e.label,"aria-pressed":n,className:t.t(`inline-flex h-7 w-7 items-center justify-center rounded-md`,`text-sm transition-colors`,n?`bg-accent text-accent-foreground`:`hover:bg-accent/50 text-foreground/70 hover:text-foreground`),onMouseDown:t=>{t.preventDefault(),e.action(a)},children:(0,l.jsx)(r,{className:`h-3.5 w-3.5`})},e.key)})})}var C=s.forwardRef(({editor:e,buttons:t,className:n},r)=>(0,l.jsx)(S,{toolbarRef:r,buttons:t,editor:e,className:n}));C.displayName=`FloatingToolbarStatic`;var w=s.forwardRef(({editor:e,buttons:t,className:n,floatingHook:r},i)=>{let a=r({editor:e});return(0,l.jsx)(S,{toolbarRef:s.useCallback(e=>{typeof i==`function`?i(e):i&&(i.current=e),a.ref&&(typeof a.ref==`function`?a.ref(e):a.ref.current=e)},[i,a.ref]),toolbarProps:a.props,hidden:a.hidden,buttons:t,editor:e,className:n})});w.displayName=`FloatingToolbarPositioned`;var T=[{key:`h1`,label:`Titre 1`,description:`Titre principal de section`,icon:c.Heading1,group:`Blocs de base`,keywords:[`heading`,`titre`,`h1`],action:e=>{try{e.tf.h1.toggle()}catch{}}},{key:`h2`,label:`Titre 2`,description:`Sous-titre de section`,icon:c.Heading2,group:`Blocs de base`,keywords:[`heading`,`titre`,`h2`],action:e=>{try{e.tf.h2.toggle()}catch{}}},{key:`h3`,label:`Titre 3`,description:`Titre de sous-section`,icon:c.Heading3,group:`Blocs de base`,keywords:[`heading`,`titre`,`h3`],action:e=>{try{e.tf.h3.toggle()}catch{}}},{key:`bulletList`,label:`Liste a puces`,description:`Liste non ordonnee`,icon:c.List,group:`Blocs de base`,keywords:[`bullet`,`list`,`unordered`,`puces`],action:e=>{try{e.chain().focus().toggleBulletList().run()}catch{}}},{key:`numberedList`,label:`Liste numerotee`,description:`Liste ordonnee`,icon:c.ListOrdered,group:`Blocs de base`,keywords:[`numbered`,`list`,`ordered`,`numerotee`],action:e=>{try{e.chain().focus().toggleOrderedList().run()}catch{}}},{key:`blockquote`,label:`Citation`,description:`Bloc de citation`,icon:c.Quote,group:`Blocs de base`,keywords:[`quote`,`citation`,`blockquote`],action:e=>{try{e.tf.blockquote.toggle()}catch{}}},{key:`table`,label:`Tableau`,description:`Inserer un tableau 3x3`,icon:c.Table,group:`Blocs avances`,keywords:[`table`,`tableau`,`grid`],action:e=>{try{e.tf.table.insert({rows:3,cols:3})}catch{}}},{key:`columns`,label:`Colonnes`,description:`Mise en page multi-colonnes`,icon:c.Columns2,group:`Blocs avances`,keywords:[`column`,`colonne`,`layout`,`mise en page`],action:e=>{try{e.tf.column.insert()}catch{}}},{key:`callout`,label:`Callout`,description:`Encart d'information colore`,icon:c.MessageSquarePlus,group:`Blocs avances`,keywords:[`callout`,`alert`,`info`,`encart`],action:e=>{try{e.tf.callout.insert()}catch{}}},{key:`codeBlock`,label:`Bloc de code`,description:`Code source avec coloration`,icon:c.Code,group:`Blocs avances`,keywords:[`code`,`pre`,`source`],action:e=>{try{e.chain().focus().toggleCodeBlock().run()}catch{}}},{key:`link`,label:`Lien`,description:`Inserer un lien hypertexte`,icon:c.Link,group:`Insertions`,keywords:[`link`,`lien`,`url`,`href`],action:e=>{try{e.tf.link.toggle()}catch{}}},{key:`image`,label:`Image`,description:`Inserer une image`,icon:c.Image,group:`Insertions`,keywords:[`image`,`photo`,`picture`,`img`],action:e=>{try{e.tf.image.insert({url:``})}catch{}}},{key:`divider`,label:`Separateur`,description:`Ligne horizontale de separation`,icon:c.Minus,group:`Insertions`,keywords:[`divider`,`separator`,`hr`,`line`],action:e=>{try{e.chain().focus().insertBreak().run()}catch{}}},{key:`ai`,label:`Demander a l'IA`,description:`Generer du contenu avec l'assistant IA`,icon:c.Sparkles,group:`IA`,keywords:[`ai`,`ia`,`assistant`,`generate`,`generer`],action:()=>{}}];function E({commands:e=T,className:n,onSelect:r}){let[i,a]=s.useState(``),[o,c]=s.useState(0),u=s.useRef(null),d=s.useMemo(()=>{if(!i)return e;let t=i.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t)||e.key.toLowerCase().includes(t)||e.keywords?.some(e=>e.toLowerCase().includes(t)))},[e,i]),f=s.useMemo(()=>{let e=new Map;for(let t of d){let n=t.group||`Autre`;e.has(n)||e.set(n,[]),e.get(n).push(t)}return e},[d]),p=s.useMemo(()=>d,[d]),m=s.useCallback(e=>{e.key===`ArrowDown`?(e.preventDefault(),c(e=>Math.min(e+1,p.length-1))):e.key===`ArrowUp`?(e.preventDefault(),c(e=>Math.max(e-1,0))):e.key===`Enter`&&p[o]&&(e.preventDefault(),r?.(p[o].key))},[p,o,r]);return s.useEffect(()=>c(0),[i]),(0,l.jsxs)(`div`,{ref:u,className:t.t(`w-72 max-h-80 overflow-y-auto`,`rounded-lg border bg-popover shadow-lg`,`p-1`,n),role:`listbox`,onKeyDown:m,children:[(0,l.jsx)(`div`,{className:`px-2 pb-1.5`,children:(0,l.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher...`,className:t.t(`w-full rounded-md border bg-background px-2 py-1.5`,`text-sm placeholder:text-muted-foreground`,`focus:outline-none focus:ring-1 focus:ring-ring`),autoFocus:!0})}),p.length===0&&(0,l.jsx)(`div`,{className:`px-2 py-4 text-center text-sm text-muted-foreground`,children:`Aucune commande trouvee`}),Array.from(f.entries()).map(([e,n])=>(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`div`,{className:`px-2 py-1 text-xs font-semibold text-muted-foreground uppercase tracking-wider`,children:e}),n.map(e=>{let n=p.indexOf(e),i=e.icon;return(0,l.jsxs)(`button`,{role:`option`,"aria-selected":n===o,className:t.t(`flex w-full items-center gap-3 rounded-md px-2 py-1.5 text-left`,`text-sm transition-colors cursor-pointer`,n===o?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),onMouseEnter:()=>c(n),onClick:()=>r?.(e.key),children:[(0,l.jsx)(`div`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border bg-background`,children:(0,l.jsx)(i,{className:`h-4 w-4`})}),(0,l.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,l.jsx)(`div`,{className:`font-medium`,children:e.label}),e.description&&(0,l.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.description})]})]},e.key)})]},e))]})}E.displayName=`WakaSlashMenu`;async function D(e=T){try{let{SlashPlugin:t,SlashInputPlugin:n}=await import(`@platejs/combobox/react`);return[t.configure({options:{trigger:`/`,triggerPreviousCharPattern:/^$|^[\s"']$/,rules:e.map(e=>({key:e.key,text:e.label,keywords:e.keywords,onSelect:e.action}))}}),n]}catch{return console.warn(`[WakaSlashMenu] @platejs/combobox not installed, slash commands disabled`),[]}}var O=[{key:`continue`,label:`Continuer la redaction`,prompt:`Continue writing the following text naturally:
3
-
4
- {{selection}}`,group:`Generer`},{key:`summarize`,label:`Resumer`,prompt:`Summarize the following text concisely:
5
-
6
- {{selection}}`,group:`Generer`},{key:`explain`,label:`Expliquer`,prompt:`Explain the following text in simple terms:
7
-
8
- {{selection}}`,group:`Generer`},{key:`outline`,label:`Creer un plan`,prompt:`Create a structured outline from the following text:
9
-
10
- {{selection}}`,group:`Generer`},{key:`improve`,label:`Ameliorer le style`,prompt:`Improve the writing quality of the following text while keeping the same meaning:
11
-
12
- {{selection}}`,group:`Editer`},{key:`shorter`,label:`Raccourcir`,prompt:`Make the following text shorter while keeping the key information:
13
-
14
- {{selection}}`,group:`Editer`},{key:`longer`,label:`Developper`,prompt:`Expand and elaborate on the following text:
15
-
16
- {{selection}}`,group:`Editer`},{key:`fix-grammar`,label:`Corriger l'orthographe`,prompt:`Fix all spelling and grammar errors in the following text:
17
-
18
- {{selection}}`,group:`Editer`},{key:`simplify`,label:`Simplifier`,prompt:`Simplify the language of the following text to make it easier to understand:
19
-
20
- {{selection}}`,group:`Editer`},{key:`translate-en`,label:`Traduire en anglais`,prompt:`Translate the following text to English:
21
-
22
- {{selection}}`,group:`Traduire`},{key:`translate-fr`,label:`Traduire en francais`,prompt:`Translate the following text to French:
23
-
24
- {{selection}}`,group:`Traduire`},{key:`translate-es`,label:`Traduire en espagnol`,prompt:`Translate the following text to Spanish:
25
-
26
- {{selection}}`,group:`Traduire`},{key:`translate-de`,label:`Traduire en allemand`,prompt:`Translate the following text to German:
27
-
28
- {{selection}}`,group:`Traduire`}],k=s.forwardRef(({value:e,onChange:n,aiEndpoint:r,systemPrompt:i=`You are an advanced AI writing assistant. Help the user write, edit, and improve their content.`,aiActions:o=O,enableCopilot:c=!0,copilotDebounceMs:u=500,aiHeaders:d,readOnly:f=!1,placeholder:p=`Tapez / pour les commandes, ou commencez a ecrire...`,className:m,editorClassName:h,minHeight:g=300,label:_,description:v,error:y,extraPlugins:b,editorRef:x},S)=>{let[C,w]=s.useState(null),[T,E]=s.useState(!1),D=s.useRef({aiEndpoint:r,systemPrompt:i,aiActions:o,enableCopilot:c,copilotDebounceMs:u,aiHeaders:d});return D.current={aiEndpoint:r,systemPrompt:i,aiActions:o,enableCopilot:c,copilotDebounceMs:u,aiHeaders:d},s.useEffect(()=>{let e=!1;return(async()=>{try{let[t,n,r,i,a,o,s,c,l,u]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/ai/react`),import(`@platejs/markdown`),import(`@platejs/selection/react`),import(`@platejs/link/react`),import(`@platejs/indent/react`)]),d=D.current,f=[n.BoldPlugin,n.ItalicPlugin,n.UnderlinePlugin,n.StrikethroughPlugin,n.CodePlugin,n.HighlightPlugin,n.H1Plugin,n.H2Plugin,n.H3Plugin,n.H4Plugin,n.BlockquotePlugin,r.TablePlugin,r.TableRowPlugin,r.TableCellPlugin,r.TableCellHeaderPlugin,i.ColumnPlugin,i.ColumnItemPlugin,a.CalloutPlugin,l.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`,`tel`]}}),u.IndentPlugin,c.BlockSelectionPlugin,s.MarkdownPlugin,o.AIPlugin,o.AIChatPlugin.configure({options:{chat:{api:d.aiEndpoint,body:{system:d.systemPrompt},headers:d.aiHeaders}}})];d.enableCopilot&&o.CopilotPlugin&&f.push(o.CopilotPlugin.configure(({api:e})=>({options:{completeOptions:{api:d.aiEndpoint,body:{system:d.systemPrompt},headers:d.aiHeaders,onFinish:(t,n)=>{n!==`0`&&e.copilot.setBlockSuggestion({text:n})}},debounceDelay:d.copilotDebounceMs},shortcuts:{accept:{keys:`tab`},acceptNextWord:{keys:`mod+right`},reject:{keys:`escape`},triggerSuggestion:{keys:`ctrl+space`}}}))),e||w({Plate:t.Plate,PlateContent:t.PlateContent,usePlateEditor:t.usePlateEditor,plugins:f})}catch(t){console.error(`[WakaAIWriter] Failed to load plugins:`,t),e||E(!0)}})(),()=>{e=!0}},[]),C?(0,l.jsx)(A,{ref:S,bundle:C,value:e,onChange:n,readOnly:f,placeholder:p,className:m,editorClassName:h,minHeight:g,label:_,description:v,error:y,extraPlugins:b,editorRef:x}):(0,l.jsxs)(`div`,{ref:S,className:t.t(`space-y-1.5`,m),children:[_&&(0,l.jsx)(a.n,{children:_}),v&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:v}),(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(a.t,{placeholder:p,disabled:!0,style:{minHeight:g},className:t.t(y&&`border-destructive`)}),(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50 rounded-lg`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:T?`Erreur de chargement de l'editeur IA`:`Chargement de l'editeur IA...`})})]}),y&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:y})]})});k.displayName=`WakaAIWriter`;var A=s.forwardRef(({bundle:{Plate:e,PlateContent:n,usePlateEditor:r,plugins:i},value:o,onChange:c,readOnly:u,placeholder:d,className:f,editorClassName:p,minHeight:m,label:h,description:g,error:_,extraPlugins:v,editorRef:y},b)=>{let x=r({plugins:s.useMemo(()=>[...i,...v??[]],[i,v]),value:o??[{type:`p`,children:[{text:``}]}]});return s.useEffect(()=>{y&&(y.current=x)},[x,y]),(0,l.jsxs)(`div`,{ref:b,className:t.t(`space-y-1.5`,f),children:[h&&(0,l.jsx)(a.n,{children:h}),g&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:g}),(0,l.jsx)(e,{editor:x,onChange:c?({value:e})=>c(e):void 0,readOnly:u,children:(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden`,_&&`border-destructive`,u&&`opacity-80`),children:[!u&&(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b bg-muted/30 text-xs text-muted-foreground`,children:[(0,l.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-[10px]`,children:`Ctrl+J`}),(0,l.jsx)(`span`,{children:`Ouvrir le menu IA`}),(0,l.jsx)(`span`,{className:`mx-1`,children:`|`}),(0,l.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-[10px]`,children:`/`}),(0,l.jsx)(`span`,{children:`Commandes`}),(0,l.jsx)(`span`,{className:`mx-1`,children:`|`}),(0,l.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-[10px]`,children:`Ctrl+Espace`}),(0,l.jsx)(`span`,{children:`Copilot`})]}),(0,l.jsx)(`div`,{style:{minHeight:m},children:(0,l.jsx)(n,{placeholder:d,readOnly:u,className:t.t(`prose prose-sm max-w-none p-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,p)})})]})}),_&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:_})]})});A.displayName=`AIWriterInner`;var j=s.forwardRef(({value:e,onChange:n,readOnly:r=!1,placeholder:i=`Commencez a rediger votre document...`,className:o,editorClassName:c,minHeight:u=500,label:d,description:f,error:p,title:m,onTitleChange:h,showTOC:g=!0,enableMentions:_=!1,enableSlashCommands:v=!1,enableAI:y=!1,aiEndpoint:b,aiSystemPrompt:x,enableDnD:S=!1,enableMarkdown:C=!0,extraPlugins:w,editorRef:T},E)=>{let[D,O]=s.useState(null),[k,A]=s.useState(!1),[j,N]=s.useState([]),P=s.useRef({enableMentions:_,enableSlashCommands:v,enableAI:y,enableDnD:S,enableMarkdown:C,aiEndpoint:b,aiSystemPrompt:x});return P.current={enableMentions:_,enableSlashCommands:v,enableAI:y,enableDnD:S,enableMarkdown:C,aiEndpoint:b,aiSystemPrompt:x},s.useEffect(()=>{let e=!1;return(async()=>{try{let t=P.current,[n,r,i,a,o,s,c]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/link/react`),import(`@platejs/indent/react`)]),l=[r.BoldPlugin,r.ItalicPlugin,r.UnderlinePlugin,r.StrikethroughPlugin,r.CodePlugin,r.HighlightPlugin,r.SuperscriptPlugin,r.SubscriptPlugin,r.H1Plugin,r.H2Plugin,r.H3Plugin,r.H4Plugin,r.H5Plugin,r.H6Plugin,r.BlockquotePlugin,i.TablePlugin,i.TableRowPlugin,i.TableCellPlugin,i.TableCellHeaderPlugin,a.ColumnPlugin,a.ColumnItemPlugin,o.CalloutPlugin,s.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`,`tel`]}}),c.IndentPlugin];try{let{TocPlugin:e}=await import(`@platejs/toc/react`);l.push(e)}catch{}try{let{BlockSelectionPlugin:e}=await import(`@platejs/selection/react`);l.push(e)}catch{}if(t.enableMentions)try{let{MentionPlugin:e,MentionInputPlugin:t}=await import(`@platejs/mention/react`);l.push(e.configure({options:{trigger:`@`,triggerPreviousCharPattern:/^$|^[\s"']$/,insertSpaceAfterMention:!0}}),t)}catch{}if(t.enableDnD)try{let{DndPlugin:e}=await import(`@platejs/dnd`);l.push(e)}catch{}if(t.enableMarkdown)try{let{MarkdownPlugin:e}=await import(`@platejs/markdown`);l.push(e)}catch{}if(t.enableAI&&t.aiEndpoint)try{let{AIPlugin:e,AIChatPlugin:n}=await import(`@platejs/ai/react`);l.push(e,n.configure({options:{chat:{api:t.aiEndpoint,body:{system:t.aiSystemPrompt??`You are a helpful writing assistant.`}}}}))}catch{}e||O({Plate:n.Plate,PlateContent:n.PlateContent,usePlateEditor:n.usePlateEditor,plugins:l})}catch(t){console.error(`[WakaDocumentEditor] Failed to load:`,t),e||A(!0)}})(),()=>{e=!0}},[]),s.useEffect(()=>{if(!g||!e){N([]);return}let t=[],n=0,r=new Set([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]);for(let i of e)if(r.has(i?.type)){let e=ee(i);if(e.trim()){let r=parseInt(i.type.replace(`h`,``),10);t.push({id:`toc-${n++}`,text:e.trim(),level:r,depth:r-1})}}N(t)},[e,g]),D?(0,l.jsx)(M,{ref:E,bundle:D,value:e,onChange:n,readOnly:r,placeholder:i,className:o,editorClassName:c,minHeight:u,label:d,description:f,error:p,title:m,onTitleChange:h,showTOC:g,toc:j,extraPlugins:w,editorRef:T}):(0,l.jsxs)(`div`,{ref:E,className:t.t(`space-y-1.5`,o),children:[d&&(0,l.jsx)(a.n,{children:d}),f&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(a.t,{placeholder:i,disabled:!0,style:{minHeight:u}}),(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50 rounded-lg`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:k?`Erreur de chargement de l'editeur`:`Chargement de l'editeur...`})})]}),p&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:p})]})});j.displayName=`WakaDocumentEditor`;var M=s.forwardRef(({bundle:{Plate:e,PlateContent:r,usePlateEditor:i,plugins:o},value:c,onChange:u,readOnly:d,placeholder:f,className:p,editorClassName:m,minHeight:h,label:g,description:_,error:v,title:y,onTitleChange:b,showTOC:x,toc:S,extraPlugins:C,editorRef:w},T)=>{let E=i({plugins:s.useMemo(()=>[...o,...C??[]],[o,C]),value:c??[{type:`p`,children:[{text:``}]}]});return s.useEffect(()=>{w&&(w.current=E)},[E,w]),(0,l.jsxs)(`div`,{ref:T,className:t.t(`space-y-1.5`,p),children:[g&&(0,l.jsx)(a.n,{children:g}),_&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:_}),(0,l.jsx)(e,{editor:E,onChange:u?({value:e})=>u(e):void 0,readOnly:d,children:(0,l.jsxs)(`div`,{className:t.t(`flex border rounded-lg overflow-hidden`,v&&`border-destructive`),children:[x&&S.length>0&&(0,l.jsxs)(`aside`,{className:`w-56 shrink-0 border-r bg-muted/20 hidden lg:block`,children:[(0,l.jsx)(`div`,{className:`p-3 border-b`,children:(0,l.jsx)(`h4`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:`Table des matieres`})}),(0,l.jsx)(n.d,{className:`h-full max-h-[600px]`,children:(0,l.jsx)(`nav`,{className:`p-2 space-y-0.5`,children:S.map(e=>(0,l.jsx)(`button`,{className:t.t(`block w-full text-left px-2 py-1 rounded-md text-sm`,`hover:bg-accent/50 transition-colors truncate`,`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${e.depth*12+8}px`},title:e.text,children:e.text},e.id))})})]}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(y!==void 0||b)&&(0,l.jsx)(`div`,{className:`border-b px-6 py-4`,children:(0,l.jsx)(`input`,{type:`text`,value:y??``,onChange:e=>b?.(e.target.value),placeholder:`Titre du document`,readOnly:d,className:t.t(`w-full bg-transparent text-2xl font-bold text-foreground`,`placeholder:text-muted-foreground/50`,`focus:outline-none`)})}),(0,l.jsx)(`div`,{style:{minHeight:h},children:(0,l.jsx)(r,{placeholder:f,readOnly:d,className:t.t(`prose prose-sm max-w-none px-6 py-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,m)})})]})]})}),v&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:v})]})});M.displayName=`DocumentEditorInner`;function ee(e){return typeof e?.text==`string`?e.text:Array.isArray(e?.children)?e.children.map(e=>ee(e)).join(``):``}var N=s.forwardRef(({markdownValue:e=``,onMarkdownChange:n,slateValue:r,onSlateChange:o,defaultMode:c=`rich`,readOnly:u=!1,placeholder:d=`Commencez a ecrire...`,className:f,editorClassName:p,minHeight:m=300,label:h,description:g,error:_,extraPlugins:v,editorRef:y},b)=>{let[x,S]=s.useState(c),[C,w]=s.useState(null),[T,E]=s.useState(!1),[D,O]=s.useState(e);s.useEffect(()=>{O(e)},[e]),s.useEffect(()=>{let e=!1;return(async()=>{try{let[t,n,r,i,a,o,s]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/link/react`),import(`@platejs/markdown`)]),c=[n.BoldPlugin,n.ItalicPlugin,n.UnderlinePlugin,n.StrikethroughPlugin,n.CodePlugin,n.HighlightPlugin,n.H1Plugin,n.H2Plugin,n.H3Plugin,n.H4Plugin,n.BlockquotePlugin,r.TablePlugin,r.TableRowPlugin,r.TableCellPlugin,r.TableCellHeaderPlugin,i.ColumnPlugin,i.ColumnItemPlugin,a.CalloutPlugin,o.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`]}}),s.MarkdownPlugin];e||w({Plate:t.Plate,PlateContent:t.PlateContent,usePlateEditor:t.usePlateEditor,plugins:c,serializeMd:s.serializeMd,deserializeMd:s.deserializeMd})}catch(t){console.error(`[WakaMarkdownEditor] Failed to load:`,t),e||E(!0)}})(),()=>{e=!0}},[]);let k=(0,l.jsx)(`div`,{className:`flex items-center gap-1 p-1 border-b bg-muted/30`,children:[`rich`,`markdown`,`split`].map(e=>(0,l.jsx)(i.n,{type:`button`,variant:x===e?`secondary`:`ghost`,size:`sm`,className:`h-7 text-xs`,onClick:()=>S(e),children:e===`rich`?`Editeur`:e===`markdown`?`Markdown`:`Split`},e))}),A=s.useCallback(e=>{O(e),n?.(e)},[n]);return(0,l.jsxs)(`div`,{ref:b,className:t.t(`space-y-1.5`,f),children:[h&&(0,l.jsx)(a.n,{children:h}),g&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:g}),(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden`,_&&`border-destructive`),children:[!u&&k,x===`markdown`&&(0,l.jsx)(P,{value:D,onChange:A,readOnly:u,placeholder:d,minHeight:m,className:p}),x===`rich`&&C&&(0,l.jsx)(te,{bundle:C,markdownValue:D,slateValue:r,onSlateChange:o,onMarkdownChange:n,readOnly:u,placeholder:d,minHeight:m,className:p,extraPlugins:v,editorRef:y}),x===`split`&&C&&(0,l.jsxs)(`div`,{className:`flex divide-x`,style:{minHeight:m},children:[(0,l.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,l.jsx)(te,{bundle:C,markdownValue:D,slateValue:r,onSlateChange:o,onMarkdownChange:n,readOnly:u,placeholder:d,minHeight:m,className:p,extraPlugins:v,editorRef:y})}),(0,l.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,l.jsx)(P,{value:D,onChange:A,readOnly:u,placeholder:`Markdown...`,minHeight:m})})]}),!C&&x!==`markdown`&&(0,l.jsx)(`div`,{className:`relative`,style:{minHeight:m},children:(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:T?`Erreur de chargement`:`Chargement...`})})})]}),_&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:_})]})});N.displayName=`WakaMarkdownEditor`;function P({value:e,onChange:n,readOnly:r,placeholder:i,minHeight:o,className:s}){return(0,l.jsx)(a.t,{value:e,onChange:e=>n(e.target.value),readOnly:r,placeholder:i,style:{minHeight:o},className:t.t(`rounded-none border-0 resize-none font-mono text-sm`,`focus-visible:ring-0 focus-visible:ring-offset-0`,s)})}function te({bundle:{Plate:e,PlateContent:n,usePlateEditor:r,plugins:i,serializeMd:a},markdownValue:o,slateValue:c,onSlateChange:u,onMarkdownChange:d,readOnly:f,placeholder:p,minHeight:m,className:h,extraPlugins:g,editorRef:_}){let v=r({plugins:s.useMemo(()=>[...i,...g??[]],[i,g]),value:c??[{type:`p`,children:[{text:o||``}]}]});return s.useEffect(()=>{_&&(_.current=v)},[v,_]),(0,l.jsx)(e,{editor:v,onChange:s.useCallback(({value:e})=>{if(u?.(e),d&&a)try{d(a(v,{value:e}))}catch{}},[v,u,d,a]),readOnly:f,children:(0,l.jsx)(`div`,{style:{minHeight:m},children:(0,l.jsx)(n,{placeholder:p,readOnly:f,className:t.t(`prose prose-sm max-w-none p-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,h)})})})}var ne=[{key:`user-story`,label:`User Story`,description:`En tant que [role], je veux [action] afin de [benefice]`,icon:c.Users,category:`Fonctionnel`,createNodes:()=>[{type:`callout`,variant:`info`,children:[{text:``}]},{type:`h3`,children:[{text:`User Story`}]},{type:`p`,children:[{text:`En tant que `,bold:!0},{text:`[role]`}]},{type:`p`,children:[{text:`Je veux `,bold:!0},{text:`[action]`}]},{type:`p`,children:[{text:`Afin de `,bold:!0},{text:`[benefice attendu]`}]},{type:`p`,children:[{text:``}]}]},{key:`acceptance-criteria`,label:`Criteres d'acceptation`,description:`Given/When/Then avec scenarios de validation`,icon:c.CheckCircle2,category:`Fonctionnel`,createNodes:()=>[{type:`h3`,children:[{text:`Criteres d'acceptation`}]},{type:`table`,children:[{type:`tr`,children:[{type:`th`,children:[{type:`p`,children:[{text:`#`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Scenario`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Given`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`When`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Then`,bold:!0}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`AC-01`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Nominal`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`L'utilisateur est connecte`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Il clique sur le bouton`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Le resultat s'affiche`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`AC-02`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Erreur`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Le service est indisponible`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Il clique sur le bouton`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Un message d'erreur s'affiche`}]}]}]}]},{type:`p`,children:[{text:``}]}]},{key:`use-case`,label:`Cas d'utilisation`,description:`Acteur, pre-conditions, flux nominal, flux alternatifs`,icon:c.GitBranch,category:`Fonctionnel`,createNodes:()=>[{type:`h3`,children:[{text:`Cas d'utilisation : [Nom]`}]},{type:`column_group`,children:[{type:`column`,children:[{type:`h4`,children:[{text:`ACTEUR`}]},{type:`p`,children:[{text:`[Role utilisateur]`}]},{type:`h4`,children:[{text:`PRE-CONDITIONS`}]},{type:`p`,children:[{text:`- L'utilisateur est authentifie`}]},{type:`p`,children:[{text:`- [Autre condition]`}]},{type:`h4`,children:[{text:`POST-CONDITIONS`}]},{type:`p`,children:[{text:`- [Etat apres execution]`}]}]},{type:`column`,children:[{type:`h4`,children:[{text:`FLUX NOMINAL`}]},{type:`p`,children:[{text:`1. L'utilisateur accede a la page`}]},{type:`p`,children:[{text:`2. Le systeme affiche le formulaire`}]},{type:`p`,children:[{text:`3. L'utilisateur remplit et soumet`}]},{type:`p`,children:[{text:`4. Le systeme enregistre et confirme`}]},{type:`h4`,children:[{text:`FLUX ALTERNATIFS`}]},{type:`p`,children:[{text:`3a. Donnees invalides : erreur affichee`}]}]}]},{type:`p`,children:[{text:``}]}]},{key:`api-endpoint`,label:`Endpoint API`,description:`Specification d'un endpoint REST avec requete/reponse`,icon:c.Zap,category:`Technique`,createNodes:()=>[{type:`h3`,children:[{text:`API: [METHOD] /api/v1/[resource]`}]},{type:`table`,children:[{type:`tr`,children:[{type:`th`,children:[{type:`p`,children:[{text:`Propriete`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Valeur`,bold:!0}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Methode`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`GET | POST | PUT | DELETE`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Authentification`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Bearer JWT`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Permissions`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`[ROLE_REQUIRED]`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Rate Limit`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`100 req/min`}]}]}]}]},{type:`h4`,children:[{text:`CORPS DE LA REQUETE`}]},{type:`blockquote`,children:[{text:`{ "field": "value" }`}]},{type:`h4`,children:[{text:`REPONSE 200`}]},{type:`blockquote`,children:[{text:`{ "data": { ... }, "meta": { "total": 42 } }`}]},{type:`p`,children:[{text:``}]}]},{key:`data-model`,label:`Modele de donnees`,description:`Schema d'entite avec champs, types et contraintes`,icon:c.Database,category:`Technique`,createNodes:()=>[{type:`h3`,children:[{text:`Modele : [NomEntite]`}]},{type:`table`,children:[{type:`tr`,children:[{type:`th`,children:[{type:`p`,children:[{text:`Champ`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Type`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Nullable`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Description`,bold:!0}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`id`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`UUID`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Non`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Identifiant unique`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`createdAt`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`DateTime`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Non`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Date de creation`}]}]}]}]},{type:`p`,children:[{text:``}]}]},{key:`security-requirements`,label:`Exigences de securite`,description:`Regles OWASP, chiffrement, acces, conformite`,icon:c.Shield,category:`Non-fonctionnel`,createNodes:()=>[{type:`h3`,children:[{text:`Exigences de securite`}]},{type:`callout`,variant:`warning`,children:[{text:`Section obligatoire pour les modules HDS et les donnees sensibles`}]},{type:`table`,children:[{type:`tr`,children:[{type:`th`,children:[{type:`p`,children:[{text:`Categorie`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Exigence`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Niveau`,bold:!0}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Authentification`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`OAuth2 PKCE via Keycloak`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Obligatoire`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Chiffrement`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`AES-256-GCM au repos, TLS 1.3 en transit`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Obligatoire`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Audit`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`TracingInterceptor sur toutes les operations`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Obligatoire`}]}]}]}]},{type:`p`,children:[{text:``}]}]},{key:`risk-assessment`,label:`Risques et mitigations`,description:`Matrice de risques projet avec probabilite et impact`,icon:c.AlertTriangle,category:`Non-fonctionnel`,createNodes:()=>[{type:`h3`,children:[{text:`Analyse des risques`}]},{type:`table`,children:[{type:`tr`,children:[{type:`th`,children:[{type:`p`,children:[{text:`Risque`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Probabilite`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Impact`,bold:!0}]}]},{type:`th`,children:[{type:`p`,children:[{text:`Mitigation`,bold:!0}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`[Description du risque]`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Moyen`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Haut`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`[Plan de mitigation]`}]}]}]}]},{type:`p`,children:[{text:``}]}]},{key:`spec-header`,label:`En-tete de specification`,description:`Bloc d'en-tete avec version, auteur, statut, date`,icon:c.BookOpen,category:`Document`,createNodes:()=>[{type:`h1`,children:[{text:`[Titre de la specification]`}]},{type:`table`,children:[{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Version`,bold:!0}]}]},{type:`td`,children:[{type:`p`,children:[{text:`1.0.0`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Statut`,bold:!0}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Brouillon`}]}]}]},{type:`tr`,children:[{type:`td`,children:[{type:`p`,children:[{text:`Auteur`,bold:!0}]}]},{type:`td`,children:[{type:`p`,children:[{text:`[Nom]`}]}]},{type:`td`,children:[{type:`p`,children:[{text:`Date`,bold:!0}]}]},{type:`td`,children:[{type:`p`,children:[{text:new Date().toLocaleDateString(`fr-FR`)}]}]}]}]},{type:`h2`,children:[{text:`CONTEXTE`}]},{type:`p`,children:[{text:`[Description du contexte et des objectifs]`}]},{type:`h2`,children:[{text:`PERIMETRE`}]},{type:`p`,children:[{text:`[Ce qui est inclus et exclu du perimetre]`}]},{type:`p`,children:[{text:``}]}]}],re=s.forwardRef(({value:e,onChange:n,readOnly:r=!1,placeholder:i=`Commencez votre specification...`,className:o,editorClassName:c,minHeight:u=500,label:d,description:f,error:p,customTemplates:m=[],showTemplateSidebar:h=!0,enableAI:g=!1,aiEndpoint:_,title:v,onTitleChange:y,extraPlugins:b,editorRef:x},S)=>{let[C,w]=s.useState(null),[T,E]=s.useState(!1),D=s.useRef(null),O=x??D,k=s.useMemo(()=>[...ne,...m],[m]),A=s.useMemo(()=>{let e=new Map;for(let t of k){let n=t.category||`Autre`;e.has(n)||e.set(n,[]),e.get(n).push(t)}return e},[k]);s.useEffect(()=>{let e=!1;return(async()=>{try{let[t,n,r,i,a,o,s]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/link/react`),import(`@platejs/indent/react`)]),c=[n.BoldPlugin,n.ItalicPlugin,n.UnderlinePlugin,n.StrikethroughPlugin,n.CodePlugin,n.HighlightPlugin,n.SuperscriptPlugin,n.SubscriptPlugin,n.H1Plugin,n.H2Plugin,n.H3Plugin,n.H4Plugin,n.H5Plugin,n.H6Plugin,n.BlockquotePlugin,r.TablePlugin,r.TableRowPlugin,r.TableCellPlugin,r.TableCellHeaderPlugin,i.ColumnPlugin,i.ColumnItemPlugin,a.CalloutPlugin,o.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`,`tel`]}}),s.IndentPlugin];try{let{TocPlugin:e}=await import(`@platejs/toc/react`);c.push(e)}catch{}try{let{BlockSelectionPlugin:e}=await import(`@platejs/selection/react`);c.push(e)}catch{}try{let{MarkdownPlugin:e}=await import(`@platejs/markdown`);c.push(e)}catch{}if(g&&_)try{let{AIPlugin:e,AIChatPlugin:t}=await import(`@platejs/ai/react`);c.push(e,t.configure({options:{chat:{api:_,body:{system:`You are a specification writing assistant for a PaaS platform.`}}}}))}catch{}e||w({Plate:t.Plate,PlateContent:t.PlateContent,usePlateEditor:t.usePlateEditor,plugins:c})}catch(t){console.error(`[WakaSpecEditor] Failed to load:`,t),e||E(!0)}})(),()=>{e=!0}},[g,_]);let j=s.useCallback(t=>{let r=t.createNodes(),i=[...e??[],...r];n?.(i)},[e,n]);return(0,l.jsxs)(`div`,{ref:S,className:t.t(`space-y-1.5`,o),children:[d&&(0,l.jsx)(a.n,{children:d}),f&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),(0,l.jsxs)(`div`,{className:t.t(`flex border rounded-lg overflow-hidden`,p&&`border-destructive`),children:[h&&!r&&(0,l.jsxs)(`aside`,{className:`w-52 shrink-0 border-r bg-muted/20 hidden md:block`,children:[(0,l.jsx)(`div`,{className:`p-3 border-b`,children:(0,l.jsx)(`h4`,{className:`text-xs font-bold uppercase tracking-wider text-muted-foreground`,children:`Blocs specification`})}),(0,l.jsx)(`div`,{className:`p-2 space-y-3 max-h-[600px] overflow-y-auto`,children:Array.from(A.entries()).map(([e,n])=>(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground px-1 mb-1`,children:e}),(0,l.jsx)(`div`,{className:`space-y-0.5`,children:n.map(e=>{let n=e.icon;return(0,l.jsxs)(`button`,{type:`button`,onClick:()=>j(e),className:t.t(`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left`,`text-xs transition-colors cursor-pointer`,`hover:bg-accent/50 text-muted-foreground hover:text-foreground`),title:e.description,children:[(0,l.jsx)(n,{className:`h-3.5 w-3.5 shrink-0`}),(0,l.jsx)(`span`,{className:`truncate`,children:e.label})]},e.key)})})]},e))})]}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(v!==void 0||y)&&(0,l.jsx)(`div`,{className:`border-b px-6 py-4`,children:(0,l.jsx)(`input`,{type:`text`,value:v??``,onChange:e=>y?.(e.target.value),placeholder:`Titre de la specification`,readOnly:r,className:t.t(`w-full bg-transparent text-xl font-bold text-foreground`,`placeholder:text-muted-foreground/50 focus:outline-none`)})}),C?(0,l.jsx)(ie,{bundle:C,value:e,onChange:n,readOnly:r,placeholder:i,editorClassName:c,minHeight:u,extraPlugins:b,editorRef:O}):(0,l.jsx)(`div`,{className:`relative`,style:{minHeight:u},children:(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:T?`Erreur de chargement`:`Chargement de l'editeur...`})})})]})]}),p&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:p})]})});re.displayName=`WakaSpecEditor`;function ie({bundle:{Plate:e,PlateContent:n,usePlateEditor:r,plugins:i},value:a,onChange:o,readOnly:c,placeholder:u,editorClassName:d,minHeight:f,extraPlugins:p,editorRef:m}){let h=r({plugins:s.useMemo(()=>[...i,...p??[]],[i,p]),value:a??[{type:`p`,children:[{text:``}]}]});return s.useEffect(()=>{m&&(m.current=h)},[h,m]),(0,l.jsx)(e,{editor:h,onChange:o?({value:e})=>o(e):void 0,readOnly:c,children:(0,l.jsx)(`div`,{style:{minHeight:f},children:(0,l.jsx)(n,{placeholder:u,readOnly:c,className:t.t(`prose prose-sm max-w-none px-6 py-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,d)})})})}var ae=s.forwardRef(({value:e,onChange:n,readOnly:r=!1,placeholder:i=`Glissez-deposez les blocs pour les reorganiser...`,className:o,editorClassName:c,minHeight:u=300,label:d,description:f,error:p,showDragHandles:m=!0,extraPlugins:h,editorRef:g},_)=>{let[v,y]=s.useState(null),[b,x]=s.useState(!1);return s.useEffect(()=>{let e=!1;return(async()=>{try{let[t,n,r,i,a,o,s,c]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/link/react`),import(`@platejs/dnd`),import(`@platejs/selection/react`)]),l=[n.BoldPlugin,n.ItalicPlugin,n.UnderlinePlugin,n.StrikethroughPlugin,n.CodePlugin,n.HighlightPlugin,n.H1Plugin,n.H2Plugin,n.H3Plugin,n.H4Plugin,n.BlockquotePlugin,r.TablePlugin,r.TableRowPlugin,r.TableCellPlugin,r.TableCellHeaderPlugin,i.ColumnPlugin,i.ColumnItemPlugin,a.CalloutPlugin,o.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`,`tel`]}}),c.BlockSelectionPlugin,s.DndPlugin.configure({options:{enableScroller:!0}})];e||y({Plate:t.Plate,PlateContent:t.PlateContent,usePlateEditor:t.usePlateEditor,plugins:l})}catch(t){console.error(`[WakaDnDEditor] Failed to load:`,t),e||x(!0)}})(),()=>{e=!0}},[]),v?(0,l.jsx)(oe,{ref:_,bundle:v,value:e,onChange:n,readOnly:r,placeholder:i,className:o,editorClassName:c,minHeight:u,label:d,description:f,error:p,showDragHandles:m,extraPlugins:h,editorRef:g}):(0,l.jsxs)(`div`,{ref:_,className:t.t(`space-y-1.5`,o),children:[d&&(0,l.jsx)(a.n,{children:d}),f&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(a.t,{placeholder:i,disabled:!0,style:{minHeight:u}}),(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50 rounded-lg`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:b?`Erreur de chargement`:`Chargement...`})})]}),p&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:p})]})});ae.displayName=`WakaDnDEditor`;var oe=s.forwardRef(({bundle:{Plate:e,PlateContent:n,usePlateEditor:r,plugins:i},value:o,onChange:c,readOnly:u,placeholder:d,className:f,editorClassName:p,minHeight:m,label:h,description:g,error:_,showDragHandles:v,extraPlugins:y,editorRef:b},x)=>{let S=r({plugins:s.useMemo(()=>[...i,...y??[]],[i,y]),value:o??[{type:`p`,children:[{text:``}]}]});return s.useEffect(()=>{b&&(b.current=S)},[S,b]),(0,l.jsxs)(`div`,{ref:x,className:t.t(`space-y-1.5`,f),children:[h&&(0,l.jsx)(a.n,{children:h}),g&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:g}),(0,l.jsx)(e,{editor:S,onChange:c?({value:e})=>c(e):void 0,readOnly:u,children:(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden`,_&&`border-destructive`),children:[!u&&v&&(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b bg-muted/30 text-xs text-muted-foreground`,children:[(0,l.jsx)(`span`,{className:`inline-block w-4 text-center`,children:`☰`}),(0,l.jsx)(`span`,{children:`Survolez un bloc pour voir la poignee de glissement`})]}),(0,l.jsx)(`div`,{style:{minHeight:m},children:(0,l.jsx)(n,{placeholder:d,readOnly:u,className:t.t(`prose prose-sm max-w-none p-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,v&&`[&_[data-slate-node='element']]:relative [&_[data-slate-node='element']]:pl-6`,p)})})]})}),_&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:_})]})});oe.displayName=`DnDEditorInner`;var se=s.forwardRef(({value:e,onChange:n,readOnly:r=!1,placeholder:i=`Editez ensemble en temps reel...`,className:o,editorClassName:c,minHeight:u=400,label:d,description:f,error:p,documentId:m,currentUser:h,providers:g,maxParticipants:_=10,onUsersChange:v,showUsersBar:y=!0,extraPlugins:b,editorRef:x},S)=>{let[C,w]=s.useState(null),[T,E]=s.useState(!1),[D,O]=s.useState([h]),k=s.useRef({documentId:m,currentUser:h,providers:g,maxParticipants:_});return k.current={documentId:m,currentUser:h,providers:g,maxParticipants:_},s.useEffect(()=>{let e=!1;return(async()=>{try{let t=k.current,[n,r,i,a,o,s,c]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/link/react`),import(`@platejs/yjs/react`)]),l=[r.BoldPlugin,r.ItalicPlugin,r.UnderlinePlugin,r.StrikethroughPlugin,r.CodePlugin,r.HighlightPlugin,r.H1Plugin,r.H2Plugin,r.H3Plugin,r.H4Plugin,r.BlockquotePlugin,i.TablePlugin,i.TableRowPlugin,i.TableCellPlugin,i.TableCellHeaderPlugin,a.ColumnPlugin,a.ColumnItemPlugin,o.CalloutPlugin,s.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`,`tel`]}})],u=t.providers.map(e=>e.type===`hocuspocus`?{type:`hocuspocus`,options:{name:e.roomName,url:e.url,...e.options}}:{type:`webrtc`,options:{roomName:e.roomName,maxConns:t.maxParticipants-1,signaling:[e.url],...e.options}});l.push(c.YjsPlugin.configure({options:{cursors:{data:{name:t.currentUser.name,color:t.currentUser.color}},providers:u}})),e||w({Plate:n.Plate,PlateContent:n.PlateContent,usePlateEditor:n.usePlateEditor,YjsPlugin:c.YjsPlugin,plugins:l})}catch(t){console.error(`[WakaCollaborativeEditor] Failed to load:`,t),e||E(!0)}})(),()=>{e=!0}},[]),s.useEffect(()=>{v?.(D)},[D,v]),C?(0,l.jsx)(ce,{ref:S,bundle:C,value:e,onChange:n,readOnly:r,placeholder:i,className:o,editorClassName:c,minHeight:u,label:d,description:f,error:p,documentId:m,currentUser:h,showUsersBar:y,connectedUsers:D,setConnectedUsers:O,extraPlugins:b,editorRef:x}):(0,l.jsxs)(`div`,{ref:S,className:t.t(`space-y-1.5`,o),children:[d&&(0,l.jsx)(a.n,{children:d}),f&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(a.t,{placeholder:i,disabled:!0,style:{minHeight:u}}),(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50 rounded-lg`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:T?`Erreur de chargement (@platejs/yjs requis)`:`Connexion a la session collaborative...`})})]}),p&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:p})]})});se.displayName=`WakaCollaborativeEditor`;var ce=s.forwardRef(({bundle:{Plate:e,PlateContent:i,usePlateEditor:o,YjsPlugin:c,plugins:u},value:d,onChange:f,readOnly:p,placeholder:m,className:h,editorClassName:g,minHeight:_,label:v,description:y,error:b,documentId:x,showUsersBar:S,connectedUsers:C,extraPlugins:w,editorRef:T},E)=>{let D=o({plugins:s.useMemo(()=>[...u,...w??[]],[u,w]),skipInitialization:!0},[x]);return s.useEffect(()=>{try{D.getApi(c).yjs.init({id:x,autoSelect:`end`,value:d??[{type:`p`,children:[{text:``}]}]})}catch{}return()=>{try{D.getApi(c).yjs.destroy()}catch{}}},[D,x,c,d]),s.useEffect(()=>{T&&(T.current=D)},[D,T]),(0,l.jsxs)(`div`,{ref:E,className:t.t(`space-y-1.5`,h),children:[v&&(0,l.jsx)(a.n,{children:v}),y&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:y}),(0,l.jsx)(e,{editor:D,onChange:f?({value:e})=>f(e):void 0,readOnly:p,children:(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden`,b&&`border-destructive`),children:[S&&(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b bg-muted/30`,children:[(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`En ligne :`}),(0,l.jsx)(`div`,{className:`flex items-center -space-x-1.5`,children:C.map(e=>(0,l.jsx)(n.p,{className:`h-6 w-6 border-2 border-background`,children:(0,l.jsx)(n.m,{className:`text-[10px] text-white font-bold`,style:{backgroundColor:e.color},children:e.name.slice(0,2).toUpperCase()})},e.id))}),(0,l.jsxs)(r.t,{variant:`secondary`,className:`text-[10px] h-5`,children:[C.length,` connecte`,C.length>1?`s`:``]})]}),(0,l.jsx)(`div`,{style:{minHeight:_},children:(0,l.jsx)(i,{placeholder:m,readOnly:p,className:t.t(`prose prose-sm max-w-none p-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,g)})})]})}),b&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:b})]})});ce.displayName=`CollabEditorInner`;var le=s.forwardRef(({original:e,modified:n,mode:i=`inline`,label:o,description:c,className:u,editorClassName:d,minHeight:f=200,showStats:p=!0,originalLabel:m=`Original`,modifiedLabel:h=`Modifie`,onDiffComputed:g},_)=>{let[v,y]=s.useState(null),[b,x]=s.useState({added:0,removed:0,modified:0,unchanged:0}),[S,C]=s.useState(!1);return s.useEffect(()=>{let t=!1;return(async()=>{try{let r=await import(`@platejs/diff`);if(r.computeDiff){let i=r.computeDiff(e,n);if(!t){y(i);let e={added:0,removed:0,modified:0,unchanged:0};if(Array.isArray(i))for(let t of i)t.diff===`insert`||t.diffOperation?.type===`insert`?e.added++:t.diff===`delete`||t.diffOperation?.type===`delete`?e.removed++:t.diff===`update`||t.diffOperation?.type===`update`?e.modified++:e.unchanged++;x(e),g?.(e)}}}catch(e){console.error(`[WakaDiffViewer] Failed to compute diff:`,e),t||C(!0)}})(),()=>{t=!0}},[e,n,g]),S||!v?(0,l.jsxs)(`div`,{ref:_,className:t.t(`space-y-1.5`,u),children:[o&&(0,l.jsx)(a.n,{children:o}),c&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:c}),S?(0,l.jsx)(fe,{original:e,modified:n,mode:i,originalLabel:m,modifiedLabel:h,minHeight:f,editorClassName:d}):(0,l.jsx)(`div`,{className:`flex items-center justify-center border rounded-lg bg-muted/30`,style:{minHeight:f},children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:`Calcul des differences...`})})]}):(0,l.jsxs)(`div`,{ref:_,className:t.t(`space-y-1.5`,u),children:[o&&(0,l.jsx)(a.n,{children:o}),c&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:c}),(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden`),children:[p&&(0,l.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-2 border-b bg-muted/30`,children:[(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground font-medium`,children:`Differences :`}),b.added>0&&(0,l.jsxs)(r.t,{variant:`secondary`,className:`bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 text-[10px] h-5`,children:[`+`,b.added,` ajout`,b.added>1?`s`:``]}),b.removed>0&&(0,l.jsxs)(r.t,{variant:`secondary`,className:`bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 text-[10px] h-5`,children:[`-`,b.removed,` suppression`,b.removed>1?`s`:``]}),b.modified>0&&(0,l.jsxs)(r.t,{variant:`secondary`,className:`bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 text-[10px] h-5`,children:[`~`,b.modified,` modification`,b.modified>1?`s`:``]}),b.added===0&&b.removed===0&&b.modified===0&&(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Aucune difference`})]}),i===`side-by-side`?(0,l.jsxs)(`div`,{className:`flex divide-x`,style:{minHeight:f},children:[(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsx)(`div`,{className:`px-3 py-1.5 border-b bg-red-50/50 dark:bg-red-950/10 text-xs font-medium text-muted-foreground`,children:m}),(0,l.jsx)(F,{nodes:e,diffType:`original`,className:d})]}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsx)(`div`,{className:`px-3 py-1.5 border-b bg-green-50/50 dark:bg-green-950/10 text-xs font-medium text-muted-foreground`,children:h}),(0,l.jsx)(F,{nodes:n,diffType:`modified`,className:d})]})]}):(0,l.jsx)(`div`,{style:{minHeight:f},children:(0,l.jsx)(ue,{diffNodes:v,className:d})})]})]})});le.displayName=`WakaDiffViewer`;function F({nodes:e,diffType:n,className:r}){return(0,l.jsx)(`div`,{className:t.t(`prose prose-sm max-w-none p-4 text-sm`,r),children:e.map((e,t)=>(0,l.jsx)(de,{node:e,diffType:n},t))})}function ue({diffNodes:e,className:n}){return(0,l.jsx)(`div`,{className:t.t(`prose prose-sm max-w-none p-4 text-sm`,n),children:e.map((e,n)=>{let r=e.diff||e.diffOperation?.type,i=``;return r===`insert`?i=`bg-green-100/60 dark:bg-green-900/20`:r===`delete`?i=`bg-red-100/60 dark:bg-red-900/20 line-through opacity-60`:r===`update`&&(i=`bg-amber-100/60 dark:bg-amber-900/20`),(0,l.jsx)(`div`,{className:t.t(`rounded px-1 -mx-1`,i),children:(0,l.jsx)(de,{node:e,diffType:`modified`})},n)})})}function de({node:e,diffType:t}){if(!e)return null;let n=pe(e);switch(e.type||`p`){case`h1`:return(0,l.jsx)(`h1`,{className:`text-xl font-bold mt-4 mb-1`,children:n});case`h2`:return(0,l.jsx)(`h2`,{className:`text-lg font-semibold mt-3 mb-1`,children:n});case`h3`:return(0,l.jsx)(`h3`,{className:`text-base font-semibold mt-2 mb-1`,children:n});case`blockquote`:return(0,l.jsx)(`blockquote`,{className:`border-l-2 border-muted-foreground/30 pl-3 italic text-muted-foreground`,children:n});default:return(0,l.jsx)(`p`,{className:`my-0.5 leading-relaxed`,children:n||`\xA0`})}}function fe({original:e,modified:t,mode:n,originalLabel:r,modifiedLabel:i,minHeight:a,editorClassName:o}){return n===`side-by-side`?(0,l.jsxs)(`div`,{className:`flex divide-x border rounded-lg overflow-hidden`,style:{minHeight:a},children:[(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsx)(`div`,{className:`px-3 py-1.5 border-b bg-red-50/50 dark:bg-red-950/10 text-xs font-medium text-muted-foreground`,children:r}),(0,l.jsx)(F,{nodes:e,diffType:`original`,className:o})]}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsx)(`div`,{className:`px-3 py-1.5 border-b bg-green-50/50 dark:bg-green-950/10 text-xs font-medium text-muted-foreground`,children:i}),(0,l.jsx)(F,{nodes:t,diffType:`modified`,className:o})]})]}):(0,l.jsx)(`div`,{className:`border rounded-lg overflow-hidden`,style:{minHeight:a},children:(0,l.jsxs)(`div`,{className:`p-4 text-sm text-muted-foreground`,children:[`Installez `,(0,l.jsx)(`code`,{className:`bg-muted px-1 rounded`,children:`@platejs/diff`}),` pour la visualisation unifiee des differences.`]})})}function pe(e){return typeof e?.text==`string`?e.text:Array.isArray(e?.children)?e.children.map(e=>pe(e)).join(``):``}var me=s.forwardRef(({value:e,onChange:n,readOnly:r=!1,placeholder:i=`Tapez @ pour mentionner un utilisateur...`,className:o,editorClassName:c,minHeight:u=200,label:d,description:f,error:p,onSearch:m,onMentionInserted:h,trigger:g=`@`,searchDebounceMs:_=300,maxResults:v=8,extraPlugins:y,editorRef:b},x)=>{let[S,C]=s.useState(null),[w,T]=s.useState(!1),[E,D]=s.useState([]),[O,k]=s.useState(!1),A=s.useRef(),j=s.useRef({onSearch:m,trigger:g,searchDebounceMs:_,maxResults:v,onMentionInserted:h});j.current={onSearch:m,trigger:g,searchDebounceMs:_,maxResults:v,onMentionInserted:h},s.useEffect(()=>{let e=!1;return(async()=>{try{let t=j.current,[n,r,i,a,o,s,c]=await Promise.all([import(`platejs/react`),import(`@platejs/basic-nodes/react`),import(`@platejs/table/react`),import(`@platejs/layout/react`),import(`@platejs/callout/react`),import(`@platejs/link/react`),import(`@platejs/mention/react`)]),l=[r.BoldPlugin,r.ItalicPlugin,r.UnderlinePlugin,r.StrikethroughPlugin,r.CodePlugin,r.HighlightPlugin,r.H1Plugin,r.H2Plugin,r.H3Plugin,r.H4Plugin,r.BlockquotePlugin,i.TablePlugin,i.TableRowPlugin,i.TableCellPlugin,i.TableCellHeaderPlugin,a.ColumnPlugin,a.ColumnItemPlugin,o.CalloutPlugin,s.LinkPlugin.configure({options:{allowedSchemes:[`http`,`https`,`mailto`,`tel`]}}),c.MentionPlugin.configure({options:{trigger:t.trigger,triggerPreviousCharPattern:/^$|^[\s"']$/,insertSpaceAfterMention:!0}}),c.MentionInputPlugin];e||C({Plate:n.Plate,PlateContent:n.PlateContent,usePlateEditor:n.usePlateEditor,plugins:l})}catch(t){console.error(`[WakaMentionEditor] Failed to load:`,t),e||T(!0)}})(),()=>{e=!0}},[]);let M=s.useCallback(e=>{if(A.current&&clearTimeout(A.current),!e.trim()){D([]),k(!1);return}k(!0),A.current=setTimeout(async()=>{try{let t=j.current;D((await t.onSearch(e)).slice(0,t.maxResults))}catch{D([])}finally{k(!1)}},j.current.searchDebounceMs)},[]);return S?(0,l.jsx)(he,{ref:x,bundle:S,value:e,onChange:n,readOnly:r,placeholder:i,className:o,editorClassName:c,minHeight:u,label:d,description:f,error:p,suggestions:E,searching:O,onSearch:M,onMentionInserted:h,extraPlugins:y,editorRef:b}):(0,l.jsxs)(`div`,{ref:x,className:t.t(`space-y-1.5`,o),children:[d&&(0,l.jsx)(a.n,{children:d}),f&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(a.t,{placeholder:i,disabled:!0,style:{minHeight:u}}),(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-background/50 rounded-lg`,children:(0,l.jsx)(`span`,{className:`text-sm text-muted-foreground animate-pulse`,children:w?`Erreur (@platejs/mention requis)`:`Chargement...`})})]}),p&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:p})]})});me.displayName=`WakaMentionEditor`;var he=s.forwardRef(({bundle:{Plate:e,PlateContent:n,usePlateEditor:r,plugins:i},value:o,onChange:c,readOnly:u,placeholder:d,className:f,editorClassName:p,minHeight:m,label:h,description:g,error:_,suggestions:v,searching:y,extraPlugins:b,editorRef:x},S)=>{let C=r({plugins:s.useMemo(()=>[...i,...b??[]],[i,b]),value:o??[{type:`p`,children:[{text:``}]}]});return s.useEffect(()=>{x&&(x.current=C)},[C,x]),(0,l.jsxs)(`div`,{ref:S,className:t.t(`space-y-1.5`,f),children:[h&&(0,l.jsx)(a.n,{children:h}),g&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:g}),(0,l.jsx)(e,{editor:C,onChange:c?({value:e})=>c(e):void 0,readOnly:u,children:(0,l.jsxs)(`div`,{className:t.t(`border rounded-lg overflow-hidden relative`,_&&`border-destructive`),children:[(0,l.jsx)(`div`,{style:{minHeight:m},children:(0,l.jsx)(n,{placeholder:d,readOnly:u,className:t.t(`prose prose-sm max-w-none p-4`,`focus-within:outline-none`,`[&_[data-slate-editor]]:outline-none [&_[data-slate-editor]]:min-h-[inherit]`,p)})}),v.length>0&&(0,l.jsx)(I,{suggestions:v,searching:y})]})}),_&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:_})]})});he.displayName=`MentionEditorInner`;function I({suggestions:e,searching:r,className:i,onSelect:a}){return(0,l.jsxs)(`div`,{className:t.t(`absolute z-50 w-64 max-h-60 overflow-y-auto`,`rounded-lg border bg-popover shadow-lg`,`p-1 mt-1`,i),children:[r&&(0,l.jsx)(`div`,{className:`px-2 py-1.5 text-xs text-muted-foreground animate-pulse`,children:`Recherche...`}),e.map(e=>(0,l.jsxs)(`button`,{type:`button`,className:t.t(`flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left`,`text-sm transition-colors cursor-pointer`,`hover:bg-accent/50`),onClick:()=>a?.(e),children:[(0,l.jsxs)(n.p,{className:`h-6 w-6`,children:[e.avatar&&(0,l.jsx)(n.h,{src:e.avatar,alt:e.name}),(0,l.jsx)(n.m,{className:`text-[10px] bg-primary/10 text-primary`,children:e.name.slice(0,2).toUpperCase()})]}),(0,l.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,l.jsx)(`div`,{className:`font-medium truncate`,children:e.name}),e.email&&(0,l.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.email})]}),e.role&&(0,l.jsx)(`span`,{className:`text-[10px] text-muted-foreground shrink-0`,children:e.role})]},e.id))]})}I.displayName=`MentionSuggestions`;function ge({children:e,attributes:n,className:r}){return(0,l.jsx)(`table`,{...n,className:t.t(`w-full border-collapse text-sm my-4`,`border border-border rounded-lg overflow-hidden`,r),children:(0,l.jsx)(`tbody`,{children:e})})}ge.displayName=`TableElement`;function _e({children:e,attributes:n,className:r}){return(0,l.jsx)(`tr`,{...n,className:t.t(`border-b border-border last:border-b-0`,r),children:e})}_e.displayName=`TableRowElement`;function ve({children:e,attributes:n,className:r}){return(0,l.jsx)(`td`,{...n,className:t.t(`px-3 py-2 text-sm text-foreground`,`border-r border-border last:border-r-0`,r),children:e})}ve.displayName=`TableCellElement`;function ye({children:e,attributes:n,className:r}){return(0,l.jsx)(`th`,{...n,className:t.t(`px-3 py-2 text-xs font-bold uppercase tracking-wider`,`text-muted-foreground text-left bg-muted/50`,`border-r border-border last:border-r-0`,r),children:e})}ye.displayName=`TableCellHeaderElement`;function be({children:e,attributes:n,className:r}){return(0,l.jsx)(`div`,{...n,className:t.t(`flex gap-6 my-4`,r),children:e})}be.displayName=`ColumnGroupElement`;function xe({children:e,attributes:n,className:r}){return(0,l.jsx)(`div`,{...n,className:t.t(`flex-1 min-w-0`,r),children:e})}xe.displayName=`ColumnElement`;var Se={info:`bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-950/30 dark:border-blue-800 dark:text-blue-200`,warning:`bg-amber-50 border-amber-200 text-amber-900 dark:bg-amber-950/30 dark:border-amber-800 dark:text-amber-200`,success:`bg-green-50 border-green-200 text-green-900 dark:bg-green-950/30 dark:border-green-800 dark:text-green-200`,error:`bg-red-50 border-red-200 text-red-900 dark:bg-red-950/30 dark:border-red-800 dark:text-red-200`,dark:`bg-card border-border text-card-foreground`};function Ce({children:e,attributes:n,element:r,className:i}){let a=Se[r?.variant||`info`]??Se.info;return(0,l.jsx)(`div`,{...n,className:t.t(`border rounded-xl p-4 my-3`,a,i),children:e})}Ce.displayName=`CalloutElement`;function we({children:e,attributes:n,className:r}){return(0,l.jsx)(`h1`,{...n,className:t.t(`text-2xl font-extrabold text-foreground mt-8 mb-2 first:mt-0`,r),children:e})}we.displayName=`H1Element`;function Te({children:e,attributes:n,className:r}){return(0,l.jsx)(`h2`,{...n,className:t.t(`text-sm font-bold text-foreground uppercase tracking-wider`,`mt-6 mb-3 border-b-2 border-border pb-1.5`,r),children:e})}Te.displayName=`H2Element`;function Ee({children:e,attributes:n,className:r}){return(0,l.jsx)(`h3`,{...n,className:t.t(`text-sm font-semibold text-primary italic mt-1 mb-4`,r),children:e})}Ee.displayName=`H3Element`;function De({children:e,attributes:n,className:r}){return(0,l.jsx)(`h4`,{...n,className:t.t(`text-xs font-bold text-primary uppercase tracking-wide mt-2 mb-0.5`,r),children:e})}De.displayName=`H4Element`;function Oe({children:e,attributes:n,className:r}){return(0,l.jsx)(`h5`,{...n,className:t.t(`text-xs font-semibold text-muted-foreground mt-2 mb-0.5`,r),children:e})}Oe.displayName=`H5Element`;function ke({children:e,attributes:n,className:r}){return(0,l.jsx)(`h6`,{...n,className:t.t(`text-xs font-medium text-muted-foreground mt-2 mb-0.5`,r),children:e})}ke.displayName=`H6Element`;function Ae({children:e,attributes:n,className:r}){return(0,l.jsx)(`blockquote`,{...n,className:t.t(`border-l-3 border-primary/50 pl-4 py-2`,`bg-muted/30 rounded-r-lg`,`italic text-muted-foreground`,`my-3`,r),children:e})}Ae.displayName=`BlockquoteElement`;function je({children:e,attributes:n,className:r}){return(0,l.jsx)(`p`,{...n,className:t.t(`text-sm leading-relaxed text-foreground my-0.5`,r),children:e})}je.displayName=`ParagraphElement`;function Me({children:e,attributes:n,element:r,className:i}){return(0,l.jsx)(`a`,{...n,href:r?.url,target:`_blank`,rel:`noopener noreferrer`,className:t.t(`text-primary underline decoration-primary/30 hover:decoration-primary`,`transition-colors cursor-pointer`,i),children:e})}Me.displayName=`LinkElement`;function Ne({children:e,attributes:n,element:r,className:i}){return(0,l.jsxs)(`span`,{...n,contentEditable:!1,className:t.t(`inline-flex items-center rounded-md px-1.5 py-0.5`,`bg-primary/10 text-primary text-sm font-medium`,`border border-primary/20`,i),children:[`@`,r?.value||`unknown`,e]})}Ne.displayName=`MentionElement`;function Pe({attributes:e,className:n}){return(0,l.jsx)(`div`,{...e,className:t.t(`my-6`,n),children:(0,l.jsx)(`hr`,{className:`border-border`})})}Pe.displayName=`SeparatorElement`;function Fe({children:e,attributes:n,className:r}){return(0,l.jsx)(`strong`,{...n,className:t.t(`font-bold`,r),children:e})}Fe.displayName=`BoldLeaf`;function Ie({children:e,attributes:n,className:r}){return(0,l.jsx)(`em`,{...n,className:t.t(`italic`,r),children:e})}Ie.displayName=`ItalicLeaf`;function Le({children:e,attributes:n,className:r}){return(0,l.jsx)(`span`,{...n,className:t.t(`underline decoration-foreground/50`,r),children:e})}Le.displayName=`UnderlineLeaf`;function Re({children:e,attributes:n,className:r}){return(0,l.jsx)(`s`,{...n,className:t.t(`line-through text-muted-foreground`,r),children:e})}Re.displayName=`StrikethroughLeaf`;function ze({children:e,attributes:n,className:r}){return(0,l.jsx)(`code`,{...n,className:t.t(`rounded-md bg-muted px-1.5 py-0.5`,`font-mono text-[0.85em] text-foreground`,r),children:e})}ze.displayName=`CodeLeaf`;function Be({children:e,attributes:n,className:r}){return(0,l.jsx)(`mark`,{...n,className:t.t(`bg-yellow-200/60 dark:bg-yellow-500/30`,`rounded-sm px-0.5`,r),children:e})}Be.displayName=`HighlightLeaf`;function Ve({children:e,attributes:n,className:r}){return(0,l.jsx)(`sup`,{...n,className:t.t(`text-[0.75em]`,r),children:e})}Ve.displayName=`SuperscriptLeaf`;function He({children:e,attributes:n,className:r}){return(0,l.jsx)(`sub`,{...n,className:t.t(`text-[0.75em]`,r),children:e})}He.displayName=`SubscriptLeaf`;var L=`user_story`,R={must:{label:`Must Have`,color:`text-red-700 dark:text-red-400`,bg:`bg-red-50 dark:bg-red-500/10`},should:{label:`Should Have`,color:`text-amber-700 dark:text-amber-400`,bg:`bg-amber-50 dark:bg-amber-500/10`},could:{label:`Could Have`,color:`text-blue-700 dark:text-blue-400`,bg:`bg-blue-50 dark:bg-blue-500/10`},wont:{label:`Won't Have`,color:`text-gray-500 dark:text-gray-400`,bg:`bg-gray-50 dark:bg-gray-500/10`}};function z({label:e,icon:n,value:r,placeholder:i,readOnly:a,onChange:o}){return(0,l.jsxs)(`div`,{className:`flex items-start gap-3 group`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-1 shrink-0 w-[90px]`,children:[(0,l.jsx)(`span`,{className:`text-blue-500 dark:text-blue-400`,children:n}),(0,l.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-wider text-blue-600 dark:text-blue-400`,children:e})]}),(0,l.jsx)(`div`,{className:`flex-1 min-w-0`,children:a?(0,l.jsx)(`p`,{className:`text-sm text-foreground py-1`,children:r||(0,l.jsx)(`span`,{className:`text-muted-foreground italic`,children:i})}):(0,l.jsx)(`input`,{type:`text`,value:r,onChange:e=>o?.(e.target.value),placeholder:i,className:t.t(`w-full bg-transparent text-sm text-foreground py-1 px-0`,`border-0 border-b border-transparent`,`focus:border-blue-300 dark:focus:border-blue-600`,`focus:outline-none transition-colors`,`placeholder:text-muted-foreground/50 placeholder:italic`)})})]})}function B({attributes:e,children:n,element:r,className:i}){let a=r,o=a?.priority,s=a?.storyId,c=a?.points;return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`relative my-4 rounded-lg overflow-hidden`,`border-l-4 border-blue-500 dark:border-blue-400`,`bg-blue-50/50 dark:bg-blue-950/20`,`border border-blue-200/60 dark:border-blue-800/40`,`shadow-sm hover:shadow-md transition-shadow duration-200`,i),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2 bg-blue-100/50 dark:bg-blue-900/20 border-b border-blue-200/40 dark:border-blue-800/30`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`svg`,{className:`h-4 w-4 text-blue-600 dark:text-blue-400`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})}),(0,l.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider text-blue-700 dark:text-blue-300`,children:`User Story`}),s&&(0,l.jsx)(`span`,{className:`text-[10px] font-mono font-semibold text-blue-500 dark:text-blue-400 bg-blue-100 dark:bg-blue-800/40 px-1.5 py-0.5 rounded`,children:s})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c!==void 0&&(0,l.jsx)(`span`,{className:`inline-flex items-center justify-center h-5 min-w-[20px] px-1 rounded-full bg-blue-200 dark:bg-blue-700/50 text-[10px] font-bold text-blue-800 dark:text-blue-200`,children:c}),o&&R[o]&&(0,l.jsx)(`span`,{className:t.t(`text-[10px] font-semibold px-2 py-0.5 rounded-full`,R[o].bg,R[o].color),children:R[o].label})]})]}),(0,l.jsxs)(`div`,{className:`px-4 py-3 space-y-2`,children:[(0,l.jsx)(z,{label:`As a`,icon:(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})}),value:a?.role||``,placeholder:`role (e.g. platform administrator)`,readOnly:!0}),(0,l.jsx)(z,{label:`I want`,icon:(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M13 10V3L4 14h7v7l9-11h-7z`})}),value:a?.action||``,placeholder:`action (e.g. to deploy services with one click)`,readOnly:!0}),(0,l.jsx)(z,{label:`So that`,icon:(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`})}),value:a?.benefit||``,placeholder:`benefit (e.g. I can reduce time-to-market)`,readOnly:!0})]}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}B.displayName=`WakaUserStoryBlock`;function Ue(e){return[{type:L,role:e?.role||``,action:e?.action||``,benefit:e?.benefit||``,storyId:e?.storyId,priority:e?.priority,points:e?.points,children:[{text:``}]}]}async function We(){try{let{createPlatePlugin:e}=await import(`platejs/react`);return e({key:L,node:{isElement:!0,isVoid:!0,type:L,component:B}})}catch{return console.warn(`[WakaUserStoryBlock] platejs not installed`),null}}var V=`acceptance_criteria`;function H({keyword:e,variant:n}){return(0,l.jsx)(`span`,{className:t.t(`inline-block text-[10px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded shrink-0 w-[52px] text-center`,{given:`bg-violet-100 text-violet-700 dark:bg-violet-500/15 dark:text-violet-400`,when:`bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-400`,then:`bg-emerald-100 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-400`}[n]),children:e})}function Ge({criterion:e,index:n,readOnly:r}){let[i,a]=s.useState(!0);return(0,l.jsxs)(`div`,{className:t.t(`rounded-lg border transition-all duration-200`,e.validated?`border-emerald-200 dark:border-emerald-800/40 bg-emerald-50/30 dark:bg-emerald-950/10`:`border-border bg-card/50`),children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-2`,children:[(0,l.jsx)(`button`,{type:`button`,disabled:r,className:t.t(`flex-shrink-0 h-5 w-5 rounded-md border-2 flex items-center justify-center transition-all duration-200`,e.validated?`bg-emerald-500 border-emerald-500 text-white`:`border-border hover:border-emerald-400`,r&&`cursor-default`),"aria-label":e.validated?`Mark as not validated`:`Mark as validated`,"aria-checked":e.validated,role:`checkbox`,children:e.validated&&(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:3,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5 13l4 4L19 7`})})}),(0,l.jsx)(`span`,{className:`text-[10px] font-mono font-bold text-muted-foreground bg-muted px-1.5 py-0.5 rounded shrink-0`,children:e.id}),(0,l.jsx)(`span`,{className:t.t(`text-sm font-medium flex-1 min-w-0 truncate`,e.validated&&`line-through text-muted-foreground`),children:e.scenario||`Unnamed scenario`}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>a(!i),className:`text-muted-foreground hover:text-foreground transition-colors p-0.5`,"aria-label":i?`Collapse`:`Expand`,children:(0,l.jsx)(`svg`,{className:t.t(`h-3.5 w-3.5 transition-transform duration-200`,i&&`rotate-180`),viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 9l-7 7-7-7`})})})]}),i&&(0,l.jsxs)(`div`,{className:`px-3 pb-3 pt-1 space-y-1.5 border-t border-border/50`,children:[(0,l.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,l.jsx)(H,{keyword:`Given`,variant:`given`}),(0,l.jsx)(`span`,{className:`text-sm text-foreground/80 pt-0.5`,children:e.given||(0,l.jsx)(`span`,{className:`italic text-muted-foreground`,children:`precondition...`})})]}),(0,l.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,l.jsx)(H,{keyword:`When`,variant:`when`}),(0,l.jsx)(`span`,{className:`text-sm text-foreground/80 pt-0.5`,children:e.when||(0,l.jsx)(`span`,{className:`italic text-muted-foreground`,children:`action...`})})]}),(0,l.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,l.jsx)(H,{keyword:`Then`,variant:`then`}),(0,l.jsx)(`span`,{className:`text-sm text-foreground/80 pt-0.5`,children:e.then||(0,l.jsx)(`span`,{className:`italic text-muted-foreground`,children:`expected result...`})})]})]})]})}function U({attributes:e,children:n,element:r,className:i}){let a=r,o=a?.criteria||[],s=a?.title||`Acceptance Criteria`,c=o.filter(e=>e.validated).length,u=o.length,d=u>0?c/u*100:0;return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden`,`border border-border`,`bg-card/30`,`shadow-sm`,i),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2.5 bg-muted/30 border-b border-border`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`svg`,{className:`h-4 w-4 text-emerald-600 dark:text-emerald-400`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4`})}),(0,l.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider text-foreground`,children:s})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsxs)(`span`,{className:`text-[10px] font-medium text-muted-foreground`,children:[c,`/`,u]}),(0,l.jsx)(`div`,{className:`w-16 h-1.5 bg-muted rounded-full overflow-hidden`,children:(0,l.jsx)(`div`,{className:`h-full bg-emerald-500 rounded-full transition-all duration-500`,style:{width:`${d}%`}})})]})]}),(0,l.jsx)(`div`,{className:`p-3 space-y-2`,children:o.length>0?o.map((e,t)=>(0,l.jsx)(Ge,{criterion:e,index:t,readOnly:!0},e.id)):(0,l.jsx)(`div`,{className:`py-6 text-center text-sm text-muted-foreground italic`,children:`No acceptance criteria defined yet.`})}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}U.displayName=`WakaAcceptanceCriteriaBlock`;function Ke(e){return[{type:V,title:e?.title||`Acceptance Criteria`,criteria:e?.criteria||[{id:`AC-01`,scenario:`Nominal case`,given:`The user is authenticated`,when:`They perform the action`,then:`The expected result is displayed`,validated:!1},{id:`AC-02`,scenario:`Error case`,given:`The service is unavailable`,when:`They perform the action`,then:`An error message is displayed`,validated:!1}],children:[{text:``}]}]}async function qe(){try{let{createPlatePlugin:e}=await import(`platejs/react`);return e({key:V,node:{isElement:!0,isVoid:!0,type:V,component:U}})}catch{return console.warn(`[WakaAcceptanceCriteriaBlock] platejs not installed`),null}}var W=`api_endpoint`,G={GET:{bg:`bg-emerald-100 dark:bg-emerald-500/15`,text:`text-emerald-700 dark:text-emerald-400`,border:`border-emerald-300 dark:border-emerald-600/40`},POST:{bg:`bg-blue-100 dark:bg-blue-500/15`,text:`text-blue-700 dark:text-blue-400`,border:`border-blue-300 dark:border-blue-600/40`},PUT:{bg:`bg-amber-100 dark:bg-amber-500/15`,text:`text-amber-700 dark:text-amber-400`,border:`border-amber-300 dark:border-amber-600/40`},PATCH:{bg:`bg-orange-100 dark:bg-orange-500/15`,text:`text-orange-700 dark:text-orange-400`,border:`border-orange-300 dark:border-orange-600/40`},DELETE:{bg:`bg-red-100 dark:bg-red-500/15`,text:`text-red-700 dark:text-red-400`,border:`border-red-300 dark:border-red-600/40`},HEAD:{bg:`bg-gray-100 dark:bg-gray-500/15`,text:`text-gray-700 dark:text-gray-400`,border:`border-gray-300 dark:border-gray-600/40`},OPTIONS:{bg:`bg-purple-100 dark:bg-purple-500/15`,text:`text-purple-700 dark:text-purple-400`,border:`border-purple-300 dark:border-purple-600/40`}};function Je({method:e}){let n=G[e]||G.GET;return(0,l.jsx)(`span`,{className:t.t(`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-bold font-mono tracking-wide border`,n.bg,n.text,n.border),children:e})}function Ye({status:e}){return(0,l.jsx)(`span`,{className:t.t(`text-[11px] font-mono font-bold px-1.5 py-0.5 rounded`,e<300?`text-emerald-700 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-500/10`:e<400?`text-blue-700 dark:text-blue-400 bg-blue-50 dark:bg-blue-500/10`:e<500?`text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-500/10`:`text-red-700 dark:text-red-400 bg-red-50 dark:bg-red-500/10`),children:e})}function Xe({code:e,label:n}){let[r,i]=s.useState(!1),a=e.split(`
29
- `).length>6;return(0,l.jsxs)(`div`,{className:`mt-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,l.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-muted-foreground`,children:n}),a&&(0,l.jsx)(`button`,{type:`button`,onClick:()=>i(!r),className:`text-[10px] text-primary hover:underline`,children:r?`Collapse`:`Expand`})]}),(0,l.jsxs)(`pre`,{className:t.t(`text-[12px] font-mono leading-relaxed p-3 rounded-md overflow-x-auto`,`bg-gray-950 dark:bg-gray-900 text-gray-100`,`border border-gray-800/50`,!r&&a&&`max-h-[150px] overflow-hidden relative`),children:[!r&&a&&(0,l.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 h-10 bg-gradient-to-t from-gray-950 dark:from-gray-900 to-transparent`}),(0,l.jsx)(`code`,{children:e})]})]})}function K({attributes:e,children:n,element:r,className:i}){let a=r,o=a?.method||`GET`,c=a?.route||`/api/v1/resource`,u=G[o]||G.GET,[d,f]=s.useState(a?.params&&a.params.length>0?`params`:a?.requestBody?`body`:`responses`);return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden`,`border`,u.border,`shadow-sm`,i),children:[(0,l.jsxs)(`div`,{className:t.t(`flex items-center gap-3 px-4 py-3`,u.bg),children:[(0,l.jsx)(Je,{method:o}),(0,l.jsx)(`code`,{className:t.t(`text-sm font-mono font-semibold`,u.text),children:c})]}),(0,l.jsxs)(`div`,{className:`px-4 py-3 border-b border-border/50 bg-card/50`,children:[a?.description&&(0,l.jsx)(`p`,{className:`text-sm text-foreground mb-2`,children:a.description}),(0,l.jsxs)(`div`,{className:`flex flex-wrap gap-3 text-[11px]`,children:[a?.auth&&(0,l.jsxs)(`div`,{className:`flex items-center gap-1 text-muted-foreground`,children:[(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`})}),(0,l.jsx)(`span`,{className:`font-medium`,children:a.auth})]}),a?.permissions&&a.permissions.length>0&&(0,l.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,l.jsx)(`svg`,{className:`h-3 w-3 text-muted-foreground`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z`})}),a.permissions.map((e,t)=>(0,l.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-muted text-muted-foreground font-mono text-[10px]`,children:e},t))]}),a?.rateLimit&&(0,l.jsxs)(`div`,{className:`flex items-center gap-1 text-muted-foreground`,children:[(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})}),(0,l.jsx)(`span`,{className:`font-medium`,children:a.rateLimit})]})]})]}),(0,l.jsx)(`div`,{className:`flex border-b border-border/50`,children:[{id:`params`,label:`Parameters`,count:a?.params?.length},{id:`body`,label:`Request Body`,show:!!a?.requestBody},{id:`responses`,label:`Responses`,count:a?.responses?.length}].filter(e=>e.show!==!1&&(e.count===void 0||e.count>0)).map(e=>(0,l.jsxs)(`button`,{type:`button`,onClick:()=>f(e.id),className:t.t(`px-4 py-2 text-xs font-medium transition-colors relative`,d===e.id?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[e.label,e.count!==void 0&&(0,l.jsxs)(`span`,{className:`ml-1 text-[10px] text-muted-foreground`,children:[`(`,e.count,`)`]}),d===e.id&&(0,l.jsx)(`div`,{className:t.t(`absolute bottom-0 left-0 right-0 h-0.5`,u.bg.replace(`bg-`,`bg-`).replace(`/15`,``)),style:{backgroundColor:o===`GET`?`#10b981`:o===`POST`?`#3b82f6`:o===`PUT`?`#f59e0b`:o===`DELETE`?`#ef4444`:`#6b7280`}})]},e.id))}),(0,l.jsxs)(`div`,{className:`px-4 py-3`,children:[d===`params`&&a?.params&&a.params.length>0&&(0,l.jsx)(`div`,{className:`overflow-x-auto`,children:(0,l.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,l.jsx)(`thead`,{children:(0,l.jsxs)(`tr`,{className:`border-b border-border`,children:[(0,l.jsx)(`th`,{className:`text-left font-semibold text-muted-foreground py-1.5 pr-4`,children:`Name`}),(0,l.jsx)(`th`,{className:`text-left font-semibold text-muted-foreground py-1.5 pr-4`,children:`Type`}),(0,l.jsx)(`th`,{className:`text-left font-semibold text-muted-foreground py-1.5 pr-4`,children:`Required`}),(0,l.jsx)(`th`,{className:`text-left font-semibold text-muted-foreground py-1.5`,children:`Description`})]})}),(0,l.jsx)(`tbody`,{children:a.params.map((e,t)=>(0,l.jsxs)(`tr`,{className:`border-b border-border/30`,children:[(0,l.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium text-foreground`,children:e.name}),(0,l.jsx)(`td`,{className:`py-1.5 pr-4 font-mono text-muted-foreground`,children:e.type}),(0,l.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.required?(0,l.jsx)(`span`,{className:`text-red-600 dark:text-red-400 font-semibold`,children:`required`}):(0,l.jsx)(`span`,{className:`text-muted-foreground`,children:`optional`})}),(0,l.jsx)(`td`,{className:`py-1.5 text-muted-foreground`,children:e.description})]},t))})]})}),d===`body`&&a?.requestBody&&(0,l.jsx)(Xe,{code:a.requestBody,label:`Request Body`}),d===`responses`&&a?.responses&&(0,l.jsx)(`div`,{className:`space-y-3`,children:a.responses.map((e,t)=>(0,l.jsxs)(`div`,{children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,l.jsx)(Ye,{status:e.status}),(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]}),e.body&&(0,l.jsx)(Xe,{code:e.body,label:`Response ${e.status}`})]},t))})]}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}K.displayName=`WakaApiEndpointBlock`;function Ze(e){return[{type:W,method:e?.method||`GET`,route:e?.route||`/api/v1/resource/:id`,description:e?.description||`Retrieves a resource by its unique identifier.`,auth:e?.auth||`Bearer JWT`,permissions:e?.permissions||[`ROLE_USER`],rateLimit:e?.rateLimit||`100 req/min`,params:e?.params||[{name:`id`,type:`UUID`,required:!0,description:`Resource unique identifier`}],requestBody:e?.requestBody,responses:e?.responses||[{status:200,description:`Success`,body:`{
30
- "data": {
31
- "id": "uuid",
32
- "name": "Example",
33
- "createdAt": "2026-04-14T00:00:00Z"
34
- }
35
- }`},{status:404,description:`Resource not found`,body:`{
36
- "error": "NOT_FOUND",
37
- "message": "Resource not found"
38
- }`}],children:[{text:``}]}]}async function Qe(){try{let{createPlatePlugin:e}=await import(`platejs/react`);return e({key:W,node:{isElement:!0,isVoid:!0,type:W,component:K}})}catch{return console.warn(`[WakaApiEndpointBlock] platejs not installed`),null}}var q=`diagram`,$e={mermaid:{label:`Mermaid`,color:`text-pink-600 dark:text-pink-400 bg-pink-50 dark:bg-pink-500/10`,icon:`M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z`},plantuml:{label:`PlantUML`,color:`text-teal-600 dark:text-teal-400 bg-teal-50 dark:bg-teal-500/10`,icon:`M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6z`},excalidraw:{label:`Excalidraw`,color:`text-indigo-600 dark:text-indigo-400 bg-indigo-50 dark:bg-indigo-500/10`,icon:`M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z`}};function J({attributes:e,children:n,element:r,className:i,onRender:a}){let o=r,c=o?.syntax||`mermaid`,u=o?.source||``,d=$e[c],[f,p]=s.useState(!1),[m,h]=s.useState(null),[g,_]=s.useState(!a),v=s.useRef(null);return s.useEffect(()=>{if(!u||!a||g)return;let e=!1,t=setTimeout(async()=>{p(!0),h(null);try{let t=await a(u,c);if(!e&&v.current){v.current.textContent=``;let e=new DOMParser().parseFromString(t,`text/html`),n=document.createDocumentFragment();Array.from(e.body.childNodes).forEach(e=>{n.appendChild(document.importNode(e,!0))}),v.current.appendChild(n)}}catch(t){e||h(t instanceof Error?t.message:`Render failed`)}finally{e||p(!1)}},500);return()=>{e=!0,clearTimeout(t)}},[u,c,a,g]),(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden border border-border shadow-sm`,i),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2 bg-muted/30 border-b border-border`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`svg`,{className:t.t(`h-4 w-4`,d.color.split(` `)[0]),viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:d.icon})}),(0,l.jsx)(`span`,{className:t.t(`text-[10px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded`,d.color),children:d.label}),o?.caption&&(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground ml-2`,children:o.caption})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:()=>_(!0),className:t.t(`px-2 py-1 rounded text-[10px] font-medium transition-colors`,g?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),children:`Source`}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>_(!1),className:t.t(`px-2 py-1 rounded text-[10px] font-medium transition-colors`,g?`text-muted-foreground hover:text-foreground`:`bg-muted text-foreground`),children:`Preview`})]})]}),g&&(0,l.jsx)(`div`,{className:`border-b border-border`,children:(0,l.jsx)(`pre`,{className:t.t(`text-[12px] font-mono leading-relaxed p-4 overflow-x-auto`,`bg-gray-950 dark:bg-gray-900 text-gray-100`,`max-h-[300px] overflow-y-auto`),children:(0,l.jsx)(`code`,{children:u||`graph TD
39
- A[Start] --> B[Process]
40
- B --> C{Decision}
41
- C -->|Yes| D[Result A]
42
- C -->|No| E[Result B]`})})}),!g&&(0,l.jsx)(`div`,{className:`p-4 bg-white dark:bg-gray-950 min-h-[120px] flex items-center justify-center`,children:f?(0,l.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-muted-foreground`,children:[(0,l.jsxs)(`svg`,{className:`h-6 w-6 animate-spin`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,l.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,l.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),(0,l.jsx)(`span`,{className:`text-xs`,children:`Rendering diagram...`})]}):m?(0,l.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-destructive`,children:[(0,l.jsx)(`svg`,{className:`h-6 w-6`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z`})}),(0,l.jsx)(`span`,{className:`text-xs`,children:m})]}):a?(0,l.jsx)(`div`,{ref:v,className:`diagram-rendered w-full [&_svg]:max-w-full [&_svg]:h-auto`}):(0,l.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-muted-foreground`,children:[(0,l.jsx)(`svg`,{className:`h-8 w-8`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:d.icon})}),(0,l.jsx)(`span`,{className:`text-xs`,children:`Provide an onRender callback to see the diagram preview`}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>_(!0),className:`text-xs text-primary hover:underline`,children:`View source instead`})]})}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}J.displayName=`WakaDiagramBlock`;function et(e){return[{type:q,syntax:e?.syntax||`mermaid`,source:e?.source||`graph TD
43
- A[Start] --> B[Process]
44
- B --> C{Decision}
45
- C -->|Yes| D[Result A]
46
- C -->|No| E[Result B]`,caption:e?.caption,children:[{text:``}]}]}async function tt(e){try{let{createPlatePlugin:t}=await import(`platejs/react`);return t({key:q,node:{isElement:!0,isVoid:!0,type:q,component:t=>(0,l.jsx)(J,{...t,onRender:e})}})}catch{return console.warn(`[WakaDiagramBlock] platejs not installed`),null}}var Y=`ai_assist`;function nt({status:e}){let n={idle:{label:`Ready`,color:`bg-muted-foreground/30`,pulse:!1},loading:{label:`Thinking...`,color:`bg-amber-500`,pulse:!0},streaming:{label:`Writing...`,color:`bg-blue-500`,pulse:!0},complete:{label:`Complete`,color:`bg-emerald-500`,pulse:!1},error:{label:`Error`,color:`bg-destructive`,pulse:!1}}[e];return(0,l.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,l.jsx)(`div`,{className:t.t(`h-2 w-2 rounded-full`,n.color,n.pulse&&`animate-pulse`)}),(0,l.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground`,children:n.label})]})}function rt({attributes:e,children:n,element:r,className:i,onGenerate:a,onAccept:o,onDiscard:s}){let c=r,u=c?.status||`idle`,d=c?.prompt||``,f=c?.response||``;return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden`,`border border-border`,`bg-gradient-to-br from-violet-50/30 via-card to-blue-50/30`,`dark:from-violet-950/10 dark:via-card dark:to-blue-950/10`,`shadow-sm`,i),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2.5 border-b border-border/50`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(`svg`,{className:`h-4 w-4 text-violet-600 dark:text-violet-400`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{d:`M12 2L13.09 8.26L18 6L14.74 10.91L21 12L14.74 13.09L18 18L13.09 15.74L12 22L10.91 15.74L6 18L9.26 13.09L3 12L9.26 10.91L6 6L10.91 8.26L12 2Z`})}),(u===`loading`||u===`streaming`)&&(0,l.jsx)(`div`,{className:`absolute inset-0 animate-ping`,children:(0,l.jsx)(`svg`,{className:`h-4 w-4 text-violet-400/50`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,l.jsx)(`path`,{d:`M12 2L13.09 8.26L18 6L14.74 10.91L21 12L14.74 13.09L18 18L13.09 15.74L12 22L10.91 15.74L6 18L9.26 13.09L3 12L9.26 10.91L6 6L10.91 8.26L12 2Z`})})})]}),(0,l.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider text-violet-700 dark:text-violet-300`,children:`AI Assistant`}),c?.model&&(0,l.jsx)(`span`,{className:`text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded`,children:c.model})]}),(0,l.jsx)(nt,{status:u})]}),(0,l.jsx)(`div`,{className:`px-4 py-3 border-b border-border/30`,children:(0,l.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,l.jsx)(`div`,{className:`flex-shrink-0 mt-0.5 h-5 w-5 rounded-full bg-foreground/10 flex items-center justify-center`,children:(0,l.jsx)(`svg`,{className:`h-3 w-3 text-foreground/60`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})})}),(0,l.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,l.jsx)(`p`,{className:`text-sm text-foreground leading-relaxed`,children:d||(0,l.jsx)(`span`,{className:`text-muted-foreground italic`,children:`Ask the AI assistant a question...`})})})]})}),(f||u===`loading`||u===`streaming`)&&(0,l.jsx)(`div`,{className:`px-4 py-3`,children:(0,l.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,l.jsx)(`div`,{className:`flex-shrink-0 mt-0.5 h-5 w-5 rounded-full bg-violet-100 dark:bg-violet-500/20 flex items-center justify-center`,children:(0,l.jsx)(`svg`,{className:`h-3 w-3 text-violet-600 dark:text-violet-400`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,l.jsx)(`path`,{d:`M12 2L13.09 8.26L18 6L14.74 10.91L21 12L14.74 13.09L18 18L13.09 15.74L12 22L10.91 15.74L6 18L9.26 13.09L3 12L9.26 10.91L6 6L10.91 8.26L12 2Z`})})}),(0,l.jsx)(`div`,{className:`flex-1 min-w-0`,children:u===`loading`&&!f?(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsx)(`div`,{className:`h-3 w-3/4 bg-muted rounded animate-pulse`}),(0,l.jsx)(`div`,{className:`h-3 w-1/2 bg-muted rounded animate-pulse`}),(0,l.jsx)(`div`,{className:`h-3 w-5/6 bg-muted rounded animate-pulse`})]}):(0,l.jsxs)(`div`,{className:`text-sm text-foreground leading-relaxed whitespace-pre-wrap prose prose-sm dark:prose-invert max-w-none`,children:[f,u===`streaming`&&(0,l.jsx)(`span`,{className:`inline-block w-1.5 h-4 bg-violet-500 ml-0.5 animate-pulse rounded-sm`})]})})]})}),u===`error`&&c?.errorMessage&&(0,l.jsx)(`div`,{className:`mx-4 mb-3 px-3 py-2 rounded-md bg-destructive/10 border border-destructive/20`,children:(0,l.jsx)(`p`,{className:`text-xs text-destructive`,children:c.errorMessage})}),u===`complete`&&f&&(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2 border-t border-border/50 bg-muted/20`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] text-muted-foreground`,children:[c?.tokenCount&&(0,l.jsxs)(`span`,{children:[c.tokenCount,` tokens`]}),c?.generatedAt&&(0,l.jsx)(`span`,{children:new Date(c.generatedAt).toLocaleTimeString(`fr-FR`,{hour:`2-digit`,minute:`2-digit`})})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,l.jsx)(`button`,{type:`button`,onClick:s,className:`px-3 py-1 rounded text-xs font-medium text-muted-foreground hover:text-foreground hover:bg-muted transition-colors`,children:`Discard`}),o&&(0,l.jsx)(`button`,{type:`button`,onClick:()=>o(f),className:`px-3 py-1 rounded text-xs font-medium bg-primary text-primary-foreground hover:bg-primary/90 transition-colors shadow-sm`,children:`Insert into document`})]})]}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}rt.displayName=`WakaAiAssistBlock`;function it(e){return[{type:Y,prompt:e?.prompt||``,response:``,status:`idle`,model:e?.model||`claude-sonnet-4-20250514`,children:[{text:``}]}]}async function at(e,t){try{let{createPlatePlugin:n}=await import(`platejs/react`);return n({key:Y,node:{isElement:!0,isVoid:!0,type:Y,component:n=>(0,l.jsx)(rt,{...n,onGenerate:e,onAccept:t})}})}catch{return console.warn(`[WakaAiAssistBlock] platejs not installed`),null}}var X=`version_diff`;function ot({attributes:e,children:n,element:r,className:i}){let a=r,[o,c]=s.useState(`unified`),[u,d]=s.useState(!0),f=a?.hunks||[],p=a?.stats||{additions:0,deletions:0,modifications:0},m=a?.oldVersionLabel||`Previous`,h=a?.newVersionLabel||`Current`;return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden border border-border shadow-sm`,i),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2.5 bg-muted/30 border-b border-border`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsx)(`svg`,{className:`h-4 w-4 text-orange-600 dark:text-orange-400`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 3v6m0 0l-3 3m3-3l3 3M6 21h12a2 2 0 002-2V7l-5-5H6a2 2 0 00-2 2v15a2 2 0 002 2z`})}),(0,l.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider text-foreground`,children:`Version Diff`}),(0,l.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px]`,children:[(0,l.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-red-100 dark:bg-red-500/10 text-red-700 dark:text-red-400 font-mono font-medium`,children:m}),(0,l.jsx)(`svg`,{className:`h-3 w-3 text-muted-foreground`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14 5l7 7m0 0l-7 7m7-7H3`})}),(0,l.jsx)(`span`,{className:`px-1.5 py-0.5 rounded bg-emerald-100 dark:bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 font-mono font-medium`,children:h})]})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-mono`,children:[p.additions>0&&(0,l.jsxs)(`span`,{className:`text-emerald-600 dark:text-emerald-400 font-semibold`,children:[`+`,p.additions]}),p.deletions>0&&(0,l.jsxs)(`span`,{className:`text-red-600 dark:text-red-400 font-semibold`,children:[`-`,p.deletions]}),p.modifications>0&&(0,l.jsxs)(`span`,{className:`text-amber-600 dark:text-amber-400 font-semibold`,children:[`~`,p.modifications]})]}),(0,l.jsx)(`div`,{className:`flex items-center border border-border rounded overflow-hidden`,children:[`unified`,`split`,`summary`].map(e=>(0,l.jsx)(`button`,{type:`button`,onClick:()=>c(e),className:t.t(`px-2 py-1 text-[10px] font-medium transition-colors`,o===e?`bg-foreground/10 text-foreground`:`text-muted-foreground hover:text-foreground`),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>d(!u),className:`text-muted-foreground hover:text-foreground transition-colors`,children:(0,l.jsx)(`svg`,{className:t.t(`h-4 w-4 transition-transform`,!u&&`-rotate-90`),viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 9l-7 7-7-7`})})})]})]}),(a?.author||a?.timestamp)&&(0,l.jsxs)(`div`,{className:`px-4 py-1.5 border-b border-border/50 bg-muted/10 flex items-center gap-3 text-[10px] text-muted-foreground`,children:[a.author&&(0,l.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z`})}),(0,l.jsx)(`span`,{className:`font-medium`,children:a.author})]}),a.timestamp&&(0,l.jsx)(`span`,{children:new Date(a.timestamp).toLocaleString(`fr-FR`)})]}),u&&(0,l.jsx)(`div`,{className:`overflow-x-auto`,children:o===`summary`?(0,l.jsxs)(`div`,{className:`p-4 space-y-3`,children:[(0,l.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,l.jsxs)(`div`,{className:`rounded-lg bg-emerald-50 dark:bg-emerald-500/5 border border-emerald-200 dark:border-emerald-500/20 p-3 text-center`,children:[(0,l.jsx)(`div`,{className:`text-2xl font-bold text-emerald-600 dark:text-emerald-400`,children:p.additions}),(0,l.jsx)(`div`,{className:`text-[10px] font-medium text-emerald-700/70 dark:text-emerald-400/70 uppercase tracking-wider`,children:`Additions`})]}),(0,l.jsxs)(`div`,{className:`rounded-lg bg-red-50 dark:bg-red-500/5 border border-red-200 dark:border-red-500/20 p-3 text-center`,children:[(0,l.jsx)(`div`,{className:`text-2xl font-bold text-red-600 dark:text-red-400`,children:p.deletions}),(0,l.jsx)(`div`,{className:`text-[10px] font-medium text-red-700/70 dark:text-red-400/70 uppercase tracking-wider`,children:`Deletions`})]}),(0,l.jsxs)(`div`,{className:`rounded-lg bg-amber-50 dark:bg-amber-500/5 border border-amber-200 dark:border-amber-500/20 p-3 text-center`,children:[(0,l.jsx)(`div`,{className:`text-2xl font-bold text-amber-600 dark:text-amber-400`,children:p.modifications}),(0,l.jsx)(`div`,{className:`text-[10px] font-medium text-amber-700/70 dark:text-amber-400/70 uppercase tracking-wider`,children:`Modified`})]})]}),(0,l.jsxs)(`div`,{className:`h-2 rounded-full bg-muted overflow-hidden flex`,children:[p.additions>0&&(0,l.jsx)(`div`,{className:`bg-emerald-500 h-full`,style:{width:`${p.additions/(p.additions+p.deletions+p.modifications)*100}%`}}),p.modifications>0&&(0,l.jsx)(`div`,{className:`bg-amber-500 h-full`,style:{width:`${p.modifications/(p.additions+p.deletions+p.modifications)*100}%`}}),p.deletions>0&&(0,l.jsx)(`div`,{className:`bg-red-500 h-full`,style:{width:`${p.deletions/(p.additions+p.deletions+p.modifications)*100}%`}})]})]}):o===`split`?(0,l.jsxs)(`div`,{className:`grid grid-cols-2 divide-x divide-border`,children:[(0,l.jsxs)(`div`,{className:`p-0`,children:[(0,l.jsx)(`div`,{className:`px-3 py-1.5 border-b border-border/50 bg-red-50/50 dark:bg-red-950/10`,children:(0,l.jsx)(`span`,{className:`text-[10px] font-semibold text-red-700 dark:text-red-400 uppercase tracking-wider`,children:m})}),(0,l.jsx)(`div`,{className:`font-mono text-[12px] leading-relaxed`,children:f.map((e,n)=>(0,l.jsx)(s.Fragment,{children:e.lines.filter(e=>e.type!==`added`).map((e,r)=>(0,l.jsxs)(`div`,{className:t.t(`px-3 py-0.5 flex`,e.type===`removed`&&`bg-red-100/60 dark:bg-red-500/10`,e.type===`modified`&&`bg-amber-100/60 dark:bg-amber-500/10`),children:[(0,l.jsx)(`span`,{className:`w-8 text-right pr-2 text-muted-foreground/50 select-none shrink-0`,children:e.oldLineNumber}),(0,l.jsxs)(`span`,{className:t.t(e.type===`removed`&&`text-red-800 dark:text-red-300`,e.type===`modified`&&`text-amber-800 dark:text-amber-300`),children:[e.type===`removed`&&(0,l.jsx)(`span`,{className:`text-red-500 mr-1`,children:`-`}),e.content]})]},`${n}-${r}`))},n))})]}),(0,l.jsxs)(`div`,{className:`p-0`,children:[(0,l.jsx)(`div`,{className:`px-3 py-1.5 border-b border-border/50 bg-emerald-50/50 dark:bg-emerald-950/10`,children:(0,l.jsx)(`span`,{className:`text-[10px] font-semibold text-emerald-700 dark:text-emerald-400 uppercase tracking-wider`,children:h})}),(0,l.jsx)(`div`,{className:`font-mono text-[12px] leading-relaxed`,children:f.map((e,n)=>(0,l.jsx)(s.Fragment,{children:e.lines.filter(e=>e.type!==`removed`).map((e,r)=>(0,l.jsxs)(`div`,{className:t.t(`px-3 py-0.5 flex`,e.type===`added`&&`bg-emerald-100/60 dark:bg-emerald-500/10`,e.type===`modified`&&`bg-amber-100/60 dark:bg-amber-500/10`),children:[(0,l.jsx)(`span`,{className:`w-8 text-right pr-2 text-muted-foreground/50 select-none shrink-0`,children:e.newLineNumber}),(0,l.jsxs)(`span`,{className:t.t(e.type===`added`&&`text-emerald-800 dark:text-emerald-300`,e.type===`modified`&&`text-amber-800 dark:text-amber-300`),children:[e.type===`added`&&(0,l.jsx)(`span`,{className:`text-emerald-500 mr-1`,children:`+`}),e.content]})]},`${n}-${r}`))},n))})]})]}):(0,l.jsxs)(`div`,{className:`font-mono text-[12px] leading-relaxed`,children:[f.map((e,n)=>(0,l.jsxs)(s.Fragment,{children:[(0,l.jsxs)(`div`,{className:`px-3 py-1 bg-blue-50/50 dark:bg-blue-950/10 text-blue-600 dark:text-blue-400 text-[10px]`,children:[`@@ -`,e.oldStart,` +`,e.newStart,` @@`]}),e.lines.map((e,r)=>(0,l.jsxs)(`div`,{className:t.t(`px-3 py-0.5 flex`,e.type===`added`&&`bg-emerald-100/60 dark:bg-emerald-500/10`,e.type===`removed`&&`bg-red-100/60 dark:bg-red-500/10`,e.type===`modified`&&`bg-amber-100/60 dark:bg-amber-500/10`),children:[(0,l.jsx)(`span`,{className:`w-8 text-right pr-2 text-muted-foreground/50 select-none shrink-0`,children:e.oldLineNumber||``}),(0,l.jsx)(`span`,{className:`w-8 text-right pr-2 text-muted-foreground/50 select-none shrink-0`,children:e.newLineNumber||``}),(0,l.jsx)(`span`,{className:`w-4 shrink-0 text-center select-none`,children:e.type===`added`?(0,l.jsx)(`span`,{className:`text-emerald-500`,children:`+`}):e.type===`removed`?(0,l.jsx)(`span`,{className:`text-red-500`,children:`-`}):e.type===`modified`?(0,l.jsx)(`span`,{className:`text-amber-500`,children:`~`}):(0,l.jsx)(`span`,{className:`text-muted-foreground/30`,children:` `})}),(0,l.jsx)(`span`,{className:t.t(e.type===`added`&&`text-emerald-800 dark:text-emerald-300`,e.type===`removed`&&`text-red-800 dark:text-red-300 line-through`,e.type===`modified`&&`text-amber-800 dark:text-amber-300`),children:e.content})]},`${n}-${r}`))]},n)),f.length===0&&(0,l.jsx)(`div`,{className:`py-8 text-center text-sm text-muted-foreground italic`,children:`No differences found.`})]})}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}ot.displayName=`WakaVersionDiffBlock`;function st(e){return[{type:X,oldVersionLabel:e?.oldVersionLabel||`v1.0`,newVersionLabel:e?.newVersionLabel||`v1.1`,oldText:e?.oldText||``,newText:e?.newText||``,hunks:e?.hunks||[{oldStart:1,newStart:1,lines:[{content:`The system SHALL authenticate users via OAuth2.`,type:`unchanged`,oldLineNumber:1,newLineNumber:1},{content:`Rate limiting: 50 req/min per user.`,type:`removed`,oldLineNumber:2},{content:`Rate limiting: 100 req/min per user.`,type:`added`,newLineNumber:2},{content:`All API responses use JSON format.`,type:`unchanged`,oldLineNumber:3,newLineNumber:3},{content:`Added: Support for WebSocket real-time events.`,type:`added`,newLineNumber:4}]}],stats:e?.stats||{additions:2,deletions:1,modifications:0},author:e?.author,timestamp:e?.timestamp,children:[{text:``}]}]}async function ct(){try{let{createPlatePlugin:e}=await import(`platejs/react`);return e({key:X,node:{isElement:!0,isVoid:!0,type:X,component:ot}})}catch{return console.warn(`[WakaVersionDiffBlock] platejs not installed`),null}}var Z=`embed`,lt={figma:{label:`Figma`,icon:`M12 2a4 4 0 00-4 4v4a4 4 0 004-4V2zm0 12a4 4 0 01-4 4v2h4v-6zm8-4a4 4 0 01-4 4H12v-8h4a4 4 0 014 4z`,color:`text-purple-600 dark:text-purple-400`,bgColor:`bg-purple-50 dark:bg-purple-500/10`,transform:e=>e.includes(`figma.com`)?`https://www.figma.com/embed?embed_host=wakastart&url=${encodeURIComponent(e)}`:null,defaultAspect:`16/9`,domain:`figma.com`},youtube:{label:`YouTube`,icon:`M19.615 3.184c-3.604-.246-11.631-.245-15.23 0C.488 3.45.029 5.804 0 12c.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0C23.512 20.55 23.971 18.196 24 12c-.029-6.185-.484-8.549-4.385-8.816zM9 16V8l8 4-8 4z`,color:`text-red-600 dark:text-red-400`,bgColor:`bg-red-50 dark:bg-red-500/10`,transform:e=>{let t=e.match(/(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]+)/);return t?`https://www.youtube.com/embed/${t[1]}`:null},defaultAspect:`16/9`,domain:`youtube.com`},vimeo:{label:`Vimeo`,icon:`M22.875 10.063c-.098 2.141-1.592 5.075-4.483 8.8-2.988 3.891-5.517 5.836-7.588 5.836-1.282 0-2.367-1.184-3.258-3.553L6.14 15.15c-.589-2.369-1.221-3.553-1.896-3.553-.147 0-.663.31-1.546.928l-.925-1.19c.973-.855 1.932-1.71 2.877-2.565 1.297-1.12 2.27-1.71 2.921-1.77 1.534-.147 2.479.903 2.834 3.148.384 2.422.65 3.928.801 4.519.445 2.022.934 3.033 1.468 3.033.414 0 1.037-.656 1.868-1.967.831-1.311 1.276-2.31 1.336-2.998.119-1.14-.328-1.71-1.342-1.71-.478 0-.97.109-1.477.327.981-3.212 2.855-4.773 5.625-4.684 2.054.059 3.024 1.394 2.908 4.003z`,color:`text-sky-600 dark:text-sky-400`,bgColor:`bg-sky-50 dark:bg-sky-500/10`,transform:e=>{let t=e.match(/vimeo\.com\/(\d+)/);return t?`https://player.vimeo.com/video/${t[1]}`:null},defaultAspect:`16/9`,domain:`vimeo.com`},codesandbox:{label:`CodeSandbox`,icon:`M2 6l10-4 10 4v12l-10 4L2 18V6zm10 2L4 4v8l8 4V8zm8-4l-8 4v8l8-4V4z`,color:`text-gray-700 dark:text-gray-300`,bgColor:`bg-gray-50 dark:bg-gray-500/10`,transform:e=>{let t=e.match(/codesandbox\.io\/(?:s|p)\/([a-zA-Z0-9-]+)/);return t?`https://codesandbox.io/embed/${t[1]}?fontsize=14&hidenavigation=1&theme=dark`:null},defaultAspect:`16/9`,domain:`codesandbox.io`},codepen:{label:`CodePen`,icon:`M12 2L2 8.5v7L12 22l10-6.5v-7L12 2zm0 3.311L18.26 9 12 12.689 5.74 9 12 5.311zM4 10.289l6 3.9v5.522l-6-3.9v-5.522zm8 9.422v-5.522l6-3.9v5.522l-6 3.9z`,color:`text-gray-700 dark:text-gray-300`,bgColor:`bg-gray-50 dark:bg-gray-500/10`,transform:e=>{let t=e.match(/codepen\.io\/([^/]+)\/pen\/([a-zA-Z0-9]+)/);return t?`https://codepen.io/${t[1]}/embed/${t[2]}?default-tab=result&theme-id=dark`:null},defaultAspect:`16/9`,domain:`codepen.io`},stackblitz:{label:`StackBlitz`,icon:`M13 10V3L4 14h7v7l9-11h-7z`,color:`text-blue-600 dark:text-blue-400`,bgColor:`bg-blue-50 dark:bg-blue-500/10`,transform:e=>e.includes(`stackblitz.com`)?e.replace(`stackblitz.com/edit`,`stackblitz.com/embed`):null,defaultAspect:`16/9`,domain:`stackblitz.com`},loom:{label:`Loom`,icon:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z`,color:`text-purple-600 dark:text-purple-400`,bgColor:`bg-purple-50 dark:bg-purple-500/10`,transform:e=>{let t=e.match(/loom\.com\/share\/([a-zA-Z0-9]+)/);return t?`https://www.loom.com/embed/${t[1]}`:null},defaultAspect:`16/9`,domain:`loom.com`},miro:{label:`Miro`,icon:`M4 3h16a1 1 0 011 1v16a1 1 0 01-1 1H4a1 1 0 01-1-1V4a1 1 0 011-1z`,color:`text-yellow-600 dark:text-yellow-400`,bgColor:`bg-yellow-50 dark:bg-yellow-500/10`,transform:e=>{let t=e.match(/miro\.com\/app\/board\/([^/?]+)/);return t?`https://miro.com/app/live-embed/${t[1]}/`:null},defaultAspect:`16/9`,domain:`miro.com`},notion:{label:`Notion`,icon:`M4 4a2 2 0 012-2h12a2 2 0 012 2v16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm4 2v4h8V6H8zm0 6v2h8v-2H8zm0 4v2h5v-2H8z`,color:`text-gray-800 dark:text-gray-200`,bgColor:`bg-gray-50 dark:bg-gray-500/10`,transform:()=>null,defaultAspect:`16/9`,domain:`notion.so`},"github-gist":{label:`GitHub Gist`,icon:`M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.009-.866-.013-1.7-2.782.604-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0112 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.578.688.48C19.138 20.161 22 16.416 22 12c0-5.523-4.477-10-10-10z`,color:`text-gray-800 dark:text-gray-200`,bgColor:`bg-gray-50 dark:bg-gray-500/10`,transform:()=>null,defaultAspect:`4/3`,domain:`gist.github.com`},generic:{label:`Embed`,icon:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`,color:`text-muted-foreground`,bgColor:`bg-muted`,transform:()=>null,defaultAspect:`16/9`,domain:``}};function ut(e){let t=e.toLowerCase();return t.includes(`figma.com`)?`figma`:t.includes(`youtube.com`)||t.includes(`youtu.be`)?`youtube`:t.includes(`vimeo.com`)?`vimeo`:t.includes(`codesandbox.io`)?`codesandbox`:t.includes(`codepen.io`)?`codepen`:t.includes(`stackblitz.com`)?`stackblitz`:t.includes(`loom.com`)?`loom`:t.includes(`miro.com`)?`miro`:t.includes(`notion.so`)?`notion`:t.includes(`gist.github.com`)?`github-gist`:`generic`}function dt(e,t){return lt[t].transform(e)||e}function ft({attributes:e,children:r,element:i,className:a}){let o=i,c=lt[o?.provider||`generic`],u=o?.embedUrl||``,d=o?.aspectRatio||c.defaultAspect,f=s.useMemo(()=>u?n.o(u):``,[u]),[p,m]=s.useState(!1),[h,g]=s.useState(!1);return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden border border-border shadow-sm`,a),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-muted/30 border-b border-border`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`svg`,{className:t.t(`h-4 w-4`,c.color),viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{d:c.icon})}),(0,l.jsx)(`span`,{className:t.t(`text-[10px] font-bold uppercase tracking-wider`,c.color),children:c.label}),o?.title&&(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground ml-1 truncate max-w-[300px]`,children:o.title})]}),o?.url&&(0,l.jsxs)(`a`,{href:n.o(o.url),target:`_blank`,rel:`noopener noreferrer`,className:`text-[10px] text-primary hover:underline flex items-center gap-1`,children:[`Open`,(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14`})})]})]}),(0,l.jsxs)(`div`,{className:`relative bg-muted/10`,style:{aspectRatio:d,maxHeight:o?.maxHeight?`${o.maxHeight}px`:void 0},children:[!p&&!h&&f&&(0,l.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center bg-muted/20`,children:(0,l.jsxs)(`svg`,{className:`h-8 w-8 animate-spin text-muted-foreground/30`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,l.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,l.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]})}),h&&(0,l.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center bg-muted/10 text-muted-foreground`,children:[(0,l.jsx)(`svg`,{className:`h-8 w-8 mb-2`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z`})}),(0,l.jsx)(`span`,{className:`text-xs`,children:`Failed to load embed`})]}),!f&&(0,l.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-muted-foreground`,children:[(0,l.jsx)(`svg`,{className:`h-10 w-10 mb-3 text-muted-foreground/30`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1`})}),(0,l.jsx)(`span`,{className:`text-sm`,children:`Paste a URL to embed content`}),(0,l.jsx)(`span`,{className:`text-[10px] mt-1 text-muted-foreground/60`,children:`Supports Figma, YouTube, CodeSandbox, Loom, and more`})]}),f&&(0,l.jsx)(`iframe`,{src:f,title:o?.title||`${c.label} embed`,className:t.t(`w-full h-full border-0`,!p&&`opacity-0`),loading:`lazy`,allowFullScreen:!0,sandbox:`allow-scripts allow-same-origin allow-popups allow-forms`,onLoad:()=>m(!0),onError:()=>g(!0)})]}),(0,l.jsx)(`div`,{className:`hidden`,children:r})]})}ft.displayName=`WakaEmbedBlock`;function pt(e,t){let n=ut(e);return[{type:Z,url:e,provider:n,embedUrl:dt(e,n),title:t?.title,aspectRatio:t?.aspectRatio,maxHeight:t?.maxHeight,children:[{text:``}]}]}async function mt(){try{let{createPlatePlugin:e}=await import(`platejs/react`);return e({key:Z,node:{isElement:!0,isVoid:!0,type:Z,component:ft}})}catch{return console.warn(`[WakaEmbedBlock] platejs not installed`),null}}var Q=`code_playground`,ht={javascript:{label:`JavaScript`,color:`text-yellow-500`,extension:`.js`},typescript:{label:`TypeScript`,color:`text-blue-500`,extension:`.ts`},python:{label:`Python`,color:`text-green-500`,extension:`.py`},html:{label:`HTML`,color:`text-orange-500`,extension:`.html`},css:{label:`CSS`,color:`text-pink-500`,extension:`.css`},json:{label:`JSON`,color:`text-gray-400`,extension:`.json`},sql:{label:`SQL`,color:`text-cyan-500`,extension:`.sql`},bash:{label:`Bash`,color:`text-emerald-500`,extension:`.sh`},go:{label:`Go`,color:`text-cyan-600`,extension:`.go`},rust:{label:`Rust`,color:`text-orange-600`,extension:`.rs`}};function gt(e){return e.split(`
47
- `).map((e,t)=>(0,l.jsxs)(`div`,{className:`table-row`,children:[(0,l.jsx)(`span`,{className:`table-cell w-8 text-right pr-3 text-muted-foreground/40 select-none text-[11px]`,children:t+1}),(0,l.jsx)(`span`,{className:`table-cell`,children:e||` `})]},t))}function _t({attributes:e,children:n,element:r,className:i,onExecute:a}){let o=r,c=o?.code||``,u=o?.language||`javascript`,d=ht[u],f=o?.output||``,p=o?.errorOutput||``,m=o?.executionStatus||`idle`,h=o?.title||`main${d.extension}`,[g,_]=s.useState(!!f||!!p),[v,y]=s.useState(m),b=s.useCallback(async()=>{if(a){y(`running`),_(!0);try{await a(c,u),y(`success`)}catch{y(`error`)}}},[c,u,a]),x=v===m?m:v;return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-4 rounded-lg overflow-hidden border border-gray-800 dark:border-gray-700 shadow-lg`,i),children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 bg-gray-900 dark:bg-gray-800 border-b border-gray-800 dark:border-gray-700`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-1.5`,"aria-hidden":`true`,children:[(0,l.jsx)(`div`,{className:`h-3 w-3 rounded-full bg-red-500/80`}),(0,l.jsx)(`div`,{className:`h-3 w-3 rounded-full bg-yellow-500/80`}),(0,l.jsx)(`div`,{className:`h-3 w-3 rounded-full bg-green-500/80`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2 py-0.5 rounded bg-gray-800 dark:bg-gray-700`,children:[(0,l.jsx)(`span`,{className:t.t(`text-[10px] font-bold`,d.color),children:d.label}),(0,l.jsx)(`span`,{className:`text-xs font-mono text-gray-300`,children:h})]})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x!==`idle`&&(0,l.jsxs)(`div`,{className:`flex items-center gap-1`,children:[x===`running`&&(0,l.jsxs)(`svg`,{className:`h-3 w-3 animate-spin text-amber-400`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,l.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,l.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),x===`success`&&(0,l.jsx)(`svg`,{className:`h-3 w-3 text-emerald-400`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5 13l4 4L19 7`})}),x===`error`&&(0,l.jsx)(`svg`,{className:`h-3 w-3 text-red-400`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 18L18 6M6 6l12 12`})})]}),a&&(0,l.jsxs)(`button`,{type:`button`,onClick:b,disabled:x===`running`||!c.trim(),className:t.t(`flex items-center gap-1 px-2.5 py-1 rounded text-[10px] font-semibold transition-all`,x===`running`?`bg-amber-500/20 text-amber-300 cursor-wait`:`bg-emerald-500/20 text-emerald-300 hover:bg-emerald-500/30`,!c.trim()&&`opacity-40 cursor-not-allowed`),"aria-label":`Run code`,children:[(0,l.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,l.jsx)(`path`,{d:`M8 5v14l11-7z`})}),x===`running`?`Running...`:`Run`]}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>_(!g),className:t.t(`px-2 py-1 rounded text-[10px] font-medium transition-colors`,g?`bg-gray-700 text-gray-200`:`text-gray-400 hover:text-gray-200`),children:`Console`})]})]}),(0,l.jsx)(`div`,{className:`bg-gray-950 dark:bg-[#0d1117] overflow-x-auto`,children:(0,l.jsx)(`pre`,{className:`p-4 text-[12px] font-mono leading-relaxed text-gray-100 min-h-[80px]`,children:(0,l.jsx)(`code`,{className:`table w-full`,children:gt(c)})})}),g&&(f||p||x===`running`)&&(0,l.jsxs)(`div`,{className:`border-t border-gray-800 dark:border-gray-700`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1 bg-gray-900 dark:bg-gray-800`,children:[(0,l.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-gray-400`,children:`Output`}),(f||p)&&(0,l.jsx)(`button`,{type:`button`,className:`text-[10px] text-gray-500 hover:text-gray-300 transition-colors`,"aria-label":`Clear output`,children:`Clear`})]}),(0,l.jsx)(`div`,{className:`bg-gray-950 dark:bg-[#0d1117] p-3 max-h-[200px] overflow-y-auto`,children:x===`running`?(0,l.jsxs)(`div`,{className:`flex items-center gap-2 text-amber-400 text-xs font-mono`,children:[(0,l.jsxs)(`svg`,{className:`h-3 w-3 animate-spin`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,l.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,l.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Executing...`]}):p?(0,l.jsx)(`pre`,{className:`text-[12px] font-mono text-red-400 whitespace-pre-wrap`,children:p}):f?(0,l.jsx)(`pre`,{className:`text-[12px] font-mono text-gray-200 whitespace-pre-wrap`,children:f}):null})]}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}_t.displayName=`WakaCodePlaygroundBlock`;function vt(e){return[{type:Q,code:e?.code||`// Write your code here
48
- console.log("Hello, WakaStart!");`,language:e?.language||`javascript`,title:e?.title,output:``,errorOutput:``,executionStatus:`idle`,showLineNumbers:!0,readOnly:!1,children:[{text:``}]}]}async function yt(e){try{let{createPlatePlugin:t}=await import(`platejs/react`);return t({key:Q,node:{isElement:!0,isVoid:!0,type:Q,component:t=>(0,l.jsx)(_t,{...t,onExecute:e})}})}catch{return console.warn(`[WakaCodePlaygroundBlock] platejs not installed`),null}}var $=`comment_thread`;function bt(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);if(a<30)return`${a}d ago`;let o=Math.floor(a/30);return o<12?`${o}mo ago`:`${Math.floor(o/12)}y ago`}function xt({author:e,size:n=`sm`}){let r=n===`sm`?`h-6 w-6 text-[9px]`:`h-8 w-8 text-[10px]`;return e.avatar?(0,l.jsx)(`img`,{src:e.avatar,alt:e.name,className:t.t(`rounded-full object-cover flex-shrink-0`,r)}):(0,l.jsx)(`div`,{className:t.t(`rounded-full flex items-center justify-center text-white font-semibold flex-shrink-0`,r,[`bg-blue-500`,`bg-emerald-500`,`bg-violet-500`,`bg-amber-500`,`bg-rose-500`,`bg-cyan-500`][e.name.split(``).reduce((e,t)=>e+t.charCodeAt(0),0)%6]),children:e.name.charAt(0).toUpperCase()})}function St({comment:e,isCurrentUser:n,isFirst:r}){return(0,l.jsxs)(`div`,{className:t.t(`flex gap-2.5 px-3 py-2`,!r&&`border-t border-border/30`),children:[(0,l.jsx)(xt,{author:e.author}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:t.t(`text-xs font-semibold`,n?`text-primary`:`text-foreground`),children:e.author.name}),(0,l.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:bt(e.createdAt)}),e.edited&&(0,l.jsx)(`span`,{className:`text-[9px] text-muted-foreground/60 italic`,children:`(edited)`})]}),(0,l.jsx)(`p`,{className:`text-xs text-foreground/80 mt-0.5 leading-relaxed whitespace-pre-wrap`,children:e.content}),e.reactions&&e.reactions.length>0&&(0,l.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:e.reactions.map((e,n)=>(0,l.jsxs)(`button`,{type:`button`,className:t.t(`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-[10px] border transition-colors`,e.reacted?`bg-primary/10 border-primary/30 text-primary`:`bg-muted/50 border-border/50 text-muted-foreground hover:bg-muted`),children:[(0,l.jsx)(`span`,{children:e.emoji}),(0,l.jsx)(`span`,{className:`font-medium`,children:e.count})]},n))})]})]})}function Ct({attributes:e,children:n,element:r,className:i,currentUserId:a,onReply:o,onResolve:c,onReopen:u}){let d=r,f=d?.threadId||``,p=d?.quotedText||``,m=d?.status||`open`,h=d?.comments||[],g=d?.totalComments??h.length,[_,v]=s.useState(``),[y,b]=s.useState(m===`resolved`),x={open:{label:`Open`,color:`text-blue-600 dark:text-blue-400`,bg:`bg-blue-50 dark:bg-blue-500/10`},resolved:{label:`Resolved`,color:`text-emerald-600 dark:text-emerald-400`,bg:`bg-emerald-50 dark:bg-emerald-500/10`},archived:{label:`Archived`,color:`text-muted-foreground`,bg:`bg-muted`}},S=()=>{!_.trim()||!o||(o(f,_.trim()),v(``))};return(0,l.jsxs)(`div`,{...e,contentEditable:!1,className:t.t(`my-3 rounded-lg overflow-hidden border shadow-sm transition-all duration-200`,m===`resolved`?`border-emerald-200 dark:border-emerald-800/30`:`border-primary/20`,i),children:[(0,l.jsxs)(`div`,{className:t.t(`flex items-center justify-between px-3 py-2 cursor-pointer`,m===`resolved`?`bg-emerald-50/50 dark:bg-emerald-950/10`:`bg-primary/5`),onClick:()=>b(!y),role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&b(!y)},"aria-expanded":!y,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`svg`,{className:t.t(`h-4 w-4`,m===`resolved`?`text-emerald-500`:`text-primary`),viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,"aria-hidden":`true`,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z`})}),(0,l.jsx)(`span`,{className:t.t(`text-[10px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded`,x[m].bg,x[m].color),children:x[m].label}),(0,l.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[g,` comment`,g===1?``:`s`]})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m===`open`&&c&&(0,l.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),c(f)},className:`text-[10px] font-medium text-emerald-600 hover:text-emerald-700 dark:text-emerald-400 transition-colors`,children:`Resolve`}),m===`resolved`&&u&&(0,l.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),u(f)},className:`text-[10px] font-medium text-primary hover:text-primary/80 transition-colors`,children:`Reopen`}),(0,l.jsx)(`svg`,{className:t.t(`h-3.5 w-3.5 text-muted-foreground transition-transform`,y&&`-rotate-90`),viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 9l-7 7-7-7`})})]})]}),!y&&(0,l.jsxs)(l.Fragment,{children:[p&&(0,l.jsx)(`div`,{className:`mx-3 mt-3 mb-1 px-3 py-2 rounded bg-muted/50 border-l-2 border-primary/30`,children:(0,l.jsxs)(`p`,{className:`text-xs text-muted-foreground italic leading-relaxed line-clamp-3`,children:[`"`,p,`"`]})}),(0,l.jsx)(`div`,{className:`py-1`,children:h.map((e,t)=>(0,l.jsx)(St,{comment:e,isCurrentUser:e.author.id===a,isFirst:t===0},e.id))}),m===`open`&&o&&(0,l.jsx)(`div`,{className:`px-3 pb-3 pt-1 border-t border-border/30`,children:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[(0,l.jsx)(`input`,{type:`text`,value:_,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),S())},placeholder:`Reply...`,className:t.t(`flex-1 px-3 py-1.5 rounded-md text-xs bg-muted/50 border border-border/50`,`focus:outline-none focus:ring-1 focus:ring-ring`,`placeholder:text-muted-foreground/50`)}),(0,l.jsx)(`button`,{type:`button`,onClick:S,disabled:!_.trim(),className:t.t(`px-3 py-1.5 rounded-md text-xs font-medium transition-colors`,`bg-primary text-primary-foreground hover:bg-primary/90`,`disabled:opacity-40 disabled:cursor-not-allowed`),children:`Reply`})]})})]}),(0,l.jsx)(`div`,{className:`hidden`,children:n})]})}Ct.displayName=`WakaCommentThreadBlock`;function wt(e){let t=new Date().toISOString();return[{type:$,threadId:e?.threadId||`thread-${Date.now()}`,quotedText:e?.quotedText||``,status:`open`,comments:e?.initialComment?[{id:`comment-${Date.now()}`,author:{id:e.initialComment.authorId,name:e.initialComment.authorName},content:e.initialComment.content,createdAt:t}]:[],children:[{text:``}]}]}async function Tt(e,t,n){try{let{createPlatePlugin:r}=await import(`platejs/react`);return r({key:$,node:{isElement:!0,isVoid:!0,type:$,component:r=>(0,l.jsx)(Ct,{...r,currentUserId:e,onReply:t,onResolve:n})}})}catch{return console.warn(`[WakaCommentThreadBlock] platejs not installed`),null}}var Et=[{key:`user-story`,label:`User Story`,description:`Structured user story (As a / I want / So that)`,icon:c.Users,group:`WakaStart Blocks`,keywords:[`user`,`story`,`agile`,`requirement`,`persona`],isCustom:!0,action:e=>{e.insertNodes(Ue())}},{key:`acceptance-criteria`,label:`Acceptance Criteria`,description:`Gherkin-format criteria (Given / When / Then)`,icon:c.CheckCircle2,group:`WakaStart Blocks`,keywords:[`acceptance`,`criteria`,`gherkin`,`given`,`when`,`then`,`test`],isCustom:!0,action:e=>{e.insertNodes(Ke())}},{key:`api-endpoint`,label:`API Endpoint`,description:`REST API documentation (method, route, body, response)`,icon:c.Zap,group:`WakaStart Blocks`,keywords:[`api`,`endpoint`,`rest`,`route`,`get`,`post`,`put`,`delete`],isCustom:!0,action:e=>{e.insertNodes(Ze())}},{key:`diagram`,label:`Diagram`,description:`Mermaid / PlantUML diagram with live preview`,icon:c.GitBranch,group:`WakaStart Blocks`,keywords:[`diagram`,`mermaid`,`plantuml`,`flowchart`,`sequence`,`graph`],isCustom:!0,action:e=>{e.insertNodes(et())}},{key:`ai-assist`,label:`AI Assistant`,description:`Ask the AI to generate content for your document`,icon:c.Sparkles,group:`WakaStart Blocks`,keywords:[`ai`,`ia`,`assistant`,`generate`,`write`,`help`,`claude`],isCustom:!0,action:e=>{e.insertNodes(it())}},{key:`version-diff`,label:`Version Diff`,description:`Compare two versions of text with visual diff`,icon:c.GitCompare,group:`WakaStart Blocks`,keywords:[`diff`,`version`,`compare`,`change`,`history`,`git`],isCustom:!0,action:e=>{e.insertNodes(st())}},{key:`embed`,label:`Embed`,description:`Embed external content (Figma, YouTube, CodeSandbox...)`,icon:c.ExternalLink,group:`WakaStart Blocks`,keywords:[`embed`,`figma`,`youtube`,`codesandbox`,`loom`,`iframe`,`video`],isCustom:!0,action:e=>{e.insertNodes(pt(``))}},{key:`code-playground`,label:`Code Playground`,description:`Executable code block with console output`,icon:c.Terminal,group:`WakaStart Blocks`,keywords:[`code`,`playground`,`run`,`execute`,`terminal`,`console`,`sandbox`],isCustom:!0,action:e=>{e.insertNodes(vt())}},{key:`comment-thread`,label:`Comment Thread`,description:`Inline discussion thread (like Google Docs)`,icon:c.MessageSquare,group:`WakaStart Blocks`,keywords:[`comment`,`thread`,`discussion`,`review`,`feedback`,`note`],isCustom:!0,action:e=>{e.insertNodes(wt())}}];function Dt(e){return[...T.map(e=>({...e,isCustom:!1})),...Et,...e||[]]}function Ot({commands:e,query:n=``,onSelect:r,activeIndex:i,onActiveIndexChange:a,className:o}){let c=s.useMemo(()=>e||Dt(),[e]),[u,d]=s.useState(0),f=i??u,p=a||d,m=s.useMemo(()=>{if(!n)return c;let e=n.toLowerCase();return c.filter(t=>t.label.toLowerCase().includes(e)||t.key.toLowerCase().includes(e)||t.description?.toLowerCase().includes(e)||t.keywords?.some(t=>t.toLowerCase().includes(e)))},[c,n]),h=s.useMemo(()=>{let e=new Map;for(let t of m){let n=t.group||`Other`;e.has(n)||e.set(n,[]),e.get(n).push(t)}return e},[m]);s.useEffect(()=>p(0),[n]);let g=s.useCallback(e=>{e.key===`ArrowDown`?(e.preventDefault(),p(Math.min(f+1,m.length-1))):e.key===`ArrowUp`?(e.preventDefault(),p(Math.max(f-1,0))):e.key===`Enter`&&m[f]&&(e.preventDefault(),r?.(m[f]))},[m,f,r,p]);return(0,l.jsxs)(`div`,{className:t.t(`w-80 max-h-96 overflow-y-auto`,`rounded-lg border bg-popover shadow-xl`,`p-1`,o),role:`listbox`,onKeyDown:g,"aria-label":`Slash commands`,children:[m.length===0&&(0,l.jsxs)(`div`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:[`No blocks found for "`,n,`"`]}),Array.from(h.entries()).map(([e,n])=>(0,l.jsxs)(`div`,{className:`mb-1`,children:[(0,l.jsxs)(`div`,{className:`px-2 py-1.5 text-[10px] font-bold uppercase tracking-wider text-muted-foreground/70 flex items-center gap-2`,children:[e,e===`WakaStart Blocks`&&(0,l.jsx)(`span`,{className:`px-1 py-0.5 rounded bg-primary/10 text-primary text-[8px] font-bold normal-case tracking-normal`,children:`Custom`})]}),n.map(e=>{let n=m.indexOf(e),i=e.icon;return(0,l.jsxs)(`button`,{role:`option`,"aria-selected":n===f,className:t.t(`flex w-full items-center gap-3 rounded-md px-2 py-2 text-left`,`text-sm transition-colors cursor-pointer`,n===f?`bg-accent text-accent-foreground`:`hover:bg-accent/50`),onMouseEnter:()=>p(n),onClick:()=>r?.(e),children:[(0,l.jsx)(`div`,{className:t.t(`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border`,e.isCustom?`border-primary/20 bg-primary/5`:`border-border bg-background`),children:(0,l.jsx)(i,{className:`h-4 w-4`})}),(0,l.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,l.jsx)(`span`,{className:`font-medium text-sm`,children:e.label}),e.isCustom&&(0,l.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-primary flex-shrink-0`})]}),e.description&&(0,l.jsx)(`div`,{className:`text-[11px] text-muted-foreground truncate mt-0.5`,children:e.description})]})]},e.key)})]},e))]})}Ot.displayName=`WakaSlashMenuBlock`;async function kt(e){try{let{SlashPlugin:t,SlashInputPlugin:n}=await import(`@platejs/combobox/react`),r=Dt(e);return[t.configure({options:{trigger:`/`,triggerPreviousCharPattern:/^$|^[\s"']$/,rules:r.map(e=>({key:e.key,text:e.label,keywords:e.keywords,onSelect:e.action}))}}),n]}catch{return console.warn(`[WakaSlashMenuBlock] @platejs/combobox not installed, slash commands disabled`),[]}}async function At(e){let t=[],n=[createUserStoryPlugin(),createAcceptanceCriteriaPlugin(),createApiEndpointPlugin(),createDiagramPlugin(e?.diagramRenderer),createAiAssistPlugin(e?.aiGenerator),createVersionDiffPlugin(),createEmbedPlugin(),createCodePlaygroundPlugin(e?.codeExecutor),createCommentThreadPlugin(e?.currentUserId,e?.onCommentReply)],r=await Promise.allSettled(n);for(let e of r)e.status===`fulfilled`&&e.value&&t.push(e.value);return t}exports.ACCEPTANCE_CRITERIA_BLOCK_TYPE=V,exports.AI_ASSIST_BLOCK_TYPE=Y,exports.API_ENDPOINT_BLOCK_TYPE=W,exports.BlockquoteElement=Ae,exports.BoldLeaf=Fe,exports.CODE_PLAYGROUND_BLOCK_TYPE=Q,exports.COMMENT_THREAD_BLOCK_TYPE=$,exports.CalloutElement=Ce,exports.CodeLeaf=ze,exports.ColumnElement=xe,exports.ColumnGroupElement=be,exports.DEFAULT_AI_ACTIONS=O,exports.DEFAULT_FLOATING_BUTTONS=b,exports.DEFAULT_SLASH_COMMANDS=T,exports.DEFAULT_SPEC_TEMPLATES=ne,exports.DEFAULT_TOOLBAR_GROUPS=p,exports.DIAGRAM_BLOCK_TYPE=q,exports.EMBED_BLOCK_TYPE=Z,exports.H1Element=we,exports.H2Element=Te,exports.H3Element=Ee,exports.H4Element=De,exports.H5Element=Oe,exports.H6Element=ke,exports.HighlightLeaf=Be,exports.ItalicLeaf=Ie,exports.LinkElement=Me,exports.MentionElement=Ne,exports.MentionSuggestions=I,exports.ParagraphElement=je,exports.SeparatorElement=Pe,exports.StrikethroughLeaf=Re,exports.SubscriptLeaf=He,exports.SuperscriptLeaf=Ve,exports.TableCellElement=ve,exports.TableCellHeaderElement=ye,exports.TableElement=ge,exports.TableRowElement=_e,exports.USER_STORY_BLOCK_TYPE=L,exports.UnderlineLeaf=Le,exports.VERSION_DIFF_BLOCK_TYPE=X,exports.WAKA_BLOCK_COMMANDS=Et,exports.WakaAIWriter=k,exports.WakaAcceptanceCriteriaBlock=U,exports.WakaAiAssistBlock=rt,exports.WakaApiEndpointBlock=K,exports.WakaCodePlaygroundBlock=_t,exports.WakaCollaborativeEditor=se,exports.WakaCommentThreadBlock=Ct,exports.WakaDiagramBlock=J,exports.WakaDiffViewer=le,exports.WakaDnDEditor=ae,exports.WakaDocumentEditor=j,exports.WakaEditor=h,exports.WakaEditorToolbar=m,exports.WakaEmbedBlock=ft,exports.WakaFloatingToolbar=x,exports.WakaMarkdownEditor=N,exports.WakaMentionEditor=me,exports.WakaSlashMenu=E,exports.WakaSlashMenuBlock=Ot,exports.WakaSpecEditor=re,exports.WakaUserStoryBlock=B,exports.WakaVersionDiffBlock=ot,exports.createAcceptanceCriteriaNodes=Ke,exports.createAcceptanceCriteriaPlugin=qe,exports.createAiAssistNodes=it,exports.createAiAssistPlugin=at,exports.createApiEndpointNodes=Ze,exports.createApiEndpointPlugin=Qe,exports.createCodePlaygroundNodes=vt,exports.createCodePlaygroundPlugin=yt,exports.createCommentThreadNodes=wt,exports.createCommentThreadPlugin=Tt,exports.createDiagramNodes=et,exports.createDiagramPlugin=tt,exports.createEmbedNodes=pt,exports.createEmbedPlugin=mt,exports.createSlashCommandPlugins=D,exports.createUserStoryNodes=Ue,exports.createUserStoryPlugin=We,exports.createVersionDiffNodes=st,exports.createVersionDiffPlugin=ct,exports.createWakaSlashPlugins=kt,exports.detectEmbedProvider=ut,exports.getAllWakaSlashCommands=Dt,exports.getPresetLoaders=o.t,exports.loadAIPlugins=o.n,exports.loadAllWakaBlockPlugins=At,exports.loadComboboxPlugins=o.r,exports.loadCorePlugins=o.i,exports.loadDiffPlugin=o.a,exports.loadDndPlugin=o.o,exports.loadEmojiPlugin=o.s,exports.loadFloatingPlugin=o.c,exports.loadIndentPlugin=o.l,exports.loadLinkPlugin=o.u,exports.loadMarkdownPlugin=o.d,exports.loadMediaPlugins=o.f,exports.loadMentionPlugins=o.p,exports.loadSelectionPlugin=o.m,exports.loadTocPlugin=o.h,exports.resolveEmbedUrl=dt;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/editor/waka-editor-toolbar.cjs.js"),t=require("./components/editor/waka-editor.cjs.js"),n=require("./components/editor/waka-floating-toolbar.cjs.js"),r=require("./components/editor/waka-slash-menu.cjs.js"),i=require("./components/editor/waka-ai-writer.cjs.js"),a=require("./components/editor/waka-document-editor.cjs.js"),o=require("./components/editor/waka-markdown-editor.cjs.js"),s=require("./components/editor/waka-spec-editor.cjs.js"),c=require("./components/editor/waka-dnd-editor.cjs.js"),l=require("./components/editor/waka-collaborative-editor.cjs.js"),u=require("./components/editor/waka-diff-viewer.cjs.js"),d=require("./components/editor/waka-mention-editor.cjs.js"),f=require("./components/editor/waka-editor-elements.cjs.js"),p=require("./components/editor/waka-editor-leaves.cjs.js"),m=require("./components/editor/waka-editor-plugins.cjs.js"),h=require("./components/editor/blocks/waka-user-story-block.cjs.js"),g=require("./components/editor/blocks/waka-acceptance-criteria-block.cjs.js"),_=require("./components/editor/blocks/waka-api-endpoint-block.cjs.js"),v=require("./components/editor/blocks/waka-diagram-block.cjs.js"),y=require("./components/editor/blocks/waka-ai-assist-block.cjs.js"),b=require("./components/editor/blocks/waka-version-diff-block.cjs.js"),x=require("./components/editor/blocks/waka-embed-block.cjs.js"),S=require("./components/editor/blocks/waka-code-playground-block.cjs.js"),C=require("./components/editor/blocks/waka-comment-thread-block.cjs.js"),w=require("./components/editor/blocks/waka-slash-menu-block.cjs.js"),T=require("./components/editor/blocks/index.cjs.js");exports.ACCEPTANCE_CRITERIA_BLOCK_TYPE=g.ACCEPTANCE_CRITERIA_BLOCK_TYPE,exports.AI_ASSIST_BLOCK_TYPE=y.AI_ASSIST_BLOCK_TYPE,exports.API_ENDPOINT_BLOCK_TYPE=_.API_ENDPOINT_BLOCK_TYPE,exports.BlockquoteElement=f.BlockquoteElement,exports.BoldLeaf=p.BoldLeaf,exports.CODE_PLAYGROUND_BLOCK_TYPE=S.CODE_PLAYGROUND_BLOCK_TYPE,exports.COMMENT_THREAD_BLOCK_TYPE=C.COMMENT_THREAD_BLOCK_TYPE,exports.CalloutElement=f.CalloutElement,exports.CodeLeaf=p.CodeLeaf,exports.ColumnElement=f.ColumnElement,exports.ColumnGroupElement=f.ColumnGroupElement,exports.DEFAULT_AI_ACTIONS=i.DEFAULT_AI_ACTIONS,exports.DEFAULT_FLOATING_BUTTONS=n.DEFAULT_FLOATING_BUTTONS,exports.DEFAULT_SLASH_COMMANDS=r.DEFAULT_SLASH_COMMANDS,exports.DEFAULT_SPEC_TEMPLATES=s.DEFAULT_SPEC_TEMPLATES,exports.DEFAULT_TOOLBAR_GROUPS=e.DEFAULT_TOOLBAR_GROUPS,exports.DIAGRAM_BLOCK_TYPE=v.DIAGRAM_BLOCK_TYPE,exports.EMBED_BLOCK_TYPE=x.EMBED_BLOCK_TYPE,exports.H1Element=f.H1Element,exports.H2Element=f.H2Element,exports.H3Element=f.H3Element,exports.H4Element=f.H4Element,exports.H5Element=f.H5Element,exports.H6Element=f.H6Element,exports.HighlightLeaf=p.HighlightLeaf,exports.ItalicLeaf=p.ItalicLeaf,exports.LinkElement=f.LinkElement,exports.MentionElement=f.MentionElement,exports.MentionSuggestions=d.MentionSuggestions,exports.ParagraphElement=f.ParagraphElement,exports.SeparatorElement=f.SeparatorElement,exports.StrikethroughLeaf=p.StrikethroughLeaf,exports.SubscriptLeaf=p.SubscriptLeaf,exports.SuperscriptLeaf=p.SuperscriptLeaf,exports.TableCellElement=f.TableCellElement,exports.TableCellHeaderElement=f.TableCellHeaderElement,exports.TableElement=f.TableElement,exports.TableRowElement=f.TableRowElement,exports.USER_STORY_BLOCK_TYPE=h.USER_STORY_BLOCK_TYPE,exports.UnderlineLeaf=p.UnderlineLeaf,exports.VERSION_DIFF_BLOCK_TYPE=b.VERSION_DIFF_BLOCK_TYPE,exports.WAKA_BLOCK_COMMANDS=w.WAKA_BLOCK_COMMANDS,exports.WakaAIWriter=i.WakaAIWriter,exports.WakaAcceptanceCriteriaBlock=g.WakaAcceptanceCriteriaBlock,exports.WakaAiAssistBlock=y.WakaAiAssistBlock,exports.WakaApiEndpointBlock=_.WakaApiEndpointBlock,exports.WakaCodePlaygroundBlock=S.WakaCodePlaygroundBlock,exports.WakaCollaborativeEditor=l.WakaCollaborativeEditor,exports.WakaCommentThreadBlock=C.WakaCommentThreadBlock,exports.WakaDiagramBlock=v.WakaDiagramBlock,exports.WakaDiffViewer=u.WakaDiffViewer,exports.WakaDnDEditor=c.WakaDnDEditor,exports.WakaDocumentEditor=a.WakaDocumentEditor,exports.WakaEditor=t.WakaEditor,exports.WakaEditorToolbar=e.WakaEditorToolbar,exports.WakaEmbedBlock=x.WakaEmbedBlock,exports.WakaFloatingToolbar=n.WakaFloatingToolbar,exports.WakaMarkdownEditor=o.WakaMarkdownEditor,exports.WakaMentionEditor=d.WakaMentionEditor,exports.WakaSlashMenu=r.WakaSlashMenu,exports.WakaSlashMenuBlock=w.WakaSlashMenuBlock,exports.WakaSpecEditor=s.WakaSpecEditor,exports.WakaUserStoryBlock=h.WakaUserStoryBlock,exports.WakaVersionDiffBlock=b.WakaVersionDiffBlock,exports.createAcceptanceCriteriaNodes=g.createAcceptanceCriteriaNodes,exports.createAcceptanceCriteriaPlugin=g.createAcceptanceCriteriaPlugin,exports.createAiAssistNodes=y.createAiAssistNodes,exports.createAiAssistPlugin=y.createAiAssistPlugin,exports.createApiEndpointNodes=_.createApiEndpointNodes,exports.createApiEndpointPlugin=_.createApiEndpointPlugin,exports.createCodePlaygroundNodes=S.createCodePlaygroundNodes,exports.createCodePlaygroundPlugin=S.createCodePlaygroundPlugin,exports.createCommentThreadNodes=C.createCommentThreadNodes,exports.createCommentThreadPlugin=C.createCommentThreadPlugin,exports.createDiagramNodes=v.createDiagramNodes,exports.createDiagramPlugin=v.createDiagramPlugin,exports.createEmbedNodes=x.createEmbedNodes,exports.createEmbedPlugin=x.createEmbedPlugin,exports.createSlashCommandPlugins=r.createSlashCommandPlugins,exports.createUserStoryNodes=h.createUserStoryNodes,exports.createUserStoryPlugin=h.createUserStoryPlugin,exports.createVersionDiffNodes=b.createVersionDiffNodes,exports.createVersionDiffPlugin=b.createVersionDiffPlugin,exports.createWakaSlashPlugins=w.createWakaSlashPlugins,exports.detectEmbedProvider=x.detectEmbedProvider,exports.getAllWakaSlashCommands=w.getAllWakaSlashCommands,exports.getPresetLoaders=m.getPresetLoaders,exports.loadAIPlugins=m.loadAIPlugins,exports.loadAllWakaBlockPlugins=T.loadAllWakaBlockPlugins,exports.loadComboboxPlugins=m.loadComboboxPlugins,exports.loadCorePlugins=m.loadCorePlugins,exports.loadDiffPlugin=m.loadDiffPlugin,exports.loadDndPlugin=m.loadDndPlugin,exports.loadEmojiPlugin=m.loadEmojiPlugin,exports.loadFloatingPlugin=m.loadFloatingPlugin,exports.loadIndentPlugin=m.loadIndentPlugin,exports.loadLinkPlugin=m.loadLinkPlugin,exports.loadMarkdownPlugin=m.loadMarkdownPlugin,exports.loadMediaPlugins=m.loadMediaPlugins,exports.loadMentionPlugins=m.loadMentionPlugins,exports.loadSelectionPlugin=m.loadSelectionPlugin,exports.loadTocPlugin=m.loadTocPlugin,exports.resolveEmbedUrl=x.resolveEmbedUrl;