@hiai-gg/docsmint 0.7.0 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +97 -103
  2. package/dist/backend/index.js +2 -2
  3. package/dist/frontend/CategoryDialog-bQKMpVFD.js +631 -0
  4. package/dist/frontend/ConfirmDialog-DF7kgkyq.js +139 -0
  5. package/dist/frontend/CreateSnapshotDialog-CojnWChs.js +222 -0
  6. package/dist/frontend/{DatePicker-DsoepNdb.js → DatePicker-7FAbIOGg.js} +4 -4
  7. package/dist/frontend/DeleteDialog-BIlqRb1u.js +179 -0
  8. package/dist/frontend/{FolderNode-CNwi0ySr.js → FolderNode-Cf443LBa.js} +2 -2
  9. package/dist/frontend/{HiAiEditor-B1EDGsnA.js → HiAiEditor-CMZ-eL8s.js} +961 -955
  10. package/dist/frontend/SettingsDialog-DatuxOVX.js +980 -0
  11. package/dist/frontend/{ShareDialog-wGTXuXFE.js → ShareDialog-Bwz2y3Le.js} +2 -2
  12. package/dist/frontend/Sidebar-C_t5RrOJ.js +2101 -0
  13. package/dist/frontend/TagCreateDialog-Ch21yuWV.js +266 -0
  14. package/dist/frontend/app-shell.d.ts +3 -1
  15. package/dist/frontend/app-shell.js +155 -152
  16. package/dist/frontend/components/category-dialog.js +1 -1
  17. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  18. package/dist/frontend/components/delete-dialog.js +1 -1
  19. package/dist/frontend/components/editor/compact-editor.js +1 -1
  20. package/dist/frontend/components/editor/document-editor.js +1 -1
  21. package/dist/frontend/components/editor/document-title.js +1 -1
  22. package/dist/frontend/components/editor/extensions.js +1 -1
  23. package/dist/frontend/components/editor/markdown-toggle.js +2 -2
  24. package/dist/frontend/components/editor/markdown.js +1 -1
  25. package/dist/frontend/components/folder-node.js +1 -1
  26. package/dist/frontend/components/save-as-dialog.js +232 -227
  27. package/dist/frontend/components/settings.js +1 -1
  28. package/dist/frontend/components/share-dialog.js +1 -1
  29. package/dist/frontend/components/sidebar.js +1 -1
  30. package/dist/frontend/components/tag-create-dialog.js +1 -1
  31. package/dist/frontend/components/version-history.js +3 -3
  32. package/dist/frontend/confirm-dialog-8T6vsWL7.js +265 -0
  33. package/dist/frontend/dashboard.js +600 -592
  34. package/dist/frontend/dialog-CiSwD-_v.js +253 -0
  35. package/dist/frontend/{dropdown-menu-BXIl2E26.js → dropdown-menu-Bi5Iipwf.js} +6 -6
  36. package/dist/frontend/editor-content-sanitizer-CC_A8aaI.js +112 -0
  37. package/dist/frontend/{editorExtensions-BmINh76i.js → editorExtensions--HusV819.js} +3356 -3423
  38. package/dist/frontend/frontend.css +1 -1
  39. package/dist/frontend/i18n.js +1 -1
  40. package/dist/frontend/{input-eHFb2qiL.js → input-N9dNSOWF.js} +2 -2
  41. package/dist/frontend/{label-_I1iiaNU.js → label-CK72_fw8.js} +2 -2
  42. package/dist/frontend/{markdown-A5xji16P.js → markdown-H6QB53zu.js} +1 -1
  43. package/dist/frontend/messages-DTRe4U2V.js +1093 -0
  44. package/dist/frontend/search.js +3 -3
  45. package/dist/frontend/{select-value-CtMyrvDJ.js → select-value-BD1DToYs.js} +6 -6
  46. package/dist/frontend/shared-document.js +95 -92
  47. package/dist/frontend/{textarea-2eslfANY.js → textarea-pl_fDBre.js} +2 -2
  48. package/dist/frontend/theme.js +1 -1
  49. package/dist/frontend/theme.svelte-DG3RS7wv.js +101 -0
  50. package/dist/frontend/{utils-CDBqTgoV.js → utils-CMQRlxbx.js} +1 -1
  51. package/dist/frontend-ssr/app-shell.js +9 -5
  52. package/dist/frontend-ssr/assets/CategoryDialog-DsXe54EF.js +608 -0
  53. package/dist/frontend-ssr/assets/ConfirmDialog-DrH653ua.js +136 -0
  54. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-BZ45odvJ.js → CreateSnapshotDialog-D3-PjXVr.js} +93 -88
  55. package/dist/frontend-ssr/assets/{DatePicker-CPtl6W5E.js → DatePicker-C9suIA1S.js} +4 -4
  56. package/dist/frontend-ssr/assets/DeleteDialog-DxtMrS1O.js +159 -0
  57. package/dist/frontend-ssr/assets/{FolderNode-D9kgJG9d.js → FolderNode-ChD10Elp.js} +2 -2
  58. package/dist/frontend-ssr/assets/{HiAiEditor-DOd2MXjD.js → HiAiEditor-2X3Uyg1B.js} +60 -54
  59. package/dist/frontend-ssr/assets/{SettingsDialog-CIVbMKmf.js → SettingsDialog-DDy0hN8x.js} +373 -361
  60. package/dist/frontend-ssr/assets/{ShareDialog-D2UNUbF7.js → ShareDialog-BwW_wF4G.js} +2 -2
  61. package/dist/frontend-ssr/assets/{Sidebar-Bb-k2R-Z.js → Sidebar-Dy-5gXOf.js} +170 -129
  62. package/dist/frontend-ssr/assets/{TagCreateDialog-6Gk7L3D-.js → TagCreateDialog-BPzgOaX8.js} +94 -89
  63. package/dist/frontend-ssr/assets/{confirm-dialog-B9MVS_bF.js → confirm-dialog-wYC07DPx.js} +109 -89
  64. package/dist/frontend-ssr/assets/{dialog-1SB5neow.js → dialog-ClcuF7nD.js} +47 -12
  65. package/dist/frontend-ssr/assets/{dropdown-menu-DqoOkdqB.js → dropdown-menu-BKMGVNLL.js} +6 -6
  66. package/dist/frontend-ssr/assets/editor-content-sanitizer-Gjm93iR-.js +145 -0
  67. package/dist/frontend-ssr/assets/{editorExtensions-BwGeSPuX.js → editorExtensions-qNlZVP98.js} +2 -88
  68. package/dist/frontend-ssr/assets/{input-Df-QP3Km.js → input-DcDR8L8M.js} +2 -2
  69. package/dist/frontend-ssr/assets/{label-CbUOUz6L.js → label-Cz0_svJx.js} +2 -2
  70. package/dist/frontend-ssr/assets/{markdown-CB8DZ-LT.js → markdown-MhPwNWrC.js} +1 -1
  71. package/dist/frontend-ssr/assets/{messages-BAQzILs4.js → messages-B1TjVIH8.js} +2 -2
  72. package/dist/frontend-ssr/assets/{select-value-CXEDWrZg.js → select-value-CaDktvDW.js} +6 -6
  73. package/dist/frontend-ssr/assets/{textarea-CHh8NuSS.js → textarea-BGrjPOgU.js} +2 -2
  74. package/dist/frontend-ssr/assets/theme.svelte-CN3BUhJG.js +136 -0
  75. package/dist/frontend-ssr/assets/{utils-DtX0ta7y.js → utils-Cg_R05dR.js} +1 -1
  76. package/dist/frontend-ssr/components/category-dialog.js +1 -1
  77. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
  78. package/dist/frontend-ssr/components/delete-dialog.js +1 -1
  79. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  80. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  81. package/dist/frontend-ssr/components/editor/document-title.js +1 -1
  82. package/dist/frontend-ssr/components/editor/extensions.js +1 -1
  83. package/dist/frontend-ssr/components/editor/markdown-toggle.js +2 -2
  84. package/dist/frontend-ssr/components/editor/markdown.js +1 -1
  85. package/dist/frontend-ssr/components/folder-node.js +1 -1
  86. package/dist/frontend-ssr/components/save-as-dialog.js +177 -172
  87. package/dist/frontend-ssr/components/settings.js +1 -1
  88. package/dist/frontend-ssr/components/share-dialog.js +1 -1
  89. package/dist/frontend-ssr/components/sidebar.js +1 -1
  90. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
  91. package/dist/frontend-ssr/components/version-history.js +3 -3
  92. package/dist/frontend-ssr/dashboard.js +102 -95
  93. package/dist/frontend-ssr/i18n.js +1 -1
  94. package/dist/frontend-ssr/search.js +3 -3
  95. package/dist/frontend-ssr/shared-document.js +3 -0
  96. package/dist/frontend-ssr/theme.js +1 -1
  97. package/dist/mcp-cli.js +1 -1
  98. package/dist/mcp-server.js +1 -1
  99. package/package.json +1 -1
  100. package/packages/cli/src/index.ts +4 -3
  101. package/server.json +43 -6
  102. package/dist/frontend/CategoryDialog-C67_TXf0.js +0 -626
  103. package/dist/frontend/ConfirmDialog-_LlrA--f.js +0 -134
  104. package/dist/frontend/CreateSnapshotDialog-BmCRpOMv.js +0 -217
  105. package/dist/frontend/DeleteDialog-L1A3FhMM.js +0 -174
  106. package/dist/frontend/SettingsDialog-AP42xOGg.js +0 -969
  107. package/dist/frontend/Sidebar-lKQT3dEf.js +0 -2060
  108. package/dist/frontend/TagCreateDialog-su8BhLzS.js +0 -261
  109. package/dist/frontend/confirm-dialog-BG8y2Pum.js +0 -250
  110. package/dist/frontend/dialog-C2iKObEu.js +0 -213
  111. package/dist/frontend/messages-DIovIZrK.js +0 -1093
  112. package/dist/frontend/theme.svelte-DKfCy12k.js +0 -49
  113. package/dist/frontend-ssr/assets/CategoryDialog-BGuHTb3K.js +0 -603
  114. package/dist/frontend-ssr/assets/ConfirmDialog-D1BDXXll.js +0 -131
  115. package/dist/frontend-ssr/assets/DeleteDialog-oHT_p_vG.js +0 -154
  116. package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +0 -67
@@ -0,0 +1,253 @@
1
+ import { t as e } from "./dist-DQa_OHOa.js";
2
+ import { t } from "./utils-CMQRlxbx.js";
3
+ import "svelte/internal/disclose-version";
4
+ import * as n from "svelte/internal/client";
5
+ import { getContext as r, setContext as i } from "svelte";
6
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/button/button.svelte
7
+ var a = /* @__PURE__ */ new Set([
8
+ "$$slots",
9
+ "$$events",
10
+ "$$legacy",
11
+ "class",
12
+ "variant",
13
+ "size",
14
+ "ref",
15
+ "href",
16
+ "children"
17
+ ]), o = n.from_html("<a><!></a>"), s = n.from_html("<button><!></button>");
18
+ function c(e, r) {
19
+ n.push(r, !0);
20
+ let i = n.prop(r, "variant", 3, "default"), c = n.prop(r, "size", 3, "default"), u = n.prop(r, "ref", 15, null), d = n.prop(r, "href", 3, void 0), f = n.rest_props(r, a);
21
+ var p = n.comment(), m = n.first_child(p), h = (e) => {
22
+ var a = o();
23
+ n.attribute_effect(a, (e) => ({
24
+ href: d(),
25
+ class: e,
26
+ ...f
27
+ }), [() => t(l({
28
+ variant: i(),
29
+ size: c()
30
+ }), r.class)]);
31
+ var s = n.child(a), p = (e) => {
32
+ var t = n.comment(), i = n.first_child(t);
33
+ n.snippet(i, () => r.children), n.append(e, t);
34
+ };
35
+ n.if(s, (e) => {
36
+ r.children && e(p);
37
+ }), n.reset(a), n.bind_this(a, (e) => u(e), () => u()), n.append(e, a);
38
+ }, g = (e) => {
39
+ var a = s();
40
+ n.attribute_effect(a, (e) => ({
41
+ class: e,
42
+ ...f
43
+ }), [() => t(l({
44
+ variant: i(),
45
+ size: c()
46
+ }), r.class)]);
47
+ var o = n.child(a), d = (e) => {
48
+ var t = n.comment(), i = n.first_child(t);
49
+ n.snippet(i, () => r.children), n.append(e, t);
50
+ };
51
+ n.if(o, (e) => {
52
+ r.children && e(d);
53
+ }), n.reset(a), n.bind_this(a, (e) => u(e), () => u()), n.append(e, a);
54
+ };
55
+ n.if(m, (e) => {
56
+ d() ? e(h) : e(g, -1);
57
+ }), n.append(e, p), n.pop();
58
+ }
59
+ //#endregion
60
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/button/index.js
61
+ var l = e({
62
+ 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",
63
+ variants: {
64
+ variant: {
65
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
66
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
67
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
68
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
69
+ ghost: "hover:bg-accent hover:text-accent-foreground",
70
+ link: "text-primary underline-offset-4 hover:underline"
71
+ },
72
+ size: {
73
+ default: "h-9 px-4 py-2",
74
+ sm: "h-8 rounded-md px-3 text-xs",
75
+ lg: "h-10 rounded-md px-8",
76
+ icon: "h-9 w-9"
77
+ }
78
+ },
79
+ defaultVariants: {
80
+ variant: "default",
81
+ size: "default"
82
+ }
83
+ });
84
+ //#endregion
85
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog.svelte
86
+ function u(e, t) {
87
+ n.push(t, !0);
88
+ let r = n.prop(t, "open", 15, !1);
89
+ function a() {
90
+ r(!1), t.onOpenChange?.(!1);
91
+ }
92
+ i("DIALOG_CONTEXT", {
93
+ get open() {
94
+ return r();
95
+ },
96
+ set open(e) {
97
+ r(e), t.onOpenChange?.(e);
98
+ },
99
+ close: a
100
+ }), n.user_effect(() => (r() ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
101
+ document.body.style.overflow = "";
102
+ }));
103
+ var o = n.comment(), s = n.first_child(o), c = (e) => {
104
+ var r = n.comment(), i = n.first_child(r);
105
+ n.snippet(i, () => t.children), n.append(e, r);
106
+ };
107
+ n.if(s, (e) => {
108
+ t.children && e(c);
109
+ }), n.append(e, o), n.pop();
110
+ }
111
+ //#endregion
112
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-content.svelte
113
+ var d = /* @__PURE__ */ new Set([
114
+ "$$slots",
115
+ "$$events",
116
+ "$$legacy",
117
+ "class",
118
+ "children"
119
+ ]), f = n.from_html("<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><!></div></div>");
120
+ function p(e, i) {
121
+ n.push(i, !0);
122
+ let a = n.rest_props(i, d), o = r("DIALOG_CONTEXT");
123
+ if (!o) throw Error("DialogContent must be used within a Dialog component");
124
+ let s = n.state(null);
125
+ function c(e) {
126
+ e.key === "Escape" && o.close();
127
+ }
128
+ function l(e) {
129
+ n.get(s) && !n.get(s).contains(e.target) && o.close();
130
+ }
131
+ var u = n.comment(), p = n.first_child(u), m = (e) => {
132
+ var r = f(), o = n.sibling(n.child(r), 2);
133
+ n.attribute_effect(o, (e) => ({
134
+ class: e,
135
+ role: "dialog",
136
+ "aria-modal": "true",
137
+ ...a
138
+ }), [() => t("relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg", i.class)]);
139
+ var u = n.child(o), d = (e) => {
140
+ var t = n.comment(), r = n.first_child(t);
141
+ n.snippet(r, () => i.children), n.append(e, t);
142
+ };
143
+ n.if(u, (e) => {
144
+ i.children && e(d);
145
+ }), n.reset(o), n.bind_this(o, (e) => n.set(s, e), () => n.get(s)), n.reset(r), n.delegated("keydown", r, c), n.delegated("click", r, l), n.append(e, r);
146
+ };
147
+ n.if(p, (e) => {
148
+ o.open && e(m);
149
+ }), n.append(e, u), n.pop();
150
+ }
151
+ n.delegate(["keydown", "click"]);
152
+ //#endregion
153
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-description.svelte
154
+ var m = /* @__PURE__ */ new Set([
155
+ "$$slots",
156
+ "$$events",
157
+ "$$legacy",
158
+ "class",
159
+ "children"
160
+ ]), h = n.from_html("<p><!></p>");
161
+ function g(e, r) {
162
+ n.push(r, !0);
163
+ let i = n.rest_props(r, m);
164
+ var a = h();
165
+ n.attribute_effect(a, (e) => ({
166
+ class: e,
167
+ ...i
168
+ }), [() => t("text-sm text-muted-foreground", r.class)]);
169
+ var o = n.child(a), s = (e) => {
170
+ var t = n.comment(), i = n.first_child(t);
171
+ n.snippet(i, () => r.children), n.append(e, t);
172
+ };
173
+ n.if(o, (e) => {
174
+ r.children && e(s);
175
+ }), n.reset(a), n.append(e, a), n.pop();
176
+ }
177
+ //#endregion
178
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-footer.svelte
179
+ var _ = /* @__PURE__ */ new Set([
180
+ "$$slots",
181
+ "$$events",
182
+ "$$legacy",
183
+ "class",
184
+ "children"
185
+ ]), v = n.from_html("<div><!></div>");
186
+ function y(e, r) {
187
+ n.push(r, !0);
188
+ let i = n.rest_props(r, _);
189
+ var a = v();
190
+ n.attribute_effect(a, (e) => ({
191
+ class: e,
192
+ ...i
193
+ }), [() => t("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", r.class)]);
194
+ var o = n.child(a), s = (e) => {
195
+ var t = n.comment(), i = n.first_child(t);
196
+ n.snippet(i, () => r.children), n.append(e, t);
197
+ };
198
+ n.if(o, (e) => {
199
+ r.children && e(s);
200
+ }), n.reset(a), n.append(e, a), n.pop();
201
+ }
202
+ //#endregion
203
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-header.svelte
204
+ var b = /* @__PURE__ */ new Set([
205
+ "$$slots",
206
+ "$$events",
207
+ "$$legacy",
208
+ "class",
209
+ "children"
210
+ ]), x = n.from_html("<div><!></div>");
211
+ function S(e, r) {
212
+ n.push(r, !0);
213
+ let i = n.rest_props(r, b);
214
+ var a = x();
215
+ n.attribute_effect(a, (e) => ({
216
+ class: e,
217
+ ...i
218
+ }), [() => t("flex flex-col space-y-1.5 text-center sm:text-left", r.class)]);
219
+ var o = n.child(a), s = (e) => {
220
+ var t = n.comment(), i = n.first_child(t);
221
+ n.snippet(i, () => r.children), n.append(e, t);
222
+ };
223
+ n.if(o, (e) => {
224
+ r.children && e(s);
225
+ }), n.reset(a), n.append(e, a), n.pop();
226
+ }
227
+ //#endregion
228
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dialog/dialog-title.svelte
229
+ var C = /* @__PURE__ */ new Set([
230
+ "$$slots",
231
+ "$$events",
232
+ "$$legacy",
233
+ "class",
234
+ "children"
235
+ ]), w = n.from_html("<h2><!></h2>");
236
+ function T(e, r) {
237
+ n.push(r, !0);
238
+ let i = n.rest_props(r, C);
239
+ var a = w();
240
+ n.attribute_effect(a, (e) => ({
241
+ class: e,
242
+ ...i
243
+ }), [() => t("text-lg font-semibold leading-none tracking-tight", r.class)]);
244
+ var o = n.child(a), s = (e) => {
245
+ var t = n.comment(), i = n.first_child(t);
246
+ n.snippet(i, () => r.children), n.append(e, t);
247
+ };
248
+ n.if(o, (e) => {
249
+ r.children && e(s);
250
+ }), n.reset(a), n.append(e, a), n.pop();
251
+ }
252
+ //#endregion
253
+ export { p as a, g as i, S as n, u as o, y as r, c as s, T as t };
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./Icon-Db-o32_E.js";
2
- import { t } from "./utils-CDBqTgoV.js";
2
+ import { t } from "./utils-CMQRlxbx.js";
3
3
  import { Q as n, a as r, c as i, d as a, et as o, f as s, i as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g } from "./floating-layer-anchor-BGIndLY-.js";
4
4
  import "svelte/internal/disclose-version";
5
5
  import * as _ from "svelte/internal/client";
@@ -323,7 +323,7 @@ function j(e, t) {
323
323
  }), _.append(e, f), _.pop();
324
324
  }
325
325
  //#endregion
326
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu.svelte
326
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu.svelte
327
327
  var M = /* @__PURE__ */ new Set([
328
328
  "$$slots",
329
329
  "$$events",
@@ -349,7 +349,7 @@ function N(e, t) {
349
349
  }), _.append(e, r);
350
350
  }
351
351
  //#endregion
352
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte
352
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte
353
353
  var P = /* @__PURE__ */ new Set([
354
354
  "$$slots",
355
355
  "$$events",
@@ -396,7 +396,7 @@ function F(e, n) {
396
396
  _.append(e, o), _.pop();
397
397
  }
398
398
  //#endregion
399
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte
399
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte
400
400
  var I = /* @__PURE__ */ new Set([
401
401
  "$$slots",
402
402
  "$$events",
@@ -438,7 +438,7 @@ function L(e, n) {
438
438
  _.append(e, a), _.pop();
439
439
  }
440
440
  //#endregion
441
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte
441
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte
442
442
  var R = /* @__PURE__ */ new Set([
443
443
  "$$slots",
444
444
  "$$events",
@@ -468,7 +468,7 @@ function z(e, n) {
468
468
  _.append(e, a), _.pop();
469
469
  }
470
470
  //#endregion
471
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
471
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.1.3+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte
472
472
  var B = /* @__PURE__ */ new Set([
473
473
  "$$slots",
474
474
  "$$events",
@@ -0,0 +1,112 @@
1
+ //#region src/lib/components/editor/editor-content-sanitizer.ts
2
+ var e = /^\/api\/attachments\/[0-9a-f-]+\/raw$/i, t = /(?:abs\.twimg\.com\/emoji\/|twemoji\.maxcdn\.com\/|(?:cdnjs\.cloudflare\.com|cdn\.jsdelivr\.net)\/(?:ajax\/libs\/)?twemoji)/i, n = /\/(?:emoji\/v2\/svg|twemoji\/[\d.]+\/(?:svg|72x72))\/([0-9a-f][0-9a-f-]*)\.svg(?:[?#].*)?$/i, r = 96;
3
+ function i(e) {
4
+ return /^[\d#*]\uFE0F?\u20E3$/u.test(e) || /^\p{Extended_Pictographic}/u.test(e);
5
+ }
6
+ function a(e) {
7
+ if (!e) return !1;
8
+ try {
9
+ let t = new Intl.Segmenter("en", { granularity: "grapheme" }), n = 0;
10
+ for (let { segment: r } of t.segment(e)) {
11
+ if (!i(r)) return !1;
12
+ n += 1;
13
+ }
14
+ return n > 0;
15
+ } catch {
16
+ return /^(?:\p{Extended_Pictographic}|\d\uFE0F?\u20E3)+$/u.test(e);
17
+ }
18
+ }
19
+ function o(e) {
20
+ let t = e.match(n);
21
+ if (!t?.[1] || !/(?:\/emoji\/|\/twemoji\/)/i.test(e)) return null;
22
+ try {
23
+ return t[1].split("-").map((e) => String.fromCodePoint(Number.parseInt(e, 16))).join("");
24
+ } catch {
25
+ return null;
26
+ }
27
+ }
28
+ function s(e) {
29
+ if (!e) return null;
30
+ let n = typeof e.src == "string" ? e.src.trim() : "", i = typeof e.alt == "string" ? e.alt.trim() : "", s = Number(e.width), c = Number(e.height);
31
+ if (Number.isFinite(s) && s >= r && Number.isFinite(c) && c >= r) return null;
32
+ let l = o(n);
33
+ return !t.test(n) && l === null ? null : (a(i) ? i : null) ?? l;
34
+ }
35
+ function c(t) {
36
+ return t.type === "image" && typeof t.attrs?.src == "string" && e.test(t.attrs.src);
37
+ }
38
+ function l(t) {
39
+ if (typeof t != "string") return !1;
40
+ let n = t.trim();
41
+ return e.test(n) || /^https?:\/\//i.test(n) || /^blob:/i.test(n) || /^data:image\//i.test(n);
42
+ }
43
+ function u(e) {
44
+ return e.type === "image" ? l(e.attrs?.src) : !0;
45
+ }
46
+ function d(e) {
47
+ return {
48
+ type: "paragraph",
49
+ content: [{
50
+ type: "text",
51
+ text: e
52
+ }]
53
+ };
54
+ }
55
+ function f(e) {
56
+ let t = s(e.attrs);
57
+ if (e.type === "image" && t) return [d(t)];
58
+ if (!u(e)) return [];
59
+ if (!e.content) return [e];
60
+ let n = e.content.flatMap((e) => f(e));
61
+ if (e.type === "paragraph") {
62
+ let t = [], r = [], i = () => {
63
+ r.length !== 0 && (t.push({
64
+ ...e,
65
+ content: r
66
+ }), r = []);
67
+ };
68
+ for (let e of n) e.type === "image" || e.type === "paragraph" ? (i(), t.push(e)) : r.push(e);
69
+ return i(), t.length > 0 ? t : [{
70
+ ...e,
71
+ content: []
72
+ }];
73
+ }
74
+ return [{
75
+ ...e,
76
+ content: n
77
+ }];
78
+ }
79
+ function p(e) {
80
+ return f(e)[0] ?? {
81
+ type: "doc",
82
+ content: [{ type: "paragraph" }]
83
+ };
84
+ }
85
+ async function m(e, t = fetch) {
86
+ let n = p(e), r = /* @__PURE__ */ new Set(), i = (e) => {
87
+ c(e) && r.add(e.attrs?.src);
88
+ for (let t of e.content ?? []) i(t);
89
+ };
90
+ i(n);
91
+ let a = /* @__PURE__ */ new Set();
92
+ await Promise.all(Array.from(r, async (e) => {
93
+ try {
94
+ (await t(e, { credentials: "include" })).ok || a.add(e);
95
+ } catch {
96
+ a.add(e);
97
+ }
98
+ }));
99
+ let o = 0, s = (e) => c(e) && a.has(e.attrs?.src) ? (o += 1, null) : e.content ? {
100
+ ...e,
101
+ content: e.content.map(s).filter((e) => e !== null)
102
+ } : e;
103
+ return {
104
+ content: s(n) ?? {
105
+ type: "doc",
106
+ content: []
107
+ },
108
+ removed: o
109
+ };
110
+ }
111
+ //#endregion
112
+ export { p as i, l as n, m as r, s as t };