@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.
Files changed (50) hide show
  1. package/dist/components/ui/code-block.d.ts +1 -3
  2. package/dist/components/ui/code-block.js +32 -60
  3. package/dist/components/ui/data-table.d.ts +211 -273
  4. package/dist/components/ui/data-table.js +1894 -2012
  5. package/dist/components/ui/effect-form.js +169 -170
  6. package/dist/components/ui/form.js +112 -113
  7. package/dist/components/ui/icon-input.js +40 -43
  8. package/dist/components/ui/menubar.d.ts +29 -0
  9. package/dist/components/ui/pagination.js +2 -2
  10. package/dist/components/ui/sidebar-layout.js +67 -72
  11. package/dist/components/ui/theme-switcher.js +3 -3
  12. package/dist/components/ui/virtualized-combobox.js +31 -34
  13. package/dist/lib/{docs-core.d.ts → docs.d.ts} +135 -144
  14. package/dist/lib/{docs-core.js → docs.js} +597 -440
  15. package/dist/lib/documentation-toolkit.d.ts +19 -1
  16. package/dist/lib/documentation-toolkit.js +164 -66
  17. package/dist/lib/httpapi-cli.d.ts +5 -4
  18. package/dist/lib/httpapi-cli.js +256 -34
  19. package/dist/lib/httpapi-client.js +3 -3
  20. package/dist/lib/httpapi-helpers.d.ts +8 -6
  21. package/dist/lib/httpapi-helpers.js +12 -12
  22. package/dist/lib/httpapi-mcp.js +3 -3
  23. package/dist/lib/httpapi-toolkit.js +3 -3
  24. package/dist/lib/markdown/content.d.ts +13 -0
  25. package/dist/lib/markdown/server.d.ts +19 -0
  26. package/dist/lib/query.d.ts +3 -2
  27. package/dist/lib/query.js +10 -8
  28. package/dist/lib/seo.js +2 -2
  29. package/dist/lib/webfetch-toolkit.js +6 -6
  30. package/dist/services/agent/client/atom.d.ts +7 -0
  31. package/dist/services/agent/client/index.js +481 -304
  32. package/dist/services/agent/index.d.ts +16 -0
  33. package/dist/services/agent/index.js +102 -1
  34. package/dist/services/agent/schema.d.ts +28 -0
  35. package/dist/services/agent/schema.js +15 -4
  36. package/dist/services/file-extraction/index.js +4 -4
  37. package/dist/services/file-extraction/schema.js +2 -2
  38. package/dist/services/health/index.js +9 -9
  39. package/dist/services/notification/channels/ses/index.js +2 -2
  40. package/dist/services/notification/channels/ses/schema.js +2 -2
  41. package/dist/services/notification/client/index.js +5 -5
  42. package/dist/services/notification/index.js +2 -2
  43. package/dist/services/notification/persistence/drizzle.js +2 -2
  44. package/dist/services/notification/persistence/index.js +15 -15
  45. package/dist/services/notification/persistence/schema.js +12 -12
  46. package/dist/services/notification/public.js +7 -7
  47. package/dist/services/notification/schema.js +2 -2
  48. package/dist/services/s3/index.js +2 -2
  49. package/dist/services/s3/schema.js +2 -2
  50. 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, highlighter, language, messages, }: CodeBlockProps): import("react").JSX.Element;
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 { Fragment, useEffect as useEffect2, useState as useState2 } from "react";
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 codeBodyClassName = "font-mono text-[0.875rem] leading-[1.625] break-all whitespace-pre-wrap [&_code]:block [&_code]:font-mono [&_code]:text-[inherit] [&_code]:leading-[inherit] [&_code]:whitespace-pre-wrap [&_span]:break-all";
136
- var getTokenStyle = (token) => {
137
- const style = {};
138
- if (token.variants.light?.color) {
139
- style["--shiki-light"] = token.variants.light.color;
140
- }
141
- if (token.variants.dark?.color) {
142
- style["--shiki-dark"] = token.variants.dark.color;
143
- }
144
- return style;
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 [tokens, setTokens] = useState2();
153
- useEffect2(() => {
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: language.toLowerCase()
181
+ children: highlighted.lang
188
182
  }),
189
183
  /* @__PURE__ */ jsx3(CopyButton, {
190
184
  value: code,
191
- valueDescription: `${language.toLowerCase()} code`,
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: "bg-muted max-h-full overflow-auto p-3",
199
- children: tokens ? /* @__PURE__ */ jsx3("div", {
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
  });