@cosxai/ui 0.13.5 → 0.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosxai/ui",
3
- "version": "0.13.5",
3
+ "version": "0.14.0",
4
4
  "description": "COSX design system — React 19 component primitives shared across product-meta and other consumers",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -16,6 +16,11 @@ interface Ranked {
16
16
  }
17
17
 
18
18
  function scoreOne(item: CommandItem, q: string): number | null {
19
+ // Secret items exist only for their exact phrase — never in empty
20
+ // listings, never via partial/label matches.
21
+ if (item.secret) {
22
+ return q.trim().toLowerCase() === item.secret.toLowerCase() ? 200 : null;
23
+ }
19
24
  if (!q) return 1; // empty query — everyone passes, sorted by registration order
20
25
  const ql = q.toLowerCase();
21
26
  const lab = item.label.toLowerCase();
@@ -23,4 +23,10 @@ export interface CommandItem {
23
23
  // palette — useful when the command opens a sub-flow that wants
24
24
  // to keep the palette open.
25
25
  run: (api: { close: () => void }) => void;
26
+ // Cheat-code gating: when set, the item is INVISIBLE to every
27
+ // query except an exact (case-insensitive, trimmed) match of this
28
+ // phrase — it never appears in empty-query listings or partial
29
+ // matches. Use for hidden debug/test menus; pair with a "Debug"
30
+ // group so the reveal is self-describing.
31
+ secret?: string;
26
32
  }