@dexhq/canvas 0.13.0 → 0.14.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 (159) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +16 -15
  3. package/app/canvas/frame-node.tsx +34 -17
  4. package/app/canvas/tool-cursors.ts +16 -16
  5. package/app/i18n/locales/en/messages.po +26 -4
  6. package/app/i18n/locales/en/messages.ts +1 -1
  7. package/app/i18n/locales/pseudo/messages.po +26 -4
  8. package/app/i18n/locales/pseudo/messages.ts +1 -1
  9. package/app/icons/{sets/lucide.tsx → glyphs.tsx} +3 -5
  10. package/app/icons/index.tsx +3 -3
  11. package/app/icons/types.ts +3 -10
  12. package/app/index.html +3 -3
  13. package/app/pages/canvas-settings.tsx +35 -0
  14. package/app/shell/about.tsx +5 -4
  15. package/app/shell/feedback-details.ts +0 -3
  16. package/app/shell/instructions-editor.tsx +1 -1
  17. package/app/shell/presence-style.ts +59 -0
  18. package/app/shell/presence.tsx +6 -3
  19. package/app/shell/settings-sections.ts +12 -0
  20. package/app/shell/sidebar.tsx +1 -1
  21. package/app/studio-ui.d.ts +0 -9
  22. package/app/ui/prompt-editor.tsx +1 -1
  23. package/dist/cli/commands/create.d.mts +26 -14
  24. package/dist/cli/commands/create.mjs +13 -7
  25. package/dist/cli/commands/dev.mjs +2 -3
  26. package/dist/cli/commands/init.d.mts +11 -6
  27. package/dist/cli/help.d.mts +1 -1
  28. package/dist/cli/help.mjs +3 -3
  29. package/dist/cli/main.d.mts +22 -12
  30. package/dist/config/index.d.mts +6 -5
  31. package/dist/config/project-files.d.mts +0 -3
  32. package/dist/config/project-files.mjs +0 -3
  33. package/dist/config/schema.d.mts +0 -5
  34. package/dist/config/schema.mjs +0 -5
  35. package/dist/content/content.mjs +0 -3
  36. package/dist/content/snapshot-client.mjs +1 -1
  37. package/dist/paste/paste.mjs +1 -1
  38. package/dist/server/brief.mjs +3 -3
  39. package/dist/server/channel.d.mts +6 -0
  40. package/dist/server/channel.mjs +16 -1
  41. package/dist/server/claimed-presence.d.mts +17 -0
  42. package/dist/server/claimed-presence.mjs +50 -0
  43. package/dist/server/dev-server.mjs +9 -0
  44. package/dist/server/file-errors.d.mts +7 -2
  45. package/dist/server/file-errors.mjs +31 -8
  46. package/dist/server/requests.mjs +1 -1
  47. package/dist/server/studio-for.mjs +1 -1
  48. package/dist/server/vite.mjs +26 -29
  49. package/dist/server/web-app.mjs +3 -3
  50. package/dist/setup/apply.mjs +8 -14
  51. package/dist/setup/create.mjs +51 -19
  52. package/dist/setup/desktop-app.mjs +1 -1
  53. package/dist/setup/detect.d.mts +14 -5
  54. package/dist/setup/detect.mjs +56 -8
  55. package/dist/setup/doctor.mjs +1 -3
  56. package/dist/setup/existing-setup.d.mts +1 -3
  57. package/dist/setup/existing-setup.mjs +10 -11
  58. package/dist/setup/own-app.d.mts +1 -2
  59. package/dist/setup/own-app.mjs +4 -5
  60. package/dist/setup/plan.d.mts +8 -6
  61. package/dist/setup/plan.mjs +64 -48
  62. package/dist/setup/project.d.mts +0 -16
  63. package/dist/setup/project.mjs +8 -52
  64. package/dist/setup/prompts.d.mts +5 -5
  65. package/dist/setup/prompts.mjs +28 -61
  66. package/dist/setup/questions.d.mts +12 -4
  67. package/dist/setup/questions.mjs +10 -25
  68. package/dist/setup/starters.mjs +19 -8
  69. package/dist/setup/workspace-setup.d.mts +1 -2
  70. package/dist/setup/workspace-setup.mjs +4 -6
  71. package/dist/setup/write.d.mts +15 -5
  72. package/dist/setup/write.mjs +35 -9
  73. package/dist/shared/server-page.mjs +6 -0
  74. package/extension/dist/feedback.js +1 -1
  75. package/extension/dist/manifest.json +1 -1
  76. package/package.json +2 -19
  77. package/src/cli/commands/create.ts +17 -9
  78. package/src/cli/commands/dev.ts +0 -3
  79. package/src/cli/help.ts +3 -3
  80. package/src/config/index.ts +6 -5
  81. package/src/config/project-files.ts +0 -5
  82. package/src/config/schema.ts +0 -1
  83. package/src/content/content.ts +0 -3
  84. package/src/content/snapshot-client.ts +1 -1
  85. package/src/server/brief.ts +8 -3
  86. package/src/server/channel.ts +27 -0
  87. package/src/server/claimed-presence.ts +77 -0
  88. package/src/server/dev-server.ts +13 -0
  89. package/src/server/file-errors.ts +47 -13
  90. package/src/server/studio-for.ts +1 -1
  91. package/src/server/vite.ts +37 -40
  92. package/src/server/web-app.ts +3 -3
  93. package/src/setup/apply.ts +10 -16
  94. package/src/setup/create.ts +52 -20
  95. package/src/setup/desktop-app.ts +1 -1
  96. package/src/setup/detect.ts +56 -10
  97. package/src/setup/doctor.ts +4 -4
  98. package/src/setup/existing-setup.ts +10 -12
  99. package/src/setup/own-app.ts +2 -5
  100. package/src/setup/plan.ts +93 -84
  101. package/src/setup/project.ts +16 -110
  102. package/src/setup/prompts.ts +44 -127
  103. package/src/setup/questions.ts +27 -29
  104. package/src/setup/starters.ts +27 -9
  105. package/src/setup/workspace-setup.ts +8 -18
  106. package/src/setup/write.ts +52 -9
  107. package/src/shared/server-page.ts +9 -0
  108. package/templates/methods/review.md +2 -2
  109. package/templates/rules/canvas-frames.md +104 -0
  110. package/templates/rules/canvas.md +8 -142
  111. package/templates/rules/prototypes.md +1 -1
  112. package/templates/rules/snapshots.md +52 -0
  113. package/templates/starters/standalone/README.md +7 -7
  114. package/templates/starters/standalone/components.json +1 -1
  115. package/templates/starters/standalone/package.json +1 -2
  116. package/templates/starters/turborepo/README.md +6 -6
  117. package/templates/starters/turborepo/apps/web/components.json +1 -1
  118. package/templates/starters/turborepo/apps/web/package.json +1 -2
  119. package/templates/starters/turborepo/apps/web/src/app.tsx +4 -5
  120. package/templates/starters/turborepo/packages/ui/components.json +1 -1
  121. package/templates/starters/turborepo/packages/ui/package.json +1 -2
  122. package/templates/starters/vite/README.md +7 -6
  123. package/templates/starters/vite/components.json +1 -1
  124. package/templates/starters/vite/package.json +1 -2
  125. package/templates/starters/vite/src/app.tsx +3 -4
  126. package/templates/starters/vite/src/components/ui/accordion.tsx +71 -0
  127. package/templates/starters/vite/src/components/ui/attachment.tsx +1 -1
  128. package/templates/starters/vite/src/components/ui/badge.tsx +2 -2
  129. package/templates/starters/vite/src/components/ui/button.tsx +17 -12
  130. package/templates/starters/vite/src/components/ui/card.tsx +1 -1
  131. package/templates/starters/vite/src/components/ui/checkbox.tsx +28 -0
  132. package/templates/starters/vite/src/components/ui/dialog.tsx +5 -5
  133. package/templates/starters/vite/src/components/ui/dropdown-menu.tsx +17 -14
  134. package/templates/starters/vite/src/components/ui/field.tsx +3 -1
  135. package/templates/starters/vite/src/components/ui/input-group.tsx +5 -3
  136. package/templates/starters/vite/src/components/ui/input.tsx +1 -1
  137. package/templates/starters/vite/src/components/ui/label.tsx +2 -0
  138. package/templates/starters/vite/src/components/ui/native-select.tsx +3 -4
  139. package/templates/starters/vite/src/components/ui/popover.tsx +1 -1
  140. package/templates/starters/vite/src/components/ui/separator.tsx +2 -0
  141. package/templates/starters/vite/src/components/ui/spinner.tsx +3 -7
  142. package/templates/starters/vite/src/components/ui/switch.tsx +1 -1
  143. package/templates/starters/vite/src/components/ui/textarea.tsx +1 -1
  144. package/templates/starters/vite/src/components/ui/toggle.tsx +4 -2
  145. package/templates/starters/vite/src/index.css +533 -111
  146. package/app/icons/sets/hugeicons.tsx +0 -259
  147. package/app/icons/sets/phosphor.tsx +0 -251
  148. package/dist/server/icon-set.d.mts +0 -15
  149. package/dist/server/icon-set.mjs +0 -31
  150. package/dist/shared/icon-sets.d.mts +0 -9
  151. package/dist/shared/icon-sets.mjs +0 -21
  152. package/src/server/icon-set.ts +0 -56
  153. package/src/shared/icon-sets.ts +0 -23
  154. /package/app/public/{sudio-192.png → dex-192.png} +0 -0
  155. /package/app/public/{sudio-512.png → dex-512.png} +0 -0
  156. /package/app/public/{apple-touch-icon.png → dex-apple-touch-icon.png} +0 -0
  157. /package/app/public/{favicon-32.png → dex-icon-32.png} +0 -0
  158. /package/app/public/{favicon.svg → dex-icon.svg} +0 -0
  159. /package/app/public/{sudio-maskable-512.png → dex-maskable-512.png} +0 -0
@@ -1,130 +1,552 @@
1
+ /*
2
+ * The look of Dex's own interface: shadcn's stock theme (base colour neutral)
3
+ * in Inter, its house rules (round, flat controls, a visible focus outline,
4
+ * buttons that give when pressed) and type styles. It's yours now: change
5
+ * the tokens to make it your product's.
6
+ */
7
+
1
8
  @import "tailwindcss";
2
9
  @import "tw-animate-css";
3
10
  @import "shadcn/tailwind.css";
11
+
4
12
  @import "@fontsource-variable/inter";
5
13
 
6
14
  @custom-variant dark (&:is(.dark *));
7
15
 
8
16
  @theme inline {
9
- --font-heading: var(--font-sans);
10
- --font-sans: "Inter Variable", sans-serif;
11
- --color-sidebar-ring: var(--sidebar-ring);
12
- --color-sidebar-border: var(--sidebar-border);
13
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
14
- --color-sidebar-accent: var(--sidebar-accent);
15
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
16
- --color-sidebar-primary: var(--sidebar-primary);
17
- --color-sidebar-foreground: var(--sidebar-foreground);
18
- --color-sidebar: var(--sidebar);
19
- --color-chart-5: var(--chart-5);
20
- --color-chart-4: var(--chart-4);
21
- --color-chart-3: var(--chart-3);
22
- --color-chart-2: var(--chart-2);
23
- --color-chart-1: var(--chart-1);
24
- --color-ring: var(--ring);
25
- --color-input: var(--input);
26
- --color-border: var(--border);
27
- --color-destructive: var(--destructive);
28
- --color-accent-foreground: var(--accent-foreground);
29
- --color-accent: var(--accent);
30
- --color-muted-foreground: var(--muted-foreground);
31
- --color-muted: var(--muted);
32
- --color-secondary-foreground: var(--secondary-foreground);
33
- --color-secondary: var(--secondary);
34
- --color-primary-foreground: var(--primary-foreground);
35
- --color-primary: var(--primary);
36
- --color-popover-foreground: var(--popover-foreground);
37
- --color-popover: var(--popover);
38
- --color-card-foreground: var(--card-foreground);
39
- --color-card: var(--card);
40
- --color-foreground: var(--foreground);
41
17
  --color-background: var(--background);
42
- --radius-sm: calc(var(--radius) * 0.6);
43
- --radius-md: calc(var(--radius) * 0.8);
18
+ --color-foreground: var(--foreground);
19
+ --color-card: var(--card);
20
+ --color-card-foreground: var(--card-foreground);
21
+ --color-popover: var(--popover);
22
+ --color-popover-foreground: var(--popover-foreground);
23
+ --color-primary: var(--primary);
24
+ --color-primary-foreground: var(--primary-foreground);
25
+ --color-secondary: var(--secondary);
26
+ --color-secondary-foreground: var(--secondary-foreground);
27
+ --color-muted: var(--muted);
28
+ --color-muted-foreground: var(--muted-foreground);
29
+ --color-accent: var(--accent);
30
+ --color-accent-foreground: var(--accent-foreground);
31
+ --color-destructive: var(--destructive);
32
+ --color-border: var(--border);
33
+ --color-input: var(--input);
34
+ --color-ring: var(--ring);
35
+ --color-chart-1: var(--chart-1);
36
+ --color-chart-2: var(--chart-2);
37
+ --color-chart-3: var(--chart-3);
38
+ --color-chart-4: var(--chart-4);
39
+ --color-chart-5: var(--chart-5);
40
+ --color-sidebar: var(--sidebar);
41
+ --color-sidebar-foreground: var(--sidebar-foreground);
42
+ --color-sidebar-primary: var(--sidebar-primary);
43
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
44
+ --color-sidebar-accent: var(--sidebar-accent);
45
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
46
+ --color-sidebar-border: var(--sidebar-border);
47
+ --color-sidebar-ring: var(--sidebar-ring);
48
+ --radius-sm: calc(var(--radius) - 0.25rem);
49
+ --radius-md: calc(var(--radius) - 0.125rem);
44
50
  --radius-lg: var(--radius);
45
- --radius-xl: calc(var(--radius) * 1.4);
46
- --radius-2xl: calc(var(--radius) * 1.8);
47
- --radius-3xl: calc(var(--radius) * 2.2);
48
- --radius-4xl: calc(var(--radius) * 2.6);
49
- }
50
-
51
- :root {
52
- --background: oklch(1 0 0);
53
- --foreground: oklch(0.145 0 0);
54
- --card: oklch(1 0 0);
55
- --card-foreground: oklch(0.145 0 0);
56
- --popover: oklch(1 0 0);
57
- --popover-foreground: oklch(0.145 0 0);
58
- --primary: oklch(0.205 0 0);
59
- --primary-foreground: oklch(0.985 0 0);
60
- --secondary: oklch(0.97 0 0);
61
- --secondary-foreground: oklch(0.205 0 0);
62
- --muted: oklch(0.97 0 0);
63
- --muted-foreground: oklch(0.556 0 0);
64
- --accent: oklch(0.97 0 0);
65
- --accent-foreground: oklch(0.205 0 0);
66
- --destructive: oklch(0.577 0.245 27.325);
67
- --border: oklch(0.922 0 0);
68
- --input: oklch(0.922 0 0);
69
- --ring: oklch(0.708 0 0);
70
- --chart-1: oklch(0.87 0 0);
71
- --chart-2: oklch(0.556 0 0);
72
- --chart-3: oklch(0.439 0 0);
73
- --chart-4: oklch(0.371 0 0);
74
- --chart-5: oklch(0.269 0 0);
75
- --radius: 0.625rem;
76
- --sidebar: oklch(0.985 0 0);
77
- --sidebar-foreground: oklch(0.145 0 0);
78
- --sidebar-primary: oklch(0.205 0 0);
79
- --sidebar-primary-foreground: oklch(0.985 0 0);
80
- --sidebar-accent: oklch(0.97 0 0);
81
- --sidebar-accent-foreground: oklch(0.205 0 0);
82
- --sidebar-border: oklch(0.922 0 0);
83
- --sidebar-ring: oklch(0.708 0 0);
84
- }
85
-
86
- .dark {
87
- --background: oklch(0.145 0 0);
88
- --foreground: oklch(0.985 0 0);
89
- --card: oklch(0.205 0 0);
90
- --card-foreground: oklch(0.985 0 0);
91
- --popover: oklch(0.205 0 0);
92
- --popover-foreground: oklch(0.985 0 0);
93
- --primary: oklch(0.922 0 0);
94
- --primary-foreground: oklch(0.205 0 0);
95
- --secondary: oklch(0.269 0 0);
96
- --secondary-foreground: oklch(0.985 0 0);
97
- --muted: oklch(0.269 0 0);
98
- --muted-foreground: oklch(0.708 0 0);
99
- --accent: oklch(0.269 0 0);
100
- --accent-foreground: oklch(0.985 0 0);
101
- --destructive: oklch(0.704 0.191 22.216);
102
- --border: oklch(1 0 0 / 10%);
103
- --input: oklch(1 0 0 / 15%);
104
- --ring: oklch(0.556 0 0);
105
- --chart-1: oklch(0.87 0 0);
106
- --chart-2: oklch(0.556 0 0);
107
- --chart-3: oklch(0.439 0 0);
108
- --chart-4: oklch(0.371 0 0);
109
- --chart-5: oklch(0.269 0 0);
110
- --sidebar: oklch(0.205 0 0);
111
- --sidebar-foreground: oklch(0.985 0 0);
112
- --sidebar-primary: oklch(0.488 0.243 264.376);
113
- --sidebar-primary-foreground: oklch(0.985 0 0);
114
- --sidebar-accent: oklch(0.269 0 0);
115
- --sidebar-accent-foreground: oklch(0.985 0 0);
116
- --sidebar-border: oklch(1 0 0 / 10%);
117
- --sidebar-ring: oklch(0.556 0 0);
51
+ --radius-xl: calc(var(--radius) + 0.25rem);
52
+ --radius-2xl: calc(var(--radius) + 0.5rem);
53
+ --font-sans: var(--font-sans);
54
+ --font-heading: var(--font-sans);
55
+ --font-serif: var(--font-serif);
56
+ --font-mono: var(--font-mono);
57
+
58
+ /* The studio's house rules (below): the hover fill, quiet words, the
59
+ focus outline, and inks. */
60
+ --color-studio-hover: var(--studio-hover);
61
+ --color-studio-quiet: var(--studio-quiet);
62
+ --color-studio-focus: var(--studio-focus);
63
+ --color-studio-success: var(--studio-success);
64
+ --color-studio-warning: var(--studio-warning);
65
+ --color-studio-success-ink: var(--studio-success-ink);
66
+ --color-studio-warning-ink: var(--studio-warning-ink);
67
+ --color-studio-destructive-ink: var(--studio-destructive-ink);
68
+ --ease-studio-arrive: cubic-bezier(0.22, 1, 0.36, 1);
69
+
70
+ --text-xs: var(--font-size-xs);
71
+ --text-xs--line-height: var(--line-height-tight);
72
+ --text-sm: var(--font-size-sm);
73
+ --text-sm--line-height: var(--line-height-tight);
74
+ --text-base: var(--font-size-base);
75
+ --text-base--line-height: var(--line-height-normal);
76
+ --text-lg: var(--font-size-lg);
77
+ --text-lg--line-height: var(--line-height-normal);
78
+ --text-xl: var(--font-size-xl);
79
+ --text-xl--line-height: var(--line-height-snug);
80
+ --text-2xl: var(--font-size-2xl);
81
+ --text-2xl--line-height: var(--line-height-snug);
82
+ --text-3xl: var(--font-size-3xl);
83
+ --text-3xl--line-height: var(--line-height-heading);
84
+ --text-4xl: var(--font-size-4xl);
85
+ --text-4xl--line-height: var(--line-height-heading);
86
+ --text-5xl: var(--font-size-5xl);
87
+ --text-5xl--line-height: var(--line-height-display);
88
+ --text-6xl: var(--font-size-6xl);
89
+ --text-6xl--line-height: var(--line-height-display);
90
+ --text-8xl: var(--font-size-8xl);
91
+ --text-8xl--line-height: var(--line-height-display);
92
+
93
+ --tracking-normal: var(--letter-spacing-normal);
94
+ --tracking-tight: var(--letter-spacing-h3);
95
+ --tracking-tighter: var(--letter-spacing-display);
96
+ }
97
+
98
+ @layer base {
99
+ :root {
100
+ /* @token color: Page background */
101
+ --background: oklch(1 0 0);
102
+ /* @token color: Body text, headings */
103
+ --foreground: oklch(0.145 0 0);
104
+
105
+ /* @token color: Card surface */
106
+ --card: oklch(1 0 0);
107
+ /* @token color: Text on card */
108
+ --card-foreground: oklch(0.145 0 0);
109
+
110
+ /* @token color: Popover / dropdown background */
111
+ --popover: oklch(1 0 0);
112
+ /* @token color: Text on popover */
113
+ --popover-foreground: oklch(0.145 0 0);
114
+
115
+ /* @token color: Brand colour — the single interaction colour for CTAs, links and active states */
116
+ --primary: oklch(0.205 0 0);
117
+ /* @token color: Text on primary */
118
+ --primary-foreground: oklch(0.985 0 0);
119
+
120
+ /* @token color: Secondary surfaces / buttons */
121
+ --secondary: oklch(0.97 0 0);
122
+ /* @token color: Text on secondary */
123
+ --secondary-foreground: oklch(0.205 0 0);
124
+
125
+ /* @token color: Disabled, table striping, skeleton loaders */
126
+ --muted: oklch(0.97 0 0);
127
+ /* @token color: Secondary text, metadata — WCAG-compliant contrast (~7:1 on --background) */
128
+ --muted-foreground: oklch(0.556 0 0);
129
+
130
+ /* @token color: Hover state for ghost buttons */
131
+ --accent: oklch(0.97 0 0);
132
+ /* @token color: Text on accent — matches --foreground exactly (locked together, not independently tunable). */
133
+ --accent-foreground: oklch(0.205 0 0);
134
+
135
+ /* @token color: Destructive and irreversible actions; errors */
136
+ --destructive: oklch(0.577 0.245 27.325);
137
+
138
+ /* @token color: Component borders */
139
+ --border: oklch(0.922 0 0);
140
+ /* @token color: Input borders */
141
+ --input: oklch(0.922 0 0);
142
+ /* @token color: Focus ring */
143
+ --ring: oklch(0.708 0 0);
144
+
145
+ /* @token color: Chart series 1 */
146
+ --chart-1: oklch(0.646 0.222 41.116);
147
+ /* @token color: Chart series 2 */
148
+ --chart-2: oklch(0.6 0.118 184.704);
149
+ /* @token color: Chart series 3 */
150
+ --chart-3: oklch(0.398 0.07 227.392);
151
+ /* @token color: Chart series 4 */
152
+ --chart-4: oklch(0.828 0.189 84.429);
153
+ /* @token color: Chart series 5 */
154
+ --chart-5: oklch(0.769 0.188 70.08);
155
+
156
+ /* @token color: Sidebar background */
157
+ --sidebar: oklch(0.985 0 0);
158
+ /* @token color: Sidebar text */
159
+ --sidebar-foreground: oklch(0.145 0 0);
160
+ /* @token color: Sidebar active / primary accent — kept aligned with --primary */
161
+ --sidebar-primary: oklch(0.205 0 0);
162
+ /* @token color: Text on sidebar-primary */
163
+ --sidebar-primary-foreground: oklch(0.985 0 0);
164
+ /* @token color: Sidebar hover / accent */
165
+ --sidebar-accent: oklch(0.97 0 0);
166
+ /* @token color: Text on sidebar-accent */
167
+ --sidebar-accent-foreground: oklch(0.205 0 0);
168
+ /* @token color: Sidebar internal borders */
169
+ --sidebar-border: oklch(0.922 0 0);
170
+ /* @token color: Sidebar focus ring */
171
+ --sidebar-ring: oklch(0.708 0 0);
172
+
173
+ /* @token radius: Base corner radius — sm/md/lg/xl/2xl are derived via calc() in @theme */
174
+ --radius: 0.75rem;
175
+
176
+ /* @token font-family: Default sans-serif stack */
177
+ --font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
178
+ /* @token font-family: Serif stack — reserved for a brand serif */
179
+ --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
180
+ /* @token font-family: Monospace stack for code */
181
+ --font-mono:
182
+ ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
183
+
184
+ /* Font weights — reference values for Inter variable. */
185
+ /* @token font-weight: Body text, default */
186
+ --font-weight-normal: 400;
187
+ /* @token font-weight: Medium emphasis */
188
+ --font-weight-medium: 500;
189
+ /* @token font-weight: Semibold — headings 4, ui labels */
190
+ --font-weight-semibold: 600;
191
+ /* @token font-weight: Bold */
192
+ --font-weight-bold: 700;
193
+
194
+ /* Font sizes — the type scale. Consumed via Tailwind's `text-<size>`
195
+ utility because @theme inline binds `--text-*` to these below. */
196
+ /* @token font-size: 12px — captions, muted labels */
197
+ --font-size-xs: 0.75rem;
198
+ /* @token font-size: 14px — small body, table cells */
199
+ --font-size-sm: 0.875rem;
200
+ /* @token font-size: 16px — body base */
201
+ --font-size-base: 1rem;
202
+ /* @token font-size: 18px — large body, lead paragraphs */
203
+ --font-size-lg: 1.125rem;
204
+ /* @token font-size: 20px — h4 */
205
+ --font-size-xl: 1.25rem;
206
+ /* @token font-size: 24px — h3 */
207
+ --font-size-2xl: 1.5rem;
208
+ /* @token font-size: 30px — h2 */
209
+ --font-size-3xl: 1.875rem;
210
+ /* @token font-size: 36px — h1 */
211
+ --font-size-4xl: 2.25rem;
212
+ /* @token font-size: 48px — display small */
213
+ --font-size-5xl: 3rem;
214
+ /* @token font-size: 60px — display medium */
215
+ --font-size-6xl: 3.75rem;
216
+ /* @token font-size: 96px — display large */
217
+ --font-size-8xl: 6rem;
218
+
219
+ /* Line heights — paired with corresponding font sizes. Ratios chosen
220
+ for readable body vs tighter headings. */
221
+ /* @token line-height: For xs/sm text */
222
+ --line-height-tight: 1.25;
223
+ /* @token line-height: For body text (base/lg) */
224
+ --line-height-normal: 1.5;
225
+ /* @token line-height: For sub-headings (xl/2xl) */
226
+ --line-height-snug: 1.375;
227
+ /* @token line-height: For large headings (3xl+) */
228
+ --line-height-heading: 1.2;
229
+ /* @token line-height: For display sizes (5xl+) */
230
+ --line-height-display: 1.167;
231
+
232
+ /* Letter spacing — negative for large headings for optical correction. */
233
+ /* @token letter-spacing: h4 and body — no adjustment */
234
+ --letter-spacing-normal: 0em;
235
+ /* @token letter-spacing: h3 */
236
+ --letter-spacing-h3: -0.025em;
237
+ /* @token letter-spacing: h2 */
238
+ --letter-spacing-h2: -0.02em;
239
+ /* @token letter-spacing: h1 */
240
+ --letter-spacing-h1: -0.025em;
241
+ /* @token letter-spacing: Display sizes */
242
+ --letter-spacing-display: -0.05em;
243
+ }
244
+
245
+ /* Dark is grey, not near black, and what floats is lighter than what it
246
+ floats on: the page #1E1E1E; cards, menus and panels #2C2C2C; hover
247
+ and pressed fills #383838. */
248
+ .dark {
249
+ --background: oklch(0.235 0 0);
250
+ --foreground: oklch(0.985 0 0);
251
+ --card: oklch(0.293 0 0);
252
+ --card-foreground: oklch(0.985 0 0);
253
+ --popover: oklch(0.293 0 0);
254
+ --popover-foreground: oklch(0.985 0 0);
255
+ --primary: oklch(0.922 0 0);
256
+ --primary-foreground: oklch(0.205 0 0);
257
+ --secondary: oklch(0.341 0 0);
258
+ --secondary-foreground: oklch(0.985 0 0);
259
+ --muted: oklch(0.341 0 0);
260
+ --muted-foreground: oklch(0.77 0 0);
261
+ --accent: oklch(0.341 0 0);
262
+ --accent-foreground: oklch(0.985 0 0);
263
+ --destructive: oklch(0.704 0.191 22.216);
264
+ --border: oklch(1 0 0 / 10%);
265
+ --input: oklch(1 0 0 / 15%);
266
+ --ring: oklch(0.556 0 0);
267
+ --chart-1: oklch(0.488 0.243 264.376);
268
+ --chart-2: oklch(0.696 0.17 162.48);
269
+ --chart-3: oklch(0.769 0.188 70.08);
270
+ --chart-4: oklch(0.627 0.265 303.9);
271
+ --chart-5: oklch(0.645 0.246 16.439);
272
+ --sidebar: oklch(0.26 0 0);
273
+ --sidebar-foreground: oklch(0.985 0 0);
274
+ --sidebar-primary: oklch(0.488 0.243 264.376);
275
+ --sidebar-primary-foreground: oklch(0.985 0 0);
276
+ --sidebar-accent: oklch(0.269 0 0);
277
+ --sidebar-accent-foreground: oklch(0.985 0 0);
278
+ --sidebar-border: oklch(1 0 0 / 10%);
279
+ --sidebar-ring: oklch(0.556 0 0);
280
+ }
281
+
282
+ /* The studio's house rules, as packages/studio/app/ui/theme.css has them:
283
+ surfaces are raised, fields are sunk, controls are flat, and a state
284
+ tints its surface. The same values, so the site and the cloud read as
285
+ the product does. */
286
+ :root {
287
+ /* @token color: The one fill for hover and pressed controls */
288
+ --studio-hover: color-mix(in oklab, var(--foreground) 7%, transparent);
289
+ /* @token color: Something done: as a colour, never as words */
290
+ --studio-success: oklch(0.627 0.194 149.214);
291
+ /* @token color: Something to look at, not an error */
292
+ --studio-warning: oklch(0.769 0.188 70.08);
293
+ --studio-edge: rgb(9 9 11 / 0.09);
294
+ --studio-lit: rgb(255 255 255 / 0.7);
295
+ --studio-lift-float:
296
+ 0 1px 2px -1px rgb(9 9 11 / 0.08), 0 2px 4px 0 rgb(9 9 11 / 0.04);
297
+ --studio-lift-overlay:
298
+ 0 2px 4px -1px rgb(9 9 11 / 0.06), 0 8px 16px -4px rgb(9 9 11 / 0.08),
299
+ 0 20px 32px -12px rgb(9 9 11 / 0.1);
300
+ --studio-sunk:
301
+ inset 0 0 0 1px rgb(9 9 11 / 0.06), inset 0 1px 2px rgb(9 9 11 / 0.06);
302
+ }
303
+
304
+ .dark {
305
+ --studio-edge: rgb(255 255 255 / 0.1);
306
+ --studio-lit: rgb(255 255 255 / 0.09);
307
+ --studio-lift-float: 0 4px 12px -2px rgb(0 0 0 / 0.4);
308
+ --studio-lift-overlay:
309
+ 0 8px 24px -4px rgb(0 0 0 / 0.45), 0 20px 32px -12px rgb(0 0 0 / 0.5);
310
+ --studio-sunk:
311
+ inset 0 0 0 1px rgb(255 255 255 / 0.06), inset 0 1px 2px rgb(0 0 0 / 0.3);
312
+ }
313
+
314
+ /* Inks and quiet words, mixed with the text colour, so on .dark too. */
315
+ :root,
316
+ .dark {
317
+ /* @token color: Quiet words: the text colour at 65%, AA on every fill */
318
+ --studio-quiet: color-mix(in oklab, var(--foreground) 65%, transparent);
319
+ /* @token color: Focus outline: the text colour at 55%, 3:1 both themes */
320
+ --studio-focus: color-mix(in oklab, var(--foreground) 55%, transparent);
321
+ --studio-success-ink: color-mix(
322
+ in oklab,
323
+ var(--studio-success) 60%,
324
+ var(--foreground)
325
+ );
326
+ --studio-warning-ink: color-mix(
327
+ in oklab,
328
+ var(--studio-warning) 60%,
329
+ var(--foreground)
330
+ );
331
+ --studio-destructive-ink: color-mix(
332
+ in oklab,
333
+ var(--destructive) 60%,
334
+ var(--foreground)
335
+ );
336
+ }
337
+ }
338
+
339
+ /* Two durations, press and arrive, as the studio's. */
340
+ @theme {
341
+ --duration-studio-press: 150ms;
342
+ --duration-studio-arrive: 300ms;
343
+ }
344
+
345
+ /* Copied from the studio's theme.css as it is there, from here to its type:
346
+ house-rules.test.ts holds it. */
347
+ /* Depth and focus, the house rules as utilities.
348
+
349
+ Three layers, one treatment each: surfaces are raised (studio-float for a
350
+ group on the canvas, studio-overlay for what opens from one), fields are
351
+ sunk (studio-sunk), controls are flat (studio-hover is their one fill).
352
+ No border: forced colours, which drop shadows, draw one instead. */
353
+ @utility studio-float {
354
+ background-color: var(
355
+ --studio-surface,
356
+ color-mix(in oklab, var(--popover) 90%, transparent)
357
+ );
358
+ backdrop-filter: blur(8px);
359
+ border-radius: 9999px;
360
+ box-shadow:
361
+ inset 0 1px 0 var(--studio-lit),
362
+ inset 0 0 0 1px var(--studio-edge),
363
+ var(--studio-lift-float);
364
+
365
+ @media (prefers-reduced-transparency: reduce) {
366
+ background-color: var(--studio-surface, var(--popover));
367
+ backdrop-filter: none;
368
+ }
369
+ @media (forced-colors: active) {
370
+ border: 1px solid CanvasText;
371
+ }
372
+ }
373
+
374
+ @utility studio-overlay {
375
+ color: var(--popover-foreground);
376
+ background-color: var(--studio-surface, var(--popover));
377
+ border-radius: --theme(--radius-2xl);
378
+ box-shadow:
379
+ inset 0 1px 0 var(--studio-lit),
380
+ inset 0 0 0 1px var(--studio-edge),
381
+ var(--studio-lift-overlay);
382
+
383
+ @media (forced-colors: active) {
384
+ border: 1px solid CanvasText;
385
+ }
386
+ }
387
+
388
+ @utility studio-sunk {
389
+ background-color: var(--muted);
390
+ box-shadow: var(--studio-sunk);
391
+
392
+ @media (forced-colors: active) {
393
+ border: 1px solid CanvasText;
394
+ }
395
+ }
396
+
397
+ /* A state tints the whole surface and its edge, never a dot or a badge;
398
+ words stay in the text colour, the hue only as ink. On a float or an
399
+ overlay it sets their fill (--studio-surface), so it wins over theirs. */
400
+ @utility studio-tint-success {
401
+ --studio-edge: color-mix(in oklab, var(--studio-success) 35%, transparent);
402
+ --studio-surface: color-mix(in oklab, var(--studio-success) 10%, var(--popover));
403
+ background-color: var(--studio-surface);
404
+ }
405
+
406
+ @utility studio-tint-warning {
407
+ --studio-edge: color-mix(in oklab, var(--studio-warning) 35%, transparent);
408
+ --studio-surface: color-mix(in oklab, var(--studio-warning) 12%, var(--popover));
409
+ background-color: var(--studio-surface);
410
+ }
411
+
412
+ @utility studio-tint-destructive {
413
+ --studio-edge: color-mix(in oklab, var(--destructive) 35%, transparent);
414
+ --studio-surface: color-mix(in oklab, var(--destructive) 9%, var(--popover));
415
+ background-color: var(--studio-surface);
416
+ }
417
+
418
+ /* Focus you can see: the outline, never a soft ring. */
419
+ @utility studio-focus {
420
+ outline: none;
421
+
422
+ &:focus-visible {
423
+ outline: 2px solid var(--studio-focus);
424
+ outline-offset: 2px;
425
+ }
426
+ }
427
+
428
+ /* The same outline, drawn whenever it is used: on what shows the focus of
429
+ something inside it, as `group-has-[:focus-visible]:studio-outline`. */
430
+ @utility studio-outline {
431
+ outline: 2px solid var(--studio-focus);
432
+ outline-offset: 2px;
433
+ }
434
+
435
+ /* A button, pressed: it shrinks to 97%, eased out over 150ms. Buttons
436
+ only; nothing moves with reduced motion. */
437
+ @utility studio-press {
438
+ transition-property: color, background-color, box-shadow, scale, filter;
439
+ transition-duration: var(--duration-studio-press);
440
+ transition-timing-function: ease-out;
441
+
442
+ &:active {
443
+ scale: 0.97;
444
+ }
445
+ @media (prefers-reduced-motion: reduce) {
446
+ transition-property: color, background-color, box-shadow;
447
+
448
+ &:active {
449
+ scale: none;
450
+ }
451
+ }
452
+ }
453
+
454
+ /* Studio typography: not copied. The type styles below are this design system's own. */
455
+
456
+ /*
457
+ * Type styles, defined once, after shadcn's typography
458
+ * (ui.shadcn.com/docs/components/typography). The Text component, component
459
+ * CSS and consumer markup all compose these utilities, so size, line-height,
460
+ * tracking and weight can never drift apart.
461
+ */
462
+
463
+ /* @type display-large: Hero statements */
464
+ @utility type-display-large {
465
+ @apply font-semibold text-8xl tracking-tighter;
466
+ }
467
+ /* @type display-medium: Landing page headlines */
468
+ @utility type-display-medium {
469
+ @apply font-semibold text-6xl tracking-tighter;
470
+ }
471
+ /* @type display-small: Section openers */
472
+ @utility type-display-small {
473
+ @apply font-semibold text-5xl tracking-tight;
474
+ }
475
+ /* @type h1: Page title */
476
+ @utility type-h1 {
477
+ @apply font-extrabold text-4xl tracking-tight;
478
+ }
479
+ /* @type h2: Section heading */
480
+ @utility type-h2 {
481
+ @apply font-semibold text-3xl tracking-tight;
482
+ }
483
+ /* @type h3: Sub-section heading */
484
+ @utility type-h3 {
485
+ @apply font-semibold text-2xl tracking-tight;
486
+ }
487
+ /* @type h4: Minor heading */
488
+ @utility type-h4 {
489
+ @apply font-semibold text-xl tracking-tight;
490
+ }
491
+ /* @type lead: Introductory paragraph under a title */
492
+ @utility type-lead {
493
+ @apply font-normal text-muted-foreground text-xl;
494
+ }
495
+ /* @type large: Emphasised body text */
496
+ @utility type-large {
497
+ @apply font-semibold text-lg;
498
+ }
499
+ /* @type p: Body text */
500
+ @utility type-p {
501
+ @apply font-normal text-base;
502
+ }
503
+ /* @type small: Secondary text; buttons and table cells */
504
+ @utility type-small {
505
+ @apply font-medium text-sm;
506
+ }
507
+ /* @type extra-small: Dense UI; small buttons */
508
+ @utility type-extra-small {
509
+ @apply font-normal text-xs;
510
+ }
511
+ /* @type muted: Supporting descriptions */
512
+ @utility type-muted {
513
+ @apply font-normal text-muted-foreground text-sm;
514
+ }
515
+ /* @type label: Field captions and metadata */
516
+ @utility type-label {
517
+ @apply font-normal text-muted-foreground text-xs;
518
+ }
519
+ /* @type code: Inline code */
520
+ @utility type-code {
521
+ @apply rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono font-semibold text-sm;
118
522
  }
119
523
 
120
524
  @layer base {
121
525
  * {
122
- @apply border-border outline-ring/50;
526
+ @apply border-border outline-studio-focus;
123
527
  }
124
- body {
125
- @apply bg-background text-foreground;
528
+
529
+ button:not(:disabled),
530
+ [role="button"]:not(:disabled) {
531
+ cursor: pointer;
532
+ }
533
+
534
+ /* Anchor jumps clear the sticky header. */
535
+ main :is(h1, h2, h3, h4)[id] {
536
+ scroll-margin-top: 5rem;
126
537
  }
538
+
127
539
  html {
128
- @apply font-sans;
540
+ font-family: var(--font-sans);
541
+ text-rendering: optimizeLegibility;
542
+ }
543
+
544
+ body {
545
+ @apply bg-background text-foreground antialiased;
546
+ }
547
+
548
+ ::selection {
549
+ color: var(--foreground);
550
+ background-color: color-mix(in oklch, var(--primary) 25%, transparent);
129
551
  }
130
552
  }