@moldable-ai/ui 0.2.3 → 0.2.5
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.
|
@@ -11,7 +11,7 @@ declare function Item({ className, variant, size, asChild, ...props }: React.Com
|
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
declare const itemMediaVariants: (props?: ({
|
|
14
|
-
variant?: "
|
|
14
|
+
variant?: "default" | "image" | "icon" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/lib/commands.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAErC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gDAAgD;IAChD,MAAM,EAAE,aAAa,CAAA;CAC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AA;IAChB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqExE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldable-ai/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Shared UI components for Moldable applications",
|
|
5
5
|
"author": "Desiderata LLC",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -32,14 +32,6 @@
|
|
|
32
32
|
"src/styles",
|
|
33
33
|
"LICENSE"
|
|
34
34
|
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "tsc",
|
|
37
|
-
"dev": "tsc --watch",
|
|
38
|
-
"lint": "eslint . --ext .ts,.tsx --max-warnings 0",
|
|
39
|
-
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
|
40
|
-
"check-types": "tsc --noEmit",
|
|
41
|
-
"test": "vitest run"
|
|
42
|
-
},
|
|
43
35
|
"dependencies": {
|
|
44
36
|
"@hookform/resolvers": "^5.2.2",
|
|
45
37
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
@@ -94,18 +86,26 @@
|
|
|
94
86
|
"zod": "^4.3.5"
|
|
95
87
|
},
|
|
96
88
|
"devDependencies": {
|
|
97
|
-
"@moldable-ai/eslint-config": "workspace:*",
|
|
98
|
-
"@moldable-ai/prettier-config": "workspace:*",
|
|
99
|
-
"@moldable-ai/typescript-config": "workspace:*",
|
|
100
89
|
"@types/node": "^24.0.3",
|
|
101
90
|
"@types/react": "^19.1.6",
|
|
102
91
|
"@types/react-dom": "^19.1.6",
|
|
103
92
|
"jsdom": "^26.1.0",
|
|
104
93
|
"typescript": "^5.8.3",
|
|
105
|
-
"vitest": "^3.2.4"
|
|
94
|
+
"vitest": "^3.2.4",
|
|
95
|
+
"@moldable-ai/eslint-config": "0.1.2",
|
|
96
|
+
"@moldable-ai/prettier-config": "0.1.2",
|
|
97
|
+
"@moldable-ai/typescript-config": "0.1.2"
|
|
106
98
|
},
|
|
107
99
|
"peerDependencies": {
|
|
108
100
|
"react": "^19.0.0",
|
|
109
101
|
"react-dom": "^19.0.0"
|
|
102
|
+
},
|
|
103
|
+
"scripts": {
|
|
104
|
+
"build": "tsc",
|
|
105
|
+
"dev": "tsc --watch",
|
|
106
|
+
"lint": "eslint . --ext .ts,.tsx --max-warnings 0",
|
|
107
|
+
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
|
108
|
+
"check-types": "tsc --noEmit",
|
|
109
|
+
"test": "vitest run"
|
|
110
110
|
}
|
|
111
|
-
}
|
|
111
|
+
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type MarkdownProps = {
|
|
2
|
-
markdown: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
proseSize?: 'sm' | 'base' | 'lg';
|
|
5
|
-
};
|
|
6
|
-
declare function NonMemoizedMarkdown({ markdown, className, proseSize }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare const Markdown: import("react").MemoExoticComponent<typeof NonMemoizedMarkdown>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/components/chat/markdown.tsx"],"names":[],"mappings":"AAMA,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;CACjC,CAAA;AAwFD,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAgB,EAAE,EAAE,aAAa,2CAyBpF;AAED,eAAO,MAAM,QAAQ,iEAMpB,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import ReactMarkdown from 'react-markdown';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import rehypeRaw from 'rehype-raw';
|
|
6
|
-
import remarkGfm from 'remark-gfm';
|
|
7
|
-
const components = {
|
|
8
|
-
img({ src, alt }) {
|
|
9
|
-
if (!src)
|
|
10
|
-
return null;
|
|
11
|
-
return (_jsx("span", { className: "flex justify-center", children: _jsx("img", { src: src, alt: alt ?? '', className: "h-auto max-w-full rounded-lg" }) }));
|
|
12
|
-
},
|
|
13
|
-
table({ children }) {
|
|
14
|
-
return (_jsx("table", { className: "border-collapse border px-3 py-1", children: children }));
|
|
15
|
-
},
|
|
16
|
-
th({ children }) {
|
|
17
|
-
return (_jsx("th", { className: "bg-muted border px-3 py-1 break-words", children: children }));
|
|
18
|
-
},
|
|
19
|
-
td({ children }) {
|
|
20
|
-
return _jsx("td", { className: "border px-3 py-1 break-words", children: children });
|
|
21
|
-
},
|
|
22
|
-
ol: ({ children, ...props }) => (_jsx("ol", { className: "ml-4 list-outside list-decimal", ...props, children: children })),
|
|
23
|
-
ul: ({ children, ...props }) => (_jsx("ul", { className: "ml-4 list-outside list-disc", ...props, children: children })),
|
|
24
|
-
li: ({ children, ...props }) => (_jsx("li", { className: "py-1", ...props, children: children })),
|
|
25
|
-
strong: ({ children, ...props }) => (_jsx("span", { className: "font-semibold", ...props, children: children })),
|
|
26
|
-
a: ({ children, href, ...props }) => (_jsx("a", { className: "font-bold hover:underline", href: href ?? '#', target: "_blank", rel: "noreferrer", ...props, children: children })),
|
|
27
|
-
pre: ({ children, ...props }) => (_jsx("pre", { className: "overflow-x-auto rounded-lg bg-muted/50 p-3 text-sm", ...props, children: children })),
|
|
28
|
-
code: ({ children, className, ...props }) => {
|
|
29
|
-
// Check if this is an inline code block (no className means inline)
|
|
30
|
-
const isInline = !className;
|
|
31
|
-
if (isInline) {
|
|
32
|
-
return (_jsx("code", { className: "rounded bg-muted px-1.5 py-0.5 text-sm font-mono", ...props, children: children }));
|
|
33
|
-
}
|
|
34
|
-
return (_jsx("code", { className: cn('font-mono text-sm', className), ...props, children: children }));
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
function NonMemoizedMarkdown({ markdown, className, proseSize = 'sm' }) {
|
|
38
|
-
const proseSizeClass = {
|
|
39
|
-
sm: 'prose-sm',
|
|
40
|
-
base: 'prose-base',
|
|
41
|
-
lg: 'prose-lg',
|
|
42
|
-
}[proseSize];
|
|
43
|
-
return (_jsx("div", { className: cn('prose w-full max-w-none dark:prose-invert', proseSizeClass, 'text-foreground', className), children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], rehypePlugins: [rehypeRaw], components: components, children: markdown }) }));
|
|
44
|
-
}
|
|
45
|
-
export const Markdown = memo(NonMemoizedMarkdown, (prevProps, nextProps) => prevProps.markdown === nextProps.markdown &&
|
|
46
|
-
prevProps.className === nextProps.className &&
|
|
47
|
-
prevProps.proseSize === nextProps.proseSize);
|