mac-human-design 0.1.27 → 0.1.28

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
@@ -2,6 +2,22 @@
2
2
 
3
3
  This file tracks changes between published npm versions of `mac-human-design`.
4
4
 
5
+ ## 0.1.28
6
+
7
+ ### Added
8
+
9
+ - Added formal coverage documentation for `MacDataTable`, `MacWindowToolbar`,
10
+ `MacSegmentedControl`, and `SymbolIconButton` in
11
+ `docs/macos-base-ui-coverage.md`.
12
+ - Documented the shared icon-button alignment guarantees that keep icon-only
13
+ buttons centered across normal, loading, hover, and pressed states.
14
+ - Extended the macOS design verifier to require the app-level component docs
15
+ and icon alignment guarantees before release.
16
+
17
+ ### Changed
18
+
19
+ - Bumped the package to `0.1.28`.
20
+
5
21
  ## 0.1.27
6
22
 
7
23
  ### Added
@@ -84,6 +84,27 @@ render UI.
84
84
  | Window sheet | `MacDialog.SheetPopup` |
85
85
  | Sidebar drawer | `MacDrawer.SidebarPopup` |
86
86
 
87
+ ## App-Level Components
88
+
89
+ These shared components cover reusable macOS/Tauri app patterns that should not
90
+ be reimplemented in consuming apps:
91
+
92
+ | App pattern | Export | Contract |
93
+ | --- | --- | --- |
94
+ | Finder-style grid/table primitive | `MacDataTable` | Uses `table` semantics for static rows, upgrades to `grid` semantics for interactive rows, exposes row/column metadata, busy state, keyboard activation, selected row state, and focus-visible row styling. |
95
+ | Tauri window toolbar | `MacWindowToolbar` | Provides a labelled `toolbar` landmark, labelled leading/content/trailing control groups, a root drag region, and no-drag regions around interactive controls. |
96
+ | Segmented control | `MacSegmentedControl` | Wraps the shared macOS segmented toggle styling with accessible labels, stable class names, full-width layout support, and class/style pass-through. |
97
+ | Centered SF Symbols icon button | `SymbolIconButton` | Renders through `MacIconButton`, defaults to `type="button"`, preserves fixed geometry while allowing style/class pass-through, supports tooltip offsets, and exposes loading state with `aria-busy`. |
98
+
99
+ ## Icon Button Alignment Guarantees
100
+
101
+ Icon-only buttons use fixed-size grid containers with zero padding, zero
102
+ line-height, centered grid content, middle inline alignment, and center transform
103
+ origins. `SymbolIconButton` keeps the SF Symbol and loading spinner in the same
104
+ grid cell, centers generated symbol masks, trims transparent symbol padding in
105
+ the native symbol service, and avoids vertical Motion offsets for icon-only
106
+ controls.
107
+
87
108
  The gallery at `examples/macos-base-ui-gallery` renders these wrappers across
88
109
  normal, selected, disabled, mixed, popup, dialog, and narrow-width states.
89
110
 
@@ -102,6 +123,8 @@ The gate typechecks the library and verifies:
102
123
  - every component family is listed in this coverage document,
103
124
  - required native variants are exported,
104
125
  - nested native variant parts such as pop-up buttons, sheets, and sidebar drawers are exported,
126
+ - shared app-level components and icon-button alignment guarantees are
127
+ documented in this coverage file,
105
128
  - every class assigned by the wrapper module has a matching CSS selector,
106
129
  - every public wrapper export is represented in the visual gallery source,
107
130
  - macOS design features are present: system font stack, dark mode, reduced motion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mac-human-design",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Reusable macOS-oriented UI primitives and SF Symbols bridge for Tauri apps.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -6,6 +6,7 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."
6
6
  const stylesPath = path.join(repoRoot, "src", "styles", "macosBaseUi.css");
7
7
  const packageJsonPath = path.join(repoRoot, "package.json");
8
8
  const readmePath = path.join(repoRoot, "README.md");
9
+ const coverageDocsPath = path.join(repoRoot, "docs", "macos-base-ui-coverage.md");
9
10
  const wrapperPath = path.join(repoRoot, "src", "components", "MacBaseUI.tsx");
10
11
  const symbolIconButtonPath = path.join(repoRoot, "src", "components", "SymbolIconButton.tsx");
11
12
  const galleryPath = path.join(repoRoot, "src", "components", "MacBaseUIGallery.tsx");
@@ -50,6 +51,7 @@ const sources = new Map(
50
51
  const stylesSource = readText(stylesPath);
51
52
  const packageJson = JSON.parse(readText(packageJsonPath));
52
53
  const readmeSource = readText(readmePath);
54
+ const coverageDocsSource = readText(coverageDocsPath);
53
55
  const wrapperSource = readText(wrapperPath);
54
56
  const symbolIconButtonSource = readText(symbolIconButtonPath);
55
57
  const gallerySource = readText(galleryPath);
@@ -325,6 +327,27 @@ if (missingPublicDocs.length > 0) {
325
327
  );
326
328
  }
327
329
 
330
+ const missingCoverageDocs = [
331
+ ["coverage docs include app-level section", /## App-Level Components/],
332
+ ["coverage docs document MacDataTable", /Finder-style grid\/table primitive[\s\S]*`MacDataTable`/],
333
+ ["coverage docs document MacWindowToolbar", /Tauri window toolbar[\s\S]*`MacWindowToolbar`/],
334
+ ["coverage docs document MacSegmentedControl", /Segmented control[\s\S]*`MacSegmentedControl`/],
335
+ ["coverage docs document SymbolIconButton", /Centered SF Symbols icon button[\s\S]*`SymbolIconButton`/],
336
+ ["coverage docs include icon alignment section", /## Icon Button Alignment Guarantees/],
337
+ ["coverage docs mention fixed-size grid containers", /fixed-size grid containers/],
338
+ ["coverage docs mention zero line-height", /zero[\s-]line-height/],
339
+ ["coverage docs mention loading spinner grid cell", /loading spinner[\s\S]*same\s+grid\s+cell/],
340
+ ["coverage docs mention transparent symbol padding trim", /trims transparent symbol padding/],
341
+ ["coverage docs mention no vertical Motion offsets", /avoids vertical Motion offsets/],
342
+ ].filter(([, pattern]) => !pattern.test(coverageDocsSource));
343
+
344
+ if (missingCoverageDocs.length > 0) {
345
+ fail(
346
+ "Missing coverage documentation for shared macOS app components and icon-button alignment.",
347
+ missingCoverageDocs.map(([label]) => label),
348
+ );
349
+ }
350
+
328
351
  const missingSegmentedControlRequirements = [
329
352
  ["stable segmented control class", /"hd-mac-segmented-control"/],
330
353
  ["default accessible label", /ariaLabel = "Segmented control"/],