@datalayer/agent-runtimes 1.0.7 → 1.0.8

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.
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { create } from 'zustand';
13
13
  import { devtools, subscribeWithSelector, persist } from 'zustand/middleware';
14
+ import { shallow } from 'zustand/shallow';
14
15
  import { GITHUB_PROVIDER, GOOGLE_PROVIDER, KAGGLE_PROVIDER } from './types';
15
16
  import { generatePKCEPair, generateState } from './pkce';
16
17
  /**
@@ -459,7 +460,7 @@ export const useIdentityStore = create()(devtools(subscribeWithSelector(persist(
459
460
  * Get all connected identities
460
461
  */
461
462
  export function useConnectedIdentities() {
462
- return useIdentityStore(state => Array.from(state.identities.values()).filter(i => i.isConnected));
463
+ return useIdentityStore(state => Array.from(state.identities.values()).filter(i => i.isConnected), shallow);
463
464
  }
464
465
  /**
465
466
  * Get connected provider names
@@ -467,7 +468,7 @@ export function useConnectedIdentities() {
467
468
  export function useConnectedProviders() {
468
469
  return useIdentityStore(state => Array.from(state.identities.entries())
469
470
  .filter(([_, identity]) => identity.isConnected)
470
- .map(([provider]) => provider));
471
+ .map(([provider]) => provider), shallow);
471
472
  }
472
473
  /**
473
474
  * Get identity for a specific provider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",