@hiai-gg/docsmint 0.3.7 → 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 (196) 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/camera-iKXDOOWT.js +29 -0
  16. package/dist/frontend/check-D-UuvBuh.js +25 -0
  17. package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
  18. package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
  19. package/dist/frontend/clock-DJHbHZb8.js +29 -0
  20. package/dist/frontend/{bundle-mjs-CP6Owz-8.js → clsx-C7bIvsDS.js} +16 -1
  21. package/dist/frontend/components/category-dialog.js +1 -1
  22. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  23. package/dist/frontend/components/delete-dialog.js +1 -1
  24. package/dist/frontend/components/editor/document-editor.js +1364 -1353
  25. package/dist/frontend/components/editor/document-title.js +25 -25
  26. package/dist/frontend/components/editor/markdown-toggle.js +45 -45
  27. package/dist/frontend/components/folder-node.js +1 -1
  28. package/dist/frontend/components/folder-tree-selector.js +1 -1
  29. package/dist/frontend/components/save-as-dialog.js +169 -151
  30. package/dist/frontend/components/settings.js +1 -1
  31. package/dist/frontend/components/share-dialog.js +1 -1
  32. package/dist/frontend/components/sidebar.js +1161 -1153
  33. package/dist/frontend/components/tag-create-dialog.js +1 -1
  34. package/dist/frontend/components/version-history.js +188 -187
  35. package/dist/frontend/copy-GppwRMjX.js +32 -0
  36. package/dist/frontend/dashboard.js +1188 -1156
  37. package/dist/frontend/dialog-D6NxYVmy.js +213 -0
  38. package/dist/frontend/doc-tabs.js +2 -2
  39. package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
  40. package/dist/frontend/extension.js +8 -8
  41. package/dist/frontend/{floating-layer-anchor-C51M4l6v.js → floating-layer-anchor-CPwucTfd.js} +1414 -1412
  42. package/dist/frontend/folder-DeWhnD7O.js +45 -0
  43. package/dist/frontend/folder-refresh.js +1 -1
  44. package/dist/frontend/input-B5Rak-5G.js +23 -0
  45. package/dist/frontend/keyboard.js +1 -1
  46. package/dist/frontend/{keyboard.svelte-D7H8DihC.js → keyboard.svelte-CApmX0vl.js} +53 -53
  47. package/dist/frontend/label-CW9rxoAb.js +30 -0
  48. package/dist/frontend/{loader-circle-Bk-WFz9g.js → loader-circle-BA6aLO71.js} +86 -85
  49. package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
  50. package/dist/frontend/search.js +680 -654
  51. package/dist/frontend/select-value-sF86Geyh.js +1446 -0
  52. package/dist/frontend/shared-document.js +94 -94
  53. package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
  54. package/dist/frontend/tag-HxRazVN_.js +54 -0
  55. package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
  56. package/dist/frontend/textarea-i1720bE7.js +23 -0
  57. package/dist/frontend/theme.js +1 -1
  58. package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
  59. package/dist/frontend/{utils-C0OW2678.js → utils-CffiyuTo.js} +2 -3
  60. package/dist/frontend/{utils-D8kmM3ub.js → utils-hzdMVeCv.js} +2 -3
  61. package/dist/frontend/utils.js +1 -1
  62. package/dist/frontend/x-CzBsnJ2x.js +25 -0
  63. package/dist/frontend-ssr/api/attachments.js +2 -0
  64. package/dist/frontend-ssr/api/categories.js +2 -0
  65. package/dist/frontend-ssr/api/documents.js +2 -0
  66. package/dist/frontend-ssr/api/folders.js +2 -0
  67. package/dist/frontend-ssr/api/settings.js +2 -0
  68. package/dist/frontend-ssr/api/share.js +2 -0
  69. package/dist/frontend-ssr/api/tags.js +2 -0
  70. package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
  71. package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
  72. package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
  73. package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
  74. package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
  75. package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
  76. package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
  77. package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
  78. package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
  79. package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
  80. package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
  81. package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
  82. package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
  83. package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
  84. package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
  85. package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
  86. package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
  87. package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
  88. package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
  89. package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
  90. package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
  91. package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
  92. package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
  93. package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
  94. package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
  95. package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
  96. package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
  97. package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
  98. package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
  99. package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
  100. package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
  101. package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
  102. package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
  103. package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
  104. package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
  105. package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
  106. package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
  107. package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
  108. package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
  109. package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
  110. package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
  111. package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
  112. package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
  113. package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
  114. package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
  115. package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
  116. package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
  117. package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
  118. package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
  119. package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
  120. package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
  121. package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
  122. package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
  123. package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
  124. package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
  125. package/dist/frontend-ssr/collaboration.js +39 -0
  126. package/dist/frontend-ssr/components/category-dialog.js +2 -0
  127. package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
  128. package/dist/frontend-ssr/components/delete-dialog.js +2 -0
  129. package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
  130. package/dist/frontend-ssr/components/editor/document-title.js +11 -0
  131. package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
  132. package/dist/frontend-ssr/components/editor/extensions.js +2 -0
  133. package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
  134. package/dist/frontend-ssr/components/editor/markdown.js +2 -0
  135. package/dist/frontend-ssr/components/folder-node.js +2 -0
  136. package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
  137. package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
  138. package/dist/frontend-ssr/components/settings.js +2 -0
  139. package/dist/frontend-ssr/components/share-dialog.js +2 -0
  140. package/dist/frontend-ssr/components/sidebar.js +2033 -0
  141. package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
  142. package/dist/frontend-ssr/components/version-history.js +370 -0
  143. package/dist/frontend-ssr/dashboard.js +2542 -0
  144. package/dist/frontend-ssr/doc-tabs.js +23 -0
  145. package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
  146. package/dist/frontend-ssr/extension.js +13 -0
  147. package/dist/frontend-ssr/folder-refresh.js +2 -0
  148. package/dist/frontend-ssr/i18n.js +10 -0
  149. package/dist/frontend-ssr/keyboard.js +2 -0
  150. package/dist/frontend-ssr/offline/identity.js +2 -0
  151. package/dist/frontend-ssr/search.js +332 -0
  152. package/dist/frontend-ssr/shared-document.js +273 -0
  153. package/dist/frontend-ssr/theme.js +9 -0
  154. package/dist/frontend-ssr/types.js +1 -0
  155. package/dist/frontend-ssr/utils/clipboard.js +2 -0
  156. package/dist/frontend-ssr/utils/dndzone.js +2 -0
  157. package/dist/frontend-ssr/utils.js +2 -0
  158. package/package.json +22 -1
  159. package/packages/cli/src/index.ts +1 -1
  160. package/packages/db/src/schema.ts +3 -0
  161. package/packages/mcp-server/src/index.ts +1 -1
  162. package/dist/frontend/CategoryDialog--rIE7FrH.js +0 -580
  163. package/dist/frontend/ConfirmDialog-Cpzyb55f.js +0 -212
  164. package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +0 -216
  165. package/dist/frontend/DatePicker-Byynca7V.js +0 -257
  166. package/dist/frontend/DeleteDialog-ap6nOywZ.js +0 -174
  167. package/dist/frontend/FolderDialog-DmN_trV0.js +0 -247
  168. package/dist/frontend/FolderNode-C4B8a2fd.js +0 -317
  169. package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +0 -100
  170. package/dist/frontend/Icon-DtNo0N1U.js +0 -64
  171. package/dist/frontend/SettingsDialog-2kTaTXAs.js +0 -992
  172. package/dist/frontend/ShareDialog-BBDGNF5n.js +0 -165
  173. package/dist/frontend/TagCreateDialog-DiLZnJo4.js +0 -258
  174. package/dist/frontend/camera-B7dAOd4s.js +0 -28
  175. package/dist/frontend/check-CDwRlG9T.js +0 -24
  176. package/dist/frontend/chevron-down-B7ZrjUmT.js +0 -24
  177. package/dist/frontend/circle-check-CDqeMB2d.js +0 -28
  178. package/dist/frontend/client-Bc5Fzx40.js +0 -2785
  179. package/dist/frontend/clock-Ck5Sn-Zl.js +0 -28
  180. package/dist/frontend/clsx-nmtDPO_P.js +0 -16
  181. package/dist/frontend/copy-CMAA6GP0.js +0 -31
  182. package/dist/frontend/dialog-BDkiG42a.js +0 -213
  183. package/dist/frontend/disclose-version-5I57E3LD.js +0 -3
  184. package/dist/frontend/ellipsis-vertical-BBuPldbW.js +0 -519
  185. package/dist/frontend/folder-TQjKY4yn.js +0 -44
  186. package/dist/frontend/index-client-jobkrWVL.js +0 -86
  187. package/dist/frontend/input-CBI6p4Xl.js +0 -23
  188. package/dist/frontend/label-C-GkhEp4.js +0 -30
  189. package/dist/frontend/rotate-ccw-CleZtJ5D.js +0 -24
  190. package/dist/frontend/select-value-CvrWRkXW.js +0 -1436
  191. package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +0 -65
  192. package/dist/frontend/tag-Dx3SmucJ.js +0 -53
  193. package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +0 -29
  194. package/dist/frontend/textarea-Dfp78XlL.js +0 -23
  195. package/dist/frontend/theme.svelte-CROg1Hi5.js +0 -49
  196. package/dist/frontend/x-DaTdeDXv.js +0 -24
@@ -0,0 +1,84 @@
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/camera.svelte
4
+ function Camera($$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: "camera" },
56
+ $$sanitized_props,
57
+ {
58
+ /**
59
+ * @component @name Camera
60
+ * @description Lucide SVG icon component, renders SVG Element with children.
61
+ *
62
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMuOTk3IDRhMiAyIDAgMCAxIDEuNzYgMS4wNWwuNDg2LjlBMiAyIDAgMCAwIDE4LjAwMyA3SDIwYTIgMiAwIDAgMSAyIDJ2OWEyIDIgMCAwIDEtMiAySDRhMiAyIDAgMCAxLTItMlY5YTIgMiAwIDAgMSAyLTJoMS45OTdhMiAyIDAgMCAwIDEuNzU5LTEuMDQ4bC40ODktLjkwNEEyIDIgMCAwIDEgMTAuMDA0IDR6IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTMiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/camera
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: [["path", { "d": "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" }], ["circle", {
70
+ "cx": "12",
71
+ "cy": "13",
72
+ "r": "3"
73
+ }]],
74
+ children: ($$renderer) => {
75
+ $$renderer.push(`<!--[-->`);
76
+ $.slot($$renderer, $$props, "default", {}, null);
77
+ $$renderer.push(`<!--]-->`);
78
+ },
79
+ $$slots: { default: true }
80
+ }
81
+ ]));
82
+ }
83
+ //#endregion
84
+ export { Camera as t };
@@ -0,0 +1,75 @@
1
+ import { n as apiFetch } from "./client-DZMkDkDn.js";
2
+ import { z } from "zod";
3
+ //#region src/lib/api/categories.ts
4
+ var createCategoryInputSchema = z.object({
5
+ name: z.string().trim().min(1, "Name is required").max(255, "Name must be 255 characters or less"),
6
+ apiMode: z.enum([
7
+ "unavailable",
8
+ "global",
9
+ "general",
10
+ "category"
11
+ ]).optional(),
12
+ apiPermissionRead: z.boolean().optional(),
13
+ apiPermissionEdit: z.boolean().optional(),
14
+ apiPermissionWrite: z.boolean().optional()
15
+ });
16
+ var updateCategoryInputSchema = z.object({
17
+ name: z.string().trim().min(1, "Name is required").max(255, "Name must be 255 characters or less").optional(),
18
+ order: z.number().int().nonnegative().optional(),
19
+ apiMode: z.enum([
20
+ "unavailable",
21
+ "global",
22
+ "general",
23
+ "category"
24
+ ]).optional(),
25
+ apiPermissionRead: z.boolean().optional(),
26
+ apiPermissionEdit: z.boolean().optional(),
27
+ apiPermissionWrite: z.boolean().optional()
28
+ });
29
+ /** List all categories for the current user. */
30
+ function listCategories(fetcher) {
31
+ return apiFetch("/api/categories", {}, fetcher);
32
+ }
33
+ /**
34
+ * Create a new category. The backend enforces name uniqueness per owner
35
+ * and returns 409 if a category with the same name already exists.
36
+ */
37
+ function createCategory(inputOrName) {
38
+ const input = createCategoryInputSchema.parse(typeof inputOrName === "string" ? { name: inputOrName } : inputOrName);
39
+ return apiFetch("/api/categories", {
40
+ method: "POST",
41
+ body: JSON.stringify(input)
42
+ });
43
+ }
44
+ /** Rename a category or update its order. */
45
+ function updateCategory(id, data) {
46
+ const input = updateCategoryInputSchema.parse(data);
47
+ return apiFetch(`/api/categories/${encodeURIComponent(id)}`, {
48
+ method: "PATCH",
49
+ body: JSON.stringify(input)
50
+ });
51
+ }
52
+ /** Delete a category. The backend uses `ON DELETE SET NULL` to detach
53
+ * the category from any folders/documents. */
54
+ function deleteCategory(id) {
55
+ return apiFetch(`/api/categories/${encodeURIComponent(id)}`, { method: "DELETE" });
56
+ }
57
+ /** Assign (or clear) the category on a document. Uses the existing
58
+ * `PATCH /api/documents/:id` endpoint which already accepts a
59
+ * `categoryId` field (see `backend/src/api/routes/documents.ts`).
60
+ * Pass `null` to remove the category from the document. */
61
+ function setDocumentCategory(docId, categoryId) {
62
+ return apiFetch(`/api/documents/${encodeURIComponent(docId)}`, {
63
+ method: "PATCH",
64
+ body: JSON.stringify({ categoryId })
65
+ });
66
+ }
67
+ /** Assign (or clear) the category on a folder. Pass `null` to clear. */
68
+ function setFolderCategory(folderId, categoryId) {
69
+ return apiFetch(`/api/folders/${encodeURIComponent(folderId)}`, {
70
+ method: "PATCH",
71
+ body: JSON.stringify({ categoryId })
72
+ });
73
+ }
74
+ //#endregion
75
+ export { setDocumentCategory as a, updateCategoryInputSchema as c, listCategories as i, createCategoryInputSchema as n, setFolderCategory as o, deleteCategory as r, updateCategory as s, createCategory as t };
@@ -0,0 +1,80 @@
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/chevron-down.svelte
4
+ function Chevron_down($$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: "chevron-down" },
56
+ $$sanitized_props,
57
+ {
58
+ /**
59
+ * @component @name ChevronDown
60
+ * @description Lucide SVG icon component, renders SVG Element with children.
61
+ *
62
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNiA5IDYgNiA2LTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chevron-down
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: [["path", { "d": "m6 9 6 6 6-6" }]],
70
+ children: ($$renderer) => {
71
+ $$renderer.push(`<!--[-->`);
72
+ $.slot($$renderer, $$props, "default", {}, null);
73
+ $$renderer.push(`<!--]-->`);
74
+ },
75
+ $$slots: { default: true }
76
+ }
77
+ ]));
78
+ }
79
+ //#endregion
80
+ export { Chevron_down as t };
@@ -0,0 +1,80 @@
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/chevron-right.svelte
4
+ function Chevron_right($$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: "chevron-right" },
56
+ $$sanitized_props,
57
+ {
58
+ /**
59
+ * @component @name ChevronRight
60
+ * @description Lucide SVG icon component, renders SVG Element with children.
61
+ *
62
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtOSAxOCA2LTYtNi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/chevron-right
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: [["path", { "d": "m9 18 6-6-6-6" }]],
70
+ children: ($$renderer) => {
71
+ $$renderer.push(`<!--[-->`);
72
+ $.slot($$renderer, $$props, "default", {}, null);
73
+ $$renderer.push(`<!--]-->`);
74
+ },
75
+ $$slots: { default: true }
76
+ }
77
+ ]));
78
+ }
79
+ //#endregion
80
+ export { Chevron_right as t };
@@ -0,0 +1,84 @@
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/circle-check.svelte
4
+ function Circle_check($$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: "circle-check" },
56
+ $$sanitized_props,
57
+ {
58
+ /**
59
+ * @component @name CircleCheck
60
+ * @description Lucide SVG icon component, renders SVG Element with children.
61
+ *
62
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtOSAxMiAyIDIgNC00IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/circle-check
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: [["circle", {
70
+ "cx": "12",
71
+ "cy": "12",
72
+ "r": "10"
73
+ }], ["path", { "d": "m9 12 2 2 4-4" }]],
74
+ children: ($$renderer) => {
75
+ $$renderer.push(`<!--[-->`);
76
+ $.slot($$renderer, $$props, "default", {}, null);
77
+ $$renderer.push(`<!--]-->`);
78
+ },
79
+ $$slots: { default: true }
80
+ }
81
+ ]));
82
+ }
83
+ //#endregion
84
+ export { Circle_check as t };
@@ -0,0 +1,129 @@
1
+ //#region src/lib/api/client.ts
2
+ var ApiError = class extends Error {
3
+ status;
4
+ constructor(message, status) {
5
+ super(message);
6
+ this.name = "ApiError";
7
+ this.status = status;
8
+ }
9
+ };
10
+ var ApiTimeoutError = class extends Error {
11
+ timeoutMs;
12
+ constructor(timeoutMs) {
13
+ super(`Request timed out after ${timeoutMs}ms`);
14
+ this.timeoutMs = timeoutMs;
15
+ this.name = "ApiTimeoutError";
16
+ }
17
+ };
18
+ /**
19
+ * Marker thrown when an in-flight `apiFetch` is aborted for a reason OTHER
20
+ * than our internal timeout — typically Vite HMR tearing down the page in
21
+ * dev mode, or a component unmounting mid-fetch. Callers can usually
22
+ * ignore this (`try { ... } catch (e) { if (e instanceof ApiAbortError) return; throw e; }`)
23
+ * because the surrounding UI is being torn down anyway. This avoids the
24
+ * noisy `signal is aborted without reason` console error that otherwise
25
+ * surfaces as an unhandled promise rejection on every HMR.
26
+ */
27
+ var ApiAbortError = class extends Error {
28
+ constructor(reason) {
29
+ super(typeof reason === "string" ? reason : "Request aborted");
30
+ this.name = "ApiAbortError";
31
+ }
32
+ };
33
+ var DEFAULT_429_MAX_RETRIES = 0;
34
+ var RETRY_429_BACKOFF_MS = [500, 1e3];
35
+ /**
36
+ * Sleep that resolves after `ms` milliseconds, or rejects with an
37
+ * AbortError `DOMException` if the controller aborts first. Used by
38
+ * the 429 retry loop so a caller-initiated abort during the backoff
39
+ * window surfaces as a clean cancellation rather than blocking for
40
+ * the full delay. The outer catch translates the AbortError into
41
+ * `ApiAbortError` (caller-supplied signal) or `ApiTimeoutError`
42
+ * (internal timeout).
43
+ */
44
+ function backoffSleep(ms, controller) {
45
+ return new Promise((resolve, reject) => {
46
+ const timer = setTimeout(resolve, ms);
47
+ controller.signal.addEventListener("abort", () => {
48
+ clearTimeout(timer);
49
+ reject(new DOMException("Aborted during retry backoff", "AbortError"));
50
+ }, { once: true });
51
+ });
52
+ }
53
+ /**
54
+ * Parse the `Retry-After` header (RFC 7231 §7.1.3) — it may be either a
55
+ * delta-seconds value (`"5"`) or an HTTP-date. We accept the former
56
+ * only; a malformed or date-formatted value falls back to the
57
+ * exponential backoff schedule.
58
+ */
59
+ function parseRetryAfter(value) {
60
+ if (!value) return null;
61
+ const trimmed = value.trim();
62
+ if (trimmed.length === 0) return null;
63
+ const seconds = Number(trimmed);
64
+ if (!Number.isFinite(seconds) || seconds < 0) return null;
65
+ return seconds * 1e3;
66
+ }
67
+ async function apiFetch(path, options = {}, fetcher = fetch) {
68
+ const { timeout = 1e4, body, maxRetries = DEFAULT_429_MAX_RETRIES, ...fetchOptions } = options;
69
+ const controller = new AbortController();
70
+ let timedOut = false;
71
+ const timeoutId = setTimeout(() => {
72
+ timedOut = true;
73
+ controller.abort();
74
+ }, timeout);
75
+ const callerSignal = fetchOptions.signal ?? null;
76
+ const onCallerAbort = () => controller.abort();
77
+ if (callerSignal) if (callerSignal.aborted) controller.abort();
78
+ else callerSignal.addEventListener("abort", onCallerAbort, { once: true });
79
+ const headers = {};
80
+ const isPlainObject = typeof body === "object" && body !== null && !(body instanceof FormData) && !(body instanceof Blob) && !(body instanceof ArrayBuffer) && !(body instanceof ReadableStream) && !(body instanceof URLSearchParams) && !ArrayBuffer.isView(body);
81
+ const serializedBody = body == null ? body : isPlainObject ? JSON.stringify(body) : body;
82
+ if (body && !(body instanceof FormData)) headers["Content-Type"] = "application/json";
83
+ try {
84
+ const attemptFetch = async () => {
85
+ const response = await fetcher(path, {
86
+ ...fetchOptions,
87
+ body: serializedBody,
88
+ signal: controller.signal,
89
+ headers: {
90
+ ...headers,
91
+ ...fetchOptions.headers
92
+ },
93
+ credentials: "include"
94
+ });
95
+ if (response.status === 429) throw new Retry429Error(response.headers.get("Retry-After"));
96
+ if (!response.ok) throw new ApiError((await response.json().catch(() => ({ error: response.statusText }))).error ?? `HTTP ${response.status}`, response.status);
97
+ return response.json();
98
+ };
99
+ for (let attempt = 0; attempt <= maxRetries; attempt++) try {
100
+ return await attemptFetch();
101
+ } catch (err) {
102
+ if (!(err instanceof Retry429Error) || attempt === maxRetries) throw err;
103
+ const serverHint = parseRetryAfter(err.retryAfter);
104
+ const scheduledMs = RETRY_429_BACKOFF_MS[attempt] ?? RETRY_429_BACKOFF_MS[RETRY_429_BACKOFF_MS.length - 1];
105
+ await backoffSleep(Math.min(serverHint ?? scheduledMs, 1e4), controller);
106
+ }
107
+ throw new Error("apiFetch: exhausted retries without resolving");
108
+ } catch (err) {
109
+ if (err instanceof DOMException && err.name === "AbortError") {
110
+ if (timedOut) throw new ApiTimeoutError(timeout);
111
+ throw new ApiAbortError(err.message);
112
+ }
113
+ if (err instanceof Retry429Error) throw new ApiError("Too Many Requests", 429);
114
+ throw err;
115
+ } finally {
116
+ clearTimeout(timeoutId);
117
+ if (callerSignal) callerSignal.removeEventListener("abort", onCallerAbort);
118
+ }
119
+ }
120
+ var Retry429Error = class extends Error {
121
+ retryAfter;
122
+ constructor(retryAfter) {
123
+ super("Retry after 429");
124
+ this.retryAfter = retryAfter;
125
+ this.name = "Retry429Error";
126
+ }
127
+ };
128
+ //#endregion
129
+ export { apiFetch as n, ApiError as t };
@@ -0,0 +1,30 @@
1
+ //#region src/lib/utils/clipboard.ts
2
+ /**
3
+ * Copy `text` to the system clipboard via the async Clipboard API.
4
+ *
5
+ * Returns `true` if the copy succeeded and `false` if it was rejected or
6
+ * the API is unavailable (e.g. older browsers, insecure contexts, missing
7
+ * permissions). Callers should treat `false` as a soft failure — show
8
+ * feedback or fall back to a manual selection prompt rather than
9
+ * throwing.
10
+ */
11
+ async function copyToClipboard(text) {
12
+ if (navigator.clipboard?.writeText) try {
13
+ await navigator.clipboard.writeText(text);
14
+ return true;
15
+ } catch {}
16
+ try {
17
+ const textarea = document.createElement("textarea");
18
+ textarea.value = text;
19
+ textarea.style.cssText = "position:fixed;left:-9999px;top:-9999px;opacity:0;";
20
+ document.body.appendChild(textarea);
21
+ textarea.select();
22
+ const ok = document.execCommand("copy");
23
+ document.body.removeChild(textarea);
24
+ return ok;
25
+ } catch {
26
+ return false;
27
+ }
28
+ }
29
+ //#endregion
30
+ export { copyToClipboard as t };
@@ -0,0 +1,84 @@
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/clock.svelte
4
+ function Clock($$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: "clock" },
56
+ $$sanitized_props,
57
+ {
58
+ /**
59
+ * @component @name Clock
60
+ * @description Lucide SVG icon component, renders SVG Element with children.
61
+ *
62
+ * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgNnY2bDQgMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clock
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: [["circle", {
70
+ "cx": "12",
71
+ "cy": "12",
72
+ "r": "10"
73
+ }], ["path", { "d": "M12 6v6l4 2" }]],
74
+ children: ($$renderer) => {
75
+ $$renderer.push(`<!--[-->`);
76
+ $.slot($$renderer, $$props, "default", {}, null);
77
+ $$renderer.push(`<!--]-->`);
78
+ },
79
+ $$slots: { default: true }
80
+ }
81
+ ]));
82
+ }
83
+ //#endregion
84
+ export { Clock as t };