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.
- package/dist/index.cjs +906 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +69 -12863
- package/dist/index.esm.js +905 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/CosmicDecor/CosmicDecor.d.ts +10 -0
- package/dist/types/components/CosmicDecor/index.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/astronaut.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/black-hole.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/earth.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/giant.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/index.d.ts +10 -0
- package/dist/types/components/CosmicDecor/planets/moon.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/neptune.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/satellite.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/saturn.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/sun.d.ts +2 -0
- package/dist/types/components/CosmicDecor/planets/types.d.ts +4 -0
- package/dist/types/components/CosmicStarsCanvas/CosmicStarsCanvas.d.ts +5 -0
- package/dist/types/components/CosmicStarsCanvas/index.d.ts +2 -0
- package/dist/types/components/JourneyStep/JourneyStep.d.ts +20 -0
- package/dist/types/components/JourneyStep/frames/circle-laurel.d.ts +2 -0
- package/dist/types/components/JourneyStep/frames/hexagon-ribbon.d.ts +2 -0
- package/dist/types/components/JourneyStep/frames/hexagon-wings.d.ts +2 -0
- package/dist/types/components/JourneyStep/frames/index.d.ts +4 -0
- package/dist/types/components/JourneyStep/frames/pentagon-crown.d.ts +2 -0
- package/dist/types/components/JourneyStep/frames/pentagon.d.ts +2 -0
- package/dist/types/components/JourneyStep/frames/shield-wings.d.ts +2 -0
- package/dist/types/components/JourneyStep/frames/types.d.ts +34 -0
- package/dist/types/components/JourneyStep/frames/utils.d.ts +23 -0
- package/dist/types/components/JourneyStep/index.d.ts +3 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/services/CertificateService.d.ts +28 -12804
- package/dist/types/services/userService.d.ts +3 -56
- 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,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,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,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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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";
|