dolphincss 1.3.0 → 1.3.2

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.
@@ -0,0 +1,62 @@
1
+ const plugin = require('tailwindcss/plugin');
2
+
3
+ module.exports = plugin(function({ matchUtilities, theme }) {
4
+ matchUtilities({
5
+ 'gradient': (value) => {
6
+ // Expected format: startColor-startShade-endColor-endShade-[angle/shape]
7
+ // Example: primary-500-secondary-900-45
8
+ // Example: primary-500-secondary-900-circle
9
+
10
+ const parts = value.split('-');
11
+ if (parts.length >= 4) {
12
+ let modifier = '135deg'; // default
13
+ let isRadial = false;
14
+ let isConic = false;
15
+ let colorParts = parts;
16
+
17
+ // Check if the last part is a modifier (number or shape)
18
+ const lastPart = parts[parts.length - 1];
19
+ if (!isNaN(lastPart)) {
20
+ modifier = lastPart + 'deg';
21
+ colorParts = parts.slice(0, -1);
22
+ } else if (['circle', 'ellipse', 'radial'].includes(lastPart)) {
23
+ modifier = lastPart === 'radial' ? 'circle' : lastPart;
24
+ isRadial = true;
25
+ colorParts = parts.slice(0, -1);
26
+ } else if (['conic', 'square', 'triangle'].includes(lastPart)) {
27
+ // Map square/triangle to conic since they are angular
28
+ modifier = 'from 0deg';
29
+ isConic = true;
30
+ colorParts = parts.slice(0, -1);
31
+ }
32
+
33
+ // We should have 4 color parts now: [color1, shade1, color2, shade2]
34
+ // or 2 color parts: [color1, color2]
35
+ if (colorParts.length === 4) {
36
+ const startColor = `var(--color-${colorParts[0]}-${colorParts[1]})`;
37
+ const endColor = `var(--color-${colorParts[2]}-${colorParts[3]})`;
38
+
39
+ if (isRadial) {
40
+ return { backgroundImage: `radial-gradient(${modifier}, ${startColor}, ${endColor})` };
41
+ } else if (isConic) {
42
+ return { backgroundImage: `conic-gradient(${modifier}, ${startColor}, ${endColor})` };
43
+ } else {
44
+ return { backgroundImage: `linear-gradient(${modifier}, ${startColor}, ${endColor})` };
45
+ }
46
+ } else if (colorParts.length === 2) {
47
+ const startColor = `var(--color-${colorParts[0]})`;
48
+ const endColor = `var(--color-${colorParts[1]})`;
49
+
50
+ if (isRadial) {
51
+ return { backgroundImage: `radial-gradient(${modifier}, ${startColor}, ${endColor})` };
52
+ } else if (isConic) {
53
+ return { backgroundImage: `conic-gradient(${modifier}, ${startColor}, ${endColor})` };
54
+ } else {
55
+ return { backgroundImage: `linear-gradient(${modifier}, ${startColor}, ${endColor})` };
56
+ }
57
+ }
58
+ }
59
+ return null;
60
+ }
61
+ });
62
+ });
package/marker.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "d-login": {
3
+ "templateFile": "login.html",
4
+ "addClasses": "flex flex-col gap-4 w-full max-w-md mx-auto p-6 card"
5
+ },
6
+ "d-table": {
7
+ "templateFile": "table.html",
8
+ "addClasses": "table-responsive"
9
+ },
10
+ "d-side-nav": {
11
+ "templateFile": "side-nav.html",
12
+ "addClasses": "w-64 bg-surface shadow-lg h-screen fixed"
13
+ },
14
+ "d-topnav": {
15
+ "templateFile": "topnav.html",
16
+ "addClasses": "nav-container"
17
+ },
18
+ "d-kpi": {
19
+ "templateFile": "kpi-card.html",
20
+ "addClasses": "kpi-card"
21
+ },
22
+ "d-chart-card": {
23
+ "templateFile": "chart-card.html",
24
+ "addClasses": "card p-6"
25
+ },
26
+ "d-input-float": {
27
+ "templateFile": "input-float.html",
28
+ "addClasses": "relative"
29
+ },
30
+ "d-input-standard": {
31
+ "templateFile": "input-standard.html",
32
+ "addClasses": ""
33
+ },
34
+ "d-button": {
35
+ "templateFile": "button.html",
36
+ "addClasses": "filled primary"
37
+ },
38
+ "d-card": {
39
+ "templateFile": "card.html",
40
+ "addClasses": "card"
41
+ }
42
+ }
package/package.json CHANGED
@@ -1,61 +1,71 @@
1
- {
2
- "name": "dolphincss",
3
- "version": "1.3.0",
4
- "type": "module",
5
- "description": "DolphinCSS - World-class TailwindCSS + React component library",
6
- "main": "dolphin-css.css",
7
- "exports": {
8
- ".": "./dolphin-css.css",
9
- "./dolphin-css.css": "./dolphin-css.css",
10
- "./vite-plugin": "./vite-plugin.js"
11
- },
12
- "files": [
13
- "dist/",
14
- "dolphin-css.css",
15
- "README.md",
16
- "LICENSE",
17
- "snippets/",
18
- "scripts/",
19
- "vite-plugin.js"
20
- ],
21
- "scripts": {
22
- "dev": "concurrently \"vite\" \"npm run watch:dolphin\"",
23
- "watch:dolphin": "node scripts/dolphin-watch.js",
24
- "build:css": "npx @tailwindcss/cli -i ./src/dolphin-css/App.css -o ./dolphin-css.css --minify",
25
- "watch:css": "npx @tailwindcss/cli -i ./src/dolphin-css/App.css -o ./dolphin-css.css --watch",
26
- "build": "vite build && npm run build:css",
27
- "lint": "eslint .",
28
- "preview": "vite preview",
29
- "postinstall": "node scripts/setup-snippets.cjs"
30
- },
31
- "keywords": [
32
- "css",
33
- "tailwind",
34
- "react",
35
- "components",
36
- "dolphin-theme"
37
- ],
38
- "author": "Shankar Phunyal",
39
- "license": "MIT",
40
- "peerDependencies": {
41
- "lucide-react": ">=0.4",
42
- "react": ">=18",
43
- "react-dom": ">=18"
44
- },
45
- "devDependencies": {
46
- "@eslint/js": "^9.36.0",
47
- "@tailwindcss/vite": "^4.1.16",
48
- "@types/react": "^19.1.16",
49
- "@types/react-dom": "^19.1.9",
50
- "@vitejs/plugin-react": "^5.0.4",
51
- "chokidar": "^5.0.0",
52
- "concurrently": "^10.0.0",
53
- "eslint": "^9.36.0",
54
- "eslint-plugin-react": "^7.37.5",
55
- "eslint-plugin-react-hooks": "^5.2.0",
56
- "eslint-plugin-react-refresh": "^0.4.24",
57
- "globals": "^16.4.0",
58
- "tailwindcss": "^4.1.16",
59
- "vite": "^7.1.7"
60
- }
61
- }
1
+ {
2
+ "name": "dolphincss",
3
+ "version": "1.3.2",
4
+ "type": "module",
5
+ "description": "DolphinCSS - World-class TailwindCSS + React component library",
6
+ "main": "dolphin-css.css",
7
+ "bin": {
8
+ "dolphin": "./bin/dolphin.js"
9
+ },
10
+ "exports": {
11
+ ".": "./dolphin-css.css",
12
+ "./dolphin-css.css": "./dolphin-css.css",
13
+ "./vite-plugin": "./vite-plugin.js"
14
+ },
15
+ "files": [
16
+ "dist/",
17
+ "dolphin-css.css",
18
+ "README.md",
19
+ "LICENSE",
20
+ "snippets/",
21
+ "bin/",
22
+ "core-templates/",
23
+ "config/",
24
+ "templates/",
25
+ "vite-plugin.js",
26
+ "marker.json",
27
+ "dolphincss-plugin.cjs"
28
+ ],
29
+ "scripts": {
30
+ "dev": "concurrently \"vite\" \"npm run watch:dolphin\"",
31
+ "watch:dolphin": "node bin/dolphin.js",
32
+ "build:css": "npx @tailwindcss/cli -i ./src/dolphin-css/App.css -o ./dolphin-css.css --minify",
33
+ "watch:css": "npx @tailwindcss/cli -i ./src/dolphin-css/App.css -o ./dolphin-css.css --watch",
34
+ "build": "vite build && npm run build:css",
35
+ "lint": "eslint .",
36
+ "preview": "vite preview",
37
+ "postinstall": "node scripts/setup-snippets.cjs"
38
+ },
39
+ "keywords": [
40
+ "css",
41
+ "tailwind",
42
+ "react",
43
+ "components",
44
+ "dolphin-theme"
45
+ ],
46
+ "author": "Shankar Phunyal",
47
+ "license": "MIT",
48
+ "peerDependencies": {
49
+ "lucide-react": "^1.17.0",
50
+ "react": ">=18",
51
+ "react-dom": ">=18"
52
+ },
53
+ "devDependencies": {
54
+ "@eslint/js": "^9.36.0",
55
+ "@tailwindcss/vite": "^4.1.16",
56
+ "@types/react": "^19.1.16",
57
+ "@types/react-dom": "^19.1.9",
58
+ "@vitejs/plugin-react": "^5.0.4",
59
+ "axios": "^1.6.0",
60
+ "chokidar": "^5.0.0",
61
+ "concurrently": "^10.0.0",
62
+ "eslint": "^9.36.0",
63
+ "eslint-plugin-react": "^7.37.5",
64
+ "eslint-plugin-react-hooks": "^5.2.0",
65
+ "eslint-plugin-react-refresh": "^0.4.24",
66
+ "globals": "^16.4.0",
67
+ "tailwindcss": "^4.1.16",
68
+ "vite": "^7.1.7"
69
+ }
70
+ }
71
+