Skip to content

v0.5.0

Latest

Choose a tag to compare

@fdemusso fdemusso released this 22 May 16:49
· 25 commits to master since this release

What's New in v0.5.0

Package: @beechcms/cms


Advanced Numeric Field Options

The most significant feature of this release: numeric fields (Branch type number) now support a full set of display, control, and validation options via the new NumberFieldOptions interface in @beechcms/core.

Formatting & Display

  • format: decimal | currency | percentage | compact — powered by Intl.NumberFormat
  • currency: ISO 4217 code (e.g. EUR, USD) — required when format === 'currency'
  • prefix / suffix: custom text prepended/appended to the formatted value
  • decimals: explicit decimal digit count
  • grouping: thousands separator toggle (default: true)

UI Controls (editor)

  • control: input | slider | rating | stepper — four dedicated interactive components now available in the entry editor

Validation Constraints

  • min / max / step: enforced at the @beechcms/core validation layer with full Zod integration and cache fingerprint support

Usage example:

{
  id: 'br_price',
  label: 'Price',
  type: 'number',
  numberOptions: {
    format: 'currency',
    currency: 'EUR',
    min: 0,
    step: 0.01,
    control: 'stepper',
  }
}

New Dashboard UI Components

Four new interactive field components in apps/dashboard:

Component Description
number-slider.tsx Range slider bound to min/max/step
number-stepper.tsx Increment/decrement stepper with ARIA support
number-rating.tsx Star-based rating input
number-input.tsx Standard numeric input with formatting

Percentage and rating values now render with a visual progress bar in the table/gallery view (progress.tsx upgraded).

Logic for stepper and rating has been extracted into dedicated VSA hooks (use-number-stepper.ts, use-number-rating.ts) and formatting into number-format.ts.


Pending Draft Status in Dashboard

Co-authored with https://github.com/resolvicomai:

  • Draft entries with unsaved/pending changes now surface their status visually in the gallery card and peek panel
  • New use-content-item hook for granular content item fetching
  • entry-editor.tsx updated to reflect draft pending state
  • Dynamic columns updated for consistent draft indicator rendering
  • i18n updated for both en and it locales

CLI Templates: commerce and tasks

Two new seed templates available in the BeechCMS CLI (bin/templates/):

  • commerce — product catalog template with price, discount, rating, and stock fields using NumberFieldOptions
  • tasks — task management template with priority and progress fields using slider/stepper controls

MIT License

BeechCMS is now officially licensed under the MIT License.


Community & Contributing

This release introduces community health files:

  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/pull_request_template.md
  • CONTRIBUTING.md
  • CODE_OF_CONDUCT.md
  • SECURITY.md

Internal Improvements

  • Reduced cognitive complexity in validation.ts via helper functions
  • Test coverage added for numeric hooks, formatNumber utility, field display components, content management API, draft hooks, dynamic columns, and entry editor
  • Accessibility (ARIA) fixes on rating and stepper components

Contributors