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 CHANGED
@@ -6850,6 +6850,9 @@ const LOGO_A_DATA_URI = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlb
6850
6850
  // derivar a largura a partir da altura, preservando a proporção do logo.
6851
6851
  const ASSET_W = 1320;
6852
6852
  const ASSET_H = 1320.42;
6853
+ /** Proporção (largura/altura) do asset. O AcademeLoading usa para dimensionar o
6854
+ * container do logo igual à imagem e mantê-lo centralizado nos círculos. */
6855
+ const LOGO_A_ASPECT = ASSET_W / ASSET_H;
6853
6856
  /**
6854
6857
  * Logo "A" da Academe (§8) — renderiza o asset oficial
6855
6858
  * (`src/assets/LOGO A SVG 2.svg`) via data URI. Puramente estático; quem anima é
@@ -6872,10 +6875,24 @@ const TOTAL = 2333;
6872
6875
  */
6873
6876
  const HOLD_T = 0.56;
6874
6877
  const DEFAULT_COLORS = {
6875
- background: "#F5F5F5",
6878
+ background: "#f1f2f6",
6876
6879
  purple: "#7C28D4",
6877
6880
  white: "#FCFCFC",
6878
6881
  };
6882
+ /**
6883
+ * Paleta escura da marca. Só o fundo muda — os círculos roxo/branco continuam os
6884
+ * mesmos (o branco revela o logo e contrasta bem sobre o escuro). O fundo casa com
6885
+ * o tema dark do `ProtectedApp`.
6886
+ */
6887
+ const DARK_COLORS = {
6888
+ background: "#111111",
6889
+ purple: "#7C28D4",
6890
+ white: "#FCFCFC",
6891
+ };
6892
+ const THEME_COLORS = {
6893
+ light: DEFAULT_COLORS,
6894
+ dark: DARK_COLORS,
6895
+ };
6879
6896
  // ---- helpers -------------------------------------------------------------
6880
6897
  const clamp01 = (x) => (x < 0 ? 0 : x > 1 ? 1 : x);
6881
6898
  /** progresso local [0,1] dentro do trecho [a,b] de `t`. */
@@ -6938,9 +6955,9 @@ const E_COLLAPSE = cubicBezier(0.65, 0, 0.35, 1); // colapso (ease-in-out)
6938
6955
  const E_SHRINK = cubicBezier(0.5, 0, 0.9, 0.2); // encolher (ease-in)
6939
6956
  const E_POP = cubicBezier(0.34, 1.2, 0.64, 1); // pop leve do logo (overshoot)
6940
6957
  // ---- component -----------------------------------------------------------
6941
- function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true, pulseWhileLoading = true, onFinish, colors, className, style, }) {
6958
+ function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true, pulseWhileLoading = true, onFinish, theme = "light", colors, className, style, }) {
6942
6959
  const S = size;
6943
- const c = { ...DEFAULT_COLORS, ...colors };
6960
+ const c = { ...THEME_COLORS[theme], ...colors };
6944
6961
  const isControlled = loading !== undefined;
6945
6962
  // Os círculos NÃO são recortados por nenhuma "caixa" interna. O palco antigo
6946
6963
  // (size×size com overflow:hidden) cortava os círculos na entrada e no herói.
@@ -7137,7 +7154,7 @@ function AcademeLoading({ size = 320, duration = TOTAL, loading, autoPlay = true
7137
7154
  return 0;
7138
7155
  });
7139
7156
  const LOGO_H = 0.46 * S;
7140
- const LOGO_W = LOGO_H * (354 / 516);
7157
+ const LOGO_W = LOGO_H * LOGO_A_ASPECT;
7141
7158
  // Centralização determinística: cada camada é absoluta e centralizada por
7142
7159
  // `inset:0 + margin:auto` sobre um width/height fixo — independe do tamanho
7143
7160
  // relativo dos elementos (o grid implícito anterior ancorava a célula no canto,
@@ -7257,7 +7274,7 @@ const ProtectedApp = ({ children, requiredClientRoles, requiredRealmRoles, theme
7257
7274
  // só depois do `onFinish` o app é revelado. Fica montada durante o exit graças
7258
7275
  // ao `!exitDone`.
7259
7276
  if (loaderActive || !exitDone) {
7260
- return (jsxRuntime.jsx(AcademeLoading, { loading: loaderActive, duration: 1200, onFinish: () => setExitDone(true), style: { width: "100vw", height: "100vh" } }));
7277
+ return (jsxRuntime.jsx(AcademeLoading, { loading: loaderActive, duration: 1200, theme: theme, onFinish: () => setExitDone(true), style: { width: "100vw", height: "100vh" } }));
7261
7278
  }
7262
7279
  return (jsxRuntime.jsx(ProtectedAppContext.Provider, { value: textColors, children: children }));
7263
7280
  };