@the-portland-company/shell 0.11.2 → 0.11.3

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
@@ -1,3 +1,36 @@
1
+ ## 0.11.3 — 2026-07-20
2
+
3
+ ### Fixed (native — token contract + client boundary)
4
+
5
+ - **Native chrome now has a real semantic token layer.** The `./native`
6
+ components (NavTopBar / NavSidebar / NavTabStrip / NavAppShell) reference
7
+ `--background`, `--foreground`, `--muted`, `--panel`, `--panel-elevated`,
8
+ `--line`, `--shadow-soft` directly as `var(--x)`, but chrome.css never defined
9
+ them for light mode and only emitted `--foreground`/`--muted`/`--background`
10
+ inside `.dark` as ShadCN **HSL channel triplets** (`210 40% 98%`) meant for
11
+ `hsl(var(--x))` — invalid when used as a full color, so out-of-the-box the
12
+ native chrome had no surface/border and broken text. `gen:tokens` now emits
13
+ these seven names as **full colors in both `:root` (light, aliased to the
14
+ canonical `--topbar-*`/`--surface-*`/`--sidebar-border`/`--shadow-lg` tokens)
15
+ and `.dark` (from the Specs `darkMode.*` values wrapped in `hsl()`)**. Note
16
+ `--muted` maps to muted-*foreground* because native uses it as secondary text.
17
+ Apps consuming `./native` no longer need an app-side var bridge in globals.css.
18
+ - **`"use client"` is now emitted on `dist/native.{js,cjs}`** (prepended
19
+ post-build, since esbuild strips a source/banner directive). Next.js App
20
+ Router apps can import the native chrome into Server Components without a
21
+ manual client-boundary wrapper. Ignored (harmless) by Vite/Chakra consumers.
22
+
23
+ ## 0.11.2 — 2026-07-20
24
+
25
+ ### Added (native — per-slot Brand glyphs)
26
+
27
+ - **`NavTopBarAction` gains an optional `slot`** so the native top-bar action
28
+ icons source their glyph by name from `--topbar-icon-<slot>` (Brand API),
29
+ matching the Chakra `<TopBarIcon>`; button size/color/hover and the cluster
30
+ gap now resolve the universal `--topbar-icon-*` tokens with the previous
31
+ literals as fallbacks. Shared slot contract extracted to
32
+ `src/lib/topbarIconSlot.ts` (framework-agnostic, no Chakra import).
33
+
1
34
  ## 0.11.1 — 2026-07-20
2
35
 
3
36
  ### Fixed (packaging — native install)
package/dist/chrome.css CHANGED
@@ -240,6 +240,19 @@
240
240
  --mode-input-border-color: #E63946;
241
241
  --mode-input-hover-border-color: #C42E3A;
242
242
  --mode-input-focus-shadow-color: #E63946;
243
+
244
+ /* Native chrome semantic layer — shell-owned aliases over the
245
+ canonical tokens above, consumed by the ./native export
246
+ (NavTopBar / NavSidebar / NavTabStrip / NavAppShell). These are the
247
+ full-color names those components reference directly as var(--x);
248
+ the .dark block overrides them with dark values. */
249
+ --background: var(--surface-1);
250
+ --foreground: var(--topbar-title-color);
251
+ --muted: var(--topbar-breadcrumb-color);
252
+ --panel: var(--topbar-bg);
253
+ --panel-elevated: var(--surface-1);
254
+ --line: var(--sidebar-border);
255
+ --shadow-soft: var(--shadow-lg);
243
256
  }
244
257
  .dark {
245
258
  --background: 222.2 84% 4.9%;
@@ -261,4 +274,11 @@
261
274
  --border: 217.2 32.6% 17.5%;
262
275
  --input: 217.2 32.6% 17.5%;
263
276
  --ring: 212.7 26.8% 83.9%;
277
+ --background: hsl(222.2 84% 4.9%);
278
+ --foreground: hsl(210 40% 98%);
279
+ --muted: hsl(215 20.2% 65.1%);
280
+ --panel: hsl(222.2 84% 4.9%);
281
+ --panel-elevated: hsl(217.2 32.6% 17.5%);
282
+ --line: hsl(217.2 32.6% 17.5%);
283
+ --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.5);
264
284
  }
package/dist/native.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var react = require('react');
package/dist/native.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { useTopBarIconSlotGlyph, brandIconSrc } from './chunk-VTGRJ4HV.js';
2
3
  import { useMemo, useState, useEffect } from 'react';
3
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-portland-company/shell",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Shared chrome (header, sidebar, footer, theme, auth) for politogy apps. Drop into any Vite SPA to inherit the politogy look and signed-in user.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -42,7 +42,7 @@
42
42
  ],
43
43
  "scripts": {
44
44
  "gen:tokens": "node scripts/gen-tokens.mjs",
45
- "build": "tsup && cp src/css-modules.d.ts dist/css-modules.d.ts",
45
+ "build": "tsup && node scripts/postbuild-use-client.mjs && cp src/css-modules.d.ts dist/css-modules.d.ts",
46
46
  "dev": "tsup --watch",
47
47
  "test": "vitest run",
48
48
  "test:watch": "vitest",