@rimelight/ui 0.0.33 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -157
- package/package.json +105 -105
- package/src/components/astro/RLAAspectRatio.astro +2 -2
- package/src/components/astro/RLAButton.astro +141 -139
- package/src/components/astro/RLAChart.astro +19 -34
- package/src/components/astro/RLAHead.astro +427 -196
- package/src/components/astro/RLAHeader.astro +66 -59
- package/src/components/astro/RLAImage.astro +61 -19
- package/src/components/astro/RLALink.astro +22 -23
- package/src/components/astro/RLALinkGroup.astro +66 -4
- package/src/components/astro/RLALocaleSelector.astro +136 -113
- package/src/components/astro/RLAMain.astro +8 -3
- package/src/components/astro/RLAMarquee.astro +9 -2
- package/src/components/astro/RLANavigationMenu.astro +245 -56
- package/src/components/astro/RLAPagination.astro +2 -4
- package/src/components/astro/RLAProgress.astro +8 -2
- package/src/components/astro/RLASelect.astro +38 -24
- package/src/components/astro/RLASlideover.astro +66 -1
- package/src/components/astro/RLASlider.astro +14 -14
- package/src/components/astro/RLASplitter.astro +14 -2
- package/src/components/astro/RLAStickySurface.astro +9 -2
- package/src/components/vue/RLVCheckbox.vue +68 -68
- package/src/components/vue/RLVForm.vue +44 -44
- package/src/components/vue/RLVFormField.vue +58 -58
- package/src/components/vue/RLVInput.vue +93 -93
- package/src/components/vue/RLVPost.vue +63 -63
- package/src/components/vue/RLVPosts.vue +21 -21
- package/src/components/vue/RLVToast.vue +68 -68
- package/src/components/vue/RLVToaster.vue +29 -29
- package/src/composables/index.ts +3 -3
- package/src/composables/useHeaderStore.ts +13 -14
- package/src/composables/useScrollToTop.ts +62 -62
- package/src/composables/useToast.ts +43 -42
- package/src/config/index.ts +1 -0
- package/src/config/security.ts +220 -0
- package/src/integrations/ui.ts +199 -199
- package/src/middleware/security.ts +75 -15
- package/src/plugins/index.ts +2 -2
- package/src/plugins/starlightDocsApi/index.ts +272 -272
- package/src/presets/defaults.ts +297 -297
- package/src/presets/index.ts +683 -637
- package/src/styles/index.css +160 -160
- package/src/themes/3d-hover.theme.ts +13 -13
- package/src/themes/accordion.theme.ts +13 -13
- package/src/themes/alert.theme.ts +131 -125
- package/src/themes/app.theme.ts +13 -13
- package/src/themes/audio.theme.ts +13 -13
- package/src/themes/avatar.theme.ts +84 -84
- package/src/themes/badge.theme.ts +169 -163
- package/src/themes/banner.theme.ts +13 -13
- package/src/themes/browser-mockup.theme.ts +13 -13
- package/src/themes/button.theme.ts +224 -202
- package/src/themes/calendar.theme.ts +13 -13
- package/src/themes/card.theme.ts +42 -42
- package/src/themes/changelog.theme.ts +13 -13
- package/src/themes/chart.theme.ts +22 -22
- package/src/themes/chat-message.theme.ts +13 -13
- package/src/themes/chat-messages.theme.ts +13 -13
- package/src/themes/chat-palette.theme.ts +13 -13
- package/src/themes/chat-prompt-submit.theme.ts +13 -13
- package/src/themes/chat-prompt.theme.ts +13 -13
- package/src/themes/chat-reasoning.theme.ts +13 -13
- package/src/themes/chat-shimmer.theme.ts +13 -13
- package/src/themes/chat-tool.theme.ts +13 -13
- package/src/themes/chat.theme.ts +13 -13
- package/src/themes/checkbox.theme.ts +50 -50
- package/src/themes/chip.theme.ts +74 -74
- package/src/themes/color-picker.theme.ts +13 -13
- package/src/themes/command-palette.theme.ts +13 -13
- package/src/themes/compare.theme.ts +13 -13
- package/src/themes/confirm.theme.ts +48 -48
- package/src/themes/container.theme.ts +13 -13
- package/src/themes/context-menu.theme.ts +13 -13
- package/src/themes/dashboard-group.theme.ts +13 -13
- package/src/themes/dashboard-navbar.theme.ts +13 -13
- package/src/themes/dashboard-panel.theme.ts +13 -13
- package/src/themes/dashboard-resize-handle.theme.ts +13 -13
- package/src/themes/dashboard-search-button.theme.ts +13 -13
- package/src/themes/dashboard-search.theme.ts +13 -13
- package/src/themes/dashboard-sidebar-collapse.theme.ts +13 -13
- package/src/themes/dashboard-sidebar-toggle.theme.ts +13 -13
- package/src/themes/dashboard-sidebar.theme.ts +13 -13
- package/src/themes/dashboard-toolbar.theme.ts +13 -13
- package/src/themes/dock.theme.ts +13 -13
- package/src/themes/drawer.theme.ts +61 -61
- package/src/themes/dropdown-menu.theme.ts +29 -29
- package/src/themes/editor.theme.ts +13 -13
- package/src/themes/empty.theme.ts +13 -13
- package/src/themes/error.theme.ts +13 -13
- package/src/themes/field-group.theme.ts +24 -24
- package/src/themes/fieldset.theme.ts +13 -13
- package/src/themes/floating-action.theme.ts +13 -13
- package/src/themes/footer.theme.ts +30 -30
- package/src/themes/form.theme.ts +13 -13
- package/src/themes/gallery.theme.ts +13 -13
- package/src/themes/head.theme.ts +13 -13
- package/src/themes/header.theme.ts +45 -46
- package/src/themes/icon.theme.ts +23 -23
- package/src/themes/image.theme.ts +23 -19
- package/src/themes/input-date.theme.ts +13 -13
- package/src/themes/input-menu.theme.ts +35 -35
- package/src/themes/input-number.theme.ts +13 -13
- package/src/themes/input-tags.theme.ts +13 -13
- package/src/themes/input-time.theme.ts +13 -13
- package/src/themes/input.theme.ts +42 -42
- package/src/themes/kbd.theme.ts +95 -89
- package/src/themes/knob.theme.ts +13 -13
- package/src/themes/link-group.theme.ts +32 -32
- package/src/themes/link.theme.ts +13 -13
- package/src/themes/listbox.theme.ts +13 -13
- package/src/themes/locale-selector.theme.ts +49 -49
- package/src/themes/logo.theme.ts +13 -13
- package/src/themes/main.theme.ts +13 -13
- package/src/themes/megamenu.theme.ts +13 -13
- package/src/themes/meter.theme.ts +13 -13
- package/src/themes/navigation-menu.theme.ts +44 -27
- package/src/themes/page-aside.theme.ts +13 -13
- package/src/themes/page-body.theme.ts +13 -13
- package/src/themes/page-header.theme.ts +13 -13
- package/src/themes/page-section.theme.ts +187 -187
- package/src/themes/page.theme.ts +13 -13
- package/src/themes/password.theme.ts +13 -13
- package/src/themes/phone-mockup.theme.ts +13 -13
- package/src/themes/placeholder.theme.ts +15 -15
- package/src/themes/post.theme.ts +33 -33
- package/src/themes/pricing-plan.theme.ts +13 -13
- package/src/themes/pricing-table.theme.ts +13 -13
- package/src/themes/progress.theme.ts +38 -38
- package/src/themes/prose.theme.ts +13 -13
- package/src/themes/qr-code.theme.ts +13 -13
- package/src/themes/quote.theme.ts +13 -13
- package/src/themes/radio-group.theme.ts +13 -13
- package/src/themes/rating.theme.ts +13 -13
- package/src/themes/scroll-area.theme.ts +26 -26
- package/src/themes/scroll-to-top.theme.ts +52 -52
- package/src/themes/select.theme.ts +29 -29
- package/src/themes/separator.theme.ts +147 -147
- package/src/themes/sidebar.theme.ts +38 -38
- package/src/themes/skeleton.theme.ts +21 -21
- package/src/themes/slideover.theme.ts +4 -4
- package/src/themes/slider.theme.ts +36 -36
- package/src/themes/speed-dial.theme.ts +13 -13
- package/src/themes/spinner.theme.ts +34 -34
- package/src/themes/splitter.theme.ts +23 -23
- package/src/themes/spoiler.theme.ts +13 -13
- package/src/themes/stepper.theme.ts +13 -13
- package/src/themes/switch.theme.ts +67 -67
- package/src/themes/table-of-contents.theme.ts +48 -48
- package/src/themes/tabs.theme.ts +52 -52
- package/src/themes/textarea.theme.ts +27 -27
- package/src/themes/theme-selector.theme.ts +15 -15
- package/src/themes/timeline.theme.ts +13 -13
- package/src/themes/toast.theme.ts +31 -31
- package/src/themes/tooltip.theme.ts +28 -28
- package/src/themes/tour.theme.ts +13 -13
- package/src/themes/tree.theme.ts +13 -13
- package/src/themes/user.theme.ts +13 -13
- package/src/themes/video.theme.ts +17 -17
- package/src/themes/watermark.theme.ts +13 -13
- package/src/themes/window-mockup.theme.ts +13 -13
- package/src/types/components/3d-hover.ts +11 -11
- package/src/types/components/alert.ts +2 -2
- package/src/types/components/app.ts +11 -11
- package/src/types/components/audio.ts +11 -11
- package/src/types/components/avatar-group.ts +11 -11
- package/src/types/components/avatar.ts +60 -60
- package/src/types/components/badge.ts +2 -2
- package/src/types/components/banner.ts +11 -11
- package/src/types/components/browser-mockup.ts +11 -11
- package/src/types/components/button.ts +74 -81
- package/src/types/components/calendar.ts +11 -11
- package/src/types/components/changelog.ts +11 -11
- package/src/types/components/chart.ts +2 -1
- package/src/types/components/chat-message.ts +11 -11
- package/src/types/components/chat-messages.ts +11 -11
- package/src/types/components/chat-palette.ts +11 -11
- package/src/types/components/chat-prompt-submit.ts +11 -11
- package/src/types/components/chat-prompt.ts +11 -11
- package/src/types/components/chat-reasoning.ts +11 -11
- package/src/types/components/chat-shimmer.ts +11 -11
- package/src/types/components/chat-tool.ts +11 -11
- package/src/types/components/chat.ts +11 -11
- package/src/types/components/checkbox.ts +2 -2
- package/src/types/components/chip.ts +17 -17
- package/src/types/components/collapsible.ts +2 -1
- package/src/types/components/color-picker.ts +11 -11
- package/src/types/components/command-palette.ts +11 -11
- package/src/types/components/compare.ts +11 -11
- package/src/types/components/container.ts +17 -17
- package/src/types/components/context-menu.ts +11 -11
- package/src/types/components/dashboard-group.ts +11 -11
- package/src/types/components/dashboard-navbar.ts +11 -11
- package/src/types/components/dashboard-panel.ts +11 -11
- package/src/types/components/dashboard-resize-handle.ts +11 -11
- package/src/types/components/dashboard-search-button.ts +11 -11
- package/src/types/components/dashboard-search.ts +11 -11
- package/src/types/components/dashboard-sidebar-collapse.ts +11 -11
- package/src/types/components/dashboard-sidebar-toggle.ts +11 -11
- package/src/types/components/dashboard-sidebar.ts +11 -11
- package/src/types/components/dashboard-toolbar.ts +11 -11
- package/src/types/components/dock.ts +11 -11
- package/src/types/components/dropdown-menu.ts +2 -1
- package/src/types/components/editor.ts +11 -11
- package/src/types/components/empty.ts +11 -11
- package/src/types/components/error.ts +11 -11
- package/src/types/components/fieldset.ts +11 -11
- package/src/types/components/file-upload.ts +2 -1
- package/src/types/components/floating-action.ts +11 -11
- package/src/types/components/form.ts +19 -19
- package/src/types/components/gallery.ts +11 -11
- package/src/types/components/icon.ts +19 -19
- package/src/types/components/image.ts +32 -28
- package/src/types/components/index.ts +134 -135
- package/src/types/components/input-date.ts +11 -11
- package/src/types/components/input-menu.ts +44 -43
- package/src/types/components/input-number.ts +11 -11
- package/src/types/components/input-pin.ts +36 -35
- package/src/types/components/input-tags.ts +11 -11
- package/src/types/components/input-time.ts +11 -11
- package/src/types/components/input.ts +2 -2
- package/src/types/components/knob.ts +11 -11
- package/src/types/components/link-group.ts +45 -23
- package/src/types/components/link.ts +4 -0
- package/src/types/components/listbox.ts +11 -11
- package/src/types/components/locale-selector.ts +33 -33
- package/src/types/components/logo.ts +32 -31
- package/src/types/components/main.ts +17 -17
- package/src/types/components/megamenu.ts +11 -11
- package/src/types/components/meter.ts +11 -11
- package/src/types/components/modal.ts +39 -39
- package/src/types/components/navigation-menu.ts +59 -54
- package/src/types/components/page-aside.ts +11 -11
- package/src/types/components/page-body.ts +11 -11
- package/src/types/components/page-header.ts +11 -11
- package/src/types/components/page.ts +11 -11
- package/src/types/components/password.ts +11 -11
- package/src/types/components/phone-mockup.ts +5 -5
- package/src/types/components/pin-input.ts +11 -11
- package/src/types/components/popover.ts +23 -23
- package/src/types/components/post.ts +35 -35
- package/src/types/components/pricing-plan.ts +11 -11
- package/src/types/components/pricing-table.ts +11 -11
- package/src/types/components/progress.ts +33 -33
- package/src/types/components/prose.ts +11 -11
- package/src/types/components/qr-code.ts +11 -11
- package/src/types/components/radio-group.ts +11 -11
- package/src/types/components/rating.ts +11 -11
- package/src/types/components/scroll-area.ts +23 -23
- package/src/types/components/scroll-to-top.ts +2 -2
- package/src/types/components/select.ts +2 -1
- package/src/types/components/separator.ts +19 -19
- package/src/types/components/sidebar.ts +87 -72
- package/src/types/components/slideover.ts +31 -31
- package/src/types/components/slider.ts +2 -2
- package/src/types/components/speed-dial.ts +11 -11
- package/src/types/components/spinner.ts +25 -25
- package/src/types/components/splitter.ts +19 -19
- package/src/types/components/spoiler.ts +11 -11
- package/src/types/components/stepper.ts +11 -11
- package/src/types/components/sticky-surface.ts +19 -19
- package/src/types/components/switch.ts +41 -41
- package/src/types/components/table-of-contents.ts +17 -17
- package/src/types/components/tabs.ts +2 -1
- package/src/types/components/textarea.ts +2 -1
- package/src/types/components/theme-selector.ts +15 -15
- package/src/types/components/timeline.ts +11 -11
- package/src/types/components/toast.ts +2 -1
- package/src/types/components/tooltip.ts +23 -23
- package/src/types/components/tour.ts +11 -11
- package/src/types/components/tree.ts +11 -11
- package/src/types/components/user.ts +11 -11
- package/src/types/components/watermark.ts +11 -11
- package/src/types/components/window-mockup.ts +11 -11
- package/src/types/theme.ts +10 -0
- package/src/utils/docs.ts +215 -189
- package/src/utils/headerStack.ts +95 -95
- package/src/utils/index.ts +5 -5
- package/src/components/astro/RLABlogPost.astro +0 -7
- package/src/components/astro/RLABlogPosts.astro +0 -9
- package/src/components/astro/RLAPosts.astro +0 -23
- package/src/themes/posts.theme.ts +0 -13
- package/src/types/components/posts.ts +0 -11
package/src/presets/index.ts
CHANGED
|
@@ -1,637 +1,683 @@
|
|
|
1
|
-
import { dirname, join } from "node:path"
|
|
2
|
-
import { fileURLToPath } from "node:url"
|
|
3
|
-
import {
|
|
4
|
-
definePreset,
|
|
5
|
-
presetTypography,
|
|
6
|
-
presetWind4,
|
|
7
|
-
presetIcons,
|
|
8
|
-
transformerDirectives,
|
|
9
|
-
transformerVariantGroup
|
|
10
|
-
} from "unocss"
|
|
11
|
-
import { defaultColorScales, defaultColors } from "./defaults"
|
|
12
|
-
|
|
13
|
-
const pathDirname = dirname(fileURLToPath(import.meta.url))
|
|
14
|
-
export const uiSrcGlob = join(pathDirname, "../**/*.{js,ts,jsx,tsx,vue,svelte,astro}")
|
|
15
|
-
export const uiFilesystemGlob = join(pathDirname, "../**/*")
|
|
16
|
-
|
|
17
|
-
type ColorShades = Record<string, string>
|
|
18
|
-
type ColorModeShades = { light?: ColorShades; dark?: ColorShades; flat?: ColorShades }
|
|
19
|
-
export type ColorConfigValue = ColorShades | ColorModeShades
|
|
20
|
-
|
|
21
|
-
function generateLightShade(shade: string, value: string): string {
|
|
22
|
-
const num = Number(shade)
|
|
23
|
-
if (isNaN(num)) return value
|
|
24
|
-
const mixPct = Math.min(60, ((950 - num) / 950) * 60)
|
|
25
|
-
return `color-mix(in oklch, ${value}, white ${mixPct.toFixed(0)}%)`
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function generateDarkShade(shade: string, value: string): string {
|
|
29
|
-
const num = Number(shade)
|
|
30
|
-
if (isNaN(num)) return value
|
|
31
|
-
const mixPct = Math.min(60, ((num - 50) / 900) * 60)
|
|
32
|
-
return `color-mix(in oklch, ${value}, black ${mixPct.toFixed(0)}%)`
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function resolveColorModes(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
): { light: Record<string, string>; dark: Record<string, string>; flat: Record<string, string> } {
|
|
39
|
-
const raw = entry as Record<string, unknown>
|
|
40
|
-
|
|
41
|
-
const modeLight =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const modeDark =
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const modeFlat =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const modeKeys = new Set(["light", "dark", "flat"])
|
|
55
|
-
const flatShades: ColorShades = {}
|
|
56
|
-
for (const [k, v] of Object.entries(raw)) {
|
|
57
|
-
if (!modeKeys.has(k) && typeof v === "string") {
|
|
58
|
-
flatShades[k] = v
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const allShades = [
|
|
63
|
-
...new Set([
|
|
64
|
-
...Object.keys(modeLight),
|
|
65
|
-
...Object.keys(modeDark),
|
|
66
|
-
...Object.keys(modeFlat),
|
|
67
|
-
...Object.keys(flatShades)
|
|
68
|
-
])
|
|
69
|
-
]
|
|
70
|
-
|
|
71
|
-
if (autogenerate) {
|
|
72
|
-
if (Object.keys(modeLight).length === 0) {
|
|
73
|
-
for (const shade of allShades) {
|
|
74
|
-
const value = flatShades[shade] ?? modeFlat[shade] ?? modeDark[shade]
|
|
75
|
-
if (value) modeLight[shade] = generateLightShade(shade, value)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (Object.keys(modeDark).length === 0) {
|
|
79
|
-
for (const shade of allShades) {
|
|
80
|
-
const value = flatShades[shade] ?? modeFlat[shade] ?? modeLight[shade]
|
|
81
|
-
if (value) modeDark[shade] = generateDarkShade(shade, value)
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const light: ColorShades = {}
|
|
87
|
-
const dark: ColorShades = {}
|
|
88
|
-
const flat: ColorShades = {}
|
|
89
|
-
|
|
90
|
-
for (const shade of allShades) {
|
|
91
|
-
const lv = modeLight[shade] ?? flatShades[shade] ?? modeFlat[shade] ?? modeDark[shade]
|
|
92
|
-
if (lv !== undefined) light[shade] = lv
|
|
93
|
-
|
|
94
|
-
const dv = modeDark[shade] ?? flatShades[shade] ?? modeFlat[shade] ?? modeLight[shade]
|
|
95
|
-
if (dv !== undefined) dark[shade] = dv
|
|
96
|
-
|
|
97
|
-
const fv = modeFlat[shade] ?? flatShades[shade] ?? modeLight[shade] ?? modeDark[shade]
|
|
98
|
-
if (fv !== undefined) flat[shade] = fv
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return { light, dark, flat }
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const createScale = (colorName: string, shadeKeys: string[]) => ({
|
|
105
|
-
DEFAULT: `var(--${colorName})`,
|
|
106
|
-
foreground: `var(--${colorName}-foreground)`,
|
|
107
|
-
accent: `var(--${colorName}-accent)`,
|
|
108
|
-
...Object.fromEntries(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
)
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
export interface RimelightPresetOptions {
|
|
119
|
-
colors?: Record<string, ColorConfigValue>
|
|
120
|
-
autogenerateColorModes?: boolean
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export default definePreset((options?: RimelightPresetOptions) => {
|
|
124
|
-
const userColors = options?.colors ?? {}
|
|
125
|
-
const autoGen = options?.autogenerateColorModes ?? true
|
|
126
|
-
const coreColors = [...defaultColors, "neutral"]
|
|
127
|
-
const mergedColorScales = { ...defaultColorScales, ...userColors }
|
|
128
|
-
const allColors = [...new Set([...coreColors, ...Object.keys(userColors)])]
|
|
129
|
-
|
|
130
|
-
const resolvedColors = Object.fromEntries(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
const safelist = allColors.flatMap((color) => ["rl-color-" + color])
|
|
138
|
-
|
|
139
|
-
return {
|
|
140
|
-
name: "rimelight-ui",
|
|
141
|
-
safelist,
|
|
142
|
-
presets: [
|
|
143
|
-
presetWind4(
|
|
144
|
-
presetTypography({
|
|
145
|
-
cssExtend: {
|
|
146
|
-
"h1,h2,h3,h4,h5,h6": {
|
|
147
|
-
"font-family": "var(--font-sans), system-ui, sans-serif"
|
|
148
|
-
},
|
|
149
|
-
"p,li,blockquote,code": {
|
|
150
|
-
"font-family": "var(--font-sans), system-ui, sans-serif"
|
|
151
|
-
},
|
|
152
|
-
"pre,code": {
|
|
153
|
-
"font-family": "var(--font-mono), monospace"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}),
|
|
157
|
-
presetIcons({
|
|
158
|
-
extraProperties: {
|
|
159
|
-
"display": "inline-block",
|
|
160
|
-
"vertical-align": "middle"
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
],
|
|
164
|
-
transformers: [transformerDirectives(), transformerVariantGroup()],
|
|
165
|
-
|
|
166
|
-
outputToCssLayers: true,
|
|
167
|
-
layers: {
|
|
168
|
-
theme: 1,
|
|
169
|
-
preflights: 2,
|
|
170
|
-
shortcuts: 3,
|
|
171
|
-
default: 4
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
content: {
|
|
175
|
-
pipeline: {
|
|
176
|
-
include: [
|
|
177
|
-
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
|
|
178
|
-
"src/**/*.{js,ts,jsx,tsx,vue,svelte,astro}",
|
|
179
|
-
uiSrcGlob,
|
|
180
|
-
"../ui/src/**/*.{js,ts,jsx,tsx,vue,svelte,astro}"
|
|
181
|
-
]
|
|
182
|
-
},
|
|
183
|
-
filesystem: [uiFilesystemGlob, "../ui/src/**/*", "src/components/**/*", "src/pages/**/*"]
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
shortcuts: {
|
|
187
|
-
"container": "mx-auto w-full max-w-90rem px-md",
|
|
188
|
-
"sr-only":
|
|
189
|
-
|
|
190
|
-
},
|
|
191
|
-
rules: [
|
|
192
|
-
[
|
|
193
|
-
/^clip-rect-(\d+)-(\d+)-(\d+)-(\d+)$/,
|
|
194
|
-
([, t, r, b, l]) => ({ clip: `rect(${t}px, ${r}px, ${b}px, ${l}px)` })
|
|
195
|
-
],
|
|
196
|
-
[
|
|
197
|
-
/^rl-color-(.+)$/,
|
|
198
|
-
([, color]) => ({
|
|
199
|
-
"--rl-bg": `var(--color-${color}-500)`,
|
|
200
|
-
"--rl-bg-hover": `var(--color-${color}-600)`,
|
|
201
|
-
"--rl-text": `var(--color-${color}-600)`,
|
|
202
|
-
"--rl-ring": `var(--color-${color}-500)`,
|
|
203
|
-
"--rl-border": `var(--color-${color}-500)`,
|
|
204
|
-
"--rl-bg-f": `var(--color-${color}-500-f)`,
|
|
205
|
-
"--rl-bg-hover-f": `var(--color-${color}-600-f)`,
|
|
206
|
-
"--rl-text-f": `var(--color-${color}-600-f)`,
|
|
207
|
-
"--rl-ring-f": `var(--color-${color}-500-f)`,
|
|
208
|
-
"--rl-border-f": `var(--color-${color}-500-f)`,
|
|
209
|
-
"--rl-bg-l": `var(--color-${color}-500-l)`,
|
|
210
|
-
"--rl-bg-hover-l": `var(--color-${color}-600-l)`,
|
|
211
|
-
"--rl-text-l": `var(--color-${color}-600-l)`,
|
|
212
|
-
"--rl-ring-l": `var(--color-${color}-500-l)`,
|
|
213
|
-
"--rl-border-l": `var(--color-${color}-500-l)`,
|
|
214
|
-
"--rl-bg-d": `var(--color-${color}-500-d)`,
|
|
215
|
-
"--rl-bg-hover-d": `var(--color-${color}-600-d)`,
|
|
216
|
-
"--rl-text-d": `var(--color-${color}-600-d)`,
|
|
217
|
-
"--rl-ring-d": `var(--color-${color}-500-d)`,
|
|
218
|
-
"--rl-border-d": `var(--color-${color}-500-d)`
|
|
219
|
-
})
|
|
220
|
-
],
|
|
221
|
-
[
|
|
222
|
-
"rl-flat",
|
|
223
|
-
{
|
|
224
|
-
"--rl-bg": "var(--rl-bg-f)",
|
|
225
|
-
"--rl-bg-hover": "var(--rl-bg-hover-f)",
|
|
226
|
-
"--rl-text": "var(--rl-text-f)",
|
|
227
|
-
"--rl-ring": "var(--rl-ring-f)",
|
|
228
|
-
"--rl-border": "var(--rl-border-f)"
|
|
229
|
-
}
|
|
230
|
-
],
|
|
231
|
-
[
|
|
232
|
-
"rl-light",
|
|
233
|
-
{
|
|
234
|
-
"--rl-bg": "var(--rl-bg-l, var(--rl-bg-f))",
|
|
235
|
-
"--rl-bg-hover": "var(--rl-bg-hover-l, var(--rl-bg-hover-f))",
|
|
236
|
-
"--rl-text": "var(--rl-text-l, var(--rl-text-f))",
|
|
237
|
-
"--rl-ring": "var(--rl-ring-l, var(--rl-ring-f))",
|
|
238
|
-
"--rl-border": "var(--rl-border-l, var(--rl-border-f))"
|
|
239
|
-
}
|
|
240
|
-
],
|
|
241
|
-
[
|
|
242
|
-
"rl-dark",
|
|
243
|
-
{
|
|
244
|
-
"--rl-bg": "var(--rl-bg-d, var(--rl-bg-f))",
|
|
245
|
-
"--rl-bg-hover": "var(--rl-bg-hover-d, var(--rl-bg-hover-f))",
|
|
246
|
-
"--rl-text": "var(--rl-text-d, var(--rl-text-f))",
|
|
247
|
-
"--rl-ring": "var(--rl-ring-d, var(--rl-ring-f))",
|
|
248
|
-
"--rl-border": "var(--rl-border-d, var(--rl-border-f))"
|
|
249
|
-
}
|
|
250
|
-
],
|
|
251
|
-
[
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
)
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
"
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
"
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
"
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
"
|
|
352
|
-
"
|
|
353
|
-
"
|
|
354
|
-
"
|
|
355
|
-
"
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
"
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
--
|
|
472
|
-
--
|
|
473
|
-
--
|
|
474
|
-
--
|
|
475
|
-
--
|
|
476
|
-
--
|
|
477
|
-
--
|
|
478
|
-
--
|
|
479
|
-
--
|
|
480
|
-
--
|
|
481
|
-
--
|
|
482
|
-
--
|
|
483
|
-
--
|
|
484
|
-
--
|
|
485
|
-
--
|
|
486
|
-
--
|
|
487
|
-
--
|
|
488
|
-
--
|
|
489
|
-
--
|
|
490
|
-
--
|
|
491
|
-
--
|
|
492
|
-
--
|
|
493
|
-
|
|
494
|
-
--
|
|
495
|
-
--
|
|
496
|
-
--
|
|
497
|
-
--
|
|
498
|
-
--
|
|
499
|
-
--
|
|
500
|
-
--
|
|
501
|
-
--
|
|
502
|
-
--
|
|
503
|
-
--
|
|
504
|
-
--
|
|
505
|
-
--
|
|
506
|
-
--
|
|
507
|
-
--
|
|
508
|
-
--border
|
|
509
|
-
--
|
|
510
|
-
--
|
|
511
|
-
--ring
|
|
512
|
-
--
|
|
513
|
-
--
|
|
514
|
-
--
|
|
515
|
-
--
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
--
|
|
523
|
-
--
|
|
524
|
-
--
|
|
525
|
-
--
|
|
526
|
-
--
|
|
527
|
-
--
|
|
528
|
-
--
|
|
529
|
-
--
|
|
530
|
-
--
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
--
|
|
535
|
-
--
|
|
536
|
-
--
|
|
537
|
-
--
|
|
538
|
-
--
|
|
539
|
-
|
|
540
|
-
--
|
|
541
|
-
--
|
|
542
|
-
--
|
|
543
|
-
--
|
|
544
|
-
--
|
|
545
|
-
--
|
|
546
|
-
--
|
|
547
|
-
--
|
|
548
|
-
--
|
|
549
|
-
--
|
|
550
|
-
--
|
|
551
|
-
--
|
|
552
|
-
--
|
|
553
|
-
--
|
|
554
|
-
--
|
|
555
|
-
--
|
|
556
|
-
--
|
|
557
|
-
--
|
|
558
|
-
--
|
|
559
|
-
--
|
|
560
|
-
--
|
|
561
|
-
--
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
--
|
|
569
|
-
--
|
|
570
|
-
--
|
|
571
|
-
--
|
|
572
|
-
--
|
|
573
|
-
--
|
|
574
|
-
--
|
|
575
|
-
--
|
|
576
|
-
--
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
--
|
|
581
|
-
--
|
|
582
|
-
--
|
|
583
|
-
--
|
|
584
|
-
--
|
|
585
|
-
--
|
|
586
|
-
--
|
|
587
|
-
--
|
|
588
|
-
--
|
|
589
|
-
--
|
|
590
|
-
--
|
|
591
|
-
--
|
|
592
|
-
--
|
|
593
|
-
--
|
|
594
|
-
--
|
|
595
|
-
--
|
|
596
|
-
--
|
|
597
|
-
--
|
|
598
|
-
|
|
599
|
-
--
|
|
600
|
-
--
|
|
601
|
-
--
|
|
602
|
-
--
|
|
603
|
-
--
|
|
604
|
-
--
|
|
605
|
-
--
|
|
606
|
-
--
|
|
607
|
-
--
|
|
608
|
-
--
|
|
609
|
-
--
|
|
610
|
-
--
|
|
611
|
-
--
|
|
612
|
-
--
|
|
613
|
-
--
|
|
614
|
-
--
|
|
615
|
-
--
|
|
616
|
-
--
|
|
617
|
-
--
|
|
618
|
-
--
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
--
|
|
623
|
-
--
|
|
624
|
-
--
|
|
625
|
-
--
|
|
626
|
-
--
|
|
627
|
-
--
|
|
628
|
-
--
|
|
629
|
-
--
|
|
630
|
-
--
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
1
|
+
import { dirname, join } from "node:path"
|
|
2
|
+
import { fileURLToPath } from "node:url"
|
|
3
|
+
import {
|
|
4
|
+
definePreset,
|
|
5
|
+
presetTypography,
|
|
6
|
+
presetWind4,
|
|
7
|
+
presetIcons,
|
|
8
|
+
transformerDirectives,
|
|
9
|
+
transformerVariantGroup
|
|
10
|
+
} from "unocss"
|
|
11
|
+
import { defaultColorScales, defaultColors } from "./defaults"
|
|
12
|
+
|
|
13
|
+
const pathDirname = dirname(fileURLToPath(import.meta.url))
|
|
14
|
+
export const uiSrcGlob = join(pathDirname, "../**/*.{js,ts,jsx,tsx,vue,svelte,astro}")
|
|
15
|
+
export const uiFilesystemGlob = join(pathDirname, "../**/*")
|
|
16
|
+
|
|
17
|
+
type ColorShades = Record<string, string>
|
|
18
|
+
type ColorModeShades = { light?: ColorShades; dark?: ColorShades; flat?: ColorShades }
|
|
19
|
+
export type ColorConfigValue = ColorShades | ColorModeShades
|
|
20
|
+
|
|
21
|
+
function generateLightShade(shade: string, value: string): string {
|
|
22
|
+
const num = Number(shade)
|
|
23
|
+
if (isNaN(num)) return value
|
|
24
|
+
const mixPct = Math.min(60, ((950 - num) / 950) * 60)
|
|
25
|
+
return `color-mix(in oklch, ${value}, white ${mixPct.toFixed(0)}%)`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function generateDarkShade(shade: string, value: string): string {
|
|
29
|
+
const num = Number(shade)
|
|
30
|
+
if (isNaN(num)) return value
|
|
31
|
+
const mixPct = Math.min(60, ((num - 50) / 900) * 60)
|
|
32
|
+
return `color-mix(in oklch, ${value}, black ${mixPct.toFixed(0)}%)`
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function resolveColorModes(
|
|
36
|
+
entry: ColorConfigValue,
|
|
37
|
+
autogenerate?: boolean
|
|
38
|
+
): { light: Record<string, string>; dark: Record<string, string>; flat: Record<string, string> } {
|
|
39
|
+
const raw = entry as Record<string, unknown>
|
|
40
|
+
|
|
41
|
+
const modeLight =
|
|
42
|
+
typeof raw.light === "object" && raw.light !== null
|
|
43
|
+
? ({ ...raw.light } as ColorShades)
|
|
44
|
+
: ({} as ColorShades)
|
|
45
|
+
const modeDark =
|
|
46
|
+
typeof raw.dark === "object" && raw.dark !== null
|
|
47
|
+
? ({ ...raw.dark } as ColorShades)
|
|
48
|
+
: ({} as ColorShades)
|
|
49
|
+
const modeFlat =
|
|
50
|
+
typeof raw.flat === "object" && raw.flat !== null
|
|
51
|
+
? ({ ...raw.flat } as ColorShades)
|
|
52
|
+
: ({} as ColorShades)
|
|
53
|
+
|
|
54
|
+
const modeKeys = new Set(["light", "dark", "flat"])
|
|
55
|
+
const flatShades: ColorShades = {}
|
|
56
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
57
|
+
if (!modeKeys.has(k) && typeof v === "string") {
|
|
58
|
+
flatShades[k] = v
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const allShades = [
|
|
63
|
+
...new Set([
|
|
64
|
+
...Object.keys(modeLight),
|
|
65
|
+
...Object.keys(modeDark),
|
|
66
|
+
...Object.keys(modeFlat),
|
|
67
|
+
...Object.keys(flatShades)
|
|
68
|
+
])
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
if (autogenerate) {
|
|
72
|
+
if (Object.keys(modeLight).length === 0) {
|
|
73
|
+
for (const shade of allShades) {
|
|
74
|
+
const value = flatShades[shade] ?? modeFlat[shade] ?? modeDark[shade]
|
|
75
|
+
if (value) modeLight[shade] = generateLightShade(shade, value)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (Object.keys(modeDark).length === 0) {
|
|
79
|
+
for (const shade of allShades) {
|
|
80
|
+
const value = flatShades[shade] ?? modeFlat[shade] ?? modeLight[shade]
|
|
81
|
+
if (value) modeDark[shade] = generateDarkShade(shade, value)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const light: ColorShades = {}
|
|
87
|
+
const dark: ColorShades = {}
|
|
88
|
+
const flat: ColorShades = {}
|
|
89
|
+
|
|
90
|
+
for (const shade of allShades) {
|
|
91
|
+
const lv = modeLight[shade] ?? flatShades[shade] ?? modeFlat[shade] ?? modeDark[shade]
|
|
92
|
+
if (lv !== undefined) light[shade] = lv
|
|
93
|
+
|
|
94
|
+
const dv = modeDark[shade] ?? flatShades[shade] ?? modeFlat[shade] ?? modeLight[shade]
|
|
95
|
+
if (dv !== undefined) dark[shade] = dv
|
|
96
|
+
|
|
97
|
+
const fv = modeFlat[shade] ?? flatShades[shade] ?? modeLight[shade] ?? modeDark[shade]
|
|
98
|
+
if (fv !== undefined) flat[shade] = fv
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return { light, dark, flat }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const createScale = (colorName: string, shadeKeys: string[]) => ({
|
|
105
|
+
DEFAULT: `var(--${colorName})`,
|
|
106
|
+
foreground: `var(--${colorName}-foreground)`,
|
|
107
|
+
accent: `var(--${colorName}-accent)`,
|
|
108
|
+
...Object.fromEntries(
|
|
109
|
+
shadeKeys.flatMap((shade) => [
|
|
110
|
+
[shade, `var(--color-${colorName}-${shade})`],
|
|
111
|
+
[`${shade}-f`, `var(--color-${colorName}-${shade}-f)`],
|
|
112
|
+
[`${shade}-l`, `var(--color-${colorName}-${shade}-l)`],
|
|
113
|
+
[`${shade}-d`, `var(--color-${colorName}-${shade}-d)`]
|
|
114
|
+
])
|
|
115
|
+
)
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
export interface RimelightPresetOptions {
|
|
119
|
+
colors?: Record<string, ColorConfigValue>
|
|
120
|
+
autogenerateColorModes?: boolean
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export default definePreset((options?: RimelightPresetOptions) => {
|
|
124
|
+
const userColors = options?.colors ?? {}
|
|
125
|
+
const autoGen = options?.autogenerateColorModes ?? true
|
|
126
|
+
const coreColors = [...defaultColors, "neutral"]
|
|
127
|
+
const mergedColorScales = { ...defaultColorScales, ...userColors }
|
|
128
|
+
const allColors = [...new Set([...coreColors, ...Object.keys(userColors)])]
|
|
129
|
+
|
|
130
|
+
const resolvedColors = Object.fromEntries(
|
|
131
|
+
Object.entries(mergedColorScales).map(([name, entry]) => [
|
|
132
|
+
name,
|
|
133
|
+
resolveColorModes(entry, autoGen)
|
|
134
|
+
])
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
const safelist = allColors.flatMap((color) => ["rl-color-" + color])
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
name: "rimelight-ui",
|
|
141
|
+
safelist,
|
|
142
|
+
presets: [
|
|
143
|
+
presetWind4(),
|
|
144
|
+
presetTypography({
|
|
145
|
+
cssExtend: {
|
|
146
|
+
"h1,h2,h3,h4,h5,h6": {
|
|
147
|
+
"font-family": "var(--font-sans), system-ui, sans-serif"
|
|
148
|
+
},
|
|
149
|
+
"p,li,blockquote,code": {
|
|
150
|
+
"font-family": "var(--font-sans), system-ui, sans-serif"
|
|
151
|
+
},
|
|
152
|
+
"pre,code": {
|
|
153
|
+
"font-family": "var(--font-mono), monospace"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
presetIcons({
|
|
158
|
+
extraProperties: {
|
|
159
|
+
"display": "inline-block",
|
|
160
|
+
"vertical-align": "middle"
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
],
|
|
164
|
+
transformers: [transformerDirectives(), transformerVariantGroup()],
|
|
165
|
+
|
|
166
|
+
outputToCssLayers: true,
|
|
167
|
+
layers: {
|
|
168
|
+
theme: 1,
|
|
169
|
+
preflights: 2,
|
|
170
|
+
shortcuts: 3,
|
|
171
|
+
default: 4
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
content: {
|
|
175
|
+
pipeline: {
|
|
176
|
+
include: [
|
|
177
|
+
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
|
|
178
|
+
"src/**/*.{js,ts,jsx,tsx,vue,svelte,astro}",
|
|
179
|
+
uiSrcGlob,
|
|
180
|
+
"../ui/src/**/*.{js,ts,jsx,tsx,vue,svelte,astro}"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
filesystem: [uiFilesystemGlob, "../ui/src/**/*", "src/components/**/*", "src/pages/**/*"]
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
shortcuts: {
|
|
187
|
+
"container": "mx-auto w-full max-w-90rem px-md",
|
|
188
|
+
"sr-only":
|
|
189
|
+
"absolute w-px h-px p-0 m-0 overflow-hidden clip-rect-1-1-1-1 whitespace-nowrap border-0"
|
|
190
|
+
},
|
|
191
|
+
rules: [
|
|
192
|
+
[
|
|
193
|
+
/^clip-rect-(\d+)-(\d+)-(\d+)-(\d+)$/,
|
|
194
|
+
([, t, r, b, l]) => ({ clip: `rect(${t}px, ${r}px, ${b}px, ${l}px)` })
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
/^rl-color-(.+)$/,
|
|
198
|
+
([, color]) => ({
|
|
199
|
+
"--rl-bg": `var(--color-${color}-500)`,
|
|
200
|
+
"--rl-bg-hover": `var(--color-${color}-600)`,
|
|
201
|
+
"--rl-text": `var(--color-${color}-600)`,
|
|
202
|
+
"--rl-ring": `var(--color-${color}-500)`,
|
|
203
|
+
"--rl-border": `var(--color-${color}-500)`,
|
|
204
|
+
"--rl-bg-f": `var(--color-${color}-500-f)`,
|
|
205
|
+
"--rl-bg-hover-f": `var(--color-${color}-600-f)`,
|
|
206
|
+
"--rl-text-f": `var(--color-${color}-600-f)`,
|
|
207
|
+
"--rl-ring-f": `var(--color-${color}-500-f)`,
|
|
208
|
+
"--rl-border-f": `var(--color-${color}-500-f)`,
|
|
209
|
+
"--rl-bg-l": `var(--color-${color}-500-l)`,
|
|
210
|
+
"--rl-bg-hover-l": `var(--color-${color}-600-l)`,
|
|
211
|
+
"--rl-text-l": `var(--color-${color}-600-l)`,
|
|
212
|
+
"--rl-ring-l": `var(--color-${color}-500-l)`,
|
|
213
|
+
"--rl-border-l": `var(--color-${color}-500-l)`,
|
|
214
|
+
"--rl-bg-d": `var(--color-${color}-500-d)`,
|
|
215
|
+
"--rl-bg-hover-d": `var(--color-${color}-600-d)`,
|
|
216
|
+
"--rl-text-d": `var(--color-${color}-600-d)`,
|
|
217
|
+
"--rl-ring-d": `var(--color-${color}-500-d)`,
|
|
218
|
+
"--rl-border-d": `var(--color-${color}-500-d)`
|
|
219
|
+
})
|
|
220
|
+
],
|
|
221
|
+
[
|
|
222
|
+
"rl-flat",
|
|
223
|
+
{
|
|
224
|
+
"--rl-bg": "var(--rl-bg-f)",
|
|
225
|
+
"--rl-bg-hover": "var(--rl-bg-hover-f)",
|
|
226
|
+
"--rl-text": "var(--rl-text-f)",
|
|
227
|
+
"--rl-ring": "var(--rl-ring-f)",
|
|
228
|
+
"--rl-border": "var(--rl-border-f)"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"rl-light",
|
|
233
|
+
{
|
|
234
|
+
"--rl-bg": "var(--rl-bg-l, var(--rl-bg-f))",
|
|
235
|
+
"--rl-bg-hover": "var(--rl-bg-hover-l, var(--rl-bg-hover-f))",
|
|
236
|
+
"--rl-text": "var(--rl-text-l, var(--rl-text-f))",
|
|
237
|
+
"--rl-ring": "var(--rl-ring-l, var(--rl-ring-f))",
|
|
238
|
+
"--rl-border": "var(--rl-border-l, var(--rl-border-f))"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
[
|
|
242
|
+
"rl-dark",
|
|
243
|
+
{
|
|
244
|
+
"--rl-bg": "var(--rl-bg-d, var(--rl-bg-f))",
|
|
245
|
+
"--rl-bg-hover": "var(--rl-bg-hover-d, var(--rl-bg-hover-f))",
|
|
246
|
+
"--rl-text": "var(--rl-text-d, var(--rl-text-f))",
|
|
247
|
+
"--rl-ring": "var(--rl-ring-d, var(--rl-ring-f))",
|
|
248
|
+
"--rl-border": "var(--rl-border-d, var(--rl-border-f))"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
/^(text)-(default|inverted)(?:\/(\d+))?$/,
|
|
253
|
+
([, , name, opacity]) =>
|
|
254
|
+
opacity
|
|
255
|
+
? { color: `color-mix(in srgb, var(--text-color-${name}) ${opacity}%, transparent)` }
|
|
256
|
+
: { color: `var(--text-color-${name})` }
|
|
257
|
+
],
|
|
258
|
+
[
|
|
259
|
+
/^(bg)-(default|inverted)(?:\/(\d+))?$/,
|
|
260
|
+
([, , name, opacity]) =>
|
|
261
|
+
opacity
|
|
262
|
+
? {
|
|
263
|
+
"background-color": `color-mix(in srgb, var(--background-color-${name}) ${opacity}%, transparent)`
|
|
264
|
+
}
|
|
265
|
+
: { "background-color": `var(--background-color-${name})` }
|
|
266
|
+
],
|
|
267
|
+
[
|
|
268
|
+
/^(ring)-(default|inverted)(?:\/(\d+))?$/,
|
|
269
|
+
([, , name, opacity]) =>
|
|
270
|
+
opacity
|
|
271
|
+
? {
|
|
272
|
+
"--un-ring-color": `color-mix(in srgb, var(--ring-color-${name}) ${opacity}%, transparent)`
|
|
273
|
+
}
|
|
274
|
+
: { "--un-ring-color": `var(--ring-color-${name})` }
|
|
275
|
+
],
|
|
276
|
+
[
|
|
277
|
+
/^(divide)-(default)(?:\/(\d+))?$/,
|
|
278
|
+
([, , name, opacity]) =>
|
|
279
|
+
opacity
|
|
280
|
+
? {
|
|
281
|
+
"border-color": `color-mix(in srgb, var(--divide-color-${name}) ${opacity}%, transparent)`
|
|
282
|
+
}
|
|
283
|
+
: { "border-color": `var(--divide-color-${name})` }
|
|
284
|
+
],
|
|
285
|
+
[
|
|
286
|
+
/^(border)-(default)(?:\/(\d+))?$/,
|
|
287
|
+
([, , name, opacity]) =>
|
|
288
|
+
opacity
|
|
289
|
+
? {
|
|
290
|
+
"border-color": `color-mix(in srgb, var(--border-color-${name}) ${opacity}%, transparent)`
|
|
291
|
+
}
|
|
292
|
+
: { "border-color": `var(--border-color-${name})` }
|
|
293
|
+
],
|
|
294
|
+
[
|
|
295
|
+
/^(outline)-(inverted)(?:\/(\d+))?$/,
|
|
296
|
+
([, , name, opacity]) =>
|
|
297
|
+
opacity
|
|
298
|
+
? {
|
|
299
|
+
"outline-color": `color-mix(in srgb, var(--ring-color-${name}) ${opacity}%, transparent)`
|
|
300
|
+
}
|
|
301
|
+
: { "outline-color": `var(--ring-color-${name})` }
|
|
302
|
+
]
|
|
303
|
+
],
|
|
304
|
+
|
|
305
|
+
theme: {
|
|
306
|
+
spacing: {
|
|
307
|
+
"6xs": "0.125rem",
|
|
308
|
+
"5xs": "0.25rem",
|
|
309
|
+
"4xs": "0.375rem",
|
|
310
|
+
"3xs": "0.5rem",
|
|
311
|
+
"2xs": "0.625rem",
|
|
312
|
+
"xs": "0.75rem",
|
|
313
|
+
"sm": "0.875rem",
|
|
314
|
+
"md": "1rem",
|
|
315
|
+
"lg": "1.25rem",
|
|
316
|
+
"xl": "1.5rem",
|
|
317
|
+
"2xl": "2rem",
|
|
318
|
+
"3xl": "3rem",
|
|
319
|
+
"4xl": "4rem",
|
|
320
|
+
"5xl": "6rem",
|
|
321
|
+
"6xl": "8rem"
|
|
322
|
+
},
|
|
323
|
+
colors: {
|
|
324
|
+
"background": "var(--background)",
|
|
325
|
+
"foreground": "var(--foreground)",
|
|
326
|
+
"card": {
|
|
327
|
+
DEFAULT: "var(--card)",
|
|
328
|
+
foreground: "var(--card-foreground)"
|
|
329
|
+
},
|
|
330
|
+
"popover": {
|
|
331
|
+
DEFAULT: "var(--popover)",
|
|
332
|
+
foreground: "var(--popover-foreground)"
|
|
333
|
+
},
|
|
334
|
+
...Object.fromEntries(
|
|
335
|
+
allColors.map((color) => {
|
|
336
|
+
const m = resolvedColors[color]!
|
|
337
|
+
const shadeKeys = [
|
|
338
|
+
...new Set([...Object.keys(m.light), ...Object.keys(m.dark), ...Object.keys(m.flat)])
|
|
339
|
+
]
|
|
340
|
+
return [color, createScale(color, shadeKeys)]
|
|
341
|
+
})
|
|
342
|
+
),
|
|
343
|
+
"muted": {
|
|
344
|
+
DEFAULT: "var(--muted)",
|
|
345
|
+
foreground: "var(--muted-foreground)"
|
|
346
|
+
},
|
|
347
|
+
"accent": {
|
|
348
|
+
DEFAULT: "var(--accent)",
|
|
349
|
+
foreground: "var(--accent-foreground)"
|
|
350
|
+
},
|
|
351
|
+
"border": "var(--border)",
|
|
352
|
+
"input": "var(--input)",
|
|
353
|
+
"outline": "var(--outline)",
|
|
354
|
+
"ring": "var(--ring)",
|
|
355
|
+
"destructive": {
|
|
356
|
+
DEFAULT: "var(--destructive)",
|
|
357
|
+
subtle: "var(--color-destructive-subtle)"
|
|
358
|
+
},
|
|
359
|
+
"sidebar": {
|
|
360
|
+
DEFAULT: "var(--sidebar)",
|
|
361
|
+
foreground: "var(--sidebar-foreground)",
|
|
362
|
+
primary: {
|
|
363
|
+
DEFAULT: "var(--sidebar-primary)",
|
|
364
|
+
foreground: "var(--sidebar-primary-foreground)"
|
|
365
|
+
},
|
|
366
|
+
accent: {
|
|
367
|
+
DEFAULT: "var(--sidebar-accent)",
|
|
368
|
+
foreground: "var(--sidebar-accent-foreground)"
|
|
369
|
+
},
|
|
370
|
+
border: "var(--sidebar-border)",
|
|
371
|
+
ring: "var(--sidebar-ring)"
|
|
372
|
+
},
|
|
373
|
+
"chart": {
|
|
374
|
+
"1": "var(--chart-1)",
|
|
375
|
+
"2": "var(--chart-2)",
|
|
376
|
+
"3": "var(--chart-3)",
|
|
377
|
+
"4": "var(--chart-4)",
|
|
378
|
+
"5": "var(--chart-5)"
|
|
379
|
+
},
|
|
380
|
+
"hover": "var(--color-hover)",
|
|
381
|
+
"surface": "var(--color-surface)",
|
|
382
|
+
"muted-strong": "var(--color-muted-strong)",
|
|
383
|
+
"foreground-secondary": "var(--color-foreground-secondary)",
|
|
384
|
+
"foreground-tertiary": "var(--color-foreground-tertiary)",
|
|
385
|
+
"placeholder": "var(--color-placeholder)",
|
|
386
|
+
"input-border": "var(--color-input-border)",
|
|
387
|
+
"accent-subtle": "var(--color-accent-subtle)",
|
|
388
|
+
"elevated": "var(--background-color-elevated)",
|
|
389
|
+
"accented": "var(--ring-color-accented)",
|
|
390
|
+
"dimmed": "var(--text-color-dimmed)",
|
|
391
|
+
"toned": "var(--text-color-toned)",
|
|
392
|
+
"highlighted": "var(--text-color-highlighted)"
|
|
393
|
+
},
|
|
394
|
+
radius: {
|
|
395
|
+
"xs": "calc(var(--radius) - 0.375rem)",
|
|
396
|
+
"sm": "calc(var(--radius) - 0.25rem)",
|
|
397
|
+
"md": "calc(var(--radius) - 0.125rem)",
|
|
398
|
+
"lg": "var(--radius)",
|
|
399
|
+
"xl": "calc(var(--radius) + 0.25rem)",
|
|
400
|
+
"2xl": "calc(var(--radius) + 0.5rem)",
|
|
401
|
+
"3xl": "calc(var(--radius) + 1rem)"
|
|
402
|
+
},
|
|
403
|
+
animation: {
|
|
404
|
+
keyframes: {
|
|
405
|
+
"accordion-down":
|
|
406
|
+
"{ from { height: 0; } to { height: var(--starwind-accordion-content-height); } }",
|
|
407
|
+
"accordion-up":
|
|
408
|
+
"{ from { height: var(--starwind-accordion-content-height); } to { height: 0; } }",
|
|
409
|
+
"marquee": "{ from { transform: translateX(0); } to { transform: translateX(-100%); } }"
|
|
410
|
+
},
|
|
411
|
+
durations: {
|
|
412
|
+
"accordion-down": "0.2s",
|
|
413
|
+
"accordion-up": "0.2s",
|
|
414
|
+
"marquee": "30s"
|
|
415
|
+
},
|
|
416
|
+
timingFns: {
|
|
417
|
+
"accordion-down": "ease-out",
|
|
418
|
+
"accordion-up": "ease-out",
|
|
419
|
+
"marquee": "linear"
|
|
420
|
+
},
|
|
421
|
+
counts: { marquee: "infinite" }
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
preflights: [
|
|
426
|
+
{
|
|
427
|
+
getCSS: () => {
|
|
428
|
+
const lightLines = Object.entries(resolvedColors)
|
|
429
|
+
.flatMap(([color, modes]) =>
|
|
430
|
+
Object.entries(modes.light).map(
|
|
431
|
+
([shade, value]) => ` --color-${color}-${shade}: ${value};`
|
|
432
|
+
)
|
|
433
|
+
)
|
|
434
|
+
.join("\n")
|
|
435
|
+
|
|
436
|
+
const flatLines = Object.entries(resolvedColors)
|
|
437
|
+
.flatMap(([color, modes]) => {
|
|
438
|
+
const u = modes.flat
|
|
439
|
+
return Object.entries(u).map(
|
|
440
|
+
([shade, value]) => ` --color-${color}-${shade}-f: ${value};`
|
|
441
|
+
)
|
|
442
|
+
})
|
|
443
|
+
.join("\n")
|
|
444
|
+
|
|
445
|
+
const lightPinnedLines = Object.entries(resolvedColors)
|
|
446
|
+
.flatMap(([color, modes]) =>
|
|
447
|
+
Object.entries(modes.light)
|
|
448
|
+
.filter(([shade, value]) => value !== modes.flat[shade])
|
|
449
|
+
.map(([shade, value]) => ` --color-${color}-${shade}-l: ${value};`)
|
|
450
|
+
)
|
|
451
|
+
.join("\n")
|
|
452
|
+
|
|
453
|
+
const darkPinnedLines = Object.entries(resolvedColors)
|
|
454
|
+
.flatMap(([color, modes]) =>
|
|
455
|
+
Object.entries(modes.dark)
|
|
456
|
+
.filter(([shade, value]) => value !== modes.flat[shade])
|
|
457
|
+
.map(([shade, value]) => ` --color-${color}-${shade}-d: ${value};`)
|
|
458
|
+
)
|
|
459
|
+
.join("\n")
|
|
460
|
+
|
|
461
|
+
const darkLines = Object.entries(resolvedColors)
|
|
462
|
+
.flatMap(([color, modes]) =>
|
|
463
|
+
Object.entries(modes.dark)
|
|
464
|
+
.filter(([shade, value]) => modes.light[shade] !== value)
|
|
465
|
+
.map(([shade, value]) => ` --color-${color}-${shade}: ${value};`)
|
|
466
|
+
)
|
|
467
|
+
.join("\n")
|
|
468
|
+
|
|
469
|
+
return `
|
|
470
|
+
:root {
|
|
471
|
+
--background: #ffffff;
|
|
472
|
+
--foreground: #030712;
|
|
473
|
+
--card: #ffffff;
|
|
474
|
+
--card-foreground: #030712;
|
|
475
|
+
--popover: #ffffff;
|
|
476
|
+
--popover-foreground: #030712;
|
|
477
|
+
--primary: #0064d7;
|
|
478
|
+
--primary-foreground: #ffffff;
|
|
479
|
+
--primary-accent: #0050ac;
|
|
480
|
+
--secondary: #8b5cf6;
|
|
481
|
+
--secondary-foreground: #f9fafb;
|
|
482
|
+
--secondary-accent: #7c3aed;
|
|
483
|
+
--muted: #f3f4f6;
|
|
484
|
+
--muted-foreground: #4b5563;
|
|
485
|
+
--accent: #f3f4f6;
|
|
486
|
+
--accent-foreground: #111827;
|
|
487
|
+
--info: #3b82f6;
|
|
488
|
+
--info-foreground: #ffffff;
|
|
489
|
+
--info-accent: #2563eb;
|
|
490
|
+
--success: #22c55e;
|
|
491
|
+
--success-foreground: #ffffff;
|
|
492
|
+
--success-accent: #16a34a;
|
|
493
|
+
--warning: #f59e0b;
|
|
494
|
+
--warning-foreground: #000000;
|
|
495
|
+
--warning-accent: #d97706;
|
|
496
|
+
--error: #ef4444;
|
|
497
|
+
--error-foreground: #f9fafb;
|
|
498
|
+
--error-accent: #dc2626;
|
|
499
|
+
--commentary: #ec4899;
|
|
500
|
+
--commentary-foreground: #f9fafb;
|
|
501
|
+
--commentary-accent: #db2777;
|
|
502
|
+
--ideation: #8b5cf6;
|
|
503
|
+
--ideation-foreground: #f9fafb;
|
|
504
|
+
--ideation-accent: #7c3aed;
|
|
505
|
+
--source: #38bdf8;
|
|
506
|
+
--source-foreground: #0f172a;
|
|
507
|
+
--source-accent: #0284c7;
|
|
508
|
+
--border: #e5e7eb;
|
|
509
|
+
--input: #e5e7eb;
|
|
510
|
+
--outline: #9ca3af;
|
|
511
|
+
--ring: #9ca3af;
|
|
512
|
+
--radius: 0.625rem;
|
|
513
|
+
--sidebar: #f9fafb;
|
|
514
|
+
--sidebar-foreground: #030712;
|
|
515
|
+
--sidebar-primary: #1d4ed8;
|
|
516
|
+
--sidebar-primary-foreground: #f9fafb;
|
|
517
|
+
--sidebar-accent: #f3f4f6;
|
|
518
|
+
--sidebar-accent-foreground: #111827;
|
|
519
|
+
--sidebar-border: #e5e7eb;
|
|
520
|
+
--sidebar-ring: #9ca3af;
|
|
521
|
+
--chart-1: #3b82f6;
|
|
522
|
+
--chart-2: #6366f1;
|
|
523
|
+
--chart-3: #8b5cf6;
|
|
524
|
+
--chart-4: #a855f7;
|
|
525
|
+
--chart-5: #ec4899;
|
|
526
|
+
--destructive: #ef4444;
|
|
527
|
+
--color-surface: #ffffff;
|
|
528
|
+
--color-muted-strong: #e5e7eb;
|
|
529
|
+
--color-foreground-secondary: #4b5563;
|
|
530
|
+
--color-foreground-tertiary: #6b7280;
|
|
531
|
+
--color-placeholder: #9ca3af;
|
|
532
|
+
--color-input-border: #d1d5db;
|
|
533
|
+
--color-hover: #f3f4f6;
|
|
534
|
+
--color-destructive-subtle: #fef2f2;
|
|
535
|
+
--color-accent-subtle: #eff6ff;
|
|
536
|
+
--font-sans: "Noto Sans", sans-serif;
|
|
537
|
+
--font-serif: "Noto Serif", serif;
|
|
538
|
+
--font-mono: "Noto Sans Mono", monospace;
|
|
539
|
+
|
|
540
|
+
--ui-header-height: 4rem;
|
|
541
|
+
--ui-container: 80rem;
|
|
542
|
+
--text-color-default: var(--color-neutral-700);
|
|
543
|
+
--text-color-muted: var(--color-neutral-500);
|
|
544
|
+
--text-color-dimmed: var(--color-neutral-400);
|
|
545
|
+
--text-color-toned: var(--color-neutral-600);
|
|
546
|
+
--text-color-highlighted: var(--color-neutral-900);
|
|
547
|
+
--text-color-inverted: #ffffff;
|
|
548
|
+
--background-color-default: #ffffff;
|
|
549
|
+
--background-color-muted: var(--color-neutral-50);
|
|
550
|
+
--background-color-elevated: var(--color-neutral-100);
|
|
551
|
+
--background-color-accented: var(--color-neutral-200);
|
|
552
|
+
--background-color-inverted: var(--color-neutral-900);
|
|
553
|
+
--border-color-default: var(--color-neutral-200);
|
|
554
|
+
--border-color-muted: var(--color-neutral-200);
|
|
555
|
+
--border-color-accented: var(--color-neutral-300);
|
|
556
|
+
--border-color-inverted: var(--color-neutral-900);
|
|
557
|
+
--ring-color-default: var(--color-neutral-200);
|
|
558
|
+
--ring-color-muted: var(--color-neutral-200);
|
|
559
|
+
--ring-color-accented: var(--color-neutral-300);
|
|
560
|
+
--ring-color-inverted: var(--color-neutral-900);
|
|
561
|
+
--divide-color-default: var(--color-neutral-200);
|
|
562
|
+
${lightLines}
|
|
563
|
+
${flatLines}
|
|
564
|
+
${lightPinnedLines}
|
|
565
|
+
${darkPinnedLines}
|
|
566
|
+
|
|
567
|
+
/* Shiki / Expressive Code */
|
|
568
|
+
--shiki-foreground: #e1e4e8;
|
|
569
|
+
--shiki-background: #1f2428;
|
|
570
|
+
--shiki-token-keyword: #f97583;
|
|
571
|
+
--shiki-token-string: #9ecbff;
|
|
572
|
+
--shiki-token-comment: #6a737d;
|
|
573
|
+
--shiki-token-function: #b392f0;
|
|
574
|
+
--shiki-token-constant: #79b8ff;
|
|
575
|
+
--shiki-token-parameter: #ffab70;
|
|
576
|
+
--shiki-token-punctuation: #e1e4e8;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.dark {
|
|
580
|
+
--background: #030712;
|
|
581
|
+
--foreground: #f9fafb;
|
|
582
|
+
--card: #111827;
|
|
583
|
+
--card-foreground: #f9fafb;
|
|
584
|
+
--popover: #1f2937;
|
|
585
|
+
--popover-foreground: #f9fafb;
|
|
586
|
+
--primary: #3b82f6;
|
|
587
|
+
--primary-foreground: #ffffff;
|
|
588
|
+
--primary-accent: #60a5fa;
|
|
589
|
+
--secondary: #8b5cf6;
|
|
590
|
+
--secondary-foreground: #f9fafb;
|
|
591
|
+
--secondary-accent: #a78bfa;
|
|
592
|
+
--muted: #1f2937;
|
|
593
|
+
--muted-foreground: #9ca3af;
|
|
594
|
+
--accent: #374151;
|
|
595
|
+
--accent-foreground: #f3f4f6;
|
|
596
|
+
--info: #3b82f6;
|
|
597
|
+
--info-foreground: #ffffff;
|
|
598
|
+
--info-accent: #60a5fa;
|
|
599
|
+
--success: #22c55e;
|
|
600
|
+
--success-foreground: #ffffff;
|
|
601
|
+
--success-accent: #4ade80;
|
|
602
|
+
--warning: #f59e0b;
|
|
603
|
+
--warning-foreground: #000000;
|
|
604
|
+
--warning-accent: #fbbf24;
|
|
605
|
+
--error: #ef4444;
|
|
606
|
+
--error-foreground: #f9fafb;
|
|
607
|
+
--error-accent: #f87171;
|
|
608
|
+
--commentary: #f472b6;
|
|
609
|
+
--commentary-foreground: #0f172a;
|
|
610
|
+
--commentary-accent: #f9a8d4;
|
|
611
|
+
--ideation: #a78bfa;
|
|
612
|
+
--ideation-foreground: #0f172a;
|
|
613
|
+
--ideation-accent: #c4b5fd;
|
|
614
|
+
--source: #7dd3fc;
|
|
615
|
+
--source-foreground: #0f172a;
|
|
616
|
+
--source-accent: #bae6fd;
|
|
617
|
+
--border: rgba(249, 250, 251, 0.1);
|
|
618
|
+
--input: rgba(249, 250, 251, 0.15);
|
|
619
|
+
--outline: #6b7280;
|
|
620
|
+
--ring: #6b7280;
|
|
621
|
+
--sidebar: #111827;
|
|
622
|
+
--sidebar-foreground: #f9fafb;
|
|
623
|
+
--sidebar-primary: #1d4ed8;
|
|
624
|
+
--sidebar-primary-foreground: #f9fafb;
|
|
625
|
+
--sidebar-accent: #1f2937;
|
|
626
|
+
--sidebar-accent-foreground: #f3f4f6;
|
|
627
|
+
--sidebar-border: #1f2937;
|
|
628
|
+
--sidebar-ring: #6b7280;
|
|
629
|
+
--chart-1: #60a5fa;
|
|
630
|
+
--chart-2: #818cf8;
|
|
631
|
+
--chart-3: #a78bfa;
|
|
632
|
+
--chart-4: #c084fc;
|
|
633
|
+
--chart-5: #f472b6;
|
|
634
|
+
--destructive: #f87171;
|
|
635
|
+
--color-surface: #1f2937;
|
|
636
|
+
--color-muted-strong: #374151;
|
|
637
|
+
--color-foreground-secondary: #d1d5db;
|
|
638
|
+
--color-foreground-tertiary: #9ca3af;
|
|
639
|
+
--color-placeholder: #6b7280;
|
|
640
|
+
--color-input-border: #4b5563;
|
|
641
|
+
--color-hover: #374151;
|
|
642
|
+
--color-destructive-subtle: #451a1a;
|
|
643
|
+
--color-accent-subtle: #1e293b;
|
|
644
|
+
|
|
645
|
+
--text-color-default: var(--color-neutral-200);
|
|
646
|
+
--text-color-muted: var(--color-neutral-400);
|
|
647
|
+
--text-color-dimmed: var(--color-neutral-500);
|
|
648
|
+
--text-color-toned: var(--color-neutral-300);
|
|
649
|
+
--text-color-highlighted: #ffffff;
|
|
650
|
+
--text-color-inverted: #030712;
|
|
651
|
+
--background-color-default: var(--color-neutral-900);
|
|
652
|
+
--background-color-muted: var(--color-neutral-800);
|
|
653
|
+
--background-color-elevated: var(--color-neutral-800);
|
|
654
|
+
--background-color-accented: var(--color-neutral-700);
|
|
655
|
+
--background-color-inverted: #ffffff;
|
|
656
|
+
--border-color-default: var(--color-neutral-800);
|
|
657
|
+
--border-color-muted: var(--color-neutral-700);
|
|
658
|
+
--border-color-accented: var(--color-neutral-700);
|
|
659
|
+
--border-color-inverted: #ffffff;
|
|
660
|
+
--ring-color-default: var(--color-neutral-800);
|
|
661
|
+
--ring-color-muted: var(--color-neutral-700);
|
|
662
|
+
--ring-color-accented: var(--color-neutral-700);
|
|
663
|
+
--ring-color-inverted: #ffffff;
|
|
664
|
+
--divide-color-default: var(--color-neutral-800);
|
|
665
|
+
${darkLines}
|
|
666
|
+
|
|
667
|
+
/* Shiki / Expressive Code */
|
|
668
|
+
--shiki-foreground: #e1e4e8;
|
|
669
|
+
--shiki-background: #1f2428;
|
|
670
|
+
--shiki-token-keyword: #f97583;
|
|
671
|
+
--shiki-token-string: #9ecbff;
|
|
672
|
+
--shiki-token-comment: #6a737d;
|
|
673
|
+
--shiki-token-function: #b392f0;
|
|
674
|
+
--shiki-token-constant: #79b8ff;
|
|
675
|
+
--shiki-token-parameter: #ffab70;
|
|
676
|
+
--shiki-token-punctuation: #e1e4e8;
|
|
677
|
+
}
|
|
678
|
+
`
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
})
|