@hiai-gg/docsmint 2.2.3 → 2.2.5

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 (259) hide show
  1. package/README.md +10 -8
  2. package/dist/backend/index.js +60080 -40793
  3. package/dist/frontend/CategoryDialog-CtBDBrmR.js +603 -0
  4. package/dist/frontend/ConfirmDialog-B7rUgX7M.js +219 -0
  5. package/dist/frontend/CreateSnapshotDialog-bUKdc0Zb.js +219 -0
  6. package/dist/frontend/DatePicker-CKTDDpVx.js +291 -0
  7. package/dist/frontend/DeleteDialog-D28HGxN7.js +175 -0
  8. package/dist/frontend/FolderNode-CVd22MJS.js +291 -0
  9. package/dist/frontend/FolderTreeSelector-DObSptCD.js +102 -0
  10. package/dist/frontend/HiAiEditor--V0-gKwv.js +3266 -0
  11. package/dist/frontend/HiaiDocsExtensionProvider-B1bCAtpa.js +13 -0
  12. package/dist/frontend/{Icon-CiHcxcpv.js → Icon-DNapb_KY.js} +3 -2
  13. package/dist/frontend/SettingsDialog-CN-PrNpM.js +979 -0
  14. package/dist/frontend/ShareDialog-UO_6vvoT.js +272 -0
  15. package/dist/frontend/Sidebar-CAxrqTAQ.js +2169 -0
  16. package/dist/frontend/TagCreateDialog-BdWu4bPX.js +268 -0
  17. package/dist/frontend/{action_cancel-BdsWzQKU.js → action_cancel-DxbRD-bG.js} +1 -1
  18. package/dist/frontend/{action_close-CVhfLPRQ.js → action_close-Ct6lVumm.js} +1 -1
  19. package/dist/frontend/{action_create-ByaroO1_.js → action_create-DKOlnVyX.js} +1 -1
  20. package/dist/frontend/{action_delete-SRloglWY.js → action_delete-DRb7fBnB.js} +1 -1
  21. package/dist/frontend/{action_go_to-DO1bicF-.js → action_go_to-D0fF5t1d.js} +1 -1
  22. package/dist/frontend/{action_loading-iQ0KsN6i.js → action_loading-YGvDyzYG.js} +1 -1
  23. package/dist/frontend/{action_save-DeqrZQwV.js → action_save-BHYTeFmm.js} +1 -1
  24. package/dist/frontend/api/categories.js +1 -1
  25. package/dist/frontend/api/settings.js +1 -1
  26. package/dist/frontend/api/tags.js +1 -1
  27. package/dist/frontend/app-shell.js +177 -176
  28. package/dist/frontend/{auth-client-Dx7d9Tzo.js → auth-client-DahfoSYo.js} +297 -277
  29. package/dist/frontend/{bundle-mjs-clTO1WW-.js → bundle-mjs-654jE5XN.js} +397 -300
  30. package/dist/frontend/{camera-DsdOPOcD.js → camera-C6JuKKhr.js} +9 -8
  31. package/dist/frontend/{categories-CusvHb5Y.js → categories-CUfKlgrs.js} +1 -1
  32. package/dist/frontend/{categories_update_error-Cn8DBBHv.js → categories_update_error-BrLD-j9s.js} +1 -1
  33. package/dist/frontend/check-B_e1XqT2.js +25 -0
  34. package/dist/frontend/chevron-down-BsnN2mp2.js +25 -0
  35. package/dist/frontend/circle-check-CJH5zxd9.js +29 -0
  36. package/dist/frontend/clock-CU0gCiiM.js +29 -0
  37. package/dist/frontend/collaboration.js +113 -113
  38. package/dist/frontend/components/category-dialog.js +1 -1
  39. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  40. package/dist/frontend/components/delete-dialog.js +1 -1
  41. package/dist/frontend/components/editor/compact-editor.js +5 -4
  42. package/dist/frontend/components/editor/document-editor.js +1 -1
  43. package/dist/frontend/components/editor/document-title.js +3 -2
  44. package/dist/frontend/components/editor/docx-serializer.js +8359 -12358
  45. package/dist/frontend/components/editor/extensions.js +1 -1
  46. package/dist/frontend/components/editor/markdown-toggle.js +33 -32
  47. package/dist/frontend/components/editor/markdown.js +1 -1
  48. package/dist/frontend/components/folder-node.js +1 -1
  49. package/dist/frontend/components/folder-tree-selector.js +1 -1
  50. package/dist/frontend/components/save-as-dialog.js +168 -167
  51. package/dist/frontend/components/settings.js +1 -1
  52. package/dist/frontend/components/share-dialog.js +1 -1
  53. package/dist/frontend/components/sidebar.js +1 -1
  54. package/dist/frontend/components/tag-create-dialog.js +1 -1
  55. package/dist/frontend/components/version-history.js +252 -251
  56. package/dist/frontend/{copy-Bag46YaR.js → copy-DYNRCHgk.js} +9 -8
  57. package/dist/frontend/dashboard.js +1301 -1300
  58. package/dist/frontend/db-yN0Vve_2.js +4296 -0
  59. package/dist/frontend/{dialog-C0Bpok1d.js → dialog-Dqp04jso.js} +11 -10
  60. package/dist/frontend/dist-4xBCgXNT.js +40 -0
  61. package/dist/frontend/{dist-DjId3RKL.js → dist-BaAULhmK.js} +3 -9
  62. package/dist/frontend/dist-C1oIyJLI.js +302 -0
  63. package/dist/frontend/dndzone-CWg1kmdZ.js +1483 -0
  64. package/dist/frontend/{doc_title_label-BOuZzvqv.js → doc_title_label-BPlghiRM.js} +1 -1
  65. package/dist/frontend/{doc_title_placeholder-ZxpdWWEn.js → doc_title_placeholder-D-LfSoC5.js} +1 -1
  66. package/dist/frontend/dropdown-menu-HePwCxoQ.js +1429 -0
  67. package/dist/frontend/{editorExtensions-DbiFj4tn.js → editorExtensions-QKIFSqEG.js} +9 -9
  68. package/dist/frontend/{editor_markdown_placeholder-BztIY9Ci.js → editor_markdown_placeholder-BXRPm7JG.js} +1 -1
  69. package/dist/frontend/{ellipsis-vertical-Oymsv1R4.js → ellipsis-vertical-CR25MyeP.js} +9 -8
  70. package/dist/frontend/{error_dismiss-C651ZdWI.js → error_dismiss-Ckia7GQe.js} +1 -1
  71. package/dist/frontend/{error_generic-BlWqOE-a.js → error_generic-gyQMdET_.js} +1 -1
  72. package/dist/frontend/extension.js +1 -1
  73. package/dist/frontend/{folder-BpmB_sAy.js → folder-BpA690ie.js} +4 -3
  74. package/dist/frontend/{folders_rename-Cxbg5GIw.js → folders_rename-BHa_gSXw.js} +1 -1
  75. package/dist/frontend/frontend.css +1 -1
  76. package/dist/frontend/i18n.js +29 -29
  77. package/dist/frontend/{identity-B7HeOzDJ.js → identity-ndFYB8Nt.js} +1 -1
  78. package/dist/frontend/{input-CbeB9220.js → input-Cv3qF4J3.js} +9 -8
  79. package/dist/frontend/label-DXjefKfF.js +30 -0
  80. package/dist/frontend/{lib-CITdCbKa.js → lib-DJthN0w9.js} +7108 -5196
  81. package/dist/frontend/loader-circle-CvWX1HHL.js +25 -0
  82. package/dist/frontend/{markdown-6E9TWC6V.js → markdown-CksQVQ6a.js} +2 -2
  83. package/dist/frontend/offline/identity.js +1 -1
  84. package/dist/frontend/popper-layer-force-mount-DS--Cvfo.js +3493 -0
  85. package/dist/frontend/rolldown-runtime-DKYsOz5J.js +19 -0
  86. package/dist/frontend/{rotate-ccw-DAUX7np7.js → rotate-ccw-Box7QP5X.js} +9 -8
  87. package/dist/frontend/{runtime-CGUiMzK6.js → runtime-CJv8UGYl.js} +1 -4
  88. package/dist/frontend/{schemas-YXxhj5o8.js → schemas-BYbeR0Ky.js} +11 -11
  89. package/dist/frontend/{scroll_to_top_aria-lJc2RSx_.js → scroll_to_top_aria-CP7_oyCo.js} +1 -1
  90. package/dist/frontend/search.js +650 -649
  91. package/dist/frontend/{search_title-BETwQYJq.js → search_title-C2aOzN_J.js} +1 -1
  92. package/dist/frontend/select-value-DAMTi0zc.js +1473 -0
  93. package/dist/frontend/{settings-DyePuqjp.js → settings-DTsCVJEi.js} +1 -1
  94. package/dist/frontend/{share-context-C2xyVP9M.js → share-context-CtRMIIhL.js} +15 -14
  95. package/dist/frontend/{share_copied-BuAnmpbz.js → share_copied-BHb_9sOo.js} +1 -1
  96. package/dist/frontend/{share_toggle_password-LEYUeHWr.js → share_toggle_password-DjCMq4Eq.js} +1 -1
  97. package/dist/frontend/shared-document.js +49 -48
  98. package/dist/frontend/{sidebar_uncategorized-C5PGOflV.js → sidebar_uncategorized-BJSB_sc9.js} +1 -1
  99. package/dist/frontend/{sort_relevance-DpCVLby_.js → sort_relevance-CXuNTq6L.js} +1 -1
  100. package/dist/frontend/{tag-Wdfe0rKU.js → tag-BPOFgBQw.js} +4 -3
  101. package/dist/frontend/tag-store.svelte-DyqQNx7H.js +28 -0
  102. package/dist/frontend/{tags-DlDVothf.js → tags-DwilrkrM.js} +1 -1
  103. package/dist/frontend/{tags_load_error-BINNpPPV.js → tags_load_error-BOyuQEGc.js} +1 -1
  104. package/dist/frontend/{tags_new-Dw0Uy43-.js → tags_new-CGF3Hi1j.js} +1 -1
  105. package/dist/frontend/textarea-DDdgNvnf.js +23 -0
  106. package/dist/frontend/theme.js +1 -1
  107. package/dist/frontend/{theme.svelte-BiXvrqwh.js → theme.svelte-Dx01qWc3.js} +2 -2
  108. package/dist/frontend/{theme_system-YIfa_2Xt.js → theme_system-Bt9ItDgj.js} +1 -1
  109. package/dist/frontend/utils/dndzone.js +1 -1
  110. package/dist/frontend/{utils-CnAmIMwr.js → utils-BQMesoNf.js} +1 -1
  111. package/dist/frontend/utils-BavN35Bw.js +6 -0
  112. package/dist/frontend/utils.js +1 -1
  113. package/dist/frontend/{version_create_snapshot-D8xjbuCq.js → version_create_snapshot-BvoOuUeh.js} +1 -1
  114. package/dist/frontend/{version_restored_from-DYFFSuQj.js → version_restored_from-BIEEKFbx.js} +1 -1
  115. package/dist/frontend/{version_snapshot_label_placeholder-BhKq1NQ7.js → version_snapshot_label_placeholder-h9r2_0u3.js} +1 -1
  116. package/dist/frontend/{weekday_we-BxbzNVWR.js → weekday_we-DsuVW6rh.js} +1 -1
  117. package/dist/frontend/x-hIpDH7DU.js +25 -0
  118. package/dist/frontend/{yjs-BbwnvxgY.js → yjs--VgxqIlB.js} +607 -628
  119. package/dist/frontend-ssr/api/categories.js +1 -1
  120. package/dist/frontend-ssr/api/settings.js +1 -1
  121. package/dist/frontend-ssr/api/tags.js +1 -1
  122. package/dist/frontend-ssr/app-shell.js +11 -11
  123. package/dist/frontend-ssr/assets/{CategoryDialog-2CCX508O.js → CategoryDialog-DRItbO_9.js} +13 -13
  124. package/dist/frontend-ssr/assets/{ConfirmDialog-Cc6lcY1N.js → ConfirmDialog-B0NXRrel.js} +8 -8
  125. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-BB8fXF9W.js → CreateSnapshotDialog-nj8PjuON.js} +7 -7
  126. package/dist/frontend-ssr/assets/{DatePicker-CfzKzipR.js → DatePicker-CdUKLPtP.js} +8 -8
  127. package/dist/frontend-ssr/assets/{DeleteDialog-DRU4UgOW.js → DeleteDialog-B83NoxAg.js} +3 -3
  128. package/dist/frontend-ssr/assets/{FolderNode-CyOrLJ2Y.js → FolderNode-CSeC3051.js} +10 -10
  129. package/dist/frontend-ssr/assets/{FolderTreeSelector-D0reTdFS.js → FolderTreeSelector-Dh-ViJPU.js} +4 -4
  130. package/dist/frontend-ssr/assets/{HiAiEditor-BQGlGd3z.js → HiAiEditor-DB2PjHm9.js} +41 -41
  131. package/dist/frontend-ssr/assets/{Icon-CrIRbT5O.js → Icon-CBEeswQ2.js} +4 -4
  132. package/dist/frontend-ssr/assets/{SettingsDialog-BpHY3IMb.js → SettingsDialog-kc3O9PXG.js} +21 -21
  133. package/dist/frontend-ssr/assets/{ShareDialog-CY40nWZJ.js → ShareDialog-Dmrj55QP.js} +4 -4
  134. package/dist/frontend-ssr/assets/{Sidebar-dTp4DyW4.js → Sidebar-CDQcIuyv.js} +45 -45
  135. package/dist/frontend-ssr/assets/{TagCreateDialog-C2tpdEuj.js → TagCreateDialog-CP-yYfpQ.js} +11 -11
  136. package/dist/frontend-ssr/assets/{action_cancel-CsBbxW0m.js → action_cancel-B8i5P3wt.js} +1 -1
  137. package/dist/frontend-ssr/assets/{action_close-lFKBqBwg.js → action_close-DPgIB-cY.js} +1 -1
  138. package/dist/frontend-ssr/assets/{action_create-BV4ZOcQW.js → action_create-DAlNPFeN.js} +1 -1
  139. package/dist/frontend-ssr/assets/{action_delete-CNmRhKQP.js → action_delete-C6lsQCtY.js} +1 -1
  140. package/dist/frontend-ssr/assets/{action_go_to-tN5I26xM.js → action_go_to-C6tegi-k.js} +1 -1
  141. package/dist/frontend-ssr/assets/{action_save-YCfMiKb4.js → action_save-BQCej1sh.js} +1 -1
  142. package/dist/frontend-ssr/assets/{auth-client-BnnnJDAb.js → auth-client-CwXGsJIQ.js} +44 -38
  143. package/dist/frontend-ssr/assets/{camera-OYNSMvMd.js → camera-kjjsHmQu.js} +2 -2
  144. package/dist/frontend-ssr/assets/{categories_update_error-Bfx5vtvt.js → categories_update_error-Kq8q_FJp.js} +1 -1
  145. package/dist/frontend-ssr/assets/{chevron-down-DB6YsSbQ.js → chevron-down-DPc-Owbl.js} +2 -2
  146. package/dist/frontend-ssr/assets/{chevron-right-DOt2uY6b.js → chevron-right-C-jY4mqk.js} +2 -2
  147. package/dist/frontend-ssr/assets/{circle-check-DQhTm9YR.js → circle-check-CnueRXrc.js} +2 -2
  148. package/dist/frontend-ssr/assets/{clock-B08dVWtf.js → clock-CoRtIDhT.js} +2 -2
  149. package/dist/frontend-ssr/assets/{copy-2jsznHar.js → copy-CDNZIGVg.js} +2 -2
  150. package/dist/frontend-ssr/assets/{db-BEKLU5Fc.js → db-NhMsSg1f.js} +1 -1
  151. package/dist/frontend-ssr/assets/{dialog-C6U-DqLr.js → dialog-B09MN2S-.js} +9 -9
  152. package/dist/frontend-ssr/assets/{dist-DqXTz_zE.js → dist-D4MAfF0i.js} +13 -13
  153. package/dist/frontend-ssr/assets/{dist-ip9bPdma.js → dist-cDG_u5EF.js} +8 -8
  154. package/dist/frontend-ssr/assets/{dndzone-C7KnICM0.js → dndzone-DyM8UtoT.js} +378 -216
  155. package/dist/frontend-ssr/assets/{doc_title_label-CE_l-Gum.js → doc_title_label-BqCuH3eY.js} +1 -1
  156. package/dist/frontend-ssr/assets/{doc_title_placeholder-7_i7PtG6.js → doc_title_placeholder-C3tGSpRB.js} +1 -1
  157. package/dist/frontend-ssr/assets/dropdown-menu-C9H45F9X.js +1721 -0
  158. package/dist/frontend-ssr/assets/{editor_markdown_placeholder-CAeLJjFT.js → editor_markdown_placeholder-Cxa5uq87.js} +1 -1
  159. package/dist/frontend-ssr/assets/{editor_toolbar_undo-CVCfQIS1.js → editor_toolbar_undo-D-gLz88j.js} +1 -1
  160. package/dist/frontend-ssr/assets/{ellipsis-vertical-IFHt2NM1.js → ellipsis-vertical-oBvMj3Jm.js} +2 -2
  161. package/dist/frontend-ssr/assets/{error_generic-BB80i0Vk.js → error_generic-BSoVZ_4p.js} +1 -1
  162. package/dist/frontend-ssr/assets/{folder-CXa1_bm5.js → folder-Ptjeaody.js} +2 -2
  163. package/dist/frontend-ssr/assets/{folders_rename-ydbfwQlj.js → folders_rename-DBtQcf2R.js} +1 -1
  164. package/dist/frontend-ssr/assets/{identity-DTz1SQwC.js → identity-CigCqYEA.js} +1 -1
  165. package/dist/frontend-ssr/assets/{input-Bxw9sFF0.js → input-Cc45dG_S.js} +2 -2
  166. package/dist/frontend-ssr/assets/{label-CMWedjs6.js → label-C1_J2397.js} +2 -2
  167. package/dist/frontend-ssr/assets/{loader-circle-zbKj9Qb-.js → loader-circle-CK3McH5n.js} +2 -2
  168. package/dist/frontend-ssr/assets/{markdown-BmIhDQp7.js → markdown-WQsa_gay.js} +1 -1
  169. package/dist/frontend-ssr/assets/{popper-layer-force-mount-CSHZsG2E.js → popper-layer-force-mount-CGKwdZaZ.js} +1448 -2402
  170. package/dist/frontend-ssr/assets/{rotate-ccw-B7SaTFWf.js → rotate-ccw-B1lCxJ5d.js} +2 -2
  171. package/dist/frontend-ssr/assets/{runtime-BX6-jTn_.js → runtime-CoxALrm1.js} +2 -28
  172. package/dist/frontend-ssr/assets/{scroll_to_top_aria-CAYSiGHO.js → scroll_to_top_aria-CmLwsPln.js} +1 -1
  173. package/dist/frontend-ssr/assets/{search_title-C7NVXXq3.js → search_title-CZIl0wkq.js} +1 -1
  174. package/dist/frontend-ssr/assets/{search_toggle_filters-Bq_YVD8s.js → search_toggle_filters-BG-CRM9G.js} +1 -1
  175. package/dist/frontend-ssr/assets/{select-value-TgslfiUB.js → select-value-BeUHHkLq.js} +157 -66
  176. package/dist/frontend-ssr/assets/{settings-B1MA_FjO.js → settings-BqyemuQv.js} +1 -1
  177. package/dist/frontend-ssr/assets/{share-context-RVh8AExX.js → share-context-BM1sUnlP.js} +15 -15
  178. package/dist/frontend-ssr/assets/{share_copied-CrwEwkb3.js → share_copied-BVGtm9Ud.js} +1 -1
  179. package/dist/frontend-ssr/assets/{share_toggle_password-Co56z0Ha.js → share_toggle_password-z0gwy0TG.js} +1 -1
  180. package/dist/frontend-ssr/assets/{sidebar_uncategorized-COWdmZ3d.js → sidebar_uncategorized-rpbsgLVr.js} +1 -1
  181. package/dist/frontend-ssr/assets/{tag-BGhtDKpP.js → tag-D_ZqINN3.js} +3 -3
  182. package/dist/frontend-ssr/assets/{tags_load_error-DW4FbHvr.js → tags_load_error-DvhlyMMY.js} +1 -1
  183. package/dist/frontend-ssr/assets/{tags_new-Dr3ByMPZ.js → tags_new-DStxzBII.js} +1 -1
  184. package/dist/frontend-ssr/assets/{textarea-Bz5Tz4rw.js → textarea-S9uzw6je.js} +2 -2
  185. package/dist/frontend-ssr/assets/{theme.svelte-CdHah46l.js → theme.svelte-CqAzqvik.js} +2 -2
  186. package/dist/frontend-ssr/assets/{theme_system-E97FASeq.js → theme_system-DjbsL0RQ.js} +1 -1
  187. package/dist/frontend-ssr/assets/{utils-DF6CmRDX.js → utils-DF93j6z-.js} +1 -1
  188. package/dist/frontend-ssr/assets/{version_create_snapshot-DeeYB7bb.js → version_create_snapshot-SwYsTZ56.js} +1 -1
  189. package/dist/frontend-ssr/assets/{version_restored_from-CTt2LM4A.js → version_restored_from-pYBnudye.js} +1 -1
  190. package/dist/frontend-ssr/assets/{version_snapshot_label_placeholder-BbGD9YuN.js → version_snapshot_label_placeholder-DtDnHip8.js} +1 -1
  191. package/dist/frontend-ssr/assets/{weekday_we-BzGQ-iFc.js → weekday_we-CV1TMROW.js} +1 -1
  192. package/dist/frontend-ssr/components/category-dialog.js +1 -1
  193. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
  194. package/dist/frontend-ssr/components/delete-dialog.js +1 -1
  195. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  196. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  197. package/dist/frontend-ssr/components/editor/document-title.js +2 -2
  198. package/dist/frontend-ssr/components/editor/extensions.js +1 -1
  199. package/dist/frontend-ssr/components/editor/markdown-toggle.js +3 -3
  200. package/dist/frontend-ssr/components/editor/markdown.js +1 -1
  201. package/dist/frontend-ssr/components/folder-node.js +1 -1
  202. package/dist/frontend-ssr/components/folder-tree-selector.js +1 -1
  203. package/dist/frontend-ssr/components/save-as-dialog.js +10 -10
  204. package/dist/frontend-ssr/components/settings.js +1 -1
  205. package/dist/frontend-ssr/components/share-dialog.js +1 -1
  206. package/dist/frontend-ssr/components/sidebar.js +1 -1
  207. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
  208. package/dist/frontend-ssr/components/version-history.js +17 -17
  209. package/dist/frontend-ssr/dashboard.js +61 -158
  210. package/dist/frontend-ssr/extension.js +1 -1
  211. package/dist/frontend-ssr/i18n.js +31 -31
  212. package/dist/frontend-ssr/offline/identity.js +1 -1
  213. package/dist/frontend-ssr/search.js +13 -13
  214. package/dist/frontend-ssr/shared-document.js +1 -1
  215. package/dist/frontend-ssr/theme.js +1 -1
  216. package/dist/frontend-ssr/utils/dndzone.js +1 -1
  217. package/dist/lifecycle-runtime.js +17768 -11203
  218. package/dist/mcp-cli.js +1 -1
  219. package/dist/mcp-server.js +1 -1
  220. package/package.json +13 -13
  221. package/packages/cli/src/index.ts +1 -1
  222. package/server.json +2 -2
  223. package/dist/frontend/CategoryDialog-CVJi5PJu.js +0 -602
  224. package/dist/frontend/ConfirmDialog-0JwB8mKN.js +0 -218
  225. package/dist/frontend/CreateSnapshotDialog-BLrtuYs5.js +0 -218
  226. package/dist/frontend/DatePicker-BwSb8TRv.js +0 -326
  227. package/dist/frontend/DeleteDialog-s7Dr6bXg.js +0 -174
  228. package/dist/frontend/FolderNode-Ds0LDfK3.js +0 -290
  229. package/dist/frontend/FolderTreeSelector-BR3lYmPU.js +0 -101
  230. package/dist/frontend/HiAiEditor-BHz46Iqd.js +0 -3078
  231. package/dist/frontend/HiaiDocsExtensionProvider-A2nGddUR.js +0 -12
  232. package/dist/frontend/SettingsDialog-BvS74JZu.js +0 -978
  233. package/dist/frontend/ShareDialog-Bo50h_Oe.js +0 -271
  234. package/dist/frontend/Sidebar-DerKtpWB.js +0 -2168
  235. package/dist/frontend/TagCreateDialog-DhKfsfv3.js +0 -267
  236. package/dist/frontend/check-DiMZRkKS.js +0 -24
  237. package/dist/frontend/chevron-down-CxFrMFDJ.js +0 -24
  238. package/dist/frontend/circle-check-B4F_qgPx.js +0 -28
  239. package/dist/frontend/clock-dcpueRk-.js +0 -28
  240. package/dist/frontend/db-B1ZV452J.js +0 -3792
  241. package/dist/frontend/dist-BlcV_BOY.js +0 -39
  242. package/dist/frontend/dist-Dl9qg10h.js +0 -301
  243. package/dist/frontend/dndzone-B9jA0yIS.js +0 -1372
  244. package/dist/frontend/dropdown-menu-B3nk2aM-.js +0 -482
  245. package/dist/frontend/label-CfBWf3gI.js +0 -29
  246. package/dist/frontend/loader-circle-skKwfRCB.js +0 -24
  247. package/dist/frontend/popper-layer-force-mount-BG0eyrCk.js +0 -4255
  248. package/dist/frontend/rolldown-runtime-CwxnZyOB.js +0 -22
  249. package/dist/frontend/select-value-BY5Hw6Rl.js +0 -1412
  250. package/dist/frontend/tag-store.svelte-C9VYWqLQ.js +0 -28
  251. package/dist/frontend/textarea-D6emvAwM.js +0 -22
  252. package/dist/frontend/utils-DH0uqK40.js +0 -6
  253. package/dist/frontend/x-CBUgPygC.js +0 -24
  254. package/dist/frontend-ssr/assets/dropdown-menu-BS5fcN9l.js +0 -446
  255. package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-D6cGL-9s.js → HiaiDocsExtensionProvider-BdfQP817.js} +1 -1
  256. package/dist/frontend-ssr/assets/{categories-bBPviKjl.js → categories-CMmudpEk.js} +1 -1
  257. package/dist/frontend-ssr/assets/{editorExtensions-2O7O2Nhv.js → editorExtensions-DOPTTKUS.js} +2 -2
  258. package/dist/frontend-ssr/assets/{tag-store.svelte-CUUgAaDD.js → tag-store.svelte-Djpf1W0n.js} +1 -1
  259. package/dist/frontend-ssr/assets/{tags-C7u-LBsl.js → tags-GQOEtqET.js} +1 -1
@@ -0,0 +1,1721 @@
1
+ import { t as cn } from "./utils-DF93j6z-.js";
2
+ import { $ as getDocument, B as HOME, C as noop, D as isElement, E as isDisabledElement, F as ARROW_UP, G as boolToEmptyStrOrUndef, H as PAGE_DOWN, J as createBitsAttrs, K as boolToStr, M as ARROW_DOWN, N as ARROW_LEFT, O as isElementOrSVGElement, P as ARROW_RIGHT, Q as DOMContext, R as ENTER, S as createId, U as PAGE_UP, X as getDataTransitionAttrs, Y as getDataOpenClosed, Z as attachRef, _ as CustomEventDispatcher, at as mergeProps, b as resolveDirProp, ct as BoxSymbol, dt as boxWith, et as afterTick, ft as isBox, g as tabbable, h as isTabbable, ht as toReadonlyBox, i as DOMTypeahead, it as Context, j as isSelectableInput, k as isHTMLElement, lt as boxFlatten, m as isFocusable, mt as isWritableSymbol, n as Popper_layer, o as getFloatingContentCSSVars, p as focusable, pt as isWritableBox, r as Floating_layer_anchor, rt as watch, s as Floating_layer, t as Popper_layer_force_mount, ut as boxFrom, v as getEventTargetClosest, w as PresenceManager, y as isEventTargetWithin } from "./popper-layer-force-mount-CGKwdZaZ.js";
3
+ import * as $ from "svelte/internal/server";
4
+ import "svelte/events";
5
+ // ../node_modules/.bun/svelte-toolbelt@0.10.7+294fabd43ca01d33/node_modules/svelte-toolbelt/dist/box/box.svelte.js
6
+ function box(initialValue) {
7
+ let current = initialValue;
8
+ return {
9
+ [BoxSymbol]: true,
10
+ [isWritableSymbol]: true,
11
+ get current() {
12
+ return current;
13
+ },
14
+ set current(v) {
15
+ current = v;
16
+ }
17
+ };
18
+ }
19
+ box.from = boxFrom;
20
+ box.with = boxWith;
21
+ box.flatten = boxFlatten;
22
+ box.readonly = toReadonlyBox;
23
+ box.isBox = isBox;
24
+ box.isWritableBox = isWritableBox;
25
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/internal/locale.js
26
+ /**
27
+ * Detects the text direction in the element.
28
+ * @returns {Direction} The text direction ('ltr' for left-to-right or 'rtl' for right-to-left).
29
+ */
30
+ function getElemDirection(elem) {
31
+ return window.getComputedStyle(elem).getPropertyValue("direction");
32
+ }
33
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/internal/get-directional-keys.js
34
+ var FIRST_KEYS$1 = [
35
+ ARROW_DOWN,
36
+ PAGE_UP,
37
+ HOME
38
+ ];
39
+ var LAST_KEYS$1 = [
40
+ ARROW_UP,
41
+ PAGE_DOWN,
42
+ "End"
43
+ ];
44
+ [...FIRST_KEYS$1, ...LAST_KEYS$1];
45
+ /**
46
+ * A utility function that returns the next key based on the direction and orientation.
47
+ */
48
+ function getNextKey(dir = "ltr", orientation = "horizontal") {
49
+ return {
50
+ horizontal: dir === "rtl" ? ARROW_LEFT : ARROW_RIGHT,
51
+ vertical: ARROW_DOWN
52
+ }[orientation];
53
+ }
54
+ /**
55
+ * A utility function that returns the previous key based on the direction and orientation.
56
+ */
57
+ function getPrevKey(dir = "ltr", orientation = "horizontal") {
58
+ return {
59
+ horizontal: dir === "rtl" ? ARROW_RIGHT : ARROW_LEFT,
60
+ vertical: ARROW_UP
61
+ }[orientation];
62
+ }
63
+ /**
64
+ * A utility function that returns the next and previous keys based on the direction
65
+ * and orientation.
66
+ */
67
+ function getDirectionalKeys(dir = "ltr", orientation = "horizontal") {
68
+ if (!["ltr", "rtl"].includes(dir)) dir = "ltr";
69
+ if (!["horizontal", "vertical"].includes(orientation)) orientation = "horizontal";
70
+ return {
71
+ nextKey: getNextKey(dir, orientation),
72
+ prevKey: getPrevKey(dir, orientation)
73
+ };
74
+ }
75
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/internal/css-escape.js
76
+ /**
77
+ * https://github.com/mathiasbynens/CSS.escape
78
+ *
79
+ * @param value - The value to escape for use as a CSS identifier
80
+ * @returns The escaped CSS identifier string
81
+ */
82
+ function cssEscape(value) {
83
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") return CSS.escape(value);
84
+ const length = value.length;
85
+ let index = -1;
86
+ let codeUnit;
87
+ let result = "";
88
+ const firstCodeUnit = value.charCodeAt(0);
89
+ if (length === 1 && firstCodeUnit === 45) return "\\" + value;
90
+ while (++index < length) {
91
+ codeUnit = value.charCodeAt(index);
92
+ if (codeUnit === 0) {
93
+ result += "�";
94
+ continue;
95
+ }
96
+ if (codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && codeUnit >= 48 && codeUnit <= 57 || index === 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit === 45) {
97
+ result += "\\" + codeUnit.toString(16) + " ";
98
+ continue;
99
+ }
100
+ if (codeUnit >= 128 || codeUnit === 45 || codeUnit === 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
101
+ result += value.charAt(index);
102
+ continue;
103
+ }
104
+ result += "\\" + value.charAt(index);
105
+ }
106
+ return result;
107
+ }
108
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/internal/roving-focus-group.js
109
+ var RovingFocusGroup = class {
110
+ #opts;
111
+ #currentTabStopId = box(null);
112
+ constructor(opts) {
113
+ this.#opts = opts;
114
+ }
115
+ getCandidateNodes() {
116
+ return [];
117
+ }
118
+ /**
119
+ * Excludes candidates whose closest `[rootAttr]` ancestor is a nested root
120
+ * rather than `rootNode` itself.
121
+ */
122
+ #ownCandidates(rootNode, candidates) {
123
+ const rootAttr = this.#opts.rootAttr;
124
+ if (!rootAttr) return candidates;
125
+ const rootSelector = `[${rootAttr}]`;
126
+ return candidates.filter((node) => node.closest(rootSelector) === rootNode);
127
+ }
128
+ focusFirstCandidate() {
129
+ const items = this.getCandidateNodes();
130
+ if (!items.length) return;
131
+ items[0]?.focus();
132
+ }
133
+ handleKeydown(node, e, both = false) {
134
+ const rootNode = this.#opts.rootNode.current;
135
+ if (!rootNode || !node) return;
136
+ const items = this.getCandidateNodes();
137
+ if (!items.length) return;
138
+ const currentIndex = items.indexOf(node);
139
+ const { nextKey, prevKey } = getDirectionalKeys(getElemDirection(rootNode), this.#opts.orientation.current);
140
+ const loop = this.#opts.loop.current;
141
+ const keyToIndex = {
142
+ [nextKey]: currentIndex + 1,
143
+ [prevKey]: currentIndex - 1,
144
+ [HOME]: 0,
145
+ ["End"]: items.length - 1
146
+ };
147
+ if (both) {
148
+ const altNextKey = nextKey === "ArrowDown" ? ARROW_RIGHT : ARROW_DOWN;
149
+ const altPrevKey = prevKey === "ArrowUp" ? ARROW_LEFT : ARROW_UP;
150
+ keyToIndex[altNextKey] = currentIndex + 1;
151
+ keyToIndex[altPrevKey] = currentIndex - 1;
152
+ }
153
+ let itemIndex = keyToIndex[e.key];
154
+ if (itemIndex === void 0) return;
155
+ e.preventDefault();
156
+ if (itemIndex < 0 && loop) itemIndex = items.length - 1;
157
+ else if (itemIndex === items.length && loop) itemIndex = 0;
158
+ const itemToFocus = items[itemIndex];
159
+ if (!itemToFocus) return;
160
+ itemToFocus.focus();
161
+ this.#currentTabStopId.current = itemToFocus.id;
162
+ this.#opts.onCandidateFocus?.(itemToFocus);
163
+ return itemToFocus;
164
+ }
165
+ getTabIndex(node) {
166
+ const items = this.getCandidateNodes();
167
+ const anyActive = this.#currentTabStopId.current !== null;
168
+ if (node && !anyActive && items[0] === node) {
169
+ this.#currentTabStopId.current = node.id;
170
+ return 0;
171
+ } else if (node?.id === this.#currentTabStopId.current) return 0;
172
+ return -1;
173
+ }
174
+ setCurrentTabStopId(id) {
175
+ this.#currentTabStopId.current = id;
176
+ }
177
+ focusCurrentTabStop() {
178
+ const currentTabStopId = this.#currentTabStopId.current;
179
+ if (!currentTabStopId) return;
180
+ const currentTabStop = this.#opts.rootNode.current?.querySelector(`#${cssEscape(currentTabStopId)}`);
181
+ if (!currentTabStop || !isHTMLElement(currentTabStop)) return;
182
+ currentTabStop.focus();
183
+ }
184
+ };
185
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/menu/utils.js
186
+ var SELECTION_KEYS = [ENTER, " "];
187
+ var FIRST_KEYS = [
188
+ ARROW_DOWN,
189
+ PAGE_UP,
190
+ HOME
191
+ ];
192
+ var LAST_KEYS = [
193
+ ARROW_UP,
194
+ PAGE_DOWN,
195
+ "End"
196
+ ];
197
+ var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
198
+ [...SELECTION_KEYS], [...SELECTION_KEYS];
199
+ function isMouseEvent(event) {
200
+ return event.pointerType === "mouse";
201
+ }
202
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/internal/focus.js
203
+ /**
204
+ * A utility function that focuses an element.
205
+ */
206
+ function focus(element, { select = false } = {}) {
207
+ if (!element || !element.focus) return;
208
+ const doc = getDocument(element);
209
+ if (doc.activeElement === element) return;
210
+ const previouslyFocusedElement = doc.activeElement;
211
+ element.focus({ preventScroll: true });
212
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
213
+ }
214
+ /**
215
+ * Attempts to focus the first element in a list of candidates.
216
+ * Stops when focus is successful.
217
+ */
218
+ function focusFirst(candidates, { select = false } = {}, getActiveElement) {
219
+ const previouslyFocusedElement = getActiveElement();
220
+ for (const candidate of candidates) {
221
+ focus(candidate, { select });
222
+ if (getActiveElement() !== previouslyFocusedElement) return true;
223
+ }
224
+ }
225
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/utilities/is-using-keyboard/is-using-keyboard.svelte.js
226
+ var isUsingKeyboard = false;
227
+ var IsUsingKeyboard = class {
228
+ static _refs = 0;
229
+ static _cleanup;
230
+ constructor() {}
231
+ get current() {
232
+ return isUsingKeyboard;
233
+ }
234
+ set current(value) {
235
+ isUsingKeyboard = value;
236
+ }
237
+ };
238
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/internal/tabbable.js
239
+ function getTabbableOptions() {
240
+ return {
241
+ getShadowRoot: true,
242
+ displayCheck: typeof ResizeObserver === "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
243
+ };
244
+ }
245
+ /**
246
+ * Gets all tabbable elements in the body and finds the next/previous tabbable element
247
+ * from the `currentNode` based on the `direction` provided.
248
+ * @param currentNode - the node we want to get the next/previous tabbable from
249
+ */
250
+ function getTabbableFrom(currentNode, direction) {
251
+ if (!isTabbable(currentNode, getTabbableOptions())) return getTabbableFromFocusable(currentNode, direction);
252
+ const doc = getDocument(currentNode);
253
+ const allTabbable = tabbable(doc.body, getTabbableOptions());
254
+ if (direction === "prev") allTabbable.reverse();
255
+ const activeIndex = allTabbable.indexOf(currentNode);
256
+ if (activeIndex === -1) return doc.body;
257
+ return allTabbable.slice(activeIndex + 1)[0];
258
+ }
259
+ function getTabbableFromFocusable(currentNode, direction) {
260
+ const doc = getDocument(currentNode);
261
+ if (!isFocusable(currentNode, getTabbableOptions())) return doc.body;
262
+ const allFocusable = focusable(doc.body, getTabbableOptions());
263
+ if (direction === "prev") allFocusable.reverse();
264
+ const activeIndex = allFocusable.indexOf(currentNode);
265
+ if (activeIndex === -1) return doc.body;
266
+ return allFocusable.slice(activeIndex + 1).find((node) => isTabbable(node, getTabbableOptions())) ?? doc.body;
267
+ }
268
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/menu/menu.svelte.js
269
+ var MenuRootContext = new Context("Menu.Root");
270
+ var MenuMenuContext = new Context("Menu.Root | Menu.Sub");
271
+ var MenuContentContext = new Context("Menu.Content");
272
+ new Context("Menu.Group | Menu.RadioGroup");
273
+ new Context("Menu.RadioGroup");
274
+ new Context("Menu.CheckboxGroup");
275
+ var MenuOpenEvent = new CustomEventDispatcher("bitsmenuopen", {
276
+ bubbles: false,
277
+ cancelable: true
278
+ });
279
+ var menuAttrs = createBitsAttrs({
280
+ component: "menu",
281
+ parts: [
282
+ "trigger",
283
+ "content",
284
+ "sub-trigger",
285
+ "item",
286
+ "group",
287
+ "group-heading",
288
+ "checkbox-group",
289
+ "checkbox-item",
290
+ "radio-group",
291
+ "radio-item",
292
+ "separator",
293
+ "sub-content",
294
+ "arrow"
295
+ ]
296
+ });
297
+ var SUBMENU_INTENT_TIMEOUT_MS = 100;
298
+ var SUBMENU_INTENT_MIN_PROGRESS_PX = 1;
299
+ var MenuSubmenuIntent = class {
300
+ #opts;
301
+ #cleanupDocMove = null;
302
+ #fallbackTimer = null;
303
+ #active = false;
304
+ #target = null;
305
+ #apex = null;
306
+ #pointerPoint = null;
307
+ #launchPoint = null;
308
+ #closestGap = null;
309
+ constructor(opts) {
310
+ this.#opts = opts;
311
+ watch([
312
+ opts.triggerNode,
313
+ opts.contentNode,
314
+ opts.enabled
315
+ ], ([triggerNode, contentNode, enabled]) => {
316
+ this.#reset();
317
+ if (!triggerNode || !contentNode || !enabled) return;
318
+ const onTriggerMove = (e) => {
319
+ if (!isMouseEvent(e)) return;
320
+ this.#launchPoint = {
321
+ x: e.clientX,
322
+ y: e.clientY
323
+ };
324
+ if (!this.#active) this.#preview(e, "content");
325
+ };
326
+ const onTriggerLeave = (e) => {
327
+ if (!isMouseEvent(e)) return;
328
+ this.#engage(e, "content");
329
+ };
330
+ const onContentMove = (e) => {
331
+ if (!isMouseEvent(e)) return;
332
+ if (!this.#active) this.#preview(e, "trigger");
333
+ };
334
+ const onContentLeave = (e) => {
335
+ if (!isMouseEvent(e)) return;
336
+ if (isElement(e.relatedTarget)) {
337
+ const selector = this.#opts.subContentSelector();
338
+ const matchedSubContent = e.relatedTarget.closest(selector);
339
+ if (matchedSubContent && matchedSubContent !== contentNode && matchedSubContent.id) {
340
+ if (!!contentNode.querySelector(`[aria-controls="${matchedSubContent.id}"]`)) return;
341
+ }
342
+ }
343
+ this.#engage(e, "trigger");
344
+ };
345
+ const onTriggerEnter = (e) => {
346
+ if (!isMouseEvent(e)) return;
347
+ this.#disengage();
348
+ };
349
+ const onContentEnter = (e) => {
350
+ if (!isMouseEvent(e)) return;
351
+ this.#disengage();
352
+ };
353
+ triggerNode.addEventListener("pointermove", onTriggerMove);
354
+ triggerNode.addEventListener("pointerleave", onTriggerLeave);
355
+ triggerNode.addEventListener("pointerenter", onTriggerEnter);
356
+ contentNode.addEventListener("pointermove", onContentMove);
357
+ contentNode.addEventListener("pointerleave", onContentLeave);
358
+ contentNode.addEventListener("pointerenter", onContentEnter);
359
+ return () => {
360
+ triggerNode.removeEventListener("pointermove", onTriggerMove);
361
+ triggerNode.removeEventListener("pointerleave", onTriggerLeave);
362
+ triggerNode.removeEventListener("pointerenter", onTriggerEnter);
363
+ contentNode.removeEventListener("pointermove", onContentMove);
364
+ contentNode.removeEventListener("pointerleave", onContentLeave);
365
+ contentNode.removeEventListener("pointerenter", onContentEnter);
366
+ this.#reset();
367
+ };
368
+ });
369
+ }
370
+ #parentTargetRect() {
371
+ const parent = this.#opts.parentContentNode();
372
+ if (parent) return parent.getBoundingClientRect();
373
+ return this.#opts.triggerNode()?.getBoundingClientRect() ?? null;
374
+ }
375
+ #computePolygons(pointerPt, target) {
376
+ const triggerNode = this.#opts.triggerNode();
377
+ const contentNode = this.#opts.contentNode();
378
+ if (!triggerNode || !contentNode) return null;
379
+ const triggerRect = triggerNode.getBoundingClientRect();
380
+ const contentRect = contentNode.getBoundingClientRect();
381
+ const side = getSide(triggerRect, contentRect);
382
+ let apex;
383
+ let targetRect;
384
+ let sourceRect;
385
+ if (target === "content") {
386
+ apex = this.#active ? this.#apex ?? pointerPt : pointerPt;
387
+ targetRect = contentRect;
388
+ } else {
389
+ apex = this.#launchPoint ?? pointerPt;
390
+ targetRect = this.#parentTargetRect() ?? triggerRect;
391
+ sourceRect = contentRect;
392
+ }
393
+ this.#apex = apex;
394
+ return {
395
+ corridor: getCorridorPolygon(triggerRect, contentRect, side),
396
+ intent: getIntentPolygon(apex, targetRect, side, target, sourceRect),
397
+ targetRect,
398
+ side
399
+ };
400
+ }
401
+ #isInSafeZone(pt, corridor, intent) {
402
+ return isPointInPolygon(pt, corridor) || isPointInPolygon(pt, intent);
403
+ }
404
+ #hasMovedCloser(pt, targetRect) {
405
+ const gap = getDistanceToRect(pt, targetRect);
406
+ if (this.#closestGap !== null && gap > this.#closestGap - SUBMENU_INTENT_MIN_PROGRESS_PX) return false;
407
+ this.#closestGap = gap;
408
+ return true;
409
+ }
410
+ #preview(e, target) {
411
+ const pt = {
412
+ x: e.clientX,
413
+ y: e.clientY
414
+ };
415
+ if (!this.#computePolygons(pt, target)) return;
416
+ this.#target = target;
417
+ this.#pointerPoint = pt;
418
+ }
419
+ #engage(e, target) {
420
+ if (!this.#opts.enabled()) return;
421
+ const triggerNode = this.#opts.triggerNode();
422
+ const contentNode = this.#opts.contentNode();
423
+ if (!triggerNode || !contentNode) return;
424
+ const related = e.relatedTarget;
425
+ if (isElement(related)) {
426
+ if (target === "content" && contentNode.contains(related)) return;
427
+ if (target === "trigger" && triggerNode.contains(related)) return;
428
+ }
429
+ const pt = {
430
+ x: e.clientX,
431
+ y: e.clientY
432
+ };
433
+ const geo = this.#computePolygons(pt, target);
434
+ if (!geo) return;
435
+ if (!isInsideRect(pt, geo.targetRect) && !this.#isInSafeZone(pt, geo.corridor, geo.intent)) {
436
+ this.#clearVisuals();
437
+ return;
438
+ }
439
+ this.#active = true;
440
+ this.#target = target;
441
+ this.#pointerPoint = pt;
442
+ this.#closestGap = getDistanceToRect(pt, geo.targetRect);
443
+ this.#opts.setIsPointerInTransit(true);
444
+ this.#attachDocMove();
445
+ this.#startFallback();
446
+ }
447
+ #disengageTimer = null;
448
+ #disengage() {
449
+ if (!this.#active) return;
450
+ const wasReturning = this.#target === "trigger";
451
+ this.#detachDocMove();
452
+ this.#clearFallback();
453
+ this.#active = false;
454
+ this.#clearVisuals();
455
+ if (wasReturning) {
456
+ this.#clearDisengageTimer();
457
+ this.#disengageTimer = setTimeout(() => {
458
+ this.#disengageTimer = null;
459
+ this.#opts.setIsPointerInTransit(false);
460
+ }, 100);
461
+ } else this.#opts.setIsPointerInTransit(false);
462
+ }
463
+ #clearDisengageTimer() {
464
+ if (this.#disengageTimer === null) return;
465
+ clearTimeout(this.#disengageTimer);
466
+ this.#disengageTimer = null;
467
+ }
468
+ #intentExit() {
469
+ const pointerPoint = this.#pointerPoint;
470
+ this.#detachDocMove();
471
+ this.#clearFallback();
472
+ this.#clearDisengageTimer();
473
+ this.#active = false;
474
+ this.#opts.setIsPointerInTransit(false);
475
+ this.#clearVisuals();
476
+ this.#opts.onIntentExit(pointerPoint);
477
+ }
478
+ #reset() {
479
+ this.#detachDocMove();
480
+ this.#clearFallback();
481
+ this.#clearDisengageTimer();
482
+ if (this.#active) this.#opts.setIsPointerInTransit(false);
483
+ this.#active = false;
484
+ this.#target = null;
485
+ this.#apex = null;
486
+ this.#pointerPoint = null;
487
+ this.#launchPoint = null;
488
+ this.#closestGap = null;
489
+ }
490
+ #isPointerInDescendantSubContent(pt) {
491
+ const contentNode = this.#opts.contentNode();
492
+ if (!contentNode) return false;
493
+ const el = contentNode.ownerDocument.elementFromPoint(pt.x, pt.y);
494
+ if (!el) return false;
495
+ const selector = this.#opts.subContentSelector();
496
+ const subContent = el.closest(selector);
497
+ if (!subContent || subContent === contentNode) return false;
498
+ if (subContent.id) return !!contentNode.querySelector(`[aria-controls="${subContent.id}"]`);
499
+ return false;
500
+ }
501
+ #onDocMove = (e) => {
502
+ if (!this.#active || !this.#target) return;
503
+ if (!isMouseEvent(e)) return;
504
+ const triggerNode = this.#opts.triggerNode();
505
+ const contentNode = this.#opts.contentNode();
506
+ if (!triggerNode || !contentNode) {
507
+ this.#intentExit();
508
+ return;
509
+ }
510
+ const pt = {
511
+ x: e.clientX,
512
+ y: e.clientY
513
+ };
514
+ this.#pointerPoint = pt;
515
+ const triggerRect = triggerNode.getBoundingClientRect();
516
+ const contentRect = contentNode.getBoundingClientRect();
517
+ if (this.#target === "content" && isInsideRect(pt, contentRect)) {
518
+ this.#disengage();
519
+ return;
520
+ }
521
+ if (this.#target === "trigger" && isInsideInsetRect(pt, triggerRect, 4)) {
522
+ this.#disengage();
523
+ return;
524
+ }
525
+ if (this.#isPointerInDescendantSubContent(pt)) {
526
+ this.#startFallback();
527
+ return;
528
+ }
529
+ const geo = this.#computePolygons(pt, this.#target);
530
+ if (!geo) {
531
+ this.#intentExit();
532
+ return;
533
+ }
534
+ if (this.#isInSafeZone(pt, geo.corridor, geo.intent)) {
535
+ if (this.#hasMovedCloser(pt, geo.targetRect)) this.#startFallback();
536
+ return;
537
+ }
538
+ this.#intentExit();
539
+ };
540
+ #attachDocMove() {
541
+ if (this.#cleanupDocMove) return;
542
+ const doc = getDocument(this.#opts.triggerNode() ?? this.#opts.contentNode());
543
+ if (!doc) return;
544
+ doc.addEventListener("pointermove", this.#onDocMove, true);
545
+ this.#cleanupDocMove = () => {
546
+ doc.removeEventListener("pointermove", this.#onDocMove, true);
547
+ this.#cleanupDocMove = null;
548
+ };
549
+ }
550
+ #detachDocMove() {
551
+ this.#cleanupDocMove?.();
552
+ }
553
+ #startFallback() {
554
+ this.#clearFallback();
555
+ this.#fallbackTimer = setTimeout(() => {
556
+ this.#fallbackTimer = null;
557
+ if (this.#active) this.#intentExit();
558
+ }, SUBMENU_INTENT_TIMEOUT_MS);
559
+ }
560
+ #clearFallback() {
561
+ if (this.#fallbackTimer === null) return;
562
+ clearTimeout(this.#fallbackTimer);
563
+ this.#fallbackTimer = null;
564
+ }
565
+ #clearVisuals() {
566
+ this.#target = null;
567
+ this.#apex = null;
568
+ this.#pointerPoint = null;
569
+ this.#closestGap = null;
570
+ }
571
+ };
572
+ function isPointInPolygon(point, polygon) {
573
+ const { x, y } = point;
574
+ let inside = false;
575
+ for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
576
+ const xi = polygon[i].x;
577
+ const yi = polygon[i].y;
578
+ const xj = polygon[j].x;
579
+ const yj = polygon[j].y;
580
+ if (yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) inside = !inside;
581
+ }
582
+ return inside;
583
+ }
584
+ function isInsideRect(point, rect) {
585
+ return point.x >= rect.left && point.x <= rect.right && point.y >= rect.top && point.y <= rect.bottom;
586
+ }
587
+ function isInsideInsetRect(point, rect, inset) {
588
+ return point.x >= rect.left + inset && point.x <= rect.right - inset && point.y >= rect.top + inset && point.y <= rect.bottom - inset;
589
+ }
590
+ function getDistanceToRect(point, rect) {
591
+ const dx = Math.max(rect.left - point.x, 0, point.x - rect.right);
592
+ const dy = Math.max(rect.top - point.y, 0, point.y - rect.bottom);
593
+ return Math.hypot(dx, dy);
594
+ }
595
+ function getSide(triggerRect, contentRect) {
596
+ const triggerCenterX = triggerRect.left + triggerRect.width / 2;
597
+ const triggerCenterY = triggerRect.top + triggerRect.height / 2;
598
+ const contentCenterX = contentRect.left + contentRect.width / 2;
599
+ const contentCenterY = contentRect.top + contentRect.height / 2;
600
+ const deltaX = contentCenterX - triggerCenterX;
601
+ const deltaY = contentCenterY - triggerCenterY;
602
+ if (Math.abs(deltaX) > Math.abs(deltaY)) return deltaX > 0 ? "right" : "left";
603
+ return deltaY > 0 ? "bottom" : "top";
604
+ }
605
+ function getCorridorPolygon(triggerRect, contentRect, side) {
606
+ const buffer = 2;
607
+ switch (side) {
608
+ case "top": return [
609
+ {
610
+ x: Math.min(triggerRect.left, contentRect.left) - buffer,
611
+ y: triggerRect.top
612
+ },
613
+ {
614
+ x: Math.min(triggerRect.left, contentRect.left) - buffer,
615
+ y: contentRect.bottom
616
+ },
617
+ {
618
+ x: Math.max(triggerRect.right, contentRect.right) + buffer,
619
+ y: contentRect.bottom
620
+ },
621
+ {
622
+ x: Math.max(triggerRect.right, contentRect.right) + buffer,
623
+ y: triggerRect.top
624
+ }
625
+ ];
626
+ case "bottom": return [
627
+ {
628
+ x: Math.min(triggerRect.left, contentRect.left) - buffer,
629
+ y: triggerRect.bottom
630
+ },
631
+ {
632
+ x: Math.min(triggerRect.left, contentRect.left) - buffer,
633
+ y: contentRect.top
634
+ },
635
+ {
636
+ x: Math.max(triggerRect.right, contentRect.right) + buffer,
637
+ y: contentRect.top
638
+ },
639
+ {
640
+ x: Math.max(triggerRect.right, contentRect.right) + buffer,
641
+ y: triggerRect.bottom
642
+ }
643
+ ];
644
+ case "left": return [
645
+ {
646
+ x: triggerRect.left,
647
+ y: Math.min(triggerRect.top, contentRect.top) - buffer
648
+ },
649
+ {
650
+ x: contentRect.right,
651
+ y: Math.min(triggerRect.top, contentRect.top) - buffer
652
+ },
653
+ {
654
+ x: contentRect.right,
655
+ y: Math.max(triggerRect.bottom, contentRect.bottom) + buffer
656
+ },
657
+ {
658
+ x: triggerRect.left,
659
+ y: Math.max(triggerRect.bottom, contentRect.bottom) + buffer
660
+ }
661
+ ];
662
+ case "right": return [
663
+ {
664
+ x: triggerRect.right,
665
+ y: Math.min(triggerRect.top, contentRect.top) - buffer
666
+ },
667
+ {
668
+ x: contentRect.left,
669
+ y: Math.min(triggerRect.top, contentRect.top) - buffer
670
+ },
671
+ {
672
+ x: contentRect.left,
673
+ y: Math.max(triggerRect.bottom, contentRect.bottom) + buffer
674
+ },
675
+ {
676
+ x: triggerRect.right,
677
+ y: Math.max(triggerRect.bottom, contentRect.bottom) + buffer
678
+ }
679
+ ];
680
+ }
681
+ }
682
+ function getIntentPolygon(exitPoint, targetRect, side, target, sourceRect) {
683
+ const edgeBuffer = 8;
684
+ const effectiveSide = target === "trigger" ? flipSide(side) : side;
685
+ const top = sourceRect ? Math.min(targetRect.top, sourceRect.top) - edgeBuffer : targetRect.top - edgeBuffer;
686
+ const bottom = sourceRect ? Math.max(targetRect.bottom, sourceRect.bottom) + edgeBuffer : targetRect.bottom + edgeBuffer;
687
+ const left = sourceRect ? Math.min(targetRect.left, sourceRect.left) - edgeBuffer : targetRect.left - edgeBuffer;
688
+ const right = sourceRect ? Math.max(targetRect.right, sourceRect.right) + edgeBuffer : targetRect.right + edgeBuffer;
689
+ switch (effectiveSide) {
690
+ case "right": return [
691
+ exitPoint,
692
+ {
693
+ x: targetRect.left,
694
+ y: top
695
+ },
696
+ {
697
+ x: targetRect.left,
698
+ y: bottom
699
+ }
700
+ ];
701
+ case "left": return [
702
+ exitPoint,
703
+ {
704
+ x: targetRect.right,
705
+ y: top
706
+ },
707
+ {
708
+ x: targetRect.right,
709
+ y: bottom
710
+ }
711
+ ];
712
+ case "bottom": return [
713
+ exitPoint,
714
+ {
715
+ x: left,
716
+ y: targetRect.top
717
+ },
718
+ {
719
+ x: right,
720
+ y: targetRect.top
721
+ }
722
+ ];
723
+ case "top": return [
724
+ exitPoint,
725
+ {
726
+ x: left,
727
+ y: targetRect.bottom
728
+ },
729
+ {
730
+ x: right,
731
+ y: targetRect.bottom
732
+ }
733
+ ];
734
+ }
735
+ }
736
+ function flipSide(side) {
737
+ switch (side) {
738
+ case "top": return "bottom";
739
+ case "bottom": return "top";
740
+ case "left": return "right";
741
+ case "right": return "left";
742
+ }
743
+ }
744
+ var MenuRootState = class MenuRootState {
745
+ static create(opts) {
746
+ const root = new MenuRootState(opts);
747
+ return MenuRootContext.set(root);
748
+ }
749
+ opts;
750
+ isUsingKeyboard = new IsUsingKeyboard();
751
+ ignoreCloseAutoFocus = false;
752
+ isPointerInTransit = false;
753
+ constructor(opts) {
754
+ this.opts = opts;
755
+ }
756
+ getBitsAttr = (part) => {
757
+ return menuAttrs.getAttr(part, this.opts.variant.current);
758
+ };
759
+ };
760
+ var MenuMenuState = class MenuMenuState {
761
+ static create(opts, root) {
762
+ return MenuMenuContext.set(new MenuMenuState(opts, root, null));
763
+ }
764
+ opts;
765
+ root;
766
+ parentMenu;
767
+ contentId = boxWith(() => "");
768
+ contentNode = null;
769
+ contentPresence;
770
+ triggerNode = null;
771
+ constructor(opts, root, parentMenu) {
772
+ this.opts = opts;
773
+ this.root = root;
774
+ this.parentMenu = parentMenu;
775
+ this.contentPresence = new PresenceManager({
776
+ ref: boxWith(() => this.contentNode),
777
+ open: this.opts.open,
778
+ onComplete: () => {
779
+ this.opts.onOpenChangeComplete.current(this.opts.open.current);
780
+ },
781
+ shouldSkipExitAnimation: () => {
782
+ if (this.root.opts.variant.current !== "menubar" || this.parentMenu !== null) return false;
783
+ return this.root.opts.shouldSkipExitAnimation?.() ?? false;
784
+ }
785
+ });
786
+ if (parentMenu) watch(() => parentMenu.opts.open.current, () => {
787
+ if (parentMenu.opts.open.current) return;
788
+ this.opts.open.current = false;
789
+ });
790
+ }
791
+ toggleOpen() {
792
+ this.opts.open.current = !this.opts.open.current;
793
+ }
794
+ onOpen() {
795
+ this.opts.open.current = true;
796
+ }
797
+ onClose() {
798
+ this.opts.open.current = false;
799
+ }
800
+ };
801
+ var MenuContentState = class MenuContentState {
802
+ static create(opts) {
803
+ return MenuContentContext.set(new MenuContentState(opts, MenuMenuContext.get()));
804
+ }
805
+ opts;
806
+ parentMenu;
807
+ rovingFocusGroup;
808
+ domContext;
809
+ attachment;
810
+ search = "";
811
+ #timer = 0;
812
+ #handleTypeaheadSearch;
813
+ mounted = false;
814
+ /**
815
+ * The item a press started on, and where. The content can scroll under a still
816
+ * pointer before the release, which then lands on a neighbouring item.
817
+ */
818
+ pressedItem = null;
819
+ #isSub;
820
+ constructor(opts, parentMenu) {
821
+ this.opts = opts;
822
+ this.parentMenu = parentMenu;
823
+ this.domContext = new DOMContext(opts.ref);
824
+ this.attachment = attachRef(this.opts.ref, (v) => {
825
+ if (this.parentMenu.contentNode !== v) this.parentMenu.contentNode = v;
826
+ });
827
+ parentMenu.contentId = opts.id;
828
+ this.#isSub = opts.isSub ?? false;
829
+ this.onkeydown = this.onkeydown.bind(this);
830
+ this.onblur = this.onblur.bind(this);
831
+ this.onfocus = this.onfocus.bind(this);
832
+ this.handleInteractOutside = this.handleInteractOutside.bind(this);
833
+ new MenuSubmenuIntent({
834
+ contentNode: () => this.parentMenu.contentNode,
835
+ triggerNode: () => this.parentMenu.triggerNode,
836
+ parentContentNode: () => this.parentMenu.parentMenu?.contentNode ?? null,
837
+ subContentSelector: () => `[${this.parentMenu.root.getBitsAttr("sub-content")}]`,
838
+ enabled: () => this.parentMenu.opts.open.current && Boolean(this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))),
839
+ onIntentExit: (pointerPoint) => {
840
+ this.parentMenu.opts.open.current = false;
841
+ this.#dispatchPointerMoveToHoveredSubTrigger(pointerPoint);
842
+ },
843
+ setIsPointerInTransit: (value) => {
844
+ this.parentMenu.root.isPointerInTransit = value;
845
+ }
846
+ });
847
+ this.#handleTypeaheadSearch = new DOMTypeahead({
848
+ getActiveElement: () => this.domContext.getActiveElement(),
849
+ getWindow: () => this.domContext.getWindow()
850
+ }).handleTypeaheadSearch;
851
+ this.rovingFocusGroup = new RovingFocusGroup({
852
+ rootNode: boxWith(() => this.parentMenu.contentNode),
853
+ candidateAttr: this.parentMenu.root.getBitsAttr("item"),
854
+ loop: this.opts.loop,
855
+ orientation: boxWith(() => "vertical")
856
+ });
857
+ watch(() => this.parentMenu.contentNode, (contentNode) => {
858
+ if (!contentNode) return;
859
+ const handler = () => {
860
+ afterTick(() => {
861
+ if (!this.parentMenu.root.isUsingKeyboard.current) return;
862
+ this.rovingFocusGroup.focusFirstCandidate();
863
+ });
864
+ };
865
+ return MenuOpenEvent.listen(contentNode, handler);
866
+ });
867
+ }
868
+ #getCandidateNodes() {
869
+ const node = this.parentMenu.contentNode;
870
+ if (!node) return [];
871
+ return Array.from(node.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`));
872
+ }
873
+ #isPointerMovingToSubmenu() {
874
+ return this.parentMenu.root.isPointerInTransit;
875
+ }
876
+ #dispatchPointerMoveToHoveredSubTrigger(pointerPoint) {
877
+ if (!pointerPoint) return;
878
+ const parentContentNode = this.parentMenu.parentMenu?.contentNode;
879
+ if (!parentContentNode) return;
880
+ const hoveredNode = this.domContext.getDocument().elementFromPoint(pointerPoint.x, pointerPoint.y);
881
+ if (!isElement(hoveredNode)) return;
882
+ const hoveredSubTrigger = hoveredNode.closest(`[${this.parentMenu.root.getBitsAttr("sub-trigger")}]`);
883
+ if (!hoveredSubTrigger || !parentContentNode.contains(hoveredSubTrigger)) return;
884
+ if (hoveredSubTrigger === this.parentMenu.triggerNode) return;
885
+ hoveredSubTrigger.dispatchEvent(new PointerEvent("pointermove", {
886
+ bubbles: true,
887
+ cancelable: true,
888
+ pointerType: "mouse",
889
+ clientX: pointerPoint.x,
890
+ clientY: pointerPoint.y
891
+ }));
892
+ }
893
+ onCloseAutoFocus = (e) => {
894
+ this.opts.onCloseAutoFocus.current?.(e);
895
+ if (e.defaultPrevented || this.#isSub) return;
896
+ if (this.parentMenu.root.ignoreCloseAutoFocus) {
897
+ e.preventDefault();
898
+ return;
899
+ }
900
+ if (this.parentMenu.triggerNode && isTabbable(this.parentMenu.triggerNode)) {
901
+ e.preventDefault();
902
+ this.parentMenu.triggerNode.focus();
903
+ }
904
+ };
905
+ handleTabKeyDown(e) {
906
+ /**
907
+ * We locate the root `menu`'s trigger by going up the tree until
908
+ * we find a menu that has no parent. This will allow us to focus the next
909
+ * tabbable element before/after the root trigger.
910
+ */
911
+ let rootMenu = this.parentMenu;
912
+ while (rootMenu.parentMenu !== null) rootMenu = rootMenu.parentMenu;
913
+ if (!rootMenu.triggerNode) return;
914
+ e.preventDefault();
915
+ const nodeToFocus = getTabbableFrom(rootMenu.triggerNode, e.shiftKey ? "prev" : "next");
916
+ if (nodeToFocus) {
917
+ /**
918
+ * We set a flag to ignore the `onCloseAutoFocus` event handler
919
+ * as well as the fallbacks inside the focus scope to prevent
920
+ * race conditions causing focus to fall back to the body even
921
+ * though we're trying to focus the next tabbable element.
922
+ */
923
+ this.parentMenu.root.ignoreCloseAutoFocus = true;
924
+ rootMenu.onClose();
925
+ afterTick(() => {
926
+ nodeToFocus.focus();
927
+ afterTick(() => {
928
+ this.parentMenu.root.ignoreCloseAutoFocus = false;
929
+ });
930
+ });
931
+ } else this.domContext.getDocument().body.focus();
932
+ }
933
+ onkeydown(e) {
934
+ if (e.defaultPrevented) return;
935
+ if (e.key === "Tab") {
936
+ this.handleTabKeyDown(e);
937
+ return;
938
+ }
939
+ const target = e.target;
940
+ const currentTarget = e.currentTarget;
941
+ if (!isHTMLElement(target) || !isHTMLElement(currentTarget)) return;
942
+ const isKeydownInside = target.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id === this.parentMenu.contentId.current;
943
+ const isModifierKey = e.ctrlKey || e.altKey || e.metaKey;
944
+ const isCharacterKey = e.key.length === 1;
945
+ if (this.rovingFocusGroup.handleKeydown(target, e)) return;
946
+ if (e.code === "Space") return;
947
+ const candidateNodes = this.#getCandidateNodes();
948
+ if (isKeydownInside) {
949
+ if (!isModifierKey && isCharacterKey) this.#handleTypeaheadSearch(e.key, candidateNodes);
950
+ }
951
+ if (e.target?.id !== this.parentMenu.contentId.current) return;
952
+ if (!FIRST_LAST_KEYS.includes(e.key)) return;
953
+ e.preventDefault();
954
+ if (LAST_KEYS.includes(e.key)) candidateNodes.reverse();
955
+ focusFirst(candidateNodes, { select: false }, () => this.domContext.getActiveElement());
956
+ }
957
+ onblur(e) {
958
+ if (!isElement(e.currentTarget)) return;
959
+ if (!isElement(e.target)) return;
960
+ if (!e.currentTarget.contains?.(e.target)) {
961
+ this.domContext.getWindow().clearTimeout(this.#timer);
962
+ this.search = "";
963
+ }
964
+ }
965
+ onfocus(_) {
966
+ if (!this.parentMenu.root.isUsingKeyboard.current) return;
967
+ afterTick(() => this.rovingFocusGroup.focusFirstCandidate());
968
+ }
969
+ onItemEnter() {
970
+ return this.#isPointerMovingToSubmenu();
971
+ }
972
+ onItemLeave(e) {
973
+ if (e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))) return;
974
+ if (this.#isPointerMovingToSubmenu() || this.parentMenu.root.isUsingKeyboard.current) return;
975
+ if (!this.parentMenu.opts.open.current) return;
976
+ this.parentMenu.contentNode?.focus({ preventScroll: true });
977
+ this.rovingFocusGroup.setCurrentTabStopId("");
978
+ }
979
+ onTriggerLeave() {
980
+ if (this.#isPointerMovingToSubmenu()) return true;
981
+ return false;
982
+ }
983
+ handleInteractOutside(e) {
984
+ if (!isElementOrSVGElement(e.target)) return;
985
+ if (isEventTargetWithin(e, this.parentMenu.triggerNode)) {
986
+ e.preventDefault();
987
+ return;
988
+ }
989
+ /**
990
+ * when the menu closes due to an outside pointer interaction (for example,
991
+ * clicking another dropdown trigger), avoid focusing this menu's trigger
992
+ * to prevent stealing focus from the new interaction target.
993
+ */
994
+ this.parentMenu.root.ignoreCloseAutoFocus = true;
995
+ afterTick(() => {
996
+ this.parentMenu.root.ignoreCloseAutoFocus = false;
997
+ });
998
+ }
999
+ clearPressedItem = () => {
1000
+ this.pressedItem = null;
1001
+ };
1002
+ get shouldRender() {
1003
+ return this.parentMenu.contentPresence.shouldRender;
1004
+ }
1005
+ #snippetProps = $.derived(() => ({ open: this.parentMenu.opts.open.current }));
1006
+ get snippetProps() {
1007
+ return this.#snippetProps();
1008
+ }
1009
+ set snippetProps($$value) {
1010
+ return this.#snippetProps($$value);
1011
+ }
1012
+ #props = $.derived(() => ({
1013
+ id: this.opts.id.current,
1014
+ role: "menu",
1015
+ "aria-orientation": "vertical",
1016
+ [this.parentMenu.root.getBitsAttr("content")]: "",
1017
+ "data-state": getDataOpenClosed(this.parentMenu.opts.open.current),
1018
+ ...getDataTransitionAttrs(this.parentMenu.contentPresence.transitionStatus),
1019
+ onkeydown: this.onkeydown,
1020
+ onblur: this.onblur,
1021
+ onfocus: this.onfocus,
1022
+ onpointerdowncapture: this.clearPressedItem,
1023
+ dir: this.parentMenu.root.opts.dir.current,
1024
+ style: {
1025
+ pointerEvents: "auto",
1026
+ contain: "layout style"
1027
+ },
1028
+ ...this.attachment
1029
+ }));
1030
+ get props() {
1031
+ return this.#props();
1032
+ }
1033
+ set props($$value) {
1034
+ return this.#props($$value);
1035
+ }
1036
+ popperProps = { onCloseAutoFocus: (e) => this.onCloseAutoFocus(e) };
1037
+ };
1038
+ var MenuItemSharedState = class {
1039
+ opts;
1040
+ content;
1041
+ attachment;
1042
+ #isFocused = false;
1043
+ constructor(opts, content) {
1044
+ this.opts = opts;
1045
+ this.content = content;
1046
+ this.attachment = attachRef(this.opts.ref);
1047
+ this.onpointermove = this.onpointermove.bind(this);
1048
+ this.onpointerleave = this.onpointerleave.bind(this);
1049
+ this.onfocus = this.onfocus.bind(this);
1050
+ this.onblur = this.onblur.bind(this);
1051
+ }
1052
+ onpointermove(e) {
1053
+ if (e.defaultPrevented) return;
1054
+ if (!isMouseEvent(e)) return;
1055
+ if (this.opts.disabled.current) this.content.onItemLeave(e);
1056
+ else {
1057
+ if (this.content.onItemEnter()) return;
1058
+ const item = e.currentTarget;
1059
+ if (!isHTMLElement(item)) return;
1060
+ item.focus({ preventScroll: true });
1061
+ }
1062
+ }
1063
+ onpointerleave(e) {
1064
+ if (e.defaultPrevented) return;
1065
+ if (!isMouseEvent(e)) return;
1066
+ this.content.onItemLeave(e);
1067
+ }
1068
+ onfocus(e) {
1069
+ afterTick(() => {
1070
+ if (e.defaultPrevented || this.opts.disabled.current) return;
1071
+ this.#isFocused = true;
1072
+ });
1073
+ }
1074
+ onblur(e) {
1075
+ afterTick(() => {
1076
+ if (e.defaultPrevented) return;
1077
+ this.#isFocused = false;
1078
+ });
1079
+ }
1080
+ #props = $.derived(() => ({
1081
+ id: this.opts.id.current,
1082
+ tabindex: -1,
1083
+ role: "menuitem",
1084
+ "aria-disabled": boolToStr(this.opts.disabled.current),
1085
+ "data-disabled": boolToEmptyStrOrUndef(this.opts.disabled.current),
1086
+ "data-highlighted": this.#isFocused ? "" : void 0,
1087
+ [this.content.parentMenu.root.getBitsAttr("item")]: "",
1088
+ onpointermove: this.onpointermove,
1089
+ onpointerleave: this.onpointerleave,
1090
+ onfocus: this.onfocus,
1091
+ onblur: this.onblur,
1092
+ ...this.attachment
1093
+ }));
1094
+ get props() {
1095
+ return this.#props();
1096
+ }
1097
+ set props($$value) {
1098
+ return this.#props($$value);
1099
+ }
1100
+ };
1101
+ var MenuItemState = class MenuItemState {
1102
+ static create(opts) {
1103
+ const item = new MenuItemSharedState(opts, MenuContentContext.get());
1104
+ return new MenuItemState(opts, item);
1105
+ }
1106
+ opts;
1107
+ item;
1108
+ root;
1109
+ constructor(opts, item) {
1110
+ this.opts = opts;
1111
+ this.item = item;
1112
+ this.root = item.content.parentMenu.root;
1113
+ this.onkeydown = this.onkeydown.bind(this);
1114
+ this.onclick = this.onclick.bind(this);
1115
+ this.onpointerdown = this.onpointerdown.bind(this);
1116
+ this.onpointerup = this.onpointerup.bind(this);
1117
+ }
1118
+ #handleSelect() {
1119
+ if (this.item.opts.disabled.current) return;
1120
+ const selectEvent = new CustomEvent("menuitemselect", {
1121
+ bubbles: true,
1122
+ cancelable: true
1123
+ });
1124
+ this.opts.onSelect.current(selectEvent);
1125
+ if (selectEvent.defaultPrevented) {
1126
+ this.item.content.parentMenu.root.isUsingKeyboard.current = false;
1127
+ return;
1128
+ }
1129
+ if (this.opts.closeOnSelect.current) this.item.content.parentMenu.root.opts.onClose();
1130
+ }
1131
+ onkeydown(e) {
1132
+ const isTypingAhead = this.item.content.search !== "";
1133
+ if (this.item.opts.disabled.current || isTypingAhead && e.key === " ") return;
1134
+ if (SELECTION_KEYS.includes(e.key)) {
1135
+ if (!isHTMLElement(e.currentTarget)) return;
1136
+ e.currentTarget.click();
1137
+ /**
1138
+ * We prevent default browser behavior for selection keys as they should trigger
1139
+ * a selection only:
1140
+ * - prevents space from scrolling the page.
1141
+ * - if keydown causes focus to move, prevents keydown from firing on the new target.
1142
+ */
1143
+ e.preventDefault();
1144
+ }
1145
+ }
1146
+ onclick(_) {
1147
+ if (this.item.opts.disabled.current) return;
1148
+ this.#handleSelect();
1149
+ }
1150
+ onpointerup(e) {
1151
+ const content = this.item.content;
1152
+ const press = content.pressedItem;
1153
+ content.pressedItem = null;
1154
+ if (e.defaultPrevented) return;
1155
+ if (press?.item === this) return;
1156
+ const target = press && Math.hypot(e.clientX - press.x, e.clientY - press.y) < 4 ? press.item.item.opts.ref.current : e.currentTarget;
1157
+ if (!isHTMLElement(target)) return;
1158
+ target.click();
1159
+ }
1160
+ onpointerdown(e) {
1161
+ this.item.content.pressedItem = {
1162
+ item: this,
1163
+ x: e.clientX,
1164
+ y: e.clientY
1165
+ };
1166
+ }
1167
+ #props = $.derived(() => mergeProps(this.item.props, {
1168
+ onclick: this.onclick,
1169
+ onpointerdown: this.onpointerdown,
1170
+ onpointerup: this.onpointerup,
1171
+ onkeydown: this.onkeydown
1172
+ }));
1173
+ get props() {
1174
+ return this.#props();
1175
+ }
1176
+ set props($$value) {
1177
+ return this.#props($$value);
1178
+ }
1179
+ };
1180
+ var MenuSeparatorState = class MenuSeparatorState {
1181
+ static create(opts) {
1182
+ return new MenuSeparatorState(opts, MenuRootContext.get());
1183
+ }
1184
+ opts;
1185
+ root;
1186
+ attachment;
1187
+ constructor(opts, root) {
1188
+ this.opts = opts;
1189
+ this.root = root;
1190
+ this.attachment = attachRef(this.opts.ref);
1191
+ }
1192
+ #props = $.derived(() => ({
1193
+ id: this.opts.id.current,
1194
+ role: "separator",
1195
+ [this.root.getBitsAttr("separator")]: "",
1196
+ ...this.attachment
1197
+ }));
1198
+ get props() {
1199
+ return this.#props();
1200
+ }
1201
+ set props($$value) {
1202
+ return this.#props($$value);
1203
+ }
1204
+ };
1205
+ var DropdownMenuTriggerState = class DropdownMenuTriggerState {
1206
+ static create(opts) {
1207
+ return new DropdownMenuTriggerState(opts, MenuMenuContext.get());
1208
+ }
1209
+ opts;
1210
+ parentMenu;
1211
+ attachment;
1212
+ constructor(opts, parentMenu) {
1213
+ this.opts = opts;
1214
+ this.parentMenu = parentMenu;
1215
+ this.attachment = attachRef(this.opts.ref, (v) => this.parentMenu.triggerNode = v);
1216
+ }
1217
+ onclick = (e) => {
1218
+ /**
1219
+ * MacOS VoiceOver sends a click in Safari/Firefox bypassing the keydown event
1220
+ * when V0+Space is pressed. Since we already handle the keydown event and the
1221
+ * pointerdown events separately, we ignore it if the detail is not 0.
1222
+ */
1223
+ if (this.opts.disabled.current || e.detail !== 0) return;
1224
+ this.parentMenu.toggleOpen();
1225
+ e.preventDefault();
1226
+ };
1227
+ onpointerdown = (e) => {
1228
+ if (this.opts.disabled.current || isDisabledElement(this.opts.ref.current)) return;
1229
+ if (e.pointerType === "touch") return e.preventDefault();
1230
+ if (e.button === 0 && e.ctrlKey === false) {
1231
+ this.parentMenu.toggleOpen();
1232
+ if (!this.parentMenu.opts.open.current) e.preventDefault();
1233
+ }
1234
+ };
1235
+ onpointerup = (e) => {
1236
+ if (this.opts.disabled.current || isDisabledElement(this.opts.ref.current)) return;
1237
+ if (e.pointerType === "touch") {
1238
+ e.preventDefault();
1239
+ this.parentMenu.toggleOpen();
1240
+ }
1241
+ };
1242
+ onkeydown = (e) => {
1243
+ if (this.opts.disabled.current) return;
1244
+ if (e.key === " " || e.key === "Enter") {
1245
+ this.parentMenu.toggleOpen();
1246
+ e.preventDefault();
1247
+ return;
1248
+ }
1249
+ if (e.key === "ArrowDown") {
1250
+ this.parentMenu.onOpen();
1251
+ e.preventDefault();
1252
+ }
1253
+ };
1254
+ #ariaControls = $.derived(() => {
1255
+ if (this.parentMenu.opts.open.current && this.parentMenu.contentId.current) return this.parentMenu.contentId.current;
1256
+ });
1257
+ #props = $.derived(() => ({
1258
+ id: this.opts.id.current,
1259
+ disabled: this.opts.disabled.current,
1260
+ "aria-haspopup": "menu",
1261
+ "aria-expanded": boolToStr(this.parentMenu.opts.open.current),
1262
+ "aria-controls": this.#ariaControls(),
1263
+ "data-disabled": boolToEmptyStrOrUndef(this.opts.disabled.current),
1264
+ "data-state": getDataOpenClosed(this.parentMenu.opts.open.current),
1265
+ [this.parentMenu.root.getBitsAttr("trigger")]: "",
1266
+ onclick: this.onclick,
1267
+ onpointerdown: this.onpointerdown,
1268
+ onpointerup: this.onpointerup,
1269
+ onkeydown: this.onkeydown,
1270
+ ...this.attachment
1271
+ }));
1272
+ get props() {
1273
+ return this.#props();
1274
+ }
1275
+ set props($$value) {
1276
+ return this.#props($$value);
1277
+ }
1278
+ };
1279
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/menu/components/menu-item.svelte
1280
+ function Menu_item($$renderer, $$props) {
1281
+ $$renderer.component(($$renderer) => {
1282
+ const uid = $.props_id($$renderer);
1283
+ let { child, children, ref = null, id = createId(uid), disabled = false, onSelect = noop, closeOnSelect = true, $$slots, $$events, ...restProps } = $$props;
1284
+ const itemState = MenuItemState.create({
1285
+ id: boxWith(() => id),
1286
+ disabled: boxWith(() => disabled),
1287
+ onSelect: boxWith(() => onSelect),
1288
+ ref: boxWith(() => ref, (v) => ref = v),
1289
+ closeOnSelect: boxWith(() => closeOnSelect)
1290
+ });
1291
+ const mergedProps = $.derived(() => mergeProps(restProps, itemState.props));
1292
+ if (child) {
1293
+ $$renderer.push("<!--[0-->");
1294
+ child($$renderer, { props: mergedProps() });
1295
+ $$renderer.push(`<!---->`);
1296
+ } else {
1297
+ $$renderer.push(`<!--[-1--><div${$.attributes({ ...mergedProps() })}>`);
1298
+ children?.($$renderer);
1299
+ $$renderer.push(`<!----></div>`);
1300
+ }
1301
+ $$renderer.push(`<!--]-->`);
1302
+ $.bind_props($$props, { ref });
1303
+ });
1304
+ }
1305
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/menu/components/menu-separator.svelte
1306
+ function Menu_separator($$renderer, $$props) {
1307
+ $$renderer.component(($$renderer) => {
1308
+ const uid = $.props_id($$renderer);
1309
+ let { ref = null, id = createId(uid), child, children, $$slots, $$events, ...restProps } = $$props;
1310
+ const separatorState = MenuSeparatorState.create({
1311
+ id: boxWith(() => id),
1312
+ ref: boxWith(() => ref, (v) => ref = v)
1313
+ });
1314
+ const mergedProps = $.derived(() => mergeProps(restProps, separatorState.props));
1315
+ if (child) {
1316
+ $$renderer.push("<!--[0-->");
1317
+ child($$renderer, { props: mergedProps() });
1318
+ $$renderer.push(`<!---->`);
1319
+ } else {
1320
+ $$renderer.push(`<!--[-1--><div${$.attributes({ ...mergedProps() })}>`);
1321
+ children?.($$renderer);
1322
+ $$renderer.push(`<!----></div>`);
1323
+ }
1324
+ $$renderer.push(`<!--]-->`);
1325
+ $.bind_props($$props, { ref });
1326
+ });
1327
+ }
1328
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/menu/components/menu.svelte
1329
+ function Menu($$renderer, $$props) {
1330
+ $$renderer.component(($$renderer) => {
1331
+ let { open = false, dir, onOpenChange = noop, onOpenChangeComplete = noop, _internal_variant: variant = "dropdown-menu", _internal_should_skip_exit_animation: shouldSkipExitAnimation = void 0, children } = $$props;
1332
+ const root = MenuRootState.create({
1333
+ variant: boxWith(() => variant),
1334
+ dir: resolveDirProp(() => dir),
1335
+ onClose: () => {
1336
+ open = false;
1337
+ onOpenChange(false);
1338
+ },
1339
+ shouldSkipExitAnimation: () => shouldSkipExitAnimation?.() ?? false
1340
+ });
1341
+ MenuMenuState.create({
1342
+ open: boxWith(() => open, (v) => {
1343
+ open = v;
1344
+ onOpenChange(v);
1345
+ }),
1346
+ onOpenChangeComplete: boxWith(() => onOpenChangeComplete)
1347
+ }, root);
1348
+ Floating_layer($$renderer, {
1349
+ children: ($$renderer) => {
1350
+ children?.($$renderer);
1351
+ $$renderer.push(`<!---->`);
1352
+ },
1353
+ $$slots: { default: true }
1354
+ });
1355
+ $.bind_props($$props, { open });
1356
+ });
1357
+ }
1358
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/dropdown-menu/components/dropdown-menu-content.svelte
1359
+ function Dropdown_menu_content$1($$renderer, $$props) {
1360
+ $$renderer.component(($$renderer) => {
1361
+ const uid = $.props_id($$renderer);
1362
+ let { id = createId(uid), child, children, ref = null, loop = true, onInteractOutside = noop, onEscapeKeydown = noop, onCloseAutoFocus = noop, forceMount = false, trapFocus = false, style, $$slots, $$events, ...restProps } = $$props;
1363
+ const contentState = MenuContentState.create({
1364
+ id: boxWith(() => id),
1365
+ loop: boxWith(() => loop),
1366
+ ref: boxWith(() => ref, (v) => ref = v),
1367
+ onCloseAutoFocus: boxWith(() => onCloseAutoFocus)
1368
+ });
1369
+ const mergedProps = $.derived(() => mergeProps(restProps, contentState.props));
1370
+ function handleInteractOutside(e) {
1371
+ contentState.handleInteractOutside(e);
1372
+ if (e.defaultPrevented) return;
1373
+ onInteractOutside(e);
1374
+ if (e.defaultPrevented) return;
1375
+ if (e.target && e.target instanceof Element) {
1376
+ const subContentSelector = `[${contentState.parentMenu.root.getBitsAttr("sub-content")}]`;
1377
+ if (getEventTargetClosest(e, subContentSelector)) return;
1378
+ }
1379
+ contentState.parentMenu.onClose();
1380
+ }
1381
+ function handleEscapeKeydown(e) {
1382
+ onEscapeKeydown(e);
1383
+ if (e.defaultPrevented) return;
1384
+ contentState.parentMenu.onClose();
1385
+ }
1386
+ if (forceMount) {
1387
+ $$renderer.push("<!--[0-->");
1388
+ {
1389
+ function popper($$renderer, { props, wrapperProps }) {
1390
+ const finalProps = mergeProps(props, { style: getFloatingContentCSSVars("dropdown-menu") }, { style });
1391
+ if (child) {
1392
+ $$renderer.push("<!--[0-->");
1393
+ child($$renderer, {
1394
+ props: finalProps,
1395
+ wrapperProps,
1396
+ ...contentState.snippetProps
1397
+ });
1398
+ $$renderer.push(`<!---->`);
1399
+ } else {
1400
+ $$renderer.push(`<!--[-1--><div${$.attributes({ ...wrapperProps })}><div${$.attributes({ ...finalProps })}>`);
1401
+ children?.($$renderer);
1402
+ $$renderer.push(`<!----></div></div>`);
1403
+ }
1404
+ $$renderer.push(`<!--]-->`);
1405
+ }
1406
+ Popper_layer_force_mount($$renderer, $.spread_props([
1407
+ mergedProps(),
1408
+ contentState.popperProps,
1409
+ {
1410
+ ref: contentState.opts.ref,
1411
+ enabled: contentState.parentMenu.opts.open.current,
1412
+ onInteractOutside: handleInteractOutside,
1413
+ onEscapeKeydown: handleEscapeKeydown,
1414
+ trapFocus,
1415
+ loop,
1416
+ forceMount: true,
1417
+ id,
1418
+ shouldRender: contentState.shouldRender,
1419
+ popper,
1420
+ $$slots: { popper: true }
1421
+ }
1422
+ ]));
1423
+ }
1424
+ } else if (!forceMount) {
1425
+ $$renderer.push("<!--[1-->");
1426
+ {
1427
+ function popper($$renderer, { props, wrapperProps }) {
1428
+ const finalProps = mergeProps(props, { style: getFloatingContentCSSVars("dropdown-menu") }, { style });
1429
+ if (child) {
1430
+ $$renderer.push("<!--[0-->");
1431
+ child($$renderer, {
1432
+ props: finalProps,
1433
+ wrapperProps,
1434
+ ...contentState.snippetProps
1435
+ });
1436
+ $$renderer.push(`<!---->`);
1437
+ } else {
1438
+ $$renderer.push(`<!--[-1--><div${$.attributes({ ...wrapperProps })}><div${$.attributes({ ...finalProps })}>`);
1439
+ children?.($$renderer);
1440
+ $$renderer.push(`<!----></div></div>`);
1441
+ }
1442
+ $$renderer.push(`<!--]-->`);
1443
+ }
1444
+ Popper_layer($$renderer, $.spread_props([
1445
+ mergedProps(),
1446
+ contentState.popperProps,
1447
+ {
1448
+ ref: contentState.opts.ref,
1449
+ open: contentState.parentMenu.opts.open.current,
1450
+ onInteractOutside: handleInteractOutside,
1451
+ onEscapeKeydown: handleEscapeKeydown,
1452
+ trapFocus,
1453
+ loop,
1454
+ forceMount: false,
1455
+ id,
1456
+ shouldRender: contentState.shouldRender,
1457
+ popper,
1458
+ $$slots: { popper: true }
1459
+ }
1460
+ ]));
1461
+ }
1462
+ } else $$renderer.push("<!--[-1-->");
1463
+ $$renderer.push(`<!--]-->`);
1464
+ $.bind_props($$props, { ref });
1465
+ });
1466
+ }
1467
+ // ../node_modules/.bun/bits-ui@2.22.0+d1c897ff0ec09ac1/node_modules/bits-ui/dist/bits/menu/components/menu-trigger.svelte
1468
+ function Menu_trigger($$renderer, $$props) {
1469
+ $$renderer.component(($$renderer) => {
1470
+ const uid = $.props_id($$renderer);
1471
+ let { id = createId(uid), ref = null, child, children, disabled = false, type = "button", $$slots, $$events, ...restProps } = $$props;
1472
+ const triggerState = DropdownMenuTriggerState.create({
1473
+ id: boxWith(() => id),
1474
+ disabled: boxWith(() => disabled ?? false),
1475
+ ref: boxWith(() => ref, (v) => ref = v)
1476
+ });
1477
+ const mergedProps = $.derived(() => mergeProps(restProps, triggerState.props, { type }));
1478
+ Floating_layer_anchor($$renderer, {
1479
+ id,
1480
+ ref: triggerState.opts.ref,
1481
+ children: ($$renderer) => {
1482
+ if (child) {
1483
+ $$renderer.push("<!--[0-->");
1484
+ child($$renderer, { props: mergedProps() });
1485
+ $$renderer.push(`<!---->`);
1486
+ } else {
1487
+ $$renderer.push(`<!--[-1--><button${$.attributes({ ...mergedProps() })}>`);
1488
+ children?.($$renderer);
1489
+ $$renderer.push(`<!----></button>`);
1490
+ }
1491
+ $$renderer.push(`<!--]-->`);
1492
+ },
1493
+ $$slots: { default: true }
1494
+ });
1495
+ $.bind_props($$props, { ref });
1496
+ });
1497
+ }
1498
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+53b8171973259528/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu.svelte
1499
+ function Dropdown_menu($$renderer, $$props) {
1500
+ const { children, $$slots, $$events, ...restProps } = $$props;
1501
+ if (Menu) {
1502
+ $$renderer.push("<!--[-->");
1503
+ Menu($$renderer, $.spread_props([restProps, {
1504
+ children: ($$renderer) => {
1505
+ if (children) {
1506
+ $$renderer.push("<!--[0-->");
1507
+ children($$renderer);
1508
+ $$renderer.push(`<!---->`);
1509
+ } else $$renderer.push("<!--[-1-->");
1510
+ $$renderer.push(`<!--]-->`);
1511
+ },
1512
+ $$slots: { default: true }
1513
+ }]));
1514
+ $$renderer.push("<!--]-->");
1515
+ } else {
1516
+ $$renderer.push("<!--[!-->");
1517
+ $$renderer.push("<!--]-->");
1518
+ }
1519
+ }
1520
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+53b8171973259528/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte
1521
+ function Dropdown_menu_content($$renderer, $$props) {
1522
+ $$renderer.component(($$renderer) => {
1523
+ let { ref = null, class: className, sideOffset = 4, children, $$slots, $$events, ...restProps } = $$props;
1524
+ let $$settled = true;
1525
+ let $$inner_renderer;
1526
+ function $$render_inner($$renderer) {
1527
+ if (Dropdown_menu_content$1) {
1528
+ $$renderer.push("<!--[-->");
1529
+ Dropdown_menu_content$1($$renderer, $.spread_props([
1530
+ {
1531
+ sideOffset,
1532
+ class: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", className)
1533
+ },
1534
+ restProps,
1535
+ {
1536
+ get ref() {
1537
+ return ref;
1538
+ },
1539
+ set ref($$value) {
1540
+ ref = $$value;
1541
+ $$settled = false;
1542
+ },
1543
+ children: ($$renderer) => {
1544
+ if (children) {
1545
+ $$renderer.push("<!--[0-->");
1546
+ children($$renderer);
1547
+ $$renderer.push(`<!---->`);
1548
+ } else $$renderer.push("<!--[-1-->");
1549
+ $$renderer.push(`<!--]-->`);
1550
+ },
1551
+ $$slots: { default: true }
1552
+ }
1553
+ ]));
1554
+ $$renderer.push("<!--]-->");
1555
+ } else {
1556
+ $$renderer.push("<!--[!-->");
1557
+ $$renderer.push("<!--]-->");
1558
+ }
1559
+ }
1560
+ do {
1561
+ $$settled = true;
1562
+ $$inner_renderer = $$renderer.copy();
1563
+ $$render_inner($$inner_renderer);
1564
+ } while (!$$settled);
1565
+ $$renderer.subsume($$inner_renderer);
1566
+ $.bind_props($$props, { ref });
1567
+ });
1568
+ }
1569
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+53b8171973259528/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte
1570
+ function Dropdown_menu_item($$renderer, $$props) {
1571
+ $$renderer.component(($$renderer) => {
1572
+ let { ref = null, class: className, inset, children, $$slots, $$events, ...restProps } = $$props;
1573
+ let $$settled = true;
1574
+ let $$inner_renderer;
1575
+ function $$render_inner($$renderer) {
1576
+ if (Menu_item) {
1577
+ $$renderer.push("<!--[-->");
1578
+ Menu_item($$renderer, $.spread_props([
1579
+ { class: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className) },
1580
+ restProps,
1581
+ {
1582
+ get ref() {
1583
+ return ref;
1584
+ },
1585
+ set ref($$value) {
1586
+ ref = $$value;
1587
+ $$settled = false;
1588
+ },
1589
+ children: ($$renderer) => {
1590
+ if (children) {
1591
+ $$renderer.push("<!--[0-->");
1592
+ children($$renderer);
1593
+ $$renderer.push(`<!---->`);
1594
+ } else $$renderer.push("<!--[-1-->");
1595
+ $$renderer.push(`<!--]-->`);
1596
+ },
1597
+ $$slots: { default: true }
1598
+ }
1599
+ ]));
1600
+ $$renderer.push("<!--]-->");
1601
+ } else {
1602
+ $$renderer.push("<!--[!-->");
1603
+ $$renderer.push("<!--]-->");
1604
+ }
1605
+ }
1606
+ do {
1607
+ $$settled = true;
1608
+ $$inner_renderer = $$renderer.copy();
1609
+ $$render_inner($$inner_renderer);
1610
+ } while (!$$settled);
1611
+ $$renderer.subsume($$inner_renderer);
1612
+ $.bind_props($$props, { ref });
1613
+ });
1614
+ }
1615
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+53b8171973259528/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte
1616
+ function Dropdown_menu_separator($$renderer, $$props) {
1617
+ $$renderer.component(($$renderer) => {
1618
+ let { ref = null, class: className, $$slots, $$events, ...restProps } = $$props;
1619
+ let $$settled = true;
1620
+ let $$inner_renderer;
1621
+ function $$render_inner($$renderer) {
1622
+ if (Menu_separator) {
1623
+ $$renderer.push("<!--[-->");
1624
+ Menu_separator($$renderer, $.spread_props([
1625
+ { class: cn("-mx-1 my-1 h-px bg-muted", className) },
1626
+ restProps,
1627
+ {
1628
+ get ref() {
1629
+ return ref;
1630
+ },
1631
+ set ref($$value) {
1632
+ ref = $$value;
1633
+ $$settled = false;
1634
+ }
1635
+ }
1636
+ ]));
1637
+ $$renderer.push("<!--]-->");
1638
+ } else {
1639
+ $$renderer.push("<!--[!-->");
1640
+ $$renderer.push("<!--]-->");
1641
+ }
1642
+ }
1643
+ do {
1644
+ $$settled = true;
1645
+ $$inner_renderer = $$renderer.copy();
1646
+ $$render_inner($$inner_renderer);
1647
+ } while (!$$settled);
1648
+ $$renderer.subsume($$inner_renderer);
1649
+ $.bind_props($$props, { ref });
1650
+ });
1651
+ }
1652
+ // ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+53b8171973259528/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
1653
+ function Dropdown_menu_trigger($$renderer, $$props) {
1654
+ $$renderer.component(($$renderer) => {
1655
+ let { ref = null, child, children, $$slots, $$events, ...restProps } = $$props;
1656
+ let $$settled = true;
1657
+ let $$inner_renderer;
1658
+ function $$render_inner($$renderer) {
1659
+ if (child) {
1660
+ $$renderer.push("<!--[0-->");
1661
+ function renderChild($$renderer, snippetProps) {
1662
+ child?.($$renderer, snippetProps);
1663
+ $$renderer.push(`<!---->`);
1664
+ }
1665
+ if (Menu_trigger) {
1666
+ $$renderer.push("<!--[-->");
1667
+ Menu_trigger($$renderer, $.spread_props([restProps, {
1668
+ child: renderChild,
1669
+ get ref() {
1670
+ return ref;
1671
+ },
1672
+ set ref($$value) {
1673
+ ref = $$value;
1674
+ $$settled = false;
1675
+ }
1676
+ }]));
1677
+ $$renderer.push("<!--]-->");
1678
+ } else {
1679
+ $$renderer.push("<!--[!-->");
1680
+ $$renderer.push("<!--]-->");
1681
+ }
1682
+ } else {
1683
+ $$renderer.push("<!--[-1-->");
1684
+ if (Menu_trigger) {
1685
+ $$renderer.push("<!--[-->");
1686
+ Menu_trigger($$renderer, $.spread_props([restProps, {
1687
+ get ref() {
1688
+ return ref;
1689
+ },
1690
+ set ref($$value) {
1691
+ ref = $$value;
1692
+ $$settled = false;
1693
+ },
1694
+ children: ($$renderer) => {
1695
+ if (children) {
1696
+ $$renderer.push("<!--[0-->");
1697
+ children($$renderer);
1698
+ $$renderer.push(`<!---->`);
1699
+ } else $$renderer.push("<!--[-1-->");
1700
+ $$renderer.push(`<!--]-->`);
1701
+ },
1702
+ $$slots: { default: true }
1703
+ }]));
1704
+ $$renderer.push("<!--]-->");
1705
+ } else {
1706
+ $$renderer.push("<!--[!-->");
1707
+ $$renderer.push("<!--]-->");
1708
+ }
1709
+ }
1710
+ $$renderer.push(`<!--]-->`);
1711
+ }
1712
+ do {
1713
+ $$settled = true;
1714
+ $$inner_renderer = $$renderer.copy();
1715
+ $$render_inner($$inner_renderer);
1716
+ } while (!$$settled);
1717
+ $$renderer.subsume($$inner_renderer);
1718
+ $.bind_props($$props, { ref });
1719
+ });
1720
+ }
1721
+ export { Dropdown_menu as a, Dropdown_menu_content as i, Dropdown_menu_separator as n, Dropdown_menu_item as r, Dropdown_menu_trigger as t };