@hiai-gg/docsmint 0.3.0 → 0.3.2
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.
- package/README.md +26 -23
- package/{packages/sdk/dist → dist}/client.d.ts +16 -1
- package/{packages/sdk/dist → dist}/client.js +25 -1
- package/dist/frontend/DatePicker-BcMD49PV.js +275 -0
- package/dist/frontend/SettingsDialog-DiAyhzw0.js +4852 -0
- package/dist/frontend/ShareDialog-DaZf1raY.js +1317 -0
- package/dist/frontend/api/categories.d.ts +10 -0
- package/dist/frontend/api/categories.js +2 -0
- package/dist/frontend/api/documents.d.ts +10 -0
- package/dist/frontend/api/documents.js +2 -0
- package/dist/frontend/api/folders.d.ts +10 -0
- package/dist/frontend/api/folders.js +2 -0
- package/dist/frontend/api/settings.d.ts +8 -0
- package/dist/frontend/api/settings.js +2 -0
- package/dist/frontend/api/tags.d.ts +11 -0
- package/dist/frontend/api/tags.js +2 -0
- package/dist/frontend/categories-BE6ZpZl8.js +61 -0
- package/dist/frontend/client-B9hzI0W8.js +76 -0
- package/dist/frontend/client-C6QQGb0e.js +2766 -0
- package/dist/frontend/components/settings.d.ts +2 -0
- package/dist/frontend/components/settings.js +2 -0
- package/dist/frontend/components/sidebar.d.ts +2 -0
- package/dist/frontend/components/sidebar.js +4569 -0
- package/dist/frontend/context-DbnW5yib.js +31 -0
- package/dist/frontend/dashboard.d.ts +2 -0
- package/dist/frontend/dashboard.js +2152 -0
- package/dist/frontend/documents-DFVS9SsL.js +83 -0
- package/dist/frontend/extension.d.ts +2 -0
- package/dist/frontend/extension.js +10 -0
- package/dist/frontend/folders-CGe9diAG.js +91 -0
- package/dist/frontend/frontend.css +2 -0
- package/dist/frontend/i18n.d.ts +5 -0
- package/dist/frontend/i18n.js +8 -0
- package/dist/frontend/input-ieWIt8I7.js +257 -0
- package/dist/frontend/messages-CTGAsqFu.js +1106 -0
- package/dist/frontend/resolve-Bl6xmJl_.js +2068 -0
- package/dist/frontend/schemas-DwtKylCJ.js +3002 -0
- package/dist/frontend/search.d.ts +2 -0
- package/dist/frontend/search.js +1001 -0
- package/dist/frontend/settings-PCrOtied.js +1313 -0
- package/dist/frontend/shared-document.d.ts +3 -0
- package/dist/frontend/shared-document.js +193 -0
- package/dist/frontend/tag-C5xrg-bb.js +53 -0
- package/dist/frontend/tag-store.svelte-B3839FYq.js +6152 -0
- package/dist/frontend/tags-DVXTut0p.js +48 -0
- package/dist/frontend/theme.d.ts +4 -0
- package/dist/frontend/theme.js +8 -0
- package/dist/frontend/theme.svelte-ei0QxXa8.js +49 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -0
- package/dist/lifecycle.d.ts +90 -0
- package/dist/lifecycle.js +99 -0
- package/{packages/sdk/dist → dist}/types.d.ts +5 -0
- package/dist/workspace.d.ts +21 -0
- package/dist/workspace.js +66 -0
- package/package.json +70 -36
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +41 -0
- package/packages/mcp-server/src/index.ts +1 -1
- package/frontend/src/lib/components/editor/shared-document.ts +0 -237
- package/frontend/src/lib/extensions/context.ts +0 -60
- package/frontend/src/lib/extensions/doc-tabs.ts +0 -18
- package/frontend/src/lib/extensions/resolve.ts +0 -48
- package/frontend/src/lib/extensions/types.ts +0 -202
- package/frontend/src/lib/hosts/DocsmintSharedDocumentHost.svelte +0 -65
- package/frontend/src/lib/hosts/HiaiDocsDashboardHost.svelte +0 -1007
- package/frontend/src/lib/hosts/HiaiDocsExtensionProvider.svelte +0 -20
- package/frontend/src/lib/hosts/HiaiDocsSearchHost.svelte +0 -996
- package/frontend/src/lib/hosts/index.ts +0 -25
- package/frontend/src/lib/index.ts +0 -65
- package/frontend/src/lib/stores/doc-tab-registry.svelte.ts +0 -68
- package/packages/sdk/dist/index.d.ts +0 -3
- package/packages/sdk/dist/index.js +0 -1
- /package/{packages/sdk/dist → dist}/types.js +0 -0
package/README.md
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DocsMint
|
|
2
2
|
|
|
3
3
|
**A self-hosted, AI-native knowledge workspace for people, applications, and agents.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
product branding used by the standalone installable web application. Typed
|
|
7
|
-
frontend hosts and extension contracts support self-hosted customization.
|
|
8
|
-
|
|
9
|
-
HiAi-Docs stores documents in a structured JSON editor model first. Markdown is
|
|
5
|
+
DocsMint stores documents in a structured JSON editor model first. Markdown is
|
|
10
6
|
the convenient second format for editing, importing, and exporting content.
|
|
11
7
|
Automatic chunking, 1024-dimensional embeddings, multilingual hybrid search,
|
|
12
8
|
and GraphRAG make the same knowledge base useful to people, applications, and
|
|
@@ -15,6 +11,8 @@ server.
|
|
|
15
11
|
|
|
16
12
|
[](LICENSE)
|
|
17
13
|
[](https://github.com/hiai-gg/docsmint/releases)
|
|
14
|
+
[](https://www.npmjs.com/package/@hiai-gg/docsmint)
|
|
15
|
+
[](https://hub.docker.com/r/vgalibov/docsmint)
|
|
18
16
|
[](https://github.com/hiai-gg/docsmint/stargazers)
|
|
19
17
|
[](https://github.com/hiai-gg/docsmint/actions/workflows/ci.yml)
|
|
20
18
|
[](https://bun.sh)
|
|
@@ -27,7 +25,7 @@ server.
|
|
|
27
25
|
|
|
28
26
|
<img width="1920" height="974" alt="DocsMint installable document workspace" src="https://github.com/user-attachments/assets/94701d01-a361-4ca1-b16d-de2a0c64d684" />
|
|
29
27
|
|
|
30
|
-
## Why
|
|
28
|
+
## Why DocsMint?
|
|
31
29
|
|
|
32
30
|
- **Write naturally** in a rich visual editor or raw Markdown.
|
|
33
31
|
- **Find meaning, not only keywords** with exact, lexical, fuzzy, vector,
|
|
@@ -50,8 +48,8 @@ server.
|
|
|
50
48
|
never silently replays mutations.
|
|
51
49
|
- **Explicit local drafts** with local autosave, review/apply, optimistic
|
|
52
50
|
concurrency (`expectedUpdatedAt`), and actionable conflict handling.
|
|
53
|
-
- **Composable
|
|
54
|
-
|
|
51
|
+
- **Composable self-hosted UI** with typed dashboard/search hosts and extension
|
|
52
|
+
slots.
|
|
55
53
|
- **Mobile-first editor polish** including a single responsive sidebar, safe
|
|
56
54
|
PWA updates, raw Markdown auto-height, and accessible narrow-screen controls.
|
|
57
55
|
|
|
@@ -64,12 +62,12 @@ For self-hosted customization, see [PWA hosting](docs/PWA_HOSTING.md) and
|
|
|
64
62
|
|
|
65
63
|
## Fastest installation: give this prompt to your agent
|
|
66
64
|
|
|
67
|
-
If you are installing
|
|
65
|
+
If you are installing DocsMint through an AI coding agent, use this path first.
|
|
68
66
|
It keeps the setup to Docker plus one provider choice and avoids unnecessary
|
|
69
67
|
source-code changes.
|
|
70
68
|
|
|
71
69
|
```text
|
|
72
|
-
Install
|
|
70
|
+
Install DocsMint from https://github.com/HiAi-gg/docsmint.
|
|
73
71
|
Verify Docker and Docker Compose v2, clone the repository, and run
|
|
74
72
|
`bash scripts/quickstart.sh`. Do not print or commit .env. Ask me to enter only
|
|
75
73
|
an OpenRouter key or select Ollama, then run quickstart again. Verify
|
|
@@ -147,10 +145,14 @@ The canonical local ports are:
|
|
|
147
145
|
See [Deployment](docs/DEPLOYMENT.md) for domains, TLS, provider tuning,
|
|
148
146
|
backups, and production operation.
|
|
149
147
|
|
|
150
|
-
## Use
|
|
148
|
+
## Use DocsMint from the terminal
|
|
151
149
|
|
|
152
150
|
The published package includes the CLI. It connects to an already running
|
|
153
|
-
|
|
151
|
+
DocsMint server; installing it does not deploy the server.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npm install @hiai-gg/docsmint
|
|
155
|
+
```
|
|
154
156
|
|
|
155
157
|
```bash
|
|
156
158
|
bunx --package @hiai-gg/docsmint docsmint init \
|
|
@@ -169,7 +171,7 @@ command and configuration precedence.
|
|
|
169
171
|
|
|
170
172
|
## Connect an MCP client
|
|
171
173
|
|
|
172
|
-
|
|
174
|
+
DocsMint exposes document search, reading, creation, updates, folders,
|
|
173
175
|
snapshots, history, and export as MCP tools.
|
|
174
176
|
|
|
175
177
|
```json
|
|
@@ -302,16 +304,16 @@ For pipeline internals and tuning, see [Architecture](docs/ARCHITECTURE.md) and
|
|
|
302
304
|
|
|
303
305
|
## Comparison
|
|
304
306
|
|
|
305
|
-
|
|
307
|
+
DocsMint overlaps with several excellent open-source knowledge tools, but its
|
|
306
308
|
focus is a compact knowledge runtime shared equally by humans and agents.
|
|
307
309
|
|
|
308
|
-
| Project | Primary strength | Difference from
|
|
310
|
+
| Project | Primary strength | Difference from DocsMint |
|
|
309
311
|
|---|---|---|
|
|
310
|
-
| [Outline](https://github.com/outline/outline) | Polished team wiki and collaboration |
|
|
311
|
-
| [Docmost](https://github.com/docmost/docmost) | Collaborative wiki and real-time editing |
|
|
312
|
-
| [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy) | Broad local-first productivity workspace |
|
|
313
|
-
| [AnythingLLM](https://github.com/Mintplex-Labs/anything-llm) | Chat-oriented RAG over imported sources |
|
|
314
|
-
| [Danswer](https://github.com/danswer-ai/danswer) / Onyx | Enterprise search across external connectors |
|
|
312
|
+
| [Outline](https://github.com/outline/outline) | Polished team wiki and collaboration | DocsMint emphasizes built-in retrieval, GraphRAG, scoped agent access, CLI, and MCP |
|
|
313
|
+
| [Docmost](https://github.com/docmost/docmost) | Collaborative wiki and real-time editing | DocsMint centers automatic embeddings and agent-facing integration surfaces |
|
|
314
|
+
| [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy) | Broad local-first productivity workspace | DocsMint is narrower: a self-hosted document and retrieval service |
|
|
315
|
+
| [AnythingLLM](https://github.com/Mintplex-Labs/anything-llm) | Chat-oriented RAG over imported sources | DocsMint starts with the editable knowledge base and exposes it to many clients |
|
|
316
|
+
| [Danswer](https://github.com/danswer-ai/danswer) / Onyx | Enterprise search across external connectors | DocsMint owns and edits its native corpus rather than primarily indexing other systems |
|
|
315
317
|
|
|
316
318
|
This is a product-positioning summary, not a claim that every listed project
|
|
317
319
|
lacks a feature. Check each project's current documentation when choosing a
|
|
@@ -343,6 +345,7 @@ report vulnerabilities through [SECURITY.md](SECURITY.md), not a public issue.
|
|
|
343
345
|
|
|
344
346
|
## License
|
|
345
347
|
|
|
346
|
-
|
|
348
|
+
DocsMint is released under the [Apache License 2.0](LICENSE).
|
|
347
349
|
|
|
348
|
-
|
|
350
|
+
Built as an independent open-source project in the
|
|
351
|
+
[HiAi](https://github.com/HiAi-gg) ecosystem.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* failures (502 / 503 / 504 / timeout / network reset) are retried
|
|
8
8
|
* with exponential backoff up to `config.retries` attempts.
|
|
9
9
|
*/
|
|
10
|
-
import type { DocsApiKeyCreated, DocsApiKeyListResponse, DocsAttachment, DocsAttachmentConfirmInput, DocsAttachmentListResponse, DocsAttachmentPresignInput, DocsAttachmentPresignResponse, DocsCategory, DocsCategoryInput, DocsCategoryUpdate, DocsDocument, DocsDocumentCreateInput, DocsDocumentListResponse, DocsDocumentPipeline, DocsDocumentUpdateInput, DocsFolder, DocsFolderCreateInput, DocsFolderUpdateInput, DocsGraphEntitiesResponse, DocsGraphRelatedResponse, DocsGraphSearchResponse, DocsHealthResponse, DocsRequestContext, DocsSearchOptions, DocsSearchResponse, DocsSearchSuggestItem, DocsSharedContent, DocsShareLink, DocsShareListResponse, DocsShareRole, DocsTag, DocsVersion, DocsVersionDiff } from "./types.js";
|
|
10
|
+
import type { DocsApiKeyCreated, DocsApiKeyListResponse, DocsAttachment, DocsAttachmentConfirmInput, DocsAttachmentListResponse, DocsAttachmentPresignInput, DocsAttachmentPresignResponse, DocsCategory, DocsCategoryInput, DocsCategoryUpdate, DocsDocument, DocsDocumentCreateInput, DocsDocumentListResponse, DocsDocumentCursorPage, DocsDocumentPipeline, DocsDocumentUpdateInput, DocsFolder, DocsFolderCreateInput, DocsFolderUpdateInput, DocsGraphEntitiesResponse, DocsGraphRelatedResponse, DocsGraphSearchResponse, DocsHealthResponse, DocsRequestContext, DocsSearchOptions, DocsSearchResponse, DocsSearchSuggestItem, DocsSharedContent, DocsShareLink, DocsShareListResponse, DocsShareRole, DocsTag, DocsVersion, DocsVersionDiff } from "./types.js";
|
|
11
11
|
export interface DocsClientConfig {
|
|
12
12
|
/** Base URL of the hiai-docs API, e.g. `http://localhost:50700`. */
|
|
13
13
|
baseUrl: string;
|
|
@@ -68,6 +68,15 @@ export declare class DocsClient {
|
|
|
68
68
|
page?: number;
|
|
69
69
|
limit?: number;
|
|
70
70
|
}, context?: DocsRequestContext): Promise<DocsDocumentListResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* List documents through the bounded cursor API. Cursors are opaque and
|
|
73
|
+
* bound by the server to the authenticated workspace and category scope.
|
|
74
|
+
*/
|
|
75
|
+
listDocuments(options?: {
|
|
76
|
+
categoryId?: string;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
limit?: number;
|
|
79
|
+
}, context?: DocsRequestContext): Promise<DocsDocumentCursorPage>;
|
|
71
80
|
duplicateDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
72
81
|
getDocumentPipeline(id: string, context?: DocsRequestContext): Promise<DocsDocumentPipeline>;
|
|
73
82
|
publishDoc(id: string, context?: DocsRequestContext): Promise<DocsDocument>;
|
|
@@ -183,5 +192,11 @@ export declare class DocsClient {
|
|
|
183
192
|
private wrapNetworkError;
|
|
184
193
|
private isTimeoutError;
|
|
185
194
|
private mergeContext;
|
|
195
|
+
/**
|
|
196
|
+
* Capture transport defaults at the boundary. Hosts often reuse a mutable
|
|
197
|
+
* request object for a whole incoming request; retaining its HeaderInit by
|
|
198
|
+
* reference would let later mutations silently change this client's scope.
|
|
199
|
+
*/
|
|
200
|
+
private snapshotContext;
|
|
186
201
|
private toBlob;
|
|
187
202
|
}
|
|
@@ -52,7 +52,7 @@ export class DocsClient {
|
|
|
52
52
|
this.config = {
|
|
53
53
|
baseUrl: config.baseUrl.replace(/\/+$/, ""),
|
|
54
54
|
apiKey: config.apiKey,
|
|
55
|
-
requestContext: config.requestContext,
|
|
55
|
+
requestContext: this.snapshotContext(config.requestContext),
|
|
56
56
|
fetch: config.fetch ?? fetch,
|
|
57
57
|
timeout: config.timeout ?? 10_000,
|
|
58
58
|
retries: config.retries ?? 3,
|
|
@@ -102,6 +102,19 @@ export class DocsClient {
|
|
|
102
102
|
}),
|
|
103
103
|
}, context);
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* List documents through the bounded cursor API. Cursors are opaque and
|
|
107
|
+
* bound by the server to the authenticated workspace and category scope.
|
|
108
|
+
*/
|
|
109
|
+
async listDocuments(options = {}, context) {
|
|
110
|
+
return this.request("GET", "/api/documents/cursor", {
|
|
111
|
+
query: this.cleanQuery({
|
|
112
|
+
categoryId: options.categoryId,
|
|
113
|
+
cursor: options.cursor,
|
|
114
|
+
limit: options.limit,
|
|
115
|
+
}),
|
|
116
|
+
}, context);
|
|
117
|
+
}
|
|
105
118
|
async duplicateDoc(id, context) {
|
|
106
119
|
return this.request("POST", `/api/documents/${encodeURIComponent(id)}/duplicate`, undefined, context);
|
|
107
120
|
}
|
|
@@ -543,6 +556,17 @@ export class DocsClient {
|
|
|
543
556
|
},
|
|
544
557
|
};
|
|
545
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* Capture transport defaults at the boundary. Hosts often reuse a mutable
|
|
561
|
+
* request object for a whole incoming request; retaining its HeaderInit by
|
|
562
|
+
* reference would let later mutations silently change this client's scope.
|
|
563
|
+
*/
|
|
564
|
+
snapshotContext(context) {
|
|
565
|
+
if (!context)
|
|
566
|
+
return undefined;
|
|
567
|
+
const headers = Object.freeze(Object.fromEntries(new Headers(context.headers).entries()));
|
|
568
|
+
return Object.freeze({ ...context, headers });
|
|
569
|
+
}
|
|
546
570
|
toBlob(file, mimeType) {
|
|
547
571
|
if (file instanceof Blob) {
|
|
548
572
|
// Re-wrap with explicit MIME if the caller passed one.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { A as e, B as t, F as n, G as r, H as i, I as a, J as o, K as s, L as c, M as ee, N as l, P as u, Q as d, R as te, U as ne, V as re, W as ie, X as ae, Y as oe, Z as se, j as ce, k as le, q as ue, z as de } from "./messages-CTGAsqFu.js";
|
|
2
|
+
import "./context-DbnW5yib.js";
|
|
3
|
+
import { $ as f, A as p, C as m, D as h, E as fe, H as g, J as _, L as v, M as y, N as b, R as x, T as S, _t as C, d as w, dt as T, et as E, ft as pe, g as me, h as he, i as D, it as O, j as k, k as A, l as j, lt as ge, n as M, nt as N, o as P, ot as F, q as I, r as L, t as R, tt as z } from "./client-C6QQGb0e.js";
|
|
4
|
+
import { a as B, i as V, r as H } from "./resolve-Bl6xmJl_.js";
|
|
5
|
+
import { u as _e } from "./tag-store.svelte-B3839FYq.js";
|
|
6
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/badge/badge.svelte
|
|
7
|
+
var U = /* @__PURE__ */ new Set([
|
|
8
|
+
"$$slots",
|
|
9
|
+
"$$events",
|
|
10
|
+
"$$legacy",
|
|
11
|
+
"ref",
|
|
12
|
+
"class",
|
|
13
|
+
"variant",
|
|
14
|
+
"children"
|
|
15
|
+
]), W = b("<div><!></div>");
|
|
16
|
+
function G(e, t) {
|
|
17
|
+
pe(t, !0);
|
|
18
|
+
let n = M(t, "ref", 15, null), r = M(t, "variant", 3, "default"), i = L(t, U);
|
|
19
|
+
var a = W();
|
|
20
|
+
j(a, (e) => ({
|
|
21
|
+
class: e,
|
|
22
|
+
...i
|
|
23
|
+
}), [() => V(K({ variant: r() }), t.class)]);
|
|
24
|
+
var o = f(a), s = (e) => {
|
|
25
|
+
var n = y();
|
|
26
|
+
A(E(n), () => t.children), k(e, n);
|
|
27
|
+
};
|
|
28
|
+
h(o, (e) => {
|
|
29
|
+
t.children && e(s);
|
|
30
|
+
}), C(a), P(a, (e) => n(e), () => n()), k(e, a), T();
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/badge/index.js
|
|
34
|
+
var K = B({
|
|
35
|
+
base: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
36
|
+
variants: { variant: {
|
|
37
|
+
default: "border-transparent bg-primary text-primary-foreground shadow",
|
|
38
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
39
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow",
|
|
40
|
+
outline: "text-foreground"
|
|
41
|
+
} },
|
|
42
|
+
defaultVariants: { variant: "default" }
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/calendar.svelte
|
|
46
|
+
function q(e, t) {
|
|
47
|
+
let n = R(t, [
|
|
48
|
+
"children",
|
|
49
|
+
"$$slots",
|
|
50
|
+
"$$events",
|
|
51
|
+
"$$legacy"
|
|
52
|
+
]), r = [
|
|
53
|
+
["path", { d: "M8 2v4" }],
|
|
54
|
+
["path", { d: "M16 2v4" }],
|
|
55
|
+
["rect", {
|
|
56
|
+
width: "18",
|
|
57
|
+
height: "18",
|
|
58
|
+
x: "3",
|
|
59
|
+
y: "4",
|
|
60
|
+
rx: "2"
|
|
61
|
+
}],
|
|
62
|
+
["path", { d: "M3 10h18" }]
|
|
63
|
+
];
|
|
64
|
+
H(e, D({ name: "calendar" }, () => n, {
|
|
65
|
+
get iconNode() {
|
|
66
|
+
return r;
|
|
67
|
+
},
|
|
68
|
+
children: (e, n) => {
|
|
69
|
+
var r = y();
|
|
70
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
71
|
+
},
|
|
72
|
+
$$slots: { default: !0 }
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/chevron-left.svelte
|
|
77
|
+
function J(e, t) {
|
|
78
|
+
let n = R(t, [
|
|
79
|
+
"children",
|
|
80
|
+
"$$slots",
|
|
81
|
+
"$$events",
|
|
82
|
+
"$$legacy"
|
|
83
|
+
]), r = [["path", { d: "m15 18-6-6 6-6" }]];
|
|
84
|
+
H(e, D({ name: "chevron-left" }, () => n, {
|
|
85
|
+
get iconNode() {
|
|
86
|
+
return r;
|
|
87
|
+
},
|
|
88
|
+
children: (e, n) => {
|
|
89
|
+
var r = y();
|
|
90
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
91
|
+
},
|
|
92
|
+
$$slots: { default: !0 }
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/folder-kanban.svelte
|
|
97
|
+
function Y(e, t) {
|
|
98
|
+
let n = R(t, [
|
|
99
|
+
"children",
|
|
100
|
+
"$$slots",
|
|
101
|
+
"$$events",
|
|
102
|
+
"$$legacy"
|
|
103
|
+
]), r = [
|
|
104
|
+
["path", { d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z" }],
|
|
105
|
+
["path", { d: "M8 10v4" }],
|
|
106
|
+
["path", { d: "M12 10v2" }],
|
|
107
|
+
["path", { d: "M16 10v6" }]
|
|
108
|
+
];
|
|
109
|
+
H(e, D({ name: "folder-kanban" }, () => n, {
|
|
110
|
+
get iconNode() {
|
|
111
|
+
return r;
|
|
112
|
+
},
|
|
113
|
+
children: (e, n) => {
|
|
114
|
+
var r = y();
|
|
115
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
116
|
+
},
|
|
117
|
+
$$slots: { default: !0 }
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/rotate-ccw.svelte
|
|
122
|
+
function X(e, t) {
|
|
123
|
+
let n = R(t, [
|
|
124
|
+
"children",
|
|
125
|
+
"$$slots",
|
|
126
|
+
"$$events",
|
|
127
|
+
"$$legacy"
|
|
128
|
+
]), r = [["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }]];
|
|
129
|
+
H(e, D({ name: "rotate-ccw" }, () => n, {
|
|
130
|
+
get iconNode() {
|
|
131
|
+
return r;
|
|
132
|
+
},
|
|
133
|
+
children: (e, n) => {
|
|
134
|
+
var r = y();
|
|
135
|
+
m(E(r), t, "default", {}, null), k(e, r);
|
|
136
|
+
},
|
|
137
|
+
$$slots: { default: !0 }
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/lib/components/DatePicker.svelte
|
|
142
|
+
var ve = b("<span class=\"dp-weekday svelte-zmry26\"> </span>"), ye = b("<span class=\"dp-empty svelte-zmry26\"></span>"), be = b("<button type=\"button\"> </button>"), xe = b("<button type=\"button\" class=\"dp-clear svelte-zmry26\"> </button>"), Se = b("<div class=\"dp-popover svelte-zmry26\" role=\"dialog\"><div class=\"dp-header svelte-zmry26\"><button type=\"button\" class=\"dp-nav svelte-zmry26\"><!></button> <span class=\"dp-title svelte-zmry26\"> </span> <button type=\"button\" class=\"dp-nav svelte-zmry26\"><!></button></div> <div class=\"dp-weekdays svelte-zmry26\"></div> <div class=\"dp-grid svelte-zmry26\"></div> <!></div>"), Ce = b("<div class=\"datepicker svelte-zmry26\"><button type=\"button\" aria-haspopup=\"dialog\" class=\"dp-trigger svelte-zmry26\"><!> <span> </span></button> <!></div>");
|
|
143
|
+
function we(m, v) {
|
|
144
|
+
pe(v, !0);
|
|
145
|
+
let b = M(v, "value", 15, ""), D = M(v, "ariaLabel", 19, () => ce()), A = M(v, "placeholder", 19, () => l()), j = F(!1), L = F(null), R = [
|
|
146
|
+
t(),
|
|
147
|
+
de(),
|
|
148
|
+
te(),
|
|
149
|
+
c(),
|
|
150
|
+
a(),
|
|
151
|
+
n(),
|
|
152
|
+
u()
|
|
153
|
+
], B = [
|
|
154
|
+
d(),
|
|
155
|
+
se(),
|
|
156
|
+
ae(),
|
|
157
|
+
oe(),
|
|
158
|
+
o(),
|
|
159
|
+
ue(),
|
|
160
|
+
s(),
|
|
161
|
+
r(),
|
|
162
|
+
ie(),
|
|
163
|
+
ne(),
|
|
164
|
+
i(),
|
|
165
|
+
re()
|
|
166
|
+
];
|
|
167
|
+
function V(e) {
|
|
168
|
+
return String(e).padStart(2, "0");
|
|
169
|
+
}
|
|
170
|
+
function H(e) {
|
|
171
|
+
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
172
|
+
return t ? {
|
|
173
|
+
y: Number(t[1]),
|
|
174
|
+
m: Number(t[2]) - 1,
|
|
175
|
+
d: Number(t[3])
|
|
176
|
+
} : null;
|
|
177
|
+
}
|
|
178
|
+
let U = /* @__PURE__ */ new Date(), W = F(N(U.getFullYear())), G = F(N(U.getMonth()));
|
|
179
|
+
_(() => {
|
|
180
|
+
if (g(j)) {
|
|
181
|
+
let e = H(b());
|
|
182
|
+
e && (O(W, e.y, !0), O(G, e.m, !0));
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
let K = ge(() => H(b()));
|
|
186
|
+
function Y() {
|
|
187
|
+
let e = (new Date(g(W), g(G), 1).getDay() + 6) % 7, t = new Date(g(W), g(G) + 1, 0).getDate(), n = [];
|
|
188
|
+
for (let t = 0; t < e; t++) n.push(null);
|
|
189
|
+
for (let e = 1; e <= t; e++) n.push(e);
|
|
190
|
+
return n;
|
|
191
|
+
}
|
|
192
|
+
function X(e) {
|
|
193
|
+
return e === U.getDate() && g(G) === U.getMonth() && g(W) === U.getFullYear();
|
|
194
|
+
}
|
|
195
|
+
function we(e) {
|
|
196
|
+
return g(K) !== null && g(K).y === g(W) && g(K).m === g(G) && g(K).d === e;
|
|
197
|
+
}
|
|
198
|
+
function Te(e) {
|
|
199
|
+
b(`${g(W)}-${V(g(G) + 1)}-${V(e)}`), O(j, !1), v.onchange?.();
|
|
200
|
+
}
|
|
201
|
+
function Ee() {
|
|
202
|
+
b(""), O(j, !1), v.onchange?.();
|
|
203
|
+
}
|
|
204
|
+
function De() {
|
|
205
|
+
g(G) === 0 ? (O(G, 11), O(W, g(W) - 1)) : O(G, g(G) - 1);
|
|
206
|
+
}
|
|
207
|
+
function Oe() {
|
|
208
|
+
g(G) === 11 ? (O(G, 0), O(W, g(W) + 1)) : O(G, g(G) + 1);
|
|
209
|
+
}
|
|
210
|
+
_(() => {
|
|
211
|
+
if (!g(j)) return;
|
|
212
|
+
function e(e) {
|
|
213
|
+
g(L) && !g(L).contains(e.target) && O(j, !1);
|
|
214
|
+
}
|
|
215
|
+
function t(e) {
|
|
216
|
+
e.key === "Escape" && O(j, !1);
|
|
217
|
+
}
|
|
218
|
+
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
219
|
+
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
var Z = Ce(), Q = f(Z), ke = f(Q);
|
|
223
|
+
q(ke, { class: "size-3.5 shrink-0 opacity-70" });
|
|
224
|
+
var $ = z(ke, 2), Ae = f($, !0);
|
|
225
|
+
C($), C(Q);
|
|
226
|
+
var je = z(Q, 2), Me = (t) => {
|
|
227
|
+
var n = Se(), r = f(n), i = f(r);
|
|
228
|
+
J(f(i), { class: "size-4" }), C(i);
|
|
229
|
+
var a = z(i, 2), o = f(a);
|
|
230
|
+
C(a);
|
|
231
|
+
var s = z(a, 2);
|
|
232
|
+
_e(f(s), { class: "size-4" }), C(s), C(r);
|
|
233
|
+
var c = z(r, 2);
|
|
234
|
+
S(c, 20, () => R, (e) => e, (e, t) => {
|
|
235
|
+
var n = ve(), r = f(n, !0);
|
|
236
|
+
C(n), I(() => p(r, t)), k(e, n);
|
|
237
|
+
}), C(c);
|
|
238
|
+
var l = z(c, 2);
|
|
239
|
+
S(l, 21, Y, fe, (e, t) => {
|
|
240
|
+
var n = y(), r = E(n), i = (e) => {
|
|
241
|
+
k(e, ye());
|
|
242
|
+
}, a = (e) => {
|
|
243
|
+
var n = be();
|
|
244
|
+
let r;
|
|
245
|
+
var i = f(n, !0);
|
|
246
|
+
C(n), I((e) => {
|
|
247
|
+
r = he(n, 1, "dp-day svelte-zmry26", null, r, e), p(i, g(t));
|
|
248
|
+
}, [() => ({
|
|
249
|
+
selected: we(g(t)),
|
|
250
|
+
today: X(g(t))
|
|
251
|
+
})]), x("click", n, () => Te(g(t))), k(e, n);
|
|
252
|
+
};
|
|
253
|
+
h(r, (e) => {
|
|
254
|
+
g(t) === null ? e(i) : e(a, -1);
|
|
255
|
+
}), k(e, n);
|
|
256
|
+
}), C(l);
|
|
257
|
+
var u = z(l, 2), d = (e) => {
|
|
258
|
+
var t = xe(), n = f(t, !0);
|
|
259
|
+
C(t), I((e) => p(n, e), [() => ee()]), x("click", t, Ee), k(e, t);
|
|
260
|
+
};
|
|
261
|
+
h(u, (e) => {
|
|
262
|
+
b() && e(d);
|
|
263
|
+
}), C(n), I((e, t) => {
|
|
264
|
+
w(n, "aria-label", D()), w(i, "aria-label", e), p(o, `${B[g(G)] ?? ""} ${g(W) ?? ""}`), w(s, "aria-label", t);
|
|
265
|
+
}, [() => e(), () => le()]), x("click", i, De), x("click", s, Oe), k(t, n);
|
|
266
|
+
};
|
|
267
|
+
h(je, (e) => {
|
|
268
|
+
g(j) && e(Me);
|
|
269
|
+
}), C(Z), P(Z, (e) => O(L, e), () => g(L)), I(() => {
|
|
270
|
+
w(Q, "id", v.id), w(Q, "aria-label", D()), w(Q, "aria-expanded", g(j)), he($, 1, me(b() ? "" : "dp-placeholder"), "svelte-zmry26"), p(Ae, b() || A());
|
|
271
|
+
}), x("click", Q, () => O(j, !g(j))), k(m, Z), T();
|
|
272
|
+
}
|
|
273
|
+
v(["click"]);
|
|
274
|
+
//#endregion
|
|
275
|
+
export { q as a, J as i, X as n, G as o, Y as r, we as t };
|