@djangocfg/ui-core 2.1.582 → 2.1.583

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": "@djangocfg/ui-core",
3
- "version": "2.1.582",
3
+ "version": "2.1.583",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -130,7 +130,8 @@
130
130
  "check:contrast": "node scripts/check-preset-contrast.mjs"
131
131
  },
132
132
  "peerDependencies": {
133
- "@djangocfg/i18n": "^2.1.582",
133
+ "@djangocfg/api": "^2.1.583",
134
+ "@djangocfg/i18n": "^2.1.583",
134
135
  "consola": "^3.4.2",
135
136
  "lucide-react": "^0.545.0",
136
137
  "moment": "^2.30.1",
@@ -206,9 +207,10 @@
206
207
  "vaul": "1.1.2"
207
208
  },
208
209
  "devDependencies": {
209
- "@djangocfg/eslint-config": "^2.1.582",
210
- "@djangocfg/i18n": "^2.1.582",
211
- "@djangocfg/typescript-config": "^2.1.582",
210
+ "@djangocfg/api": "^2.1.583",
211
+ "@djangocfg/eslint-config": "^2.1.583",
212
+ "@djangocfg/i18n": "^2.1.583",
213
+ "@djangocfg/typescript-config": "^2.1.583",
212
214
  "@storybook/react-vite": "^10.5.0",
213
215
  "@types/node": "^24.13.3",
214
216
  "@types/react": "19.2.15",
@@ -24,9 +24,10 @@
24
24
  import { useCallback, useEffect, useMemo } from 'react';
25
25
  import { useNavigate } from './useNavigate';
26
26
  import { NAVIGATE_EVENT } from './useLocation';
27
+ import { CFG_KEYS } from '@djangocfg/api/storage';
27
28
 
28
29
  const SERIAL_KEY = '__djcSerial';
29
- const COUNTER_KEY = '__djc_router_serial';
30
+ const COUNTER_KEY = CFG_KEYS.uiRouterSerial.key;
30
31
 
31
32
  interface SerialState {
32
33
  [SERIAL_KEY]?: number;
@@ -3,6 +3,7 @@
3
3
  import { create } from 'zustand';
4
4
 
5
5
  import { getTabId } from './tabId';
6
+ import { cfgStorage } from '@djangocfg/api/storage';
6
7
 
7
8
  /**
8
9
  * Cross-tab coordination store. Singleton, lazily initialised on the
@@ -50,7 +51,7 @@ interface ActiveTabState {
50
51
  peers: string[];
51
52
  }
52
53
 
53
- const CHANNEL_NAME = 'djangocfg:active-tab';
54
+ const CHANNEL_NAME = cfgStorage.key('ui', 'active_tab');
54
55
 
55
56
  const initialId = getTabId();
56
57
 
@@ -1,3 +1,4 @@
1
+ import { CFG_KEYS } from '@djangocfg/api/storage';
1
2
  /**
2
3
  * Stable per-tab identifier. Persisted in sessionStorage so a single
3
4
  * tab keeps its id across in-tab reloads (Cmd-R) but a new tab gets a
@@ -10,7 +11,7 @@
10
11
  * for our purposes (ties broken by random suffix).
11
12
  */
12
13
 
13
- const KEY = 'djangocfg:tab-id';
14
+ const KEY = CFG_KEYS.uiTabId.key;
14
15
 
15
16
  let cached: string | null = null;
16
17
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { create } from 'zustand';
4
4
  import { persist, createJSONStorage } from 'zustand/middleware';
5
+ import { CFG_KEYS } from '@djangocfg/api/storage';
5
6
 
6
7
  /**
7
8
  * Centralized UI-state persistence for ui-core components.
@@ -68,7 +69,7 @@ export const useUIPersistStore = create<UIPersistStore>()(
68
69
  listScopes: () => Object.keys(get().state),
69
70
  }),
70
71
  {
71
- name: 'djangocfg.ui.state',
72
+ name: CFG_KEYS.uiState.key,
72
73
  version: 1,
73
74
  storage: createJSONStorage(() =>
74
75
  typeof window !== 'undefined' ? window.localStorage : noopStorage,