Repository navigation
@codeatlasdev/ui@4.0.0
·
222 commits
to main
since this release
Major Changes
- b99075a:
AppShellLayoutrenders its content region as<main id={mainId} tabindex="-1">by default, so a page built on it has a<main>landmark (axelandmark-one-main,region) and the skip link lands on it. It was a plaindiv. PassmainId={null}when your page renders its own<main id="main" tabindex="-1">: the region is then a plaindiv, never a second landmark. If you wrapped your content in<main>inside the shell, remove it or passmainId={null}. - fdb6798:
nativeFeel()now has one opt-out class,.ca-selectable, for both the context menu and text selection (#136). The context-menu filter used.selectablewhile the selection CSS used.ca-selectable, so neither class restored both. The filter and its docs now say.ca-selectable, matching theca-*class contract. Clean cutover:.selectablewas never documented outside a JSDoc line, and no stylesheet ever targeted it, so apps using it must rename it toca-selectable(right-click on a.selectableregion is now blocked again until they do).
Minor Changes
- 6e39edc:
caBrandPluginwritessrc/generated/brand.tsas soon as the Vite config resolves (the URLs depend only on a hash of the inputs, so no rendering is needed), not only at build start. Newcodeatlas-ui brandcommand andbrandUrls()/runBrand(): render the icons and the module without a Vite run, so a job that only runssvelte-checkon a fresh clone type-checks (svelte-kit syncdoes not load Vite plugins). - c2d255d:
FormSectionacceptsheadingLevel(2 | 3 | 4 | 5 | 6) andAppSettings/AppFormprovide the section heading level likePageShell, soFormSectionandEmptyStatetitles inside them render as<h2>under the page<h1>(axeheading-order) instead of<h5>. Outside a page layout the default stays<h5>. Only the tag changes, never the look. - af02ce2:
RadioGroup,Checkbox,SwitchandSelectacceptname, so their value is part ofFormDataon a native form submit (progressive enhancement, SvelteKit form actions without a hidden-input workaround).Selectrenders a hidden input carrying the selected value whennameis set. - e7b85e7:
ogCardacceptslang(BCP 47, default"en", escaped) for the card's<html lang>, so non-English cards get the right hyphenation and locale font selection. - 55ecc1a:
Box,Flex,StackandGridare generic onas:<Stack as="form" novalidate onsubmit={...}>accepts the form's attributes, and the handler'scurrentTargetis anHTMLFormElement(same foras="a",as="label",as="button"...). An attribute that does not belong to the tag is a type error. ExportsPolymorphicPropsandElementTag.
Patch Changes
- 153be87:
centsToDisplaykeeps the no-break spaceIntlputs after the currency symbol ("R$\u00a0123,45"), so a price no longer wraps between the symbol and the number.MoneyInputstill shows and parses a plain space in its editable text. - a517102:
toCsv,toJson,ExportColumnandExportMenuaccept any object row type (T extends object), so rows typed with aninterfaceno longer need a cast.keyis still checked againstkeyof T. - 8d25c2f:
caErrorPlugin({ scaffold: true })writes a validsrc/error.html: the theme init script now sits in<head>instead of inside<style>, the page uses the app theme (themeoption, same object ascaThemePlugin) instead of hard-coded amber, its copy andlangfollow the newlocaleoption (endefault, warns when unset), and thejavascript:history.back()link is gone (CSP-safe). The scaffolded+error.svelteuses tabs and double quotes like the other generated files.initnow writescaErrorPlugin({ scaffold: true, theme }). - 9e5655f:
initwithout--writeis now a true dry run: it printswould create <file>instead of writing new files. It also stops creatingsrc/lib/theme.ts(src/theme.tson Astro) whenvite.config.ts/hooks.server.tsalready importthemefrom elsewhere, and wires the files it adds to that import. - a7f7e96: Docs and agent skill: apps must install
@lucide/sveltethemselves. Under Bun's isolated linker the package's own dependency is not importable from the app. - 3ef5b11:
migratekeeps the default thickness ofGlassCardandGlassSurface: a usage withoutthickness(defaultregular) becomeselevation={3}instead of dropping it, so the migrated card keeps its fill, blur, shadow and rim (CardandSurfacedefault toelevation={1}). - 33ad505:
migratelooks uptypescriptin the project directory first (then next to the CLI) and printsmigrate needs typescript (bun add -d typescript)with exit code 1 when it is missing, instead of crashing withCannot find package 'typescript'. This also fixesbunx @codeatlasdev/ui migratein layouts where the CLI cache directory cannot see the project'stypescript. - b7cdd79:
migratenow ends with a list of the usages it left for you (file:line Component: reason (recipe)), and--strictexits with code 1 when any remain. AGridorStackwhosecols/aligncould not be mapped still gets itsgapconverted:gap={20}next tocols="2fr 1fr"becomesgap="5"instead of silently turning into step 20 (80px). Dynamic or off-scale gaps are reported, since their meaning changed from pixels to a step. - 98ea2ed: Nested modals: only the newest focus trap owns focus, so opening a
Dialog/AlertDialog/Sheet/Drawerover another no longer loops onfocusin(Maximum call stack size exceeded); closing it hands focus back to the one below. - daccdc8:
.ca-proseheading anchors stay visible on touch screens: a stray second@media (hover: none)block hid them withdisplay: none, contradicting the rule above it. New "Release lists" docs page documents theca-release*markup and the version-id anchor convention. - c0bc624:
--ca-scrim-blurnow drives the modal scrim (#135). It was declared asnonebut never read: the::backdropof Dialog, AlertDialog, Sheet, Drawer, CommandPalette and DocsSearch hardcodedblur(4px) saturate(180%). The scrim reads the token and the token defaults to that same value, so nothing changes visually;:root { --ca-scrim-blur: none }now removes the blur from all of them. The CommandPalette scrim shares it (it used a plainblur(4px), now with the sharedsaturate(180%)). - 5a3ede3: Agent skill and AGENTS.md import
ThemeOptionsfrom@codeatlasdev/ui/vite(/astroin Astro), like the docs andinit. The package root pulls.sveltefiles that Node cannot load fromvite.config. - 8185835: New
--ca-tooltip-blurtoken for the Tooltip surface blur (#137). It defaults tovar(--ca-blur-ultra-thin), so the look is unchanged;--ca-tooltip-blur: nonegives an opaque tooltip without re-tiering the shared ultra-thin blur (.glass-ultra-thin,.glass-btn-clear,--ca-upload-blur). - 3dda885:
@codeatlasdev/ui/viteexportsdesignStyle,DESIGN_STYLES,mergeThemeandDesignStyleId, so atheme.tsshared withvite.configcan use a design recipe (including the 3.0 migrationdesignStyle("liquid", { ... })) in plain Node. The theming guide and theinittheme comment now point to this entry instead of/astro.
Install
bun add @codeatlasdev/ui@4.0.0Special thanks
To our main supporters and special contributors, Fábio Henrique Araújo (@FabioHAraujo) and Richardson Douglas (@Richards0nd). 💛