@duskmoon-dev/el-art-synthwave-starfield 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.
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/el-dm-art-synthwave-starfield.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/synthwave-starfield.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 ElDmArtSynthwaveStarfield extends BaseElement {\n static properties = {\n size: { type: String, reflect: true },\n paused: { type: Boolean, reflect: true },\n };\n\n declare size: string;\n declare paused: boolean;\n\n constructor() {\n super();\n this.attachStyles(styles);\n }\n\n render(): string {\n const classes = ['art-synthwave-starfield'];\n if (this.size && this.size !== 'md') classes.push(`art-synthwave-starfield-${this.size}`);\n if (this.paused) classes.push('art-synthwave-starfield-paused');\n return `\n <div class=\"${classes.join(' ')}\">\n <div class=\"art-synthwave-starfield-lefrig art-synthwave-starfield-sides\"></div>\n <div class=\"art-synthwave-starfield-topbot art-synthwave-starfield-sides\"></div>\n <div class=\"art-synthwave-starfield-stars\"></div>\n <div class=\"art-synthwave-starfield-stars\"></div>\n </div>\n `;\n }\n}\n",
6
+ "import { ElDmArtSynthwaveStarfield } from './el-dm-art-synthwave-starfield.js';\n\nexport { ElDmArtSynthwaveStarfield };\n\nexport function register(): void {\n if (!customElements.get('el-dm-art-synthwave-starfield')) {\n customElements.define('el-dm-art-synthwave-starfield', ElDmArtSynthwaveStarfield);\n }\n}\n",
7
+ "import { register } from './index.js';\n\nregister();\n"
8
+ ],
9
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAiC,IAAjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,aAAa,4BAAO,MAAM,sCAAsC;AACtE,IAAM,UAAU,aAAa,WAAW,KAAK;AAE7C,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOX;AAAA;AAAA;AAGG,MAAM,kCAAkC,2BAAY;AAAA,SAClD,aAAa;AAAA,IAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACpC,QAAQ,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,EACzC;AAAA,EAKA,WAAW,GAAG;AAAA,IACZ,MAAM;AAAA,IACN,KAAK,aAAa,MAAM;AAAA;AAAA,EAG1B,MAAM,GAAW;AAAA,IACf,MAAM,UAAU,CAAC,yBAAyB;AAAA,IAC1C,IAAI,KAAK,QAAQ,KAAK,SAAS;AAAA,MAAM,QAAQ,KAAK,2BAA2B,KAAK,MAAM;AAAA,IACxF,IAAI,KAAK;AAAA,MAAQ,QAAQ,KAAK,gCAAgC;AAAA,IAC9D,OAAO;AAAA,oBACS,QAAQ,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQpC;;;ACvCO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,+BAA+B,GAAG;AAAA,IACxD,eAAe,OAAO,iCAAiC,yBAAyB;AAAA,EAClF;AAAA;;;ACLF,SAAS;",
10
+ "debugId": "AAF2716C263E3D8064756E2164756E21",
11
+ "names": []
12
+ }
@@ -0,0 +1,294 @@
1
+ // src/el-dm-art-synthwave-starfield.ts
2
+ import { BaseElement, css } from "@duskmoon-dev/el-base";
3
+
4
+ // ../../node_modules/.bun/@duskmoon-dev+css-art@0.3.0/node_modules/@duskmoon-dev/css-art/dist/art/synthwave-starfield.css
5
+ var synthwave_starfield_default = `@layer css-art {
6
+ @keyframes art-synthwave-starfield-color {
7
+ 0% {
8
+ filter: hue-rotate(1deg);
9
+ }
10
+ 100% {
11
+ filter: hue-rotate(360deg);
12
+ }
13
+ }
14
+
15
+ @keyframes art-synthwave-starfield-lines-x {
16
+ 0% {
17
+ background-position: calc(var(--art-synthwave-starfield-size) * 0.12) center;
18
+ }
19
+ 100% {
20
+ background-position: 0 center;
21
+ }
22
+ }
23
+
24
+ @keyframes art-synthwave-starfield-lines-y {
25
+ 0% {
26
+ background-position: center calc(var(--art-synthwave-starfield-size) * 0.12);
27
+ }
28
+ 100% {
29
+ background-position: center 0;
30
+ }
31
+ }
32
+
33
+ @keyframes art-synthwave-starfield-stars {
34
+ 0% {
35
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4));
36
+ opacity: 0;
37
+ }
38
+ 30%,
39
+ 80% {
40
+ opacity: 1;
41
+ }
42
+ 100% {
43
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * 0.5)) rotate(15deg);
44
+ opacity: 0;
45
+ }
46
+ }
47
+
48
+ @keyframes art-synthwave-starfield-stars2 {
49
+ 0% {
50
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4)) rotate(180deg);
51
+ opacity: 0;
52
+ }
53
+ 30%,
54
+ 80% {
55
+ opacity: 1;
56
+ }
57
+ 100% {
58
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * 0.5)) rotate(195deg);
59
+ opacity: 0;
60
+ }
61
+ }
62
+
63
+ .art-synthwave-starfield {
64
+ --art-synthwave-starfield-size: 600px;
65
+ --art-synthwave-starfield-line-color: #6bd600;
66
+
67
+ position: relative;
68
+ width: var(--art-synthwave-starfield-size);
69
+ height: var(--art-synthwave-starfield-size);
70
+ overflow: hidden;
71
+ perspective: calc(var(--art-synthwave-starfield-size) * 0.5);
72
+ transform-style: preserve-3d;
73
+ background-image: radial-gradient(#0000, #673ab72e),
74
+ linear-gradient(-90deg, #2000587d, #000, #9c27b02b),
75
+ linear-gradient(0deg, #ff98002e, #000, #8bc34a5e);
76
+ background-color: #000;
77
+ box-shadow: 0 0 calc(var(--art-synthwave-starfield-size) * 1.5)
78
+ calc(var(--art-synthwave-starfield-size) * 0.11) #000 inset;
79
+ font-family: "Press Start 2P", system-ui;
80
+ }
81
+
82
+ /* Secondary gradient overlay (replaces body::before) */
83
+ .art-synthwave-starfield::before {
84
+ content: "";
85
+ position: absolute;
86
+ width: 100%;
87
+ height: 100%;
88
+ background: radial-gradient(#0000, #0a123a),
89
+ linear-gradient(180deg, #2000587d, #000, #9c27b02b),
90
+ linear-gradient(0deg, #ff980054, #000, #009688ba);
91
+ opacity: 0.25;
92
+ z-index: 0;
93
+ }
94
+
95
+ /* All descendants: absolute + preserve-3d */
96
+ .art-synthwave-starfield * {
97
+ box-sizing: border-box;
98
+ position: absolute;
99
+ transform-style: preserve-3d;
100
+ }
101
+
102
+ .art-synthwave-starfield *::before,
103
+ .art-synthwave-starfield *::after {
104
+ box-sizing: border-box;
105
+ transform-style: preserve-3d;
106
+ position: absolute;
107
+ content: "";
108
+ }
109
+
110
+ /* Shared grid panel base */
111
+ .art-synthwave-starfield-sides {
112
+ width: 100%;
113
+ height: 100%;
114
+ background: radial-gradient(#0f0015 10%, #000000e0 35%, #fff0 75% 100%);
115
+ }
116
+
117
+ /* Left wall (shared base for both side panels) */
118
+ .art-synthwave-starfield-sides::before,
119
+ .art-synthwave-starfield-sides::after {
120
+ width: 100%;
121
+ height: 100%;
122
+ transform: rotateY(90deg);
123
+ transform-origin: left center;
124
+ background-image: repeating-linear-gradient(
125
+ 90deg,
126
+ #fff0 0,
127
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1),
128
+ var(--art-synthwave-starfield-line-color) calc(var(--art-synthwave-starfield-size) * 0.1)
129
+ calc(var(--art-synthwave-starfield-size) * 0.1035),
130
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1035)
131
+ ),
132
+ repeating-linear-gradient(
133
+ 180deg,
134
+ #fff0 0,
135
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1),
136
+ var(--art-synthwave-starfield-line-color) calc(var(--art-synthwave-starfield-size) * 0.1)
137
+ calc(var(--art-synthwave-starfield-size) * 0.1035),
138
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1035)
139
+ );
140
+ background-color: transparent;
141
+ animation: art-synthwave-starfield-lines-x 0.5s linear 0s infinite,
142
+ art-synthwave-starfield-color 5s linear 0s infinite;
143
+ background-repeat: repeat;
144
+ background-position: center center;
145
+ background-size: calc(var(--art-synthwave-starfield-size) * 0.12)
146
+ calc(var(--art-synthwave-starfield-size) * 0.12);
147
+ box-shadow: 0 0 calc(var(--art-synthwave-starfield-size) * 0.08)
148
+ calc(var(--art-synthwave-starfield-size) * 0.1) #000 inset;
149
+ }
150
+
151
+ /* Right wall */
152
+ .art-synthwave-starfield-lefrig::after {
153
+ transform: rotateY(-90deg);
154
+ transform-origin: right center;
155
+ animation: art-synthwave-starfield-lines-x 0.5s linear 0s infinite reverse,
156
+ art-synthwave-starfield-color 5s linear 2s infinite;
157
+ z-index: -1;
158
+ }
159
+
160
+ /* Floor */
161
+ .art-synthwave-starfield-topbot::before {
162
+ height: 100%;
163
+ transform: rotateX(90deg);
164
+ transform-origin: center bottom;
165
+ bottom: 0;
166
+ animation: art-synthwave-starfield-lines-y 0.5s linear 0s infinite reverse,
167
+ art-synthwave-starfield-color 5s linear 1s infinite;
168
+ }
169
+
170
+ /* Ceiling */
171
+ .art-synthwave-starfield-topbot::after {
172
+ height: 100%;
173
+ transform: rotateX(-90deg);
174
+ transform-origin: center top;
175
+ bottom: auto;
176
+ animation: art-synthwave-starfield-lines-y 0.5s linear 0s infinite,
177
+ art-synthwave-starfield-color 5s linear 3s infinite;
178
+ }
179
+
180
+ /* Starfield layers */
181
+ .art-synthwave-starfield-stars {
182
+ width: 100%;
183
+ height: 100%;
184
+ z-index: 3;
185
+ }
186
+
187
+ .art-synthwave-starfield-stars::before,
188
+ .art-synthwave-starfield-stars::after {
189
+ width: 200%;
190
+ height: 200%;
191
+ background: transparent;
192
+ border-radius: 100%;
193
+ background-image: repeating-conic-gradient(
194
+ #fff8 0%,
195
+ transparent 0.0002%,
196
+ transparent 0.075%,
197
+ transparent 0.65%
198
+ ),
199
+ repeating-conic-gradient(
200
+ #fff 0%,
201
+ transparent 0.0004%,
202
+ transparent 0.05%,
203
+ transparent 0.495%
204
+ );
205
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4));
206
+ opacity: 0;
207
+ animation: art-synthwave-starfield-stars 4s ease-in -1s infinite;
208
+ z-index: 1;
209
+ left: -50%;
210
+ top: -50%;
211
+ }
212
+
213
+ .art-synthwave-starfield-stars::after {
214
+ animation-name: art-synthwave-starfield-stars2;
215
+ animation-delay: -2s;
216
+ }
217
+
218
+ /* Second stars div: offset delays for smooth looping */
219
+ .art-synthwave-starfield-stars + .art-synthwave-starfield-stars::before {
220
+ animation-delay: -3s;
221
+ }
222
+
223
+ .art-synthwave-starfield-stars + .art-synthwave-starfield-stars::after {
224
+ animation-delay: -4s;
225
+ }
226
+
227
+ /* Pause all animations (opt-in modifier) */
228
+ .art-synthwave-starfield.art-synthwave-starfield-paused *::before,
229
+ .art-synthwave-starfield.art-synthwave-starfield-paused *::after {
230
+ animation-play-state: paused !important;
231
+ }
232
+
233
+ .art-synthwave-starfield-sm {
234
+ --art-synthwave-starfield-size: 300px;
235
+ }
236
+
237
+ .art-synthwave-starfield-lg {
238
+ --art-synthwave-starfield-size: 900px;
239
+ }
240
+ }
241
+ `;
242
+
243
+ // src/el-dm-art-synthwave-starfield.ts
244
+ var layerMatch = synthwave_starfield_default.match(/@layer\s+css-art\s*\{([\s\S]*)\}\s*$/);
245
+ var coreCss = layerMatch ? layerMatch[1] : synthwave_starfield_default;
246
+ var styles = css`
247
+ :host {
248
+ display: inline-block;
249
+ }
250
+ :host([hidden]) {
251
+ display: none !important;
252
+ }
253
+ ${coreCss}
254
+ `;
255
+
256
+ class ElDmArtSynthwaveStarfield extends BaseElement {
257
+ static properties = {
258
+ size: { type: String, reflect: true },
259
+ paused: { type: Boolean, reflect: true }
260
+ };
261
+ constructor() {
262
+ super();
263
+ this.attachStyles(styles);
264
+ }
265
+ render() {
266
+ const classes = ["art-synthwave-starfield"];
267
+ if (this.size && this.size !== "md")
268
+ classes.push(`art-synthwave-starfield-${this.size}`);
269
+ if (this.paused)
270
+ classes.push("art-synthwave-starfield-paused");
271
+ return `
272
+ <div class="${classes.join(" ")}">
273
+ <div class="art-synthwave-starfield-lefrig art-synthwave-starfield-sides"></div>
274
+ <div class="art-synthwave-starfield-topbot art-synthwave-starfield-sides"></div>
275
+ <div class="art-synthwave-starfield-stars"></div>
276
+ <div class="art-synthwave-starfield-stars"></div>
277
+ </div>
278
+ `;
279
+ }
280
+ }
281
+
282
+ // src/index.ts
283
+ function register() {
284
+ if (!customElements.get("el-dm-art-synthwave-starfield")) {
285
+ customElements.define("el-dm-art-synthwave-starfield", ElDmArtSynthwaveStarfield);
286
+ }
287
+ }
288
+ export {
289
+ register,
290
+ ElDmArtSynthwaveStarfield
291
+ };
292
+
293
+ //# debugId=3006FCFA46D995A564756E2164756E21
294
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/el-dm-art-synthwave-starfield.ts", "../../src/index.ts"],
4
+ "sourcesContent": [
5
+ "import { BaseElement, css } from '@duskmoon-dev/el-base';\nimport rawCss from '@duskmoon-dev/css-art/dist/art/synthwave-starfield.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 ElDmArtSynthwaveStarfield extends BaseElement {\n static properties = {\n size: { type: String, reflect: true },\n paused: { type: Boolean, reflect: true },\n };\n\n declare size: string;\n declare paused: boolean;\n\n constructor() {\n super();\n this.attachStyles(styles);\n }\n\n render(): string {\n const classes = ['art-synthwave-starfield'];\n if (this.size && this.size !== 'md') classes.push(`art-synthwave-starfield-${this.size}`);\n if (this.paused) classes.push('art-synthwave-starfield-paused');\n return `\n <div class=\"${classes.join(' ')}\">\n <div class=\"art-synthwave-starfield-lefrig art-synthwave-starfield-sides\"></div>\n <div class=\"art-synthwave-starfield-topbot art-synthwave-starfield-sides\"></div>\n <div class=\"art-synthwave-starfield-stars\"></div>\n <div class=\"art-synthwave-starfield-stars\"></div>\n </div>\n `;\n }\n}\n",
6
+ "import { ElDmArtSynthwaveStarfield } from './el-dm-art-synthwave-starfield.js';\n\nexport { ElDmArtSynthwaveStarfield };\n\nexport function register(): void {\n if (!customElements.get('el-dm-art-synthwave-starfield')) {\n customElements.define('el-dm-art-synthwave-starfield', ElDmArtSynthwaveStarfield);\n }\n}\n"
7
+ ],
8
+ "mappings": ";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,aAAa,4BAAO,MAAM,sCAAsC;AACtE,IAAM,UAAU,aAAa,WAAW,KAAK;AAE7C,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOX;AAAA;AAAA;AAGG,MAAM,kCAAkC,YAAY;AAAA,SAClD,aAAa;AAAA,IAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACpC,QAAQ,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,EACzC;AAAA,EAKA,WAAW,GAAG;AAAA,IACZ,MAAM;AAAA,IACN,KAAK,aAAa,MAAM;AAAA;AAAA,EAG1B,MAAM,GAAW;AAAA,IACf,MAAM,UAAU,CAAC,yBAAyB;AAAA,IAC1C,IAAI,KAAK,QAAQ,KAAK,SAAS;AAAA,MAAM,QAAQ,KAAK,2BAA2B,KAAK,MAAM;AAAA,IACxF,IAAI,KAAK;AAAA,MAAQ,QAAQ,KAAK,gCAAgC;AAAA,IAC9D,OAAO;AAAA,oBACS,QAAQ,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQpC;;;ACvCO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,+BAA+B,GAAG;AAAA,IACxD,eAAe,OAAO,iCAAiC,yBAAyB;AAAA,EAClF;AAAA;",
9
+ "debugId": "3006FCFA46D995A564756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,293 @@
1
+ // src/el-dm-art-synthwave-starfield.ts
2
+ import { BaseElement, css } from "@duskmoon-dev/el-base";
3
+
4
+ // ../../node_modules/.bun/@duskmoon-dev+css-art@0.3.0/node_modules/@duskmoon-dev/css-art/dist/art/synthwave-starfield.css
5
+ var synthwave_starfield_default = `@layer css-art {
6
+ @keyframes art-synthwave-starfield-color {
7
+ 0% {
8
+ filter: hue-rotate(1deg);
9
+ }
10
+ 100% {
11
+ filter: hue-rotate(360deg);
12
+ }
13
+ }
14
+
15
+ @keyframes art-synthwave-starfield-lines-x {
16
+ 0% {
17
+ background-position: calc(var(--art-synthwave-starfield-size) * 0.12) center;
18
+ }
19
+ 100% {
20
+ background-position: 0 center;
21
+ }
22
+ }
23
+
24
+ @keyframes art-synthwave-starfield-lines-y {
25
+ 0% {
26
+ background-position: center calc(var(--art-synthwave-starfield-size) * 0.12);
27
+ }
28
+ 100% {
29
+ background-position: center 0;
30
+ }
31
+ }
32
+
33
+ @keyframes art-synthwave-starfield-stars {
34
+ 0% {
35
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4));
36
+ opacity: 0;
37
+ }
38
+ 30%,
39
+ 80% {
40
+ opacity: 1;
41
+ }
42
+ 100% {
43
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * 0.5)) rotate(15deg);
44
+ opacity: 0;
45
+ }
46
+ }
47
+
48
+ @keyframes art-synthwave-starfield-stars2 {
49
+ 0% {
50
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4)) rotate(180deg);
51
+ opacity: 0;
52
+ }
53
+ 30%,
54
+ 80% {
55
+ opacity: 1;
56
+ }
57
+ 100% {
58
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * 0.5)) rotate(195deg);
59
+ opacity: 0;
60
+ }
61
+ }
62
+
63
+ .art-synthwave-starfield {
64
+ --art-synthwave-starfield-size: 600px;
65
+ --art-synthwave-starfield-line-color: #6bd600;
66
+
67
+ position: relative;
68
+ width: var(--art-synthwave-starfield-size);
69
+ height: var(--art-synthwave-starfield-size);
70
+ overflow: hidden;
71
+ perspective: calc(var(--art-synthwave-starfield-size) * 0.5);
72
+ transform-style: preserve-3d;
73
+ background-image: radial-gradient(#0000, #673ab72e),
74
+ linear-gradient(-90deg, #2000587d, #000, #9c27b02b),
75
+ linear-gradient(0deg, #ff98002e, #000, #8bc34a5e);
76
+ background-color: #000;
77
+ box-shadow: 0 0 calc(var(--art-synthwave-starfield-size) * 1.5)
78
+ calc(var(--art-synthwave-starfield-size) * 0.11) #000 inset;
79
+ font-family: "Press Start 2P", system-ui;
80
+ }
81
+
82
+ /* Secondary gradient overlay (replaces body::before) */
83
+ .art-synthwave-starfield::before {
84
+ content: "";
85
+ position: absolute;
86
+ width: 100%;
87
+ height: 100%;
88
+ background: radial-gradient(#0000, #0a123a),
89
+ linear-gradient(180deg, #2000587d, #000, #9c27b02b),
90
+ linear-gradient(0deg, #ff980054, #000, #009688ba);
91
+ opacity: 0.25;
92
+ z-index: 0;
93
+ }
94
+
95
+ /* All descendants: absolute + preserve-3d */
96
+ .art-synthwave-starfield * {
97
+ box-sizing: border-box;
98
+ position: absolute;
99
+ transform-style: preserve-3d;
100
+ }
101
+
102
+ .art-synthwave-starfield *::before,
103
+ .art-synthwave-starfield *::after {
104
+ box-sizing: border-box;
105
+ transform-style: preserve-3d;
106
+ position: absolute;
107
+ content: "";
108
+ }
109
+
110
+ /* Shared grid panel base */
111
+ .art-synthwave-starfield-sides {
112
+ width: 100%;
113
+ height: 100%;
114
+ background: radial-gradient(#0f0015 10%, #000000e0 35%, #fff0 75% 100%);
115
+ }
116
+
117
+ /* Left wall (shared base for both side panels) */
118
+ .art-synthwave-starfield-sides::before,
119
+ .art-synthwave-starfield-sides::after {
120
+ width: 100%;
121
+ height: 100%;
122
+ transform: rotateY(90deg);
123
+ transform-origin: left center;
124
+ background-image: repeating-linear-gradient(
125
+ 90deg,
126
+ #fff0 0,
127
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1),
128
+ var(--art-synthwave-starfield-line-color) calc(var(--art-synthwave-starfield-size) * 0.1)
129
+ calc(var(--art-synthwave-starfield-size) * 0.1035),
130
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1035)
131
+ ),
132
+ repeating-linear-gradient(
133
+ 180deg,
134
+ #fff0 0,
135
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1),
136
+ var(--art-synthwave-starfield-line-color) calc(var(--art-synthwave-starfield-size) * 0.1)
137
+ calc(var(--art-synthwave-starfield-size) * 0.1035),
138
+ #fff0 calc(var(--art-synthwave-starfield-size) * 0.1035)
139
+ );
140
+ background-color: transparent;
141
+ animation: art-synthwave-starfield-lines-x 0.5s linear 0s infinite,
142
+ art-synthwave-starfield-color 5s linear 0s infinite;
143
+ background-repeat: repeat;
144
+ background-position: center center;
145
+ background-size: calc(var(--art-synthwave-starfield-size) * 0.12)
146
+ calc(var(--art-synthwave-starfield-size) * 0.12);
147
+ box-shadow: 0 0 calc(var(--art-synthwave-starfield-size) * 0.08)
148
+ calc(var(--art-synthwave-starfield-size) * 0.1) #000 inset;
149
+ }
150
+
151
+ /* Right wall */
152
+ .art-synthwave-starfield-lefrig::after {
153
+ transform: rotateY(-90deg);
154
+ transform-origin: right center;
155
+ animation: art-synthwave-starfield-lines-x 0.5s linear 0s infinite reverse,
156
+ art-synthwave-starfield-color 5s linear 2s infinite;
157
+ z-index: -1;
158
+ }
159
+
160
+ /* Floor */
161
+ .art-synthwave-starfield-topbot::before {
162
+ height: 100%;
163
+ transform: rotateX(90deg);
164
+ transform-origin: center bottom;
165
+ bottom: 0;
166
+ animation: art-synthwave-starfield-lines-y 0.5s linear 0s infinite reverse,
167
+ art-synthwave-starfield-color 5s linear 1s infinite;
168
+ }
169
+
170
+ /* Ceiling */
171
+ .art-synthwave-starfield-topbot::after {
172
+ height: 100%;
173
+ transform: rotateX(-90deg);
174
+ transform-origin: center top;
175
+ bottom: auto;
176
+ animation: art-synthwave-starfield-lines-y 0.5s linear 0s infinite,
177
+ art-synthwave-starfield-color 5s linear 3s infinite;
178
+ }
179
+
180
+ /* Starfield layers */
181
+ .art-synthwave-starfield-stars {
182
+ width: 100%;
183
+ height: 100%;
184
+ z-index: 3;
185
+ }
186
+
187
+ .art-synthwave-starfield-stars::before,
188
+ .art-synthwave-starfield-stars::after {
189
+ width: 200%;
190
+ height: 200%;
191
+ background: transparent;
192
+ border-radius: 100%;
193
+ background-image: repeating-conic-gradient(
194
+ #fff8 0%,
195
+ transparent 0.0002%,
196
+ transparent 0.075%,
197
+ transparent 0.65%
198
+ ),
199
+ repeating-conic-gradient(
200
+ #fff 0%,
201
+ transparent 0.0004%,
202
+ transparent 0.05%,
203
+ transparent 0.495%
204
+ );
205
+ transform: translateZ(calc(var(--art-synthwave-starfield-size) * -0.4));
206
+ opacity: 0;
207
+ animation: art-synthwave-starfield-stars 4s ease-in -1s infinite;
208
+ z-index: 1;
209
+ left: -50%;
210
+ top: -50%;
211
+ }
212
+
213
+ .art-synthwave-starfield-stars::after {
214
+ animation-name: art-synthwave-starfield-stars2;
215
+ animation-delay: -2s;
216
+ }
217
+
218
+ /* Second stars div: offset delays for smooth looping */
219
+ .art-synthwave-starfield-stars + .art-synthwave-starfield-stars::before {
220
+ animation-delay: -3s;
221
+ }
222
+
223
+ .art-synthwave-starfield-stars + .art-synthwave-starfield-stars::after {
224
+ animation-delay: -4s;
225
+ }
226
+
227
+ /* Pause all animations (opt-in modifier) */
228
+ .art-synthwave-starfield.art-synthwave-starfield-paused *::before,
229
+ .art-synthwave-starfield.art-synthwave-starfield-paused *::after {
230
+ animation-play-state: paused !important;
231
+ }
232
+
233
+ .art-synthwave-starfield-sm {
234
+ --art-synthwave-starfield-size: 300px;
235
+ }
236
+
237
+ .art-synthwave-starfield-lg {
238
+ --art-synthwave-starfield-size: 900px;
239
+ }
240
+ }
241
+ `;
242
+
243
+ // src/el-dm-art-synthwave-starfield.ts
244
+ var layerMatch = synthwave_starfield_default.match(/@layer\s+css-art\s*\{([\s\S]*)\}\s*$/);
245
+ var coreCss = layerMatch ? layerMatch[1] : synthwave_starfield_default;
246
+ var styles = css`
247
+ :host {
248
+ display: inline-block;
249
+ }
250
+ :host([hidden]) {
251
+ display: none !important;
252
+ }
253
+ ${coreCss}
254
+ `;
255
+
256
+ class ElDmArtSynthwaveStarfield extends BaseElement {
257
+ static properties = {
258
+ size: { type: String, reflect: true },
259
+ paused: { type: Boolean, reflect: true }
260
+ };
261
+ constructor() {
262
+ super();
263
+ this.attachStyles(styles);
264
+ }
265
+ render() {
266
+ const classes = ["art-synthwave-starfield"];
267
+ if (this.size && this.size !== "md")
268
+ classes.push(`art-synthwave-starfield-${this.size}`);
269
+ if (this.paused)
270
+ classes.push("art-synthwave-starfield-paused");
271
+ return `
272
+ <div class="${classes.join(" ")}">
273
+ <div class="art-synthwave-starfield-lefrig art-synthwave-starfield-sides"></div>
274
+ <div class="art-synthwave-starfield-topbot art-synthwave-starfield-sides"></div>
275
+ <div class="art-synthwave-starfield-stars"></div>
276
+ <div class="art-synthwave-starfield-stars"></div>
277
+ </div>
278
+ `;
279
+ }
280
+ }
281
+
282
+ // src/index.ts
283
+ function register() {
284
+ if (!customElements.get("el-dm-art-synthwave-starfield")) {
285
+ customElements.define("el-dm-art-synthwave-starfield", ElDmArtSynthwaveStarfield);
286
+ }
287
+ }
288
+
289
+ // src/register.ts
290
+ register();
291
+
292
+ //# debugId=66A7A264A0E260A264756E2164756E21
293
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/el-dm-art-synthwave-starfield.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/synthwave-starfield.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 ElDmArtSynthwaveStarfield extends BaseElement {\n static properties = {\n size: { type: String, reflect: true },\n paused: { type: Boolean, reflect: true },\n };\n\n declare size: string;\n declare paused: boolean;\n\n constructor() {\n super();\n this.attachStyles(styles);\n }\n\n render(): string {\n const classes = ['art-synthwave-starfield'];\n if (this.size && this.size !== 'md') classes.push(`art-synthwave-starfield-${this.size}`);\n if (this.paused) classes.push('art-synthwave-starfield-paused');\n return `\n <div class=\"${classes.join(' ')}\">\n <div class=\"art-synthwave-starfield-lefrig art-synthwave-starfield-sides\"></div>\n <div class=\"art-synthwave-starfield-topbot art-synthwave-starfield-sides\"></div>\n <div class=\"art-synthwave-starfield-stars\"></div>\n <div class=\"art-synthwave-starfield-stars\"></div>\n </div>\n `;\n }\n}\n",
6
+ "import { ElDmArtSynthwaveStarfield } from './el-dm-art-synthwave-starfield.js';\n\nexport { ElDmArtSynthwaveStarfield };\n\nexport function register(): void {\n if (!customElements.get('el-dm-art-synthwave-starfield')) {\n customElements.define('el-dm-art-synthwave-starfield', ElDmArtSynthwaveStarfield);\n }\n}\n",
7
+ "import { register } from './index.js';\n\nregister();\n"
8
+ ],
9
+ "mappings": ";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,aAAa,4BAAO,MAAM,sCAAsC;AACtE,IAAM,UAAU,aAAa,WAAW,KAAK;AAE7C,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOX;AAAA;AAAA;AAGG,MAAM,kCAAkC,YAAY;AAAA,SAClD,aAAa;AAAA,IAClB,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,IACpC,QAAQ,EAAE,MAAM,SAAS,SAAS,KAAK;AAAA,EACzC;AAAA,EAKA,WAAW,GAAG;AAAA,IACZ,MAAM;AAAA,IACN,KAAK,aAAa,MAAM;AAAA;AAAA,EAG1B,MAAM,GAAW;AAAA,IACf,MAAM,UAAU,CAAC,yBAAyB;AAAA,IAC1C,IAAI,KAAK,QAAQ,KAAK,SAAS;AAAA,MAAM,QAAQ,KAAK,2BAA2B,KAAK,MAAM;AAAA,IACxF,IAAI,KAAK;AAAA,MAAQ,QAAQ,KAAK,gCAAgC;AAAA,IAC9D,OAAO;AAAA,oBACS,QAAQ,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQpC;;;ACvCO,SAAS,QAAQ,GAAS;AAAA,EAC/B,IAAI,CAAC,eAAe,IAAI,+BAA+B,GAAG;AAAA,IACxD,eAAe,OAAO,iCAAiC,yBAAyB;AAAA,EAClF;AAAA;;;ACLF,SAAS;",
10
+ "debugId": "66A7A264A0E260A264756E2164756E21",
11
+ "names": []
12
+ }