Skip to content

Releases: linyows/rotion

v3.6.1

Choose a tag to compare

@linyows linyows released this 02 Sep 08:32
758a443

A code block containing a comment is no longer split into several blocks, and a \\ line break in an equation is now rendered as a new line.

What's Changed

  • Keep a code block in one element and break equation lines by @linyows in #257

Full Changelog: v3.6.0...v3.6.1

v3.6.0

Choose a tag to compare

@linyows linyows released this 08 Aug 14:27
833732a

FetchDatabase now tells which part of a database query is invalid before the notion api rejects it, and the exported database property types match the api. DatabasePropertyConfigResponse describes the data source schema it was always used for, and DatabaseProperty points at the new DatabasePropertyValue.

What's Changed

  • Report which part of a database query is invalid by @linyows in #255
  • Match the database property types to the notion api by @linyows in #256

Full Changelog: v3.5.7...v3.6.0

v3.5.7

Choose a tag to compare

@linyows linyows released this 08 Aug 05:13
9510802

What's Changed

  • Fix Dependabot vulnerability alerts in example and website apps by @linyows in #253
  • Update dependencies across root, website and examples and bump to v3.5.7 by @linyows in #254

Full Changelog: v3.5.6...v3.5.7

v3.5.6

Choose a tag to compare

@linyows linyows released this 26 Jul 03:11
f825e74

What's Changed

  • Update dependencies to latest major versions and bump to v3.5.6 by @linyows in #252

Full Changelog: v3.5.5...v3.5.6

v3.5.5

Choose a tag to compare

@linyows linyows released this 26 Jul 02:51
df6f4ea

What's Changed

  • Upgrade sharp to 0.35 to fix high-severity libvips advisory by @linyows in #250

Full Changelog: v3.5.4...v3.5.5

v3.5.4

Choose a tag to compare

@linyows linyows released this 26 Jul 02:31
dd2eb2f

What's Changed

  • Update dependencies within semver ranges by @linyows in #248

Full Changelog: v3.5.3...v3.5.4

v3.5.3

Choose a tag to compare

@linyows linyows released this 05 May 07:12
708210a

What's Changed

Security

  • Fix npm audit advisories via overrides and bump to v3.5.3 by @linyows in #219
    • Pin uuid to ^14.0.0 to resolve GHSA-w5hq-g745-h8pq (mermaid still depends on uuid@^11)
    • Pin postcss to ^8.5.10 in next-based projects (website/, examples/nextjs-pagerouter, examples/nextjs-approuter) to resolve GHSA-qx2v-qp2m-jg93 (next pins postcss@8.4.31 in its CSS pipeline)
    • rotion does not bundle its dependencies, so this override only hardens the repo's own audit. Consumers of rotion still rely on the upstream mermaid fix because npm overrides are not transitive

Full Changelog: v3.5.2...v3.5.3

v3.5.2

Choose a tag to compare

@linyows linyows released this 27 Apr 07:52
4569017

What's Changed

Bug Fixes

  • Fix Cannot read properties of undefined (reading 'getBBox') and intermittent hydration failures in mermaid code blocks on Next.js static-export sites by @linyows in #218
    • Disable mermaid's auto-render with mermaid.startOnLoad = false so the library no longer mutates the DOM (and inserts its temporary <div id=\"dmermaid-...\"> workspace) before React hydration runs
    • Switch from mermaid.run() to mermaid.render(id, source) and inject the returned SVG string via useState + dangerouslySetInnerHTML, keeping the rendered DOM under React's control
    • Capture the original diagram source once into sourceRef so re-runs (Strict Mode, HMR, language change) do not re-parse an already-replaced node
    • Skip mermaid.render when mermaidSvg is already populated, removing the race that produced duplicate d{id} workspace divs and Failed to execute 'removeChild' on 'Node' errors
    • Use distinct keys on the source vs rendered <pre> so React unmount → mount instead of reconciling differing children
    • Pin securityLevel: 'strict' explicitly in mermaid.initialize (matches mermaid v11's default but documents the XSS posture for diagram source coming from Notion)

Full Changelog: v3.5.1...v3.5.2

v3.5.1

Choose a tag to compare

@linyows linyows released this 27 Apr 03:25
e465911

What's Changed

Bug Fixes

  • Fix unhandled Uncaught (in promise) in mermaid rendering — mermaid.init() was deprecated and its returned Promise was not awaited, and the async highlight() call from useEffect also dropped its Promise. Switched to mermaid.run({ nodes }) with await + try/catch, and attached .catch() on the useEffect call site so failures are logged instead of becoming unhandled rejections by @linyows in #217
  • Fix Storybook Syntax error in text for the Mermaid code block — mermaid.run reads each node's innerHTML (not textContent) as the diagram source, so passing <pre> made it try to parse the wrapping <code> tags. The <code> element is now passed instead, and codeRef is typed as HTMLElement (was the mismatched HTMLPreElement) by @linyows in #217

Internal

  • Enable biome nursery/noFloatingPromises rule on src/ui/components so unawaited Promises (forgotten await, dropped Promises in effects) are caught at lint time. Verified the rule flags the original two floating-Promise sites by @linyows in #217
  • Exclude website/ and examples/ from the root biome.json's files.includes so type-aware project resolution no longer discovers nested root configs, allowing the sub-project biome configs to remain independent by @linyows in #217

Full Changelog: v3.5.0...v3.5.1

v3.5.0

Choose a tag to compare

@linyows linyows released this 26 Apr 08:12
83ff34d

What's Changed

Features

  • Add Calendar database view — a Notion-style monthly calendar for databases with a date property. Renders events in a 7-column grid with weekday/header navigation (prev / today / next), weekStart ('sunday' | 'monday'), locale, and initialDate options. Supports the same href / link / query API as Gallery / Table / List. by @linyows in #215

    import { Calendar } from 'rotion/ui'
    
    <Calendar
      db={db}
      date="Date"
      keys={['Name', 'Tags']}
      options={{ initialDate: '2026-04-01', weekStart: 'monday', locale: 'ja-JP' }}
    />
  • Multi-day spanning event bars — events with both start and end are drawn as a single continuous bar across cells, with squared-off continuation edges at week boundaries (Notion-style). Per-week slot allocation stacks overlapping events in vertical lanes.

  • Localized header and weekday labels — month label and weekday short names use Intl.DateTimeFormat(locale, ...) so any locale (fr-FR, de-DE, etc.) gets native names. Today / Previous month / Next month controls and aria-labels are localized via a small ja/en map.

  • Weekend cell tinting — Saturday/Sunday cells are tinted via new --rotion-calendar-weekend-bg / --rotion-dark-calendar-weekend-bg tokens (#f9f8f7 / #202020).

Internal

  • New components under src/ui/components/Calendar/: Calendar, CalendarHeader, CalendarWeek, CalendarCell, CalendarEvent, plus a small shared lib.ts for the date-key helper.
  • One-pass event parsing: pages are parsed and sorted once per db.results change, then placed per week, instead of re-scanning all events for every week.
  • Storybook stories include ThisMonthMultiDaySpans (and a linked variant) that mutate the fixture so the spanning layout is visible in the current month.

Full Changelog: v3.4.2...v3.5.0