@hiai-gg/docsmint 0.3.1 → 0.3.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 (75) hide show
  1. package/README.md +26 -23
  2. package/backend/src/lib/lifecycle-service.ts +574 -0
  3. package/{packages/sdk/dist → dist}/client.d.ts +16 -1
  4. package/{packages/sdk/dist → dist}/client.js +25 -1
  5. package/dist/frontend/DatePicker-BcMD49PV.js +275 -0
  6. package/dist/frontend/SettingsDialog-DiAyhzw0.js +4852 -0
  7. package/dist/frontend/ShareDialog-DaZf1raY.js +1317 -0
  8. package/dist/frontend/api/categories.d.ts +14 -0
  9. package/dist/frontend/api/categories.js +2 -0
  10. package/dist/frontend/api/documents.d.ts +16 -0
  11. package/dist/frontend/api/documents.js +2 -0
  12. package/dist/frontend/api/folders.d.ts +14 -0
  13. package/dist/frontend/api/folders.js +2 -0
  14. package/dist/frontend/api/settings.d.ts +10 -0
  15. package/dist/frontend/api/settings.js +2 -0
  16. package/dist/frontend/api/tags.d.ts +15 -0
  17. package/dist/frontend/api/tags.js +2 -0
  18. package/dist/frontend/categories-BE6ZpZl8.js +61 -0
  19. package/dist/frontend/client-B9hzI0W8.js +76 -0
  20. package/dist/frontend/client-C6QQGb0e.js +2766 -0
  21. package/dist/frontend/components/settings.d.ts +2 -0
  22. package/dist/frontend/components/settings.js +2 -0
  23. package/dist/frontend/components/sidebar.d.ts +2 -0
  24. package/dist/frontend/components/sidebar.js +4569 -0
  25. package/dist/frontend/context-DbnW5yib.js +31 -0
  26. package/dist/frontend/dashboard.d.ts +2 -0
  27. package/dist/frontend/dashboard.js +2152 -0
  28. package/dist/frontend/documents-DFVS9SsL.js +83 -0
  29. package/dist/frontend/extension.d.ts +35 -0
  30. package/dist/frontend/extension.js +10 -0
  31. package/dist/frontend/folders-CGe9diAG.js +91 -0
  32. package/dist/frontend/frontend.css +2 -0
  33. package/dist/frontend/i18n.d.ts +5 -0
  34. package/dist/frontend/i18n.js +8 -0
  35. package/dist/frontend/input-ieWIt8I7.js +257 -0
  36. package/dist/frontend/messages-CTGAsqFu.js +1106 -0
  37. package/dist/frontend/resolve-Bl6xmJl_.js +2068 -0
  38. package/dist/frontend/schemas-DwtKylCJ.js +3002 -0
  39. package/dist/frontend/search.d.ts +2 -0
  40. package/dist/frontend/search.js +1001 -0
  41. package/dist/frontend/settings-PCrOtied.js +1313 -0
  42. package/dist/frontend/shared-document.d.ts +16 -0
  43. package/dist/frontend/shared-document.js +193 -0
  44. package/dist/frontend/tag-C5xrg-bb.js +53 -0
  45. package/dist/frontend/tag-store.svelte-B3839FYq.js +6152 -0
  46. package/dist/frontend/tags-DVXTut0p.js +48 -0
  47. package/dist/frontend/theme.d.ts +4 -0
  48. package/dist/frontend/theme.js +8 -0
  49. package/dist/frontend/theme.svelte-ei0QxXa8.js +49 -0
  50. package/dist/index.d.ts +7 -0
  51. package/dist/index.js +3 -0
  52. package/dist/lifecycle.d.ts +90 -0
  53. package/dist/lifecycle.js +99 -0
  54. package/{packages/sdk/dist → dist}/types.d.ts +5 -0
  55. package/dist/workspace.d.ts +21 -0
  56. package/dist/workspace.js +66 -0
  57. package/package.json +75 -35
  58. package/packages/cli/src/index.ts +1 -1
  59. package/packages/db/src/schema.ts +41 -0
  60. package/packages/mcp-server/src/index.ts +1 -1
  61. package/frontend/src/lib/components/editor/shared-document.ts +0 -237
  62. package/frontend/src/lib/extensions/context.ts +0 -60
  63. package/frontend/src/lib/extensions/doc-tabs.ts +0 -18
  64. package/frontend/src/lib/extensions/resolve.ts +0 -48
  65. package/frontend/src/lib/extensions/types.ts +0 -202
  66. package/frontend/src/lib/hosts/DocsmintSharedDocumentHost.svelte +0 -65
  67. package/frontend/src/lib/hosts/HiaiDocsDashboardHost.svelte +0 -1007
  68. package/frontend/src/lib/hosts/HiaiDocsExtensionProvider.svelte +0 -20
  69. package/frontend/src/lib/hosts/HiaiDocsSearchHost.svelte +0 -996
  70. package/frontend/src/lib/hosts/index.ts +0 -25
  71. package/frontend/src/lib/index.ts +0 -65
  72. package/frontend/src/lib/stores/doc-tab-registry.svelte.ts +0 -68
  73. package/packages/sdk/dist/index.d.ts +0 -3
  74. package/packages/sdk/dist/index.js +0 -1
  75. /package/{packages/sdk/dist → dist}/types.js +0 -0
@@ -0,0 +1,83 @@
1
+ import { t as e } from "./client-B9hzI0W8.js";
2
+ //#region src/lib/api/documents.ts
3
+ var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 5e3;
4
+ function i() {
5
+ t.clear(), n.clear();
6
+ }
7
+ function a(e) {
8
+ return e ? JSON.stringify({
9
+ folderId: e.folderId ?? null,
10
+ tag: e.tag ?? null,
11
+ page: e.page ?? 1,
12
+ limit: e.limit ?? null
13
+ }) : "all";
14
+ }
15
+ function o(e) {
16
+ let t = n.get(e);
17
+ if (t) {
18
+ if (Date.now() - t.timestamp >= r) {
19
+ n.delete(e);
20
+ return;
21
+ }
22
+ return t;
23
+ }
24
+ }
25
+ function s(e, t) {
26
+ n.set(e, {
27
+ promise: t,
28
+ timestamp: Date.now()
29
+ }), setTimeout(() => {
30
+ n.delete(e);
31
+ }, r);
32
+ }
33
+ function c(r, i) {
34
+ let c = a(r), l = t.get(c);
35
+ if (l) return l;
36
+ let u = o(c);
37
+ if (u) return u.promise;
38
+ let d = new URLSearchParams();
39
+ r?.folderId && d.set("folderId", r.folderId), r?.tag && d.set("tag", r.tag), r?.page && d.set("page", String(r.page)), r?.limit && d.set("limit", String(r.limit));
40
+ let f = d.toString(), p = e(`/api/documents${f ? `?${f}` : ""}`, {}, i).catch((e) => {
41
+ throw n.delete(c), e;
42
+ });
43
+ return t.set(c, p), s(c, p), p.finally(() => {
44
+ t.delete(c);
45
+ }), p;
46
+ }
47
+ function l(t, n) {
48
+ return e(`/api/documents/${t}`, {}, n);
49
+ }
50
+ function u(t, n) {
51
+ return i(), e("/api/documents", {
52
+ method: "POST",
53
+ body: JSON.stringify(t)
54
+ }, n);
55
+ }
56
+ function d(t, n) {
57
+ return i(), e(`/api/documents/${t}`, {
58
+ method: "PATCH",
59
+ body: JSON.stringify(n)
60
+ });
61
+ }
62
+ function f(t) {
63
+ return i(), e(`/api/documents/${t}`, { method: "DELETE" });
64
+ }
65
+ function p(t, n) {
66
+ i();
67
+ let r = new FormData();
68
+ return r.append("file", t), n && r.append("folderId", n), e("/api/documents/import", {
69
+ method: "POST",
70
+ body: r
71
+ });
72
+ }
73
+ function m(t, n) {
74
+ i();
75
+ let r = new FormData();
76
+ for (let e of t) r.append("file", e);
77
+ return n && r.append("folderId", n), e("/api/documents/import", {
78
+ method: "POST",
79
+ body: r
80
+ });
81
+ }
82
+ //#endregion
83
+ export { p as a, d as c, l as i, u as n, m as o, f as r, c as s, i as t };
@@ -0,0 +1,35 @@
1
+ import type { Component, ComponentType, Snippet, SvelteComponent } from "svelte";
2
+ export interface ExtensionVisibilityContext {
3
+ userId?: string;
4
+ pathname?: string;
5
+ capabilities?: Readonly<Record<string, boolean>>;
6
+ permissions?: Readonly<Record<string, boolean>>;
7
+ }
8
+ export type ExtensionVisibility = (context: ExtensionVisibilityContext) => boolean;
9
+ export type ExtensionIcon = ComponentType<SvelteComponent>;
10
+ export interface DocTabPanelProps { documentId: string; content: string; contentJson: object | undefined; }
11
+ export interface DocTabDefinition { id: string; label: string; component: Component<DocTabPanelProps>; order?: number; icon?: ExtensionIcon; disabled?: boolean; }
12
+ export interface NavigationExtension { id: string; label: string; href?: string; icon?: ExtensionIcon; order?: number; badge?: string | number; disabled?: boolean; visible?: ExtensionVisibility; }
13
+ export interface DashboardWidgetProps { userId?: string; }
14
+ export interface DashboardWidgetExtension { id: string; title?: string; component: Component<DashboardWidgetProps>; order?: number; colSpan?: 1 | 2 | 3 | 4 | 6 | 12; visible?: ExtensionVisibility; }
15
+ export interface SearchWidgetProps { query: string; loading: boolean; total?: number; }
16
+ export interface SearchWidgetExtension { id: string; title?: string; component: Component<SearchWidgetProps>; order?: number; visible?: ExtensionVisibility; }
17
+ export interface EditorActionContext { documentId: string; content: string; contentJson: object | undefined; selection?: unknown; commands?: Readonly<Record<string, (...args: unknown[]) => unknown>>; }
18
+ export type ExtensionAction = (context: EditorActionContext) => void | Promise<void>;
19
+ export interface EditorActionExtension { id: string; label: string; icon?: ExtensionIcon; order?: number; disabled?: boolean | ((context: EditorActionContext) => boolean); visible?: ExtensionVisibility; run: ExtensionAction; }
20
+ export interface DocumentMenuActionContext extends EditorActionContext { title?: string; }
21
+ export type DocumentMenuAction = (context: DocumentMenuActionContext) => void | Promise<void>;
22
+ export interface DocumentMenuActionExtension { id: string; label: string; icon?: ExtensionIcon; order?: number; destructive?: boolean; disabled?: boolean | ((context: DocumentMenuActionContext) => boolean); visible?: ExtensionVisibility; run: DocumentMenuAction; }
23
+ export interface SettingsSectionProps { userId?: string; }
24
+ export interface SettingsSectionExtension { id: string; label: string; component: Component<SettingsSectionProps>; order?: number; description?: string; visible?: ExtensionVisibility; }
25
+ export interface CommandPaletteActionContext { query?: string; }
26
+ export type CommandPaletteAction = (context: CommandPaletteActionContext) => void | Promise<void>;
27
+ export interface CommandPaletteActionExtension { id: string; label: string; keywords?: readonly string[]; group?: string; shortcut?: string; icon?: ExtensionIcon; order?: number; disabled?: boolean; visible?: ExtensionVisibility; run: CommandPaletteAction; }
28
+ export interface SharedDocumentExtensionContext { shareToken: string; documentId: string; title: string; content: string; contentJson?: object; role: "viewer" | "commenter" | "editor"; permissions: { read: true; annotate: boolean; edit: boolean; export: boolean; }; }
29
+ export interface SharedDocumentExtension { id: string; label: string; icon?: ExtensionIcon; order?: number; permission: "annotate" | "edit"; visible?: (context: SharedDocumentExtensionContext) => boolean; component: Component<{ context: SharedDocumentExtensionContext }>; }
30
+ export interface DocsmintFrontendExtensions { navigation: readonly NavigationExtension[]; dashboardWidgets: readonly DashboardWidgetExtension[]; searchWidgets: readonly SearchWidgetExtension[]; documentTabs: readonly DocTabDefinition[]; editorActions: readonly EditorActionExtension[]; documentMenuActions: readonly DocumentMenuActionExtension[]; settingsSections: readonly SettingsSectionExtension[]; commandPaletteActions: readonly CommandPaletteActionExtension[]; sharedDocumentHeaderActions: readonly SharedDocumentExtension[]; sharedDocumentTabs: readonly SharedDocumentExtension[]; sharedDocumentNotesModes: readonly SharedDocumentExtension[]; sharedDocumentEditorModes: readonly SharedDocumentExtension[]; }
31
+ /** @deprecated Use DocsmintFrontendExtensions. */
32
+ export type HiaiDocsFrontendExtensions = DocsmintFrontendExtensions;
33
+ export type FrontendExtensions = DocsmintFrontendExtensions;
34
+ export interface DocsmintExtensionProviderProps { extensions?: Partial<DocsmintFrontendExtensions>; children: Snippet; }
35
+ export declare const DocsmintExtensionProvider: Component<DocsmintExtensionProviderProps>;
@@ -0,0 +1,10 @@
1
+ import { n as e } from "./context-DbnW5yib.js";
2
+ import { M as t, dt as n, et as r, ft as i, j as a, k as o, n as s } from "./client-C6QQGb0e.js";
3
+ //#region src/lib/hosts/HiaiDocsExtensionProvider.svelte
4
+ function c(c, l) {
5
+ i(l, !0), e(s(l, "extensions", 19, () => ({}))());
6
+ var u = t();
7
+ o(r(u), () => l.children), a(c, u), n();
8
+ }
9
+ //#endregion
10
+ export { c as DocsmintExtensionProvider };
@@ -0,0 +1,91 @@
1
+ import { t as e } from "./client-B9hzI0W8.js";
2
+ //#region src/lib/api/folders.ts
3
+ function t(e) {
4
+ return {
5
+ id: e.id,
6
+ name: e.name,
7
+ parentId: e.parentId,
8
+ categoryId: e.categoryId ?? null,
9
+ order: e.order ?? 0,
10
+ documentCount: e.documentCount ?? 0,
11
+ subfolderCount: e.subfolderCount ?? 0,
12
+ children: [],
13
+ documents: [],
14
+ createdAt: e.createdAt,
15
+ updatedAt: e.updatedAt
16
+ };
17
+ }
18
+ function n(e, t = "") {
19
+ let n = e.content ?? "";
20
+ return {
21
+ id: e.id,
22
+ title: e.title,
23
+ content: n,
24
+ folderId: e.folderId,
25
+ folderName: t,
26
+ tags: [],
27
+ createdAt: e.createdAt,
28
+ updatedAt: e.updatedAt,
29
+ excerpt: n.length > 200 ? `${n.slice(0, 200)}…` : n
30
+ };
31
+ }
32
+ async function r(r, i) {
33
+ let a = await e(`/api/folders/${encodeURIComponent(r)}`, {}, i), o = t(a);
34
+ return a.children && (o.children = a.children.map(t)), a.documents && (o.documents = a.documents.map((e) => n(e))), o;
35
+ }
36
+ async function i(n = null, r = !1, i) {
37
+ let a = new URLSearchParams();
38
+ n && a.append("parentId", n), r && a.append("all", "true");
39
+ let o = (await e(`/api/folders${a.toString() ? `?${a.toString()}` : ""}`, {}, i)).map(t);
40
+ if (n === null && !r) {
41
+ let e = (/* @__PURE__ */ new Date()).toISOString();
42
+ return [{
43
+ id: "root",
44
+ name: "Workspace",
45
+ parentId: null,
46
+ order: 0,
47
+ documentCount: 0,
48
+ subfolderCount: 0,
49
+ children: o,
50
+ documents: [],
51
+ createdAt: e,
52
+ updatedAt: e
53
+ }];
54
+ }
55
+ return o;
56
+ }
57
+ async function a(t, n) {
58
+ let r = [], i = /* @__PURE__ */ new Set(), a = t;
59
+ for (; a && !i.has(a);) {
60
+ i.add(a);
61
+ let t = await e(`/api/folders/${encodeURIComponent(a)}`, {}, n);
62
+ r.unshift({
63
+ id: t.id,
64
+ name: t.name
65
+ }), a = t.parentId;
66
+ }
67
+ return r;
68
+ }
69
+ async function o(n) {
70
+ return t(await e("/api/folders", {
71
+ method: "POST",
72
+ body: JSON.stringify(n)
73
+ }));
74
+ }
75
+ async function s(n, r) {
76
+ return t(await e(`/api/folders/${encodeURIComponent(n)}`, {
77
+ method: "PATCH",
78
+ body: JSON.stringify(r)
79
+ }));
80
+ }
81
+ async function c(t) {
82
+ await e(`/api/folders/${encodeURIComponent(t)}`, { method: "DELETE" });
83
+ }
84
+ async function l(t) {
85
+ return n(await e(`/api/documents/${encodeURIComponent(t)}/duplicate`, { method: "POST" }));
86
+ }
87
+ async function u(t) {
88
+ await e(`/api/documents/${encodeURIComponent(t)}`, { method: "DELETE" });
89
+ }
90
+ //#endregion
91
+ export { r as a, s as c, l as i, u as n, a as o, c as r, i as s, o as t };
@@ -0,0 +1,2 @@
1
+ .editor-settings.svelte-1eaqpj summary:where(.svelte-1eaqpj){list-style:none}.editor-settings.svelte-1eaqpj summary:where(.svelte-1eaqpj)::-webkit-details-marker{display:none}.editor-settings-chevron.svelte-1eaqpj{font-size:20px;transition:transform .18s}.editor-settings[open].svelte-1eaqpj .editor-settings-chevron:where(.svelte-1eaqpj){transform:rotate(180deg)}.preference-switch.svelte-1eaqpj{border:1px solid var(--border);background:var(--muted);cursor:pointer;border-radius:999px;flex:none;width:42px;height:24px;padding:2px;transition:background .18s,border-color .18s;position:relative}.preference-switch.svelte-1eaqpj span:where(.svelte-1eaqpj){background:var(--background);border-radius:999px;width:18px;height:18px;transition:transform .18s;display:block;box-shadow:0 1px 3px #00000038}.preference-switch.enabled.svelte-1eaqpj{border-color:var(--primary);background:var(--primary)}.preference-switch.enabled.svelte-1eaqpj span:where(.svelte-1eaqpj){transform:translate(18px)}.preference-switch.svelte-1eaqpj:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.preference-switch.svelte-1eaqpj:disabled{cursor:not-allowed;opacity:.45}[data-select-viewport],[data-combobox-viewport]{scrollbar-width:none!important;-ms-overflow-style:none!important;-webkit-overflow-scrolling:touch!important}[data-combobox-viewport]::-webkit-scrollbar{display:none!important}[data-select-viewport]::-webkit-scrollbar{display:none!important}.datepicker.svelte-zmry26{position:relative}.dp-trigger.svelte-zmry26{border:1px solid var(--input);width:100%;height:2.25rem;color:var(--foreground);cursor:pointer;text-align:left;background:0 0;border-radius:6px;align-items:center;gap:6px;padding:0 .625rem;font-size:.875rem;display:inline-flex}.dp-trigger.svelte-zmry26:focus-visible{box-shadow:0 0 0 1px var(--ring);outline:none}.dp-placeholder.svelte-zmry26{color:var(--muted-foreground)}.dp-popover.svelte-zmry26{z-index:60;background:var(--popover);width:16rem;color:var(--popover-foreground);border:1px solid var(--border);border-radius:8px;padding:8px;position:absolute;top:calc(100% + 4px);left:0;box-shadow:0 4px 16px #0000002e}.dp-header.svelte-zmry26{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.dp-title.svelte-zmry26{font-size:.8125rem;font-weight:600}.dp-nav.svelte-zmry26{width:1.75rem;height:1.75rem;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.dp-nav.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dp-weekdays.svelte-zmry26,.dp-grid.svelte-zmry26{grid-template-columns:repeat(7,1fr);gap:2px;display:grid}.dp-weekday.svelte-zmry26{text-align:center;color:var(--muted-foreground);padding:2px 0;font-size:.6875rem}.dp-empty.svelte-zmry26{aspect-ratio:1}.dp-day.svelte-zmry26{aspect-ratio:1;color:var(--foreground);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;font-size:.8125rem;display:inline-flex}.dp-day.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dp-day.today.svelte-zmry26{box-shadow:inset 0 0 0 1px var(--ring)}.dp-day.selected.svelte-zmry26,.dp-day.selected.svelte-zmry26:hover{background:var(--primary);color:var(--primary-foreground)}.dp-clear.svelte-zmry26{width:100%;color:var(--muted-foreground);border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:6px;margin-top:6px;padding:4px 0;font-size:.75rem}.dp-clear.svelte-zmry26:hover{background:var(--accent);color:var(--accent-foreground)}.dashboard-shell.svelte-e61um3{position:relative}@media (width<=767px){.dashboard-header.svelte-e61um3{min-height:44px}.dashboard-header-actions.svelte-e61um3{top:calc(.75rem + env(safe-area-inset-top));z-index:10;position:absolute;right:.75rem}.dashboard-context-identity.svelte-e61um3{min-width:0;margin-left:56px}}@media (width<=520px){.dashboard-header-actions.svelte-e61um3 button{width:40px;height:40px;padding:0}.dashboard-action-label.svelte-e61um3{display:none}}@media (width<=449px){.dashboard-context-identity.svelte-e61um3{margin-left:52px}.dashboard-context-identity.svelte-e61um3 p:where(.svelte-e61um3){display:none}.dashboard-context-identity.svelte-e61um3 h1:where(.svelte-e61um3){font-size:1.25rem}}@media (width<=767px){.search-form.svelte-itf76n{margin-left:56px}}@media (width<=420px){.search-form.svelte-itf76n{margin-left:52px}}
2
+ /*$vite$:1*/
@@ -0,0 +1,5 @@
1
+ export type Locale = string;
2
+ export declare const messages: Record<string, unknown>;
3
+ export declare const supportedLocales: readonly Locale[];
4
+ export declare function setLocale(locale: Locale): unknown;
5
+ export declare function getMessage(name: string): unknown;
@@ -0,0 +1,8 @@
1
+ import { Cr as e, t, wr as n } from "./messages-CTGAsqFu.js";
2
+ //#region ../packages/sdk/frontend-entries/i18n.ts
3
+ var r = t, i = e, a = n;
4
+ function o(e) {
5
+ return t[e];
6
+ }
7
+ //#endregion
8
+ export { o as getMessage, r as messages, a as setLocale, i as supportedLocales };
@@ -0,0 +1,257 @@
1
+ import "./context-DbnW5yib.js";
2
+ import { $ as e, D as t, H as n, J as r, L as i, M as a, N as o, R as s, _t as c, c as l, dt as u, et as d, ft as f, it as p, j as m, k as h, l as g, n as _, o as v, ot as y, r as b, tt as x } from "./client-C6QQGb0e.js";
3
+ import { a as S, i as C } from "./resolve-Bl6xmJl_.js";
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
+ var w = /* @__PURE__ */ new Set([
6
+ "$$slots",
7
+ "$$events",
8
+ "$$legacy",
9
+ "class",
10
+ "variant",
11
+ "size",
12
+ "ref",
13
+ "href",
14
+ "children"
15
+ ]), T = o("<a><!></a>"), E = o("<button><!></button>");
16
+ function D(n, r) {
17
+ f(r, !0);
18
+ let i = _(r, "variant", 3, "default"), o = _(r, "size", 3, "default"), s = _(r, "ref", 15, null), l = _(r, "href", 3, void 0), p = b(r, w);
19
+ var y = a(), x = d(y), S = (n) => {
20
+ var u = T();
21
+ g(u, (e) => ({
22
+ href: l(),
23
+ class: e,
24
+ ...p
25
+ }), [() => C(O({
26
+ variant: i(),
27
+ size: o()
28
+ }), r.class)]);
29
+ var f = e(u), _ = (e) => {
30
+ var t = a();
31
+ h(d(t), () => r.children), m(e, t);
32
+ };
33
+ t(f, (e) => {
34
+ r.children && e(_);
35
+ }), c(u), v(u, (e) => s(e), () => s()), m(n, u);
36
+ }, D = (n) => {
37
+ var l = E();
38
+ g(l, (e) => ({
39
+ class: e,
40
+ ...p
41
+ }), [() => C(O({
42
+ variant: i(),
43
+ size: o()
44
+ }), r.class)]);
45
+ var u = e(l), f = (e) => {
46
+ var t = a();
47
+ h(d(t), () => r.children), m(e, t);
48
+ };
49
+ t(u, (e) => {
50
+ r.children && e(f);
51
+ }), c(l), v(l, (e) => s(e), () => s()), m(n, l);
52
+ };
53
+ t(x, (e) => {
54
+ l() ? e(S) : e(D, -1);
55
+ }), m(n, y), u();
56
+ }
57
+ //#endregion
58
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/button/index.js
59
+ var O = S({
60
+ 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",
61
+ variants: {
62
+ variant: {
63
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
64
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
65
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
66
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
67
+ ghost: "hover:bg-accent hover:text-accent-foreground",
68
+ link: "text-primary underline-offset-4 hover:underline"
69
+ },
70
+ size: {
71
+ default: "h-9 px-4 py-2",
72
+ sm: "h-8 rounded-md px-3 text-xs",
73
+ lg: "h-10 rounded-md px-8",
74
+ icon: "h-9 w-9"
75
+ }
76
+ },
77
+ defaultVariants: {
78
+ variant: "default",
79
+ size: "default"
80
+ }
81
+ }), k = /* @__PURE__ */ new Set([
82
+ "$$slots",
83
+ "$$events",
84
+ "$$legacy",
85
+ "ref",
86
+ "class",
87
+ "children"
88
+ ]), A = o("<label><!></label>");
89
+ function j(n, r) {
90
+ f(r, !0);
91
+ let i = _(r, "ref", 15, null), o = b(r, k);
92
+ var s = A();
93
+ g(s, (e) => ({
94
+ class: e,
95
+ ...o
96
+ }), [() => C("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", r.class)]);
97
+ var l = e(s), p = (e) => {
98
+ var t = a();
99
+ h(d(t), () => r.children), m(e, t);
100
+ };
101
+ t(l, (e) => {
102
+ r.children && e(p);
103
+ }), c(s), v(s, (e) => i(e), () => i()), m(n, s), u();
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.svelte
107
+ var M = o("<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\"><!></div></div>");
108
+ function N(i, o) {
109
+ f(o, !0);
110
+ let l = _(o, "open", 15, !1), g = y(null);
111
+ function b() {
112
+ l(!1), o.onOpenChange?.(!1);
113
+ }
114
+ function S(e) {
115
+ e.key === "Escape" && b();
116
+ }
117
+ function C(e) {
118
+ n(g) && !n(g).contains(e.target) && b();
119
+ }
120
+ r(() => (l() ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
121
+ document.body.style.overflow = "";
122
+ }));
123
+ var w = a(), T = d(w), E = (r) => {
124
+ var i = M(), l = x(e(i), 2), u = e(l), f = (e) => {
125
+ var t = a();
126
+ h(d(t), () => o.children), m(e, t);
127
+ };
128
+ t(u, (e) => {
129
+ o.children && e(f);
130
+ }), c(l), v(l, (e) => p(g, e), () => n(g)), c(i), s("keydown", i, S), s("click", i, C), m(r, i);
131
+ };
132
+ t(T, (e) => {
133
+ l() && e(E);
134
+ }), m(i, w), u();
135
+ }
136
+ i(["keydown", "click"]);
137
+ //#endregion
138
+ //#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
139
+ var P = /* @__PURE__ */ new Set([
140
+ "$$slots",
141
+ "$$events",
142
+ "$$legacy",
143
+ "class",
144
+ "children"
145
+ ]), F = o("<p><!></p>");
146
+ function I(n, r) {
147
+ f(r, !0);
148
+ let i = b(r, P);
149
+ var o = F();
150
+ g(o, (e) => ({
151
+ class: e,
152
+ ...i
153
+ }), [() => C("text-sm text-muted-foreground", r.class)]);
154
+ var s = e(o), l = (e) => {
155
+ var t = a();
156
+ h(d(t), () => r.children), m(e, t);
157
+ };
158
+ t(s, (e) => {
159
+ r.children && e(l);
160
+ }), c(o), m(n, o), u();
161
+ }
162
+ //#endregion
163
+ //#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
164
+ var L = /* @__PURE__ */ new Set([
165
+ "$$slots",
166
+ "$$events",
167
+ "$$legacy",
168
+ "class",
169
+ "children"
170
+ ]), R = o("<div><!></div>");
171
+ function z(n, r) {
172
+ f(r, !0);
173
+ let i = b(r, L);
174
+ var o = R();
175
+ g(o, (e) => ({
176
+ class: e,
177
+ ...i
178
+ }), [() => C("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", r.class)]);
179
+ var s = e(o), l = (e) => {
180
+ var t = a();
181
+ h(d(t), () => r.children), m(e, t);
182
+ };
183
+ t(s, (e) => {
184
+ r.children && e(l);
185
+ }), c(o), m(n, o), u();
186
+ }
187
+ //#endregion
188
+ //#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
189
+ var B = /* @__PURE__ */ new Set([
190
+ "$$slots",
191
+ "$$events",
192
+ "$$legacy",
193
+ "class",
194
+ "children"
195
+ ]), V = o("<div><!></div>");
196
+ function H(n, r) {
197
+ f(r, !0);
198
+ let i = b(r, B);
199
+ var o = V();
200
+ g(o, (e) => ({
201
+ class: e,
202
+ ...i
203
+ }), [() => C("flex flex-col space-y-1.5 text-center sm:text-left", r.class)]);
204
+ var s = e(o), l = (e) => {
205
+ var t = a();
206
+ h(d(t), () => r.children), m(e, t);
207
+ };
208
+ t(s, (e) => {
209
+ r.children && e(l);
210
+ }), c(o), m(n, o), u();
211
+ }
212
+ //#endregion
213
+ //#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
214
+ var U = /* @__PURE__ */ new Set([
215
+ "$$slots",
216
+ "$$events",
217
+ "$$legacy",
218
+ "class",
219
+ "children"
220
+ ]), W = o("<h2><!></h2>");
221
+ function G(n, r) {
222
+ f(r, !0);
223
+ let i = b(r, U);
224
+ var o = W();
225
+ g(o, (e) => ({
226
+ class: e,
227
+ ...i
228
+ }), [() => C("text-lg font-semibold leading-none tracking-tight", r.class)]);
229
+ var s = e(o), l = (e) => {
230
+ var t = a();
231
+ h(d(t), () => r.children), m(e, t);
232
+ };
233
+ t(s, (e) => {
234
+ r.children && e(l);
235
+ }), c(o), m(n, o), u();
236
+ }
237
+ //#endregion
238
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/input/input.svelte
239
+ var K = /* @__PURE__ */ new Set([
240
+ "$$slots",
241
+ "$$events",
242
+ "$$legacy",
243
+ "ref",
244
+ "class",
245
+ "value"
246
+ ]), q = o("<input/>");
247
+ function J(e, t) {
248
+ f(t, !0);
249
+ let n = _(t, "ref", 15, null), r = _(t, "value", 15, ""), i = b(t, K);
250
+ var a = q();
251
+ g(a, (e) => ({
252
+ class: e,
253
+ ...i
254
+ }), [() => C("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", t.class)], void 0, void 0, void 0, !0), v(a, (e) => n(e), () => n()), l(a, r), m(e, a), u();
255
+ }
256
+ //#endregion
257
+ export { I as a, D as c, z as i, G as n, N as o, H as r, j as s, J as t };