Skip to content

Releases

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 24 Nov 14:31
6544c25

Patch Changes

  • #416 e727598 Thanks @alexgrozav! - Extend @uxfront/typescript-config/library.json instead of repeating its options, so @styleframe/config-typescript now depends on @uxfront/typescript-config and sets only module, moduleResolution, declarationMap and sourceMap itself. The compiler options are otherwise the same, but the output now goes to the extending project's own dist, where before a relative outDir resolved inside this package, and the config includes that project's files by default and excludes its node_modules and dist. If your project sets its own outDir or declarationDir outside dist and keeps the default include, its second build now reads the first one's output and stops with TS5055, because the inherited exclude replaces TypeScript's default one. Add an exclude with node_modules, dist and that folder, like ["node_modules", "dist", "lib"], or narrow your include, like ["src"].

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Minor Changes

  • #382 a70e8e7 Thanks @alexgrozav! - Add a useCardMediaRecipe for an image at the top of a card, and make the card recipes meet the Open Components Card standard. A link in a heading inside the card header now stretches over the whole card, actions in the card stay clickable above it, and the card shows a 2px color.focus ring outside its border when that link has keyboard focus, through useCardRecipe's setup selectors. Hover strengthens the border and underlines the heading only inside @media (hover: hover), the border goes to full strength with prefers-contrast: more and stays a system colour in forced colours mode. The card no longer sets overflow: hidden, so content and the focus ring are never clipped, and it wraps long words with overflow-wrap: break-word. useCardHeaderRecipe, useCardBodyRecipe and useCardFooterRecipe pad their inline sides with paddingInline instead of paddingLeft and paddingRight, so cards mirror in right-to-left layouts. The media part shows above the header with order: -1 and keeps a 16 / 9 aspect ratio. Every recipe name, axis, value and default stays the same.

  • #382 a70e8e7 Thanks @alexgrozav! - Bring useTextareaRecipe in line with the Open Components Textarea standard, and add an autogrow axis that defaults to false, so today's output stays the same. With autogrow: true, in browsers that support field-sizing, the textarea grows with its text through field-sizing: content and has no resize handle, up to the rows in its data-max-rows attribute. The nested textarea now has a min-height of its rows in lines, read with attr(), so resizing or growing never makes it shorter than its rows. On touch screens its text is at least 16px, so Safari on iOS doesn't zoom in on focus, and the textarea is at least 44px tall. The vertical resize default now also sets resize: block, where browsers support it, so it follows the writing mode. useTextareaPrefixRecipe and useTextareaSuffixRecipe get the Input prefix and suffix changes through the field addon builder they share.

  • #382 a70e8e7 Thanks @alexgrozav! - Align the tooltip recipes with the Open Components Tooltip standard. useTooltipRecipe and useTooltipArrowRecipe gain a placement axis (top, bottom, start or end), which defaults to top, the side the arrow pointed from before. On an element with the popover attribute, useTooltipRecipe now opens the tooltip in the top layer with position: fixed, inset: auto and the new @tooltip.offset variable as its margin, sets position-area from placement and flips it with position-try-fallbacks: flip-block, flip-inline. It fades and grows in as it opens, and only fades with prefers-reduced-motion: reduce. Every other element keeps its own positioning and the @z-index.tooltip layer, so tooltips you position yourself look the same. The content now wraps at 32ch rather than 240px, breaks long words with overflow-wrap: anywhere, and takes Canvas and a CanvasText border in forced colours mode. useTooltipArrowRecipe now draws its triangle in color, turns with placement, uses logical properties so it mirrors in right-to-left layouts, sits on the edge that faces the trigger inside a top-layer tooltip, and hides in forced colours mode. CSS can't tell which side a fallback chose, so when a tooltip flips, set the arrow's placement from a script.

  • #408 9e14ea4 Thanks @alexgrozav! - Add icon sizes and an icon-only style to useButtonRecipe. Each size now sets --button--icon--size for the icons in data-slot="leading" and data-slot="trailing" children, and a button with data-icon-only and data-size is square, with its data-slot="label" child hidden from view but kept as the accessible name. Buttons without these attributes look the same as before.

  • #382 a70e8e7 Thanks @alexgrozav! - Add a color.focus token for focus rings, plus five accessibility modifiers and a position-try-fallbacks utility. The token is a reference to @color.primary in the light and dark themes, emitted as --color--focus, and the focus.outline-color default now points at it, so focus rings look the same as before. When a project replaces the default colors and defines no focus color, the default falls back to @color.primary, as before. The new modifiers are hover-capable (@media (hover: hover)) and any-pointer-coarse (@media (any-pointer: coarse)) from useMediaPreferenceModifiers, aria-invalid ([aria-invalid="true"]) from useAriaStateModifiers, readonly-attr ([readonly]) from useFormStateModifiers and data-loading ([data-loading]) from useOtherStateModifiers, each with its own composable, like useHoverCapableModifier. The usePositionTryFallbacksUtility composable is registered in useUtilitiesPreset as createPositionTryFallbacksUtility and ships without defaults. Reference colors like focus no longer get level, shade or tint keys in the useDesignTokensPreset return type, because none are generated for them.

  • #382 a70e8e7 Thanks @alexgrozav! - Align the popover recipes with the Open Components Popover standard. usePopoverRecipe and usePopoverArrowRecipe gain a placement axis (top, bottom, start or end), which defaults to top, the side the arrow pointed from before. On an element with the popover attribute, usePopoverRecipe now opens the popover in the top layer with position: fixed, inset: auto, no padding from the browser's own [popover] styles, and the new @popover.offset variable as its margin, sets position-area from placement, flips it with position-try-fallbacks, and registers the --popover-fit, --popover-fit-below and --popover-fit-above @position-try rules. It fades in only without a reduced-motion preference. Every other element keeps position: relative, so popovers you position yourself look the same. The container is never wider or taller than the screen less @spacing.xl, wraps long words, and draws a full-strength edge under prefers-contrast: more and a CanvasText edge in forced colours mode. usePopoverBodyRecipe scrolls when the popover can't grow, and usePopoverHeaderRecipe drops its top separator after a leading arrow, as it does for a first child. usePopoverArrowRecipe now draws its triangle in color, turns with placement, uses logical properties so it mirrors in right-to-left layouts, sits on the edge that faces the anchor inside a top-layer popover, hides in forced colours mode, and changes @popover.arrow.size from 6px to 0.375rem: the same size at a 16px root font size, but it now scales with the root font size.

  • #382 a70e8e7 Thanks @alexgrozav! - Align the Spinner recipes with the Open Components Spinner standard. useSpinnerRecipe, useSpinnerCircleRecipe and useSpinnerTextRecipe gain an inherit size, which makes the spinner 1em wide and tall so it matches the text around it, and the spinner no longer shrinks in a flex row. With reduced motion, useSpinnerCircleRecipe swaps the turn for a pulse that fades the spinner to 40% and back every 1.6 seconds, and stops the arc from growing and shrinking. The pulse uses !important for its duration and iteration count, so it keeps going under the sanitize preset. The spinner has no background of its own, so in useSpinnerRecipe primary switches to @color.primary-400 in the dark theme, where a label then reaches 4.5:1 on the page. The light and dark colors look the same in both themes, gray-700 for light surfaces and white for dark ones, while neutral adapts to the theme. useSpinnerOverlayRecipe darkens its backdrop from 50% to 75% black, so a dark label on it reaches 4.5:1 too. With the inherit size, the spinner also sits 0.125em below the baseline, so it centres on the text. useSpinnerCircleRecipe now uses the motion-reduce modifier, so register it first, as useModifiersPreset does.

Patch Changes

  • #382 a70e8e7 Thanks @alexgrozav! - Make useButtonRecipe meet the Open Components Button standard's stylesheet rules. Every label now keeps 4.5:1 contrast at rest, on hover, when active, pressed or expanded, in both themes, so solid buttons darken on hover instead of lightening, apart from warning, which takes a dark label and still lightens, and the transparent variants use lighter levels in the dark theme. Every border keeps 3:1 against the surface it's meant for, so subtle borders and the neutral borders are darker in the light theme and lighter ...
Read more

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Minor Changes

  • #348 e614db7 Thanks @alexgrozav! - Add inspect(instance), which returns a JSON-serialisable snapshot of what an instance defines: its root variables with the custom property and value they emit, its themes with their selector and overrides, its utilities with their values, class names and modifiers, its modifiers, and its recipes with their variant options and defaults. The CLI gains styleframe check [entry] [--json], which runs validate() on your configuration without writing any files and exits with 1 when it finds a problem or the config file doesn't exist. With --json, it prints one { "ok", "diagnostics" } document on stdout and nothing else. styleframe build now prints one warning line per diagnostic, exits with 1 under strict: true without writing anything, and exits with 1 when the build fails, where it used to log the error and exit with 0. The bundler plugin logs each diagnostic once per build as a warning, so builds that use it, Inkline's included, will start showing them, and under strict: true it fails the build, including when it regenerates type declarations in the dev server.

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

  • Updated dependencies [e614db7]:

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

  • Updated dependencies [e614db7, e614db7]:

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Minor Changes

  • #348 e614db7 Thanks @alexgrozav! - Add inspect(instance), which returns a JSON-serialisable snapshot of what an instance defines: its root variables with the custom property and value they emit, its themes with their selector and overrides, its utilities with their values, class names and modifiers, its modifiers, and its recipes with their variant options and defaults. The CLI gains styleframe check [entry] [--json], which runs validate() on your configuration without writing any files and exits with 1 when it finds a problem or the config file doesn't exist. With --json, it prints one { "ok", "diagnostics" } document on stdout and nothing else. styleframe build now prints one warning line per diagnostic, exits with 1 under strict: true without writing anything, and exits with 1 when the build fails, where it used to log the error and exit with 0. The bundler plugin logs each diagnostic once per build as a warning, so builds that use it, Inkline's included, will start showing them, and under strict: true it fails the build, including when it regenerates type declarations in the dev server.

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

@styleframe/[email protected]

Choose a tag to compare

@github-actions github-actions released this 21 Nov 15:31
6cdafa7

Minor Changes

  • #348 e614db7 Thanks @alexgrozav! - Add inspect(instance), which returns a JSON-serialisable snapshot of what an instance defines: its root variables with the custom property and value they emit, its themes with their selector and overrides, its utilities with their values, class names and modifiers, its modifiers, and its recipes with their variant options and defaults. The CLI gains styleframe check [entry] [--json], which runs validate() on your configuration without writing any files and exits with 1 when it finds a problem or the config file doesn't exist. With --json, it prints one { "ok", "diagnostics" } document on stdout and nothing else. styleframe build now prints one warning line per diagnostic, exits with 1 under strict: true without writing anything, and exits with 1 when the build fails, where it used to log the error and exit with 0. The bundler plugin logs each diagnostic once per build as a warning, so builds that use it, Inkline's included, will start showing them, and under strict: true it fails the build, including when it regenerates type declarations in the dev server.

  • #348 e614db7 Thanks @alexgrozav! - Add styleframe inspect [entry] [section] [--json], which lists the variables, themes, utilities, modifiers and recipes your configuration registers, all of them or one section, as readable lists or as one JSON document on stdout, from the snapshot inspect() returns. The check command gains --typecheck, which runs your project's tsc on the entry file with the compiler options of its nearest tsconfig.json and reports each type error as a diagnostic with the code typescript, beside the problems validate() finds. The typescript package is now an optional peer dependency: without it, check --typecheck exits with 1 and says so.

Patch Changes

  • #348 e614db7 Thanks @alexgrozav! - Add a README.md to each of these packages, so the npm page and the installed package say what the package is, how to install it and where its docs are. Each one links to the new "Using Styleframe with AI agents" page, which covers the check, inspect and strict loop and the mistakes that build without a warning. Until now these packages listed README.md in their files but shipped none.

  • Updated dependencies [e614db7]: