@maggioli-design-system/magma-react 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -5,7 +5,7 @@
5
5
  -->
6
6
  # @maggioli-design-system/magma-react - agent install guide
7
7
 
8
- > Version 2.10.0. You (the agent) are installing Magma into THIS project. Do not
8
+ > Version 2.11.0. You (the agent) are installing Magma into THIS project. Do not
9
9
  > assume the setup - detect it from the project, then ask the user only for what you
10
10
  > cannot infer. The detailed steps live in [`agents/install.md`](agents/install.md)
11
11
  > (this target) and [`agents/assets.md`](agents/assets.md) (shared styles, fonts,
package/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ package.
7
7
  It is released together with `magma`, at the same version: the sections are the
8
8
  releases of `magma`.
9
9
 
10
+ ## [magma@2.11.0] - 2026-11-04
11
+
12
+ ### Bug Fixes
13
+
14
+ - *(mds-pref-theme)* Mark the business item when the theme is left on its default
15
+
16
+ ### Build
17
+
18
+ - *(stencil)* Build magma again when docs/agents changes
19
+
20
+ ### Documentation
21
+
22
+ - *(storybook)* Watch the contrast promotion under editorial in the semantic lab
23
+ - *(magma)* Build magma before checking a new or changed preview
24
+
25
+ ### Features
26
+
27
+ - *(mds-pref-theme-item)* Show in the swatch the theme the item names
28
+ - *(lint)* Let render_preview take the base theme by its name
29
+ - *(magma,lint)* Ship an image of each preview, light and dark, beside its stage
30
+
10
31
  ## [magma@2.10.0] - 2026-11-04
11
32
 
12
33
  ### Bug Fixes
package/agents/assets.md CHANGED
@@ -76,7 +76,7 @@ What each file provides:
76
76
  | `transitions.css`, `animations.css` | Shared motion |
77
77
  | `globals.css` | Global `--magma-*` design decisions |
78
78
  | `semantic.css` | The semantic color roles (`--magma-surface-*`, `--magma-text-*`, ..., see [`color.md`](color.md)). Required: without it the page `body` has no colour, the Tailwind role utilities are stuck on their light default (the fallback that gives editors a swatch), and components lose dark mode, named themes and high contrast |
79
- | `themes.css` | The named themes (`data-theme-name`): retint the semantic roles. Import it after `semantic.css` |
79
+ | `themes.css` | The named themes (`data-theme-name`): retint the semantic roles, and publish the preview of each theme for a picker (`--magma-preview-<name>-*`). Import it after `semantic.css` |
80
80
  | `base.css` | Base element styles (sets `--font-info` body font, etc.) |
81
81
 
82
82
  DO NOT import `colors-hex-*.css` when using components or Tailwind - they cannot be
package/agents/color.md CHANGED
@@ -169,8 +169,8 @@ Only when the colour encodes data rather than an interface role:
169
169
  knockout; not a page or card background.
170
170
 
171
171
  Never use `--magma-tint-*`: it is the internal pointer a named theme repoints, not a role.
172
- `tone-porcelain` and `tone-bisque` back the named themes `cool` and `warm`: switch them on
173
- with `data-theme-name` ([`theming.md`](theming.md)), do not paint them by hand.
172
+ `tone-bisque` backs the named theme `editorial` (and `tone-porcelain` the deprecated `cool`):
173
+ switch it on with `data-theme-name` ([`theming.md`](theming.md)), do not paint it by hand.
174
174
  `variant-*` has no role of its own: the accents are `accent` and `accent-ai`.
175
175
 
176
176
  Deprecated: `--magma-neutral-emphasis` / `--magma-neutral-on-emphasis` are aliases of
package/agents/mcp.md CHANGED
@@ -113,7 +113,7 @@ of `command`).
113
113
  | `explain_class` | what a class does with the Magma theme | the trap of the scale: `p-4` is 0.01rem, `p-400` is 1rem |
114
114
  | `find_icon` | a slug that exists, by meaning, or whether a slug exists | an `icon="..."` that renders nothing |
115
115
  | `get_guide` | one section of a guide, or of a domain of Foundation, the rules of composition of the design language (`rhythm`, `density`, `actions`, `titles`, `surfaces`, `widths`) | reading the whole file |
116
- | `get_pattern` | how a task across components is solved in every product (where a message goes, confirming an action, an empty, a loading or a failed part): the list, the patterns for a need, or, with the values of the variables of a pattern, the one case to follow, with its preview (the stage, live, and what to try in it) when Magma has one and in `rules` the rules of the domains it relies on; the layer of the project (`magma/patterns/<id>.md`) applied; the domains of Foundation first in the list, then the building blocks (`kind: block`, the page header), which answer with the regions to lay out, in order | inventing the flow, or reading [`patterns.md`](patterns.md) and each pattern by hand |
116
+ | `get_pattern` | how a task across components is solved in every product (where a message goes, confirming an action, an empty, a loading or a failed part): the list, the patterns for a need, or, with the values of the variables of a pattern, the one case to follow, with its preview (the stage, live, what to try in it and in `images` the paths of its light and dark images, to show where the stage cannot run) when Magma has one and in `rules` the rules of the domains it relies on; the layer of the project (`magma/patterns/<id>.md`) applied; the domains of Foundation first in the list, then the building blocks (`kind: block`, the page header), which answer with the regions to lay out, in order | inventing the flow, or reading [`patterns.md`](patterns.md) and each pattern by hand |
117
117
  | `check_markup` | whether a snippet passes the lint, before it is written | a lint run after the fact |
118
118
  | `check_setup` | what the Magma integration of the project misses | checking the install steps by hand |
119
119
  | `render_preview` | an image of markup with Magma components, or of the preview Magma ships for a case of a pattern (`pattern` and `case`), at the widths (pixels or Magma breakpoints), the mode and the theme you give, with a report of what in it is not representative | describing an interface in words, or a wireframe of your own |
package/agents/theming.md CHANGED
@@ -39,22 +39,27 @@ inside a component's shadow root it matches nothing.
39
39
  ## Named themes
40
40
 
41
41
  A named theme retints the whole neutral scaffolding of the page at once - surfaces,
42
- wash, borders, text, the inverse chip - and keeps it contrast-checked. It is one
43
- attribute on `<html>`, and it needs `themes.css` ([`assets.md`](assets.md)):
42
+ wash, borders, text, the inverse chip - and the accent, and keeps it contrast-checked.
43
+ It is one attribute on `<html>`, and it needs `themes.css` ([`assets.md`](assets.md)):
44
44
 
45
45
  ```html
46
- <html data-theme-name="cool"><!-- or "warm"; no attribute = the default theme --></html>
46
+ <html data-theme-name="editorial"><!-- no attribute = business --></html>
47
47
  ```
48
48
 
49
- | Theme | Family | Cast |
50
- | --- | --- | --- |
51
- | (none) | `neutral` | grey |
52
- | `cool` | `porcelain` | blue-grey |
53
- | `warm` | `bisque` | warm grey |
49
+ | Theme | For | Family | Accent |
50
+ | --- | --- | --- | --- |
51
+ | `business` (no attribute) | the management software | `neutral`, grey | the Maggioli brand |
52
+ | `editorial` | the publishing side | `bisque`, warm grey | the Maggioli Editore brand |
53
+
54
+ No `data-theme-name` means `business`: it is the base `:root` and emits no rule.
55
+ `default` (its old name), `cool` and `warm` still work and are deprecated: they leave at
56
+ the next major.
54
57
 
55
58
  The status colors (info, success, warning, danger) never change with the theme. To let
56
59
  the user choose, use `mds-pref-theme`: it writes the attribute, remembers the choice and
57
- also carries the corner shape (below). A theme works only on code that paints with the
60
+ also carries the corner shape (below). Each `mds-pref-theme-item` shows the theme it
61
+ names, from the preview every theme publishes on the page (`--magma-preview-<name>-wash`,
62
+ `--magma-preview-<name>-accent`). A theme works only on code that paints with the
58
63
  semantic roles; a raw palette step stays as it is. Defining your own theme is not a
59
64
  consumer feature yet.
60
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/magma-react",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/components.js",
6
6
  "module": "dist/components.js",
@@ -35,7 +35,7 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@maggioli-design-system/magma": "2.10.0",
38
+ "@maggioli-design-system/magma": "2.11.0",
39
39
  "@stencil/react-output-target": "1.7.0"
40
40
  },
41
41
  "repository": {