@fluencypassdevs/pulse 0.4.0 → 0.6.0

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/bin/cli.mjs CHANGED
File without changes
package/bin/mcp.mjs CHANGED
@@ -322,6 +322,41 @@ const COMPONENTS = [
322
322
  example: `<Sheet><SheetTrigger>Menu</SheetTrigger><SheetContent side="left">…</SheetContent></Sheet>`,
323
323
  keywords: ["sheet", "menu", "mobile", "painel", "drawer", "core"],
324
324
  },
325
+ {
326
+ name: "Card",
327
+ import: 'import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter } from "@fluencypassdevs/pulse"',
328
+ description: "Container de superficie do core (bg-card, border, rounded-xl, shadow-sm). Em landing: cards de plano/preco, feature cards, depoimentos. Sub-componentes: CardHeader (grid titulo/descricao + slot CardAction), CardTitle, CardDescription, CardContent, CardFooter.",
329
+ props: [],
330
+ example: `<Card>
331
+ <CardHeader>
332
+ <CardTitle>Plano Anual</CardTitle>
333
+ <CardDescription>12x de R$ 149</CardDescription>
334
+ <CardAction><Badge>Mais popular</Badge></CardAction>
335
+ </CardHeader>
336
+ <CardContent>…benefícios…</CardContent>
337
+ <CardFooter><CtaBrand href="/checkout">Assinar agora</CtaBrand></CardFooter>
338
+ </Card>`,
339
+ keywords: ["card", "plano", "preco", "pricing", "feature", "depoimento", "container", "core"],
340
+ },
341
+ {
342
+ name: "Collapsible",
343
+ import: 'import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@fluencypassdevs/pulse"',
344
+ description: "Regiao expansivel/recolhivel sem estilo imposto (core, Radix). Para secoes opcionais (ver mais detalhes, specs completas). Para FAQ estilizada, usar Accordion ou FaqSection.",
345
+ props: [{ name: "open / onOpenChange / defaultOpen", type: "boolean / (open) => void / boolean", default: "-" }],
346
+ example: `<Collapsible>
347
+ <CollapsibleTrigger>Ver mais detalhes</CollapsibleTrigger>
348
+ <CollapsibleContent>…conteúdo opcional…</CollapsibleContent>
349
+ </Collapsible>`,
350
+ keywords: ["collapsible", "expandir", "recolher", "ver mais", "detalhes", "core"],
351
+ },
352
+ {
353
+ name: "Separator",
354
+ import: 'import { Separator } from "@fluencypassdevs/pulse"',
355
+ description: "Linha divisoria horizontal/vertical acessivel (core, Radix, decorative por padrao), token bg-border. Divisao sutil dentro de cards e listas — entre DOBRAS de landing, prefira espaçamento/tone da Section.",
356
+ props: [{ name: "orientation", type: '"horizontal" | "vertical"', default: '"horizontal"' }],
357
+ example: `<Separator className="my-4" />`,
358
+ keywords: ["separator", "divisor", "linha", "divider", "core"],
359
+ },
325
360
  {
326
361
  name: "CorePrimitives",
327
362
  import: 'import { Label, Textarea, Select, Checkbox, RadioGroup, Switch, Accordion, Tabs, Tooltip, Avatar, ScrollArea, Skeleton, Spinner, Empty, CycleIcon, cn } from "@fluencypassdevs/pulse"',
@@ -340,7 +375,11 @@ const TOKENS = {
340
375
  brand: ["bg-brand", "text-brand", "text-on-brand", "bg-brand-soft"],
341
376
  product: ["bg-product", "text-on-product", "bg-product-soft (dentro de .theme-*)"],
342
377
  highlight: ["bg-highlight-positive", "bg-highlight-warning", "bg-highlight-critical", "bg-highlight-info"],
343
- expressive: ["--gradient-brand-primary", "--gradient-brand-angled", "--glow-brand-circle", ".light-surface"],
378
+ expressive: [
379
+ "--gradient-brand-primary", "--gradient-brand-angled", "--glow-brand-circle", ".light-surface",
380
+ "Degrades do tema ativo (use com um .theme-* no elemento ou ancestral): .gradient-linear-{b,t,r,l,br,tr,bl,tl}, .gradient-glow-{tr,br,tl,bl,c}, .gradient-spotlight, .gradient-mesh, .gradient-band",
381
+ "Pontes de familia: .gradient-practice (Group Talk → Private Talk), .gradient-learning (Impulse → Class)",
382
+ ],
344
383
  },
345
384
  radius: ["rounded-sm", "rounded-md", "rounded-lg", "rounded-xl"],
346
385
  typography: {
@@ -348,7 +387,17 @@ const TOKENS = {
348
387
  heading: ["heading-lg (20px)", "heading-2xl (32px)", "heading-4xl (48px)"],
349
388
  display: ["display-md (64px/700)", "display-lg (72px/700)", "display-lg-light (72px/300)"],
350
389
  },
351
- themes: [".theme-class", ".theme-private", ".theme-group", ".theme-impulse", ".theme-positive", ".theme-warning", ".theme-critical", ".dark"],
390
+ themes: [
391
+ ".theme-brand — coral da marca Fluencypass",
392
+ ".theme-class — azul (Class / aulas)",
393
+ ".theme-group — AMARELO Sol do PRODUTO Group Talk (texto escuro no preenchimento)",
394
+ ".theme-private — AMARELO Limao do PRODUTO Private Talk (texto escuro no preenchimento)",
395
+ ".theme-impulse — roxo (Impulse)",
396
+ ".theme-progress — verde de avanco/acerto (antes era o theme-group)",
397
+ ".theme-streak — laranja da sequencia/streak (antes era o theme-private)",
398
+ ".theme-positive / .theme-warning / .theme-critical — status",
399
+ ".dark — modo escuro",
400
+ ],
352
401
  }
353
402
 
354
403
  // ─── Tool Definitions ──────────────────────────────────────────────────────────
@@ -479,7 +528,7 @@ Escolha por pagina/secao via prop \`tone\` do Section (light e dark de 1a classe
479
528
  case "pulse_get_tokens": {
480
529
  const cat = args.category || "all"
481
530
  if (cat === "all") {
482
- return `# Tokens do Pulse (vocabulario de marketing)\n\n## Cores base\n${TOKENS.colors.base.join(", ")}\n\n## Marca\n${TOKENS.colors.brand.join(", ")}\n\n## Produto (no tema ativo)\n${TOKENS.colors.product.join(", ")}\n\n## Destaques\n${TOKENS.colors.highlight.join(", ")}\n\n## Expressivos\n${TOKENS.colors.expressive.join(", ")}\n\n## Tipografia\nBody: ${TOKENS.typography.body.join(", ")}\nHeading: ${TOKENS.typography.heading.join(", ")}\nDisplay: ${TOKENS.typography.display.join(", ")}\n\n## Radius\n${TOKENS.radius.join(", ")}\n\n## Temas\n${TOKENS.themes.join(", ")}\n\n**NUNCA cor hardcoded nem primitivo (ex.: color-brand-400, #hex). Sempre o token semantico.**`
531
+ return `# Tokens do Pulse (vocabulario de marketing)\n\n## Cores base\n${TOKENS.colors.base.join(", ")}\n\n## Marca\n${TOKENS.colors.brand.join(", ")}\n\n## Produto (no tema ativo)\n${TOKENS.colors.product.join(", ")}\n\n## Destaques\n${TOKENS.colors.highlight.join(", ")}\n\n## Expressivos\n${TOKENS.colors.expressive.join(", ")}\n\n## Tipografia\nBody: ${TOKENS.typography.body.join(", ")}\nHeading: ${TOKENS.typography.heading.join(", ")}\nDisplay: ${TOKENS.typography.display.join(", ")}\n\n## Radius\n${TOKENS.radius.join(", ")}\n\n## Temas\n- ${TOKENS.themes.join("\n- ")}\n\n**NUNCA cor hardcoded nem primitivo (ex.: color-brand-400, #hex). Sempre o token semantico.** Degrades: so os presets .gradient-* (nunca linear-gradient com cores proprias), exceto os expressivos de marca acima.`
483
532
  }
484
533
  const data = TOKENS[cat]
485
534
  if (!data) return `Unknown category "${cat}". Available: colors, typography, radius, themes, all.`
@@ -521,6 +570,7 @@ Uma superficie usa UM DS: marketing=Pulse, produto=Cycle. Nunca misture no mesmo
521
570
  ## Estilo & tema
522
571
  4. Só token semantico do Pulse (bg-page, text-body, bg-brand, bg-product, bg-highlight-*) — nunca hex/primitivo.
523
572
  5. Tema por pagina/secao (prop tone do Section); light e dark de 1a classe.
573
+ 5b. Tema de cor pelo SENTIDO, nao pela cor: produto Group Talk → \`theme-group\` (amarelo), Private Talk → \`theme-private\` (amarelo); verde de progresso → \`theme-progress\`; laranja de sequencia → \`theme-streak\`. Nunca \`theme-group\`/\`theme-private\` para querer verde/laranja.
524
574
  6. Tipografia via classes do sistema (heading-*, display-*) — sem valores arbitrarios.
525
575
 
526
576
  ## Performance & a11y & SEO
package/dist/index.d.ts CHANGED
@@ -3,9 +3,10 @@ import { IconSize } from './icons/index.js';
3
3
  export { Achievement, Ai, Answer, Badge as BadgeIcon, Certificate, Chat as ChatIcon, Checkpoint, Completion, Conversation, Course, CycleIcon, CycleIconProps, Deadline, Dialogue, Dictionary, Diploma, DotLive, Exercise, Feedback, Flashcard, Fluency, Goal, Grammar, GroupClass, Highlight, ICON_SIZES, IconCategory, IconProps, IconStatus, Language, Lesson, Listening, Live, MemoryCard, Milestone, Module, Presentation, PrivateClass, Progress as ProgressIcon, Question, Quiz, Ray, Reading, Recap, RecordedClass, Recurring, Repetition, Required, Schedule, Sentence, Streak, Task, Translate, Unit, Vocabulary, Whiteboard } from './icons/index.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as React$1 from 'react';
6
- import { Accordion as Accordion$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Label as Label$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Dialog, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from 'radix-ui';
6
+ import { Accordion as Accordion$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Label as Label$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Dialog, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from 'radix-ui';
7
7
  import * as class_variance_authority_types from 'class-variance-authority/types';
8
8
  import { VariantProps } from 'class-variance-authority';
9
+ import { LucideIcon } from 'lucide-react';
9
10
  export { RevealOnScroll, RevealOnScrollProps } from './motion/reveal-on-scroll.js';
10
11
  export { StaggerReveal, StaggerRevealProps } from './motion/stagger-reveal.js';
11
12
  export { AnimatedNumber, AnimatedNumberProps } from './motion/animated-number.js';
@@ -29,7 +30,6 @@ export { LogoCloud, LogoCloudProps } from './sections/logo-cloud.js';
29
30
  export { FaqItem, FaqSection, FaqSectionProps } from './sections/faq-section.js';
30
31
  export { useReducedMotion } from './hooks/use-reduced-motion.js';
31
32
  export { UseIntersectionOptions, useIntersection } from './hooks/use-intersection.js';
32
- import 'lucide-react';
33
33
 
34
34
  declare function cn(...inputs: ClassValue[]): string;
35
35
 
@@ -132,6 +132,14 @@ interface ButtonProps extends React$1.ComponentProps<"button">, VariantProps<typ
132
132
  }
133
133
  declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
134
134
 
135
+ declare function Card({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
136
+ declare function CardHeader({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
137
+ declare function CardTitle({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
138
+ declare function CardDescription({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
139
+ declare function CardAction({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
140
+ declare function CardContent({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
141
+ declare function CardFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
142
+
135
143
  declare const checkboxVariants: (props?: ({
136
144
  size?: "sm" | "lg" | "default" | null | undefined;
137
145
  variant?: "default" | "circular" | null | undefined;
@@ -142,6 +150,10 @@ interface CheckboxProps extends React$1.ComponentProps<typeof Checkbox$1.Root>,
142
150
  }
143
151
  declare function Checkbox({ className, size, variant, theme, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
144
152
 
153
+ declare function Collapsible({ ...props }: React$1.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime.JSX.Element;
154
+ declare function CollapsibleTrigger({ ...props }: React$1.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
155
+ declare function CollapsibleContent({ ...props }: React$1.ComponentProps<typeof Collapsible$1.CollapsibleContent>): react_jsx_runtime.JSX.Element;
156
+
145
157
  declare function Empty({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
146
158
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
147
159
  declare const emptyMediaVariants: (props?: ({
@@ -152,6 +164,62 @@ declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">
152
164
  declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
153
165
  declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
154
166
 
167
+ type ErrorStateKind = "not-found" | "forbidden" | "unauthorized" | "server" | "offline" | "unsupported" | "generic";
168
+ type ErrorStateSize = "page" | "section";
169
+ type ErrorStateSeverity = "neutral" | "warning" | "critical";
170
+ interface ErrorStatePreset {
171
+ icon: LucideIcon;
172
+ severity: ErrorStateSeverity;
173
+ title: string;
174
+ description: string;
175
+ /** Título alternativo quando size="page" (só o generic usa). */
176
+ pageTitle?: string;
177
+ /** Descrição alternativa quando size="page" (só o generic usa). */
178
+ pageDescription?: string;
179
+ }
180
+ /**
181
+ * Presets por cenário. Copy em português correto — texto que o aluno lê.
182
+ * Regra: o default só afirma o que o componente garante sozinho. Reportar, reconectar,
183
+ * salvar dados são do app — quem faz isso sobrescreve title/description.
184
+ * Severidade: vermelho só em falha real do sistema.
185
+ */
186
+ declare const ERROR_STATE_PRESETS: Record<ErrorStateKind, ErrorStatePreset>;
187
+ declare function ErrorStateMedia({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
188
+ interface ErrorStateTitleProps extends React$1.ComponentProps<"h2"> {
189
+ /** Nível do heading. Default: 1 em page, 2 em section. */
190
+ level?: 1 | 2 | 3 | 4;
191
+ }
192
+ declare const ErrorStateTitle: React$1.ForwardRefExoticComponent<Omit<ErrorStateTitleProps, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
193
+ declare function ErrorStateDescription({ className, ...props }: React$1.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
194
+ declare function ErrorStateActions({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
195
+ declare function ErrorStateMeta({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
196
+ interface ErrorStateProps extends Omit<React$1.ComponentProps<"div">, "title" | "role" | "aria-live"> {
197
+ kind?: ErrorStateKind;
198
+ size?: ErrorStateSize;
199
+ severity?: ErrorStateSeverity;
200
+ title?: React$1.ReactNode;
201
+ description?: React$1.ReactNode;
202
+ /** Substitui o ícone default (ex.: ilustração). */
203
+ media?: React$1.ReactNode;
204
+ /** Badge mono opcional ("404", "500"). */
205
+ code?: string | number;
206
+ /** "Referência xxxx" com botão copiar, opcional. */
207
+ referenceId?: string;
208
+ onRetry?: () => void;
209
+ retryLabel?: string;
210
+ onReport?: () => void;
211
+ reportLabel?: string;
212
+ /** Botões do consumidor. Renderizados antes do retry. */
213
+ actions?: React$1.ReactNode;
214
+ /** section: borda tracejada como o Empty. */
215
+ bordered?: boolean;
216
+ /** page: foca o título ao montar. Default true. */
217
+ autoFocus?: boolean;
218
+ /** Tag do título. Default 1 em page, 2 em section. */
219
+ headingLevel?: 1 | 2 | 3 | 4;
220
+ }
221
+ declare function ErrorState({ kind, size, severity: severityProp, title, description, media, code, referenceId, onRetry, retryLabel, onReport, reportLabel, actions, bordered, autoFocus, headingLevel, className, ...props }: ErrorStateProps): react_jsx_runtime.JSX.Element;
222
+
155
223
  interface InputProps extends React$1.ComponentProps<"input"> {
156
224
  inputSize?: "sm" | "default" | "lg";
157
225
  /** Variante visual: outline (borda) ou filled (fundo preenchido) */
@@ -191,6 +259,8 @@ declare function SelectSeparator({ className, ...props }: React$1.ComponentProps
191
259
  declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof Select$1.ScrollUpButton>): react_jsx_runtime.JSX.Element;
192
260
  declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof Select$1.ScrollDownButton>): react_jsx_runtime.JSX.Element;
193
261
 
262
+ declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof Separator$1.Root>): react_jsx_runtime.JSX.Element;
263
+
194
264
  declare function Sheet({ ...props }: React$1.ComponentProps<typeof Dialog.Root>): react_jsx_runtime.JSX.Element;
195
265
  declare function SheetTrigger({ ...props }: React$1.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime.JSX.Element;
196
266
  declare function SheetClose({ ...props }: React$1.ComponentProps<typeof Dialog.Close>): react_jsx_runtime.JSX.Element;
@@ -267,4 +337,4 @@ interface PulseLogoProps {
267
337
  */
268
338
  declare function PulseLogo({ className }: PulseLogoProps): react_jsx_runtime.JSX.Element;
269
339
 
270
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, ClassLogo, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FluencypassIcon, FluencypassLogo, type FluencypassLogoProps, GroupTalkLogo, IconSize, Input, type InputProps, Label, type LabelProps, PrivateTalkLogo, ProductLogo, PulseLogo, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Spinner, type SpinnerProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, cn, radioVariants, switchVariants, tabsListVariants };
340
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, ClassLogo, Collapsible, CollapsibleContent, CollapsibleTrigger, ERROR_STATE_PRESETS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, ErrorState, ErrorStateActions, ErrorStateDescription, type ErrorStateKind, ErrorStateMedia, ErrorStateMeta, type ErrorStatePreset, type ErrorStateProps, type ErrorStateSeverity, type ErrorStateSize, ErrorStateTitle, FluencypassIcon, FluencypassLogo, type FluencypassLogoProps, GroupTalkLogo, IconSize, Input, type InputProps, Label, type LabelProps, PrivateTalkLogo, ProductLogo, PulseLogo, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Spinner, type SpinnerProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, cn, radioVariants, switchVariants, tabsListVariants };
package/dist/index.js CHANGED
@@ -34,9 +34,9 @@ import { cn } from './chunk-W4KJCBMW.js';
34
34
  export { cn } from './chunk-W4KJCBMW.js';
35
35
  import { __objRest, __spreadValues, __spreadProps } from './chunk-RMVMLLA7.js';
36
36
  import { jsx, jsxs } from 'react/jsx-runtime';
37
- import { Avatar as Avatar$1, Slot, Checkbox as Checkbox$1, Label as Label$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Dialog, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from 'radix-ui';
37
+ import { Avatar as Avatar$1, Slot, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Label as Label$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Dialog, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from 'radix-ui';
38
38
  import { cva } from 'class-variance-authority';
39
- import { CheckIcon, CircleIcon, ChevronDownIcon, ChevronUpIcon, XIcon, Loader2 } from 'lucide-react';
39
+ import { TriangleAlert, FileQuestion, WifiOff, ServerCrash, LogIn, Lock, SearchX, CheckIcon, RefreshCw, CircleIcon, ChevronDownIcon, ChevronUpIcon, XIcon, Loader2, Check, Copy } from 'lucide-react';
40
40
  import * as React from 'react';
41
41
 
42
42
  var sizeMap = {
@@ -299,6 +299,85 @@ function Button(_a) {
299
299
  }, props)
300
300
  );
301
301
  }
302
+ function Card(_a) {
303
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
304
+ return /* @__PURE__ */ jsx(
305
+ "div",
306
+ __spreadValues({
307
+ "data-slot": "card",
308
+ className: cn(
309
+ "flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
310
+ className
311
+ )
312
+ }, props)
313
+ );
314
+ }
315
+ function CardHeader(_a) {
316
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
317
+ return /* @__PURE__ */ jsx(
318
+ "div",
319
+ __spreadValues({
320
+ "data-slot": "card-header",
321
+ className: cn(
322
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
323
+ className
324
+ )
325
+ }, props)
326
+ );
327
+ }
328
+ function CardTitle(_a) {
329
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
330
+ return /* @__PURE__ */ jsx(
331
+ "div",
332
+ __spreadValues({
333
+ "data-slot": "card-title",
334
+ className: cn("leading-none font-semibold", className)
335
+ }, props)
336
+ );
337
+ }
338
+ function CardDescription(_a) {
339
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
340
+ return /* @__PURE__ */ jsx(
341
+ "div",
342
+ __spreadValues({
343
+ "data-slot": "card-description",
344
+ className: cn("text-sm text-muted-foreground", className)
345
+ }, props)
346
+ );
347
+ }
348
+ function CardAction(_a) {
349
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
350
+ return /* @__PURE__ */ jsx(
351
+ "div",
352
+ __spreadValues({
353
+ "data-slot": "card-action",
354
+ className: cn(
355
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
356
+ className
357
+ )
358
+ }, props)
359
+ );
360
+ }
361
+ function CardContent(_a) {
362
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
363
+ return /* @__PURE__ */ jsx(
364
+ "div",
365
+ __spreadValues({
366
+ "data-slot": "card-content",
367
+ className: cn("px-6", className)
368
+ }, props)
369
+ );
370
+ }
371
+ function CardFooter(_a) {
372
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
373
+ return /* @__PURE__ */ jsx(
374
+ "div",
375
+ __spreadValues({
376
+ "data-slot": "card-footer",
377
+ className: cn("flex items-center px-6 [.border-t]:pt-6", className)
378
+ }, props)
379
+ );
380
+ }
302
381
  var checkboxVariants = cva(
303
382
  "peer shrink-0 border border-neutral-border shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-neutral-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
304
383
  {
@@ -349,6 +428,28 @@ function Checkbox(_a) {
349
428
  })
350
429
  );
351
430
  }
431
+ function Collapsible(_a) {
432
+ var props = __objRest(_a, []);
433
+ return /* @__PURE__ */ jsx(Collapsible$1.Root, __spreadValues({ "data-slot": "collapsible" }, props));
434
+ }
435
+ function CollapsibleTrigger(_a) {
436
+ var props = __objRest(_a, []);
437
+ return /* @__PURE__ */ jsx(
438
+ Collapsible$1.CollapsibleTrigger,
439
+ __spreadValues({
440
+ "data-slot": "collapsible-trigger"
441
+ }, props)
442
+ );
443
+ }
444
+ function CollapsibleContent(_a) {
445
+ var props = __objRest(_a, []);
446
+ return /* @__PURE__ */ jsx(
447
+ Collapsible$1.CollapsibleContent,
448
+ __spreadValues({
449
+ "data-slot": "collapsible-content"
450
+ }, props)
451
+ );
452
+ }
352
453
  function Empty(_a) {
353
454
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
354
455
  return /* @__PURE__ */ jsx(
@@ -442,6 +543,274 @@ function EmptyContent(_a) {
442
543
  }, props)
443
544
  );
444
545
  }
546
+ var ERROR_STATE_PRESETS = {
547
+ "not-found": {
548
+ icon: SearchX,
549
+ severity: "neutral",
550
+ title: "P\xE1gina n\xE3o encontrada",
551
+ description: "O link pode estar quebrado ou a p\xE1gina pode ter sido movida. Confira o endere\xE7o ou v\xE1 para o in\xEDcio."
552
+ },
553
+ forbidden: {
554
+ icon: Lock,
555
+ severity: "neutral",
556
+ title: "Voc\xEA n\xE3o tem acesso a esta p\xE1gina",
557
+ description: "Esta \xE1rea \xE9 restrita. Se voc\xEA precisa dela, pe\xE7a acesso a quem administra sua conta."
558
+ },
559
+ unauthorized: {
560
+ icon: LogIn,
561
+ severity: "neutral",
562
+ title: "Sua sess\xE3o expirou",
563
+ description: "Entre novamente para continuar de onde parou."
564
+ },
565
+ server: {
566
+ icon: ServerCrash,
567
+ severity: "critical",
568
+ title: "Algo deu errado do nosso lado",
569
+ description: "Tente novamente em alguns instantes. Se continuar, fale com o suporte."
570
+ },
571
+ offline: {
572
+ icon: WifiOff,
573
+ severity: "warning",
574
+ title: "Voc\xEA est\xE1 sem conex\xE3o",
575
+ description: "Confira o Wi-Fi ou os dados m\xF3veis e tente novamente quando a conex\xE3o voltar."
576
+ },
577
+ // Conteúdo íntegro que esta versão do app ainda não sabe abrir (ex.: tipo de atividade
578
+ // publicado antes do deploy do cliente). Nada falhou — por isso neutro, nunca alerta.
579
+ unsupported: {
580
+ icon: FileQuestion,
581
+ severity: "neutral",
582
+ title: "Este conte\xFAdo ainda n\xE3o abre nesta vers\xE3o",
583
+ description: "Ele precisa de uma vers\xE3o mais nova do app. Atualize quando ela estiver dispon\xEDvel ou tente mais tarde."
584
+ },
585
+ generic: {
586
+ icon: TriangleAlert,
587
+ severity: "critical",
588
+ title: "Este conte\xFAdo n\xE3o carregou",
589
+ description: "Tente novamente em alguns instantes.",
590
+ pageTitle: "Esta p\xE1gina n\xE3o carregou"
591
+ }
592
+ };
593
+ var ErrorStateContext = React.createContext({
594
+ size: "section",
595
+ severity: "neutral"
596
+ });
597
+ function useErrorStateContext() {
598
+ return React.useContext(ErrorStateContext);
599
+ }
600
+ var MEDIA_SEVERITY = {
601
+ neutral: "bg-muted text-foreground border border-border",
602
+ warning: "theme-warning bg-background text-foreground",
603
+ critical: "theme-critical bg-background text-foreground"
604
+ };
605
+ var MEDIA_SIZE = {
606
+ page: "size-14 rounded-xl",
607
+ section: "size-8 rounded-lg"
608
+ };
609
+ function ErrorStateMedia(_a) {
610
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
611
+ const { size, severity } = useErrorStateContext();
612
+ return /* @__PURE__ */ jsx(
613
+ "div",
614
+ __spreadValues({
615
+ "data-slot": "error-state-media",
616
+ className: cn(
617
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
618
+ MEDIA_SIZE[size],
619
+ MEDIA_SEVERITY[severity],
620
+ className
621
+ )
622
+ }, props)
623
+ );
624
+ }
625
+ var ErrorStateTitle = React.forwardRef(
626
+ function ErrorStateTitle2(_a, ref) {
627
+ var _b = _a, { className, level } = _b, props = __objRest(_b, ["className", "level"]);
628
+ const { size } = useErrorStateContext();
629
+ const Tag = `h${level != null ? level : size === "page" ? 1 : 2}`;
630
+ return /* @__PURE__ */ jsx(
631
+ Tag,
632
+ __spreadValues({
633
+ ref,
634
+ "data-slot": "error-state-title",
635
+ className: cn(
636
+ "text-balance outline-none",
637
+ size === "page" ? "text-2xl font-semibold tracking-tight" : "text-sm font-semibold tracking-tight",
638
+ className
639
+ )
640
+ }, props)
641
+ );
642
+ }
643
+ );
644
+ function ErrorStateDescription(_a) {
645
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
646
+ const { size } = useErrorStateContext();
647
+ return /* @__PURE__ */ jsx(
648
+ "p",
649
+ __spreadValues({
650
+ "data-slot": "error-state-description",
651
+ className: cn(
652
+ "text-balance text-muted-foreground",
653
+ size === "page" ? "text-sm max-w-md" : "text-xs/relaxed max-w-sm",
654
+ className
655
+ )
656
+ }, props)
657
+ );
658
+ }
659
+ function ErrorStateActions(_a) {
660
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
661
+ return /* @__PURE__ */ jsx(
662
+ "div",
663
+ __spreadValues({
664
+ "data-slot": "error-state-actions",
665
+ className: cn("mt-3 flex flex-wrap items-center justify-center gap-2", className)
666
+ }, props)
667
+ );
668
+ }
669
+ function ErrorStateMeta(_a) {
670
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
671
+ const { size } = useErrorStateContext();
672
+ return /* @__PURE__ */ jsx(
673
+ "div",
674
+ __spreadValues({
675
+ "data-slot": "error-state-meta",
676
+ className: cn(
677
+ "flex flex-wrap items-center justify-center gap-2 font-mono text-xs/relaxed text-muted-foreground",
678
+ size === "page" ? "mt-3" : "mt-2",
679
+ className
680
+ )
681
+ }, props)
682
+ );
683
+ }
684
+ function CopyReference({ value }) {
685
+ const [copied, setCopied] = React.useState(false);
686
+ React.useEffect(() => {
687
+ if (!copied) return;
688
+ const id = setTimeout(() => setCopied(false), 2e3);
689
+ return () => clearTimeout(id);
690
+ }, [copied]);
691
+ const handleCopy = async () => {
692
+ try {
693
+ await navigator.clipboard.writeText(value);
694
+ setCopied(true);
695
+ } catch (e) {
696
+ }
697
+ };
698
+ return /* @__PURE__ */ jsxs(
699
+ Button,
700
+ {
701
+ type: "button",
702
+ variant: "link",
703
+ size: "xs",
704
+ onClick: handleCopy,
705
+ "aria-label": copied ? "Copiado" : "Copiar refer\xEAncia",
706
+ className: "font-sans",
707
+ children: [
708
+ /* @__PURE__ */ jsx(CycleIcon, { icon: copied ? Check : Copy, size: "2xs", decorative: true }),
709
+ /* @__PURE__ */ jsx("span", { "aria-live": "polite", children: copied ? "Copiado" : "Copiar" })
710
+ ]
711
+ }
712
+ );
713
+ }
714
+ function ErrorState(_a) {
715
+ var _b = _a, {
716
+ kind = "generic",
717
+ size = "section",
718
+ severity: severityProp,
719
+ title,
720
+ description,
721
+ media,
722
+ code,
723
+ referenceId,
724
+ onRetry,
725
+ retryLabel = "Tentar novamente",
726
+ onReport,
727
+ reportLabel = "Relatar problema",
728
+ actions,
729
+ bordered = false,
730
+ autoFocus = true,
731
+ headingLevel,
732
+ className
733
+ } = _b, props = __objRest(_b, [
734
+ "kind",
735
+ "size",
736
+ "severity",
737
+ "title",
738
+ "description",
739
+ "media",
740
+ "code",
741
+ "referenceId",
742
+ "onRetry",
743
+ "retryLabel",
744
+ "onReport",
745
+ "reportLabel",
746
+ "actions",
747
+ "bordered",
748
+ "autoFocus",
749
+ "headingLevel",
750
+ "className"
751
+ ]);
752
+ var _a2, _b2;
753
+ const preset = ERROR_STATE_PRESETS[kind];
754
+ const severity = severityProp != null ? severityProp : preset.severity;
755
+ const titleRef = React.useRef(null);
756
+ React.useEffect(() => {
757
+ var _a3;
758
+ if (size === "page" && autoFocus) {
759
+ (_a3 = titleRef.current) == null ? void 0 : _a3.focus({ preventScroll: true });
760
+ }
761
+ }, [size, autoFocus]);
762
+ const resolvedTitle = title != null ? title : size === "page" ? (_a2 = preset.pageTitle) != null ? _a2 : preset.title : preset.title;
763
+ const resolvedDescription = description != null ? description : size === "page" ? (_b2 = preset.pageDescription) != null ? _b2 : preset.description : preset.description;
764
+ const liveProps = size === "section" ? severity === "critical" ? { role: "alert" } : { role: "status", "aria-live": "polite" } : {};
765
+ return /* @__PURE__ */ jsx(ErrorStateContext.Provider, { value: { size, severity }, children: /* @__PURE__ */ jsxs(
766
+ "div",
767
+ __spreadProps(__spreadValues(__spreadValues({
768
+ "data-slot": "error-state",
769
+ "data-kind": kind,
770
+ "data-size": size,
771
+ "data-severity": severity,
772
+ className: cn(
773
+ "flex flex-col items-center text-center gap-2",
774
+ size === "page" ? "flex-1 justify-center px-6 py-16" : "p-6",
775
+ size === "section" && bordered && "rounded-lg border border-dashed border-border",
776
+ className
777
+ )
778
+ }, props), liveProps), {
779
+ children: [
780
+ media != null ? media : /* @__PURE__ */ jsx(ErrorStateMedia, { children: /* @__PURE__ */ jsx(CycleIcon, { icon: preset.icon, size: size === "page" ? "md" : "xs", decorative: true }) }),
781
+ /* @__PURE__ */ jsx(ErrorStateTitle, { ref: titleRef, level: headingLevel, tabIndex: size === "page" ? -1 : void 0, children: resolvedTitle }),
782
+ resolvedDescription && /* @__PURE__ */ jsx(ErrorStateDescription, { children: resolvedDescription }),
783
+ (actions || onRetry) && /* @__PURE__ */ jsxs(ErrorStateActions, { children: [
784
+ actions,
785
+ onRetry && /* @__PURE__ */ jsxs(Button, { type: "button", size: size === "page" ? "default" : "sm", onClick: onRetry, children: [
786
+ /* @__PURE__ */ jsx(CycleIcon, { icon: RefreshCw, size: "xs", decorative: true }),
787
+ retryLabel
788
+ ] })
789
+ ] }),
790
+ (code != null || referenceId) && /* @__PURE__ */ jsxs(ErrorStateMeta, { children: [
791
+ code != null && /* @__PURE__ */ jsx(
792
+ Badge2,
793
+ {
794
+ variant: "outline",
795
+ size: "sm",
796
+ className: cn(
797
+ "font-mono",
798
+ severity === "critical" && "theme-critical bg-background text-foreground border-border"
799
+ ),
800
+ children: code
801
+ }
802
+ ),
803
+ referenceId && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
804
+ /* @__PURE__ */ jsx("span", { children: "Refer\xEAncia" }),
805
+ /* @__PURE__ */ jsx("code", { className: "rounded-sm bg-accent px-1.5 py-0.5 text-foreground", children: referenceId }),
806
+ /* @__PURE__ */ jsx(CopyReference, { value: referenceId })
807
+ ] })
808
+ ] }),
809
+ onReport && /* @__PURE__ */ jsx(Button, { type: "button", variant: "link", size: "sm", onClick: onReport, className: "mt-1 text-muted-foreground", children: reportLabel })
810
+ ]
811
+ })
812
+ ) });
813
+ }
445
814
  var Input = React.forwardRef(
446
815
  (_a, ref) => {
447
816
  var _b = _a, { className, type, inputSize = "default", variant = "outline" } = _b, props = __objRest(_b, ["className", "type", "inputSize", "variant"]);
@@ -778,6 +1147,29 @@ function SelectScrollDownButton(_a) {
778
1147
  })
779
1148
  );
780
1149
  }
1150
+ function Separator(_a) {
1151
+ var _b = _a, {
1152
+ className,
1153
+ orientation = "horizontal",
1154
+ decorative = true
1155
+ } = _b, props = __objRest(_b, [
1156
+ "className",
1157
+ "orientation",
1158
+ "decorative"
1159
+ ]);
1160
+ return /* @__PURE__ */ jsx(
1161
+ Separator$1.Root,
1162
+ __spreadValues({
1163
+ "data-slot": "separator",
1164
+ decorative,
1165
+ orientation,
1166
+ className: cn(
1167
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
1168
+ className
1169
+ )
1170
+ }, props)
1171
+ );
1172
+ }
781
1173
  function Sheet(_a) {
782
1174
  var props = __objRest(_a, []);
783
1175
  return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({ "data-slot": "sheet" }, props));
@@ -1207,6 +1599,6 @@ function PulseLogo({ className = "size-6" }) {
1207
1599
  );
1208
1600
  }
1209
1601
 
1210
- export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge2 as Badge, Button, Checkbox, ClassLogo, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FluencypassIcon, FluencypassLogo, GroupTalkLogo, Input, Label, PrivateTalkLogo, ProductLogo, PulseLogo, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, radioVariants, switchVariants, tabsListVariants };
1602
+ export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge2 as Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ClassLogo, Collapsible, CollapsibleContent, CollapsibleTrigger, ERROR_STATE_PRESETS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, ErrorState, ErrorStateActions, ErrorStateDescription, ErrorStateMedia, ErrorStateMeta, ErrorStateTitle, FluencypassIcon, FluencypassLogo, GroupTalkLogo, Input, Label, PrivateTalkLogo, ProductLogo, PulseLogo, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, radioVariants, switchVariants, tabsListVariants };
1211
1603
  //# sourceMappingURL=index.js.map
1212
1604
  //# sourceMappingURL=index.js.map