kennel 0.2.7 → 0.2.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.
@@ -1 +1,159 @@
1
- export * from "@raggle-ai/kennel-preview/kinds";
1
+ // packages/kinds/src/kinds.ts
2
+ var previewTextKinds = new Set([
3
+ "code",
4
+ "eml",
5
+ "html",
6
+ "markdown",
7
+ "table",
8
+ "text"
9
+ ]);
10
+ function previewTextKind(kind) {
11
+ return previewTextKinds.has(kind);
12
+ }
13
+ var codeExtensions = new Set([
14
+ ".astro",
15
+ ".bash",
16
+ ".c",
17
+ ".cc",
18
+ ".cpp",
19
+ ".cs",
20
+ ".css",
21
+ ".dart",
22
+ ".ex",
23
+ ".exs",
24
+ ".go",
25
+ ".graphql",
26
+ ".h",
27
+ ".hpp",
28
+ ".hs",
29
+ ".java",
30
+ ".js",
31
+ ".jsx",
32
+ ".json",
33
+ ".kt",
34
+ ".less",
35
+ ".lua",
36
+ ".ml",
37
+ ".mjs",
38
+ ".php",
39
+ ".proto",
40
+ ".py",
41
+ ".rb",
42
+ ".rs",
43
+ ".scss",
44
+ ".sh",
45
+ ".sql",
46
+ ".svelte",
47
+ ".swift",
48
+ ".toml",
49
+ ".ts",
50
+ ".tsx",
51
+ ".vue",
52
+ ".xml",
53
+ ".yaml",
54
+ ".yml",
55
+ ".zsh"
56
+ ]);
57
+ var imageExtensions = new Set([
58
+ ".avif",
59
+ ".bmp",
60
+ ".gif",
61
+ ".ico",
62
+ ".jpeg",
63
+ ".jpg",
64
+ ".png",
65
+ ".svg",
66
+ ".webp"
67
+ ]);
68
+ var knownExtensions = new Set([
69
+ ...codeExtensions,
70
+ ...imageExtensions,
71
+ ".csv",
72
+ ".eml",
73
+ ".htm",
74
+ ".html",
75
+ ".markdown",
76
+ ".md",
77
+ ".mdx",
78
+ ".pdf",
79
+ ".text",
80
+ ".tsv",
81
+ ".txt"
82
+ ]);
83
+ function previewKind(path) {
84
+ const extension = path.slice(path.lastIndexOf(".")).toLowerCase();
85
+ if (extension === ".htm" || extension === ".html")
86
+ return "html";
87
+ if (extension === ".md" || extension === ".markdown" || extension === ".mdx")
88
+ return "markdown";
89
+ if (extension === ".text" || extension === ".txt")
90
+ return "text";
91
+ if (extension === ".eml")
92
+ return "eml";
93
+ if (extension === ".csv" || extension === ".tsv")
94
+ return "table";
95
+ if (imageExtensions.has(extension))
96
+ return "image";
97
+ if (codeExtensions.has(extension))
98
+ return "code";
99
+ if (knownExtensions.has(extension))
100
+ return "binary";
101
+ return;
102
+ }
103
+ var rawMime = {
104
+ ".avif": "image/avif",
105
+ ".bmp": "image/bmp",
106
+ ".gif": "image/gif",
107
+ ".htm": "text/html; charset=utf-8",
108
+ ".html": "text/html; charset=utf-8",
109
+ ".ico": "image/x-icon",
110
+ ".jpeg": "image/jpeg",
111
+ ".jpg": "image/jpeg",
112
+ ".pdf": "application/pdf",
113
+ ".png": "image/png",
114
+ ".svg": "image/svg+xml",
115
+ ".webp": "image/webp"
116
+ };
117
+ function previewRawMime(path) {
118
+ const extension = path.slice(path.lastIndexOf(".")).toLowerCase();
119
+ const mime = rawMime[extension];
120
+ if (mime)
121
+ return mime;
122
+ if (previewKind(path) === "code" || previewKind(path) === "table")
123
+ return "text/plain; charset=utf-8";
124
+ return;
125
+ }
126
+ var mediaMime = {
127
+ ".aac": "audio/aac",
128
+ ".avif": "image/avif",
129
+ ".bmp": "image/bmp",
130
+ ".flac": "audio/flac",
131
+ ".gif": "image/gif",
132
+ ".ico": "image/x-icon",
133
+ ".jpeg": "image/jpeg",
134
+ ".jpg": "image/jpeg",
135
+ ".m4a": "audio/mp4",
136
+ ".m4v": "video/mp4",
137
+ ".mov": "video/quicktime",
138
+ ".mp3": "audio/mpeg",
139
+ ".mp4": "video/mp4",
140
+ ".oga": "audio/ogg",
141
+ ".ogg": "audio/ogg",
142
+ ".ogv": "video/ogg",
143
+ ".opus": "audio/opus",
144
+ ".png": "image/png",
145
+ ".wav": "audio/wav",
146
+ ".webm": "video/webm",
147
+ ".webp": "image/webp"
148
+ };
149
+ function mediaRawMime(path) {
150
+ const extension = path.slice(path.lastIndexOf(".")).toLowerCase();
151
+ return mediaMime[extension];
152
+ }
153
+ export {
154
+ mediaRawMime,
155
+ previewKind,
156
+ previewRawMime,
157
+ previewTextKind,
158
+ previewTextKinds
159
+ };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "kennel-plugins",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "Small shared contract for trusted folder view plugins in the Kennel web viewer.",
6
6
  "type": "module",
7
7
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kennel",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Open-source pop-up previews for AI output: markdown, HTML artifacts, email, images, code, tables, notes, and calendars, from the terminal or your agent session.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -69,9 +69,7 @@
69
69
  "@raggle-ai/barkdown": "0.6.1",
70
70
  "@raggle-ai/kennel-knowledge": "^0.1.0",
71
71
  "@raggle-ai/kennel-mcp": "^0.1.8",
72
- "@raggle-ai/kennel-preview": "^0.1.0",
73
72
  "@raggle-ai/local": "0.14.0",
74
- "@raggle-ai/markdown": "^0.1.0",
75
73
  "@raggle-ai/scout-ui": "0.1.3",
76
74
  "@tailwindcss/vite": "4.3.3",
77
75
  "@tanstack/react-query": "^5.66.5",
@@ -115,7 +113,8 @@
115
113
  "zod": "^4.3.6"
116
114
  },
117
115
  "devDependencies": {
118
- "kennel-plugins": "0.1.1",
116
+ "@raggle-ai/kennel-preview": "0.1.0",
117
+ "kennel-plugins": "0.1.2",
119
118
  "@types/node": "^22.13.4",
120
119
  "typescript": "^5.9.3"
121
120
  },