@cincoders/cinnamon 0.2.1 → 0.3.0

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/dist/index.d.ts CHANGED
@@ -12,3 +12,4 @@ export { System } from './interfaces';
12
12
  export { useNavbar } from './lib-components/Page/useNavbar';
13
13
  export { ToastContainer, toast } from './components/Toast';
14
14
  export { IconRenderer } from './lib-components/IconRender';
15
+ export { PageWithAuth } from './lib-components/PageWithAuth';
@@ -2,7 +2,7 @@
2
2
  import { NavbarProps } from '../Navbar/index';
3
3
  import { FooterProps } from '../Footer/index';
4
4
  import { NavbarContextValue } from './useNavbar';
5
- interface PageProps {
5
+ export interface PageProps {
6
6
  navbar?: NavbarProps;
7
7
  footer?: FooterProps;
8
8
  children: JSX.Element | JSX.Element[];
@@ -17,4 +17,3 @@ interface PageProps {
17
17
  }
18
18
  export declare const NavbarContext: import("react").Context<NavbarContextValue | undefined>;
19
19
  export declare function Page({ navbar, footer, children, centralized, haveToast, components, createNavbarContext }: PageProps): JSX.Element;
20
- export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { PageProps } from '../Page';
3
+ import Keycloak from 'keycloak-js';
4
+ interface PageWithAuthProps extends PageProps {
5
+ auth: {
6
+ keycloak: Keycloak;
7
+ initialized: boolean;
8
+ permittedRoles: string[];
9
+ };
10
+ }
11
+ export declare function PageWithAuth({ auth, navbar, footer, centralized, haveToast, createNavbarContext, components, children }: PageWithAuthProps): JSX.Element;
12
+ export {};
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@cincoders/cinnamon",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "A collection components for standardized system appearance and functionality, easing development in web applications.",
5
5
  "license": "MIT",
6
6
  "author": "CInCoders <cincoders@cin.ufpe.br> (https://cincoders.cin.ufpe.br)",
7
- "homepage": "https://cincoders.github.io/cinnamon/",
7
+ "homepage": "http://cincoders.cin.ufpe.br/",
8
8
  "bugs": {
9
9
  "url": "https://github.com/CinCoders/cinnamon/issues"
10
10
  },