@moldable-ai/ui 0.1.1 → 0.2.0
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/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/chat-input.js +8 -6
- package/dist/components/chat/chat-panel.d.ts +5 -1
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +6 -2
- package/dist/components/chat/markdown.d.ts +9 -0
- package/dist/components/chat/markdown.d.ts.map +1 -0
- package/dist/components/chat/markdown.js +47 -0
- package/dist/components/chat/tool-handlers.d.ts.map +1 -1
- package/dist/components/chat/tool-handlers.js +21 -51
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +17 -0
- package/dist/components/ui/alert-dialog.d.ts +4 -4
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +10 -10
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +24 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +7 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +13 -0
- package/dist/components/ui/badge.d.ts +3 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +10 -10
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +27 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +27 -0
- package/dist/components/ui/button.d.ts +4 -5
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +22 -24
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +76 -0
- package/dist/components/ui/card.d.ts +9 -8
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +23 -15
- package/dist/components/ui/carousel.d.ts +20 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +90 -0
- package/dist/components/ui/chart.d.ts +41 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +132 -0
- package/dist/components/ui/checkbox.d.ts +2 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +5 -5
- package/dist/components/ui/collapsible.d.ts +4 -4
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +11 -4
- package/dist/components/ui/command.d.ts +17 -17
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +31 -27
- package/dist/components/ui/context-menu.d.ts +26 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +51 -0
- package/dist/components/ui/dialog.d.ts +15 -19
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +34 -22
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +35 -0
- package/dist/components/ui/dropdown-menu.d.ts +4 -4
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +13 -14
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +75 -0
- package/dist/components/ui/form.d.ts +25 -0
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.js +59 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +14 -0
- package/dist/components/ui/index.d.ts +35 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +35 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +63 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +20 -0
- package/dist/components/ui/input.d.ts +2 -3
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +4 -6
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +66 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +9 -0
- package/dist/components/ui/label.d.ts +3 -3
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +6 -6
- package/dist/components/ui/menubar.d.ts +27 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +53 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +31 -0
- package/dist/components/ui/pagination.d.ts +14 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +29 -0
- package/dist/components/ui/popover.d.ts +2 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +5 -4
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +7 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +12 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +14 -0
- package/dist/components/ui/scroll-area.d.ts +4 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +11 -9
- package/dist/components/ui/select.d.ts +15 -13
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +36 -25
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +39 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +212 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +14 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +20 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +7 -0
- package/dist/components/ui/switch.d.ts +3 -3
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +6 -6
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +27 -0
- package/dist/components/ui/tabs.d.ts +2 -2
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +7 -6
- package/dist/components/ui/textarea.d.ts +2 -3
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +4 -6
- package/dist/components/ui/toggle-group.d.ts +10 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +21 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +25 -0
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +4 -4
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +48 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-mobile.d.ts","sourceRoot":"","sources":["../../src/hooks/use-mobile.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,YAc1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const MOBILE_BREAKPOINT = 768;
|
|
3
|
+
export function useIsMobile() {
|
|
4
|
+
const [isMobile, setIsMobile] = React.useState(undefined);
|
|
5
|
+
React.useEffect(() => {
|
|
6
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
7
|
+
const onChange = () => {
|
|
8
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
9
|
+
};
|
|
10
|
+
mql.addEventListener("change", onChange);
|
|
11
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
12
|
+
return () => mql.removeEventListener("change", onChange);
|
|
13
|
+
}, []);
|
|
14
|
+
return !!isMobile;
|
|
15
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { ThemeProvider, useTheme, themeScript, type Theme } from './lib/theme';
|
|
|
3
3
|
export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace';
|
|
4
4
|
export { useMoldableCommands, useMoldableCommand, isInMoldable, sendToMoldable, type AppCommand, type CommandAction, type CommandsResponse, type CommandMessage, } from './lib/commands';
|
|
5
5
|
export * from './components/ui';
|
|
6
|
+
export { useIsMobile } from './hooks/use-mobile';
|
|
6
7
|
export { Markdown } from './components/markdown';
|
|
7
8
|
export { CodeBlock } from './components/code-block';
|
|
8
9
|
export { WidgetLayout } from './components/widget-layout';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAGhC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAA;AAG9E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAA;AAGvB,cAAc,iBAAiB,CAAA;AAG/B,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAGzD,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAGhC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAA;AAG9E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAA;AAGvB,cAAc,iBAAiB,CAAA;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAGzD,cAAc,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/worksp
|
|
|
8
8
|
export { useMoldableCommands, useMoldableCommand, isInMoldable, sendToMoldable, } from './lib/commands';
|
|
9
9
|
// Export UI components
|
|
10
10
|
export * from './components/ui';
|
|
11
|
+
// Export hooks
|
|
12
|
+
export { useIsMobile } from './hooks/use-mobile';
|
|
11
13
|
// Export Markdown
|
|
12
14
|
export { Markdown } from './components/markdown';
|
|
13
15
|
// Export CodeBlock
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldable-ai/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared UI components for Moldable applications",
|
|
5
5
|
"author": "Desiderata LLC",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -32,56 +32,80 @@
|
|
|
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
|
+
},
|
|
35
43
|
"dependencies": {
|
|
44
|
+
"@hookform/resolvers": "^5.2.2",
|
|
45
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
36
46
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
37
|
-
"@radix-ui/react-
|
|
38
|
-
"@radix-ui/react-
|
|
47
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
48
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
49
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
50
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
51
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
39
52
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
40
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
41
|
-
"@radix-ui/react-
|
|
53
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
54
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
55
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
56
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
57
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
42
58
|
"@radix-ui/react-popover": "^1.1.15",
|
|
43
|
-
"@radix-ui/react-
|
|
44
|
-
"@radix-ui/react-
|
|
45
|
-
"@radix-ui/react-
|
|
59
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
60
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
61
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
62
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
63
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
64
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
46
65
|
"@radix-ui/react-slot": "^1.2.4",
|
|
47
|
-
"@radix-ui/react-switch": "^1.2.
|
|
66
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
48
67
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
49
|
-
"@radix-ui/react-
|
|
68
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
69
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
70
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
50
71
|
"@tailwindcss/typography": "^0.5.16",
|
|
51
72
|
"class-variance-authority": "^0.7.1",
|
|
52
73
|
"clsx": "^2.1.1",
|
|
53
74
|
"cmdk": "1.1.0",
|
|
75
|
+
"date-fns": "^4.1.0",
|
|
76
|
+
"embla-carousel-react": "^8.6.0",
|
|
54
77
|
"framer-motion": "^12.15.0",
|
|
78
|
+
"input-otp": "^1.4.2",
|
|
55
79
|
"lucide-react": "^0.473.0",
|
|
80
|
+
"next-themes": "^0.4.6",
|
|
81
|
+
"react-day-picker": "^9.13.0",
|
|
82
|
+
"react-hook-form": "^7.71.1",
|
|
56
83
|
"react-markdown": "^10.1.0",
|
|
84
|
+
"react-resizable-panels": "^4.4.1",
|
|
85
|
+
"recharts": "2.15.4",
|
|
57
86
|
"rehype-raw": "^7.0.0",
|
|
58
87
|
"remark-gfm": "^4.0.1",
|
|
59
88
|
"shiki": "^3.21.0",
|
|
89
|
+
"sonner": "^2.0.7",
|
|
60
90
|
"tailwind-merge": "^2.6.0",
|
|
61
91
|
"tailwindcss": "^4.1.10",
|
|
62
|
-
"tw-animate-css": "^1.3.4"
|
|
92
|
+
"tw-animate-css": "^1.3.4",
|
|
93
|
+
"vaul": "^1.1.2",
|
|
94
|
+
"zod": "^4.3.5"
|
|
63
95
|
},
|
|
64
96
|
"devDependencies": {
|
|
97
|
+
"@moldable-ai/eslint-config": "workspace:*",
|
|
98
|
+
"@moldable-ai/prettier-config": "workspace:*",
|
|
99
|
+
"@moldable-ai/typescript-config": "workspace:*",
|
|
65
100
|
"@types/node": "^24.0.3",
|
|
66
101
|
"@types/react": "^19.1.6",
|
|
67
102
|
"@types/react-dom": "^19.1.6",
|
|
68
103
|
"jsdom": "^26.1.0",
|
|
69
104
|
"typescript": "^5.8.3",
|
|
70
|
-
"vitest": "^3.2.4"
|
|
71
|
-
"@moldable-ai/eslint-config": "0.0.1",
|
|
72
|
-
"@moldable-ai/prettier-config": "0.0.1",
|
|
73
|
-
"@moldable-ai/typescript-config": "0.0.1"
|
|
105
|
+
"vitest": "^3.2.4"
|
|
74
106
|
},
|
|
75
107
|
"peerDependencies": {
|
|
76
108
|
"react": "^19.0.0",
|
|
77
109
|
"react-dom": "^19.0.0"
|
|
78
|
-
},
|
|
79
|
-
"scripts": {
|
|
80
|
-
"build": "tsc",
|
|
81
|
-
"dev": "tsc --watch",
|
|
82
|
-
"lint": "eslint . --ext .ts,.tsx --max-warnings 0",
|
|
83
|
-
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
|
84
|
-
"check-types": "tsc --noEmit",
|
|
85
|
-
"test": "vitest run"
|
|
86
110
|
}
|
|
87
|
-
}
|
|
111
|
+
}
|