Skip to content

Release v3.0.0

Choose a tag to compare

@github-actions github-actions released this 02 Sep 18:27
ba045de

Added

  • The panel vocabulary a canvas is drawn inCanvas, StackPanel, DockPanel, WrapPanel and Grid on the existing Panel base, with RowDefinition, ColumnDefinition, GridLength, GridUnitType, Orientation and Dock. Studio's prototype canvas models arrangement this way and Scene had no equivalent: a screen could say what an element is, but not that five of them sit in a grid.

    Kept pure, the way Screenplay is — no attributes, no discriminators, no serialization, and Cratis.Scene.Model still has no package dependencies. Attached properties stay in the Properties bag the model already has (Canvas.Left, Grid.Row, Dock), because a model with no attached properties of its own is the right place to keep carrying them that way.

    These render through the existing structural walk — every one satisfies isPanel, so renderElement already reaches them. What they do not yet do is arrange: honouring orientation, spacing, grid tracks and docking is the layout engine's job (#4). This change is vocabulary, not behavior.

Changed

  • @cratis/components 4. Components 4 owns its own markup, styling and types and no longer sits on PrimeReact, so scene.components and scene.blueprint.components take ^4.1.1 and their peer range moves with it — a breaking change for anyone consuming those two packages.
  • scene.components no longer depends on PrimeReact at all. Its one PrimeReactProvider was in a spec, needed only because Components 3's tooltip bottomed out in a PrimeReact component; Components 4 owns its own. primeicons stays as a Storybook-only devDependency, because the stories demonstrate the consumer-owned icon-font class string that Components 4's Icon still accepts.
  • scene.blueprint.components keeps its PrimeReact peers, and now supplies the provider itself. It composes blueprint.default's shell, which reaches for PrimeReact directly in five places. Until Components 3 that provider came for free because CratisComponentsProvider wrapped PrimeReactProvider; under Components 4 it does not, so the Storybook preview declares both providers rather than relying on hoisting.
  • scene.primereact and scene.blueprint.default are unchanged — they target PrimeReact deliberately.

Fixed

  • SceneTooltip passed a slot straight to Tooltip. Components 4 takes one focusable trigger element, which it clones to attach its own part attributes, and a Scene slot is a list — so it now wraps the slot in a single element rather than failing to type.

Both shape specs cover the new surface: scene-model-shape.json gains 8 types and 3 enums, and the C# spec asserts the model declares exactly those.

The three documented Components codemods scanned 543 files and changed none — Scene already imported explicit subpaths throughout. Note for anyone following the migration guide: they do not run on the current migrator at all. @cratis/components.migrator@4.1.1 fails its own compatibility preflight because the bundled manifest still pins the migrator at 4.0.0 (Cratis/Components#232, which predicted exactly this recurrence). Pinning @cratis/components.migrator@4.0.0 works.

Verified: 8 JavaScript workspaces build, 898 specs pass, lint clean, all five Storybooks build, and .NET is 5 projects / 0 errors / 0 warnings with 37 specs passing.

🤖 Generated with Claude Code