@skathi-native/cli 0.1.0-beta.3 → 0.2.0

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.
Files changed (68) hide show
  1. package/aot-inputs.ts +21 -2
  2. package/build.ts +241 -60
  3. package/check/bundle.ts +265 -0
  4. package/check/codes.ts +19 -0
  5. package/check/command.ts +5 -3
  6. package/check/graph.ts +3 -1
  7. package/check/index.ts +54 -2
  8. package/check/program.ts +26 -6
  9. package/cli/aot-build.ts +10 -7
  10. package/cli/build-app.ts +37 -8
  11. package/cli/config.ts +2 -2
  12. package/cli/create.ts +31 -8
  13. package/cli/dev.ts +109 -19
  14. package/cli/effects.ts +162 -0
  15. package/cli/elf.ts +3 -2
  16. package/cli/help.ts +56 -147
  17. package/cli/host-fetch.ts +33 -10
  18. package/cli/host.ts +43 -33
  19. package/cli/sk.ts +437 -234
  20. package/cli/skpk.ts +2 -0
  21. package/cli/stamp.ts +2 -2
  22. package/cli/term.ts +169 -38
  23. package/cli/workload-cache.ts +258 -0
  24. package/devtools/commands.ts +25 -0
  25. package/effects/compile.ts +1081 -0
  26. package/effects/redslangc.json +23 -0
  27. package/effects/redslangc.ts +220 -0
  28. package/effects/sk.slang +882 -0
  29. package/package.json +10 -4
  30. package/prod.ts +40 -7
  31. package/svelte.ts +76 -0
  32. package/templates/icon.png +0 -0
  33. package/templates/minimal/src/App.vue +2 -2
  34. package/templates/showcase/assets/textures/golden.png +0 -0
  35. package/templates/showcase/assets/textures/hammered.png +0 -0
  36. package/templates/showcase/assets/textures/noir.png +0 -0
  37. package/templates/showcase/assets/textures/reeded.png +0 -0
  38. package/templates/showcase/assets/textures/teal-orange.png +0 -0
  39. package/templates/showcase/shaders/dissolve.slang +40 -0
  40. package/templates/showcase/shaders/fireflies.slang +58 -0
  41. package/templates/showcase/shaders/glass.slang +31 -0
  42. package/templates/showcase/shaders/grade.slang +34 -0
  43. package/templates/showcase/shaders/halftone.slang +42 -0
  44. package/templates/showcase/shaders/lens.slang +51 -0
  45. package/templates/showcase/shaders/nebula.slang +57 -0
  46. package/templates/showcase/shaders/orbit.slang +52 -0
  47. package/templates/showcase/shaders/pond.slang +76 -0
  48. package/templates/showcase/shaders/ripples.slang +71 -0
  49. package/templates/showcase/shaders/shatter.slang +116 -0
  50. package/templates/showcase/shaders/sheen.slang +23 -0
  51. package/templates/showcase/shaders/snow.slang +57 -0
  52. package/templates/showcase/shaders/spotlight.slang +52 -0
  53. package/templates/showcase/src/App.vue +11 -16
  54. package/templates/showcase/src/components/FullWindow.vue +77 -0
  55. package/templates/showcase/src/components/Page.vue +2 -0
  56. package/templates/showcase/src/fullwindow.ts +36 -0
  57. package/templates/showcase/src/icons.ts +2 -0
  58. package/templates/showcase/src/pages/GraphicsPage.vue +122 -0
  59. package/templates/showcase/src/pages/MotionPage.vue +71 -1
  60. package/templates/showcase/src/pages/ShadersPage.vue +443 -0
  61. package/templates/showcase/src/pages/StylesPage.vue +9 -1
  62. package/templates/showcase/src/router.ts +32 -1
  63. package/templates/showcase/src/styles.css +2 -2
  64. package/templates/svelte/.vscode/settings.json +3 -0
  65. package/templates/svelte/assets/hello.txt +1 -0
  66. package/templates/svelte/src/App.svelte +142 -0
  67. package/templates/svelte/src/main.ts +4 -0
  68. package/vitecompat.ts +2 -0
@@ -3,6 +3,14 @@ import { onMounted, onUnmounted, ref, shallowRef } from "vue";
3
3
  import Card from "../components/Card.vue";
4
4
  import Page from "../components/Page.vue";
5
5
  import { describe, everyFrame } from "../engine";
6
+ import { icons, type IconName } from "../icons";
7
+
8
+ const maskIcons: IconName[] = ["home", "shaders", "audio", "permissions"];
9
+ const tints = ["#8b93ff", "#f0b45a", "#5ad1a8", "#f07a9a"];
10
+ const iconMask = (name: IconName) =>
11
+ `url("data:image/svg+xml,${encodeURIComponent(
12
+ `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='${icons[name]}'/></svg>`,
13
+ )}")`;
6
14
 
7
15
  const W = 640;
8
16
  const H = 220;
@@ -118,6 +126,31 @@ onMounted(() => {
118
126
  if (surface.value) startGpu(surface.value).catch((e: unknown) => (adapterName.value = describe(e)));
119
127
  });
120
128
  onUnmounted(() => stopGpu?.());
129
+
130
+ const stage = shallowRef<HTMLElement | null>(null);
131
+ const locked = ref(false);
132
+ const lockError = ref("");
133
+ const spin = ref({ x: -20, y: 30 });
134
+ const travelled = ref(0);
135
+
136
+ function lock() {
137
+ lockError.value = "";
138
+ stage.value?.requestPointerLock().catch((e: unknown) => (lockError.value = describe(e)));
139
+ }
140
+ function look(e: MouseEvent) {
141
+ if (!locked.value) return;
142
+ spin.value = {
143
+ x: Math.max(-80, Math.min(80, spin.value.x - e.movementY * 0.4)),
144
+ y: (spin.value.y + e.movementX * 0.4) % 360,
145
+ };
146
+ travelled.value += Math.hypot(e.movementX, e.movementY);
147
+ }
148
+ const onLockChange = () => (locked.value = document.pointerLockElement === stage.value);
149
+ onMounted(() => document.addEventListener("pointerlockchange", onLockChange));
150
+ onUnmounted(() => {
151
+ document.removeEventListener("pointerlockchange", onLockChange);
152
+ if (locked.value) document.exitPointerLock();
153
+ });
121
154
  </script>
122
155
 
123
156
  <template>
@@ -142,6 +175,36 @@ onUnmounted(() => stopGpu?.());
142
175
  <canvas ref="surface" class="canvas" :width="W * dpr" :height="H * dpr" />
143
176
  <p class="faint">A WGSL fragment shader, redrawn every frame with the time in a uniform buffer.</p>
144
177
  </Card>
178
+
179
+ <Card title="Masks" api="mask-image">
180
+ <div class="row">
181
+ <span
182
+ v-for="(name, i) in maskIcons"
183
+ :key="name"
184
+ class="mask-icon"
185
+ :style="{ maskImage: iconMask(name), color: tints[i] }"
186
+ />
187
+ <div class="fade">
188
+ <p v-for="n in 4" :key="n">Line {{ n }} of text under a gradient mask that fades it out.</p>
189
+ </div>
190
+ </div>
191
+ <p class="faint">SVG icons masking a currentColor background, and a gradient that fades the text out.</p>
192
+ </Card>
193
+
194
+ <Card title="Pointer lock" api="requestPointerLock()">
195
+ <div ref="stage" class="stage" :class="{ locked }" @click="lock" @mousemove="look">
196
+ <div class="cube" :style="{ transform: `rotate(${spin.y}deg) skewX(${spin.x / 4}deg)` }">
197
+ <div class="face" />
198
+ </div>
199
+ <span class="hint">{{ locked ? "Move the mouse to turn the shape" : "Click to lock the pointer" }}</span>
200
+ </div>
201
+ <div class="row">
202
+ <span class="badge" :class="{ on: locked }">{{ locked ? "Locked" : "Not locked" }}</span>
203
+ <span class="faint">Esc releases the pointer</span>
204
+ <span class="faint mono">{{ Math.round(travelled) }} px of movement</span>
205
+ </div>
206
+ <p v-if="lockError" class="faint">{{ lockError }}</p>
207
+ </Card>
145
208
  </Page>
146
209
  </template>
147
210
 
@@ -151,4 +214,63 @@ onUnmounted(() => stopGpu?.());
151
214
  height: 220px;
152
215
  border-radius: 10px;
153
216
  }
217
+ .mask-icon {
218
+ width: 32px;
219
+ height: 32px;
220
+ background: currentColor;
221
+ mask-size: contain;
222
+ mask-repeat: no-repeat;
223
+ mask-position: center;
224
+ }
225
+ .fade {
226
+ margin-left: 12px;
227
+ font-size: 13px;
228
+ line-height: 18px;
229
+ mask-image: linear-gradient(to bottom, #000 40%, transparent);
230
+ }
231
+ .stage {
232
+ position: relative;
233
+ width: 640px;
234
+ height: 180px;
235
+ border-radius: 10px;
236
+ border: 1px solid var(--line);
237
+ background: radial-gradient(circle at 50% 40%, #1f1b3a, #121218);
238
+ display: flex;
239
+ align-items: center;
240
+ justify-content: center;
241
+ cursor: pointer;
242
+ }
243
+ .stage.locked {
244
+ border-color: var(--accent);
245
+ }
246
+ .cube {
247
+ width: 72px;
248
+ height: 72px;
249
+ }
250
+ .face {
251
+ width: 100%;
252
+ height: 100%;
253
+ border-radius: 14px;
254
+ background: linear-gradient(135deg, var(--accent), var(--accent-strong));
255
+ box-shadow: 0 10px 30px #6d7cff55;
256
+ }
257
+ .hint {
258
+ position: absolute;
259
+ left: 14px;
260
+ bottom: 10px;
261
+ font-size: 12px;
262
+ color: var(--text-faint);
263
+ }
264
+ .badge {
265
+ padding: 2px 8px;
266
+ border-radius: 999px;
267
+ font-size: 12px;
268
+ border: 1px solid var(--line-strong);
269
+ color: var(--text-faint);
270
+ }
271
+ .badge.on {
272
+ color: var(--text);
273
+ border-color: var(--accent);
274
+ background: var(--accent-soft);
275
+ }
154
276
  </style>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { ref, shallowRef } from "vue";
2
+ import { nextTick, ref, shallowRef } from "vue";
3
3
  import Card from "../components/Card.vue";
4
4
  import Page from "../components/Page.vue";
5
5
 
@@ -26,6 +26,20 @@ const shown = ref(true);
26
26
  const words = ["Native", "Fast", "Small", "Vue"];
27
27
  const word = ref(0);
28
28
  const nextWord = () => (word.value = (word.value + 1) % words.length);
29
+
30
+ const tiles = [
31
+ { name: "Dusk", fill: "linear-gradient(135deg, #8b9dff, #b48cff)", text: "Violet light after sundown." },
32
+ { name: "Tide", fill: "linear-gradient(135deg, #38bdf8, #2dd4bf)", text: "Cool water over pale sand." },
33
+ { name: "Ember", fill: "linear-gradient(135deg, #fb923c, #f43f5e)", text: "The last coals of a fire." },
34
+ { name: "Moss", fill: "linear-gradient(135deg, #a3e635, #22c55e)", text: "Green on a north-facing stone." },
35
+ ];
36
+ const open = ref<number | null>(null);
37
+ const opened = () => tiles[open.value ?? 0]!;
38
+ const show = (i: number | null) =>
39
+ document.startViewTransition(async () => {
40
+ open.value = i;
41
+ await nextTick();
42
+ });
29
43
  </script>
30
44
 
31
45
  <template>
@@ -67,6 +81,26 @@ const nextWord = () => (word.value = (word.value + 1) % words.length);
67
81
  <div :key="word" class="word">{{ words[word] }}</div>
68
82
  </Transition>
69
83
  </Card>
84
+
85
+ <Card title="View transitions" api="document.startViewTransition()">
86
+ <div v-if="open === null" class="tiles">
87
+ <div
88
+ v-for="(tile, i) in tiles"
89
+ :key="tile.name"
90
+ class="tile"
91
+ :style="{ background: tile.fill, viewTransitionName: `tile-${i}` }"
92
+ @click="show(i)"
93
+ >
94
+ <span class="tile-name" :style="{ viewTransitionName: `tile-name-${i}` }">{{ tile.name }}</span>
95
+ </div>
96
+ </div>
97
+ <div v-else class="detail" @click="show(null)">
98
+ <div class="hero" :style="{ background: opened().fill, viewTransitionName: `tile-${open}` }">
99
+ <span class="hero-name" :style="{ viewTransitionName: `tile-name-${open}` }">{{ opened().name }}</span>
100
+ </div>
101
+ <p class="muted">{{ opened().text }} Click to go back.</p>
102
+ </div>
103
+ </Card>
70
104
  </Page>
71
105
  </template>
72
106
 
@@ -196,4 +230,40 @@ const nextWord = () => (word.value = (word.value + 1) % words.length);
196
230
  opacity: 0;
197
231
  transform: translateY(-10px);
198
232
  }
233
+ .tiles {
234
+ display: grid;
235
+ grid-template-columns: repeat(4, 1fr);
236
+ gap: 10px;
237
+ }
238
+ .tile {
239
+ height: 72px;
240
+ display: flex;
241
+ align-items: flex-end;
242
+ padding: 10px;
243
+ border-radius: 12px;
244
+ cursor: pointer;
245
+ }
246
+ .tile-name {
247
+ font-size: 13px;
248
+ font-weight: 600;
249
+ color: #ffffff;
250
+ }
251
+ .detail {
252
+ display: flex;
253
+ flex-direction: column;
254
+ gap: 10px;
255
+ cursor: pointer;
256
+ }
257
+ .hero {
258
+ height: 180px;
259
+ display: flex;
260
+ align-items: flex-end;
261
+ padding: 18px;
262
+ border-radius: 18px;
263
+ }
264
+ .hero-name {
265
+ font-size: 28px;
266
+ font-weight: 700;
267
+ color: #ffffff;
268
+ }
199
269
  </style>
@@ -0,0 +1,443 @@
1
+ <script setup lang="ts">
2
+ import { computed, ref, shallowRef } from "vue";
3
+ import Card from "../components/Card.vue";
4
+ import Page from "../components/Page.vue";
5
+ import { fullWindow, shatter } from "../fullwindow";
6
+
7
+ const LENS_WIDTH = 220;
8
+ const scene = shallowRef<HTMLElement | null>(null);
9
+ const lensX = ref(48);
10
+ let grab: number | null = null;
11
+ const lensDown = (e: MouseEvent) => (grab = e.clientX - lensX.value);
12
+ const lensUp = () => (grab = null);
13
+ function lensMove(e: MouseEvent) {
14
+ if (grab === null || !scene.value) return;
15
+ const room = scene.value.getBoundingClientRect().width - LENS_WIDTH;
16
+ lensX.value = Math.min(Math.max(e.clientX - grab, 0), room);
17
+ }
18
+
19
+ const warm = ref(false);
20
+
21
+ const burnt = ref(false);
22
+
23
+ const cells = [6, 9, 14];
24
+ const cell = ref(9);
25
+ const halftone = computed(() => `halftone(${cell.value}px, 0.125, 1, #0b0b12)`);
26
+
27
+ const grades = [
28
+ { id: "teal-orange", label: "Teal & orange" },
29
+ { id: "noir", label: "Noir" },
30
+ { id: "golden", label: "Golden hour" },
31
+ ];
32
+ const lut = ref("teal-orange");
33
+ const graded = ref(true);
34
+ const grade = computed(() => `grade(url(assets/textures/${lut.value}.png), ${graded.value ? 1 : 0})`);
35
+ const pickGrade = (id: string) => {
36
+ lut.value = id;
37
+ graded.value = true;
38
+ };
39
+
40
+ const patterns = [
41
+ { id: "reeded", label: "Reeded", depth: 14, scale: 1.4 },
42
+ { id: "hammered", label: "Hammered", depth: 10, scale: 1 },
43
+ ];
44
+ const pattern = ref(patterns[0]!);
45
+ const glass = computed(
46
+ () => `glass(url(assets/textures/${pattern.value.id}.png), ${pattern.value.depth}px, ${pattern.value.scale})`,
47
+ );
48
+ </script>
49
+
50
+ <template>
51
+ <Page
52
+ title="Shaders"
53
+ lead="Each effect is one Slang file in shaders/, compiled into the app for DirectX, Vulkan and Metal, and applied with a CSS custom property. Each of these uses a different part of the effect API."
54
+ >
55
+ <Card title="Over the whole window" api="shatter · ripples · snow · fireflies">
56
+ <div class="row">
57
+ <button class="btn" :disabled="fullWindow.shatter !== null" @click="shatter($event.clientX, $event.clientY)">
58
+ Shatter
59
+ </button>
60
+ <button class="btn" :class="{ on: fullWindow.ripples }" @click="fullWindow.ripples = !fullWindow.ripples">
61
+ Ripples
62
+ </button>
63
+ <button class="btn" :class="{ on: fullWindow.snow }" @click="fullWindow.snow = !fullWindow.snow">Snow</button>
64
+ <button class="btn" :class="{ on: fullWindow.fireflies }" @click="fullWindow.fireflies = !fullWindow.fireflies">
65
+ Fireflies
66
+ </button>
67
+ </div>
68
+ <p class="faint">
69
+ Layers over the window that take no clicks. Shatter breaks a snapshot of the window into falling shards and puts
70
+ it back, the cracks and gaps letting through what is behind the window. With ripples on, a click anywhere sends
71
+ out a ring of water that bends the window, and rings that meet interfere. Snow parts around the pointer;
72
+ fireflies drift towards it.
73
+ </p>
74
+ </Card>
75
+
76
+ <Card title="Liquid glass" api="lens · [SkBackdrop]">
77
+ <div ref="scene" class="scene" @mousemove="lensMove" @mouseup="lensUp" @mouseleave="lensUp">
78
+ <div class="blob b1" />
79
+ <div class="blob b2" />
80
+ <div class="blob b3" />
81
+ <div class="word">refraction</div>
82
+ <div class="lens" :style="{ left: `${lensX}px` }" @mousedown="lensDown">drag me</div>
83
+ </div>
84
+ <p class="faint">
85
+ Reads the backdrop at displaced coordinates: the rim bends what is behind it, red and blue by different amounts,
86
+ and catches a specular highlight.
87
+ </p>
88
+ </Card>
89
+
90
+ <Card title="Nebula" api="nebula · [SkAnimated] · transition">
91
+ <div class="nebula" :class="{ warm }" @click="warm = !warm">
92
+ <span class="hint">click to shift the palette</span>
93
+ </div>
94
+ <p class="faint">
95
+ Noise sampled at coordinates warped by more noise, redrawn every frame. A CSS transition on --shading blends the
96
+ palette while it moves.
97
+ </p>
98
+ </Card>
99
+
100
+ <Card title="Orbit" api="orbit · [SkBleed]">
101
+ <div class="row orbits">
102
+ <div class="orbit-card">card</div>
103
+ <button class="orbit-pill">Get started</button>
104
+ <div class="orbit-ring">ring</div>
105
+ </div>
106
+ <p class="faint">
107
+ Light running along the rounded border. The halo parameter grows the drawn area, so the glow spills past the
108
+ element's own box.
109
+ </p>
110
+ </Card>
111
+
112
+ <Card title="Halftone" api="halftone · backdrop per cell">
113
+ <div class="print">
114
+ <img class="photo" src="assets/media/aurora.png" alt="Aurora" />
115
+ <div class="screen" :style="{ '--shading': halftone }" />
116
+ </div>
117
+ <div class="row">
118
+ <button v-for="c in cells" :key="c" class="btn" :class="{ on: cell === c }" @click="cell = c">{{ c }}px</button>
119
+ <span class="faint">Re-screens the image under the right half as print dots.</span>
120
+ </div>
121
+ </Card>
122
+
123
+ <Card title="Burn away" api="dissolve · [SkContent] · transition">
124
+ <div class="row">
125
+ <div class="ticket" :class="{ burnt }">
126
+ <img class="ticket-photo" src="assets/media/aurora.png" alt="Aurora" />
127
+ <div class="ticket-text">
128
+ <strong>Northern lights</strong>
129
+ <span>Admit one · row 12</span>
130
+ </div>
131
+ </div>
132
+ <button class="btn" @click="burnt = !burnt">{{ burnt ? "Restore" : "Burn" }}</button>
133
+ </div>
134
+ <p class="faint">
135
+ Shades the element's own painting, image and text included. A transition on --shading moves the burning edge
136
+ across it.
137
+ </p>
138
+ </Card>
139
+
140
+ <Card title="Pond" api="pond · [SkContent] · [SkHistory] · [SkPointer]">
141
+ <div class="pond">
142
+ <img class="pond-photo" src="assets/media/aurora.png" alt="Aurora" />
143
+ <span class="pond-word">still water</span>
144
+ </div>
145
+ <p class="faint">
146
+ Drag the pointer across. The water is a wave equation the effect steps in its own state from frame to frame, and
147
+ it bends and lights the element's painting under it.
148
+ </p>
149
+ </Card>
150
+
151
+ <Card title="Colour grade" api="grade · SkTexture · url()">
152
+ <div class="print">
153
+ <img class="photo" src="assets/media/aurora.png" alt="Aurora" />
154
+ <div class="graded" :style="{ '--shading': grade }" />
155
+ </div>
156
+ <div class="row">
157
+ <button class="btn" :class="{ on: !graded }" @click="graded = false">Original</button>
158
+ <button
159
+ v-for="g in grades"
160
+ :key="g.id"
161
+ class="btn"
162
+ :class="{ on: graded && lut === g.id }"
163
+ @click="pickGrade(g.id)"
164
+ >
165
+ {{ g.label }}
166
+ </button>
167
+ </div>
168
+ <p class="faint">
169
+ The effect takes a lookup table as an image, url() in the CSS, and runs every pixel behind it through that
170
+ table. Switching tables cross-fades between the two grades.
171
+ </p>
172
+ </Card>
173
+
174
+ <Card title="Patterned glass" api="glass · sampleRepeat">
175
+ <div class="scene">
176
+ <div class="stripe s1" />
177
+ <div class="stripe s2" />
178
+ <div class="stripe s3" />
179
+ <div class="word under">texture</div>
180
+ <div class="pane" :style="{ '--shading': glass }" />
181
+ </div>
182
+ <div class="row">
183
+ <button v-for="p in patterns" :key="p.id" class="btn" :class="{ on: pattern.id === p.id }" @click="pattern = p">
184
+ {{ p.label }}
185
+ </button>
186
+ <span class="faint">A tiling normal map bends what is behind the pane.</span>
187
+ </div>
188
+ </Card>
189
+
190
+ <Card title="Spotlight" api="spotlight · [SkPointer]">
191
+ <div class="pad">
192
+ <span class="hint">move the pointer here</span>
193
+ </div>
194
+ <p class="faint">
195
+ The host hands the effect the pointer and repaints it as the pointer moves, so no script runs. The light dims as
196
+ the pointer leaves the panel.
197
+ </p>
198
+ </Card>
199
+ </Page>
200
+ </template>
201
+
202
+ <style scoped>
203
+ .scene {
204
+ position: relative;
205
+ z-index: 1;
206
+ height: 190px;
207
+ border-radius: 12px;
208
+ background: #0e0e16;
209
+ overflow: hidden;
210
+ }
211
+ @keyframes drift {
212
+ 50% {
213
+ transform: translateX(120px);
214
+ }
215
+ }
216
+ .blob {
217
+ position: absolute;
218
+ width: 120px;
219
+ height: 120px;
220
+ border-radius: 60px;
221
+ animation: drift 7s ease-in-out infinite;
222
+ }
223
+ .b1 {
224
+ left: 30px;
225
+ top: 20px;
226
+ background: #8b9dff;
227
+ }
228
+ .b2 {
229
+ left: 260px;
230
+ top: 60px;
231
+ background: #f472b6;
232
+ animation-duration: 9s;
233
+ }
234
+ .b3 {
235
+ left: 480px;
236
+ top: 10px;
237
+ background: #34d399;
238
+ animation-duration: 8s;
239
+ }
240
+ .word {
241
+ position: absolute;
242
+ left: 24px;
243
+ top: 58px;
244
+ font-size: 64px;
245
+ font-weight: 800;
246
+ color: #ffffffd9;
247
+ }
248
+ .lens {
249
+ position: absolute;
250
+ top: 30px;
251
+ width: 220px;
252
+ height: 130px;
253
+ display: flex;
254
+ align-items: flex-end;
255
+ justify-content: center;
256
+ padding-bottom: 12px;
257
+ border-radius: 36px;
258
+ font-size: 12px;
259
+ color: #ffffffb0;
260
+ cursor: grab;
261
+ --shading: lens(22px, 32px, 0.2, #ffffff0d);
262
+ }
263
+
264
+ .nebula {
265
+ height: 190px;
266
+ display: flex;
267
+ align-items: flex-end;
268
+ padding: 14px;
269
+ border-radius: 12px;
270
+ cursor: pointer;
271
+ --shading: nebula(0.1, 1.3, 0, #ffe6c7);
272
+ transition: --shading 1600ms ease;
273
+ }
274
+ .nebula.warm {
275
+ --shading: nebula(0.1, 1.3, 0.45, #fff1d6);
276
+ }
277
+
278
+ .orbits {
279
+ gap: 40px;
280
+ padding: 24px 28px;
281
+ }
282
+ .orbit-card {
283
+ width: 220px;
284
+ height: 110px;
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: center;
288
+ border-radius: 16px;
289
+ background: #ffffff05;
290
+ font-size: 13px;
291
+ color: var(--text-muted);
292
+ --shading: orbit(0.3, 2px, 24px, 0.4, #7fd4ff);
293
+ }
294
+ .orbit-pill {
295
+ height: 44px;
296
+ padding: 0 26px;
297
+ border: none;
298
+ border-radius: 22px;
299
+ background: #ffffff08;
300
+ font-size: 14px;
301
+ font-weight: 600;
302
+ color: var(--text);
303
+ --shading: orbit(0.55, 1.5px, 16px, 0.3, #ff8ad4);
304
+ }
305
+ .orbit-ring {
306
+ width: 96px;
307
+ height: 96px;
308
+ display: flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ border-radius: 48px;
312
+ font-size: 12px;
313
+ color: var(--text-faint);
314
+ --shading: orbit(0.9, 3px, 28px, 0.25, #fbbf24);
315
+ }
316
+
317
+ .print {
318
+ position: relative;
319
+ z-index: 1;
320
+ height: 220px;
321
+ border-radius: 12px;
322
+ overflow: hidden;
323
+ }
324
+ .photo {
325
+ width: 100%;
326
+ height: 220px;
327
+ object-fit: cover;
328
+ }
329
+ .screen {
330
+ position: absolute;
331
+ top: 0;
332
+ right: 0;
333
+ bottom: 0;
334
+ width: 50%;
335
+ }
336
+
337
+ .ticket {
338
+ display: flex;
339
+ width: 360px;
340
+ height: 120px;
341
+ border-radius: 14px;
342
+ background: #1b1b28;
343
+ overflow: hidden;
344
+ --shading: dissolve(0, 46px);
345
+ transition: --shading 1800ms ease-in;
346
+ }
347
+ .ticket.burnt {
348
+ --shading: dissolve(1, 46px);
349
+ transition-timing-function: ease-out;
350
+ }
351
+ .ticket-photo {
352
+ width: 120px;
353
+ height: 120px;
354
+ object-fit: cover;
355
+ }
356
+ .ticket-text {
357
+ display: flex;
358
+ flex-direction: column;
359
+ justify-content: center;
360
+ gap: 6px;
361
+ padding: 0 20px;
362
+ font-size: 13px;
363
+ color: var(--text-muted);
364
+ }
365
+ .ticket-text strong {
366
+ font-size: 18px;
367
+ color: var(--text);
368
+ }
369
+
370
+ .pond {
371
+ position: relative;
372
+ height: 220px;
373
+ border-radius: 12px;
374
+ overflow: hidden;
375
+ --shading: pond(0.985, 40px);
376
+ }
377
+ .pond-photo {
378
+ width: 100%;
379
+ height: 220px;
380
+ object-fit: cover;
381
+ }
382
+ .pond-word {
383
+ position: absolute;
384
+ left: 24px;
385
+ bottom: 18px;
386
+ font-size: 44px;
387
+ font-weight: 800;
388
+ color: #ffffffe0;
389
+ }
390
+
391
+ .graded {
392
+ position: absolute;
393
+ top: 0;
394
+ right: 0;
395
+ bottom: 0;
396
+ left: 0;
397
+ transition: --shading 700ms ease;
398
+ }
399
+
400
+ .stripe {
401
+ position: absolute;
402
+ top: 0;
403
+ bottom: 0;
404
+ width: 70px;
405
+ }
406
+ .s1 {
407
+ left: 60px;
408
+ background: #8b9dff;
409
+ }
410
+ .s2 {
411
+ left: 220px;
412
+ background: #f472b6;
413
+ }
414
+ .s3 {
415
+ left: 380px;
416
+ background: #fbbf24;
417
+ }
418
+ .word.under {
419
+ left: 180px;
420
+ }
421
+ .pane {
422
+ position: absolute;
423
+ top: 0;
424
+ right: 0;
425
+ bottom: 0;
426
+ width: 55%;
427
+ border-left: 1px solid #ffffff1f;
428
+ }
429
+
430
+ .pad {
431
+ height: 200px;
432
+ display: flex;
433
+ align-items: flex-end;
434
+ padding: 14px;
435
+ border-radius: 12px;
436
+ background: #0e0e16;
437
+ --shading: spotlight(150px, 1, #8b9dff);
438
+ }
439
+ .hint {
440
+ font-size: 12px;
441
+ color: #ffffff8c;
442
+ }
443
+ </style>
@@ -35,8 +35,12 @@ const hot = ref(false);
35
35
  <div class="swatch frost">frost</div>
36
36
  <div class="swatch noise">noise</div>
37
37
  <div class="swatch glow" :class="{ hot }" @click="hot = !hot">glow · click</div>
38
+ <div class="swatch sheen">sheen</div>
38
39
  </div>
39
- <p class="faint">Skathi's own effects, in a custom property that a browser simply ignores.</p>
40
+ <p class="faint">
41
+ Skathi's own effects, in a custom property that a browser simply ignores. sheen is this app's, from
42
+ shaders/sheen.slang.
43
+ </p>
40
44
  </Card>
41
45
 
42
46
  <Card title="Layout" api="grid · ::before · :hover">
@@ -156,6 +160,10 @@ const hot = ref(false);
156
160
  .glow.hot {
157
161
  --shading: glow(#ff2d95, 30px, 1);
158
162
  }
163
+ .sheen {
164
+ background: linear-gradient(135deg, #3b3f9e, #8b5cf6);
165
+ --shading: sheen(0.5, #ffffffcc);
166
+ }
159
167
  .grid {
160
168
  display: grid;
161
169
  grid-template-columns: 1fr 1fr 1fr;