@unpunnyfuns/swatchbook-blocks 0.16.0 → 0.17.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/dist/index.d.mts CHANGED
@@ -246,33 +246,35 @@ interface ColorTableProps {
246
246
  /** `'asc'` (default) or `'desc'`. */
247
247
  sortDir?: SortDir;
248
248
  /**
249
- * Render a fuzzy-search input above the table (case-insensitive,
250
- * single-char typo tolerance, out-of-order terms, matches across path +
251
- * any format value). Defaults to `true`.
249
+ * Render a fuzzy-search input above the table. Defaults to `true`.
252
250
  */
253
251
  searchable?: boolean;
254
252
  /**
255
- * Called with the clicked row's dot-path. When set, the built-in
256
- * `<TokenDetail>` drawer is suppressed — the consumer owns follow-up UI.
253
+ * Called with the *currently-selected* variant's dot-path on row click.
254
+ * When set, the built-in expand-in-place behavior is suppressed — the
255
+ * consumer owns follow-up UI.
257
256
  */
258
257
  onSelect?(path: string): void;
259
258
  /**
260
259
  * Map from a display label to a suffix matched against each token's
261
- * trailing path segment. A row whose leaf matches one of the suffixes
262
- * gets the corresponding label rendered as a pill after the token name.
260
+ * trailing path segment. Tokens whose leaves match a suffix are grouped
261
+ * under a shared "base" path (the path with the suffix stripped), and
262
+ * the group renders as a single row with a pill selector — clicking a
263
+ * pill swaps the displayed values to that variant. Sibling tokens
264
+ * without a suffix that share the group's base path are labeled `base`.
263
265
  *
264
- * Accepts both DTCG-idiomatic and Backmarket-style conventions:
265
- * - **Dot segment** (`color.bg.hi.disabled`): the last dot-segment equals
266
- * the suffix exactly (`suffix === 'disabled'`).
267
- * - **Hyphen tail** (`color.bg.hi-d`): the last dot-segment ends in
268
- * `-<suffix>` (`suffix === 'd'`).
266
+ * Matches both DTCG-idiomatic and Backmarket-style conventions:
267
+ * - **Dot segment** (`color.bg.hi.disabled`): last dot-segment equals
268
+ * the suffix (`disabled`). Base path = drop the last segment.
269
+ * - **Hyphen tail** (`color.bg.hi-d`): last dot-segment ends in
270
+ * `-<suffix>` (`d`). Base path = trim the `-<suffix>` from the leaf.
269
271
  *
270
- * Longest-suffix-wins: `{ hover: 'h', hoverDark: 'h-dark' }` picks
271
- * `hoverDark` for a path ending in `-h-dark`. The hyphen-tail form
272
- * requires an actual hyphen boundary — suffix `0` does not match
273
- * `neutral-900`. Tokens that don't match any suffix render with no pill.
272
+ * Longest-suffix-wins. Hyphen-tail form requires an actual hyphen
273
+ * boundary — suffix `0` does not match `neutral-900`.
274
274
  *
275
- * Empty map (default) no pills; the block behaves exactly as before.
275
+ * Single-member groups render as plain rows (no pill selector). Empty
276
+ * map (default) disables grouping entirely; each token renders as its
277
+ * own row, identical to the pre-grouping behavior.
276
278
  */
277
279
  variants?: Record<string, string>;
278
280
  }