modern-cmdk 1.2.0 → 1.2.1
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/README.md +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,7 +117,7 @@ A ground-up rewrite of `cmdk` for **React 19**, **ES2026**, and **TypeScript 7**
|
|
|
117
117
|
- **Framework-agnostic core** -- Pure TypeScript state machine. Zero DOM dependencies. Portable to any runtime.
|
|
118
118
|
- **React 19 adapter** -- 14 compound components. `useSyncExternalStore`, `useTransition`, `useOptimistic`, `use()` for Suspense. React Compiler compatible.
|
|
119
119
|
- **Automatic virtualization** -- Variable-height virtual scrolling kicks in at 100+ items. Handles 100K+ items smoothly with `content-visibility: auto`.
|
|
120
|
-
- **Fuzzy search** -- Built-in TypeScript scorer with incremental filtering. Optional
|
|
120
|
+
- **Fuzzy search** -- Built-in TypeScript scorer with incremental filtering. Optional Rust/WASM engine for sub-1ms on 100K items with graceful TS fallback _(experimental, not yet published to npm)_.
|
|
121
121
|
- **Frecency ranking** -- Frequency x recency with time-based exponential decay. Pluggable persistence (memory or IndexedDB).
|
|
122
122
|
- **Keyboard shortcuts** -- Built-in registry with cross-platform `Mod` key, conflict detection, and `RegExp.escape` parsing. Cross-browser helper functions for grouping and set operations.
|
|
123
123
|
- **Full accessibility** -- WAI-ARIA combobox pattern, `aria-live` announcements, `forced-colors`, `prefers-contrast`, `prefers-reduced-motion`.
|
|
@@ -125,7 +125,7 @@ A ground-up rewrite of `cmdk` for **React 19**, **ES2026**, and **TypeScript 7**
|
|
|
125
125
|
- **Error boundary** -- `CommandErrorBoundary` with static or render-function fallback.
|
|
126
126
|
- **DevTools** -- `useCommandDevtools()` exposes machine state via `CustomEvent` for browser inspection.
|
|
127
127
|
- **Telemetry middleware** -- Pluggable hooks for palette open/close, search, and item selection analytics.
|
|
128
|
-
- **ESM-only** -- Zero CommonJS. Tree-shakeable. `sideEffects
|
|
128
|
+
- **ESM-only** -- Zero CommonJS. Tree-shakeable -- the framework-agnostic core is side-effect-free; only the React entry and `styles.css` are flagged in `sideEffects`. Isolated declarations.
|
|
129
129
|
|
|
130
130
|
---
|
|
131
131
|
|
|
@@ -224,10 +224,10 @@ All styles use `@layer command` for zero-specificity conflicts and CSS logical p
|
|
|
224
224
|
Automated codemods handle the most common migration patterns:
|
|
225
225
|
|
|
226
226
|
```bash
|
|
227
|
-
npx modern-cmdk
|
|
228
|
-
npx modern-cmdk
|
|
229
|
-
npx modern-cmdk
|
|
230
|
-
npx modern-cmdk
|
|
227
|
+
npx modern-cmdk import-rewrite ./src
|
|
228
|
+
npx modern-cmdk data-attrs ./src
|
|
229
|
+
npx modern-cmdk forward-ref ./src
|
|
230
|
+
npx modern-cmdk should-filter ./src
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
See the [full migration guide](https://command.crimson.dev/guide/migration-from-cmdk).
|
|
@@ -251,7 +251,7 @@ See the [full migration guide](https://command.crimson.dev/guide/migration-from-
|
|
|
251
251
|
| Package | Description |
|
|
252
252
|
|---|---|
|
|
253
253
|
| [`create-modern-cmdk`](https://www.npmjs.com/package/create-modern-cmdk) | `npm create modern-cmdk` -- scaffold a new project |
|
|
254
|
-
|
|
|
254
|
+
| `modern-cmdk-search-wasm` _(experimental, not yet published)_ | Rust/WASM fuzzy search -- sub-1ms on 100K items |
|
|
255
255
|
| [`vscode-modern-cmdk`](https://marketplace.visualstudio.com/items?itemName=crimson-dev.vscode-modern-cmdk) | VS Code snippets extension |
|
|
256
256
|
|
|
257
257
|
---
|