academe-kit 0.11.5 → 0.11.7

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.esm.js CHANGED
@@ -5381,6 +5381,27 @@ function createQuizService(apiClient) {
5381
5381
  },
5382
5382
  });
5383
5383
  },
5384
+ /**
5385
+ * List quizzes enriched with their course/module/category context.
5386
+ * Tailored for the backoffice listing.
5387
+ */
5388
+ getAllWithContext(params) {
5389
+ return apiClient.GET('/quiz/with-context', {
5390
+ params: {
5391
+ query: params,
5392
+ },
5393
+ });
5394
+ },
5395
+ /**
5396
+ * Generate quiz questions from a base text using AI.
5397
+ * The OpenRouter key lives only on the server — this just calls the
5398
+ * authenticated backend endpoint.
5399
+ */
5400
+ generateQuestions(body) {
5401
+ return apiClient.POST('/quiz/generate-questions', {
5402
+ body,
5403
+ });
5404
+ },
5384
5405
  /**
5385
5406
  * Get quiz by ID
5386
5407
  */
@@ -5443,6 +5464,14 @@ function createQuizService(apiClient) {
5443
5464
  body: data,
5444
5465
  });
5445
5466
  },
5467
+ /**
5468
+ * Bulk create quiz questions (with their answers) for a quiz.
5469
+ */
5470
+ bulkCreateQuestions(body) {
5471
+ return apiClient.POST('/quiz-questions/bulk', {
5472
+ body,
5473
+ });
5474
+ },
5446
5475
  /**
5447
5476
  * Update quiz question
5448
5477
  */
@@ -6877,6 +6906,20 @@ const DEFAULT_COLORS = {
6877
6906
  purple: "#7C28D4",
6878
6907
  white: "#FCFCFC",
6879
6908
  };
6909
+ /**
6910
+ * Paleta escura da marca. Só o fundo muda — os círculos roxo/branco continuam os
6911
+ * mesmos (o branco revela o logo e contrasta bem sobre o escuro). O fundo casa com
6912
+ * o tema dark do `ProtectedApp`.
6913
+ */
6914
+ const DARK_COLORS = {
6915
+ background: "#111111",
6916
+ purple: "#7C28D4",
6917
+ white: "#FCFCFC",
6918
+ };
6919
+ const THEME_COLORS = {
6920
+ light: DEFAULT_COLORS,
6921
+ dark: DARK_COLORS,
6922
+ };
6880
6923
  // ---- helpers -------------------------------------------------------------
6881
6924
  const clamp01 = (x) => (x < 0 ? 0 : x > 1 ? 1 : x);
6882
6925
  /** progresso local [0,1] dentro do trecho [a,b] de `t`. */
@@ -6939,9 +6982,9 @@ const E_COLLAPSE = cubicBezier(0.65, 0, 0.35, 1); // colapso (ease-in-out)
6939
6982
  const E_SHRINK = cubicBezier(0.5, 0, 0.9, 0.2); // encolher (ease-in)
6940
6983
  const E_POP = cubicBezier(0.34, 1.2, 0.64, 1); // pop leve do logo (overshoot)
6941
6984
  // ---- component -----------------------------------------------------------
6942
- function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true, pulseWhileLoading = true, onFinish, colors, className, style, }) {
6985
+ function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true, pulseWhileLoading = true, onFinish, theme = "light", colors, className, style, }) {
6943
6986
  const S = size;
6944
- const c = { ...DEFAULT_COLORS, ...colors };
6987
+ const c = { ...THEME_COLORS[theme], ...colors };
6945
6988
  const isControlled = loading !== undefined;
6946
6989
  // Os círculos NÃO são recortados por nenhuma "caixa" interna. O palco antigo
6947
6990
  // (size×size com overflow:hidden) cortava os círculos na entrada e no herói.
@@ -7258,7 +7301,7 @@ const ProtectedApp = ({ children, requiredClientRoles, requiredRealmRoles, theme
7258
7301
  // só depois do `onFinish` o app é revelado. Fica montada durante o exit graças
7259
7302
  // ao `!exitDone`.
7260
7303
  if (loaderActive || !exitDone) {
7261
- return (jsx(AcademeLoading, { loading: loaderActive, duration: 1200, onFinish: () => setExitDone(true), style: { width: "100vw", height: "100vh" } }));
7304
+ return (jsx(AcademeLoading, { loading: loaderActive, duration: 1200, theme: theme, onFinish: () => setExitDone(true), style: { width: "100vw", height: "100vh" } }));
7262
7305
  }
7263
7306
  return (jsx(ProtectedAppContext.Provider, { value: textColors, children: children }));
7264
7307
  };