academe-kit 0.9.4 → 0.9.5

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 (35) hide show
  1. package/dist/index.cjs +906 -4
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.ts +69 -12863
  4. package/dist/index.esm.js +905 -6
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/types/components/CosmicDecor/CosmicDecor.d.ts +10 -0
  7. package/dist/types/components/CosmicDecor/index.d.ts +2 -0
  8. package/dist/types/components/CosmicDecor/planets/astronaut.d.ts +2 -0
  9. package/dist/types/components/CosmicDecor/planets/black-hole.d.ts +2 -0
  10. package/dist/types/components/CosmicDecor/planets/earth.d.ts +2 -0
  11. package/dist/types/components/CosmicDecor/planets/giant.d.ts +2 -0
  12. package/dist/types/components/CosmicDecor/planets/index.d.ts +10 -0
  13. package/dist/types/components/CosmicDecor/planets/moon.d.ts +2 -0
  14. package/dist/types/components/CosmicDecor/planets/neptune.d.ts +2 -0
  15. package/dist/types/components/CosmicDecor/planets/satellite.d.ts +2 -0
  16. package/dist/types/components/CosmicDecor/planets/saturn.d.ts +2 -0
  17. package/dist/types/components/CosmicDecor/planets/sun.d.ts +2 -0
  18. package/dist/types/components/CosmicDecor/planets/types.d.ts +4 -0
  19. package/dist/types/components/CosmicStarsCanvas/CosmicStarsCanvas.d.ts +5 -0
  20. package/dist/types/components/CosmicStarsCanvas/index.d.ts +2 -0
  21. package/dist/types/components/JourneyStep/JourneyStep.d.ts +20 -0
  22. package/dist/types/components/JourneyStep/frames/circle-laurel.d.ts +2 -0
  23. package/dist/types/components/JourneyStep/frames/hexagon-ribbon.d.ts +2 -0
  24. package/dist/types/components/JourneyStep/frames/hexagon-wings.d.ts +2 -0
  25. package/dist/types/components/JourneyStep/frames/index.d.ts +4 -0
  26. package/dist/types/components/JourneyStep/frames/pentagon-crown.d.ts +2 -0
  27. package/dist/types/components/JourneyStep/frames/pentagon.d.ts +2 -0
  28. package/dist/types/components/JourneyStep/frames/shield-wings.d.ts +2 -0
  29. package/dist/types/components/JourneyStep/frames/types.d.ts +34 -0
  30. package/dist/types/components/JourneyStep/frames/utils.d.ts +23 -0
  31. package/dist/types/components/JourneyStep/index.d.ts +3 -0
  32. package/dist/types/index.d.ts +6 -0
  33. package/dist/types/services/CertificateService.d.ts +28 -12804
  34. package/dist/types/services/userService.d.ts +3 -56
  35. package/package.json +6 -2
@@ -0,0 +1,10 @@
1
+ import './cosmic-decor.css';
2
+ import type { CosmicPlanet } from './planets';
3
+ export type { CosmicPlanet };
4
+ export type CosmicDecorVariant = 'page' | 'session';
5
+ export interface CosmicDecorProps {
6
+ planets?: CosmicPlanet[];
7
+ showSparkles?: boolean;
8
+ decorVariant?: CosmicDecorVariant;
9
+ }
10
+ export declare function CosmicDecor({ planets, showSparkles, decorVariant, }: CosmicDecorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { CosmicDecor } from './CosmicDecor';
2
+ export type { CosmicDecorProps, CosmicDecorVariant, CosmicPlanet } from './CosmicDecor';
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetAstronaut({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetBlackHole({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetEarth({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetGiant({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export { PlanetSaturn } from './saturn';
2
+ export { PlanetGiant } from './giant';
3
+ export { PlanetEarth } from './earth';
4
+ export { PlanetNeptune } from './neptune';
5
+ export { PlanetBlackHole } from './black-hole';
6
+ export { PlanetSun } from './sun';
7
+ export { PlanetMoon } from './moon';
8
+ export { PlanetSatellite } from './satellite';
9
+ export { PlanetAstronaut } from './astronaut';
10
+ export type { CosmicPlanet, PlanetProps } from './types';
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetMoon({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetNeptune({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetSatellite({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetSaturn({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { PlanetProps } from './types';
2
+ export declare function PlanetSun({ id }: PlanetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type CosmicPlanet = 'saturn' | 'giant' | 'earth' | 'neptune' | 'black-hole' | 'sun' | 'moon' | 'satellite' | 'astronaut';
2
+ export interface PlanetProps {
3
+ id: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ import { type RefObject } from 'react';
2
+ export interface CosmicStarsCanvasProps {
3
+ containerRef: RefObject<HTMLElement | null>;
4
+ }
5
+ export declare function CosmicStarsCanvas({ containerRef }: CosmicStarsCanvasProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { CosmicStarsCanvas } from './CosmicStarsCanvas';
2
+ export type { CosmicStarsCanvasProps } from './CosmicStarsCanvas';
@@ -0,0 +1,20 @@
1
+ import { type ReactNode } from 'react';
2
+ import './journey-step.css';
3
+ import type { FrameKind } from './frames/types';
4
+ export type JourneyStepSize = 'sm' | 'md';
5
+ export type JourneyStepType = 'challenge' | 'course' | 'tutorial' | 'publication' | 'evaluation' | 'certificate';
6
+ export interface JourneyStepProps {
7
+ color?: string;
8
+ stepType?: JourneyStepType;
9
+ frame?: FrameKind;
10
+ icon: ReactNode;
11
+ isActive?: boolean;
12
+ isLocked?: boolean;
13
+ /** 0–100; quando definido, desenha trilha de progresso ao redor do frame */
14
+ progress?: number;
15
+ size?: JourneyStepSize;
16
+ ariaLabel?: string;
17
+ className?: string;
18
+ onClick?: () => void;
19
+ }
20
+ export declare function JourneyStep({ color, stepType, frame, icon, isActive, isLocked, progress, size, ariaLabel, className, onClick, }: JourneyStepProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { FrameRenderer } from './types';
2
+ export declare const circleLaurelFrame: FrameRenderer;
@@ -0,0 +1,2 @@
1
+ import type { FrameRenderer } from './types';
2
+ export declare const hexagonRibbonFrame: FrameRenderer;
@@ -0,0 +1,2 @@
1
+ import type { FrameRenderer } from './types';
2
+ export declare const hexagonWingsFrame: FrameRenderer;
@@ -0,0 +1,4 @@
1
+ import type { JourneyStepType } from '../JourneyStep';
2
+ import type { FrameKind, FrameRenderer } from './types';
3
+ export declare const FRAMES_BY_KIND: Record<FrameKind, FrameRenderer>;
4
+ export declare const FRAME_BY_TYPE: Record<JourneyStepType, FrameRenderer>;
@@ -0,0 +1,2 @@
1
+ import type { FrameRenderer } from './types';
2
+ export declare const pentagonCrownFrame: FrameRenderer;
@@ -0,0 +1,2 @@
1
+ import type { FrameRenderer } from './types';
2
+ export declare const pentagonFrame: FrameRenderer;
@@ -0,0 +1,2 @@
1
+ import type { FrameRenderer } from './types';
2
+ export declare const shieldWingsFrame: FrameRenderer;
@@ -0,0 +1,34 @@
1
+ import type { ReactNode } from 'react';
2
+ export type FrameKind = 'pentagon' | 'hexagonWings' | 'circleLaurel' | 'hexagonRibbon' | 'shieldWings' | 'pentagonCrown';
3
+ export interface PentagonTheme {
4
+ shadow: string;
5
+ outer: string;
6
+ outerStroke: string;
7
+ mid: string;
8
+ inner: string;
9
+ innerStroke: string;
10
+ card: string;
11
+ cardShine: string;
12
+ bookmark: string;
13
+ }
14
+ export interface FrameLayout {
15
+ width: number;
16
+ height: number;
17
+ bodyCenterX: number;
18
+ bodyCenterY: number;
19
+ iconCenterX: number;
20
+ iconCenterY: number;
21
+ iconWidth: number;
22
+ iconHeight: number;
23
+ }
24
+ export interface FrameRenderArgs {
25
+ theme: PentagonTheme;
26
+ scale: number;
27
+ layout: FrameLayout;
28
+ progress?: number;
29
+ }
30
+ export interface FrameRenderer {
31
+ kind: FrameKind;
32
+ layout: (scale: number) => FrameLayout;
33
+ render: (args: FrameRenderArgs) => ReactNode;
34
+ }
@@ -0,0 +1,23 @@
1
+ import type { JourneyStepType } from '../JourneyStep';
2
+ import type { FrameKind, PentagonTheme } from './types';
3
+ export declare const THEMES: Record<string, PentagonTheme>;
4
+ export declare const STEP_TYPE_TO_THEME: Record<JourneyStepType, keyof typeof THEMES>;
5
+ export declare const STEP_TYPE_TO_FRAME: Record<JourneyStepType, FrameKind>;
6
+ export declare const INACTIVE_THEME: PentagonTheme;
7
+ export declare function hexToRgb(hex: string): {
8
+ r: number;
9
+ g: number;
10
+ b: number;
11
+ } | null;
12
+ export declare function rgbToHsl(r: number, g: number, b: number): {
13
+ h: number;
14
+ s: number;
15
+ l: number;
16
+ };
17
+ export declare function hsl(h: number, s: number, l: number): string;
18
+ export declare function buildThemeFromColor(color: string): PentagonTheme;
19
+ export declare function polygonPoints(cx: number, cy: number, radius: number, sides: number, rotationDeg?: number): [number, number][];
20
+ export declare function norm([x, y]: [number, number]): [number, number];
21
+ export declare function scalePts(pts: [number, number][], cx: number, cy: number, factor: number): [number, number][];
22
+ export declare function roundedPolygonPath(pts: [number, number][], radius: number): string;
23
+ export declare function crownPath(cx: number, baseY: number, width: number, height: number): string;
@@ -0,0 +1,3 @@
1
+ export { JourneyStep } from './JourneyStep';
2
+ export type { JourneyStepProps, JourneyStepSize, JourneyStepType } from './JourneyStep';
3
+ export type { FrameKind } from './frames/types';
@@ -5,6 +5,12 @@ export type { RequiredClientRoles } from "./components/ProtectedApp";
5
5
  export { ProtectedComponent } from "./components/ProtectedComponent";
6
6
  export { ProtectedRouter } from "./components/ProtectedRouter";
7
7
  export { Spinner } from "./components/ui/spinner";
8
+ export { CosmicDecor } from "./components/CosmicDecor";
9
+ export type { CosmicDecorProps, CosmicDecorVariant, CosmicPlanet, } from "./components/CosmicDecor";
10
+ export { CosmicStarsCanvas } from "./components/CosmicStarsCanvas";
11
+ export type { CosmicStarsCanvasProps } from "./components/CosmicStarsCanvas";
12
+ export { JourneyStep } from "./components/JourneyStep";
13
+ export type { JourneyStepProps, JourneyStepSize, JourneyStepType, FrameKind, } from "./components/JourneyStep";
8
14
  export { AcademeAuthProvider, useAcademeAuth, } from "./context/SecurityProvider";
9
15
  export { useProtectedAppColors } from "./components/ProtectedApp";
10
16
  export type { AcademeKeycloakContextProps, SecurityProviderProps, KeycloakUser, SecurityContextType, AcademeUser, } from "./context/SecurityProvider/types";