mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
wip: css/ui and desktop work
This commit is contained in:
31
packages/css/script/colors.ts
Normal file
31
packages/css/script/colors.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
// read lines from colors.txt
|
||||
// parse each line into a color name and hex value
|
||||
// create a css variable for each color
|
||||
// NOTE: only use Bun file APIs here
|
||||
|
||||
const colors = await Bun.file(import.meta.dir + "/colors.txt").text()
|
||||
|
||||
const variables = []
|
||||
for (const line of colors.split("\n")) {
|
||||
if (!line.trim()) continue
|
||||
const [variable] = line.trim().split(":")
|
||||
const name = variable!.trim().substring(2)
|
||||
variables.push(`--color-${name}: var(--${name});`)
|
||||
}
|
||||
|
||||
const output = `
|
||||
/* Generated by script/colors.ts */
|
||||
/* Do not edit this file manually */
|
||||
|
||||
@theme {
|
||||
--color-*: initial;
|
||||
${variables.join("\n ")}
|
||||
}
|
||||
`
|
||||
|
||||
// write to src/tailwind-colors.css
|
||||
Bun.file(import.meta.dir + "/../src/tailwind-colors.css").write(output.trim())
|
||||
|
||||
// Bun.file(import.meta.dir + "../src/tailwind-colors.css").write(output.trim())
|
||||
214
packages/css/script/colors.txt
Normal file
214
packages/css/script/colors.txt
Normal file
@@ -0,0 +1,214 @@
|
||||
--background-base: #f8f7f7;
|
||||
--background-weak: var(--smoke-light-3);
|
||||
--background-strong: var(--smoke-light-1);
|
||||
--background-stronger: #fcfcfc;
|
||||
--base: var(--smoke-light-alpha-2);
|
||||
--surface-base: var(--smoke-light-alpha-2);
|
||||
--base2: var(--smoke-light-alpha-2);
|
||||
--base3: var(--smoke-light-alpha-2);
|
||||
--surface-inset-base: var(--smoke-light-alpha-3);
|
||||
--surface-inset-base-hover: var(--smoke-light-alpha-3);
|
||||
--surface-inset-strong: #1f000017;
|
||||
--surface-inset-strong-hover: #1f000017;
|
||||
--surface-raised-base: var(--smoke-light-alpha-1);
|
||||
--surface-float-base: var(--smoke-dark-1);
|
||||
--surface-float-base-hover: var(--smoke-dark-2);
|
||||
--surface-raised-base-hover: var(--smoke-light-alpha-2);
|
||||
--surface-raised-strong: var(--smoke-light-1);
|
||||
--surface-raised-strong-hover: var(--white);
|
||||
--surface-raised-stronger: var(--white);
|
||||
--surface-raised-stronger-hover: var(--white);
|
||||
--surface-weak: var(--smoke-light-alpha-3);
|
||||
--surface-weaker: var(--smoke-light-alpha-4);
|
||||
--surface-strong: #ffffff;
|
||||
--surface-raised-stronger-non-alpha: var(--white);
|
||||
--surface-brand-base: var(--yuzu-light-9);
|
||||
--surface-brand-hover: var(--yuzu-light-10);
|
||||
--surface-interactive-base: var(--cobalt-light-3);
|
||||
--surface-interactive-hover: var(--cobalt-light-4);
|
||||
--surface-interactive-weak: var(--cobalt-light-2);
|
||||
--surface-interactive-weak-hover: var(--cobalt-light-3);
|
||||
--surface-success-base: var(--apple-light-3);
|
||||
--surface-success-weak: var(--apple-light-2);
|
||||
--surface-success-strong: var(--apple-light-9);
|
||||
--surface-warning-base: var(--solaris-light-3);
|
||||
--surface-warning-weak: var(--solaris-light-2);
|
||||
--surface-warning-strong: var(--solaris-light-9);
|
||||
--surface-critical-base: var(--ember-light-3);
|
||||
--surface-critical-weak: var(--ember-light-2);
|
||||
--surface-critical-strong: var(--ember-light-9);
|
||||
--surface-info-base: var(--lilac-light-3);
|
||||
--surface-info-weak: var(--lilac-light-2);
|
||||
--surface-info-strong: var(--lilac-light-9);
|
||||
--surface-diff-skip-base: var(--smoke-light-3);
|
||||
--surface-diff-unchanged-base: #ffffff00;
|
||||
--surface-diff-hidden-base: var(--blue-light-3);
|
||||
--surface-diff-hidden-weak: var(--blue-light-2);
|
||||
--surface-diff-hidden-weaker: var(--blue-light-1);
|
||||
--surface-diff-hidden-strong: var(--blue-light-5);
|
||||
--surface-diff-hidden-stronger: var(--blue-light-9);
|
||||
--surface-diff-add-base: var(--mint-light-3);
|
||||
--surface-diff-add-weak: var(--mint-light-2);
|
||||
--surface-diff-add-weaker: var(--mint-light-1);
|
||||
--surface-diff-add-strong: var(--mint-light-5);
|
||||
--surface-diff-add-stronger: var(--mint-light-9);
|
||||
--surface-diff-delete-base: var(--ember-light-3);
|
||||
--surface-diff-delete-weak: var(--ember-light-2);
|
||||
--surface-diff-delete-weaker: var(--ember-light-1);
|
||||
--surface-diff-delete-strong: var(--ember-light-6);
|
||||
--surface-diff-delete-stronger: var(--ember-light-9);
|
||||
--text-base: var(--smoke-light-11);
|
||||
--input-base: var(--smoke-light-1);
|
||||
--input-hover: var(--smoke-light-2);
|
||||
--input-active: var(--cobalt-light-1);
|
||||
--input-selected: var(--cobalt-light-4);
|
||||
--input-focus: var(--cobalt-light-1);
|
||||
--input-disabled: var(--smoke-light-4);
|
||||
--text-weak: var(--smoke-light-9);
|
||||
--text-weaker: var(--smoke-light-8);
|
||||
--text-strong: var(--smoke-light-12);
|
||||
--text-on-brand-base: var(--smoke-light-alpha-11);
|
||||
--text-on-interactive-base: var(--smoke-light-1);
|
||||
--text-on-success-base: var(--smoke-dark-alpha-11);
|
||||
--text-on-warning-base: var(--smoke-dark-alpha-11);
|
||||
--text-on-info-base: var(--smoke-dark-alpha-11);
|
||||
--text-diff-add-base: var(--mint-light-11);
|
||||
--text-diff-delete-base: var(--ember-light-11);
|
||||
--text-diff-delete-strong: var(--ember-light-12);
|
||||
--text-diff-add-strong: var(--mint-light-12);
|
||||
--text-on-info-weak: var(--smoke-dark-alpha-9);
|
||||
--text-on-info-strong: var(--smoke-dark-alpha-12);
|
||||
--text-on-warning-weak: var(--smoke-dark-alpha-9);
|
||||
--text-on-warning-strong: var(--smoke-dark-alpha-12);
|
||||
--text-on-success-weak: var(--smoke-dark-alpha-9);
|
||||
--text-on-success-strong: var(--smoke-dark-alpha-12);
|
||||
--text-on-brand-weak: var(--smoke-light-alpha-9);
|
||||
--text-on-brand-weaker: var(--smoke-light-alpha-8);
|
||||
--text-on-brand-strong: var(--smoke-light-alpha-12);
|
||||
--button-secondary-base: #fdfcfc;
|
||||
--border-base: var(--smoke-light-alpha-7);
|
||||
--border-hover: var(--smoke-light-alpha-8);
|
||||
--border-active: var(--smoke-light-alpha-9);
|
||||
--border-selected: var(--cobalt-light-alpha-9);
|
||||
--border-disabled: var(--smoke-light-alpha-8);
|
||||
--border-focus: var(--smoke-light-alpha-9);
|
||||
--border-weak-base: var(--smoke-light-alpha-5);
|
||||
--border-strong-base: var(--smoke-light-alpha-7);
|
||||
--border-strong-hover: var(--smoke-light-alpha-8);
|
||||
--border-strong-active: var(--smoke-light-alpha-7);
|
||||
--border-strong-selected: var(--cobalt-light-alpha-6);
|
||||
--border-strong-disabled: var(--smoke-light-alpha-6);
|
||||
--border-strong-focus: var(--smoke-light-alpha-7);
|
||||
--border-weak-hover: var(--smoke-light-alpha-6);
|
||||
--border-weak-active: var(--smoke-light-alpha-7);
|
||||
--border-weak-selected: var(--cobalt-light-alpha-6);
|
||||
--border-weak-disabled: var(--smoke-light-alpha-6);
|
||||
--border-weak-focus: var(--smoke-light-alpha-7);
|
||||
--border-interactive-base: var(--cobalt-light-7);
|
||||
--border-interactive-hover: var(--cobalt-light-8);
|
||||
--border-interactive-active: var(--cobalt-light-9);
|
||||
--border-interactive-selected: var(--cobalt-light-9);
|
||||
--border-interactive-disabled: var(--smoke-light-8);
|
||||
--border-interactive-focus: var(--cobalt-light-9);
|
||||
--border-success-base: var(--apple-light-6);
|
||||
--border-success-hover: var(--apple-light-7);
|
||||
--border-success-selected: var(--apple-light-9);
|
||||
--border-warning-base: var(--solaris-light-6);
|
||||
--border-warning-hover: var(--solaris-light-7);
|
||||
--border-warning-selected: var(--solaris-light-9);
|
||||
--border-critical-base: var(--ember-light-6);
|
||||
--border-critical-hover: var(--ember-light-7);
|
||||
--border-critical-selected: var(--ember-light-9);
|
||||
--border-info-base: var(--lilac-light-6);
|
||||
--border-info-hover: var(--lilac-light-7);
|
||||
--border-info-selected: var(--lilac-light-9);
|
||||
--icon-base: var(--smoke-light-9);
|
||||
--icon-hover: var(--smoke-light-11);
|
||||
--icon-active: var(--smoke-light-12);
|
||||
--icon-selected: var(--smoke-light-12);
|
||||
--icon-disabled: var(--smoke-light-8);
|
||||
--icon-focus: var(--smoke-light-12);
|
||||
--icon-weak-base: var(--smoke-light-7);
|
||||
--icon-invert-base: #ffffff;
|
||||
--icon-weak-hover: var(--smoke-light-8);
|
||||
--icon-weak-active: var(--smoke-light-9);
|
||||
--icon-weak-selected: var(--smoke-light-10);
|
||||
--icon-weak-disabled: var(--smoke-light-6);
|
||||
--icon-weak-focus: var(--smoke-light-9);
|
||||
--icon-strong-base: var(--smoke-light-12);
|
||||
--icon-strong-hover: var(--smoke-light-12);
|
||||
--icon-strong-active: var(--smoke-light-12);
|
||||
--icon-strong-selected: var(--smoke-light-12);
|
||||
--icon-strong-disabled: var(--smoke-light-8);
|
||||
--icon-strong-focus: var(--smoke-light-12);
|
||||
--icon-brand-base: var(--smoke-light-12);
|
||||
--icon-interactive-base: var(--cobalt-light-9);
|
||||
--icon-success-base: var(--apple-light-7);
|
||||
--icon-success-hover: var(--apple-light-8);
|
||||
--icon-success-active: var(--apple-light-11);
|
||||
--icon-warning-base: var(--amber-light-7);
|
||||
--icon-warning-hover: var(--amber-light-8);
|
||||
--icon-warning-active: var(--amber-light-11);
|
||||
--icon-critical-base: var(--ember-light-7);
|
||||
--icon-critical-hover: var(--ember-light-8);
|
||||
--icon-critical-active: var(--ember-light-11);
|
||||
--icon-info-base: var(--lilac-light-7);
|
||||
--icon-info-hover: var(--lilac-light-8);
|
||||
--icon-info-active: var(--lilac-light-11);
|
||||
--icon-on-brand-base: var(--smoke-light-alpha-11);
|
||||
--icon-on-brand-hover: var(--smoke-light-alpha-12);
|
||||
--icon-on-brand-selected: var(--smoke-light-alpha-12);
|
||||
--icon-on-interactive-base: var(--smoke-light-alpha-9);
|
||||
--icon-on-interactive-hover: var(--smoke-light-alpha-10);
|
||||
--icon-on-interactive-selected: var(--smoke-light-alpha-11);
|
||||
--icon-agent-plan-base: var(--purple-light-9);
|
||||
--icon-agent-docs-base: var(--amber-light-9);
|
||||
--icon-agent-ask-base: var(--cyan-light-9);
|
||||
--icon-agent-build-base: var(--blue-light-9);
|
||||
--icon-on-success-base: var(--apple-light-alpha-9);
|
||||
--icon-on-success-hover: var(--apple-light-alpha-10);
|
||||
--icon-on-success-selected: var(--apple-light-alpha-11);
|
||||
--icon-on-warning-base: var(--amber-lightalpha-9);
|
||||
--icon-on-warning-hover: var(--amber-lightalpha-10);
|
||||
--icon-on-warning-selected: var(--amber-lightalpha-11);
|
||||
--icon-on-critical-base: var(--ember-light-alpha-9);
|
||||
--icon-on-critical-hover: var(--ember-light-alpha-10);
|
||||
--icon-on-critical-selected: var(--ember-light-alpha-11);
|
||||
--icon-on-info-base: var(--lilac-light-9);
|
||||
--icon-on-info-hover: var(--lilac-light-alpha-10);
|
||||
--icon-on-info-selected: var(--lilac-light-alpha-11);
|
||||
--icon-diff-add-base: var(--mint-light-11);
|
||||
--icon-diff-add-hover: var(--mint-light-12);
|
||||
--icon-diff-add-active: var(--mint-light-12);
|
||||
--icon-diff-delete-base: var(--ember-light-9);
|
||||
--icon-diff-delete-hover: var(--ember-light-10);
|
||||
--icon-diff-delete-active: var(--ember-light-11);
|
||||
--syntax-comment: #ffffff;
|
||||
--syntax-string: #ffffff;
|
||||
--syntax-keyword: #ffffff;
|
||||
--syntax-function: #ffffff;
|
||||
--syntax-number: #ffffff;
|
||||
--syntax-operator: #ffffff;
|
||||
--syntax-variable: #ffffff;
|
||||
--syntax-type: #ffffff;
|
||||
--syntax-constant: #ffffff;
|
||||
--syntax-punctuation: #ffffff;
|
||||
--syntax-success: #ffffff;
|
||||
--syntax-warning: #ffffff;
|
||||
--syntax-critical: #ffffff;
|
||||
--syntax-info: #ffffff;
|
||||
--markdown-heading: #ffffff;
|
||||
--markdown-text: #ffffff;
|
||||
--markdown-link: #ffffff;
|
||||
--markdown-link-text: #ffffff;
|
||||
--markdown-code: #ffffff;
|
||||
--markdown-block-quote: #ffffff;
|
||||
--markdown-emph: #ffffff;
|
||||
--markdown-strong: #ffffff;
|
||||
--markdown-horizontal-rule: #ffffff;
|
||||
--markdown-list-item: #ffffff;
|
||||
--markdown-list-enumeration: #ffffff;
|
||||
--markdown-image: #ffffff;
|
||||
--markdown-image-text: #ffffff;
|
||||
--markdown-code-block: #ffffff;
|
||||
--border-color: #ffffff;
|
||||
Reference in New Issue
Block a user