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