@studiotoolkit/color-from-image 1.0.0 → 1.0.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/dist/style.css +143 -1
- package/package.json +7 -8
package/dist/style.css
CHANGED
|
@@ -1 +1,143 @@
|
|
|
1
|
-
.cfi-container
|
|
1
|
+
.cfi-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
background-color: #ffffff;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-theme="dark"] .cfi-container {
|
|
10
|
+
background-color: #1a1a1a !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cfi-canvas-wrapper {
|
|
14
|
+
position: relative;
|
|
15
|
+
display: inline-block;
|
|
16
|
+
line-height: 0;
|
|
17
|
+
border-style: solid;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-theme="dark"] .cfi-canvas-wrapper {
|
|
22
|
+
border-color: #444;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cfi-canvas {
|
|
26
|
+
display: block;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cfi-canvas-overlay {
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 0;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
gap: 4px;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
background: rgba(248, 248, 248, 0.85);
|
|
39
|
+
line-height: normal;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[data-theme="dark"] .cfi-canvas-overlay {
|
|
43
|
+
background: rgba(26, 26, 26, 0.85);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.cfi-canvas-overlay span {
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
color: #888;
|
|
49
|
+
font-family: inherit;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-theme="dark"] .cfi-canvas-overlay span {
|
|
53
|
+
color: #aaa;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.cfi-canvas-overlay span:first-child {
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
color: #555;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-theme="dark"] .cfi-canvas-overlay span:first-child {
|
|
63
|
+
color: #ccc;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.cfi-actions-row {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 8px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.cfi-file-input {
|
|
73
|
+
font-family: inherit;
|
|
74
|
+
font-size: 13px;
|
|
75
|
+
flex: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.cfi-clear-button {
|
|
79
|
+
padding: 5px 12px;
|
|
80
|
+
background: #e74c3c;
|
|
81
|
+
color: white;
|
|
82
|
+
border: none;
|
|
83
|
+
border-radius: 4px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
font-family: inherit;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cfi-clear-button:hover {
|
|
91
|
+
background: #c0392b;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.cfi-paste-button {
|
|
95
|
+
padding: 5px 12px;
|
|
96
|
+
background: #2196f3;
|
|
97
|
+
color: white;
|
|
98
|
+
border: none;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
font-family: inherit;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cfi-paste-button:hover {
|
|
107
|
+
background: #1976d2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.cfi-url-row {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 6px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.cfi-url-input {
|
|
117
|
+
padding: 5px 8px;
|
|
118
|
+
border: 1px solid #ccc;
|
|
119
|
+
border-radius: 4px;
|
|
120
|
+
font-size: 13px;
|
|
121
|
+
font-family: inherit;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.cfi-load-button {
|
|
125
|
+
padding: 5px 12px;
|
|
126
|
+
background: #3498db;
|
|
127
|
+
color: white;
|
|
128
|
+
border: none;
|
|
129
|
+
border-radius: 4px;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
font-size: 13px;
|
|
132
|
+
font-family: inherit;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cfi-load-button:hover {
|
|
136
|
+
background: #217dbb;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.cfi-url-error {
|
|
140
|
+
margin: 0;
|
|
141
|
+
font-size: 12px;
|
|
142
|
+
color: #c0392b;
|
|
143
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiotoolkit/color-from-image",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React component for extracting dominant colors from images using advanced color analysis algorithms",
|
|
6
6
|
"author": "StudioToolkit",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"require": "./dist/index.js",
|
|
40
40
|
"default": "./dist/index.js"
|
|
41
41
|
},
|
|
42
|
-
"./style.css": "./dist/
|
|
43
|
-
"./src/ColorFromImage.css": "./src/ColorFromImage.css",
|
|
42
|
+
"./style.css": "./dist/style.css",
|
|
44
43
|
"./package.json": "./package.json"
|
|
45
44
|
},
|
|
46
45
|
"files": [
|
|
@@ -55,18 +54,18 @@
|
|
|
55
54
|
"node": ">=16.0.0"
|
|
56
55
|
},
|
|
57
56
|
"peerDependencies": {
|
|
58
|
-
"react": "^18.0.0",
|
|
59
|
-
"react-dom": "^18.0.0"
|
|
57
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
58
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
60
59
|
},
|
|
61
60
|
"devDependencies": {
|
|
62
|
-
"@types/react": "^18.2.0",
|
|
63
|
-
"@types/react-dom": "^18.2.0",
|
|
61
|
+
"@types/react": "^18.2.0 || ^19.0.0",
|
|
62
|
+
"@types/react-dom": "^18.2.0 || ^19.0.0",
|
|
64
63
|
"@vitejs/plugin-react": "^4.2.0",
|
|
65
64
|
"typescript": "^5.3.3",
|
|
66
65
|
"vite": "^5.0.0"
|
|
67
66
|
},
|
|
68
67
|
"scripts": {
|
|
69
|
-
"build": "npx tsc --project tsconfig.json && vite build",
|
|
68
|
+
"build": "npx tsc --project tsconfig.json && vite build && cp src/ColorFromImage.css dist/style.css",
|
|
70
69
|
"dev": "vite build --watch",
|
|
71
70
|
"clean": "rm -rf dist",
|
|
72
71
|
"lint": "eslint src --ext .ts,.tsx",
|