@makolabs/ripple 0.4.1-0 → 1.0.1
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/README.md +165 -205
- package/dist/adapters/ai/OpenAIAdapter.d.ts +115 -0
- package/dist/adapters/ai/OpenAIAdapter.js +568 -0
- package/dist/adapters/ai/index.d.ts +3 -0
- package/dist/adapters/ai/index.js +3 -0
- package/dist/adapters/ai/types.d.ts +108 -0
- package/dist/adapters/ai/types.js +31 -0
- package/dist/adapters/storage/BaseAdapter.js +31 -31
- package/dist/ai/AIChatInterface.svelte +435 -0
- package/dist/ai/AIChatInterface.svelte.d.ts +18 -0
- package/dist/ai/ChatInput.svelte +211 -0
- package/dist/ai/ChatInput.svelte.d.ts +18 -0
- package/dist/ai/CodeRenderer.svelte +174 -0
- package/dist/ai/CodeRenderer.svelte.d.ts +8 -0
- package/dist/ai/ComposeDropdown.svelte +171 -0
- package/dist/ai/ComposeDropdown.svelte.d.ts +9 -0
- package/dist/ai/MermaidRenderer.svelte +89 -0
- package/dist/ai/MermaidRenderer.svelte.d.ts +7 -0
- package/dist/ai/MessageBox.svelte +403 -0
- package/dist/ai/MessageBox.svelte.d.ts +12 -0
- package/dist/ai/ThinkingDisplay.svelte +275 -0
- package/dist/ai/ThinkingDisplay.svelte.d.ts +9 -0
- package/dist/ai/ai-chat-interface.d.ts +161 -0
- package/dist/ai/ai-chat-interface.js +63 -0
- package/dist/ai/content-detector.d.ts +41 -0
- package/dist/ai/content-detector.js +153 -0
- package/dist/config/ai.d.ts +13 -0
- package/dist/config/ai.js +43 -0
- package/dist/elements/accordion/accordion.js +1 -1
- package/dist/elements/badge/Badge.svelte +14 -3
- package/dist/elements/dropdown/Dropdown.svelte +2 -2
- package/dist/elements/dropdown/Select.svelte +1 -1
- package/dist/elements/progress/Progress.svelte +7 -10
- package/dist/file-browser/FileBrowser.svelte +1 -1
- package/dist/forms/DateRange.svelte +18 -16
- package/dist/forms/NumberInput.svelte +1 -1
- package/dist/forms/RadioInputs.svelte +1 -1
- package/dist/forms/RadioPill.svelte +1 -1
- package/dist/forms/Tags.svelte +2 -2
- package/dist/helper/date.d.ts +1 -0
- package/dist/helper/date.js +6 -0
- package/dist/index.d.ts +65 -21
- package/dist/index.js +11 -0
- package/dist/layout/activity-list/ActivityList.svelte +94 -0
- package/dist/layout/activity-list/ActivityList.svelte.d.ts +4 -0
- package/dist/layout/activity-list/activity-list.d.ts +152 -0
- package/dist/layout/activity-list/activity-list.js +59 -0
- package/dist/layout/card/Card.svelte +1 -5
- package/dist/layout/card/metric-card.d.ts +18 -18
- package/dist/layout/table/Cells.svelte +1 -7
- package/dist/layout/table/Cells.svelte.d.ts +1 -1
- package/dist/modal/Modal.svelte +74 -174
- package/dist/modal/Modal.svelte.d.ts +2 -2
- package/dist/modal/modal.d.ts +61 -165
- package/dist/modal/modal.js +23 -64
- package/dist/sonner/sonner.svelte +1 -7
- package/dist/types/markdown.d.ts +14 -0
- package/dist/utils/Portal.svelte +1 -1
- package/package.json +128 -121
package/dist/modal/modal.js
CHANGED
|
@@ -1,81 +1,40 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
|
+
import { Size } from '../index.js';
|
|
2
3
|
export const modal = tv({
|
|
3
4
|
slots: {
|
|
4
|
-
base: 'fixed inset-0 z-50 flex items-center justify-center
|
|
5
|
-
backdrop: 'fixed inset-0
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
title: 'text-
|
|
11
|
-
|
|
5
|
+
base: 'fixed inset-0 z-50 flex items-center justify-center p-4',
|
|
6
|
+
backdrop: 'fixed inset-0 bg-black/50 backdrop-blur-sm',
|
|
7
|
+
container: 'relative w-full flex flex-col bg-white rounded-xl shadow-2xl overflow-hidden',
|
|
8
|
+
header: 'px-6 py-4 border-b border-gray-200 flex items-center justify-between shrink-0',
|
|
9
|
+
body: 'flex-1 px-6 py-4 overflow-y-auto',
|
|
10
|
+
footer: 'px-6 py-4 border-t border-gray-200 bg-gray-50/80 shrink-0',
|
|
11
|
+
title: 'text-lg font-semibold text-gray-900',
|
|
12
|
+
description: 'text-sm text-gray-600 mt-1',
|
|
13
|
+
close: 'p-2 -mr-2 ml-4 rounded-lg text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors'
|
|
12
14
|
},
|
|
13
15
|
variants: {
|
|
14
|
-
open: {
|
|
15
|
-
true: {
|
|
16
|
-
base: 'visible',
|
|
17
|
-
backdrop: 'visible opacity-100',
|
|
18
|
-
contentWrapper: 'visible scale-100 opacity-100'
|
|
19
|
-
},
|
|
20
|
-
false: {
|
|
21
|
-
base: 'invisible',
|
|
22
|
-
backdrop: 'invisible opacity-0',
|
|
23
|
-
contentWrapper: 'invisible scale-95 opacity-0'
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
position: {
|
|
27
|
-
center: {
|
|
28
|
-
contentWrapper: 'mx-auto'
|
|
29
|
-
},
|
|
30
|
-
top: {
|
|
31
|
-
contentWrapper: 'mx-auto top-7'
|
|
32
|
-
},
|
|
33
|
-
bottom: {
|
|
34
|
-
contentWrapper: 'mx-auto bottom-7'
|
|
35
|
-
},
|
|
36
|
-
left: {
|
|
37
|
-
contentWrapper: 'left-7'
|
|
38
|
-
},
|
|
39
|
-
right: {
|
|
40
|
-
contentWrapper: 'right-7'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
16
|
size: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
sm: {
|
|
48
|
-
contentWrapper: 'w-full max-w-sm'
|
|
17
|
+
[Size.XS]: {
|
|
18
|
+
container: 'max-w-xs max-h-[80vh]'
|
|
49
19
|
},
|
|
50
|
-
|
|
51
|
-
|
|
20
|
+
[Size.SM]: {
|
|
21
|
+
container: 'max-w-sm max-h-[85vh]'
|
|
52
22
|
},
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
[Size.BASE]: {
|
|
24
|
+
container: 'max-w-md max-h-[85vh]'
|
|
55
25
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
'2xl': {
|
|
60
|
-
contentWrapper: 'w-full max-w-2xl'
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
border: {
|
|
64
|
-
none: {
|
|
65
|
-
content: 'border-0'
|
|
26
|
+
[Size.LG]: {
|
|
27
|
+
container: 'max-w-lg max-h-[90vh]'
|
|
66
28
|
},
|
|
67
|
-
|
|
68
|
-
|
|
29
|
+
[Size.XL]: {
|
|
30
|
+
container: 'max-w-xl max-h-[90vh]'
|
|
69
31
|
},
|
|
70
|
-
|
|
71
|
-
|
|
32
|
+
[Size.XXL]: {
|
|
33
|
+
container: 'max-w-2xl max-h-[90vh]'
|
|
72
34
|
}
|
|
73
35
|
}
|
|
74
36
|
},
|
|
75
37
|
defaultVariants: {
|
|
76
|
-
|
|
77
|
-
position: 'center',
|
|
78
|
-
size: 'base',
|
|
79
|
-
color: 'default'
|
|
38
|
+
size: Size.BASE
|
|
80
39
|
}
|
|
81
40
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare module 'markdown' {
|
|
2
|
+
export interface MarkdownOptions {
|
|
3
|
+
dialect?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface MarkdownAPI {
|
|
7
|
+
toHTML(markdown: string, options?: MarkdownOptions): string;
|
|
8
|
+
parse(markdown: string): any;
|
|
9
|
+
renderJsonML(jsonml: any): string;
|
|
10
|
+
toHTMLTree(tree: any): any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const markdown: MarkdownAPI;
|
|
14
|
+
}
|
package/dist/utils/Portal.svelte
CHANGED
package/package.json
CHANGED
|
@@ -1,123 +1,130 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
2
|
+
"name": "@makolabs/ripple",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Simple Svelte 5 powered component library ✨",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/makolabsai/ripple-ui.git"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "vite dev",
|
|
12
|
+
"build": "vite build && npm run prepack",
|
|
13
|
+
"preview": "vite preview",
|
|
14
|
+
"prepare": "svelte-kit sync || echo ''",
|
|
15
|
+
"prepack": "svelte-kit sync && svelte-package && publint",
|
|
16
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
17
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
18
|
+
"format": "prettier --write .",
|
|
19
|
+
"lint": "prettier --check . && eslint .",
|
|
20
|
+
"test:unit": "vitest",
|
|
21
|
+
"test": "npm run test:unit -- --run && npm run test:e2e",
|
|
22
|
+
"test:e2e": "playwright test",
|
|
23
|
+
"pub:minor": "git add . && git commit -m \"chore: prepare for publish minor\" && npm version minor && git push --follow-tags && npm publish",
|
|
24
|
+
"pub:patch": "git add . && git commit -m \"chore: prepare for publish patch\" && npm version patch && git push --follow-tags && npm publish",
|
|
25
|
+
"pub:prelish": "git add . && git commit -m \"chore: prepare for publish premajor\" && npm version premajor && git push --follow-tags && npm publish",
|
|
26
|
+
"pub:major": "git add . && git commit -m \"chore: prepare for publish major\" && npm version major && git push --follow-tags && npm publish",
|
|
27
|
+
"pub:preminor": "git add . && git commit -m \"chore: prepare for publish preminor\" && npm version preminor && git push --follow-tags && npm publish",
|
|
28
|
+
"pub:prepatch": "git add . && git commit -m \"chore: prepare for publish prepatch\" && npm version prepatch && git push --follow-tags && npm publish",
|
|
29
|
+
"pub:prerelease": "git add . && git commit -m \"chore: prepare for publish prerelease\" && npm version prerelease && git push --follow-tags && npm publish",
|
|
30
|
+
"pub:from-git": "git add . && git commit -m \"chore: prepare for publish from-git\" && npm version from-git && git push --follow-tags && npm publish",
|
|
31
|
+
"storybook": "storybook dev -p 6006",
|
|
32
|
+
"build-storybook": "storybook build"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"!dist/**/*.test.*",
|
|
37
|
+
"!dist/**/*.spec.*"
|
|
38
|
+
],
|
|
39
|
+
"sideEffects": [
|
|
40
|
+
"**/*.css"
|
|
41
|
+
],
|
|
42
|
+
"svelte": "./dist/index.js",
|
|
43
|
+
"types": "./dist/index.d.ts",
|
|
44
|
+
"type": "module",
|
|
45
|
+
"exports": {
|
|
46
|
+
".": {
|
|
47
|
+
"types": "./dist/index.d.ts",
|
|
48
|
+
"svelte": "./dist/index.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"svelte": "^5.0.0"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@eslint/compat": "^1.2.5",
|
|
56
|
+
"@eslint/js": "^9.18.0",
|
|
57
|
+
"@playwright/test": "^1.49.1",
|
|
58
|
+
"@storybook/addon-a11y": "^9.0.18",
|
|
59
|
+
"@storybook/addon-docs": "^9.0.18",
|
|
60
|
+
"@storybook/addon-svelte-csf": "^5.0.7",
|
|
61
|
+
"@storybook/sveltekit": "^9.0.18",
|
|
62
|
+
"@sveltejs/kit": "^2.16.0",
|
|
63
|
+
"@sveltejs/package": "^2.0.0",
|
|
64
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
65
|
+
"@tailwindcss/vite": "^4.0.14",
|
|
66
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
67
|
+
"@testing-library/svelte": "^5.2.4",
|
|
68
|
+
"@types/node": "^22.13.10",
|
|
69
|
+
"eslint": "^9.18.0",
|
|
70
|
+
"eslint-config-prettier": "^10.0.1",
|
|
71
|
+
"eslint-plugin-storybook": "^9.0.18",
|
|
72
|
+
"eslint-plugin-svelte": "^3.0.0",
|
|
73
|
+
"globals": "^16.0.0",
|
|
74
|
+
"jsdom": "^26.0.0",
|
|
75
|
+
"prettier": "^3.4.2",
|
|
76
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
77
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
78
|
+
"publint": "^0.3.2",
|
|
79
|
+
"storybook": "^9.0.18",
|
|
80
|
+
"svelte": "^5.0.0",
|
|
81
|
+
"svelte-check": "^4.0.0",
|
|
82
|
+
"sveltekit-superforms": "^2.24.0",
|
|
83
|
+
"tailwindcss": "^4.0.0",
|
|
84
|
+
"typescript": "^5.0.0",
|
|
85
|
+
"typescript-eslint": "^8.20.0",
|
|
86
|
+
"vite": "^6.0.0",
|
|
87
|
+
"vitest": "^3.0.0",
|
|
88
|
+
"zod": "^3.24.2"
|
|
89
|
+
},
|
|
90
|
+
"keywords": [
|
|
91
|
+
"svelte",
|
|
92
|
+
"ui",
|
|
93
|
+
"svelte5",
|
|
94
|
+
"modal",
|
|
95
|
+
"navigation",
|
|
96
|
+
"ripple",
|
|
97
|
+
"button",
|
|
98
|
+
"sidebar",
|
|
99
|
+
"card",
|
|
100
|
+
"select",
|
|
101
|
+
"tooltip",
|
|
102
|
+
"accordion",
|
|
103
|
+
"tabs",
|
|
104
|
+
"alert",
|
|
105
|
+
"badge",
|
|
106
|
+
"breadcrumb",
|
|
107
|
+
"carousel",
|
|
108
|
+
"collapse",
|
|
109
|
+
"list-group",
|
|
110
|
+
"pagination",
|
|
111
|
+
"progress",
|
|
112
|
+
"spinner",
|
|
113
|
+
"toast"
|
|
114
|
+
],
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"@friendofsvelte/mermaid": "^0.0.4",
|
|
117
|
+
"@friendofsvelte/state": "^0.0.6-ts",
|
|
118
|
+
"@sveltejs/adapter-static": "^3.0.9",
|
|
119
|
+
"compromise": "^14.14.4",
|
|
120
|
+
"dayjs": "^1.11.13",
|
|
121
|
+
"echarts": "^5.6.0",
|
|
122
|
+
"marked": "^16.2.1",
|
|
123
|
+
"mem0ai": "^2.1.37",
|
|
124
|
+
"natural": "^8.1.0",
|
|
125
|
+
"svelte-highlight": "^7.8.4",
|
|
126
|
+
"svelte-sonner": "^0.3.28",
|
|
127
|
+
"tailwind-merge": "^3.0.2",
|
|
128
|
+
"tailwind-variants": "^1.0.0"
|
|
129
|
+
}
|
|
123
130
|
}
|