@commercetools/nimbus 0.0.0-canary-20260202082736 → 0.0.0-canary-20260202161550

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.
@@ -21,6 +21,25 @@ export type PokemonDetails = {
21
21
  weight: number;
22
22
  base_experience: number;
23
23
  };
24
+ /**
25
+ * Mock Pokemon data for testing async behavior without external dependencies.
26
+ * Provides sample data that simulates Pokemon API responses for reliable testing.
27
+ */
28
+ export declare const MOCK_POKEMON: Pokemon[];
29
+ /**
30
+ * Mock Pokemon details for rendering PokemonOption component.
31
+ * Maps Pokemon names to their detailed information for display.
32
+ */
33
+ export declare const MOCK_POKEMON_DETAILS: Record<string, PokemonDetails>;
34
+ /**
35
+ * Creates a mock async load function that simulates API behavior.
36
+ * Uses setTimeout to simulate network latency and respects abort signals.
37
+ *
38
+ * @param data - Array of Pokemon to filter (defaults to MOCK_POKEMON)
39
+ * @param delay - Simulated network delay in milliseconds (defaults to 100ms)
40
+ * @returns Async load function compatible with ComboBox async prop
41
+ */
42
+ export declare const createMockAsyncLoad: (data?: Pokemon[], delay?: number) => (filterText: string, signal: AbortSignal) => Promise<Pokemon[]>;
24
43
  /**
25
44
  * Reusable Pokemon option component that displays detailed information.
26
45
  * Fetches full Pokemon details on mount and displays sprite, name, types, and stats.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools/nimbus",
3
- "version": "0.0.0-canary-20260202082736",
3
+ "version": "0.0.0-canary-20260202161550",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.es.js",
6
6
  "type": "module",
@@ -105,8 +105,8 @@
105
105
  "vite-plugin-dts": "^4.5.4",
106
106
  "vite-tsconfig-paths": "^5.1.4",
107
107
  "vitest": "^4.0.18",
108
- "@commercetools/nimbus-icons": "^0.0.0-canary-20260202082736",
109
- "@commercetools/nimbus-tokens": "^0.0.0-canary-20260202082736"
108
+ "@commercetools/nimbus-icons": "^0.0.0-canary-20260202161550",
109
+ "@commercetools/nimbus-tokens": "^0.0.0-canary-20260202161550"
110
110
  },
111
111
  "peerDependencies": {
112
112
  "@chakra-ui/react": "^3.31.0",
@@ -115,8 +115,8 @@
115
115
  "slate-history": "^0.113.1",
116
116
  "slate-hyperscript": "^0.77.0",
117
117
  "slate-react": "^0.75.0",
118
- "@commercetools/nimbus-tokens": "^0.0.0-canary-20260202082736",
119
- "@commercetools/nimbus-icons": "^0.0.0-canary-20260202082736"
118
+ "@commercetools/nimbus-icons": "^0.0.0-canary-20260202161550",
119
+ "@commercetools/nimbus-tokens": "^0.0.0-canary-20260202161550"
120
120
  },
121
121
  "scripts": {
122
122
  "build": "pnpm run build-theme-typings && pnpm run build:lib",