@hiai-gg/docsmint 0.3.6 → 0.3.8

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 (237) hide show
  1. package/backend/src/lib/logger.ts +45 -15
  2. package/dist/backend/index.js +238 -150
  3. package/dist/frontend/CategoryDialog-DphkZqIB.js +611 -0
  4. package/dist/frontend/ConfirmDialog-BLF3x_hr.js +214 -0
  5. package/dist/frontend/CreateSnapshotDialog-D5vPvFTL.js +216 -0
  6. package/dist/frontend/DatePicker-CLNTdvTk.js +259 -0
  7. package/dist/frontend/DeleteDialog-DxYFJivN.js +174 -0
  8. package/dist/frontend/FolderDialog-CRVZM2Oi.js +250 -0
  9. package/dist/frontend/FolderNode-C2zG7uii.js +298 -0
  10. package/dist/frontend/FolderTreeSelector-CyB8y2Sm.js +103 -0
  11. package/dist/frontend/Icon-CooFj4Ee.js +64 -0
  12. package/dist/frontend/SettingsDialog-DCM4-N6_.js +1016 -0
  13. package/dist/frontend/ShareDialog-DYu3RKQu.js +165 -0
  14. package/dist/frontend/TagCreateDialog-DXQs2bL9.js +260 -0
  15. package/dist/frontend/api/attachments.d.ts +6 -0
  16. package/dist/frontend/api/attachments.js +2 -0
  17. package/dist/frontend/api/categories.js +1 -1
  18. package/dist/frontend/api/documents.js +1 -1
  19. package/dist/frontend/api/folders.js +1 -1
  20. package/dist/frontend/api/settings.js +1 -1
  21. package/dist/frontend/api/share.d.ts +5 -0
  22. package/dist/frontend/api/share.js +2 -0
  23. package/dist/frontend/api/tags.js +1 -1
  24. package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
  25. package/dist/frontend/attachments-BuILSs56.js +50 -0
  26. package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
  27. package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
  28. package/dist/frontend/camera-iKXDOOWT.js +29 -0
  29. package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
  30. package/dist/frontend/check-D-UuvBuh.js +25 -0
  31. package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
  32. package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
  33. package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
  34. package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
  35. package/dist/frontend/clock-DJHbHZb8.js +29 -0
  36. package/dist/frontend/clsx-C7bIvsDS.js +1738 -0
  37. package/dist/frontend/collaboration.d.ts +6 -0
  38. package/dist/frontend/collaboration.js +182 -0
  39. package/dist/frontend/components/category-dialog.d.ts +2 -0
  40. package/dist/frontend/components/category-dialog.js +2 -0
  41. package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
  42. package/dist/frontend/components/create-snapshot-dialog.js +2 -0
  43. package/dist/frontend/components/delete-dialog.d.ts +2 -0
  44. package/dist/frontend/components/delete-dialog.js +2 -0
  45. package/dist/frontend/components/editor/document-editor.d.ts +3 -0
  46. package/dist/frontend/components/editor/document-editor.js +3032 -0
  47. package/dist/frontend/components/editor/document-title.d.ts +2 -0
  48. package/dist/frontend/components/editor/document-title.js +31 -0
  49. package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
  50. package/dist/frontend/components/editor/docx-serializer.js +14600 -0
  51. package/dist/frontend/components/editor/extensions.d.ts +2 -0
  52. package/dist/frontend/components/editor/extensions.js +2 -0
  53. package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
  54. package/dist/frontend/components/editor/markdown-toggle.js +72 -0
  55. package/dist/frontend/components/editor/markdown.d.ts +1 -0
  56. package/dist/frontend/components/editor/markdown.js +2 -0
  57. package/dist/frontend/components/folder-node.d.ts +3 -0
  58. package/dist/frontend/components/folder-node.js +2 -0
  59. package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
  60. package/dist/frontend/components/folder-tree-selector.js +2 -0
  61. package/dist/frontend/components/save-as-dialog.d.ts +2 -0
  62. package/dist/frontend/components/save-as-dialog.js +272 -0
  63. package/dist/frontend/components/settings.js +1 -1
  64. package/dist/frontend/components/share-dialog.d.ts +2 -0
  65. package/dist/frontend/components/share-dialog.js +2 -0
  66. package/dist/frontend/components/sidebar.js +1145 -3693
  67. package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
  68. package/dist/frontend/components/tag-create-dialog.js +2 -0
  69. package/dist/frontend/components/version-history.d.ts +2 -0
  70. package/dist/frontend/components/version-history.js +294 -0
  71. package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
  72. package/dist/frontend/copy-GppwRMjX.js +32 -0
  73. package/dist/frontend/dashboard.js +1113 -1157
  74. package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
  75. package/dist/frontend/dialog-D6NxYVmy.js +213 -0
  76. package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
  77. package/dist/frontend/doc-tabs.d.ts +7 -0
  78. package/dist/frontend/doc-tabs.js +14 -0
  79. package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
  80. package/dist/frontend/document-drop-coordinator.d.ts +2 -0
  81. package/dist/frontend/document-drop-coordinator.js +2 -0
  82. package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
  83. package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
  84. package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
  85. package/dist/frontend/extension.js +8 -7
  86. package/dist/frontend/floating-layer-anchor-CPwucTfd.js +4515 -0
  87. package/dist/frontend/folder-DeWhnD7O.js +45 -0
  88. package/dist/frontend/folder-refresh.d.ts +8 -0
  89. package/dist/frontend/folder-refresh.js +2 -0
  90. package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
  91. package/dist/frontend/frontend.css +1 -1
  92. package/dist/frontend/i18n.js +1 -1
  93. package/dist/frontend/identity-DyWeNzu_.js +69 -0
  94. package/dist/frontend/input-B5Rak-5G.js +23 -0
  95. package/dist/frontend/keyboard.d.ts +14 -0
  96. package/dist/frontend/keyboard.js +2 -0
  97. package/dist/frontend/keyboard.svelte-CApmX0vl.js +133 -0
  98. package/dist/frontend/label-CW9rxoAb.js +30 -0
  99. package/dist/frontend/loader-circle-BA6aLO71.js +268 -0
  100. package/dist/frontend/markdown-BwnyjITU.js +11 -0
  101. package/dist/frontend/messages-BpYaLbzE.js +1091 -0
  102. package/dist/frontend/offline/identity.d.ts +6 -0
  103. package/dist/frontend/offline/identity.js +2 -0
  104. package/dist/frontend/resolve-BG4HgzpN.js +19 -0
  105. package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
  106. package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
  107. package/dist/frontend/search.js +637 -602
  108. package/dist/frontend/select-value-sF86Geyh.js +1446 -0
  109. package/dist/frontend/settings-blyobazp.js +62 -0
  110. package/dist/frontend/share-Cu7SSJuJ.js +28 -0
  111. package/dist/frontend/shared-document.js +94 -93
  112. package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
  113. package/dist/frontend/tag-HxRazVN_.js +54 -0
  114. package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
  115. package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
  116. package/dist/frontend/textarea-i1720bE7.js +23 -0
  117. package/dist/frontend/theme.js +1 -1
  118. package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
  119. package/dist/frontend/types.d.ts +6 -0
  120. package/dist/frontend/types.js +0 -0
  121. package/dist/frontend/utils/clipboard.d.ts +1 -0
  122. package/dist/frontend/utils/clipboard.js +2 -0
  123. package/dist/frontend/utils/dndzone.d.ts +4 -0
  124. package/dist/frontend/utils/dndzone.js +2 -0
  125. package/dist/frontend/utils-CffiyuTo.js +19 -0
  126. package/dist/frontend/utils-hzdMVeCv.js +7 -0
  127. package/dist/frontend/utils.d.ts +4 -0
  128. package/dist/frontend/utils.js +2 -0
  129. package/dist/frontend/x-CzBsnJ2x.js +25 -0
  130. package/dist/frontend-ssr/api/attachments.js +2 -0
  131. package/dist/frontend-ssr/api/categories.js +2 -0
  132. package/dist/frontend-ssr/api/documents.js +2 -0
  133. package/dist/frontend-ssr/api/folders.js +2 -0
  134. package/dist/frontend-ssr/api/settings.js +2 -0
  135. package/dist/frontend-ssr/api/share.js +2 -0
  136. package/dist/frontend-ssr/api/tags.js +2 -0
  137. package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
  138. package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
  139. package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
  140. package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
  141. package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
  142. package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
  143. package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
  144. package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
  145. package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
  146. package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
  147. package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
  148. package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
  149. package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
  150. package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
  151. package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
  152. package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
  153. package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
  154. package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
  155. package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
  156. package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
  157. package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
  158. package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
  159. package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
  160. package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
  161. package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
  162. package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
  163. package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
  164. package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
  165. package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
  166. package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
  167. package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
  168. package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
  169. package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
  170. package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
  171. package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
  172. package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
  173. package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
  174. package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
  175. package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
  176. package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
  177. package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
  178. package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
  179. package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
  180. package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
  181. package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
  182. package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
  183. package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
  184. package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
  185. package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
  186. package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
  187. package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
  188. package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
  189. package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
  190. package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
  191. package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
  192. package/dist/frontend-ssr/collaboration.js +39 -0
  193. package/dist/frontend-ssr/components/category-dialog.js +2 -0
  194. package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
  195. package/dist/frontend-ssr/components/delete-dialog.js +2 -0
  196. package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
  197. package/dist/frontend-ssr/components/editor/document-title.js +11 -0
  198. package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
  199. package/dist/frontend-ssr/components/editor/extensions.js +2 -0
  200. package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
  201. package/dist/frontend-ssr/components/editor/markdown.js +2 -0
  202. package/dist/frontend-ssr/components/folder-node.js +2 -0
  203. package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
  204. package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
  205. package/dist/frontend-ssr/components/settings.js +2 -0
  206. package/dist/frontend-ssr/components/share-dialog.js +2 -0
  207. package/dist/frontend-ssr/components/sidebar.js +2033 -0
  208. package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
  209. package/dist/frontend-ssr/components/version-history.js +370 -0
  210. package/dist/frontend-ssr/dashboard.js +2542 -0
  211. package/dist/frontend-ssr/doc-tabs.js +23 -0
  212. package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
  213. package/dist/frontend-ssr/extension.js +13 -0
  214. package/dist/frontend-ssr/folder-refresh.js +2 -0
  215. package/dist/frontend-ssr/i18n.js +10 -0
  216. package/dist/frontend-ssr/keyboard.js +2 -0
  217. package/dist/frontend-ssr/offline/identity.js +2 -0
  218. package/dist/frontend-ssr/search.js +332 -0
  219. package/dist/frontend-ssr/shared-document.js +273 -0
  220. package/dist/frontend-ssr/theme.js +9 -0
  221. package/dist/frontend-ssr/types.js +1 -0
  222. package/dist/frontend-ssr/utils/clipboard.js +2 -0
  223. package/dist/frontend-ssr/utils/dndzone.js +2 -0
  224. package/dist/frontend-ssr/utils.js +2 -0
  225. package/package.json +130 -1
  226. package/packages/cli/src/index.ts +1 -1
  227. package/packages/db/src/schema.ts +3 -0
  228. package/packages/mcp-server/src/index.ts +1 -1
  229. package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
  230. package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
  231. package/dist/frontend/client-C6QQGb0e.js +0 -2766
  232. package/dist/frontend/input-ieWIt8I7.js +0 -257
  233. package/dist/frontend/messages-CTGAsqFu.js +0 -1106
  234. package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
  235. package/dist/frontend/tag-C5xrg-bb.js +0 -53
  236. package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
  237. package/dist/frontend/theme.svelte-ei0QxXa8.js +0 -49
@@ -0,0 +1,45 @@
1
+ import { createContext } from "svelte";
2
+ //#region src/lib/extensions/context.ts
3
+ /**
4
+ * Create a fresh manifest for one app/request.
5
+ *
6
+ * A new array is created for every category so an SSR request or HMR update
7
+ * cannot mutate another request's extension set.
8
+ */
9
+ function createFrontendExtensions(initial = {}) {
10
+ return {
11
+ navigation: [...initial.navigation ?? []],
12
+ dashboardWidgets: [...initial.dashboardWidgets ?? []],
13
+ searchWidgets: [...initial.searchWidgets ?? []],
14
+ documentTabs: [...initial.documentTabs ?? []],
15
+ editorActions: [...initial.editorActions ?? []],
16
+ documentMenuActions: [...initial.documentMenuActions ?? []],
17
+ settingsSections: [...initial.settingsSections ?? []],
18
+ commandPaletteActions: [...initial.commandPaletteActions ?? []],
19
+ sharedDocumentHeaderActions: [...initial.sharedDocumentHeaderActions ?? []],
20
+ sharedDocumentTabs: [...initial.sharedDocumentTabs ?? []],
21
+ sharedDocumentNotesModes: [...initial.sharedDocumentNotesModes ?? []],
22
+ sharedDocumentEditorModes: [...initial.sharedDocumentEditorModes ?? []]
23
+ };
24
+ }
25
+ /**
26
+ * Svelte's context storage is scoped to a component tree, which makes this
27
+ * safe for concurrent SSR requests. Do not replace this with a module-level
28
+ * mutable registry.
29
+ */
30
+ var [getProvidedFrontendExtensions, setFrontendExtensions] = createContext();
31
+ /**
32
+ * Read the request-scoped manifest, defaulting to an empty manifest for the
33
+ * standalone open-source application. This keeps every host backward
34
+ * compatible when no extension provider is mounted above it.
35
+ */
36
+ function getFrontendExtensions() {
37
+ return getProvidedFrontendExtensions() ?? createFrontendExtensions();
38
+ }
39
+ function provideFrontendExtensions(initial = {}) {
40
+ const extensions = createFrontendExtensions(initial);
41
+ setFrontendExtensions(extensions);
42
+ return extensions;
43
+ }
44
+ //#endregion
45
+ export { provideFrontendExtensions as n, getFrontendExtensions as t };
@@ -0,0 +1,87 @@
1
+ import { t as Icon } from "./Icon-B0Zqppjo.js";
2
+ import * as $ from "svelte/internal/server";
3
+ //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/copy.svelte
4
+ function Copy($$renderer, $$props) {
5
+ const $$sanitized_props = $.sanitize_props($$props);
6
+ /**
7
+ * @license lucide-svelte v1.0.1 - ISC
8
+ *
9
+ * ISC License
10
+ *
11
+ * Copyright (c) 2026 Lucide Icons and Contributors
12
+ *
13
+ * Permission to use, copy, modify, and/or distribute this software for any
14
+ * purpose with or without fee is hereby granted, provided that the above
15
+ * copyright notice and this permission notice appear in all copies.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
18
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
19
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
20
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
22
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
23
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24
+ *
25
+ * ---
26
+ *
27
+ * The following Lucide icons are derived from the Feather project:
28
+ *
29
+ * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
30
+ *
31
+ * The MIT License (MIT) (for the icons listed above)
32
+ *
33
+ * Copyright (c) 2013-present Cole Bemis
34
+ *
35
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
36
+ * of this software and associated documentation files (the "Software"), to deal
37
+ * in the Software without restriction, including without limitation the rights
38
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
39
+ * copies of the Software, and to permit persons to whom the Software is
40
+ * furnished to do so, subject to the following conditions:
41
+ *
42
+ * The above copyright notice and this permission notice shall be included in all
43
+ * copies or substantial portions of the Software.
44
+ *
45
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
46
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
47
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
48
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
49
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
50
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
51
+ * SOFTWARE.
52
+ *
53
+ */
54
+ Icon($$renderer, $.spread_props([
55
+ { name: "copy" },
56
+ $$sanitized_props,
57
+ {
58
+ /**
59
+ * @component @name Copy
60
+ * @description Lucide SVG icon component, renders SVG Element with children.
61
+ *
62
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHg9IjgiIHk9IjgiIHJ4PSIyIiByeT0iMiIgLz4KICA8cGF0aCBkPSJNNCAxNmMtMS4xIDAtMi0uOS0yLTJWNGMwLTEuMS45LTIgMi0yaDEwYzEuMSAwIDIgLjkgMiAyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/copy
63
+ * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
64
+ *
65
+ * @param {Object} props - Lucide icons props and any valid SVG attribute
66
+ * @returns {FunctionalComponent} Svelte component
67
+ *
68
+ */
69
+ iconNode: [["rect", {
70
+ "width": "14",
71
+ "height": "14",
72
+ "x": "8",
73
+ "y": "8",
74
+ "rx": "2",
75
+ "ry": "2"
76
+ }], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]],
77
+ children: ($$renderer) => {
78
+ $$renderer.push(`<!--[-->`);
79
+ $.slot($$renderer, $$props, "default", {}, null);
80
+ $$renderer.push(`<!--]-->`);
81
+ },
82
+ $$slots: { default: true }
83
+ }
84
+ ]));
85
+ }
86
+ //#endregion
87
+ export { Copy as t };
@@ -0,0 +1,65 @@
1
+ import { i as offlineDbName } from "./identity-B3uHoDtf.js";
2
+ import Dexie from "dexie";
3
+ //#region src/lib/db/index.ts
4
+ /**
5
+ * Dexie-backed offline database. One instance per offline identity; the
6
+ * instance is scoped by `offlineDbName(identity)`.
7
+ */
8
+ var OfflineDB = class extends Dexie {
9
+ documents;
10
+ folders;
11
+ drafts;
12
+ mutationQueue;
13
+ metadata;
14
+ constructor(identity) {
15
+ super(offlineDbName(identity));
16
+ this.version(1).stores({
17
+ documents: "id, ownerId, tenantId, folderId, updatedAt",
18
+ folders: "id, ownerId, tenantId, parentId, name",
19
+ drafts: "docId, ownerId, tenantId, updatedAt",
20
+ mutationQueue: "++id, docId, op, status",
21
+ metadata: "key"
22
+ });
23
+ this.version(2).stores({
24
+ documents: "id, ownerId, tenantId, folderId, updatedAt",
25
+ folders: "id, ownerId, tenantId, parentId, name",
26
+ drafts: "docId, ownerId, tenantId, updatedAt",
27
+ mutationQueue: "++id, docId, op, status, createdAt",
28
+ metadata: "key"
29
+ });
30
+ this.version(3).stores({
31
+ documents: "id, ownerId, tenantId, folderId, updatedAt",
32
+ folders: "id, ownerId, tenantId, parentId, name",
33
+ drafts: "docId, ownerId, tenantId, updatedAt",
34
+ mutationQueue: null,
35
+ metadata: "key"
36
+ });
37
+ }
38
+ };
39
+ var dbCache = /* @__PURE__ */ new Map();
40
+ /**
41
+ * Get (or create and cache) the offline DB for the given identity. The same
42
+ * identity always returns the same Dexie instance so connections and
43
+ * in-flight transactions are shared.
44
+ */
45
+ function getOfflineDB(identity) {
46
+ const name = offlineDbName(identity);
47
+ let db = dbCache.get(name);
48
+ if (!db) {
49
+ db = new OfflineDB(identity);
50
+ dbCache.set(name, db);
51
+ }
52
+ return db;
53
+ }
54
+ async function deleteOfflineDB(identity) {
55
+ const name = offlineDbName(identity);
56
+ const db = dbCache.get(name);
57
+ if (db) {
58
+ await db.delete();
59
+ dbCache.delete(name);
60
+ return;
61
+ }
62
+ await Dexie.delete(name);
63
+ }
64
+ //#endregion
65
+ export { getOfflineDB as n, deleteOfflineDB as t };
@@ -0,0 +1,157 @@
1
+ import { t as cn } from "./utils-DtlPPXpJ.js";
2
+ import * as $ from "svelte/internal/server";
3
+ import { tv } from "tailwind-variants";
4
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/button/button.svelte
5
+ function Button($$renderer, $$props) {
6
+ $$renderer.component(($$renderer) => {
7
+ let { class: className, variant = "default", size = "default", ref = null, href = void 0, children, $$slots, $$events, ...restProps } = $$props;
8
+ if (href) {
9
+ $$renderer.push("<!--[0-->");
10
+ $$renderer.push(`<a${$.attributes({
11
+ href,
12
+ class: $.clsx(cn(buttonVariants({
13
+ variant,
14
+ size
15
+ }), className)),
16
+ ...restProps
17
+ })}>`);
18
+ if (children) {
19
+ $$renderer.push("<!--[0-->");
20
+ children($$renderer);
21
+ $$renderer.push(`<!---->`);
22
+ } else $$renderer.push("<!--[-1-->");
23
+ $$renderer.push(`<!--]--></a>`);
24
+ } else {
25
+ $$renderer.push("<!--[-1-->");
26
+ $$renderer.push(`<button${$.attributes({
27
+ class: $.clsx(cn(buttonVariants({
28
+ variant,
29
+ size
30
+ }), className)),
31
+ ...restProps
32
+ })}>`);
33
+ if (children) {
34
+ $$renderer.push("<!--[0-->");
35
+ children($$renderer);
36
+ $$renderer.push(`<!---->`);
37
+ } else $$renderer.push("<!--[-1-->");
38
+ $$renderer.push(`<!--]--></button>`);
39
+ }
40
+ $$renderer.push(`<!--]-->`);
41
+ $.bind_props($$props, { ref });
42
+ });
43
+ }
44
+ //#endregion
45
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/button/index.js
46
+ var buttonVariants = tv({
47
+ base: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
48
+ variants: {
49
+ variant: {
50
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
51
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
52
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
53
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
54
+ ghost: "hover:bg-accent hover:text-accent-foreground",
55
+ link: "text-primary underline-offset-4 hover:underline"
56
+ },
57
+ size: {
58
+ default: "h-9 px-4 py-2",
59
+ sm: "h-8 rounded-md px-3 text-xs",
60
+ lg: "h-10 rounded-md px-8",
61
+ icon: "h-9 w-9"
62
+ }
63
+ },
64
+ defaultVariants: {
65
+ variant: "default",
66
+ size: "default"
67
+ }
68
+ });
69
+ //#endregion
70
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog.svelte
71
+ function Dialog($$renderer, $$props) {
72
+ $$renderer.component(($$renderer) => {
73
+ let { open = false, onOpenChange, children } = $$props;
74
+ if (open) {
75
+ $$renderer.push("<!--[0-->");
76
+ $$renderer.push(`<div class="fixed inset-0 z-50 flex items-center justify-center"><div class="fixed inset-0 bg-black/80" aria-hidden="true"></div> <div class="relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg" role="dialog" aria-modal="true">`);
77
+ if (children) {
78
+ $$renderer.push("<!--[0-->");
79
+ children($$renderer);
80
+ $$renderer.push(`<!---->`);
81
+ } else $$renderer.push("<!--[-1-->");
82
+ $$renderer.push(`<!--]--></div></div>`);
83
+ } else $$renderer.push("<!--[-1-->");
84
+ $$renderer.push(`<!--]-->`);
85
+ $.bind_props($$props, { open });
86
+ });
87
+ }
88
+ //#endregion
89
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-description.svelte
90
+ function Dialog_description($$renderer, $$props) {
91
+ $$renderer.component(($$renderer) => {
92
+ const { class: className, children, $$slots, $$events, ...restProps } = $$props;
93
+ $$renderer.push(`<p${$.attributes({
94
+ class: $.clsx(cn("text-sm text-muted-foreground", className)),
95
+ ...restProps
96
+ })}>`);
97
+ if (children) {
98
+ $$renderer.push("<!--[0-->");
99
+ children($$renderer);
100
+ $$renderer.push(`<!---->`);
101
+ } else $$renderer.push("<!--[-1-->");
102
+ $$renderer.push(`<!--]--></p>`);
103
+ });
104
+ }
105
+ //#endregion
106
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-footer.svelte
107
+ function Dialog_footer($$renderer, $$props) {
108
+ $$renderer.component(($$renderer) => {
109
+ const { class: className, children, $$slots, $$events, ...restProps } = $$props;
110
+ $$renderer.push(`<div${$.attributes({
111
+ class: $.clsx(cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)),
112
+ ...restProps
113
+ })}>`);
114
+ if (children) {
115
+ $$renderer.push("<!--[0-->");
116
+ children($$renderer);
117
+ $$renderer.push(`<!---->`);
118
+ } else $$renderer.push("<!--[-1-->");
119
+ $$renderer.push(`<!--]--></div>`);
120
+ });
121
+ }
122
+ //#endregion
123
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-header.svelte
124
+ function Dialog_header($$renderer, $$props) {
125
+ $$renderer.component(($$renderer) => {
126
+ const { class: className, children, $$slots, $$events, ...restProps } = $$props;
127
+ $$renderer.push(`<div${$.attributes({
128
+ class: $.clsx(cn("flex flex-col space-y-1.5 text-center sm:text-left", className)),
129
+ ...restProps
130
+ })}>`);
131
+ if (children) {
132
+ $$renderer.push("<!--[0-->");
133
+ children($$renderer);
134
+ $$renderer.push(`<!---->`);
135
+ } else $$renderer.push("<!--[-1-->");
136
+ $$renderer.push(`<!--]--></div>`);
137
+ });
138
+ }
139
+ //#endregion
140
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-title.svelte
141
+ function Dialog_title($$renderer, $$props) {
142
+ $$renderer.component(($$renderer) => {
143
+ const { class: className, children, $$slots, $$events, ...restProps } = $$props;
144
+ $$renderer.push(`<h2${$.attributes({
145
+ class: $.clsx(cn("text-lg font-semibold leading-none tracking-tight", className)),
146
+ ...restProps
147
+ })}>`);
148
+ if (children) {
149
+ $$renderer.push("<!--[0-->");
150
+ children($$renderer);
151
+ $$renderer.push(`<!---->`);
152
+ } else $$renderer.push("<!--[-1-->");
153
+ $$renderer.push(`<!--]--></h2>`);
154
+ });
155
+ }
156
+ //#endregion
157
+ export { Dialog as a, Dialog_description as i, Dialog_header as n, Button as o, Dialog_footer as r, Dialog_title as t };