academe-kit 0.11.4 → 0.11.6
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 +22 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +375 -3
- package/dist/index.esm.js +22 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/AcademeLoading/AcademeLoading.d.ts +9 -2
- package/dist/types/components/AcademeLoading/LogoA.d.ts +3 -0
- package/dist/types/components/AcademeLoading/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/SubmissionService.d.ts +29 -0
- package/dist/types/types/academe-api.d.ts +336 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -124,6 +124,8 @@ interface AcademeLoadingColors {
|
|
|
124
124
|
/** Círculo branco ("face"). */
|
|
125
125
|
white: string;
|
|
126
126
|
}
|
|
127
|
+
/** Tema visual da vinheta. `light` (default) preserva o fundo claro atual; `dark` usa o fundo escuro da marca. */
|
|
128
|
+
type AcademeLoadingTheme = "light" | "dark";
|
|
127
129
|
interface AcademeLoadingProps {
|
|
128
130
|
/** Lado do palco quadrado, em px. Default 320. */
|
|
129
131
|
size?: number;
|
|
@@ -140,12 +142,17 @@ interface AcademeLoadingProps {
|
|
|
140
142
|
pulseWhileLoading?: boolean;
|
|
141
143
|
/** Chamado ao concluir (após a saída, ou após a vinheta completa). */
|
|
142
144
|
onFinish?: () => void;
|
|
143
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Tema visual base. `light` (default) mantém o fundo claro atual; `dark` aplica
|
|
147
|
+
* a paleta escura da marca. O `colors` ainda sobrescreve qualquer token por cima.
|
|
148
|
+
*/
|
|
149
|
+
theme?: AcademeLoadingTheme;
|
|
150
|
+
/** Sobrescreve tokens de cor (merge com os defaults do tema selecionado). */
|
|
144
151
|
colors?: Partial<AcademeLoadingColors>;
|
|
145
152
|
className?: string;
|
|
146
153
|
style?: React.CSSProperties;
|
|
147
154
|
}
|
|
148
|
-
declare function AcademeLoading({ size, duration, loading, autoPlay, pulseWhileLoading, onFinish, colors, className, style, }: AcademeLoadingProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
declare function AcademeLoading({ size, duration, loading, autoPlay, pulseWhileLoading, onFinish, theme, colors, className, style, }: AcademeLoadingProps): react_jsx_runtime.JSX.Element;
|
|
149
156
|
|
|
150
157
|
interface LogoAProps {
|
|
151
158
|
/** Altura do logo em px (no palco corresponde a ~0.46·S). Largura é derivada
|
|
@@ -3036,6 +3043,94 @@ interface paths {
|
|
|
3036
3043
|
patch?: never;
|
|
3037
3044
|
trace?: never;
|
|
3038
3045
|
};
|
|
3046
|
+
"/challenges/{id}/participants": {
|
|
3047
|
+
parameters: {
|
|
3048
|
+
query?: never;
|
|
3049
|
+
header?: never;
|
|
3050
|
+
path?: never;
|
|
3051
|
+
cookie?: never;
|
|
3052
|
+
};
|
|
3053
|
+
/**
|
|
3054
|
+
* List the students taking part in this challenge
|
|
3055
|
+
* @description Returns the roster of students for the challenge along with each
|
|
3056
|
+
* student's status, derived from `submissions` (latest attempt) and
|
|
3057
|
+
* `user_challenge_progress` (whether any step was started).
|
|
3058
|
+
*
|
|
3059
|
+
* The roster is built from `institution_registration` rows of the given
|
|
3060
|
+
* institution, filtered by the challenge's serie. `institutionId` and
|
|
3061
|
+
* `serieId` may be supplied via query to provide the viewing context —
|
|
3062
|
+
* useful for global template challenges (`institution_id IS NULL`) shown
|
|
3063
|
+
* via fallback in the pedagogical portal. They default to the
|
|
3064
|
+
* challenge's own institution/serie when omitted.
|
|
3065
|
+
*
|
|
3066
|
+
* Status values: `novo` (not started), `andamento` (started a step, no
|
|
3067
|
+
* submission), `entregue` (submitted | ai_evaluated), `aprovado`
|
|
3068
|
+
* (approved), `rejeitado` (rejected).
|
|
3069
|
+
*/
|
|
3070
|
+
get: {
|
|
3071
|
+
parameters: {
|
|
3072
|
+
query?: {
|
|
3073
|
+
/** @description Viewing institution. Defaults to the challenge's institution. */
|
|
3074
|
+
institutionId?: string;
|
|
3075
|
+
/** @description Serie filter. Defaults to the challenge's serie. */
|
|
3076
|
+
serieId?: string;
|
|
3077
|
+
};
|
|
3078
|
+
header?: never;
|
|
3079
|
+
path: {
|
|
3080
|
+
/** @description Resource ID */
|
|
3081
|
+
id: components["parameters"]["id"];
|
|
3082
|
+
};
|
|
3083
|
+
cookie?: never;
|
|
3084
|
+
};
|
|
3085
|
+
requestBody?: never;
|
|
3086
|
+
responses: {
|
|
3087
|
+
/** @description Roster of participants with derived status */
|
|
3088
|
+
200: {
|
|
3089
|
+
headers: {
|
|
3090
|
+
[name: string]: unknown;
|
|
3091
|
+
};
|
|
3092
|
+
content: {
|
|
3093
|
+
"application/json": {
|
|
3094
|
+
/** @example success */
|
|
3095
|
+
status?: string;
|
|
3096
|
+
data?: {
|
|
3097
|
+
totalStudents?: number;
|
|
3098
|
+
classrooms?: {
|
|
3099
|
+
/** Format: uuid */
|
|
3100
|
+
id?: string;
|
|
3101
|
+
name?: string;
|
|
3102
|
+
count?: number;
|
|
3103
|
+
}[];
|
|
3104
|
+
participants?: {
|
|
3105
|
+
/** Format: uuid */
|
|
3106
|
+
userId?: string;
|
|
3107
|
+
name?: string;
|
|
3108
|
+
email?: string | null;
|
|
3109
|
+
avatarUrl?: string | null;
|
|
3110
|
+
/** Format: uuid */
|
|
3111
|
+
classroomId?: string | null;
|
|
3112
|
+
classroomName?: string | null;
|
|
3113
|
+
/** @enum {string} */
|
|
3114
|
+
status?: "novo" | "andamento" | "entregue" | "aprovado" | "rejeitado";
|
|
3115
|
+
/** Format: uuid */
|
|
3116
|
+
submissionId?: string | null;
|
|
3117
|
+
}[];
|
|
3118
|
+
};
|
|
3119
|
+
};
|
|
3120
|
+
};
|
|
3121
|
+
};
|
|
3122
|
+
401: components["responses"]["Unauthorized"];
|
|
3123
|
+
404: components["responses"]["NotFound"];
|
|
3124
|
+
};
|
|
3125
|
+
};
|
|
3126
|
+
put?: never;
|
|
3127
|
+
post?: never;
|
|
3128
|
+
delete?: never;
|
|
3129
|
+
options?: never;
|
|
3130
|
+
head?: never;
|
|
3131
|
+
patch?: never;
|
|
3132
|
+
trace?: never;
|
|
3133
|
+
};
|
|
3039
3134
|
"/classrooms": {
|
|
3040
3135
|
parameters: {
|
|
3041
3136
|
query?: never;
|
|
@@ -11983,6 +12078,12 @@ interface paths {
|
|
|
11983
12078
|
* - Cannot create after status=approved
|
|
11984
12079
|
* - Cannot exceed challenge.maxSubmissionsAttempts
|
|
11985
12080
|
* - attempt_number is computed server-side with a row lock (FOR UPDATE)
|
|
12081
|
+
*
|
|
12082
|
+
* When `items` is provided, the submission and its files/links are persisted
|
|
12083
|
+
* in the SAME transaction (atomic) and AI evaluation is dispatched after commit.
|
|
12084
|
+
* Each item must have exactly ONE of fileId or url, and must match the
|
|
12085
|
+
* challenge.submissionType (file types require fileId; links require url).
|
|
12086
|
+
* This is the preferred path for clients (no separate POST /submissions/{id}/files).
|
|
11986
12087
|
*/
|
|
11987
12088
|
post: {
|
|
11988
12089
|
parameters: {
|
|
@@ -12007,6 +12108,17 @@ interface paths {
|
|
|
12007
12108
|
*/
|
|
12008
12109
|
groupId?: string;
|
|
12009
12110
|
description?: string;
|
|
12111
|
+
/**
|
|
12112
|
+
* @description Submission delivery. When present, files/links are stored atomically
|
|
12113
|
+
* with the submission and AI evaluation is dispatched after commit.
|
|
12114
|
+
*/
|
|
12115
|
+
items?: {
|
|
12116
|
+
/** Format: uuid */
|
|
12117
|
+
fileId?: string | null;
|
|
12118
|
+
/** Format: uri */
|
|
12119
|
+
url?: string | null;
|
|
12120
|
+
index?: number;
|
|
12121
|
+
}[];
|
|
12010
12122
|
};
|
|
12011
12123
|
};
|
|
12012
12124
|
};
|
|
@@ -12021,6 +12133,45 @@ interface paths {
|
|
|
12021
12133
|
/** @example success */
|
|
12022
12134
|
status?: string;
|
|
12023
12135
|
data?: components["schemas"]["Submission"];
|
|
12136
|
+
/**
|
|
12137
|
+
* @description Journey side-effects of the submission. On the FIRST attempt the
|
|
12138
|
+
* publication step is completed and the user advances; `advance`
|
|
12139
|
+
* carries the resulting tick so the client can animate the journey.
|
|
12140
|
+
* `advance` is null on re-submissions (attempt > 1) or if the advance
|
|
12141
|
+
* step failed (non-fatal — the submission is still created).
|
|
12142
|
+
*/
|
|
12143
|
+
meta?: {
|
|
12144
|
+
advance?: {
|
|
12145
|
+
/** @enum {string} */
|
|
12146
|
+
action?: "started" | "completed" | "finished";
|
|
12147
|
+
/** Format: uuid */
|
|
12148
|
+
challengeId?: string;
|
|
12149
|
+
currentStep?: {
|
|
12150
|
+
/** Format: uuid */
|
|
12151
|
+
id?: string;
|
|
12152
|
+
index?: number;
|
|
12153
|
+
name?: string;
|
|
12154
|
+
/** Format: date-time */
|
|
12155
|
+
startedAt?: string | null;
|
|
12156
|
+
/** Format: date-time */
|
|
12157
|
+
completedAt?: string | null;
|
|
12158
|
+
} | null;
|
|
12159
|
+
nextStep?: {
|
|
12160
|
+
/** Format: uuid */
|
|
12161
|
+
id?: string;
|
|
12162
|
+
index?: number;
|
|
12163
|
+
name?: string;
|
|
12164
|
+
/** Format: date-time */
|
|
12165
|
+
startedAt?: string | null;
|
|
12166
|
+
} | null;
|
|
12167
|
+
autoCompletedSteps?: {
|
|
12168
|
+
/** Format: uuid */
|
|
12169
|
+
id?: string;
|
|
12170
|
+
index?: number;
|
|
12171
|
+
name?: string;
|
|
12172
|
+
}[];
|
|
12173
|
+
} | null;
|
|
12174
|
+
};
|
|
12024
12175
|
};
|
|
12025
12176
|
};
|
|
12026
12177
|
};
|
|
@@ -12084,6 +12235,79 @@ interface paths {
|
|
|
12084
12235
|
patch?: never;
|
|
12085
12236
|
trace?: never;
|
|
12086
12237
|
};
|
|
12238
|
+
"/submissions/{id}/classroom-rank": {
|
|
12239
|
+
parameters: {
|
|
12240
|
+
query?: never;
|
|
12241
|
+
header?: never;
|
|
12242
|
+
path?: never;
|
|
12243
|
+
cookie?: never;
|
|
12244
|
+
};
|
|
12245
|
+
/**
|
|
12246
|
+
* Ordem de entrega do aluno na turma para o desafio desta submissão
|
|
12247
|
+
* @description Retorna a posição do aluno entre os colegas de turma (institution_classroom
|
|
12248
|
+
* via membership) a entregar o desafio, ordenando pela PRIMEIRA entrega de cada
|
|
12249
|
+
* aluno (MIN(submitted_at)). Usado pelo app do aluno como incentivo a entregar
|
|
12250
|
+
* cedo ("Você foi o Nº de X da turma a entregar"). Quando o aluno não tem turma
|
|
12251
|
+
* na instituição, retorna order=0 e classSize=0 e o cliente esconde o card.
|
|
12252
|
+
*/
|
|
12253
|
+
get: {
|
|
12254
|
+
parameters: {
|
|
12255
|
+
query?: never;
|
|
12256
|
+
header?: never;
|
|
12257
|
+
path: {
|
|
12258
|
+
/** @description Resource ID */
|
|
12259
|
+
id: components["parameters"]["id"];
|
|
12260
|
+
};
|
|
12261
|
+
cookie?: never;
|
|
12262
|
+
};
|
|
12263
|
+
requestBody?: never;
|
|
12264
|
+
responses: {
|
|
12265
|
+
/** @description Posição na turma */
|
|
12266
|
+
200: {
|
|
12267
|
+
headers: {
|
|
12268
|
+
[name: string]: unknown;
|
|
12269
|
+
};
|
|
12270
|
+
content: {
|
|
12271
|
+
"application/json": {
|
|
12272
|
+
/** @example success */
|
|
12273
|
+
status?: string;
|
|
12274
|
+
data?: {
|
|
12275
|
+
/**
|
|
12276
|
+
* @description Posição do aluno (1-based) entre os que entregaram; 0 quando sem turma
|
|
12277
|
+
* @example 3
|
|
12278
|
+
*/
|
|
12279
|
+
order?: number;
|
|
12280
|
+
/**
|
|
12281
|
+
* @description Total de alunos da turma (independente de terem entregado)
|
|
12282
|
+
* @example 28
|
|
12283
|
+
*/
|
|
12284
|
+
classSize?: number;
|
|
12285
|
+
/**
|
|
12286
|
+
* @description Quantos alunos da turma já entregaram o desafio
|
|
12287
|
+
* @example 12
|
|
12288
|
+
*/
|
|
12289
|
+
submittedCount?: number;
|
|
12290
|
+
/**
|
|
12291
|
+
* @description true quando order está entre 1 e 3
|
|
12292
|
+
* @example true
|
|
12293
|
+
*/
|
|
12294
|
+
earlyBird?: boolean;
|
|
12295
|
+
};
|
|
12296
|
+
};
|
|
12297
|
+
};
|
|
12298
|
+
};
|
|
12299
|
+
401: components["responses"]["Unauthorized"];
|
|
12300
|
+
404: components["responses"]["NotFound"];
|
|
12301
|
+
};
|
|
12302
|
+
};
|
|
12303
|
+
put?: never;
|
|
12304
|
+
post?: never;
|
|
12305
|
+
delete?: never;
|
|
12306
|
+
options?: never;
|
|
12307
|
+
head?: never;
|
|
12308
|
+
patch?: never;
|
|
12309
|
+
trace?: never;
|
|
12310
|
+
};
|
|
12087
12311
|
"/submissions/{id}/files": {
|
|
12088
12312
|
parameters: {
|
|
12089
12313
|
query?: never;
|
|
@@ -12665,6 +12889,12 @@ interface paths {
|
|
|
12665
12889
|
* Útil para pré-visualização administrativa ou quando o aluno pertence a múltiplas séries.
|
|
12666
12890
|
*/
|
|
12667
12891
|
serieId?: string;
|
|
12892
|
+
/**
|
|
12893
|
+
* @description Escola atual (contexto de instituição do app). Opcional — se omitido, usa a 1ª
|
|
12894
|
+
* matrícula. A jornada é por escola: filtra os challenges e resolve a turma/série
|
|
12895
|
+
* default a partir da membership do usuário NESTA instituição.
|
|
12896
|
+
*/
|
|
12897
|
+
institutionId?: string;
|
|
12668
12898
|
/**
|
|
12669
12899
|
* @description [Admin] Quando presente, retorna a jornada do usuário-alvo em vez da do
|
|
12670
12900
|
* autenticado. Usado pelo backoffice para visualizar a jornada de um aluno.
|
|
@@ -13562,6 +13792,97 @@ interface paths {
|
|
|
13562
13792
|
patch?: never;
|
|
13563
13793
|
trace?: never;
|
|
13564
13794
|
};
|
|
13795
|
+
"/users/me/classrooms": {
|
|
13796
|
+
parameters: {
|
|
13797
|
+
query?: never;
|
|
13798
|
+
header?: never;
|
|
13799
|
+
path?: never;
|
|
13800
|
+
cookie?: never;
|
|
13801
|
+
};
|
|
13802
|
+
/**
|
|
13803
|
+
* Turmas e séries do usuário autenticado
|
|
13804
|
+
* @description Contexto de matrícula do aluno: TODAS as suas turmas (com série, turno e
|
|
13805
|
+
* instituição), a escola ATUAL e a lista DEDUPLICADA de séries dessa escola.
|
|
13806
|
+
*
|
|
13807
|
+
* Fonte única para o app: `classrooms` alimenta a listagem de turmas no
|
|
13808
|
+
* perfil; `currentInstitutionId` é a escola atual (o app mostra uma escola
|
|
13809
|
+
* por vez); `series` traz APENAS as séries da escola atual (deduplicada e
|
|
13810
|
+
* ordenada por nível/valor) — alimenta o seletor da jornada, que também é
|
|
13811
|
+
* por escola. O botão só aparece com 2+ séries na escola atual.
|
|
13812
|
+
*/
|
|
13813
|
+
get: {
|
|
13814
|
+
parameters: {
|
|
13815
|
+
query?: never;
|
|
13816
|
+
header?: never;
|
|
13817
|
+
path?: never;
|
|
13818
|
+
cookie?: never;
|
|
13819
|
+
};
|
|
13820
|
+
requestBody?: never;
|
|
13821
|
+
responses: {
|
|
13822
|
+
/** @description Turmas + séries acessíveis */
|
|
13823
|
+
200: {
|
|
13824
|
+
headers: {
|
|
13825
|
+
[name: string]: unknown;
|
|
13826
|
+
};
|
|
13827
|
+
content: {
|
|
13828
|
+
"application/json": {
|
|
13829
|
+
/** @example success */
|
|
13830
|
+
status?: string;
|
|
13831
|
+
data?: {
|
|
13832
|
+
/**
|
|
13833
|
+
* Format: uuid
|
|
13834
|
+
* @description Escola atual (a da matrícula). As séries são desta escola.
|
|
13835
|
+
*/
|
|
13836
|
+
currentInstitutionId?: string | null;
|
|
13837
|
+
classrooms?: {
|
|
13838
|
+
/** Format: uuid */
|
|
13839
|
+
institutionClassroomId?: string;
|
|
13840
|
+
/** Format: uuid */
|
|
13841
|
+
classroomId?: string;
|
|
13842
|
+
/** @example 6º A */
|
|
13843
|
+
classroomName?: string;
|
|
13844
|
+
/** @example manhã */
|
|
13845
|
+
shiftName?: string | null;
|
|
13846
|
+
/** Format: uuid */
|
|
13847
|
+
institutionId?: string;
|
|
13848
|
+
/** @example Escola Modelo */
|
|
13849
|
+
institutionName?: string | null;
|
|
13850
|
+
serie?: {
|
|
13851
|
+
/** Format: uuid */
|
|
13852
|
+
serieId?: string;
|
|
13853
|
+
/** @example 6 */
|
|
13854
|
+
serieValue?: number;
|
|
13855
|
+
/** @example 6º ANO */
|
|
13856
|
+
serieLabel?: string;
|
|
13857
|
+
/** @enum {string} */
|
|
13858
|
+
level?: "fundamental" | "medio";
|
|
13859
|
+
} | null;
|
|
13860
|
+
}[];
|
|
13861
|
+
series?: {
|
|
13862
|
+
/** Format: uuid */
|
|
13863
|
+
serieId?: string;
|
|
13864
|
+
/** @example 6 */
|
|
13865
|
+
serieValue?: number;
|
|
13866
|
+
/** @example 6º ANO */
|
|
13867
|
+
serieLabel?: string;
|
|
13868
|
+
/** @enum {string} */
|
|
13869
|
+
level?: "fundamental" | "medio";
|
|
13870
|
+
}[];
|
|
13871
|
+
};
|
|
13872
|
+
};
|
|
13873
|
+
};
|
|
13874
|
+
};
|
|
13875
|
+
401: components["responses"]["Unauthorized"];
|
|
13876
|
+
};
|
|
13877
|
+
};
|
|
13878
|
+
put?: never;
|
|
13879
|
+
post?: never;
|
|
13880
|
+
delete?: never;
|
|
13881
|
+
options?: never;
|
|
13882
|
+
head?: never;
|
|
13883
|
+
patch?: never;
|
|
13884
|
+
trace?: never;
|
|
13885
|
+
};
|
|
13565
13886
|
"/users/me/push-tokens": {
|
|
13566
13887
|
parameters: {
|
|
13567
13888
|
query?: never;
|
|
@@ -15174,6 +15495,8 @@ interface components {
|
|
|
15174
15495
|
certificateTemplate?: components["schemas"]["CertificateTemplate"];
|
|
15175
15496
|
/** @description Course information related to the certificate (extracted from Quiz or CertificateTemplate) */
|
|
15176
15497
|
course?: components["schemas"]["CourseSimplified"];
|
|
15498
|
+
/** @description Course module information related to the certificate (resolved from the quiz the student took). Null when the certificate came from a template course. */
|
|
15499
|
+
module?: components["schemas"]["ModuleSimplified"];
|
|
15177
15500
|
};
|
|
15178
15501
|
/** @description Simplified course information included in certificate responses */
|
|
15179
15502
|
CourseSimplified: {
|
|
@@ -15193,6 +15516,26 @@ interface components {
|
|
|
15193
15516
|
*/
|
|
15194
15517
|
description?: string | null;
|
|
15195
15518
|
};
|
|
15519
|
+
/** @description Simplified course module information included in certificate responses */
|
|
15520
|
+
ModuleSimplified: {
|
|
15521
|
+
/**
|
|
15522
|
+
* Format: uuid
|
|
15523
|
+
* @description Course module ID
|
|
15524
|
+
*/
|
|
15525
|
+
id?: string;
|
|
15526
|
+
/**
|
|
15527
|
+
* @description Course module title
|
|
15528
|
+
* @example Variables and Data Types
|
|
15529
|
+
*/
|
|
15530
|
+
title?: string;
|
|
15531
|
+
/** @description Course module description */
|
|
15532
|
+
description?: string | null;
|
|
15533
|
+
/**
|
|
15534
|
+
* @description Course module workload in hours
|
|
15535
|
+
* @example 40
|
|
15536
|
+
*/
|
|
15537
|
+
duration?: number | null;
|
|
15538
|
+
};
|
|
15196
15539
|
/** @description Simplified quiz information included in course and module responses */
|
|
15197
15540
|
QuizSimplified: {
|
|
15198
15541
|
/**
|
|
@@ -26645,6 +26988,11 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26645
26988
|
institutionId: string;
|
|
26646
26989
|
groupId?: string;
|
|
26647
26990
|
description?: string;
|
|
26991
|
+
items?: {
|
|
26992
|
+
fileId?: string | null;
|
|
26993
|
+
url?: string | null;
|
|
26994
|
+
index?: number;
|
|
26995
|
+
}[];
|
|
26648
26996
|
};
|
|
26649
26997
|
};
|
|
26650
26998
|
};
|
|
@@ -26657,6 +27005,30 @@ declare function createSubmissionService(apiClient: AcademeApiClient): {
|
|
|
26657
27005
|
"application/json": {
|
|
26658
27006
|
status?: string;
|
|
26659
27007
|
data?: components["schemas"]["Submission"];
|
|
27008
|
+
meta?: {
|
|
27009
|
+
advance?: {
|
|
27010
|
+
action?: "started" | "completed" | "finished";
|
|
27011
|
+
challengeId?: string;
|
|
27012
|
+
currentStep?: {
|
|
27013
|
+
id?: string;
|
|
27014
|
+
index?: number;
|
|
27015
|
+
name?: string;
|
|
27016
|
+
startedAt?: string | null;
|
|
27017
|
+
completedAt?: string | null;
|
|
27018
|
+
} | null;
|
|
27019
|
+
nextStep?: {
|
|
27020
|
+
id?: string;
|
|
27021
|
+
index?: number;
|
|
27022
|
+
name?: string;
|
|
27023
|
+
startedAt?: string | null;
|
|
27024
|
+
} | null;
|
|
27025
|
+
autoCompletedSteps?: {
|
|
27026
|
+
id?: string;
|
|
27027
|
+
index?: number;
|
|
27028
|
+
name?: string;
|
|
27029
|
+
}[];
|
|
27030
|
+
} | null;
|
|
27031
|
+
};
|
|
26660
27032
|
};
|
|
26661
27033
|
};
|
|
26662
27034
|
};
|
|
@@ -27300,4 +27672,4 @@ declare enum NINA_ROLES {
|
|
|
27300
27672
|
}
|
|
27301
27673
|
|
|
27302
27674
|
export { AcademeAuthProvider, AcademeLoading, BACKOFFICE_ROLES, Button, CosmicDecor, CosmicStarsCanvas, DASHBOARD_ROLES, GLOBAL_ROLES, JourneyCrystalPin, JourneyStep, LogoA, MIKE_ROLES, NINA_ROLES, ProtectedApp, ProtectedComponent, ProtectedRouter, STREAMING_ROLES, Spinner, WIDGET_ROLES, academeApi_d as apiTypes, cn, createAcademeApiClient, index_d as types, useAcademeAuth, useProtectedAppColors };
|
|
27303
|
-
export type { AcademeApiClient, AcademeKeycloakContextProps, AcademeLoadingColors, AcademeLoadingProps, AcademeServices, AcademeUser, ButtonProps, ChallengeUserQuizAttempt, ChallengeUserQuizAttemptsResponse, CosmicDecorProps, CosmicDecorVariant, CosmicPlanet, CosmicStarsCanvasProps, FrameKind, JourneyChallengeView, JourneyCrystalPinProps, JourneyStepProps, JourneyStepSize, JourneyStepType, JourneyStepView, JourneyView, KeycloakUser, LogoAProps, RequiredClientRoles, SecurityContextType, SecurityProviderProps };
|
|
27675
|
+
export type { AcademeApiClient, AcademeKeycloakContextProps, AcademeLoadingColors, AcademeLoadingProps, AcademeLoadingTheme, AcademeServices, AcademeUser, ButtonProps, ChallengeUserQuizAttempt, ChallengeUserQuizAttemptsResponse, CosmicDecorProps, CosmicDecorVariant, CosmicPlanet, CosmicStarsCanvasProps, FrameKind, JourneyChallengeView, JourneyCrystalPinProps, JourneyStepProps, JourneyStepSize, JourneyStepType, JourneyStepView, JourneyView, KeycloakUser, LogoAProps, RequiredClientRoles, SecurityContextType, SecurityProviderProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -6848,6 +6848,9 @@ const LOGO_A_DATA_URI = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlb
|
|
|
6848
6848
|
// derivar a largura a partir da altura, preservando a proporção do logo.
|
|
6849
6849
|
const ASSET_W = 1320;
|
|
6850
6850
|
const ASSET_H = 1320.42;
|
|
6851
|
+
/** Proporção (largura/altura) do asset. O AcademeLoading usa para dimensionar o
|
|
6852
|
+
* container do logo igual à imagem e mantê-lo centralizado nos círculos. */
|
|
6853
|
+
const LOGO_A_ASPECT = ASSET_W / ASSET_H;
|
|
6851
6854
|
/**
|
|
6852
6855
|
* Logo "A" da Academe (§8) — renderiza o asset oficial
|
|
6853
6856
|
* (`src/assets/LOGO A SVG 2.svg`) via data URI. Puramente estático; quem anima é
|
|
@@ -6870,10 +6873,24 @@ const TOTAL = 2333;
|
|
|
6870
6873
|
*/
|
|
6871
6874
|
const HOLD_T = 0.56;
|
|
6872
6875
|
const DEFAULT_COLORS = {
|
|
6873
|
-
background: "#
|
|
6876
|
+
background: "#f1f2f6",
|
|
6874
6877
|
purple: "#7C28D4",
|
|
6875
6878
|
white: "#FCFCFC",
|
|
6876
6879
|
};
|
|
6880
|
+
/**
|
|
6881
|
+
* Paleta escura da marca. Só o fundo muda — os círculos roxo/branco continuam os
|
|
6882
|
+
* mesmos (o branco revela o logo e contrasta bem sobre o escuro). O fundo casa com
|
|
6883
|
+
* o tema dark do `ProtectedApp`.
|
|
6884
|
+
*/
|
|
6885
|
+
const DARK_COLORS = {
|
|
6886
|
+
background: "#111111",
|
|
6887
|
+
purple: "#7C28D4",
|
|
6888
|
+
white: "#FCFCFC",
|
|
6889
|
+
};
|
|
6890
|
+
const THEME_COLORS = {
|
|
6891
|
+
light: DEFAULT_COLORS,
|
|
6892
|
+
dark: DARK_COLORS,
|
|
6893
|
+
};
|
|
6877
6894
|
// ---- helpers -------------------------------------------------------------
|
|
6878
6895
|
const clamp01 = (x) => (x < 0 ? 0 : x > 1 ? 1 : x);
|
|
6879
6896
|
/** progresso local [0,1] dentro do trecho [a,b] de `t`. */
|
|
@@ -6936,9 +6953,9 @@ const E_COLLAPSE = cubicBezier(0.65, 0, 0.35, 1); // colapso (ease-in-out)
|
|
|
6936
6953
|
const E_SHRINK = cubicBezier(0.5, 0, 0.9, 0.2); // encolher (ease-in)
|
|
6937
6954
|
const E_POP = cubicBezier(0.34, 1.2, 0.64, 1); // pop leve do logo (overshoot)
|
|
6938
6955
|
// ---- component -----------------------------------------------------------
|
|
6939
|
-
function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true, pulseWhileLoading = true, onFinish, colors, className, style, }) {
|
|
6956
|
+
function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true, pulseWhileLoading = true, onFinish, theme = "light", colors, className, style, }) {
|
|
6940
6957
|
const S = size;
|
|
6941
|
-
const c = { ...
|
|
6958
|
+
const c = { ...THEME_COLORS[theme], ...colors };
|
|
6942
6959
|
const isControlled = loading !== undefined;
|
|
6943
6960
|
// Os círculos NÃO são recortados por nenhuma "caixa" interna. O palco antigo
|
|
6944
6961
|
// (size×size com overflow:hidden) cortava os círculos na entrada e no herói.
|
|
@@ -7135,7 +7152,7 @@ function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true
|
|
|
7135
7152
|
return 0;
|
|
7136
7153
|
});
|
|
7137
7154
|
const LOGO_H = 0.46 * S;
|
|
7138
|
-
const LOGO_W = LOGO_H *
|
|
7155
|
+
const LOGO_W = LOGO_H * LOGO_A_ASPECT;
|
|
7139
7156
|
// Centralização determinística: cada camada é absoluta e centralizada por
|
|
7140
7157
|
// `inset:0 + margin:auto` sobre um width/height fixo — independe do tamanho
|
|
7141
7158
|
// relativo dos elementos (o grid implícito anterior ancorava a célula no canto,
|
|
@@ -7255,7 +7272,7 @@ const ProtectedApp = ({ children, requiredClientRoles, requiredRealmRoles, theme
|
|
|
7255
7272
|
// só depois do `onFinish` o app é revelado. Fica montada durante o exit graças
|
|
7256
7273
|
// ao `!exitDone`.
|
|
7257
7274
|
if (loaderActive || !exitDone) {
|
|
7258
|
-
return (jsx(AcademeLoading, { loading: loaderActive, duration: 1200, onFinish: () => setExitDone(true), style: { width: "100vw", height: "100vh" } }));
|
|
7275
|
+
return (jsx(AcademeLoading, { loading: loaderActive, duration: 1200, theme: theme, onFinish: () => setExitDone(true), style: { width: "100vw", height: "100vh" } }));
|
|
7259
7276
|
}
|
|
7260
7277
|
return (jsx(ProtectedAppContext.Provider, { value: textColors, children: children }));
|
|
7261
7278
|
};
|