@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.
Files changed (59) hide show
  1. package/README.md +165 -205
  2. package/dist/adapters/ai/OpenAIAdapter.d.ts +115 -0
  3. package/dist/adapters/ai/OpenAIAdapter.js +568 -0
  4. package/dist/adapters/ai/index.d.ts +3 -0
  5. package/dist/adapters/ai/index.js +3 -0
  6. package/dist/adapters/ai/types.d.ts +108 -0
  7. package/dist/adapters/ai/types.js +31 -0
  8. package/dist/adapters/storage/BaseAdapter.js +31 -31
  9. package/dist/ai/AIChatInterface.svelte +435 -0
  10. package/dist/ai/AIChatInterface.svelte.d.ts +18 -0
  11. package/dist/ai/ChatInput.svelte +211 -0
  12. package/dist/ai/ChatInput.svelte.d.ts +18 -0
  13. package/dist/ai/CodeRenderer.svelte +174 -0
  14. package/dist/ai/CodeRenderer.svelte.d.ts +8 -0
  15. package/dist/ai/ComposeDropdown.svelte +171 -0
  16. package/dist/ai/ComposeDropdown.svelte.d.ts +9 -0
  17. package/dist/ai/MermaidRenderer.svelte +89 -0
  18. package/dist/ai/MermaidRenderer.svelte.d.ts +7 -0
  19. package/dist/ai/MessageBox.svelte +403 -0
  20. package/dist/ai/MessageBox.svelte.d.ts +12 -0
  21. package/dist/ai/ThinkingDisplay.svelte +275 -0
  22. package/dist/ai/ThinkingDisplay.svelte.d.ts +9 -0
  23. package/dist/ai/ai-chat-interface.d.ts +161 -0
  24. package/dist/ai/ai-chat-interface.js +63 -0
  25. package/dist/ai/content-detector.d.ts +41 -0
  26. package/dist/ai/content-detector.js +153 -0
  27. package/dist/config/ai.d.ts +13 -0
  28. package/dist/config/ai.js +43 -0
  29. package/dist/elements/accordion/accordion.js +1 -1
  30. package/dist/elements/badge/Badge.svelte +14 -3
  31. package/dist/elements/dropdown/Dropdown.svelte +2 -2
  32. package/dist/elements/dropdown/Select.svelte +1 -1
  33. package/dist/elements/progress/Progress.svelte +7 -10
  34. package/dist/file-browser/FileBrowser.svelte +1 -1
  35. package/dist/forms/DateRange.svelte +18 -16
  36. package/dist/forms/NumberInput.svelte +1 -1
  37. package/dist/forms/RadioInputs.svelte +1 -1
  38. package/dist/forms/RadioPill.svelte +1 -1
  39. package/dist/forms/Tags.svelte +2 -2
  40. package/dist/helper/date.d.ts +1 -0
  41. package/dist/helper/date.js +6 -0
  42. package/dist/index.d.ts +65 -21
  43. package/dist/index.js +11 -0
  44. package/dist/layout/activity-list/ActivityList.svelte +94 -0
  45. package/dist/layout/activity-list/ActivityList.svelte.d.ts +4 -0
  46. package/dist/layout/activity-list/activity-list.d.ts +152 -0
  47. package/dist/layout/activity-list/activity-list.js +59 -0
  48. package/dist/layout/card/Card.svelte +1 -5
  49. package/dist/layout/card/metric-card.d.ts +18 -18
  50. package/dist/layout/table/Cells.svelte +1 -7
  51. package/dist/layout/table/Cells.svelte.d.ts +1 -1
  52. package/dist/modal/Modal.svelte +74 -174
  53. package/dist/modal/Modal.svelte.d.ts +2 -2
  54. package/dist/modal/modal.d.ts +61 -165
  55. package/dist/modal/modal.js +23 -64
  56. package/dist/sonner/sonner.svelte +1 -7
  57. package/dist/types/markdown.d.ts +14 -0
  58. package/dist/utils/Portal.svelte +1 -1
  59. package/package.json +128 -121
@@ -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 overflow-y-auto',
5
- backdrop: 'fixed inset-0 transition-opacity bg-black/50',
6
- contentWrapper: 'absolute transform overflow-hidden transition-all px-2',
7
- content: 'bg-white overflow-hidden rounded-lg',
8
- header: 'px-4 py-3 flex items-center justify-between border-b border-default-200',
9
- body: 'px-3 py-2 max-h-[70dvh] overflow-y-auto',
10
- title: 'text-default-900 leading-6 text-base font-semibold',
11
- closeButton: 'text-default-400 hover:text-default-500 rounded-md cursor-pointer'
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
- xs: {
45
- contentWrapper: 'w-full max-w-xs'
46
- },
47
- sm: {
48
- contentWrapper: 'w-full max-w-sm'
17
+ [Size.XS]: {
18
+ container: 'max-w-xs max-h-[80vh]'
49
19
  },
50
- base: {
51
- contentWrapper: 'w-full max-w-md'
20
+ [Size.SM]: {
21
+ container: 'max-w-sm max-h-[85vh]'
52
22
  },
53
- lg: {
54
- contentWrapper: 'w-full max-w-lg'
23
+ [Size.BASE]: {
24
+ container: 'max-w-md max-h-[85vh]'
55
25
  },
56
- xl: {
57
- contentWrapper: 'w-full max-w-xl'
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
- default: {
68
- content: 'border border-default-200'
29
+ [Size.XL]: {
30
+ container: 'max-w-xl max-h-[90vh]'
69
31
  },
70
- colored: {
71
- content: 'border'
32
+ [Size.XXL]: {
33
+ container: 'max-w-2xl max-h-[90vh]'
72
34
  }
73
35
  }
74
36
  },
75
37
  defaultVariants: {
76
- open: false,
77
- position: 'center',
78
- size: 'base',
79
- color: 'default'
38
+ size: Size.BASE
80
39
  }
81
40
  });
@@ -4,10 +4,4 @@
4
4
  let restProps: SonnerProps = $props();
5
5
  </script>
6
6
 
7
- <Sonner
8
- class="toaster group"
9
- toastOptions={{
10
-
11
- }}
12
- {...restProps}
13
- />
7
+ <Sonner class="toaster group" toastOptions={{}} {...restProps} />
@@ -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
+ }
@@ -74,7 +74,7 @@
74
74
 
75
75
  // Allow pointer events on the content
76
76
  ref.style.pointerEvents = 'auto';
77
-
77
+
78
78
  // Initially hide the content
79
79
  ref.style.opacity = '0';
80
80
 
package/package.json CHANGED
@@ -1,123 +1,130 @@
1
1
  {
2
- "name": "@makolabs/ripple",
3
- "version": "0.4.1-0",
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/adapter-cloudflare": "^5.0.1",
63
- "@sveltejs/kit": "^2.16.0",
64
- "@sveltejs/package": "^2.0.0",
65
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
66
- "@tailwindcss/vite": "^4.0.14",
67
- "@testing-library/jest-dom": "^6.6.3",
68
- "@testing-library/svelte": "^5.2.4",
69
- "@types/node": "^22.13.10",
70
- "eslint": "^9.18.0",
71
- "eslint-config-prettier": "^10.0.1",
72
- "eslint-plugin-storybook": "^9.0.18",
73
- "eslint-plugin-svelte": "^3.0.0",
74
- "globals": "^16.0.0",
75
- "jsdom": "^26.0.0",
76
- "prettier": "^3.4.2",
77
- "prettier-plugin-svelte": "^3.3.3",
78
- "prettier-plugin-tailwindcss": "^0.6.11",
79
- "publint": "^0.3.2",
80
- "storybook": "^9.0.18",
81
- "svelte": "^5.0.0",
82
- "svelte-check": "^4.0.0",
83
- "sveltekit-superforms": "^2.24.0",
84
- "tailwindcss": "^4.0.0",
85
- "typescript": "^5.0.0",
86
- "typescript-eslint": "^8.20.0",
87
- "vite": "^6.0.0",
88
- "vitest": "^3.0.0",
89
- "zod": "^3.24.2"
90
- },
91
- "keywords": [
92
- "svelte",
93
- "ui",
94
- "svelte5",
95
- "modal",
96
- "navigation",
97
- "ripple",
98
- "button",
99
- "sidebar",
100
- "card",
101
- "select",
102
- "tooltip",
103
- "accordion",
104
- "tabs",
105
- "alert",
106
- "badge",
107
- "breadcrumb",
108
- "carousel",
109
- "collapse",
110
- "list-group",
111
- "pagination",
112
- "progress",
113
- "spinner",
114
- "toast"
115
- ],
116
- "dependencies": {
117
- "dayjs": "^1.11.13",
118
- "echarts": "^5.6.0",
119
- "svelte-sonner": "^0.3.28",
120
- "tailwind-merge": "^3.0.2",
121
- "tailwind-variants": "^1.0.0"
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
  }