@krak-stack/registry 0.1.19 → 0.1.21
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/dist/components/ui/code-block.d.ts +1 -3
- package/dist/components/ui/code-block.js +32 -60
- package/dist/components/ui/data-table.d.ts +211 -273
- package/dist/components/ui/data-table.js +1894 -2012
- package/dist/components/ui/effect-form.js +169 -170
- package/dist/components/ui/form.js +112 -113
- package/dist/components/ui/icon-input.js +40 -43
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/sidebar-layout.js +67 -72
- package/dist/components/ui/theme-switcher.js +3 -3
- package/dist/components/ui/virtualized-combobox.js +31 -34
- package/dist/lib/{docs-core.d.ts → docs.d.ts} +135 -144
- package/dist/lib/{docs-core.js → docs.js} +597 -440
- package/dist/lib/documentation-toolkit.d.ts +19 -1
- package/dist/lib/documentation-toolkit.js +164 -66
- package/dist/lib/httpapi-cli.d.ts +5 -4
- package/dist/lib/httpapi-cli.js +256 -34
- package/dist/lib/httpapi-client.js +3 -3
- package/dist/lib/httpapi-helpers.d.ts +8 -6
- package/dist/lib/httpapi-helpers.js +12 -12
- package/dist/lib/httpapi-mcp.js +3 -3
- package/dist/lib/httpapi-toolkit.js +3 -3
- package/dist/lib/markdown/content.d.ts +13 -0
- package/dist/lib/markdown/server.d.ts +19 -0
- package/dist/lib/query.d.ts +3 -2
- package/dist/lib/query.js +10 -8
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/services/agent/client/atom.d.ts +7 -0
- package/dist/services/agent/client/index.js +481 -304
- package/dist/services/agent/index.d.ts +16 -0
- package/dist/services/agent/index.js +102 -1
- package/dist/services/agent/schema.d.ts +28 -0
- package/dist/services/agent/schema.js +15 -4
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/index.js +9 -9
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +5 -5
- package/dist/services/notification/index.js +2 -2
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +7 -7
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/package.json +6 -38
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { HighlighterCore } from "shiki/core";
|
|
2
1
|
type CodeBlockMessages = {
|
|
3
2
|
copy?: string;
|
|
4
3
|
copied?: string;
|
|
@@ -6,9 +5,8 @@ type CodeBlockMessages = {
|
|
|
6
5
|
};
|
|
7
6
|
type CodeBlockProps = {
|
|
8
7
|
code: string;
|
|
9
|
-
highlighter: HighlighterCore;
|
|
10
8
|
language?: string;
|
|
11
9
|
messages?: CodeBlockMessages;
|
|
12
10
|
};
|
|
13
|
-
export declare function CodeBlock({ code,
|
|
11
|
+
export declare function CodeBlock({ code, language, messages, }: CodeBlockProps): import("react").JSX.Element;
|
|
14
12
|
export {};
|
|
@@ -130,44 +130,34 @@ function CopyButton({
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// ../../src/components/ui/code-block.tsx
|
|
133
|
-
import {
|
|
133
|
+
import { highlight } from "@tanstack/highlight";
|
|
134
|
+
import { createThemeCss } from "@tanstack/highlight/theme";
|
|
135
|
+
import { githubDarkTheme } from "@tanstack/highlight/themes/github-dark";
|
|
136
|
+
import { githubLightTheme } from "@tanstack/highlight/themes/github-light";
|
|
134
137
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
var themeCss = `${createThemeCss({
|
|
139
|
+
light: githubLightTheme,
|
|
140
|
+
dark: githubDarkTheme,
|
|
141
|
+
lightSelector: "[data-code-theme]",
|
|
142
|
+
darkSelector: ".dark [data-code-theme]",
|
|
143
|
+
codeBlockSelector: "[data-code-theme] pre.th-code",
|
|
144
|
+
lineNumbersSelector: "[data-code-theme] .th-code--line-numbers"
|
|
145
|
+
})}
|
|
146
|
+
[data-code-theme] pre.th-code {
|
|
147
|
+
margin: 0;
|
|
148
|
+
overflow: visible;
|
|
149
|
+
background: transparent;
|
|
150
|
+
font: inherit;
|
|
151
|
+
color: inherit;
|
|
152
|
+
}
|
|
153
|
+
[data-code-theme] pre.th-code code { font: inherit; }`;
|
|
146
154
|
function CodeBlock({
|
|
147
155
|
code,
|
|
148
|
-
highlighter,
|
|
149
156
|
language = "text",
|
|
150
157
|
messages
|
|
151
158
|
}) {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
let active = true;
|
|
155
|
-
setTokens(undefined);
|
|
156
|
-
try {
|
|
157
|
-
const result = highlighter.codeToTokensWithThemes(code, {
|
|
158
|
-
lang: language.toLowerCase() || "text",
|
|
159
|
-
themes: {
|
|
160
|
-
light: "vitesse-light",
|
|
161
|
-
dark: "vitesse-dark"
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
if (active)
|
|
165
|
-
setTokens(result);
|
|
166
|
-
} catch {}
|
|
167
|
-
return () => {
|
|
168
|
-
active = false;
|
|
169
|
-
};
|
|
170
|
-
}, [code, highlighter, language]);
|
|
159
|
+
const normalizedLanguage = language.toLowerCase() || "text";
|
|
160
|
+
const highlighted = highlight(code, { lang: normalizedLanguage });
|
|
171
161
|
const copyMessages = {};
|
|
172
162
|
if (messages?.copy !== undefined)
|
|
173
163
|
copyMessages.copy = messages.copy;
|
|
@@ -177,48 +167,30 @@ function CodeBlock({
|
|
|
177
167
|
copyMessages.copyFailed = messages.copyFailed;
|
|
178
168
|
}
|
|
179
169
|
return /* @__PURE__ */ jsxs2("div", {
|
|
180
|
-
className: "overflow-hidden rounded-md border",
|
|
170
|
+
className: "not-prose bg-muted overflow-hidden rounded-md border text-[var(--th-token)]",
|
|
171
|
+
"data-code-theme": true,
|
|
181
172
|
children: [
|
|
173
|
+
/* @__PURE__ */ jsx3("style", {
|
|
174
|
+
children: themeCss
|
|
175
|
+
}),
|
|
182
176
|
/* @__PURE__ */ jsxs2("div", {
|
|
183
|
-
className: "border-border/60 flex items-center justify-between border-b px-3 py-2",
|
|
177
|
+
className: "bg-background border-border/60 flex items-center justify-between border-b px-3 py-2",
|
|
184
178
|
children: [
|
|
185
179
|
/* @__PURE__ */ jsx3("span", {
|
|
186
180
|
className: "text-muted-foreground font-mono text-xs",
|
|
187
|
-
children:
|
|
181
|
+
children: highlighted.lang
|
|
188
182
|
}),
|
|
189
183
|
/* @__PURE__ */ jsx3(CopyButton, {
|
|
190
184
|
value: code,
|
|
191
|
-
valueDescription: `${
|
|
185
|
+
valueDescription: `${highlighted.lang} code`,
|
|
192
186
|
variant: "secondary",
|
|
193
187
|
messages: copyMessages
|
|
194
188
|
})
|
|
195
189
|
]
|
|
196
190
|
}),
|
|
197
191
|
/* @__PURE__ */ jsx3("div", {
|
|
198
|
-
className: "
|
|
199
|
-
|
|
200
|
-
className: codeBodyClassName,
|
|
201
|
-
children: /* @__PURE__ */ jsx3("code", {
|
|
202
|
-
className: `language-${language}`,
|
|
203
|
-
children: tokens.map((line, lineIndex) => /* @__PURE__ */ jsxs2(Fragment, {
|
|
204
|
-
children: [
|
|
205
|
-
line.map((token) => /* @__PURE__ */ jsx3("span", {
|
|
206
|
-
className: "text-[var(--shiki-light)] dark:text-[var(--shiki-dark)]",
|
|
207
|
-
style: getTokenStyle(token),
|
|
208
|
-
children: token.content
|
|
209
|
-
}, token.offset)),
|
|
210
|
-
lineIndex < tokens.length - 1 ? `
|
|
211
|
-
` : null
|
|
212
|
-
]
|
|
213
|
-
}, lineIndex))
|
|
214
|
-
})
|
|
215
|
-
}) : /* @__PURE__ */ jsx3("div", {
|
|
216
|
-
className: `max-w-full ${codeBodyClassName}`,
|
|
217
|
-
children: /* @__PURE__ */ jsx3("code", {
|
|
218
|
-
className: `language-${language}`,
|
|
219
|
-
children: code
|
|
220
|
-
})
|
|
221
|
-
})
|
|
192
|
+
className: "max-h-full overflow-auto font-mono text-[0.875rem] leading-[1.625]",
|
|
193
|
+
dangerouslySetInnerHTML: { __html: highlighted.html }
|
|
222
194
|
})
|
|
223
195
|
]
|
|
224
196
|
});
|