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.
- package/README.md +202 -97
- package/bin/dolphin-exit.js +86 -0
- package/bin/dolphin.js +453 -0
- package/bin/watcher.js +121 -0
- package/core-templates/dolphin-button.html +19 -0
- package/core-templates/dolphin-card.html +1 -0
- package/core-templates/dolphin-form-standard.html +1 -0
- package/core-templates/dolphin-modal.html +5 -0
- package/core-templates/dolphin-navbar.html +1 -0
- package/dist/assets/main-Ceq0_-ZS.css +1 -0
- package/dist/index.html +10 -2
- package/dist/index.js +8 -113
- package/dolphin-css.css +1 -1
- package/dolphincss-plugin.cjs +62 -0
- package/marker.json +42 -0
- package/package.json +71 -61
- package/vite-plugin.js +362 -53
- package/dist/assets/css-DZnkuf5R.css +0 -1
- package/dist/assets/main-tn0RQdqM.css +0 -0
- package/scripts/components.js +0 -195
- package/scripts/dolphin-watch.js +0 -53
- package/scripts/setup-snippets.cjs +0 -44
|
@@ -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.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "DolphinCSS - World-class TailwindCSS + React component library",
|
|
6
|
-
"main": "dolphin-css.css",
|
|
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
|
-
"css",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"react"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"eslint
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
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
|
+
|