Skip to content

Commit cbe6789

Browse files
committed
improvement(platform): migrate off lucide-react, flatten the font-weight scale, and retire scheduled tasks and workflow references
1 parent ea93a7b commit cbe6789

398 files changed

Lines changed: 2933 additions & 4157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/emcn-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
paths:
3-
- "apps/sim/components/emcn/**"
3+
- "packages/emcn/**"
44
---
55

66
# EMCN Components
@@ -20,7 +20,7 @@ The menu surface intentionally diverges from the pill: `dropdown-menu.tsx` items
2020

2121
## Component catalogue
2222

23-
- **`Chip` / `ChipLink`** — the pill button (`<button>` / Next `<Link>`). Variants: `ghost`, `filled`, `primary`, `destructive`, `border-shadow`. `leftIcon`/`rightIcon`, `active`, `fullWidth`, `flush`.
23+
- **`Chip` / `ChipLink`** — the pill button (`<button>` / Next `<Link>`). Variants: `ghost`, `filled`, `primary`, `destructive`, `border-shadow`. `leftIcon`/`rightIcon`, `active`, `fullWidth`. Chips carry **no outer margin** — space between them is the parent's `gap`. The old `mx-0.5` default and its `flush` opt-out are gone; do not reintroduce either, and never add a margin to a chip through `className`.
2424
- **`ChipInput`** — single-line text field. `icon`, `endAdornment`, `error`, `inputClassName` (inner `<input>`); `className` styles the chrome wrapper.
2525
- **`ChipCopyInput`** — the canonical view-only field: a read-only `ChipInput` at full opacity with a trailing copy-to-clipboard button. View-only is a display mode, not a disabled state — reach for it (or `ChipModalField type='copy'`) over a `disabled` (greyed) input for values the user cannot edit.
2626
- **`ChipTextarea`** — multi-line sibling. `error`, `resizable` (off by default), `viewOnly` (read-only at full opacity with the default cursor — the multi-line counterpart of `ChipCopyInput`).

.claude/rules/sim-styling.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ Custom font sizes (`apps/sim/tailwind.config.ts`): `text-micro`=10px, `text-xs`=
4646

4747
Icons default `size-[14px]`. Equal h/w → `size-*` (`size-[14px]`, `size-4`), never `h-N w-N`.
4848

49+
## Font Weight
50+
51+
Three steps, Tailwind's stock scale, nothing else: **`font-normal` (400)**, **`font-medium` (500)**, **`font-semibold` (600)**. 400 is the document default, so body text, chip labels, sidebar items, and headings carry **no weight class at all** — they inherit. Reach for a class only to step *up* from body.
52+
53+
Never write an arbitrary weight (`font-[380]`, `font-[430]`, `font-[450]`, …), and never set `fontWeight` in an inline `style`. There was previously a CSS-variable weight scale (`--font-weight-base/medium/semibold`, remapping `font-medium` to 440/480) plus seven ad-hoc values clustered between 380 and 500; it was deleted because nothing read as hierarchical. Off-scale values are only acceptable where the design system genuinely cannot reach — react-email templates and the static `apps/sim/emails/broadcasts/*.html`, which email clients render without CSS variables.
54+
55+
Headings inherit their weight. Tailwind preflight resets `h1``h6` to `font-weight: inherit`, so an `<h1>` is 400 unless you say otherwise — that is the intended look, not a bug to patch.
56+
4957
## Color Tokens
5058

5159
Value text `--text-body`; muted/placeholder/labels `--text-muted`; icons `--text-icon`; neutral borders and dividers `--border` (`--border-1` and `--border-muted` are legacy aliases resolving to it; `--divider` is retired); surfaces `--surface-5` (light) / `--surface-4` (dark); active row `--surface-active`; error `--text-error`. No focus rings on chip surfaces.
@@ -60,7 +68,7 @@ Draw a line with a real `border-*` utility. Never hand-roll one as `shadow-[inse
6068

6169
## Chip Components (consumer usage)
6270

63-
`ChipInput`, `ChipTextarea`, `ChipModal*` own their full chrome. Consumers describe intent through PROPS; they never re-style the chrome. The canonical chrome lives in `apps/sim/components/emcn/components/chip/chip-chrome.ts` (all tokens are re-exported from the `@sim/emcn` barrel — no subpath import needed) — never hand-roll `rounded-lg`/`border`/`bg-[var(--surface-5)]`/`h-[30px]`/`px-2`/`text-sm`/focus rings.
71+
`ChipInput`, `ChipTextarea`, `ChipModal*` own their full chrome. Consumers describe intent through PROPS; they never re-style the chrome. The canonical chrome lives in `packages/emcn/src/components/chip/chip-chrome.ts` (all tokens are re-exported from the `@sim/emcn` barrel — no subpath import needed) — never hand-roll `rounded-lg`/`border`/`bg-[var(--surface-5)]`/`h-[30px]`/`px-2`/`text-sm`/focus rings.
6472

6573
### Props over className
6674

apps/docs/components/ai/ask-ai-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import { type FormEvent, useEffect, useMemo, useRef, useState } from 'react'
44
import { useChat } from '@ai-sdk/react'
5+
import { ArrowUp, Square, Task, X } from '@sim/emcn/icons'
56
import { DefaultChatTransport } from 'ai'
6-
import { ArrowUp, MessageCircle, Square, X } from 'lucide-react'
77
import { Streamdown } from 'streamdown'
88
import { cn } from '@/lib/utils'
99
import 'streamdown/styles.css'
@@ -102,7 +102,7 @@ export function AskAIPanel({ locale, open, onClose }: AskAIPanelProps) {
102102
>
103103
<div className='flex items-center justify-between border-[var(--border-1)] border-b px-4 py-3'>
104104
<span className='flex items-center gap-1.5 font-season text-[var(--text-body)] text-sm'>
105-
<MessageCircle className='size-[16px] text-[var(--text-icon)]' />
105+
<Task className='size-[16px] text-[var(--text-icon)]' />
106106
Ask Sim
107107
</span>
108108
<button

apps/docs/components/ai/ask-ai.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useRef, useState } from 'react'
4-
import { MessageCircle } from 'lucide-react'
4+
import { Task } from '@sim/emcn/icons'
55
import dynamic from 'next/dynamic'
66

77
const AskAIPanel = dynamic(() => import('./ask-ai-panel').then((m) => m.AskAIPanel), {
@@ -11,7 +11,7 @@ const AskAIPanel = dynamic(() => import('./ask-ai-panel').then((m) => m.AskAIPan
1111
aria-hidden
1212
className='fixed right-4 bottom-4 z-50 flex size-11 items-center justify-center rounded-full border border-[var(--border-1)] bg-[var(--surface-5)] shadow-[var(--shadow-medium)] dark:bg-[var(--surface-4)]'
1313
>
14-
<MessageCircle className='size-[16px] animate-pulse text-[var(--text-icon)]' />
14+
<Task className='size-[16px] animate-pulse text-[var(--text-icon)]' />
1515
</div>
1616
),
1717
})
@@ -46,7 +46,7 @@ export function AskAI({ locale }: AskAIProps) {
4646
onClick={handleOpen}
4747
className='fixed right-4 bottom-4 z-50 flex h-11 items-center gap-1.5 rounded-full border border-[var(--border-1)] bg-[var(--surface-5)] px-4 font-season text-[var(--text-body)] text-sm shadow-[var(--shadow-medium)] transition-colors hover:bg-[var(--surface-active)] dark:bg-[var(--surface-4)]'
4848
>
49-
<MessageCircle className='size-[16px] text-[var(--text-icon)]' />
49+
<Task className='size-[16px] text-[var(--text-icon)]' />
5050
Ask Sim
5151
</button>
5252
)}

apps/docs/components/docs-layout/page-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ReactNode } from 'react'
2-
import { ChevronLeft, ChevronRight } from 'lucide-react'
2+
import { ChevronLeft, ChevronRight } from '@sim/emcn/icons'
33
import Link from 'next/link'
44

55
interface PageNeighbour {

apps/docs/components/docs-layout/page-navigation-arrows.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { ChevronLeft, ChevronRight } from 'lucide-react'
3+
import { ChevronLeft, ChevronRight } from '@sim/emcn/icons'
44
import Link from 'next/link'
55

66
interface PageNavigationArrowsProps {

apps/docs/components/page-actions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
'use client'
22

33
import { Chip } from '@sim/emcn'
4+
import { Check, Duplicate } from '@sim/emcn/icons'
45
import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button'
5-
import { Check, Copy } from 'lucide-react'
66

77
export function LLMCopyButton({ content }: { content: string }) {
88
const [checked, onClick] = useCopyButton(() => navigator.clipboard.writeText(content))
99

1010
return (
1111
<Chip
1212
onClick={onClick}
13-
leftIcon={checked ? Check : Copy}
13+
leftIcon={checked ? Check : Duplicate}
1414
aria-label={checked ? 'Copied to clipboard' : 'Copy page content'}
1515
>
1616
{checked ? 'Copied' : 'Copy page'}

apps/docs/components/ui/code-block.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client'
22

33
import { useState } from 'react'
4+
import { Check, Duplicate } from '@sim/emcn/icons'
45
import { CodeBlock as FumadocsCodeBlock } from 'fumadocs-ui/components/codeblock'
5-
import { Check, Copy } from 'lucide-react'
66
import { cn } from '@/lib/utils'
77

88
export function CodeBlock(props: React.ComponentProps<typeof FumadocsCodeBlock>) {
@@ -31,9 +31,9 @@ export function CodeBlock(props: React.ComponentProps<typeof FumadocsCodeBlock>)
3131
>
3232
<span className='flex items-center justify-center'>
3333
{copied ? (
34-
<Check size={16} className='text-[var(--brand-accent)]' />
34+
<Check className='size-[16px] text-[var(--brand-accent)]' />
3535
) : (
36-
<Copy size={16} className='text-[var(--text-muted)]' />
36+
<Duplicate className='size-[16px] text-[var(--text-muted)]' />
3737
)}
3838
</span>
3939
</button>

apps/docs/components/ui/faq.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useState } from 'react'
4-
import { ChevronRight } from 'lucide-react'
4+
import { ChevronRight } from '@sim/emcn/icons'
55
import { serializeJsonLd } from '@/lib/json-ld'
66
import { cn } from '@/lib/utils'
77

apps/docs/components/ui/heading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { type ComponentPropsWithoutRef, useState } from 'react'
4-
import { Check, Link } from 'lucide-react'
4+
import { Check, Link } from '@sim/emcn/icons'
55
import { cn } from '@/lib/utils'
66

77
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'

0 commit comments

Comments
 (0)