@duskmoon-dev/el-art-color-spin 0.8.3

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 ADDED
@@ -0,0 +1,10 @@
1
+ # @duskmoon-dev/el-art-color-spin
2
+
3
+ Pure CSS art element - color-spin animation built entirely with CSS.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <script type="module" src=".../color-spin/register.js"></script>
9
+ <el-dm-art-color-spin></el-dm-art-color-spin>
10
+ ```
@@ -0,0 +1,306 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ function __accessProp(key) {
6
+ return this[key];
7
+ }
8
+ var __toCommonJS = (from) => {
9
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
10
+ if (entry)
11
+ return entry;
12
+ entry = __defProp({}, "__esModule", { value: true });
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (var key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(entry, key))
16
+ __defProp(entry, key, {
17
+ get: __accessProp.bind(from, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ __moduleCache.set(from, entry);
22
+ return entry;
23
+ };
24
+ var __moduleCache;
25
+ var __returnValue = (v) => v;
26
+ function __exportSetter(name, newValue) {
27
+ this[name] = __returnValue.bind(null, newValue);
28
+ }
29
+ var __export = (target, all) => {
30
+ for (var name in all)
31
+ __defProp(target, name, {
32
+ get: all[name],
33
+ enumerable: true,
34
+ configurable: true,
35
+ set: __exportSetter.bind(all, name)
36
+ });
37
+ };
38
+
39
+ // src/index.ts
40
+ var exports_src = {};
41
+ __export(exports_src, {
42
+ register: () => register,
43
+ ElDmArtColorSpin: () => ElDmArtColorSpin
44
+ });
45
+ module.exports = __toCommonJS(exports_src);
46
+
47
+ // src/el-dm-art-color-spin.ts
48
+ var import_el_base = require("@duskmoon-dev/el-base");
49
+
50
+ // ../../node_modules/.bun/@duskmoon-dev+css-art@0.3.0/node_modules/@duskmoon-dev/css-art/dist/art/color-spin.css
51
+ var color_spin_default = `@layer css-art {
52
+ @keyframes art-color-spin-spin {
53
+ 0%,
54
+ 1% {
55
+ transform: translateX(-50%) translateY(calc(var(--art-color-spin-size) * 0.026))
56
+ rotateY(0deg) scale(1.05);
57
+ }
58
+ 99%,
59
+ 100% {
60
+ transform: translateX(-50%) translateY(calc(var(--art-color-spin-size) * 0.026))
61
+ rotateY(360deg) scale(1.05);
62
+ }
63
+ }
64
+
65
+ .art-color-spin {
66
+ --art-color-spin-size: 770px;
67
+ --art-color-spin-color1: #ffd700;
68
+ --art-color-spin-color2: #20a7db;
69
+ --art-color-spin-color3: #8fce00;
70
+ --art-color-spin-color4: #ff0000;
71
+
72
+ position: relative;
73
+ width: var(--art-color-spin-size);
74
+ height: calc(var(--art-color-spin-size) * 0.26);
75
+ background: repeating-linear-gradient(
76
+ -45deg,
77
+ #000,
78
+ #000 5px,
79
+ #111 5px,
80
+ #111 10px
81
+ );
82
+ perspective: calc(var(--art-color-spin-size) * 1.039);
83
+ font-family: "Google Sans", sans-serif;
84
+ font-weight: 440;
85
+ overflow: visible;
86
+ }
87
+
88
+ .art-color-spin * {
89
+ box-sizing: border-box;
90
+ }
91
+
92
+ /* Decorative "c" letter */
93
+ .art-color-spin::before {
94
+ content: "c";
95
+ font-size: calc(var(--art-color-spin-size) * 0.461);
96
+ color: #eee;
97
+ position: absolute;
98
+ top: calc(var(--art-color-spin-size) * -0.169);
99
+ left: 0;
100
+ text-indent: calc(var(--art-color-spin-size) * -0.026);
101
+ line-height: calc(var(--art-color-spin-size) * 0.519);
102
+ z-index: 2;
103
+ -webkit-box-reflect: below calc(var(--art-color-spin-size) * -0.169)
104
+ linear-gradient(transparent, rgb(255 255 255 / 0.06));
105
+ }
106
+
107
+ /* Decorative "r" letter */
108
+ .art-color-spin::after {
109
+ content: "r";
110
+ font-size: calc(var(--art-color-spin-size) * 0.461);
111
+ color: #eee;
112
+ position: absolute;
113
+ top: calc(var(--art-color-spin-size) * -0.169);
114
+ right: calc(var(--art-color-spin-size) * 0.039);
115
+ line-height: calc(var(--art-color-spin-size) * 0.519);
116
+ z-index: 2;
117
+ -webkit-box-reflect: below calc(var(--art-color-spin-size) * -0.169)
118
+ linear-gradient(transparent, rgb(255 255 255 / 0.06));
119
+ }
120
+
121
+ /* 3D spinner container */
122
+ .art-color-spin > ul {
123
+ width: 0;
124
+ height: calc(var(--art-color-spin-size) * 0.195);
125
+ display: block;
126
+ left: 50%;
127
+ position: relative;
128
+ transform-style: preserve-3d;
129
+ transform-origin: center center;
130
+ z-index: 3;
131
+ margin: 0;
132
+ padding: 0;
133
+ list-style: none;
134
+ animation: art-color-spin-spin 11s linear infinite alternate-reverse;
135
+ }
136
+
137
+ .art-color-spin > ul * {
138
+ transform-style: preserve-3d;
139
+ }
140
+
141
+ /* White vertical bars (axis indicators) */
142
+ .art-color-spin > ul::before,
143
+ .art-color-spin > ul::after {
144
+ content: "";
145
+ display: block;
146
+ position: absolute;
147
+ width: calc(var(--art-color-spin-size) * 0.052);
148
+ height: calc(var(--art-color-spin-size) * 0.286);
149
+ border-radius: calc(var(--art-color-spin-size) * 0.026);
150
+ top: calc(var(--art-color-spin-size) * -0.039);
151
+ left: calc(var(--art-color-spin-size) * -0.026);
152
+ background: #fff;
153
+ }
154
+
155
+ .art-color-spin > ul::before {
156
+ background: #eee;
157
+ transform: rotateY(-90deg);
158
+ }
159
+
160
+ /* Colored rings */
161
+ .art-color-spin > ul > li {
162
+ display: block;
163
+ width: calc(var(--art-color-spin-size) * 0.234);
164
+ height: calc(var(--art-color-spin-size) * 0.234);
165
+ border: solid calc(var(--art-color-spin-size) * 0.032) #fff;
166
+ border-radius: 50%;
167
+ top: calc(var(--art-color-spin-size) * -0.013);
168
+ left: 0;
169
+ position: absolute;
170
+ transform: rotateY(calc(var(--i) * -90deg)) translateZ(0px)
171
+ translateX(calc(var(--art-color-spin-size) * 0.052));
172
+ transform-origin: top left;
173
+ -webkit-box-reflect: below 2px linear-gradient(transparent, rgb(255 255 255 / 0.1));
174
+ margin: 0;
175
+ padding: 0;
176
+ list-style: none;
177
+ }
178
+
179
+ /* Inner colored circles (mix-blend-mode creates glow effect) */
180
+ .art-color-spin > ul > li::before,
181
+ .art-color-spin > ul > li::after {
182
+ content: "";
183
+ width: calc(var(--art-color-spin-size) * 0.13);
184
+ height: calc(var(--art-color-spin-size) * 0.13);
185
+ display: block;
186
+ opacity: 0.75;
187
+ border-radius: 50%;
188
+ position: absolute;
189
+ left: 50%;
190
+ top: 50%;
191
+ mix-blend-mode: color-burn;
192
+ }
193
+
194
+ .art-color-spin > ul > li::after {
195
+ transform: translate3d(-50%, -50%, 1px);
196
+ }
197
+
198
+ .art-color-spin > ul > li::before {
199
+ transform: translate3d(-50%, -50%, -1px);
200
+ }
201
+
202
+ /* Ring 1: Gold */
203
+ .art-color-spin > ul > li:nth-child(1) {
204
+ outline: solid 1px var(--art-color-spin-color1);
205
+ outline-offset: 1px;
206
+ }
207
+ .art-color-spin > ul > li:nth-child(1)::after {
208
+ background: var(--art-color-spin-color1);
209
+ }
210
+ .art-color-spin > ul > li:nth-child(1)::before {
211
+ background: color-mix(in hsl, var(--art-color-spin-color1), white 30%);
212
+ }
213
+
214
+ /* Ring 2: Blue */
215
+ .art-color-spin > ul > li:nth-child(2) {
216
+ outline: solid 1px var(--art-color-spin-color2);
217
+ outline-offset: 1px;
218
+ }
219
+ .art-color-spin > ul > li:nth-child(2)::after {
220
+ background: var(--art-color-spin-color2);
221
+ }
222
+ .art-color-spin > ul > li:nth-child(2)::before {
223
+ background: color-mix(in hsl, var(--art-color-spin-color2), white 30%);
224
+ }
225
+
226
+ /* Ring 3: Green */
227
+ .art-color-spin > ul > li:nth-child(3) {
228
+ outline: solid 1px var(--art-color-spin-color3);
229
+ outline-offset: 1px;
230
+ }
231
+ .art-color-spin > ul > li:nth-child(3)::after {
232
+ background: var(--art-color-spin-color3);
233
+ }
234
+ .art-color-spin > ul > li:nth-child(3)::before {
235
+ background: color-mix(in hsl, var(--art-color-spin-color3), white 30%);
236
+ }
237
+
238
+ /* Ring 4: Red */
239
+ .art-color-spin > ul > li:nth-child(4) {
240
+ outline: solid 1px var(--art-color-spin-color4);
241
+ outline-offset: 1px;
242
+ }
243
+ .art-color-spin > ul > li:nth-child(4)::after {
244
+ background: var(--art-color-spin-color4);
245
+ }
246
+ .art-color-spin > ul > li:nth-child(4)::before {
247
+ background: color-mix(in hsl, var(--art-color-spin-color4), white 30%);
248
+ }
249
+
250
+ .art-color-spin-sm {
251
+ --art-color-spin-size: 385px;
252
+ }
253
+
254
+ .art-color-spin-lg {
255
+ --art-color-spin-size: 1000px;
256
+ }
257
+ }
258
+ `;
259
+
260
+ // src/el-dm-art-color-spin.ts
261
+ var layerMatch = color_spin_default.match(/@layer\s+css-art\s*\{([\s\S]*)\}\s*$/);
262
+ var coreCss = layerMatch ? layerMatch[1] : color_spin_default;
263
+ var styles = import_el_base.css`
264
+ :host {
265
+ display: inline-block;
266
+ }
267
+ :host([hidden]) {
268
+ display: none !important;
269
+ }
270
+ ${coreCss}
271
+ `;
272
+
273
+ class ElDmArtColorSpin extends import_el_base.BaseElement {
274
+ static properties = {
275
+ size: { type: String, reflect: true }
276
+ };
277
+ constructor() {
278
+ super();
279
+ this.attachStyles(styles);
280
+ }
281
+ render() {
282
+ const classes = ["art-color-spin"];
283
+ if (this.size && this.size !== "md")
284
+ classes.push(`art-color-spin-${this.size}`);
285
+ return `
286
+ <div class="${classes.join(" ")}">
287
+ <ul>
288
+ <li style="--i:1"></li>
289
+ <li style="--i:2"></li>
290
+ <li style="--i:3"></li>
291
+ <li style="--i:4"></li>
292
+ </ul>
293
+ </div>
294
+ `;
295
+ }
296
+ }
297
+
298
+ // src/index.ts
299
+ function register() {
300
+ if (!customElements.get("el-dm-art-color-spin")) {
301
+ customElements.define("el-dm-art-color-spin", ElDmArtColorSpin);
302
+ }
303
+ }
304
+
305
+ //# debugId=51E41CBBC5DB258564756E2164756E21
306
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/el-dm-art-color-spin.ts", "../../src/index.ts"],
4
+ "sourcesContent": [
5
+ "import { BaseElement, css } from '@duskmoon-dev/el-base';\nimport rawCss from '@duskmoon-dev/css-art/dist/art/color-spin.css' with { type: 'text' };\n\nconst layerMatch = rawCss.match(/@layer\\s+css-art\\s*\\{([\\s\\S]*)\\}\\s*$/);\nconst coreCss = layerMatch ? layerMatch[1] : rawCss;\n\nconst styles = css`\n :host {\n display: inline-block;\n }\n :host([hidden]) {\n display: none !important;\n }\n ${coreCss}\n`;\n\nexport class ElDmArtColorSpin extends BaseElement {\n static properties = {\n size: { type: String, reflect: true },\n };\n\n declare size: string;\n\n constructor() {\n super();\n this.attachStyles(styles);\n }\n\n render(): string {\n const classes = ['art-color-spin'];\n if (this.size && this.size !== 'md') classes.push(`art-color-spin-${this.size}`);\n return `\n <div class=\"${classes.join(' ')}\">\n <ul>\n <li style=\"--i:1\"></li>\n <li style=\"--i:2\"></li>\n <li style=\"--i:3\"></li>\n <li style=\"--i:4\"></li>\n </ul>\n </div>\n `;\n }\n}\n",
6
+ "import { ElDmArtColorSpin } from './el-dm-art-color-spin.js';\n\nexport { ElDmArtColorSpin };\n\nexport function register(): void {\n if (!customElements.get('el-dm-art-color-spin')) {\n customElements.define('el-dm-art-color-spin', ElDmArtColorSpin);\n }\n}\n"
7
+ ],
8
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAiC,IAAjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,aAAa,mBAAO,MAAM,sCAAsC;AACtE,IAAM,UAAU,aAAa,WAAW,KAAK;AAE7C,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOX;AAAA;AAAA;AAGG,MAAM,yBAAyB,2BAAY;AAAA,SACzC,aAAa;AAAA,IAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,EACtC;AAAA,EAIA,WAAW,GAAG;AAAA,IACZ,MAAM;AAAA,IACN,KAAK,aAAa,MAAM;AAAA;AAAA,EAG1B,MAAM,GAAW;AAAA,IACf,MAAM,UAAU,CAAC,gBAAgB;AAAA,IACjC,IAAI,KAAK,QAAQ,KAAK,SAAS;AAAA,MAAM,QAAQ,KAAK,kBAAkB,KAAK,MAAM;AAAA,IAC/E,OAAO;AAAA,oBACS,QAAQ,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;;;ACtCO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,sBAAsB,GAAG;AAAA,IAC/C,eAAe,OAAO,wBAAwB,gBAAgB;AAAA,EAChE;AAAA;",
9
+ "debugId": "51E41CBBC5DB258564756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,309 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ function __accessProp(key) {
6
+ return this[key];
7
+ }
8
+ var __toCommonJS = (from) => {
9
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
10
+ if (entry)
11
+ return entry;
12
+ entry = __defProp({}, "__esModule", { value: true });
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (var key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(entry, key))
16
+ __defProp(entry, key, {
17
+ get: __accessProp.bind(from, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ __moduleCache.set(from, entry);
22
+ return entry;
23
+ };
24
+ var __moduleCache;
25
+ var __returnValue = (v) => v;
26
+ function __exportSetter(name, newValue) {
27
+ this[name] = __returnValue.bind(null, newValue);
28
+ }
29
+ var __export = (target, all) => {
30
+ for (var name in all)
31
+ __defProp(target, name, {
32
+ get: all[name],
33
+ enumerable: true,
34
+ configurable: true,
35
+ set: __exportSetter.bind(all, name)
36
+ });
37
+ };
38
+
39
+ // src/index.ts
40
+ var exports_src = {};
41
+ __export(exports_src, {
42
+ register: () => register,
43
+ ElDmArtColorSpin: () => ElDmArtColorSpin
44
+ });
45
+ module.exports = __toCommonJS(exports_src);
46
+
47
+ // src/el-dm-art-color-spin.ts
48
+ var import_el_base = require("@duskmoon-dev/el-base");
49
+
50
+ // ../../node_modules/.bun/@duskmoon-dev+css-art@0.3.0/node_modules/@duskmoon-dev/css-art/dist/art/color-spin.css
51
+ var color_spin_default = `@layer css-art {
52
+ @keyframes art-color-spin-spin {
53
+ 0%,
54
+ 1% {
55
+ transform: translateX(-50%) translateY(calc(var(--art-color-spin-size) * 0.026))
56
+ rotateY(0deg) scale(1.05);
57
+ }
58
+ 99%,
59
+ 100% {
60
+ transform: translateX(-50%) translateY(calc(var(--art-color-spin-size) * 0.026))
61
+ rotateY(360deg) scale(1.05);
62
+ }
63
+ }
64
+
65
+ .art-color-spin {
66
+ --art-color-spin-size: 770px;
67
+ --art-color-spin-color1: #ffd700;
68
+ --art-color-spin-color2: #20a7db;
69
+ --art-color-spin-color3: #8fce00;
70
+ --art-color-spin-color4: #ff0000;
71
+
72
+ position: relative;
73
+ width: var(--art-color-spin-size);
74
+ height: calc(var(--art-color-spin-size) * 0.26);
75
+ background: repeating-linear-gradient(
76
+ -45deg,
77
+ #000,
78
+ #000 5px,
79
+ #111 5px,
80
+ #111 10px
81
+ );
82
+ perspective: calc(var(--art-color-spin-size) * 1.039);
83
+ font-family: "Google Sans", sans-serif;
84
+ font-weight: 440;
85
+ overflow: visible;
86
+ }
87
+
88
+ .art-color-spin * {
89
+ box-sizing: border-box;
90
+ }
91
+
92
+ /* Decorative "c" letter */
93
+ .art-color-spin::before {
94
+ content: "c";
95
+ font-size: calc(var(--art-color-spin-size) * 0.461);
96
+ color: #eee;
97
+ position: absolute;
98
+ top: calc(var(--art-color-spin-size) * -0.169);
99
+ left: 0;
100
+ text-indent: calc(var(--art-color-spin-size) * -0.026);
101
+ line-height: calc(var(--art-color-spin-size) * 0.519);
102
+ z-index: 2;
103
+ -webkit-box-reflect: below calc(var(--art-color-spin-size) * -0.169)
104
+ linear-gradient(transparent, rgb(255 255 255 / 0.06));
105
+ }
106
+
107
+ /* Decorative "r" letter */
108
+ .art-color-spin::after {
109
+ content: "r";
110
+ font-size: calc(var(--art-color-spin-size) * 0.461);
111
+ color: #eee;
112
+ position: absolute;
113
+ top: calc(var(--art-color-spin-size) * -0.169);
114
+ right: calc(var(--art-color-spin-size) * 0.039);
115
+ line-height: calc(var(--art-color-spin-size) * 0.519);
116
+ z-index: 2;
117
+ -webkit-box-reflect: below calc(var(--art-color-spin-size) * -0.169)
118
+ linear-gradient(transparent, rgb(255 255 255 / 0.06));
119
+ }
120
+
121
+ /* 3D spinner container */
122
+ .art-color-spin > ul {
123
+ width: 0;
124
+ height: calc(var(--art-color-spin-size) * 0.195);
125
+ display: block;
126
+ left: 50%;
127
+ position: relative;
128
+ transform-style: preserve-3d;
129
+ transform-origin: center center;
130
+ z-index: 3;
131
+ margin: 0;
132
+ padding: 0;
133
+ list-style: none;
134
+ animation: art-color-spin-spin 11s linear infinite alternate-reverse;
135
+ }
136
+
137
+ .art-color-spin > ul * {
138
+ transform-style: preserve-3d;
139
+ }
140
+
141
+ /* White vertical bars (axis indicators) */
142
+ .art-color-spin > ul::before,
143
+ .art-color-spin > ul::after {
144
+ content: "";
145
+ display: block;
146
+ position: absolute;
147
+ width: calc(var(--art-color-spin-size) * 0.052);
148
+ height: calc(var(--art-color-spin-size) * 0.286);
149
+ border-radius: calc(var(--art-color-spin-size) * 0.026);
150
+ top: calc(var(--art-color-spin-size) * -0.039);
151
+ left: calc(var(--art-color-spin-size) * -0.026);
152
+ background: #fff;
153
+ }
154
+
155
+ .art-color-spin > ul::before {
156
+ background: #eee;
157
+ transform: rotateY(-90deg);
158
+ }
159
+
160
+ /* Colored rings */
161
+ .art-color-spin > ul > li {
162
+ display: block;
163
+ width: calc(var(--art-color-spin-size) * 0.234);
164
+ height: calc(var(--art-color-spin-size) * 0.234);
165
+ border: solid calc(var(--art-color-spin-size) * 0.032) #fff;
166
+ border-radius: 50%;
167
+ top: calc(var(--art-color-spin-size) * -0.013);
168
+ left: 0;
169
+ position: absolute;
170
+ transform: rotateY(calc(var(--i) * -90deg)) translateZ(0px)
171
+ translateX(calc(var(--art-color-spin-size) * 0.052));
172
+ transform-origin: top left;
173
+ -webkit-box-reflect: below 2px linear-gradient(transparent, rgb(255 255 255 / 0.1));
174
+ margin: 0;
175
+ padding: 0;
176
+ list-style: none;
177
+ }
178
+
179
+ /* Inner colored circles (mix-blend-mode creates glow effect) */
180
+ .art-color-spin > ul > li::before,
181
+ .art-color-spin > ul > li::after {
182
+ content: "";
183
+ width: calc(var(--art-color-spin-size) * 0.13);
184
+ height: calc(var(--art-color-spin-size) * 0.13);
185
+ display: block;
186
+ opacity: 0.75;
187
+ border-radius: 50%;
188
+ position: absolute;
189
+ left: 50%;
190
+ top: 50%;
191
+ mix-blend-mode: color-burn;
192
+ }
193
+
194
+ .art-color-spin > ul > li::after {
195
+ transform: translate3d(-50%, -50%, 1px);
196
+ }
197
+
198
+ .art-color-spin > ul > li::before {
199
+ transform: translate3d(-50%, -50%, -1px);
200
+ }
201
+
202
+ /* Ring 1: Gold */
203
+ .art-color-spin > ul > li:nth-child(1) {
204
+ outline: solid 1px var(--art-color-spin-color1);
205
+ outline-offset: 1px;
206
+ }
207
+ .art-color-spin > ul > li:nth-child(1)::after {
208
+ background: var(--art-color-spin-color1);
209
+ }
210
+ .art-color-spin > ul > li:nth-child(1)::before {
211
+ background: color-mix(in hsl, var(--art-color-spin-color1), white 30%);
212
+ }
213
+
214
+ /* Ring 2: Blue */
215
+ .art-color-spin > ul > li:nth-child(2) {
216
+ outline: solid 1px var(--art-color-spin-color2);
217
+ outline-offset: 1px;
218
+ }
219
+ .art-color-spin > ul > li:nth-child(2)::after {
220
+ background: var(--art-color-spin-color2);
221
+ }
222
+ .art-color-spin > ul > li:nth-child(2)::before {
223
+ background: color-mix(in hsl, var(--art-color-spin-color2), white 30%);
224
+ }
225
+
226
+ /* Ring 3: Green */
227
+ .art-color-spin > ul > li:nth-child(3) {
228
+ outline: solid 1px var(--art-color-spin-color3);
229
+ outline-offset: 1px;
230
+ }
231
+ .art-color-spin > ul > li:nth-child(3)::after {
232
+ background: var(--art-color-spin-color3);
233
+ }
234
+ .art-color-spin > ul > li:nth-child(3)::before {
235
+ background: color-mix(in hsl, var(--art-color-spin-color3), white 30%);
236
+ }
237
+
238
+ /* Ring 4: Red */
239
+ .art-color-spin > ul > li:nth-child(4) {
240
+ outline: solid 1px var(--art-color-spin-color4);
241
+ outline-offset: 1px;
242
+ }
243
+ .art-color-spin > ul > li:nth-child(4)::after {
244
+ background: var(--art-color-spin-color4);
245
+ }
246
+ .art-color-spin > ul > li:nth-child(4)::before {
247
+ background: color-mix(in hsl, var(--art-color-spin-color4), white 30%);
248
+ }
249
+
250
+ .art-color-spin-sm {
251
+ --art-color-spin-size: 385px;
252
+ }
253
+
254
+ .art-color-spin-lg {
255
+ --art-color-spin-size: 1000px;
256
+ }
257
+ }
258
+ `;
259
+
260
+ // src/el-dm-art-color-spin.ts
261
+ var layerMatch = color_spin_default.match(/@layer\s+css-art\s*\{([\s\S]*)\}\s*$/);
262
+ var coreCss = layerMatch ? layerMatch[1] : color_spin_default;
263
+ var styles = import_el_base.css`
264
+ :host {
265
+ display: inline-block;
266
+ }
267
+ :host([hidden]) {
268
+ display: none !important;
269
+ }
270
+ ${coreCss}
271
+ `;
272
+
273
+ class ElDmArtColorSpin extends import_el_base.BaseElement {
274
+ static properties = {
275
+ size: { type: String, reflect: true }
276
+ };
277
+ constructor() {
278
+ super();
279
+ this.attachStyles(styles);
280
+ }
281
+ render() {
282
+ const classes = ["art-color-spin"];
283
+ if (this.size && this.size !== "md")
284
+ classes.push(`art-color-spin-${this.size}`);
285
+ return `
286
+ <div class="${classes.join(" ")}">
287
+ <ul>
288
+ <li style="--i:1"></li>
289
+ <li style="--i:2"></li>
290
+ <li style="--i:3"></li>
291
+ <li style="--i:4"></li>
292
+ </ul>
293
+ </div>
294
+ `;
295
+ }
296
+ }
297
+
298
+ // src/index.ts
299
+ function register() {
300
+ if (!customElements.get("el-dm-art-color-spin")) {
301
+ customElements.define("el-dm-art-color-spin", ElDmArtColorSpin);
302
+ }
303
+ }
304
+
305
+ // src/register.ts
306
+ register();
307
+
308
+ //# debugId=B6D0176198B1F56864756E2164756E21
309
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/el-dm-art-color-spin.ts", "../../src/index.ts", "../../src/register.ts"],
4
+ "sourcesContent": [
5
+ "import { BaseElement, css } from '@duskmoon-dev/el-base';\nimport rawCss from '@duskmoon-dev/css-art/dist/art/color-spin.css' with { type: 'text' };\n\nconst layerMatch = rawCss.match(/@layer\\s+css-art\\s*\\{([\\s\\S]*)\\}\\s*$/);\nconst coreCss = layerMatch ? layerMatch[1] : rawCss;\n\nconst styles = css`\n :host {\n display: inline-block;\n }\n :host([hidden]) {\n display: none !important;\n }\n ${coreCss}\n`;\n\nexport class ElDmArtColorSpin extends BaseElement {\n static properties = {\n size: { type: String, reflect: true },\n };\n\n declare size: string;\n\n constructor() {\n super();\n this.attachStyles(styles);\n }\n\n render(): string {\n const classes = ['art-color-spin'];\n if (this.size && this.size !== 'md') classes.push(`art-color-spin-${this.size}`);\n return `\n <div class=\"${classes.join(' ')}\">\n <ul>\n <li style=\"--i:1\"></li>\n <li style=\"--i:2\"></li>\n <li style=\"--i:3\"></li>\n <li style=\"--i:4\"></li>\n </ul>\n </div>\n `;\n }\n}\n",
6
+ "import { ElDmArtColorSpin } from './el-dm-art-color-spin.js';\n\nexport { ElDmArtColorSpin };\n\nexport function register(): void {\n if (!customElements.get('el-dm-art-color-spin')) {\n customElements.define('el-dm-art-color-spin', ElDmArtColorSpin);\n }\n}\n",
7
+ "import { register } from './index.js';\n\nregister();\n"
8
+ ],
9
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAiC,IAAjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,aAAa,mBAAO,MAAM,sCAAsC;AACtE,IAAM,UAAU,aAAa,WAAW,KAAK;AAE7C,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOX;AAAA;AAAA;AAGG,MAAM,yBAAyB,2BAAY;AAAA,SACzC,aAAa;AAAA,IAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,EACtC;AAAA,EAIA,WAAW,GAAG;AAAA,IACZ,MAAM;AAAA,IACN,KAAK,aAAa,MAAM;AAAA;AAAA,EAG1B,MAAM,GAAW;AAAA,IACf,MAAM,UAAU,CAAC,gBAAgB;AAAA,IACjC,IAAI,KAAK,QAAQ,KAAK,SAAS;AAAA,MAAM,QAAQ,KAAK,kBAAkB,KAAK,MAAM;AAAA,IAC/E,OAAO;AAAA,oBACS,QAAQ,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;;;ACtCO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,sBAAsB,GAAG;AAAA,IAC/C,eAAe,OAAO,wBAAwB,gBAAgB;AAAA,EAChE;AAAA;;;ACLF,SAAS;",
10
+ "debugId": "B6D0176198B1F56864756E2164756E21",
11
+ "names": []
12
+ }