@cosmicdrift/kumiko-renderer-web 0.233.0 → 0.235.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.
package/src/styles.css CHANGED
@@ -38,14 +38,15 @@
38
38
  @custom-variant dark (&:where(.dark, .dark *));
39
39
 
40
40
  @theme {
41
- /* Dark-Mode (Default) — shadcn-Preset Rhea"/Neutral (hue 0, reines Grau —
42
- kein zinc-Blaustich). background == card; Cards trennen über Border +
43
- Shadow. Primary near-white, Apps überschreiben mit ihrer Brand. */
41
+ /* Dark-Mode (Default) — shadcn preset "Rhea"/Neutral (hue 0, pure gray,
42
+ no zinc blue tint). Card is raised above background (8% vs. 3.9%) so it
43
+ separates by surface color, not just border + shadow. Primary
44
+ near-white, apps override with their own brand. */
44
45
  --color-background: hsl(0 0% 3.9%);
45
46
  --color-foreground: hsl(0 0% 98%);
46
- --color-card: hsl(0 0% 3.9%);
47
+ --color-card: hsl(0 0% 8%);
47
48
  --color-card-foreground: hsl(0 0% 98%);
48
- --color-popover: hsl(0 0% 3.9%);
49
+ --color-popover: hsl(0 0% 9%);
49
50
  --color-popover-foreground: hsl(0 0% 98%);
50
51
  --color-primary: hsl(0 0% 98%);
51
52
  --color-primary-foreground: hsl(0 0% 9%);
@@ -107,10 +108,12 @@
107
108
  auf light, greifen diese Werte. */
108
109
  @layer base {
109
110
  :root:not(.dark) {
110
- /* Light-Mode — Neutral (hue 0, reines Grau). Weißes Background, Cards ==
111
- weiß, trennen über Border + Shadow. Primary near-black; Apps überschreiben
112
- mit Brand. Werte = shadcn-Preset (aus dem Live-Preview verifiziert). */
113
- --color-background: hsl(0 0% 100%);
111
+ /* Light-Mode — Neutral (hue 0, pure gray). Background is tinted slightly
112
+ (96.5%), card stays pure white card lifts off the page instead of
113
+ blending into it. Border + shadow remain additional cues. Primary
114
+ near-black; apps override with brand. Values = shadcn preset, adapted
115
+ to this hue-0 elevation scheme. */
116
+ --color-background: hsl(0 0% 96.5%);
114
117
  --color-foreground: hsl(0 0% 3.9%);
115
118
  --color-card: hsl(0 0% 100%);
116
119
  --color-card-foreground: hsl(0 0% 3.9%);
@@ -118,11 +121,11 @@
118
121
  --color-popover-foreground: hsl(0 0% 3.9%);
119
122
  --color-primary: hsl(0 0% 9%);
120
123
  --color-primary-foreground: hsl(0 0% 98%);
121
- --color-secondary: hsl(0 0% 96.1%);
124
+ --color-secondary: hsl(0 0% 94%);
122
125
  --color-secondary-foreground: hsl(0 0% 9%);
123
- --color-muted: hsl(0 0% 96.1%);
124
- --color-muted-foreground: hsl(0 0% 45.1%);
125
- --color-accent: hsl(0 0% 96.1%);
126
+ --color-muted: hsl(0 0% 94%);
127
+ --color-muted-foreground: hsl(0 0% 42%);
128
+ --color-accent: hsl(0 0% 94%);
126
129
  --color-accent-foreground: hsl(0 0% 9%);
127
130
  --color-destructive: hsl(0 84.2% 60.2%);
128
131
  --color-destructive-foreground: hsl(0 0% 98%);
@@ -130,10 +133,11 @@
130
133
  --color-input: hsl(0 0% 89.8%);
131
134
  --color-ring: hsl(0 0% 63%);
132
135
 
133
- /* Sidebar-Familie Light (Neutral) = shadcn-Werte: Rail 98%, aktiv 96.1%,
134
- Border 89.8%. Inset-Panel (100%) schwebt via Shadow + Rounded auf dem
135
- Rail; der Kontrast ist bewusst subtil (wie im Original). */
136
- --color-sidebar: hsl(0 0% 98%);
136
+ /* Sidebar family light (neutral): rail 98.5% (clearly between background
137
+ 96.5% and card 100%, otherwise the tinted page would swallow the
138
+ rail), active 96.1%, border 89.8%. Inset panel (100%) floats via
139
+ shadow + rounded on the rail. */
140
+ --color-sidebar: hsl(0 0% 98.5%);
137
141
  --color-sidebar-foreground: hsl(0 0% 26.1%);
138
142
  --color-sidebar-primary: hsl(0 0% 9%);
139
143
  --color-sidebar-primary-foreground: hsl(0 0% 98%);
@@ -0,0 +1,35 @@
1
+ // @ts-nocheck — vendored shadcn, regenerate via scripts/sync-shadcn.ts
2
+ "use client"
3
+
4
+ import * as React from "react"
5
+ import { cn } from "../lib/cn"
6
+ import { Switch as SwitchPrimitive } from "radix-ui"
7
+
8
+ function Switch({
9
+ className,
10
+ size = "default",
11
+ ...props
12
+ }: React.ComponentProps<typeof SwitchPrimitive.Root> & {
13
+ size?: "sm" | "default"
14
+ }) {
15
+ return (
16
+ <SwitchPrimitive.Root
17
+ data-slot="switch"
18
+ data-size={size}
19
+ className={cn(
20
+ "peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
21
+ className
22
+ )}
23
+ {...props}
24
+ >
25
+ <SwitchPrimitive.Thumb
26
+ data-slot="switch-thumb"
27
+ className={cn(
28
+ "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"
29
+ )}
30
+ />
31
+ </SwitchPrimitive.Root>
32
+ )
33
+ }
34
+
35
+ export { Switch }