@desktalk/miniapp-note 0.1.0-alpha.1
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/LICENSE +21 -0
- package/dist/backend.d.ts +5 -0
- package/dist/backend.d.ts.map +1 -0
- package/dist/backend.js +235 -0
- package/dist/backend.js.map +7 -0
- package/dist/components/NoteActions.d.ts +19 -0
- package/dist/components/NoteActions.d.ts.map +1 -0
- package/dist/components/NoteEditor.d.ts +29 -0
- package/dist/components/NoteEditor.d.ts.map +1 -0
- package/dist/components/NoteList.d.ts +12 -0
- package/dist/components/NoteList.d.ts.map +1 -0
- package/dist/frontend.d.ts +3 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +3795 -0
- package/dist/frontend.js.map +7 -0
- package/dist/i18n/manifest.json +6 -0
- package/dist/lib/frontmatter.d.ts +13 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/helpers.d.ts +8 -0
- package/dist/lib/helpers.d.ts.map +1 -0
- package/dist/meta.json +3 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -0
- package/icons/miniapp-note-icon.png +0 -0
- package/package.json +45 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-rolled YAML front matter parser and serializer.
|
|
3
|
+
* Handles title, tags (inline [a,b] and block - item syntax), and created date.
|
|
4
|
+
*/
|
|
5
|
+
export interface FrontMatter {
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
created: string | null;
|
|
9
|
+
body: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseFrontMatter(raw: string): FrontMatter;
|
|
12
|
+
export declare function serializeFrontMatter(title: string, tags: string[], created: string, body: string): string;
|
|
13
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/lib/frontmatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAiDzD;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GACX,MAAM,CAQR"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for the Note MiniApp backend.
|
|
3
|
+
*/
|
|
4
|
+
/** Convert a title to a URL-safe slug, max 64 chars. */
|
|
5
|
+
export declare function slugify(text: string): string;
|
|
6
|
+
/** Extract a plain-text preview from Markdown body, stripping formatting. */
|
|
7
|
+
export declare function preview(body: string, maxLen?: number): string;
|
|
8
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/lib/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ5C;AAED,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAM,GAAG,MAAM,CAM1D"}
|
package/dist/meta.json
ADDED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Shared data types for the Note MiniApp. */
|
|
2
|
+
export interface Note {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
tags: string[];
|
|
6
|
+
content: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
}
|
|
10
|
+
export interface NoteMeta {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
tags: string[];
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
/** First ~100 chars of body text for preview */
|
|
17
|
+
preview: string;
|
|
18
|
+
}
|
|
19
|
+
export interface TagCount {
|
|
20
|
+
tag: string;
|
|
21
|
+
count: number;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@desktalk/miniapp-note",
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "Note-taking MiniApp for DeskTalk.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/vincentdchan/DeskTalk.git",
|
|
10
|
+
"directory": "packages/miniapp-note"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"icon": "./icons/miniapp-note-icon.png",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"icons"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
"./backend": {
|
|
22
|
+
"types": "./dist/backend.d.ts",
|
|
23
|
+
"import": "./dist/backend.js"
|
|
24
|
+
},
|
|
25
|
+
"./frontend": {
|
|
26
|
+
"types": "./dist/frontend.d.ts",
|
|
27
|
+
"import": "./dist/frontend.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"react": "^19.0.0",
|
|
32
|
+
"react-dom": "^19.0.0",
|
|
33
|
+
"@desktalk/sdk": "0.1.0-alpha.1",
|
|
34
|
+
"@desktalk/ui": "0.1.0-alpha.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"typescript": "^5.7.0",
|
|
38
|
+
"@types/react": "^19.0.0",
|
|
39
|
+
"@types/react-dom": "^19.0.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "desktalk-build",
|
|
43
|
+
"clean": "rm -rf dist"
|
|
44
|
+
}
|
|
45
|
+
}
|