@sanity/sdk-react 3.4.0-rc.0 → 3.5.0-next.20260922182803

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.
Files changed (41) hide show
  1. package/dist/_exports/dashboard.d.ts +151 -45
  2. package/dist/_exports/dashboard.d.ts.map +1 -1
  3. package/dist/_exports/dashboard.js +267 -125
  4. package/dist/_exports/dashboard.js.map +1 -1
  5. package/dist/index.d.ts +21 -141
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +66 -147
  8. package/dist/index.js.map +1 -1
  9. package/dist/{useStudioWorkspacesByProjectIdDataset-B5A5kBH9.js → useStudioWorkspacesByProjectIdDataset-DL6_9jgU.js} +61 -4
  10. package/dist/useStudioWorkspacesByProjectIdDataset-DL6_9jgU.js.map +1 -0
  11. package/package.json +9 -9
  12. package/src/_exports/dashboard.test-d.ts +3 -0
  13. package/src/_exports/dashboard.ts +13 -2
  14. package/src/_exports/sdk-react.ts +0 -3
  15. package/src/components/auth/AuthBoundary.test.tsx +2 -81
  16. package/src/components/auth/AuthBoundary.tsx +3 -17
  17. package/src/components/auth/LoginCallback.test.tsx +7 -46
  18. package/src/components/auth/LoginCallback.tsx +4 -22
  19. package/src/hooks/dashboard/useAgentResourceContext.test.tsx +67 -2
  20. package/src/hooks/dashboard/useAgentResourceContext.ts +35 -6
  21. package/src/hooks/dashboard/useApplicationContext.test.tsx +95 -0
  22. package/src/hooks/dashboard/useApplicationContext.ts +47 -0
  23. package/src/hooks/dashboard/useApplications.test.tsx +165 -7
  24. package/src/hooks/dashboard/useApplications.ts +112 -28
  25. package/src/hooks/dashboard/useCapabilities.test.tsx +84 -0
  26. package/src/hooks/dashboard/useCapabilities.ts +27 -0
  27. package/src/hooks/dashboard/useNavigate.test.ts +392 -5
  28. package/src/hooks/dashboard/useNavigate.ts +169 -26
  29. package/src/hooks/dashboard/useNavigateToStudioDocument.test.ts +116 -9
  30. package/src/hooks/dashboard/useNavigateToStudioDocument.ts +110 -39
  31. package/src/hooks/dashboard/useRecordDocumentHistoryEvent.test.ts +99 -1
  32. package/src/hooks/dashboard/useRecordDocumentHistoryEvent.ts +73 -2
  33. package/src/hooks/dashboard/useStudioWorkspacesByProjectIdDataset.test.tsx +23 -1
  34. package/src/hooks/dashboard/useStudioWorkspacesByProjectIdDataset.ts +2 -1
  35. package/dist/useStudioWorkspacesByProjectIdDataset-B5A5kBH9.js.map +0 -1
  36. package/src/hooks/auth/useHandleOAuthCallback.test.tsx +0 -16
  37. package/src/hooks/auth/useHandleOAuthCallback.tsx +0 -49
  38. package/src/hooks/auth/useOAuthAuthorize.test.tsx +0 -16
  39. package/src/hooks/auth/useOAuthAuthorize.tsx +0 -28
  40. package/src/hooks/auth/useOAuthTokens.test.tsx +0 -240
  41. package/src/hooks/auth/useOAuthTokens.tsx +0 -95
@@ -1,7 +1,7 @@
1
- import { Application, ApplicationBase, DocumentHandle } from "@sanity/sdk";
1
+ import { Application, ApplicationBase, DocumentHandle, Installation, InstallationInclude } from "@sanity/sdk";
2
2
  import React, { PropsWithChildren } from "react";
3
3
  import { PathChangeMessage } from "@sanity/message-protocol";
4
- import { ApplicationConfig, ApplicationConfig as ApplicationConfig$1, ApplicationConfigAppType, ApplicationConfigAppType as ApplicationConfigAppType$1, ConnectMessageBusOptions, DashboardTopics, EventTopic, EventTopic as EventTopic$1, EventTopicDef, MessageBus, MessageBusAbortOptions, MessageBusClient, MessageBusConnection, MessageBusEmitOptions, MessageBusEmitOptions as MessageBusEmitOptions$1, MessageBusEmitResult, MessageBusEmitResult as MessageBusEmitResult$1, MessageBusError, MessageBusErrorCode, MessageBusHost, MessageBusMessage, MessageBusMeta, MessageBusQueryOptions, MessageBusStateSource, NavigationLocation, NavigationTarget, PayloadOf, PayloadOf as PayloadOf$1, RemoteModuleRef, RemoteModuleRef as RemoteModuleRef$1, ReplyOf, ReplyOf as ReplyOf$1, StateTopic, StateTopic as StateTopic$1, StateTopicDef, TopicData, TopicData as TopicData$1, TopicError, TopicName, TopicResult, Topics, ValueOf, ValueOf as ValueOf$1, connectMessageBus } from "@sanity/sdk/dashboard";
4
+ import { ApplicationConfig, ApplicationConfig as ApplicationConfig$1, ApplicationConfigAppType, ApplicationConfigAppType as ApplicationConfigAppType$1, ApplicationContext, ApplicationContext as ApplicationContext$1, Capability, CapabilityRecord, ConnectMessageBusOptions, DashboardTopics, EventTopic, EventTopic as EventTopic$1, EventTopicDef, MessageBus, MessageBusAbortOptions, MessageBusClient, MessageBusConnection, MessageBusEmitOptions, MessageBusEmitOptions as MessageBusEmitOptions$1, MessageBusEmitResult, MessageBusEmitResult as MessageBusEmitResult$1, MessageBusError, MessageBusErrorCode, MessageBusHost, MessageBusMessage, MessageBusMeta, MessageBusQueryOptions, MessageBusStateSource, NavigationLocation, NavigationTarget, PayloadOf, PayloadOf as PayloadOf$1, RemoteModuleRef, RemoteModuleRef as RemoteModuleRef$1, ReplyOf, ReplyOf as ReplyOf$1, StateTopic, StateTopic as StateTopic$1, StateTopicDef, TopicData, TopicData as TopicData$1, TopicError, TopicName, TopicResult, Topics, ValueOf, ValueOf as ValueOf$1, capabilities, connectMessageBus } from "@sanity/sdk/dashboard";
5
5
  import { CurrentUser as CurrentUser$1 } from "@sanity/types";
6
6
  import { UserOptions } from "@module-federation/runtime/types";
7
7
  /**
@@ -300,12 +300,14 @@ interface AgentResourceContextOptions {
300
300
  }
301
301
  /**
302
302
  * @public
303
- * Hook for emitting agent resource context updates to the Dashboard.
304
- * This allows the Agent to understand what resource the user is currently
305
- * interacting with (e.g., which document they're editing).
303
+ * Hook for reporting the resource the user is currently interacting with (for example, which
304
+ * document they're editing) so the Agent can understand their context. The hook reports on mount
305
+ * and again whenever the context changes.
306
306
  *
307
- * The hook will automatically emit the context when it changes, and also
308
- * emit the initial context when the hook is first mounted.
307
+ * The two Dashboard runtimes differ in transport, but the signature is the same:
308
+ * - In an iframe (Comlink), it emits the `dashboard/v1/events/agent/resource/update` event.
309
+ * - In a federated app (message bus), it publishes {@link useApplicationContext}'s
310
+ * `applications.context.update` topic. Reach for `useApplicationContext` directly in new code.
309
311
  *
310
312
  * @category Agent
311
313
  * @param options - The resource context options containing projectId, dataset, and optional documentId
@@ -329,47 +331,75 @@ interface AgentResourceContextOptions {
329
331
  * ```
330
332
  */
331
333
  export declare function useAgentResourceContext(options: AgentResourceContextOptions): void;
332
- type DashboardTopicApplication = Extract<NonNullable<ValueOf$1<'applications.list'>>, {
334
+ type DashboardTopicEntry = Extract<NonNullable<ValueOf$1<'applications.list'>>, {
333
335
  ok: true;
334
336
  }>['value'][number];
337
+ type DashboardTopicApplication = Extract<DashboardTopicEntry, {
338
+ type: unknown;
339
+ }>;
335
340
  type DashboardApplicationInterface = NonNullable<NonNullable<DashboardTopicApplication['activeDeployment']>['interfaces']>[number];
336
341
  type ViewInterface = Exclude<DashboardApplicationInterface, {
337
342
  type: 'worker';
338
343
  }>;
339
344
  /**
340
- * A dashboard view exposed by an application.
345
+ * The shared identity fields attached to each {@link DashboardView.application} and
346
+ * {@link DashboardWebWorker.application}, and the input to module loading. Widens
347
+ * {@link ApplicationBase} so `type` also covers installations.
348
+ * @public
349
+ */
350
+ type DashboardApplicationBase = Omit<ApplicationBase, 'type'> & {
351
+ readonly type: ApplicationBase['type'] | 'installation';
352
+ /** Served by a CLI dev server rather than a deployment. */
353
+ readonly isLocal: boolean;
354
+ };
355
+ /**
356
+ * A dashboard view exposed by an application or installation.
341
357
  * @public
342
358
  */
343
359
  type DashboardView = { [Type in ViewInterface['type']]: Omit<Extract<ViewInterface, {
344
360
  type: Type;
345
361
  }>, 'type'> & {
346
- readonly application: ApplicationBase;
362
+ readonly application: DashboardApplicationBase;
347
363
  readonly module: RemoteModuleRef$1;
348
364
  readonly surface: Type extends 'app' ? 'window' : Type;
349
365
  }; }[ViewInterface['type']];
350
366
  /**
351
- * A web worker exposed by an application.
367
+ * A web worker exposed by an application or installation.
352
368
  * @public
353
369
  */
354
370
  type DashboardWebWorker = Extract<DashboardApplicationInterface, {
355
371
  type: 'worker';
356
372
  }> & {
357
- readonly application: ApplicationBase;
373
+ readonly application: DashboardApplicationBase;
358
374
  readonly module: RemoteModuleRef$1;
359
375
  };
360
376
  /**
361
- * The minimal Brett application fields with its loadable views and web workers.
377
+ * An installation shaped into the shared application base, with its raw record kept under
378
+ * `installation` for consumers that need the full record.
362
379
  * @public
363
380
  */
364
- type DashboardApplication = DashboardTopicApplication & {
381
+ type DashboardInstallation = Omit<DashboardApplicationBase, 'type'> & {
382
+ readonly type: 'installation';
383
+ readonly installation: Installation<InstallationInclude>;
384
+ };
385
+ /**
386
+ * A dashboard entry — an application or an installation — in one consistent shape, with its
387
+ * loadable views and web workers. `type` distinguishes the kinds and `isLocal` marks dev-server
388
+ * applications; render a list without branching.
389
+ * @public
390
+ */
391
+ type DashboardApplication = (DashboardTopicApplication | DashboardInstallation) & Pick<DashboardApplicationBase, 'isLocal'> & {
365
392
  readonly views: DashboardView[];
366
393
  readonly webWorkers: DashboardWebWorker[];
367
394
  };
368
395
  /**
369
- * Returns the applications available in the dashboard.
396
+ * Returns the applications and installations available in the dashboard, in one consistent shape.
370
397
  *
371
- * Suspends until the dashboard publishes its application list; a cleared list is empty. Throws a
372
- * `TopicError` to the nearest error boundary when the dashboard fails to load applications.
398
+ * Suspends until the dashboard publishes its list; a cleared list is empty. Throws a `TopicError`
399
+ * to the nearest error boundary when the dashboard fails to load. Every entry exposes the same base
400
+ * fields plus `views` and `webWorkers`; `type` distinguishes applications (`'studio' | 'coreApp'`)
401
+ * from installations (`'installation'`), which also carry the raw record under `installation`.
402
+ * `isLocal` marks applications served by a CLI dev server.
373
403
  *
374
404
  * @example
375
405
  * ```tsx
@@ -463,6 +493,39 @@ export declare function useApplicationConfig(selector: ApplicationConfigSelector
463
493
  * @public
464
494
  */
465
495
  export declare function useApplicationConfigs(): readonly ApplicationConfig$1[];
496
+ /**
497
+ * Publishes what this application is currently showing to the Dashboard message bus, so the host
498
+ * can hold the foreground application's context. Pass `null` when nothing is open.
499
+ *
500
+ * The context is published on mount and whenever it changes, and cleared with `null` on unmount.
501
+ * A change publishes `null` before the new context, as the component has stopped showing the old
502
+ * one. Pass a memoised value: the hook compares by reference, so a new object on every render
503
+ * republishes on every render.
504
+ *
505
+ * The host reads the sending application from `message.meta.appId`, so the payload carries no
506
+ * application ID.
507
+ *
508
+ * @param context - The application context to publish, or `null` to clear it
509
+ *
510
+ * @example
511
+ * ```tsx
512
+ * import {useApplicationContext} from '@sanity/sdk-react/dashboard'
513
+ * import {useMemo} from 'react'
514
+ *
515
+ * function DocumentView({documentId}: {documentId: string}) {
516
+ * const context = useMemo(
517
+ * () => ({resource: {id: 'my-project.production', type: 'dataset' as const}, document: {id: documentId}}),
518
+ * [documentId],
519
+ * )
520
+ * useApplicationContext(context)
521
+ * return <div>Editing {documentId}</div>
522
+ * }
523
+ * ```
524
+ *
525
+ * @public
526
+ * @category Dashboard
527
+ */
528
+ export declare function useApplicationContext(context: ApplicationContext$1 | null): void;
466
529
  /**
467
530
  * Returns the id of the application in the foreground, or `null` when Dashboard has none.
468
531
  *
@@ -495,6 +558,27 @@ export declare function useApplicationForegroundId(): Application['id'] | null;
495
558
  * @public
496
559
  */
497
560
  export declare function useAuthToken(): string | null;
561
+ /**
562
+ * Returns the capabilities the host provides.
563
+ *
564
+ * A capability is something the host provides; an application reads this record to hide its own
565
+ * implementation of anything the host provides, or to skip publishing to a capability the host
566
+ * does not have. A missing key means the host does not provide that capability.
567
+ *
568
+ * Suspends until the host publishes the record.
569
+ *
570
+ * @example
571
+ * ```tsx
572
+ * function UserMenu() {
573
+ * const {globalUserMenu} = useCapabilities()
574
+ * if (globalUserMenu) return null
575
+ * return <LocalUserMenu />
576
+ * }
577
+ * ```
578
+ *
579
+ * @public
580
+ */
581
+ export declare function useCapabilities(): TopicData$1<'applications.capabilities'>;
498
582
  /**
499
583
  * Returns the signed-in user, or `null` while signed out.
500
584
  *
@@ -565,50 +649,69 @@ type TopicEmitter<K extends EventTopic$1> = (...args: PayloadOf$1<K> extends voi
565
649
  * @public
566
650
  */
567
651
  export declare function useEmit<K extends EventTopic$1>(topic: K): TopicEmitter<K>;
652
+ /**
653
+ * A navigation the Dashboard asks the app to perform, or that the app reports to the Dashboard.
654
+ * `path` is relative to the app's own route, with no leading slash (`'documents/abc'`), and may
655
+ * carry a query string and hash.
656
+ * @public
657
+ */
658
+ type DashboardNavigation = PathChangeMessage['data'];
659
+ /**
660
+ * Reports an in-app navigation to the Dashboard so the browser URL and the Dashboard's own
661
+ * router follow the app. `type` defaults to `'push'` and only applies in the federated runtime;
662
+ * see {@link useNavigate}.
663
+ * @public
664
+ */
665
+ type NavigateToDashboardPath = (options: {
666
+ path: string;
667
+ type?: 'push' | 'replace';
668
+ }) => void;
568
669
  /**
569
670
  * @public
570
671
  *
571
672
  * A helper hook designed to be injected into routing components for apps within the Dashboard.
572
- * While the Dashboard can usually handle navigation, there are special cases when you
573
- * are already within a target app, and need to navigate to another route inside of that app.
574
- *
575
- * For example, your user might "favorite" a document inside of your application.
576
- * If they click on the Dashboard favorites item in the sidebar, and are already within your application,
577
- * there needs to be some way for the dashboard to signal to your application to reroute to where that document was favorited.
578
- *
579
- * This hook is intended to receive those messages, and takes a function to route to the correct path.
673
+ * It keeps the app's router and the Dashboard in two-way sync: `navigateFn` receives the
674
+ * navigations the Dashboard asks the app to perform, and the returned function reports the app's
675
+ * own in-app navigations back to the Dashboard so the browser URL and the Dashboard's router
676
+ * follow along.
677
+ *
678
+ * A navigation the app reports is not echoed back through `navigateFn`. The returned function is
679
+ * referentially stable.
680
+ *
681
+ * The two Dashboard runtimes differ:
682
+ * - In an iframe (Comlink), inbound `type` may be `'push'`, `'replace'` or `'pop'`. Reporting is
683
+ * optional because the bridge already forwards the iframe's own `pushState`; a reported `type`
684
+ * is ignored and the host applies the URL as a `replace`.
685
+ * - In a federated app (message bus), inbound `type` is `'push'` or `'replace'`; `'pop'` is never
686
+ * sent. Reporting is required because the app's router does not reach the host, and `type` is
687
+ * honoured. Until the Dashboard publishes the app's base path, reports are dropped with a
688
+ * console warning.
580
689
  *
581
690
  * @param navigateFn - Function to handle navigation; should accept:
582
691
  * - `path`: a string, which will be a relative path (for example, 'my-route')
583
692
  * - `type`: 'push', 'replace', or 'pop', which will be the type of navigation to perform
693
+ * @returns A function the app calls to report its own in-app navigations to the Dashboard.
584
694
  *
585
695
  * @example
586
696
  * ```tsx
587
697
  * import {useNavigate} from '@sanity/sdk-react/dashboard'
588
- * import {BrowserRouter, useNavigate as useRouterNavigate} from 'react-router'
589
- * import {Suspense} from 'react'
590
- *
591
- * function DashboardNavigationHandler() {
592
- * const navigate = useRouterNavigate()
593
- * useNavigate(({path, type}) => {
594
- * navigate(path, {replace: type === 'replace'})
698
+ * import {useEffect} from 'react'
699
+ * import {useLocation, useNavigate as useRouterNavigate} from 'react-router'
700
+ *
701
+ * function DashboardNavigationSync() {
702
+ * const routerNavigate = useRouterNavigate()
703
+ * const {pathname, search, hash} = useLocation()
704
+ * const navigate = useNavigate(({path, type}) => {
705
+ * routerNavigate(path, {replace: type === 'replace'})
595
706
  * })
707
+ * useEffect(() => {
708
+ * navigate({path: `${pathname.slice(1)}${search}${hash}`})
709
+ * }, [navigate, pathname, search, hash])
596
710
  * return null
597
711
  * }
598
- *
599
- * // Wrap the component with Suspense since the hook may suspend
600
- * function MyApp() {
601
- * return (
602
- * <BrowserRouter>
603
- * <Suspense>
604
- * <DashboardNavigationHandler />
605
- * </Suspense>
606
- * </BrowserRouter>
607
- * )
608
- * }
609
712
  * ```
610
713
  */
611
- export declare function useNavigate(navigateFn: (options: PathChangeMessage['data']) => void): void;
714
+ export declare function useNavigate(navigateFn: (options: DashboardNavigation) => void): NavigateToDashboardPath;
612
715
  /**
613
716
  * @public
614
717
  * @category Types
@@ -624,6 +727,9 @@ interface NavigateToStudioResult {
624
727
  * Uses the `projectId` and `dataset` properties of the {@link DocumentHandle} you provide to resolve the correct Studio.
625
728
  * This will only work if you have deployed a studio with a workspace with this `projectId` / `dataset` combination.
626
729
  *
730
+ * Works in both Dashboard runtimes: it sends the navigation over the Comlink connection in the
731
+ * iframe runtime and over the message bus in the federated runtime.
732
+ *
627
733
  * @remarks If you write your own Document Handle to pass to this hook (as opposed to a Document Handle generated by another hook),
628
734
  * it must include values for `documentId`, `documentType`, `projectId`, and `dataset`.
629
735
  *
@@ -752,5 +858,5 @@ export declare const useTopic: <K extends StateTopic$1>(topic: K) => TopicData$1
752
858
  * @public
753
859
  */
754
860
  export declare function useWindowTitle(viewTitle?: string): void;
755
- export { type AgentResourceContextOptions, type ApplicationConfig, type ApplicationConfigAppType, type ApplicationConfigSelector, type CanvasUrl, type ConnectMessageBusOptions, type CoreApplicationUrl, type CreateIntentParameters, type CreateRemoteInstanceOptions, type DashboardApplication, type DashboardTopics, type DashboardUrl, type DashboardView, type DashboardWebWorker, type EditIntentParameters, type EventTopic, type EventTopicDef, type FederationRemote, type MediaLibraryUrl, type MessageBus, type MessageBusAbortOptions, type MessageBusClient, type MessageBusConnection, type MessageBusEmitOptions, type MessageBusEmitResult, MessageBusError, type MessageBusErrorCode, type MessageBusHost, type MessageBusMessage, type MessageBusMeta, type MessageBusQueryOptions, type MessageBusStateSource, type NavigateToStudioResult, type NavigationLocation, type NavigationTarget, type PayloadOf, type ReleaseIntentParameters, type RemoteInstance, type RemoteModuleRef, type ReplyOf, type StateTopic, type StateTopicDef, type StudioIntentUrl, type StudioUrl, type StudioWorkspaceUrl, DashboardTokenRefreshProvider as TokenRefreshProvider, type TopicData, type TopicEmitter, TopicError, type TopicName, type TopicResult, type Topics, type Urls, type ValueOf, connectMessageBus };
861
+ export { type AgentResourceContextOptions, type ApplicationConfig, type ApplicationConfigAppType, type ApplicationConfigSelector, type ApplicationContext, type CanvasUrl, type Capability, type CapabilityRecord, type ConnectMessageBusOptions, type CoreApplicationUrl, type CreateIntentParameters, type CreateRemoteInstanceOptions, type DashboardApplication, type DashboardApplicationBase, type DashboardInstallation, type DashboardNavigation, type DashboardTopics, type DashboardUrl, type DashboardView, type DashboardWebWorker, type EditIntentParameters, type EventTopic, type EventTopicDef, type FederationRemote, type MediaLibraryUrl, type MessageBus, type MessageBusAbortOptions, type MessageBusClient, type MessageBusConnection, type MessageBusEmitOptions, type MessageBusEmitResult, MessageBusError, type MessageBusErrorCode, type MessageBusHost, type MessageBusMessage, type MessageBusMeta, type MessageBusQueryOptions, type MessageBusStateSource, type NavigateToDashboardPath, type NavigateToStudioResult, type NavigationLocation, type NavigationTarget, type PayloadOf, type ReleaseIntentParameters, type RemoteInstance, type RemoteModuleRef, type ReplyOf, type StateTopic, type StateTopicDef, type StudioIntentUrl, type StudioUrl, type StudioWorkspaceUrl, DashboardTokenRefreshProvider as TokenRefreshProvider, type TopicData, type TopicEmitter, TopicError, type TopicName, type TopicResult, type Topics, type Urls, type ValueOf, capabilities, connectMessageBus };
756
862
  //# sourceMappingURL=dashboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.d.ts","names":[],"sources":["../../src/context/DashboardTokenRefresh.tsx","../../src/dashboard/createRemoteInstance.ts","../../src/dashboard/urlFor.ts","../../src/hooks/dashboard/useAgentResourceContext.ts","../../src/hooks/dashboard/useApplications.ts","../../src/hooks/dashboard/useApplication.ts","../../src/hooks/dashboard/useApplicationBasePath.ts","../../src/hooks/dashboard/useApplicationConfig.ts","../../src/hooks/dashboard/useApplicationConfigs.ts","../../src/hooks/dashboard/useApplicationForegroundId.ts","../../src/hooks/dashboard/useAuthToken.ts","../../src/hooks/dashboard/useCurrentUser.ts","../../src/hooks/dashboard/useEmit.ts","../../src/hooks/dashboard/useNavigate.ts","../../src/hooks/dashboard/useNavigateToStudioDocument.ts","../../src/hooks/dashboard/useOrganizationId.tsx","../../src/hooks/dashboard/useRemoteClient.ts","../../src/hooks/dashboard/useTopic.ts","../../src/hooks/dashboard/useWindowTitle.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+Fa,+BAA+B,MAAM,GA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgDc,4BACd,gBAAgB,gBAChB,8BACC;;;;;;;;;;;;;;;;;;;;;;;wBCpCa;;;;;;qBCrBH,uBAAuB;;;;;;;;;;;;;;;;;;qBCavB,WAMN,UAAU,cAAY,OAAO,MAAM,YAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBC4CpC,eAAe"}
1
+ {"version":3,"file":"dashboard.d.ts","names":[],"sources":["../../src/context/DashboardTokenRefresh.tsx","../../src/dashboard/createRemoteInstance.ts","../../src/dashboard/urlFor.ts","../../src/hooks/dashboard/useAgentResourceContext.ts","../../src/hooks/dashboard/useApplications.ts","../../src/hooks/dashboard/useApplication.ts","../../src/hooks/dashboard/useApplicationBasePath.ts","../../src/hooks/dashboard/useApplicationConfig.ts","../../src/hooks/dashboard/useApplicationConfigs.ts","../../src/hooks/dashboard/useApplicationContext.ts","../../src/hooks/dashboard/useApplicationForegroundId.ts","../../src/hooks/dashboard/useAuthToken.ts","../../src/hooks/dashboard/useCapabilities.ts","../../src/hooks/dashboard/useCurrentUser.ts","../../src/hooks/dashboard/useEmit.ts","../../src/hooks/dashboard/useNavigate.ts","../../src/hooks/dashboard/useNavigateToStudioDocument.ts","../../src/hooks/dashboard/useOrganizationId.tsx","../../src/hooks/dashboard/useRemoteClient.ts","../../src/hooks/dashboard/useTopic.ts","../../src/hooks/dashboard/useWindowTitle.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+Fa,+BAA+B,MAAM,GAAG;KCxFhD,aAAa,GAAG,gBAAgB,KAAK,KAAK,GAAG,KAAK,QAAQ,KAAK,GAAG;;;;KAK3D;EACV;EACA;;;;;KAcU,8BAA8B,aACxC,KAAK;;;;UAOU;EACf,gBAAgB,SAAS;;EAEzB,WAAW,GAAG,aAAa,QAAQ;;EAEnC,cAAc,cAAc,qBAAqB;;;;;;wBAOnC,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