@converge-cloudops/gaia-ui 0.2.4 → 0.3.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 CHANGED
@@ -114,6 +114,8 @@ Full documentation is in the [`documentation/`](./documentation/) folder:
114
114
  - [GaiaHeader](https://github.com/cict-cloud/gaia-ui/blob/main/documentation/components/GaiaHeader.md) — top header bar
115
115
  - [GaiaNavbar](https://github.com/cict-cloud/gaia-ui/blob/main/documentation/components/GaiaNavbar.md) — left sidebar navigation
116
116
  - [NavbarLinksGroup](https://github.com/cict-cloud/gaia-ui/blob/main/documentation/components/NavbarLinksGroup.md) — nav link primitive
117
+ - [GaiaShellProvider](https://github.com/cict-cloud/gaia-ui/blob/main/documentation/context/GaiaShellProvider.md) — context provider for user and remote configs
118
+ - [GaiaShellContext](https://github.com/cict-cloud/gaia-ui/blob/main/documentation/context/GaiaShellContext.md) — context types and hooks (`useGaiaShellContext`, `useGaiaRemoteConfig`)
117
119
  - [API Reference](https://github.com/cict-cloud/gaia-ui/blob/main/documentation/api-reference.md) — all exported TypeScript types
118
120
 
119
121
  ---
@@ -0,0 +1,24 @@
1
+ export interface GaiaRemoteConfigs {
2
+ tropos?: {
3
+ baseUrl: string;
4
+ };
5
+ pleco?: {
6
+ baseUrl: string;
7
+ };
8
+ }
9
+ export interface GaiaShellUser {
10
+ id: string;
11
+ username: string;
12
+ email: string;
13
+ is_superuser: boolean;
14
+ permissions: string[];
15
+ }
16
+ export interface GaiaShellContextValue {
17
+ user: GaiaShellUser | null;
18
+ remotes: GaiaRemoteConfigs;
19
+ }
20
+ declare const GaiaShellContext: import('react').Context<GaiaShellContextValue>;
21
+ export declare const useGaiaShellContext: () => GaiaShellContextValue;
22
+ export declare const useGaiaRemoteConfig: <K extends keyof GaiaRemoteConfigs>(remote: K) => GaiaRemoteConfigs[K];
23
+ export { GaiaShellContext };
24
+ //# sourceMappingURL=GaiaShellContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GaiaShellContext.d.ts","sourceRoot":"","sources":["../../src/context/GaiaShellContext.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7B,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAE7B;AAOD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,QAAA,MAAM,gBAAgB,gDAGpB,CAAC;AAEH,eAAO,MAAM,mBAAmB,6BAAqC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,iBAAiB,EACnE,QAAQ,CAAC,KACR,iBAAiB,CAAC,CAAC,CAErB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { GaiaShellContextValue } from './GaiaShellContext';
2
+ interface Props {
3
+ value: GaiaShellContextValue;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare function GaiaShellProvider({ value, children }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=GaiaShellProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GaiaShellProvider.d.ts","sourceRoot":"","sources":["../../src/context/GaiaShellProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAC;AAE5B,UAAU,KAAK;IACb,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAM3D"}