@the-portland-company/shell 0.47.0-rc.2 → 0.47.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/CHANGELOG.md CHANGED
@@ -64,9 +64,25 @@ Dark mode keeps the platform's neutral ramp. The Brand sheet resets the Mode
64
64
  SURFACES to the guaranteed-invalid value under `.dark` so they fall through to
65
65
  the neutrals; only the accent, a foreground colour, carries over.
66
66
 
67
- Active sub-rows also gain a 3px left rail drawn from `--nav-row-active-rail`,
68
- which resolves `transparent` unless the Mode declared a chrome group — so for
69
- every other app the span renders invisible and out of flow.
67
+ Active sub-rows also gain a 3px left rail drawn from
68
+ `var(--mode-accent, transparent)` — invisible and out of flow for any app whose
69
+ Mode declares no chrome group.
70
+
71
+ **Where Mode SURFACES are read matters, and the rule is not obvious.** They are
72
+ resolved at the point of use with the pre-0.47 value as an inline fallback:
73
+
74
+ ```
75
+ bg-[color:var(--mode-accent-surface,var(--panel-elevated))]
76
+ ```
77
+
78
+ Not through an alias declared in the `[data-politogy-mode]` block — that block
79
+ does not match an app which is not mode-scoped, so the alias would be unset and
80
+ a bare `var()` is invalid at computed-value time, dropping the property to its
81
+ initial value. And not through a `:root` alias either — `.dark` is a separate
82
+ top-level selector, so a `:root` alias substitutes the LIGHT value and inherits
83
+ it into dark. Point of use is the only placement correct in both themes, scoped
84
+ and unscoped. Two tests enforce it; both mistakes were made and caught during
85
+ the release candidates.
70
86
 
71
87
  Needs the matching Brand API release (`tokens.modes.<id>.chrome`).
72
88
 
@@ -108,6 +124,19 @@ a silent effect.
108
124
 
109
125
  A grant is for a fact only the app HAS, never for a look.
110
126
 
127
+ ### Added — the brand lockup follows the Mode
128
+
129
+ `brandLogoSrc` became core-only in 0.43, so every mode-scoped app rendered the
130
+ Relationship lockup — a red wordmark on a purple `vrm` badge — whatever Mode it
131
+ was scoped to. Petition Mode shipped a green Petition lockup in V1 and lost it in
132
+ that migration.
133
+
134
+ Resolved from the registry by Mode, like the accent:
135
+ `MODE_BRAND_LOGOS = { petition: '/brand/logos/petition-mode-logo.svg' }`. Only
136
+ Modes with a shipped lockup are listed; everything else keeps today's default.
137
+ The path is app-relative, so add the asset to the app's `public/` before adding
138
+ a Mode here.
139
+
111
140
  ### Changed — prereleases publish under the `next` dist-tag
112
141
 
113
142
  `npm publish` tags `latest` whatever the semver, so an rc would silently become
@@ -2075,7 +2075,7 @@ function NavRow({
2075
2075
  }) {
2076
2076
  const Icon = item.icon;
2077
2077
  const isSub = variant === "sub";
2078
- const activeClasses = isSub ? "bg-[color:var(--nav-row-active-surface)] text-[color:var(--color-accent)] shadow-sm" : "bg-[color:var(--color-accent)] text-white shadow-sm";
2078
+ const activeClasses = isSub ? "bg-[color:var(--mode-accent-surface,var(--panel-elevated))] text-[color:var(--color-accent)] shadow-sm" : "bg-[color:var(--color-accent)] text-white shadow-sm";
2079
2079
  const wrapperClasses = [
2080
2080
  "group relative block overflow-hidden rounded-md transition",
2081
2081
  active ? activeClasses : "text-[color:var(--muted)] hover:text-white"
@@ -2092,16 +2092,16 @@ function NavRow({
2092
2092
  style: { background: NAV_HOVER_GRADIENT }
2093
2093
  }
2094
2094
  ) : (
2095
- // Active-row rail, in the Mode's accent. `--nav-row-active-rail`
2096
- // resolves `transparent` unless the Mode declared a chrome group, so
2097
- // for every app without one this span is present but invisible and
2098
- // nothing moves (it is absolutely positioned and out of flow).
2095
+ // Active-row rail, in the Mode's accent. `--mode-accent` is only set by
2096
+ // a declared Mode chrome group, and the inline `transparent` fallback
2097
+ // is what every other app gets — so this span is present but invisible
2098
+ // there, and being absolutely positioned it moves nothing.
2099
2099
  /* @__PURE__ */ jsxRuntime.jsx(
2100
2100
  "span",
2101
2101
  {
2102
2102
  "aria-hidden": "true",
2103
2103
  className: "pointer-events-none absolute inset-y-0 left-0 w-[3px] rounded-l-md",
2104
- style: { background: "var(--nav-row-active-rail)" }
2104
+ style: { background: "var(--mode-accent, transparent)" }
2105
2105
  }
2106
2106
  )
2107
2107
  ),