@rendra-ui/web 2.4.0 → 2.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/README.md +33 -1
- package/dist/base.css +33 -1
- package/dist/{button-C6rjowQi.js → button-B6-644xP.js} +86 -21
- package/dist/button-B6-644xP.js.map +1 -0
- package/dist/chart.js +63 -15
- package/dist/chart.js.map +1 -1
- package/dist/cli/auditar.js +1 -1
- package/dist/cli/codigos.js +2 -2
- package/dist/cli/executar-auditar.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/trocar.js +2 -2
- package/dist/cli/typescript-loader.js +1 -1
- package/dist/{cn-DXDpTGsu.js → cn-TBlI6-gS.js} +2 -2
- package/dist/{cn-DXDpTGsu.js.map → cn-TBlI6-gS.js.map} +1 -1
- package/dist/{components-hp7iWioq.js → components-Btk1cUg2.js} +2 -2
- package/dist/{components-hp7iWioq.js.map → components-Btk1cUg2.js.map} +1 -1
- package/dist/components.css +169 -33
- package/dist/document-viewer.js +6 -6
- package/dist/document-viewer.js.map +1 -1
- package/dist/{empty-state-CdaDLcsB.js → empty-state-DrQjqxvp.js} +36 -12
- package/dist/{empty-state-CdaDLcsB.js.map → empty-state-DrQjqxvp.js.map} +1 -1
- package/dist/features-max-CC6CorTg.js +3 -0
- package/dist/index.js +1075 -339
- package/dist/index.js.map +1 -1
- package/dist/motion-context-BL545cb6.js +222 -0
- package/dist/motion-context-BL545cb6.js.map +1 -0
- package/dist/motion-on-DMoTsWrG.js +29 -0
- package/dist/motion-on-DMoTsWrG.js.map +1 -0
- package/dist/motion.js +3 -0
- package/dist/{rendra-provider-7jUgUHzR.js → rendra-provider-CeCkPafT.js} +9 -5
- package/dist/rendra-provider-CeCkPafT.js.map +1 -0
- package/dist/rich-text-editor.js +4 -4
- package/dist/router-bridge.js +5 -4
- package/dist/router-bridge.js.map +1 -1
- package/dist/tokens.css +63 -15
- package/dist/tooltip-kgsorOg6.js +224 -0
- package/dist/tooltip-kgsorOg6.js.map +1 -0
- package/dist/types/components/rendra-provider.d.ts +12 -1
- package/dist/types/components/rendra-router-bridge.d.ts +4 -1
- package/dist/types/components/ui/accordion.d.ts +1 -1
- package/dist/types/components/ui/badge.d.ts +1 -1
- package/dist/types/components/ui/button.d.ts +1 -1
- package/dist/types/components/ui/dropdown-menu.d.ts +5 -5
- package/dist/types/components/ui/picker-panel.d.ts +1 -1
- package/dist/types/components/ui/popover.d.ts +3 -3
- package/dist/types/components/ui/radio-group.d.ts +1 -1
- package/dist/types/components/ui/skeleton.d.ts +5 -1
- package/dist/types/components/ui/stat-card.d.ts +1 -1
- package/dist/types/components/ui/table.d.ts +0 -6
- package/dist/types/components/ui/tooltip.d.ts +1 -1
- package/dist/types/hooks/use-reduced-motion.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/motion/count.d.ts +17 -0
- package/dist/types/lib/motion/features-max.d.ts +1 -0
- package/dist/types/lib/motion/index.d.ts +5 -0
- package/dist/types/lib/motion/motion-context.d.ts +58 -0
- package/dist/types/lib/motion/motion-on.d.ts +12 -0
- package/dist/types/lib/motion/native-events.d.ts +16 -0
- package/dist/types/lib/motion/presets.d.ts +92 -0
- package/dist/types/lib/motion/reorder.d.ts +7 -0
- package/dist/types/lib/motion/tokens.d.ts +66 -0
- package/dist/types/lib/motion/use-motion-presets.d.ts +8 -0
- package/dist/types/motion.d.ts +1 -0
- package/dist/{use-breakpoint-Dyp-0E_c.js → use-breakpoint-CNxDwEpc.js} +2 -2
- package/dist/{use-breakpoint-Dyp-0E_c.js.map → use-breakpoint-CNxDwEpc.js.map} +1 -1
- package/dist/use-motion-presets-DCJPBfNJ.js +401 -0
- package/dist/use-motion-presets-DCJPBfNJ.js.map +1 -0
- package/dist/widget-grid.js +3 -3
- package/package.json +10 -1
- package/dist/button-C6rjowQi.js.map +0 -1
- package/dist/rendra-provider-7jUgUHzR.js.map +0 -1
- package/dist/tooltip-bdmbX6vC.js +0 -105
- package/dist/tooltip-bdmbX6vC.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Target, TargetAndTransition, Transition } from 'motion/react';
|
|
2
|
+
import { type Bezier, type MotionTokens } from './tokens';
|
|
3
|
+
export interface MotionPreset {
|
|
4
|
+
initial: Target;
|
|
5
|
+
animate: TargetAndTransition;
|
|
6
|
+
exit: TargetAndTransition;
|
|
7
|
+
transition: Transition;
|
|
8
|
+
}
|
|
9
|
+
/** Toque: o alvo do `whileTap` (`undefined` no reduzido) e a transição de ida e de volta. */
|
|
10
|
+
export interface PressPreset {
|
|
11
|
+
whileTap: TargetAndTransition | undefined;
|
|
12
|
+
transition: Transition;
|
|
13
|
+
}
|
|
14
|
+
export type SlideFrom = 'left' | 'right' | 'top' | 'bottom';
|
|
15
|
+
/** Distância do slide: `full` (painel que entra da borda) ou `short` (conteúdo que assenta). */
|
|
16
|
+
export type SlideDistance = 'full' | 'short';
|
|
17
|
+
export interface Presets {
|
|
18
|
+
reduced: boolean;
|
|
19
|
+
/** Toque do botão, do polegar e dos controles: 120 ms, `ease.out`, escala 0,97. */
|
|
20
|
+
press: PressPreset;
|
|
21
|
+
/** Alias de `press.whileTap`, o nome antigo. Sem movimento reduzido vem `undefined`. */
|
|
22
|
+
tap: TargetAndTransition | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Salto curto de escala (célula do OTP), com a transição dentro do alvo. Estável entre
|
|
25
|
+
* renders; `undefined` se reduzido.
|
|
26
|
+
*/
|
|
27
|
+
bump: TargetAndTransition | undefined;
|
|
28
|
+
tokens: MotionTokens;
|
|
29
|
+
fade: MotionPreset;
|
|
30
|
+
/** Alias de `open()`: escala 0,95 com mola a partir da origem, saída rápida só em opacidade. */
|
|
31
|
+
scale: MotionPreset;
|
|
32
|
+
/**
|
|
33
|
+
* Cota rara de encanto (check do passo concluído): 0,8 -> 1 com a curva back, em `slow`. Nunca
|
|
34
|
+
* em controle de uso frequente.
|
|
35
|
+
*/
|
|
36
|
+
pop: MotionPreset;
|
|
37
|
+
/**
|
|
38
|
+
* Indicador de controle frequente (check do Checkbox, ponto do Radio): 0,9 -> 1 com opacidade
|
|
39
|
+
* em `fast`, sem quique e sem partir de zero.
|
|
40
|
+
*/
|
|
41
|
+
indicator: MotionPreset;
|
|
42
|
+
slide: (from: SlideFrom, distance?: SlideDistance) => MotionPreset;
|
|
43
|
+
/**
|
|
44
|
+
* Overlay ancorado (popover, menu, modal, painel do select). Número = escala de partida
|
|
45
|
+
* (padrão 0,95); `{ y }` = entrada plana, sem escala, para a superfície em tela cheia.
|
|
46
|
+
* Entra em mola criticamente amortecida (sem quique) em `base` e sai em `fast`, em opacidade.
|
|
47
|
+
*/
|
|
48
|
+
open: (from?: number | {
|
|
49
|
+
y: number;
|
|
50
|
+
}) => MotionPreset;
|
|
51
|
+
/** Gaveta e folha: entram de `from` em `slow` com `ease.drawer`, saem em `fast` pelo mesmo lado. */
|
|
52
|
+
sheet: (from: SlideFrom) => MotionPreset;
|
|
53
|
+
/** Tooltip: escala 0,97 em `fast`; aberto em `instant-open` não anima. */
|
|
54
|
+
tooltip: (instant: boolean) => MotionPreset;
|
|
55
|
+
/**
|
|
56
|
+
* Troca de conteúdo no lugar (passo do wizard), sem esperar a saída: o que sai esmaece com
|
|
57
|
+
* `blur` de 2 px em `fast`; o que entra vem de `direction` (1 avança, -1 volta), 8 px, em
|
|
58
|
+
* `base`. O desfoque disfarça o cruzamento: sem ele o olho vê dois objetos trocando de lugar.
|
|
59
|
+
*/
|
|
60
|
+
swap: (direction: 1 | -1) => MotionPreset;
|
|
61
|
+
/**
|
|
62
|
+
* Entrada de uso único (reveal do dashboard): desloca 8 px e dura `reveal.enter`, mais lenta
|
|
63
|
+
* que `slide`. Não serve a interação repetida (overlay, tab, botão).
|
|
64
|
+
*/
|
|
65
|
+
reveal: (from: SlideFrom) => MotionPreset;
|
|
66
|
+
/** Deslocamento na tela (indicador, reordenação): `move` em `ease.move`. */
|
|
67
|
+
move: Transition;
|
|
68
|
+
/** Nome antigo de `move`. */
|
|
69
|
+
layout: Transition;
|
|
70
|
+
/** Mola sem quique: onde há gesto ou soltura (drop do kanban, folha que volta). */
|
|
71
|
+
settle: Transition;
|
|
72
|
+
/** Mola da folha depois do arraste (quique mínimo). */
|
|
73
|
+
springSheet: Transition;
|
|
74
|
+
/**
|
|
75
|
+
* A mesma mola da folha em rigidez e amortecimento (massa 1), que é o que o arraste do Motion
|
|
76
|
+
* (`dragTransition`) pede para a volta à origem: rigidez = (2π / duração)², amortecimento =
|
|
77
|
+
* 2 (1 - quique) raiz(rigidez).
|
|
78
|
+
*/
|
|
79
|
+
sheetBounce: {
|
|
80
|
+
bounceStiffness: number;
|
|
81
|
+
bounceDamping: number;
|
|
82
|
+
};
|
|
83
|
+
/** Atraso de entrada do item `index`, limitado a `limit` itens (padrão 8: 480 ms). */
|
|
84
|
+
stagger: (index: number, limit?: number) => Transition;
|
|
85
|
+
/** Atraso do bloco `index` no reveal (passo `reveal.stagger`), limitado a `limit` blocos. */
|
|
86
|
+
staggerReveal: (index: number, limit?: number) => Transition;
|
|
87
|
+
}
|
|
88
|
+
export declare function createPresets(tokens: MotionTokens, reduced: boolean): Presets;
|
|
89
|
+
/** Curva no formato do recharts: `cubic-bezier(a,b,c,d)`, sem espaços. */
|
|
90
|
+
export declare function toCubicBezier([a, b, c, d,]: Bezier): `cubic-bezier(${number},${number},${number},${number})`;
|
|
91
|
+
/** Presets com os tokens lidos agora do documento. */
|
|
92
|
+
export declare function presetsFromDocument(reduced: boolean): Presets;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MotionMode } from './motion-context';
|
|
2
|
+
export declare function layoutEnabled({ mode, ready, dragging, }: {
|
|
3
|
+
mode: MotionMode;
|
|
4
|
+
/** O chunk do `domMax` já chegou (`useLayoutReady`). Antes disso `layout` não faz nada. */
|
|
5
|
+
ready: boolean;
|
|
6
|
+
dragging: boolean;
|
|
7
|
+
}): boolean;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export type Bezier = [number, number, number, number];
|
|
2
|
+
/**
|
|
3
|
+
* Reserva das durações, em segundos (SSR, ou variável ausente).
|
|
4
|
+
* `press` e `fast` valem o mesmo (120 ms) com propósitos diferentes: o toque e a saída de overlay.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DURATION: {
|
|
7
|
+
press: number;
|
|
8
|
+
hover: number;
|
|
9
|
+
fast: number;
|
|
10
|
+
base: number;
|
|
11
|
+
move: number;
|
|
12
|
+
slow: number;
|
|
13
|
+
draw: number;
|
|
14
|
+
pulse: number;
|
|
15
|
+
};
|
|
16
|
+
export type DurationName = keyof typeof DURATION;
|
|
17
|
+
/**
|
|
18
|
+
* Reveal: entrada de uso único (dashboard: bloco, cascata, contador e desenho do gráfico), mais
|
|
19
|
+
* lenta que as interações do dia a dia. Reserva em segundos (SSR, ou variável ausente).
|
|
20
|
+
*/
|
|
21
|
+
export declare const REVEAL: {
|
|
22
|
+
enter: number;
|
|
23
|
+
stagger: number;
|
|
24
|
+
count: number;
|
|
25
|
+
draw: number;
|
|
26
|
+
};
|
|
27
|
+
export type RevealName = keyof typeof REVEAL;
|
|
28
|
+
/**
|
|
29
|
+
* Curvas do globals.css (`--rendra-ease-*`). `spring` é a curva "back" (quique): só para a cota
|
|
30
|
+
* rara de encanto. `move` desloca na tela; `drawer` é a curva de gaveta e folha.
|
|
31
|
+
*/
|
|
32
|
+
export declare const EASE: Record<'out' | 'inOut' | 'spring' | 'move' | 'drawer', Bezier>;
|
|
33
|
+
export type EaseName = keyof typeof EASE;
|
|
34
|
+
/**
|
|
35
|
+
* Molas no formato "duração e quique" (Motion). `settle` assenta sem passar do ponto (layout,
|
|
36
|
+
* overlay que entra, soltura do arraste); `sheet` é a folha depois do gesto, com quique mínimo.
|
|
37
|
+
* Mola não é variável CSS: mora aqui, e o app a espelha em `dampingRatio`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const SPRING: {
|
|
40
|
+
settle: {
|
|
41
|
+
duration: number;
|
|
42
|
+
bounce: number;
|
|
43
|
+
};
|
|
44
|
+
sheet: {
|
|
45
|
+
duration: number;
|
|
46
|
+
bounce: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/** Escalas da linguagem: entrada de overlay, tooltip, ponto pequeno, toque, pop e salto curto. */
|
|
50
|
+
export declare const SCALE: {
|
|
51
|
+
enter: number;
|
|
52
|
+
tooltip: number;
|
|
53
|
+
small: number;
|
|
54
|
+
press: number;
|
|
55
|
+
pop: number;
|
|
56
|
+
bump: number;
|
|
57
|
+
};
|
|
58
|
+
/** Desfoque (px) que disfarça o cruzamento entre dois estados (troca de passo). Abaixo de 20. */
|
|
59
|
+
export declare const BLUR = 2;
|
|
60
|
+
export interface MotionTokens {
|
|
61
|
+
duration: Record<DurationName, number>;
|
|
62
|
+
reveal: Record<RevealName, number>;
|
|
63
|
+
ease: Record<EaseName, Bezier>;
|
|
64
|
+
}
|
|
65
|
+
/** Lê as durações e as curvas do documento; o que faltar (ou sem window) vem da reserva. */
|
|
66
|
+
export declare function readMotionTokens(): MotionTokens;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Presets } from './presets';
|
|
2
|
+
/**
|
|
3
|
+
* Presets do motion para o componente. A preferência "reduzir movimento" vem do mesmo
|
|
4
|
+
* `matchMedia` do hook do projeto (`use-reduced-motion.ts`: Spinner, Progress), a fonte única,
|
|
5
|
+
* reativa e testável, sem `MotionConfig reducedMotion` somando por cima. Só em `on` a
|
|
6
|
+
* preferência é assinada e os tokens lidos do documento; em `off` o custo é zero.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useMotionPresets(): Presets;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { rendraMotion, type RendraMotion } from './lib/motion/motion-on';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Rendra Design System v2.
|
|
1
|
+
/*! Rendra Design System v2.6.0 | MIT | © 2026 Bruno Magalhaes | brunomagalhaes.me */
|
|
2
2
|
import { useSyncExternalStore } from "react";
|
|
3
3
|
//#region src/hooks/use-breakpoint.ts
|
|
4
4
|
/**
|
|
@@ -46,4 +46,4 @@ function useBreakpoint() {
|
|
|
46
46
|
//#endregion
|
|
47
47
|
export { useBreakpoint as n, breakpoints as t };
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=use-breakpoint-
|
|
49
|
+
//# sourceMappingURL=use-breakpoint-CNxDwEpc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-breakpoint-
|
|
1
|
+
{"version":3,"file":"use-breakpoint-CNxDwEpc.js","names":[],"sources":["../src/hooks/use-breakpoint.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react'\n\n/**\n * Pontos de quebra, espelhando os padrões do Tailwind (sm 40rem, md 48rem, lg 64rem...).\n * Único hook de detecção de tela do sistema. Para adaptação ao espaço disponível\n * dentro de um bloco (e não à tela), use container queries (@container) no CSS.\n */\nexport const breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280, '2xl': 1536 } as const\nexport type Breakpoint = keyof typeof breakpoints\n\nconst order: Breakpoint[] = ['sm', 'md', 'lg', 'xl', '2xl']\n\nfunction subscribe(cb: () => void) {\n const lists = order.map((bp) => matchMedia(`(min-width: ${breakpoints[bp]}px)`))\n lists.forEach((mq) => mq.addEventListener('change', cb))\n return () => lists.forEach((mq) => mq.removeEventListener('change', cb))\n}\n\nfunction getCurrent(): Breakpoint | 'base' {\n let current: Breakpoint | 'base' = 'base'\n for (const bp of order) if (matchMedia(`(min-width: ${breakpoints[bp]}px)`).matches) current = bp\n return current\n}\n\nexport function useBreakpoint() {\n const current = useSyncExternalStore(subscribe, getCurrent, () => 'lg' as const)\n const rank = current === 'base' ? -1 : order.indexOf(current)\n const up = (bp: Breakpoint) => rank >= order.indexOf(bp)\n return {\n current,\n up,\n /** Abaixo de 768px: componentes se reconstroem no formato mobile. */\n isMobile: !up('md'),\n isTablet: up('md') && !up('lg'),\n isDesktop: up('lg'),\n }\n}\n"],"mappings":";;;;;;;;AAOA,IAAa,cAAc;CAAE,IAAI;CAAK,IAAI;CAAK,IAAI;CAAM,IAAI;CAAM,OAAO;AAAK;AAG/E,IAAM,QAAsB;CAAC;CAAM;CAAM;CAAM;CAAM;AAAK;AAE1D,SAAS,UAAU,IAAgB;CACjC,MAAM,QAAQ,MAAM,KAAK,OAAO,WAAW,eAAe,YAAY,IAAI,IAAI,CAAC;CAC/E,MAAM,SAAS,OAAO,GAAG,iBAAiB,UAAU,EAAE,CAAC;CACvD,aAAa,MAAM,SAAS,OAAO,GAAG,oBAAoB,UAAU,EAAE,CAAC;AACzE;AAEA,SAAS,aAAkC;CACzC,IAAI,UAA+B;CACnC,KAAK,MAAM,MAAM,OAAO,IAAI,WAAW,eAAe,YAAY,IAAI,IAAI,CAAC,CAAC,SAAS,UAAU;CAC/F,OAAO;AACT;AAEA,SAAgB,gBAAgB;CAC9B,MAAM,UAAU,qBAAqB,WAAW,kBAAkB,IAAa;CAC/E,MAAM,OAAO,YAAY,SAAS,KAAK,MAAM,QAAQ,OAAO;CAC5D,MAAM,MAAM,OAAmB,QAAQ,MAAM,QAAQ,EAAE;CACvD,OAAO;EACL;EACA;;EAEA,UAAU,CAAC,GAAG,IAAI;EAClB,UAAU,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI;EAC9B,WAAW,GAAG,IAAI;CACpB;AACF"}
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
/*! Rendra Design System v2.6.0 | MIT | © 2026 Bruno Magalhaes | brunomagalhaes.me */
|
|
2
|
+
import { a as useMotionMode, c as getReducedMotion, l as subscribeReducedMotion } from "./motion-context-BL545cb6.js";
|
|
3
|
+
import { useMemo, useSyncExternalStore } from "react";
|
|
4
|
+
//#region src/lib/motion/tokens.ts
|
|
5
|
+
/**
|
|
6
|
+
* Reserva das durações, em segundos (SSR, ou variável ausente).
|
|
7
|
+
* `press` e `fast` valem o mesmo (120 ms) com propósitos diferentes: o toque e a saída de overlay.
|
|
8
|
+
*/
|
|
9
|
+
var DURATION = {
|
|
10
|
+
press: .12,
|
|
11
|
+
hover: .15,
|
|
12
|
+
fast: .12,
|
|
13
|
+
base: .2,
|
|
14
|
+
move: .25,
|
|
15
|
+
slow: .32,
|
|
16
|
+
draw: .42,
|
|
17
|
+
pulse: 1
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Reveal: entrada de uso único (dashboard: bloco, cascata, contador e desenho do gráfico), mais
|
|
21
|
+
* lenta que as interações do dia a dia. Reserva em segundos (SSR, ou variável ausente).
|
|
22
|
+
*/
|
|
23
|
+
var REVEAL = {
|
|
24
|
+
enter: .6,
|
|
25
|
+
stagger: .12,
|
|
26
|
+
count: 1.2,
|
|
27
|
+
draw: .9
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Curvas do globals.css (`--rendra-ease-*`). `spring` é a curva "back" (quique): só para a cota
|
|
31
|
+
* rara de encanto. `move` desloca na tela; `drawer` é a curva de gaveta e folha.
|
|
32
|
+
*/
|
|
33
|
+
var EASE = {
|
|
34
|
+
out: [
|
|
35
|
+
.22,
|
|
36
|
+
1,
|
|
37
|
+
.36,
|
|
38
|
+
1
|
|
39
|
+
],
|
|
40
|
+
inOut: [
|
|
41
|
+
.65,
|
|
42
|
+
0,
|
|
43
|
+
.35,
|
|
44
|
+
1
|
|
45
|
+
],
|
|
46
|
+
spring: [
|
|
47
|
+
.34,
|
|
48
|
+
1.56,
|
|
49
|
+
.64,
|
|
50
|
+
1
|
|
51
|
+
],
|
|
52
|
+
move: [
|
|
53
|
+
.77,
|
|
54
|
+
0,
|
|
55
|
+
.175,
|
|
56
|
+
1
|
|
57
|
+
],
|
|
58
|
+
drawer: [
|
|
59
|
+
.32,
|
|
60
|
+
.72,
|
|
61
|
+
0,
|
|
62
|
+
1
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
/** Nome da variável CSS de cada curva (`inOut` vira `in-out`). */
|
|
66
|
+
var EASE_VAR = {
|
|
67
|
+
out: "out",
|
|
68
|
+
inOut: "in-out",
|
|
69
|
+
spring: "spring",
|
|
70
|
+
move: "move",
|
|
71
|
+
drawer: "drawer"
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Molas no formato "duração e quique" (Motion). `settle` assenta sem passar do ponto (layout,
|
|
75
|
+
* overlay que entra, soltura do arraste); `sheet` é a folha depois do gesto, com quique mínimo.
|
|
76
|
+
* Mola não é variável CSS: mora aqui, e o app a espelha em `dampingRatio`.
|
|
77
|
+
*/
|
|
78
|
+
var SPRING = {
|
|
79
|
+
settle: {
|
|
80
|
+
duration: .4,
|
|
81
|
+
bounce: 0
|
|
82
|
+
},
|
|
83
|
+
sheet: {
|
|
84
|
+
duration: .3,
|
|
85
|
+
bounce: .2
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
/** Escalas da linguagem: entrada de overlay, tooltip, ponto pequeno, toque, pop e salto curto. */
|
|
89
|
+
var SCALE = {
|
|
90
|
+
enter: .95,
|
|
91
|
+
tooltip: .97,
|
|
92
|
+
small: .9,
|
|
93
|
+
press: .97,
|
|
94
|
+
pop: .8,
|
|
95
|
+
bump: 1.08
|
|
96
|
+
};
|
|
97
|
+
function toSeconds(value) {
|
|
98
|
+
const v = value.trim();
|
|
99
|
+
const n = parseFloat(v);
|
|
100
|
+
if (!Number.isFinite(n)) return null;
|
|
101
|
+
if (v.endsWith("ms")) return n / 1e3;
|
|
102
|
+
if (v.endsWith("s")) return n;
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
/** `cubic-bezier(a, b, c, d)` em vetor; qualquer outra coisa (`ease-in`, vazio) vira `null`. */
|
|
106
|
+
function toBezier(value) {
|
|
107
|
+
const m = /^cubic-bezier\(([^)]+)\)$/.exec(value.trim());
|
|
108
|
+
if (!m) return null;
|
|
109
|
+
const parts = m[1].split(",").map((n) => parseFloat(n));
|
|
110
|
+
if (parts.length !== 4 || parts.some((n) => !Number.isFinite(n))) return null;
|
|
111
|
+
return parts;
|
|
112
|
+
}
|
|
113
|
+
/** Lê as durações e as curvas do documento; o que faltar (ou sem window) vem da reserva. */
|
|
114
|
+
function readMotionTokens() {
|
|
115
|
+
const duration = { ...DURATION };
|
|
116
|
+
const reveal = { ...REVEAL };
|
|
117
|
+
const ease = { ...EASE };
|
|
118
|
+
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
119
|
+
const style = getComputedStyle(document.documentElement);
|
|
120
|
+
for (const name of Object.keys(DURATION)) {
|
|
121
|
+
const read = toSeconds(style.getPropertyValue(`--rendra-duration-${name}`));
|
|
122
|
+
if (read !== null) duration[name] = read;
|
|
123
|
+
}
|
|
124
|
+
for (const name of Object.keys(REVEAL)) {
|
|
125
|
+
const read = toSeconds(style.getPropertyValue(`--rendra-reveal-${name}`));
|
|
126
|
+
if (read !== null) reveal[name] = read;
|
|
127
|
+
}
|
|
128
|
+
for (const name of Object.keys(EASE)) {
|
|
129
|
+
const read = toBezier(style.getPropertyValue(`--rendra-ease-${EASE_VAR[name]}`));
|
|
130
|
+
if (read !== null) ease[name] = read;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
duration,
|
|
135
|
+
reveal,
|
|
136
|
+
ease
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/lib/motion/presets.ts
|
|
141
|
+
var SHORT_PX = 8;
|
|
142
|
+
/** Mola em "duração e quique" para rigidez e amortecimento (massa 1). */
|
|
143
|
+
function springToBounce({ duration, bounce }) {
|
|
144
|
+
const stiffness = (2 * Math.PI / duration) ** 2;
|
|
145
|
+
return {
|
|
146
|
+
bounceStiffness: Math.round(stiffness),
|
|
147
|
+
bounceDamping: Math.round(2 * (1 - bounce) * Math.sqrt(stiffness))
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function createPresets(tokens, reduced) {
|
|
151
|
+
const { duration, reveal, ease } = tokens;
|
|
152
|
+
const base = {
|
|
153
|
+
duration: duration.base,
|
|
154
|
+
ease: ease.out
|
|
155
|
+
};
|
|
156
|
+
const fastOut = {
|
|
157
|
+
duration: duration.fast,
|
|
158
|
+
ease: ease.out
|
|
159
|
+
};
|
|
160
|
+
const settle = {
|
|
161
|
+
type: "spring",
|
|
162
|
+
...SPRING.settle
|
|
163
|
+
};
|
|
164
|
+
const enter = {
|
|
165
|
+
type: "spring",
|
|
166
|
+
duration: duration.base,
|
|
167
|
+
bounce: SPRING.settle.bounce
|
|
168
|
+
};
|
|
169
|
+
/** O que sobra sob "reduzir movimento": só opacidade, em `base`. */
|
|
170
|
+
const flat = () => ({
|
|
171
|
+
initial: { opacity: 0 },
|
|
172
|
+
animate: { opacity: 1 },
|
|
173
|
+
exit: { opacity: 0 },
|
|
174
|
+
transition: base
|
|
175
|
+
});
|
|
176
|
+
const make = (initial, animate, time, curve = ease.out) => reduced ? flat() : {
|
|
177
|
+
initial,
|
|
178
|
+
animate,
|
|
179
|
+
exit: initial,
|
|
180
|
+
transition: {
|
|
181
|
+
duration: time,
|
|
182
|
+
ease: curve
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const offset = (from, distance) => {
|
|
186
|
+
const far = distance === "full" ? "100%" : SHORT_PX;
|
|
187
|
+
const sign = from === "left" || from === "top" ? -1 : 1;
|
|
188
|
+
const value = typeof far === "string" ? `${sign * 100}%` : sign * far;
|
|
189
|
+
return from === "left" || from === "right" ? {
|
|
190
|
+
x: value,
|
|
191
|
+
opacity: 0
|
|
192
|
+
} : {
|
|
193
|
+
y: value,
|
|
194
|
+
opacity: 0
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
const settled = (initial) => ({
|
|
198
|
+
opacity: 1,
|
|
199
|
+
...initial.x !== void 0 ? { x: 0 } : {},
|
|
200
|
+
...initial.y !== void 0 ? { y: 0 } : {}
|
|
201
|
+
});
|
|
202
|
+
const fade = reduced ? flat() : {
|
|
203
|
+
initial: { opacity: 0 },
|
|
204
|
+
animate: { opacity: 1 },
|
|
205
|
+
exit: {
|
|
206
|
+
opacity: 0,
|
|
207
|
+
transition: fastOut
|
|
208
|
+
},
|
|
209
|
+
transition: base
|
|
210
|
+
};
|
|
211
|
+
const open = (from = SCALE.enter) => {
|
|
212
|
+
if (reduced) return flat();
|
|
213
|
+
return {
|
|
214
|
+
initial: typeof from === "number" ? {
|
|
215
|
+
opacity: 0,
|
|
216
|
+
scale: from
|
|
217
|
+
} : {
|
|
218
|
+
opacity: 0,
|
|
219
|
+
y: from.y
|
|
220
|
+
},
|
|
221
|
+
animate: {
|
|
222
|
+
...typeof from === "number" ? {
|
|
223
|
+
opacity: 1,
|
|
224
|
+
scale: 1
|
|
225
|
+
} : {
|
|
226
|
+
opacity: 1,
|
|
227
|
+
y: 0
|
|
228
|
+
},
|
|
229
|
+
transition: enter
|
|
230
|
+
},
|
|
231
|
+
exit: {
|
|
232
|
+
opacity: 0,
|
|
233
|
+
transition: fastOut
|
|
234
|
+
},
|
|
235
|
+
transition: enter
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
const sheet = (from) => {
|
|
239
|
+
if (reduced) return flat();
|
|
240
|
+
const sign = from === "left" || from === "top" ? -1 : 1;
|
|
241
|
+
const axis = from === "left" || from === "right" ? "x" : "y";
|
|
242
|
+
const away = { [axis]: `${sign * 100}%` };
|
|
243
|
+
return {
|
|
244
|
+
initial: away,
|
|
245
|
+
animate: { [axis]: 0 },
|
|
246
|
+
exit: {
|
|
247
|
+
...away,
|
|
248
|
+
transition: {
|
|
249
|
+
duration: duration.fast,
|
|
250
|
+
ease: ease.drawer
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
transition: {
|
|
254
|
+
duration: duration.slow,
|
|
255
|
+
ease: ease.drawer
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
const tooltip = (instant) => {
|
|
260
|
+
if (reduced) return instant ? {
|
|
261
|
+
...flat(),
|
|
262
|
+
transition: { duration: 0 }
|
|
263
|
+
} : flat();
|
|
264
|
+
return {
|
|
265
|
+
initial: {
|
|
266
|
+
opacity: 0,
|
|
267
|
+
scale: SCALE.tooltip
|
|
268
|
+
},
|
|
269
|
+
animate: {
|
|
270
|
+
opacity: 1,
|
|
271
|
+
scale: 1
|
|
272
|
+
},
|
|
273
|
+
exit: {
|
|
274
|
+
opacity: 0,
|
|
275
|
+
transition: fastOut
|
|
276
|
+
},
|
|
277
|
+
transition: instant ? { duration: 0 } : fastOut
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
const blurred = `blur(2px)`;
|
|
281
|
+
const swap = (direction) => {
|
|
282
|
+
if (reduced) return flat();
|
|
283
|
+
return {
|
|
284
|
+
initial: {
|
|
285
|
+
opacity: 0,
|
|
286
|
+
x: direction * SHORT_PX,
|
|
287
|
+
filter: blurred
|
|
288
|
+
},
|
|
289
|
+
animate: {
|
|
290
|
+
opacity: 1,
|
|
291
|
+
x: 0,
|
|
292
|
+
filter: "blur(0px)",
|
|
293
|
+
transition: base
|
|
294
|
+
},
|
|
295
|
+
exit: {
|
|
296
|
+
opacity: 0,
|
|
297
|
+
filter: blurred,
|
|
298
|
+
transition: fastOut
|
|
299
|
+
},
|
|
300
|
+
transition: base
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
const indicatorInitial = {
|
|
304
|
+
opacity: 0,
|
|
305
|
+
scale: SCALE.small
|
|
306
|
+
};
|
|
307
|
+
const press = {
|
|
308
|
+
whileTap: reduced ? void 0 : { scale: SCALE.press },
|
|
309
|
+
transition: {
|
|
310
|
+
duration: duration.press,
|
|
311
|
+
ease: ease.out
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
const move = reduced ? { duration: 0 } : {
|
|
315
|
+
duration: duration.move,
|
|
316
|
+
ease: ease.move
|
|
317
|
+
};
|
|
318
|
+
return {
|
|
319
|
+
reduced,
|
|
320
|
+
press,
|
|
321
|
+
tap: press.whileTap,
|
|
322
|
+
bump: reduced ? void 0 : {
|
|
323
|
+
scale: [SCALE.bump, 1],
|
|
324
|
+
transition: fastOut
|
|
325
|
+
},
|
|
326
|
+
tokens,
|
|
327
|
+
fade,
|
|
328
|
+
scale: open(),
|
|
329
|
+
pop: make({
|
|
330
|
+
opacity: 0,
|
|
331
|
+
scale: SCALE.pop
|
|
332
|
+
}, {
|
|
333
|
+
opacity: 1,
|
|
334
|
+
scale: 1
|
|
335
|
+
}, duration.slow, ease.spring),
|
|
336
|
+
indicator: reduced ? flat() : {
|
|
337
|
+
initial: indicatorInitial,
|
|
338
|
+
animate: {
|
|
339
|
+
opacity: 1,
|
|
340
|
+
scale: 1
|
|
341
|
+
},
|
|
342
|
+
exit: indicatorInitial,
|
|
343
|
+
transition: fastOut
|
|
344
|
+
},
|
|
345
|
+
slide: (from, distance = "full") => {
|
|
346
|
+
const initial = offset(from, distance);
|
|
347
|
+
return make(initial, settled(initial), distance === "full" ? duration.slow : duration.base);
|
|
348
|
+
},
|
|
349
|
+
open,
|
|
350
|
+
sheet,
|
|
351
|
+
tooltip,
|
|
352
|
+
swap,
|
|
353
|
+
reveal: (from) => {
|
|
354
|
+
const initial = offset(from, "short");
|
|
355
|
+
return make(initial, settled(initial), reveal.enter);
|
|
356
|
+
},
|
|
357
|
+
move,
|
|
358
|
+
layout: move,
|
|
359
|
+
settle: reduced ? { duration: 0 } : settle,
|
|
360
|
+
springSheet: reduced ? { duration: 0 } : {
|
|
361
|
+
type: "spring",
|
|
362
|
+
...SPRING.sheet
|
|
363
|
+
},
|
|
364
|
+
sheetBounce: springToBounce(SPRING.sheet),
|
|
365
|
+
stagger: (index, limit = 8) => ({ delay: reduced ? 0 : Math.min(index, limit) * (duration.fast / 2) }),
|
|
366
|
+
staggerReveal: (index, limit = 8) => ({ delay: reduced ? 0 : Math.min(index, limit) * reveal.stagger })
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
/** Curva no formato do recharts: `cubic-bezier(a,b,c,d)`, sem espaços. */
|
|
370
|
+
function toCubicBezier([a, b, c, d]) {
|
|
371
|
+
return `cubic-bezier(${a},${b},${c},${d})`;
|
|
372
|
+
}
|
|
373
|
+
/** Presets com os tokens lidos agora do documento. */
|
|
374
|
+
function presetsFromDocument(reduced) {
|
|
375
|
+
return createPresets(readMotionTokens(), reduced);
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region src/lib/motion/use-motion-presets.ts
|
|
379
|
+
/** Em `off` ninguém lê o documento nem assina o matchMedia: um objeto único e inerte. */
|
|
380
|
+
var OFF_PRESETS = createPresets({
|
|
381
|
+
duration: DURATION,
|
|
382
|
+
reveal: REVEAL,
|
|
383
|
+
ease: EASE
|
|
384
|
+
}, false);
|
|
385
|
+
var noSubscribe = () => () => {};
|
|
386
|
+
var never = () => false;
|
|
387
|
+
/**
|
|
388
|
+
* Presets do motion para o componente. A preferência "reduzir movimento" vem do mesmo
|
|
389
|
+
* `matchMedia` do hook do projeto (`use-reduced-motion.ts`: Spinner, Progress), a fonte única,
|
|
390
|
+
* reativa e testável, sem `MotionConfig reducedMotion` somando por cima. Só em `on` a
|
|
391
|
+
* preferência é assinada e os tokens lidos do documento; em `off` o custo é zero.
|
|
392
|
+
*/
|
|
393
|
+
function useMotionPresets() {
|
|
394
|
+
const on = useMotionMode() === "on";
|
|
395
|
+
const reduced = useSyncExternalStore(on ? subscribeReducedMotion : noSubscribe, on ? getReducedMotion : never, never);
|
|
396
|
+
return useMemo(() => on ? presetsFromDocument(reduced) : OFF_PRESETS, [on, reduced]);
|
|
397
|
+
}
|
|
398
|
+
//#endregion
|
|
399
|
+
export { toCubicBezier as n, useMotionPresets as t };
|
|
400
|
+
|
|
401
|
+
//# sourceMappingURL=use-motion-presets-DCJPBfNJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-motion-presets-DCJPBfNJ.js","names":[],"sources":["../src/lib/motion/tokens.ts","../src/lib/motion/presets.ts","../src/lib/motion/use-motion-presets.ts"],"sourcesContent":["/*\n * Durações e curvas do motion (linguagem única, web e app). A fonte é o globals.css:\n * --rendra-duration-* bloco :root fora de camada (vai para o dist/tokens.css do pacote);\n * --rendra-ease-* no mesmo bloco, então o host as sobrescreve; o @theme guarda os nomes\n * do Tailwind (--ease-out, --ease-move...) como alias delas.\n * As constantes daqui são a reserva em tempo de execução (SSR, variável ausente ou inválida), e\n * tokens.test.ts confere que elas batem com o globals.css. Valores em segundos e vetores de 4\n * números, o formato que o Motion aceita.\n */\n\nexport type Bezier = [number, number, number, number]\n\n/**\n * Reserva das durações, em segundos (SSR, ou variável ausente).\n * `press` e `fast` valem o mesmo (120 ms) com propósitos diferentes: o toque e a saída de overlay.\n */\nexport const DURATION = {\n press: 0.12,\n hover: 0.15,\n fast: 0.12,\n base: 0.2,\n move: 0.25,\n slow: 0.32,\n draw: 0.42,\n pulse: 1,\n}\nexport type DurationName = keyof typeof DURATION\n\n/**\n * Reveal: entrada de uso único (dashboard: bloco, cascata, contador e desenho do gráfico), mais\n * lenta que as interações do dia a dia. Reserva em segundos (SSR, ou variável ausente).\n */\nexport const REVEAL = { enter: 0.6, stagger: 0.12, count: 1.2, draw: 0.9 }\nexport type RevealName = keyof typeof REVEAL\n\n/**\n * Curvas do globals.css (`--rendra-ease-*`). `spring` é a curva \"back\" (quique): só para a cota\n * rara de encanto. `move` desloca na tela; `drawer` é a curva de gaveta e folha.\n */\nexport const EASE: Record<'out' | 'inOut' | 'spring' | 'move' | 'drawer', Bezier> = {\n out: [0.22, 1, 0.36, 1],\n inOut: [0.65, 0, 0.35, 1],\n spring: [0.34, 1.56, 0.64, 1],\n move: [0.77, 0, 0.175, 1],\n drawer: [0.32, 0.72, 0, 1],\n}\nexport type EaseName = keyof typeof EASE\n\n/** Nome da variável CSS de cada curva (`inOut` vira `in-out`). */\nconst EASE_VAR: Record<EaseName, string> = {\n out: 'out',\n inOut: 'in-out',\n spring: 'spring',\n move: 'move',\n drawer: 'drawer',\n}\n\n/**\n * Molas no formato \"duração e quique\" (Motion). `settle` assenta sem passar do ponto (layout,\n * overlay que entra, soltura do arraste); `sheet` é a folha depois do gesto, com quique mínimo.\n * Mola não é variável CSS: mora aqui, e o app a espelha em `dampingRatio`.\n */\nexport const SPRING = {\n settle: { duration: 0.4, bounce: 0 },\n sheet: { duration: 0.3, bounce: 0.2 },\n}\n\n/** Escalas da linguagem: entrada de overlay, tooltip, ponto pequeno, toque, pop e salto curto. */\nexport const SCALE = { enter: 0.95, tooltip: 0.97, small: 0.9, press: 0.97, pop: 0.8, bump: 1.08 }\n\n/** Desfoque (px) que disfarça o cruzamento entre dois estados (troca de passo). Abaixo de 20. */\nexport const BLUR = 2\n\nexport interface MotionTokens {\n duration: Record<DurationName, number>\n reveal: Record<RevealName, number>\n ease: Record<EaseName, Bezier>\n}\n\nfunction toSeconds(value: string): number | null {\n const v = value.trim()\n const n = parseFloat(v)\n if (!Number.isFinite(n)) return null\n if (v.endsWith('ms')) return n / 1000\n if (v.endsWith('s')) return n\n return null\n}\n\n/** `cubic-bezier(a, b, c, d)` em vetor; qualquer outra coisa (`ease-in`, vazio) vira `null`. */\nfunction toBezier(value: string): Bezier | null {\n const m = /^cubic-bezier\\(([^)]+)\\)$/.exec(value.trim())\n if (!m) return null\n const parts = m[1]!.split(',').map((n) => parseFloat(n))\n if (parts.length !== 4 || parts.some((n) => !Number.isFinite(n))) return null\n return parts as Bezier\n}\n\n/** Lê as durações e as curvas do documento; o que faltar (ou sem window) vem da reserva. */\nexport function readMotionTokens(): MotionTokens {\n const duration = { ...DURATION }\n const reveal = { ...REVEAL }\n const ease = { ...EASE }\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n const style = getComputedStyle(document.documentElement)\n for (const name of Object.keys(DURATION) as DurationName[]) {\n const read = toSeconds(style.getPropertyValue(`--rendra-duration-${name}`))\n if (read !== null) duration[name] = read\n }\n for (const name of Object.keys(REVEAL) as RevealName[]) {\n const read = toSeconds(style.getPropertyValue(`--rendra-reveal-${name}`))\n if (read !== null) reveal[name] = read\n }\n for (const name of Object.keys(EASE) as EaseName[]) {\n const read = toBezier(style.getPropertyValue(`--rendra-ease-${EASE_VAR[name]}`))\n if (read !== null) ease[name] = read\n }\n }\n return { duration, reveal, ease }\n}\n","import type { Target, TargetAndTransition, Transition } from 'motion/react'\nimport { BLUR, readMotionTokens, SCALE, SPRING, type Bezier, type MotionTokens } from './tokens'\n\n/*\n * Presets do caminho `on` (linguagem única de movimento): fade, scale/open, sheet, tooltip,\n * indicator, pop, slide, reveal, press, move, settle e stagger. Toda duração e toda curva vêm de\n * readMotionTokens (globals.css); nenhum número de duração mora neste arquivo (o presets.test.ts\n * varre o código-fonte atrás de literal). As molas e as escalas vêm de tokens.ts.\n *\n * Duas regras moram aqui:\n * - Assimetria: o que o usuário decidiu (abrir) entra no tempo `base`, e o que o sistema\n * responde ao fechar sai em `fast`, só em opacidade. Gaveta e folha saem em `base`, de volta\n * pelo lado de onde vieram.\n * - Reduzido: sem deslocamento, escala, filtro nem cascata; a opacidade usa `base` (não zero),\n * porque o esmaecimento é o que explica a mudança de estado.\n */\n\nexport interface MotionPreset {\n initial: Target\n animate: TargetAndTransition\n exit: TargetAndTransition\n transition: Transition\n}\n\n/** Toque: o alvo do `whileTap` (`undefined` no reduzido) e a transição de ida e de volta. */\nexport interface PressPreset {\n whileTap: TargetAndTransition | undefined\n transition: Transition\n}\n\nexport type SlideFrom = 'left' | 'right' | 'top' | 'bottom'\n\n/** Distância do slide: `full` (painel que entra da borda) ou `short` (conteúdo que assenta). */\nexport type SlideDistance = 'full' | 'short'\n\nconst SHORT_PX = 8\n\nexport interface Presets {\n reduced: boolean\n /** Toque do botão, do polegar e dos controles: 120 ms, `ease.out`, escala 0,97. */\n press: PressPreset\n /** Alias de `press.whileTap`, o nome antigo. Sem movimento reduzido vem `undefined`. */\n tap: TargetAndTransition | undefined\n /**\n * Salto curto de escala (célula do OTP), com a transição dentro do alvo. Estável entre\n * renders; `undefined` se reduzido.\n */\n bump: TargetAndTransition | undefined\n tokens: MotionTokens\n fade: MotionPreset\n /** Alias de `open()`: escala 0,95 com mola a partir da origem, saída rápida só em opacidade. */\n scale: MotionPreset\n /**\n * Cota rara de encanto (check do passo concluído): 0,8 -> 1 com a curva back, em `slow`. Nunca\n * em controle de uso frequente.\n */\n pop: MotionPreset\n /**\n * Indicador de controle frequente (check do Checkbox, ponto do Radio): 0,9 -> 1 com opacidade\n * em `fast`, sem quique e sem partir de zero.\n */\n indicator: MotionPreset\n slide: (from: SlideFrom, distance?: SlideDistance) => MotionPreset\n /**\n * Overlay ancorado (popover, menu, modal, painel do select). Número = escala de partida\n * (padrão 0,95); `{ y }` = entrada plana, sem escala, para a superfície em tela cheia.\n * Entra em mola criticamente amortecida (sem quique) em `base` e sai em `fast`, em opacidade.\n */\n open: (from?: number | { y: number }) => MotionPreset\n /** Gaveta e folha: entram de `from` em `slow` com `ease.drawer`, saem em `fast` pelo mesmo lado. */\n sheet: (from: SlideFrom) => MotionPreset\n /** Tooltip: escala 0,97 em `fast`; aberto em `instant-open` não anima. */\n tooltip: (instant: boolean) => MotionPreset\n /**\n * Troca de conteúdo no lugar (passo do wizard), sem esperar a saída: o que sai esmaece com\n * `blur` de 2 px em `fast`; o que entra vem de `direction` (1 avança, -1 volta), 8 px, em\n * `base`. O desfoque disfarça o cruzamento: sem ele o olho vê dois objetos trocando de lugar.\n */\n swap: (direction: 1 | -1) => MotionPreset\n /**\n * Entrada de uso único (reveal do dashboard): desloca 8 px e dura `reveal.enter`, mais lenta\n * que `slide`. Não serve a interação repetida (overlay, tab, botão).\n */\n reveal: (from: SlideFrom) => MotionPreset\n /** Deslocamento na tela (indicador, reordenação): `move` em `ease.move`. */\n move: Transition\n /** Nome antigo de `move`. */\n layout: Transition\n /** Mola sem quique: onde há gesto ou soltura (drop do kanban, folha que volta). */\n settle: Transition\n /** Mola da folha depois do arraste (quique mínimo). */\n springSheet: Transition\n /**\n * A mesma mola da folha em rigidez e amortecimento (massa 1), que é o que o arraste do Motion\n * (`dragTransition`) pede para a volta à origem: rigidez = (2π / duração)², amortecimento =\n * 2 (1 - quique) raiz(rigidez).\n */\n sheetBounce: { bounceStiffness: number; bounceDamping: number }\n /** Atraso de entrada do item `index`, limitado a `limit` itens (padrão 8: 480 ms). */\n stagger: (index: number, limit?: number) => Transition\n /** Atraso do bloco `index` no reveal (passo `reveal.stagger`), limitado a `limit` blocos. */\n staggerReveal: (index: number, limit?: number) => Transition\n}\n\n/** Mola em \"duração e quique\" para rigidez e amortecimento (massa 1). */\nfunction springToBounce({ duration, bounce }: { duration: number; bounce: number }) {\n const stiffness = ((2 * Math.PI) / duration) ** 2\n return {\n bounceStiffness: Math.round(stiffness),\n bounceDamping: Math.round(2 * (1 - bounce) * Math.sqrt(stiffness)),\n }\n}\n\nexport function createPresets(tokens: MotionTokens, reduced: boolean): Presets {\n const { duration, reveal, ease } = tokens\n const base: Transition = { duration: duration.base, ease: ease.out }\n const fastOut: Transition = { duration: duration.fast, ease: ease.out }\n const settle: Transition = { type: 'spring', ...SPRING.settle }\n const enter: Transition = {\n type: 'spring',\n duration: duration.base,\n bounce: SPRING.settle.bounce,\n }\n\n /** O que sobra sob \"reduzir movimento\": só opacidade, em `base`. */\n const flat = (): MotionPreset => ({\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n transition: base,\n })\n const make = (initial: Target, animate: Target, time: number, curve = ease.out): MotionPreset =>\n reduced\n ? flat()\n : {\n initial,\n animate,\n exit: initial,\n transition: { duration: time, ease: curve },\n }\n\n const offset = (from: SlideFrom, distance: SlideDistance): Target => {\n const far = distance === 'full' ? '100%' : SHORT_PX\n const sign = from === 'left' || from === 'top' ? -1 : 1\n const value = typeof far === 'string' ? `${sign * 100}%` : sign * far\n return from === 'left' || from === 'right' ? { x: value, opacity: 0 } : { y: value, opacity: 0 }\n }\n const settled = (initial: Target): Target => ({\n opacity: 1,\n ...(initial.x !== undefined ? { x: 0 } : {}),\n ...(initial.y !== undefined ? { y: 0 } : {}),\n })\n\n const fade: MotionPreset = reduced\n ? flat()\n : {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0, transition: fastOut },\n transition: base,\n }\n\n const open = (from: number | { y: number } = SCALE.enter): MotionPreset => {\n if (reduced) return flat()\n const initial: Target =\n typeof from === 'number' ? { opacity: 0, scale: from } : { opacity: 0, y: from.y }\n const to: Target = typeof from === 'number' ? { opacity: 1, scale: 1 } : { opacity: 1, y: 0 }\n return {\n initial,\n animate: { ...to, transition: enter },\n exit: { opacity: 0, transition: fastOut },\n transition: enter,\n }\n }\n\n const sheet = (from: SlideFrom): MotionPreset => {\n if (reduced) return flat()\n const sign = from === 'left' || from === 'top' ? -1 : 1\n const axis = from === 'left' || from === 'right' ? 'x' : 'y'\n const away = { [axis]: `${sign * 100}%` }\n return {\n initial: away,\n animate: { [axis]: 0 },\n exit: { ...away, transition: { duration: duration.fast, ease: ease.drawer } },\n transition: { duration: duration.slow, ease: ease.drawer },\n }\n }\n\n const tooltip = (instant: boolean): MotionPreset => {\n if (reduced) return instant ? { ...flat(), transition: { duration: 0 } } : flat()\n return {\n initial: { opacity: 0, scale: SCALE.tooltip },\n animate: { opacity: 1, scale: 1 },\n exit: { opacity: 0, transition: fastOut },\n transition: instant ? { duration: 0 } : fastOut,\n }\n }\n\n const blurred = `blur(${BLUR}px)`\n const swap = (direction: 1 | -1): MotionPreset => {\n if (reduced) return flat()\n return {\n initial: { opacity: 0, x: direction * SHORT_PX, filter: blurred },\n animate: { opacity: 1, x: 0, filter: 'blur(0px)', transition: base },\n exit: { opacity: 0, filter: blurred, transition: fastOut },\n transition: base,\n }\n }\n\n const indicatorInitial: Target = { opacity: 0, scale: SCALE.small }\n const press: PressPreset = {\n whileTap: reduced ? undefined : { scale: SCALE.press },\n transition: { duration: duration.press, ease: ease.out },\n }\n const move: Transition = reduced ? { duration: 0 } : { duration: duration.move, ease: ease.move }\n\n return {\n reduced,\n press,\n tap: press.whileTap,\n bump: reduced ? undefined : { scale: [SCALE.bump, 1], transition: fastOut },\n tokens,\n fade,\n scale: open(),\n pop: make(\n { opacity: 0, scale: SCALE.pop },\n { opacity: 1, scale: 1 },\n duration.slow,\n ease.spring,\n ),\n indicator: reduced\n ? flat()\n : {\n initial: indicatorInitial,\n animate: { opacity: 1, scale: 1 },\n exit: indicatorInitial,\n transition: fastOut,\n },\n slide: (from, distance = 'full') => {\n const initial = offset(from, distance)\n return make(initial, settled(initial), distance === 'full' ? duration.slow : duration.base)\n },\n open,\n sheet,\n tooltip,\n swap,\n reveal: (from) => {\n const initial = offset(from, 'short')\n return make(initial, settled(initial), reveal.enter)\n },\n move,\n layout: move,\n settle: reduced ? { duration: 0 } : settle,\n springSheet: reduced ? { duration: 0 } : { type: 'spring', ...SPRING.sheet },\n sheetBounce: springToBounce(SPRING.sheet),\n stagger: (index, limit = 8) => ({\n delay: reduced ? 0 : Math.min(index, limit) * (duration.fast / 2),\n }),\n staggerReveal: (index, limit = 8) => ({\n delay: reduced ? 0 : Math.min(index, limit) * reveal.stagger,\n }),\n }\n}\n\n/** Curva no formato do recharts: `cubic-bezier(a,b,c,d)`, sem espaços. */\nexport function toCubicBezier([\n a,\n b,\n c,\n d,\n]: Bezier): `cubic-bezier(${number},${number},${number},${number})` {\n return `cubic-bezier(${a},${b},${c},${d})`\n}\n\n/** Presets com os tokens lidos agora do documento. */\nexport function presetsFromDocument(reduced: boolean): Presets {\n return createPresets(readMotionTokens(), reduced)\n}\n","import { useMemo, useSyncExternalStore } from 'react'\nimport { getReducedMotion, subscribeReducedMotion } from '@/hooks/use-reduced-motion'\nimport { useMotionMode } from './motion-context'\nimport { createPresets, presetsFromDocument, type Presets } from './presets'\nimport { DURATION, EASE, REVEAL } from './tokens'\n\n/** Em `off` ninguém lê o documento nem assina o matchMedia: um objeto único e inerte. */\nconst OFF_PRESETS = createPresets({ duration: DURATION, reveal: REVEAL, ease: EASE }, false)\nconst noSubscribe = () => () => {}\nconst never = () => false\n\n/**\n * Presets do motion para o componente. A preferência \"reduzir movimento\" vem do mesmo\n * `matchMedia` do hook do projeto (`use-reduced-motion.ts`: Spinner, Progress), a fonte única,\n * reativa e testável, sem `MotionConfig reducedMotion` somando por cima. Só em `on` a\n * preferência é assinada e os tokens lidos do documento; em `off` o custo é zero.\n */\nexport function useMotionPresets(): Presets {\n const on = useMotionMode() === 'on'\n const reduced = useSyncExternalStore(\n on ? subscribeReducedMotion : noSubscribe,\n on ? getReducedMotion : never,\n never,\n )\n return useMemo(() => (on ? presetsFromDocument(reduced) : OFF_PRESETS), [on, reduced])\n}\n"],"mappings":";;;;;;;;AAgBA,IAAa,WAAW;CACtB,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,OAAO;AACT;;;;;AAOA,IAAa,SAAS;CAAE,OAAO;CAAK,SAAS;CAAM,OAAO;CAAK,MAAM;AAAI;;;;;AAOzE,IAAa,OAAuE;CAClF,KAAK;EAAC;EAAM;EAAG;EAAM;CAAC;CACtB,OAAO;EAAC;EAAM;EAAG;EAAM;CAAC;CACxB,QAAQ;EAAC;EAAM;EAAM;EAAM;CAAC;CAC5B,MAAM;EAAC;EAAM;EAAG;EAAO;CAAC;CACxB,QAAQ;EAAC;EAAM;EAAM;EAAG;CAAC;AAC3B;;AAIA,IAAM,WAAqC;CACzC,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CACN,QAAQ;AACV;;;;;;AAOA,IAAa,SAAS;CACpB,QAAQ;EAAE,UAAU;EAAK,QAAQ;CAAE;CACnC,OAAO;EAAE,UAAU;EAAK,QAAQ;CAAI;AACtC;;AAGA,IAAa,QAAQ;CAAE,OAAO;CAAM,SAAS;CAAM,OAAO;CAAK,OAAO;CAAM,KAAK;CAAK,MAAM;AAAK;AAWjG,SAAS,UAAU,OAA8B;CAC/C,MAAM,IAAI,MAAM,KAAK;CACrB,MAAM,IAAI,WAAW,CAAC;CACtB,IAAI,CAAC,OAAO,SAAS,CAAC,GAAG,OAAO;CAChC,IAAI,EAAE,SAAS,IAAI,GAAG,OA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,QAAQ;EACR,QAAQ,UAAU,EAAE,UAAU,EAAE,IAAI;EACpC,aAAa,UAAU,EAAE,UAAU,EAAE,IAAI;GAAE,MAAM;GAAU,GAAG,OAAO;EAAM;EAC3E,aAAa,eAAe,OAAO,KAAK;EACxC,UAAU,OAAO,QAAQ,OAAO,EAC9B,OAAO,UAAU,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,SAAS,OAAO,GACjE;EACA,gBAAgB,OAAO,QAAQ,OAAO,EACpC,OAAO,UAAU,IAAI,KAAK,IAAI,OAAO,KAAK,IAAI,OAAO,QACvD;CACF;AACF;;AAGA,SAAgB,cAAc,CAC5B,GACA,GACA,GACA,IACkE;CAClE,OAAO,gBAAgB,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAC1C;;AAGA,SAAgB,oBAAoB,SAA2B;CAC7D,OAAO,cAAc,iBAAiB,GAAG,OAAO;AAClD;;;;AC9QA,IAAM,cAAc,cAAc;CAAE,UAAU;CAAU,QAAQ;CAAQ,MAAM;AAAK,GAAG,KAAK;AAC3F,IAAM,0BAA0B,CAAC;AACjC,IAAM,cAAc;;;;;;;AAQpB,SAAgB,mBAA4B;CAC1C,MAAM,KAAK,cAAc,MAAM;CAC/B,MAAM,UAAU,qBACd,KAAK,yBAAyB,aAC9B,KAAK,mBAAmB,OACxB,KACF;CACA,OAAO,cAAe,KAAK,oBAAoB,OAAO,IAAI,aAAc,CAAC,IAAI,OAAO,CAAC;AACvF"}
|
package/dist/widget-grid.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! Rendra Design System v2.
|
|
2
|
-
import { t as cn } from "./cn-
|
|
1
|
+
/*! Rendra Design System v2.6.0 | MIT | © 2026 Bruno Magalhaes | brunomagalhaes.me */
|
|
2
|
+
import { t as cn } from "./cn-TBlI6-gS.js";
|
|
3
3
|
import { GripVertical } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { useMemo, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { ResponsiveGridLayout, useContainerWidth } from "react-grid-layout";
|
|
7
7
|
import "react-grid-layout/css/styles.css";
|
|
8
8
|
//#region src/components/ui/widget-grid.tsx
|