motion-presets-kit 0.1.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/LICENSE +21 -0
- package/README.md +174 -0
- package/bin/cli.mjs +115 -0
- package/bin/skill.mjs +94 -0
- package/dist/chunk-GU3ZCMLK.js +537 -0
- package/dist/chunk-GU3ZCMLK.js.map +1 -0
- package/dist/chunk-ONXBTJWT.js +167 -0
- package/dist/chunk-ONXBTJWT.js.map +1 -0
- package/dist/chunk-PFZKSPJW.js +164 -0
- package/dist/chunk-PFZKSPJW.js.map +1 -0
- package/dist/components.cjs +719 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.d.cts +199 -0
- package/dist/components.d.ts +199 -0
- package/dist/components.js +4 -0
- package/dist/components.js.map +1 -0
- package/dist/index-DtNOkqyg.d.cts +112 -0
- package/dist/index-DtNOkqyg.d.ts +112 -0
- package/dist/index.cjs +890 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/presets.cjs +334 -0
- package/dist/presets.cjs.map +1 -0
- package/dist/presets.d.cts +3 -0
- package/dist/presets.d.ts +3 -0
- package/dist/presets.js +4 -0
- package/dist/presets.js.map +1 -0
- package/package.json +117 -0
- package/scripts/postinstall.mjs +75 -0
- package/skill/motion-presets-kit/SKILL.md +221 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/counter.ts","../src/schemas/draggable.ts","../src/schemas/marquee.ts","../src/schemas/text-animate.ts","../src/components/counter-utils.ts","../src/utils/warn.ts","../src/components/draggable-utils.ts","../src/components/Draggable.tsx","../src/utils/reduced-motion.ts","../src/components/hooks/useCounter.ts","../src/components/marquee-utils.ts","../src/components/Marquee.tsx","../src/utils/easing.ts","../src/schemas/base.ts","../src/schemas/fade.ts","../src/presets/fade.ts","../src/schemas/parent-variants.ts","../src/presets/parent-variants.ts","../src/components/text-animate-utils.ts","../src/components/TextAnimate.tsx"],"names":["z","useRef","useEffect","jsx","motion","useMemo","useMotionValue","useState","useCallback","useMotionValueEvent","animate","memo","Marquee","useId","jsxs","Fragment","stagger"],"mappings":";;;;;;;;AAEO,IAAM,oBAAA,GAAuBA,MAAE,MAAA,CAAO;AAAA,EAC5C,IAAA,EAAMA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,CAAC,CAAA;AAAA,EAC1B,EAAA,EAAIA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,GAAG,CAAA;AAAA,EAC1B,QAAA,EAAUA,KAAA,CAAE,MAAA,EAAO,CAAE,GAAA,GAAM,GAAA,CAAI,CAAC,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA;AAAA,EAC3C,MAAA,EAAQA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,EAAE,CAAA;AAAA,EAC7B,MAAA,EAAQA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,EAAE,CAAA;AAAA,EAC7B,SAAA,EAAWA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,GAAG,CAAA;AAAA,EACjC,QAAQA,KAAA,CACN,MAAA;AAAA,IACA,CAAC,KAAA,KACA,OAAO,KAAA,KAAU;AAAA,IAElB,QAAA,EAAS;AAAA,EACX,QAAA,EAAUA,KAAA,CAAE,MAAA,EAAO,CAAE,QAAQ,CAAC,CAAA;AAAA,EAC9B,aAAA,EAAeA,KAAA,CAAE,OAAA,EAAQ,CAAE,QAAQ,IAAI;AACxC,CAAC;ACfM,IAAM,qBAAA,GAAwBA,MAAE,MAAA,CAAO;AAAA,EAC7C,GAAA,EAAKA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACzB,KAAA,EAAOA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EAC3B,MAAA,EAAQA,KAAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AA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K,SAAW,IAAA;AAAK,WAAA;AAAA,UANxC;AAAA,SAON;AAAA,MAEF,CAAC;AAAA;AAAA,GACF;AAEF","file":"components.cjs","sourcesContent":["import { z } from \"zod\";\n\nexport const counterOptionsSchema = z.object({\n\tfrom: z.number().default(0),\n\tto: z.number().default(100),\n\tdecimals: z.number().int().min(0).default(0),\n\tprefix: z.string().default(\"\"),\n\tsuffix: z.string().default(\"\"),\n\tseparator: z.string().default(\",\"),\n\tformat: z\n\t\t.custom<(value: number) => string>(\n\t\t\t(value): value is (value: number) => string =>\n\t\t\t\ttypeof value === \"function\",\n\t\t)\n\t\t.optional(),\n\tduration: z.number().default(1),\n\treducedMotion: z.boolean().default(true),\n});\n\nexport type CounterOptions = z.input<typeof counterOptionsSchema>;\nexport type ResolvedCounterOptions = z.output<typeof counterOptionsSchema>;\n","import { z } from \"zod\";\n\nexport const dragConstraintsSchema = z.object({\n\ttop: z.number().optional(),\n\tright: z.number().optional(),\n\tbottom: z.number().optional(),\n\tleft: z.number().optional(),\n});\n\nexport const draggableOptionsSchema = z.object({\n\taxis: z.enum([\"x\", \"y\", \"both\"]).default(\"both\"),\n\tbounds: z\n\t\t.union([z.literal(\"parent\"), z.literal(\"document\"), dragConstraintsSchema])\n\t\t.optional(),\n\tsnapToGrid: z.tuple([z.number(), z.number()]).optional(),\n\tdragElastic: z.union([z.number(), z.boolean()]).optional(),\n\tdragMomentum: z.boolean().optional(),\n});\n\nexport type DraggableOptions = z.input<typeof draggableOptionsSchema>;\nexport type ResolvedDraggableOptions = z.output<typeof draggableOptionsSchema>;\nexport type DragConstraints = z.infer<typeof dragConstraintsSchema>;\n","import { z } from \"zod\";\n\nexport const marqueeOptionsSchema = z.object({\n\tspeed: z.number().positive().default(20),\n\tdirection: z.enum([\"left\", \"right\"]).default(\"left\"),\n\tpauseOnHover: z.boolean().default(true),\n\tgap: z.string().default(\"2rem\"),\n\treducedMotion: z.boolean().default(true),\n});\n\nexport type MarqueeOptions = z.input<typeof marqueeOptionsSchema>;\nexport type ResolvedMarqueeOptions = z.output<typeof marqueeOptionsSchema>;\n","import { z } from \"zod\";\n\nexport const textAnimateOptionsSchema = z.object({\n\tby: z.enum([\"word\", \"letter\"]).default(\"word\"),\n\ttype: z\n\t\t.enum([\n\t\t\t\"blurIn\",\n\t\t\t\"slideUp\",\n\t\t\t\"slideDown\",\n\t\t\t\"slideLeft\",\n\t\t\t\"slideRight\",\n\t\t\t\"typeWriter\",\n\t\t])\n\t\t.default(\"slideUp\"),\n\tduration: z.number().default(0.4),\n\tstartDelay: z.number().default(0),\n\thighlight: z.array(z.string()).default([]),\n\thighlightClassName: z.string().default(\"\"),\n\treducedMotion: z.boolean().default(true),\n});\n\nexport type TextAnimateOptions = z.input<typeof textAnimateOptionsSchema>;\nexport type ResolvedTextAnimateOptions = z.output<\n\ttypeof textAnimateOptionsSchema\n>;\n","import type { CounterOptions } from \"../schemas/counter\";\n\n/** Formatea un número con decimales, separador de miles, prefijo/sufijo y `format` custom (CL-005). */\nexport function formatCounterValue(\n\tvalue: number,\n\toptions: CounterOptions = {},\n): string {\n\tconst {\n\t\tdecimals = 0,\n\t\tprefix = \"\",\n\t\tsuffix = \"\",\n\t\tseparator = \",\",\n\t\tformat,\n\t} = options;\n\n\tif (format) return `${prefix}${format(value)}${suffix}`;\n\n\tconst fixed = Math.abs(value).toFixed(decimals);\n\tconst [integer = \"\", fraction] = fixed.split(\".\");\n\tconst requestGrouped = separator !== \"\" && separator !== \"none\";\n\tconst grouped = requestGrouped\n\t\t? integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, separator)\n\t\t: integer;\n\tconst sign = value < 0 ? \"-\" : \"\";\n\tconst decimalPart = fraction ? `.${fraction}` : \"\";\n\n\treturn `${prefix}${sign}${grouped}${decimalPart}${suffix}`;\n}\n","const PREFIX = \"[motion-presets-kit]\";\n\nfunction isProduction(): boolean {\n\treturn (\n\t\ttypeof process !== \"undefined\" &&\n\t\t!!process.env &&\n\t\tprocess.env.NODE_ENV === \"production\"\n\t);\n}\n\n/** Aviso de desarrollo con prefijo de la librería (se silencia en producción). */\nexport function warn(message: string): void {\n\tif (isProduction()) return;\n\tif (typeof console !== \"undefined\" && typeof console.warn === \"function\") {\n\t\tconsole.warn(`${PREFIX} ${message}`);\n\t}\n}\n","import type { RefObject } from \"react\";\nimport type { DragConstraints } from \"../schemas/draggable\";\n\n/** `true` si los límites tienen `top > bottom` o `left > right` (CL-007). */\nexport function hasInvalidBounds(bounds: DragConstraints): boolean {\n\tif (\n\t\tbounds.top !== undefined &&\n\t\tbounds.bottom !== undefined &&\n\t\tbounds.top > bounds.bottom\n\t) {\n\t\treturn true;\n\t}\n\tif (\n\t\tbounds.left !== undefined &&\n\t\tbounds.right !== undefined &&\n\t\tbounds.left > bounds.right\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport type ResolvedDragBounds = \"parent\" | \"document\" | DragConstraints | null;\n\n/** Normaliza `bounds` a un valor usable por motion, descartando límites inválidos (CL-007). */\nexport function resolveDragConstraints(\n\tbounds: \"parent\" | \"document\" | DragConstraints | undefined,\n): ResolvedDragBounds {\n\tif (bounds === undefined) return null;\n\tif (bounds === \"parent\" || bounds === \"document\") return bounds;\n\treturn hasInvalidBounds(bounds) ? null : bounds;\n}\n\n/**\n * Traduce `bounds` al prop `dragConstraints` de motion.\n * `\"parent\"`/`\"document\"` no son strings válidos en motion: se resuelven a un\n * ref al elemento contenedor (`containerRef`) que motion mide al iniciar el drag.\n */\nexport function getDragConstraintsProp(\n\tresolved: ResolvedDragBounds,\n\tcontainerRef: RefObject<Element | null>,\n): Partial<DragConstraints> | { current: Element | null } | undefined {\n\tif (resolved === \"parent\" || resolved === \"document\") return containerRef;\n\treturn resolved ?? undefined;\n}\n\n/** Construye el `modifyTarget` de `dragTransition` que ajusta el destino a la grilla. */\nexport function buildSnapModifier(\n\tsnapToGrid: [number, number] | undefined,\n): ((value: number) => number) | undefined {\n\tif (!snapToGrid) return undefined;\n\tconst [gridX, gridY] = snapToGrid;\n\tconst grid = gridX === 0 ? gridY : gridY === 0 ? gridX : gridX;\n\tif (grid === 0) return undefined;\n\treturn (value: number) => Math.round(value / grid) * grid;\n}\n","import { motion, type PanInfo } from \"motion/react\";\nimport { type ReactElement, type ReactNode, useEffect, useRef } from \"react\";\nimport {\n\ttype DragConstraints,\n\tdraggableOptionsSchema,\n} from \"../schemas/draggable\";\nimport { warn } from \"../utils/warn\";\nimport {\n\tbuildSnapModifier,\n\tgetDragConstraintsProp,\n\thasInvalidBounds,\n\tresolveDragConstraints,\n} from \"./draggable-utils\";\n\nexport interface DraggableProps {\n\tchildren?: ReactNode;\n\taxis?: \"x\" | \"y\" | \"both\";\n\tbounds?: \"parent\" | \"document\" | DragConstraints;\n\tsnapToGrid?: [number, number];\n\tdragElastic?: number | boolean;\n\tdragMomentum?: boolean;\n\tdragControls?: unknown;\n\tonDragStart?: (event: unknown, info: PanInfo) => void;\n\tonDrag?: (event: unknown, info: PanInfo) => void;\n\tonDragEnd?: (event: unknown, info: PanInfo) => void;\n\tclassName?: string;\n}\n\n/**\n * Wrapper de `motion.div` con drag configurable por eje, límites, snap y callbacks.\n * `bounds` inválidos se descartan con un `warn()` (CL-007).\n */\nexport function Draggable({\n\tchildren,\n\taxis = \"both\",\n\tbounds,\n\tsnapToGrid,\n\tdragElastic,\n\tdragMomentum,\n\tdragControls,\n\tonDragStart,\n\tonDrag,\n\tonDragEnd,\n\tclassName,\n}: DraggableProps): ReactElement {\n\tconst parsed = draggableOptionsSchema.safeParse({\n\t\taxis,\n\t\tbounds,\n\t\tsnapToGrid,\n\t\tdragElastic,\n\t\tdragMomentum,\n\t});\n\tif (!parsed.success) {\n\t\twarn(`Opciones inválidas en Draggable: ${parsed.error.message}`);\n\t}\n\n\tconst data = parsed.success ? parsed.data : draggableOptionsSchema.parse({});\n\n\tif (\n\t\ttypeof data.bounds === \"object\" &&\n\t\tdata.bounds !== null &&\n\t\thasInvalidBounds(data.bounds)\n\t) {\n\t\twarn(\n\t\t\t\"bounds inválidos en Draggable (top > bottom o left > right). Se ignoran los límites (CL-007).\",\n\t\t);\n\t}\n\n\tconst resolved = resolveDragConstraints(data.bounds);\n\tconst containerMode =\n\t\tresolved === \"parent\" || resolved === \"document\" ? resolved : null;\n\n\tconst elementRef = useRef<HTMLDivElement>(null);\n\tconst containerRef = useRef<Element | null>(null);\n\n\tuseEffect(() => {\n\t\tconst element = elementRef.current;\n\t\tif (!element || containerMode === null) return;\n\t\tcontainerRef.current =\n\t\t\tcontainerMode === \"parent\"\n\t\t\t\t? element.parentElement\n\t\t\t\t: (element.ownerDocument?.documentElement ?? null);\n\t}, [containerMode]);\n\n\tconst drag = data.axis === \"both\" ? true : (data.axis as \"x\" | \"y\");\n\tconst dragConstraints = getDragConstraintsProp(resolved, containerRef);\n\tconst modifyTarget = buildSnapModifier(data.snapToGrid);\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={elementRef}\n\t\t\tdrag={drag}\n\t\t\tdragConstraints={dragConstraints}\n\t\t\tdragElastic={data.dragElastic}\n\t\t\tdragMomentum={data.dragMomentum}\n\t\t\tdragTransition={modifyTarget ? { modifyTarget } : undefined}\n\t\t\tdragControls={dragControls as never}\n\t\t\tonDragStart={onDragStart}\n\t\t\tonDrag={onDrag}\n\t\t\tonDragEnd={onDragEnd}\n\t\t\tclassName={className}\n\t\t>\n\t\t\t{children}\n\t\t</motion.div>\n\t);\n}\n","/**\n * `true` cuando el usuario prefiere movimiento reducido y la opción está activa.\n * Devuelve `false` en entornos sin `window.matchMedia` (SSR, Node).\n */\nexport function shouldReduceMotion(reducedMotion = true): boolean {\n\tif (!reducedMotion) return false;\n\tif (\n\t\ttypeof window === \"undefined\" ||\n\t\ttypeof window.matchMedia !== \"function\"\n\t) {\n\t\treturn false;\n\t}\n\treturn window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n}\n","import { animate, useMotionValue, useMotionValueEvent } from \"motion/react\";\nimport {\n\ttype RefObject,\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseState,\n} from \"react\";\nimport {\n\ttype CounterOptions,\n\tcounterOptionsSchema,\n} from \"../../schemas/counter\";\nimport { shouldReduceMotion } from \"../../utils/reduced-motion\";\nimport { warn } from \"../../utils/warn\";\nimport { formatCounterValue } from \"../counter-utils\";\n\nexport interface UseCounterResult {\n\tvalue: number;\n\tstart: () => void;\n\treset: () => void;\n}\n\n/**\n * Contador animado que escribe el valor formateado en `ref.current.textContent`\n * y expone el valor actual de forma reactiva.\n * Con `reducedMotion` activo muestra el valor final directamente (RF-095).\n */\nexport function useCounter(\n\tref: RefObject<HTMLElement | null>,\n\toptions: CounterOptions = {},\n): UseCounterResult {\n\tconst parsed = counterOptionsSchema.safeParse(options);\n\tif (!parsed.success) {\n\t\twarn(`Opciones inválidas en useCounter: ${parsed.error.message}`);\n\t}\n\tconst config = parsed.success ? parsed.data : counterOptionsSchema.parse({});\n\tconst { from, to, duration, reducedMotion } = config;\n\n\tconst formatOptions = useMemo(\n\t\t() => ({\n\t\t\tdecimals: config.decimals,\n\t\t\tprefix: config.prefix,\n\t\t\tsuffix: config.suffix,\n\t\t\tseparator: config.separator,\n\t\t\tformat: config.format,\n\t\t}),\n\t\t[\n\t\t\tconfig.decimals,\n\t\t\tconfig.prefix,\n\t\t\tconfig.suffix,\n\t\t\tconfig.separator,\n\t\t\tconfig.format,\n\t\t],\n\t);\n\n\tconst motionValue = useMotionValue(from);\n\tconst [value, setValue] = useState(from);\n\n\tconst writeValue = useCallback(\n\t\t(next: number) => {\n\t\t\tconst element = ref.current;\n\t\t\tif (element) {\n\t\t\t\telement.textContent = formatCounterValue(next, formatOptions);\n\t\t\t}\n\t\t},\n\t\t[ref, formatOptions],\n\t);\n\n\tuseMotionValueEvent(motionValue, \"change\", (latest) => {\n\t\tsetValue(latest);\n\t\twriteValue(latest);\n\t});\n\n\tuseEffect(() => {\n\t\tif (shouldReduceMotion(reducedMotion)) {\n\t\t\tmotionValue.set(to);\n\t\t\tsetValue(to);\n\t\t\twriteValue(to);\n\t\t}\n\t}, [motionValue, to, reducedMotion, writeValue]);\n\n\tconst start = useCallback(() => {\n\t\tif (shouldReduceMotion(reducedMotion)) {\n\t\t\tmotionValue.set(to);\n\t\t\tsetValue(to);\n\t\t\twriteValue(to);\n\t\t\treturn;\n\t\t}\n\t\tmotionValue.set(from);\n\t\tsetValue(from);\n\t\tanimate(motionValue, to, {\n\t\t\tduration,\n\t\t\tease: [0.16, 1, 0.3, 1],\n\t\t});\n\t}, [motionValue, from, to, duration, reducedMotion, writeValue]);\n\n\tconst reset = useCallback(() => {\n\t\tmotionValue.set(from);\n\t\tsetValue(from);\n\t\twriteValue(from);\n\t}, [motionValue, from, writeValue]);\n\n\treturn { value, start, reset };\n}\n","export interface MarqueeKeyframesOptions {\n\tid: string;\n\tdirection: \"left\" | \"right\";\n\tgap: string;\n\tspeed: number;\n\tpauseOnHover: boolean;\n}\n\nexport interface MarqueeKeyframes {\n\tanimationName: string;\n\tlistClassName: string;\n\ttrackClassName: string;\n\tcss: string;\n}\n\n/** Genera los `@keyframes` y clases CSS del marquee (una función pura, sin React). */\nexport function buildMarqueeKeyframes(\n\toptions: MarqueeKeyframesOptions,\n): MarqueeKeyframes {\n\tconst { id, direction, gap, speed, pauseOnHover } = options;\n\tconst animationName = `motion-marquee-${id}`;\n\tconst listClassName = `motion-marquee-list-${id}`;\n\tconst trackClassName = `motion-marquee-track-${id}`;\n\n\tconst from = direction === \"left\" ? \"0\" : `calc(-100% - ${gap})`;\n\tconst to = direction === \"left\" ? `calc(-100% - ${gap})` : \"0\";\n\n\tconst css = [\n\t\t`@keyframes ${animationName}{from{transform:translateX(${from})}to{transform:translateX(${to})}}`,\n\t\t`.${listClassName}{display:flex;align-items:center;flex-shrink:0;min-width:100%;gap:${gap};animation:${animationName} ${speed}s linear infinite;will-change:transform;backface-visibility:hidden}`,\n\t\t`.${trackClassName}{display:flex;gap:${gap}}`,\n\t\tpauseOnHover\n\t\t\t? `.${trackClassName}:hover .${listClassName}{animation-play-state:paused}`\n\t\t\t: \"\",\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\"\");\n\n\treturn { animationName, listClassName, trackClassName, css };\n}\n","import {\n\ttype CSSProperties,\n\tmemo,\n\ttype ReactNode,\n\tuseEffect,\n\tuseId,\n\tuseMemo,\n\tuseRef,\n} from \"react\";\nimport {\n\tmarqueeOptionsSchema,\n\ttype ResolvedMarqueeOptions,\n} from \"../schemas/marquee\";\nimport { shouldReduceMotion } from \"../utils/reduced-motion\";\nimport { warn } from \"../utils/warn\";\nimport { buildMarqueeKeyframes } from \"./marquee-utils\";\n\nexport interface MarqueeProps {\n\tchildren: ReactNode;\n\tspeed?: number;\n\tdirection?: \"left\" | \"right\";\n\tpauseOnHover?: boolean;\n\tgap?: string;\n\tclassName?: string;\n\treducedMotion?: boolean;\n}\n\nconst MASK_STYLE: CSSProperties = {\n\tmaskImage:\n\t\t\"linear-gradient(to right, transparent, black 15%, black 85%, transparent)\",\n\tWebkitMaskImage:\n\t\t\"linear-gradient(to right, transparent, black 15%, black 85%, transparent)\",\n};\n\nconst BASE_STYLE: CSSProperties = {\n\tdisplay: \"flex\",\n\toverflow: \"hidden\",\n\twidth: \"100%\",\n};\n\n/** Marquee con CSS puro (`@keyframes`) y children duplicados para un loop sin costuras. */\nexport const Marquee = memo(function Marquee({\n\tchildren,\n\tspeed = 20,\n\tdirection = \"left\",\n\tpauseOnHover = true,\n\tgap = \"2rem\",\n\tclassName,\n\treducedMotion = true,\n}: MarqueeProps) {\n\tconst rawId = useId();\n\tconst id = rawId.replace(/[^a-zA-Z0-9_-]/g, \"\");\n\tconst duplicateRef = useRef<HTMLDivElement>(null);\n\n\tuseEffect(() => {\n\t\tconst element = duplicateRef.current;\n\t\tif (element) element.inert = true;\n\t}, []);\n\n\tconst parsed = marqueeOptionsSchema.safeParse({\n\t\tspeed,\n\t\tdirection,\n\t\tpauseOnHover,\n\t\tgap,\n\t\treducedMotion,\n\t});\n\tif (!parsed.success) {\n\t\twarn(`Opciones inválidas en Marquee: ${parsed.error.message}`);\n\t}\n\tconst config: ResolvedMarqueeOptions = parsed.success\n\t\t? parsed.data\n\t\t: marqueeOptionsSchema.parse({});\n\n\tconst keyframes = useMemo(\n\t\t() =>\n\t\t\tbuildMarqueeKeyframes({\n\t\t\t\tid,\n\t\t\t\tdirection: config.direction,\n\t\t\t\tgap: config.gap,\n\t\t\t\tspeed: config.speed,\n\t\t\t\tpauseOnHover: config.pauseOnHover,\n\t\t\t}),\n\t\t[id, config.direction, config.gap, config.speed, config.pauseOnHover],\n\t);\n\n\tconst paused = shouldReduceMotion(config.reducedMotion);\n\tconst listStyle: CSSProperties = {\n\t\tdisplay: \"flex\",\n\t\talignItems: \"center\",\n\t\tflexShrink: 0,\n\t\tminWidth: \"100%\",\n\t\tgap: config.gap,\n\t\t...(paused\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\tanimation: `${keyframes.animationName} ${config.speed}s linear infinite`,\n\t\t\t\t\twillChange: \"transform\",\n\t\t\t\t\tbackfaceVisibility: \"hidden\",\n\t\t\t\t}),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<style>{keyframes.css}</style>\n\t\t\t<section\n\t\t\t\taria-label=\"Contenido en desplazamiento continuo\"\n\t\t\t\tclassName={\n\t\t\t\t\tclassName\n\t\t\t\t\t\t? `${keyframes.trackClassName} ${className}`\n\t\t\t\t\t\t: keyframes.trackClassName\n\t\t\t\t}\n\t\t\t\tstyle={{ ...BASE_STYLE, ...MASK_STYLE }}\n\t\t\t>\n\t\t\t\t<div className={keyframes.listClassName} style={listStyle}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tref={duplicateRef}\n\t\t\t\t\tclassName={keyframes.listClassName}\n\t\t\t\t\tstyle={listStyle}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</>\n\t);\n});\n","import type { Easing, SpringOptions, Transition } from \"motion/react\";\n\n/** Curva de easing por defecto de todos los presets. */\nexport const DEFAULT_EASE: Easing = [0.16, 1, 0.3, 1];\n\nexport interface BuildTransitionOptions {\n\tduration: number;\n\tdelay: number;\n\tease: Easing;\n\tspring?: Omit<SpringOptions, \"keyframes\">;\n\texcludeDelay: boolean;\n}\n\n/**\n * Construye la transición compartida por los presets.\n * - Si `spring` está definido, sobrescribe `duration` y `ease`.\n * - Si `excludeDelay` es `true`, omite `delay` (compatibilidad con stagger del padre).\n */\nexport function buildTransition(options: BuildTransitionOptions): Transition {\n\tconst { duration, delay, ease, spring, excludeDelay } = options;\n\n\tconst base: Transition = spring\n\t\t? { type: \"spring\", ...spring }\n\t\t: { duration, ease };\n\n\treturn excludeDelay ? base : { ...base, delay };\n}\n","import type { Easing, SpringOptions } from \"motion/react\";\nimport { z } from \"zod\";\nimport { DEFAULT_EASE } from \"../utils/easing\";\n\nconst EASING_NAMES = new Set([\n\t\"linear\",\n\t\"easeIn\",\n\t\"easeOut\",\n\t\"easeInOut\",\n\t\"circIn\",\n\t\"circOut\",\n\t\"circInOut\",\n\t\"backIn\",\n\t\"backOut\",\n\t\"backInOut\",\n\t\"anticipate\",\n]);\n\n/** Valida un `Easing` de motion: nombre, bezier de 4 números o función. */\nfunction isEasing(value: unknown): value is Easing {\n\tif (typeof value === \"function\") return true;\n\tif (typeof value === \"string\") return EASING_NAMES.has(value);\n\treturn (\n\t\tArray.isArray(value) &&\n\t\tvalue.length === 4 &&\n\t\tvalue.every((item) => typeof item === \"number\")\n\t);\n}\n\n/** Valida un objeto de opciones de spring (sin `keyframes`). */\nfunction isSpringOptions(\n\tvalue: unknown,\n): value is Omit<SpringOptions, \"keyframes\"> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** Opciones compartidas por todos los presets que retornan variants. */\nexport const basePresetSchema = z.object({\n\tduration: z.number().default(0.5),\n\tdelay: z.number().default(0),\n\tease: z.custom<Easing>(isEasing).default(DEFAULT_EASE),\n\tspring: z\n\t\t.custom<Omit<SpringOptions, \"keyframes\">>(isSpringOptions)\n\t\t.optional(),\n\texcludeDelay: z.boolean().default(false),\n\treducedMotion: z.boolean().default(true),\n});\n\nexport type BasePresetOptions = z.input<typeof basePresetSchema>;\nexport type ResolvedBasePresetOptions = z.output<typeof basePresetSchema>;\n","import { z } from \"zod\";\nimport { basePresetSchema } from \"./base\";\n\nexport const fadeOptionsSchema = basePresetSchema.extend({\n\tdirection: z.enum([\"up\", \"down\", \"left\", \"right\", \"none\"]).default(\"up\"),\n\tdistance: z.number().default(60),\n\tblur: z.number().default(0),\n\tscale: z.number().default(1),\n});\n\nexport type FadeOptions = z.input<typeof fadeOptionsSchema>;\nexport type ResolvedFadeOptions = z.output<typeof fadeOptionsSchema>;\n","import type { TargetAndTransition, Variants } from \"motion/react\";\nimport { type FadeOptions, fadeOptionsSchema } from \"../schemas/fade\";\nimport { buildTransition } from \"../utils/easing\";\nimport { shouldReduceMotion } from \"../utils/reduced-motion\";\nimport { warn } from \"../utils/warn\";\n\nconst FADE_OFFSETS = {\n\tup: (distance: number) => ({ y: distance }),\n\tdown: (distance: number) => ({ y: -distance }),\n\tleft: (distance: number) => ({ x: distance }),\n\tright: (distance: number) => ({ x: -distance }),\n\tnone: () => ({}),\n} as const;\n\n/**\n * Fade de entrada con dirección, blur y escala opcionales.\n * Función pura que retorna `Variants` para usar en `motion`/`motion/react`.\n */\nexport function fade(options: FadeOptions = {}): Variants {\n\tconst parsed = fadeOptionsSchema.safeParse(options);\n\tif (!parsed.success) {\n\t\twarn(\n\t\t\t`Opciones inválidas en fade(): ${parsed.error.message}. Se usarán los valores por defecto.`,\n\t\t);\n\t}\n\tconst opts = parsed.success ? parsed.data : fadeOptionsSchema.parse({});\n\n\tconst {\n\t\tdirection,\n\t\tdistance,\n\t\tduration,\n\t\tdelay,\n\t\tease,\n\t\tspring,\n\t\texcludeDelay,\n\t\tblur,\n\t\tscale,\n\t\treducedMotion,\n\t} = opts;\n\n\tif (shouldReduceMotion(reducedMotion)) {\n\t\treturn {\n\t\t\tinitial: { opacity: 1, x: 0, y: 0 },\n\t\t\tanimate: { opacity: 1, x: 0, y: 0 },\n\t\t};\n\t}\n\n\tconst transition = buildTransition({\n\t\tduration,\n\t\tdelay,\n\t\tease,\n\t\tspring,\n\t\texcludeDelay,\n\t});\n\tconst hasBlur = blur > 0;\n\n\tconst initial: TargetAndTransition = {\n\t\topacity: 0,\n\t\t...FADE_OFFSETS[direction](distance),\n\t};\n\tif (scale !== 1) initial.scale = scale;\n\tif (hasBlur) initial.filter = `blur(${blur}px)`;\n\n\tconst animate: TargetAndTransition = {\n\t\topacity: 1,\n\t\tx: 0,\n\t\ty: 0,\n\t\twillChange: hasBlur ? \"transform, opacity, filter\" : \"transform, opacity\",\n\t\ttransition,\n\t};\n\tif (scale !== 1) animate.scale = 1;\n\tif (hasBlur) animate.filter = \"blur(0px)\";\n\n\treturn { initial, animate };\n}\n","import { z } from \"zod\";\n\nexport const parentVariantsSchema = z.object({\n\tdelayChildren: z.number().default(0),\n\tstartDelay: z.number().default(0),\n\treducedMotion: z.boolean().default(true),\n});\n\nexport type ParentVariantsOptions = z.input<typeof parentVariantsSchema>;\nexport type ResolvedParentVariantsOptions = z.output<\n\ttypeof parentVariantsSchema\n>;\n","import { stagger, type Variants } from \"motion/react\";\nimport {\n\ttype ParentVariantsOptions,\n\tparentVariantsSchema,\n} from \"../schemas/parent-variants\";\nimport { shouldReduceMotion } from \"../utils/reduced-motion\";\nimport { warn } from \"../utils/warn\";\n\n/**\n * Variants para el contenedor padre: anima hijos en cascada con `stagger()`.\n * Los hijos deben usar `excludeDelay: true` para heredar el stagger (CL-001).\n */\nexport function parentVariants(options: ParentVariantsOptions = {}): Variants {\n\tconst parsed = parentVariantsSchema.safeParse(options);\n\tif (!parsed.success) {\n\t\twarn(\n\t\t\t`Opciones inválidas en parentVariants(): ${parsed.error.message}. Se usarán los valores por defecto.`,\n\t\t);\n\t}\n\tconst opts = parsed.success ? parsed.data : parentVariantsSchema.parse({});\n\n\tconst { delayChildren, startDelay, reducedMotion } = opts;\n\n\tif (shouldReduceMotion(reducedMotion)) {\n\t\treturn {\n\t\t\tinitial: { opacity: 1 },\n\t\t\tanimate: { opacity: 1 },\n\t\t};\n\t}\n\n\treturn {\n\t\tinitial: { opacity: 0 },\n\t\tanimate: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tdelayChildren: stagger(delayChildren, { startDelay }),\n\t\t\t},\n\t\t},\n\t};\n}\n","export type TextAnimateBy = \"word\" | \"letter\";\n\nexport type TextAnimateType =\n\t| \"blurIn\"\n\t| \"slideUp\"\n\t| \"slideDown\"\n\t| \"slideLeft\"\n\t| \"slideRight\"\n\t| \"typeWriter\";\n\nexport interface TextAnimationParams {\n\tdirection: \"up\" | \"down\" | \"left\" | \"right\" | \"none\";\n\tdistance: number;\n\tblur: number;\n}\n\ntype TokenKind = \"tag\" | \"text\" | \"space\";\n\ninterface Token {\n\tkind: TokenKind;\n\tvalue: string;\n}\n\nconst TAG_RE = /<[^>]*>/g;\nconst TOKEN_SOURCE = \"<[^>]*>|\\\\s+|[^<\\\\s]+\";\n\nfunction tokenize(text: string): Token[] {\n\tconst tokens: Token[] = [];\n\tconst regex = new RegExp(TOKEN_SOURCE, \"g\");\n\tlet match = regex.exec(text);\n\twhile (match !== null) {\n\t\tconst value = match[0];\n\t\tif (value.startsWith(\"<\")) tokens.push({ kind: \"tag\", value });\n\t\telse if (/^\\s+$/.test(value)) tokens.push({ kind: \"space\", value });\n\t\telse tokens.push({ kind: \"text\", value });\n\t\tmatch = regex.exec(text);\n\t}\n\treturn tokens;\n}\n\n/**\n * Agrupa palabras manteniendo las etiquetas HTML pegadas a la palabra contigua\n * (CL-004). `\"<strong>Hello</strong> World\"` → `[\"<strong>Hello</strong>\", \"World\"]`.\n */\nfunction groupWords(tokens: Token[]): string[] {\n\tconst units: string[] = [];\n\tlet pending = \"\";\n\tlet current: string | null = null;\n\tconst flush = () => {\n\t\tif (current !== null) {\n\t\t\tunits.push(current);\n\t\t\tcurrent = null;\n\t\t}\n\t};\n\n\tfor (const token of tokens) {\n\t\tif (token.kind === \"space\") {\n\t\t\tflush();\n\t\t\tcontinue;\n\t\t}\n\t\tif (token.kind === \"tag\") {\n\t\t\tif (current !== null) current += token.value;\n\t\t\telse pending += token.value;\n\t\t\tcontinue;\n\t\t}\n\t\tflush();\n\t\tcurrent = pending + token.value;\n\t\tpending = \"\";\n\t}\n\tflush();\n\tif (pending) units.push(pending);\n\treturn units;\n}\n\n/** Agrupa letras manteniendo las etiquetas pegadas a la primera/última letra. */\nfunction groupLetters(tokens: Token[]): string[] {\n\tconst units: string[] = [];\n\tlet pending = \"\";\n\n\tfor (const token of tokens) {\n\t\tif (token.kind === \"space\") {\n\t\t\tfor (const char of token.value) units.push(char);\n\t\t\tcontinue;\n\t\t}\n\t\tif (token.kind === \"tag\") {\n\t\t\tif (token.value.startsWith(\"</\") && units.length > 0) {\n\t\t\t\tconst last = units.length - 1;\n\t\t\t\tunits[last] = `${units[last] ?? \"\"}${token.value}`;\n\t\t\t} else {\n\t\t\t\tpending += token.value;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tconst chars = [...token.value];\n\t\tchars.forEach((char, index) => {\n\t\t\tunits.push((index === 0 ? pending : \"\") + char);\n\t\t\tpending = \"\";\n\t\t});\n\t}\n\tif (pending) units.push(pending);\n\treturn units;\n}\n\n/** Divide el texto en palabras o letras, preservando las etiquetas HTML (CL-004). */\nexport function splitText(text: string, by: TextAnimateBy = \"word\"): string[] {\n\tconst tokens = tokenize(text);\n\treturn by === \"letter\" ? groupLetters(tokens) : groupWords(tokens);\n}\n\n/**\n * Rangos `[inicio, fin)` de coincidencias (case-insensitive) sobre el texto sin\n * etiquetas. Los índices alinean 1:1 con las unidades de `splitText(..., \"letter\")`.\n */\nexport function getHighlightRanges(\n\ttext: string,\n\thighlights: string[],\n): Array<[number, number]> {\n\tconst plain = text.replace(TAG_RE, \"\");\n\tconst lower = plain.toLowerCase();\n\tconst ranges: Array<[number, number]> = [];\n\n\tfor (const highlight of highlights) {\n\t\tif (!highlight) continue;\n\t\tconst needle = highlight.toLowerCase();\n\t\tlet from = 0;\n\t\twhile (from <= lower.length - needle.length) {\n\t\t\tconst index = lower.indexOf(needle, from);\n\t\t\tif (index === -1) break;\n\t\t\tranges.push([index, index + needle.length]);\n\t\t\tfrom = index + needle.length;\n\t\t}\n\t}\n\treturn ranges;\n}\n\n/** `true` si una palabra (sin etiquetas) contiene alguno de los resaltados. */\nexport function isWordHighlighted(word: string, highlights: string[]): boolean {\n\tconst plain = word.replace(TAG_RE, \"\").toLowerCase();\n\treturn highlights.some(\n\t\t(highlight) => highlight !== \"\" && plain.includes(highlight.toLowerCase()),\n\t);\n}\n\n/** Parámetros de `fade()` asociados a cada tipo de animación de texto. */\nexport function getAnimationParams(\n\ttype: TextAnimateType = \"slideUp\",\n): TextAnimationParams {\n\tswitch (type) {\n\t\tcase \"blurIn\":\n\t\t\treturn { direction: \"none\", distance: 0, blur: 8 };\n\t\tcase \"slideDown\":\n\t\t\treturn { direction: \"down\", distance: 20, blur: 4 };\n\t\tcase \"slideLeft\":\n\t\t\treturn { direction: \"left\", distance: 20, blur: 4 };\n\t\tcase \"slideRight\":\n\t\t\treturn { direction: \"right\", distance: 20, blur: 4 };\n\t\tcase \"typeWriter\":\n\t\t\treturn { direction: \"none\", distance: 0, blur: 0 };\n\t\tdefault:\n\t\t\treturn { direction: \"up\", distance: 20, blur: 4 };\n\t}\n}\n","import { type HTMLMotionProps, motion } from \"motion/react\";\nimport type * as React from \"react\";\nimport { type ElementType, type ReactElement, useMemo } from \"react\";\nimport { fade } from \"../presets/fade\";\nimport { parentVariants } from \"../presets/parent-variants\";\nimport {\n\ttype ResolvedTextAnimateOptions,\n\ttextAnimateOptionsSchema,\n} from \"../schemas/text-animate\";\nimport { warn } from \"../utils/warn\";\nimport {\n\tgetAnimationParams,\n\tgetHighlightRanges,\n\tisWordHighlighted,\n\tsplitText,\n\ttype TextAnimateBy,\n\ttype TextAnimateType,\n} from \"./text-animate-utils\";\n\ntype IntrinsicTag = keyof React.JSX.IntrinsicElements;\n\nconst componentCache = new Map<string, ElementType>();\n\nfunction getMotionComponent(tag: IntrinsicTag): ElementType {\n\tconst key = String(tag);\n\tlet component = componentCache.get(key);\n\tif (!component) {\n\t\tcomponent = motion.create(tag) as ElementType;\n\t\tcomponentCache.set(key, component);\n\t}\n\treturn component;\n}\n\nconst SPAN_STYLE = { display: \"inline-block\", whiteSpace: \"pre-wrap\" } as const;\nconst WORD_STYLE = { ...SPAN_STYLE, marginRight: \"0.25em\" } as const;\n\nexport interface TextAnimateProps extends HTMLMotionProps<\"p\"> {\n\ttext: string;\n\tas?: IntrinsicTag;\n\tby?: TextAnimateBy;\n\ttype?: TextAnimateType;\n\tduration?: number;\n\tstartDelay?: number;\n\thighlight?: string[];\n\thighlightClassName?: string;\n\treducedMotion?: boolean;\n}\n\n/**\n * Anima texto dividiéndolo en palabras o letras. Preserva el HTML inline (CL-004),\n * resalta coincidencias (case-insensitive) y anima al entrar en viewport.\n *\n * ADVERTENCIA: el HTML inline se inyecta con `dangerouslySetInnerHTML`. No pases\n * como `text` contenido no confiable sin sanitizarlo antes (riesgo de XSS).\n */\nexport function TextAnimate({\n\ttext,\n\tas = \"p\",\n\tby = \"word\",\n\ttype = \"slideUp\",\n\tduration = 0.4,\n\tstartDelay = 0,\n\thighlight = [],\n\thighlightClassName = \"\",\n\treducedMotion = true,\n\t...props\n}: TextAnimateProps): ReactElement {\n\tconst parsed = textAnimateOptionsSchema.safeParse({\n\t\tby,\n\t\ttype,\n\t\tduration,\n\t\tstartDelay,\n\t\thighlight,\n\t\thighlightClassName,\n\t\treducedMotion,\n\t});\n\tif (!parsed.success) {\n\t\twarn(`Opciones inválidas en TextAnimate: ${parsed.error.message}`);\n\t}\n\tconst config: ResolvedTextAnimateOptions = parsed.success\n\t\t? parsed.data\n\t\t: textAnimateOptionsSchema.parse({});\n\n\tconst MotionWrapper = useMemo(() => getMotionComponent(as), [as]);\n\tconst units = useMemo(() => splitText(text, config.by), [text, config.by]);\n\tconst ranges = useMemo(\n\t\t() =>\n\t\t\tconfig.by === \"letter\" ? getHighlightRanges(text, config.highlight) : [],\n\t\t[text, config.by, config.highlight],\n\t);\n\tconst animationParams = useMemo(\n\t\t() => getAnimationParams(config.type),\n\t\t[config.type],\n\t);\n\n\tconst parent = useMemo(\n\t\t() =>\n\t\t\tparentVariants({\n\t\t\t\tdelayChildren:\n\t\t\t\t\tconfig.type === \"typeWriter\" && config.by === \"letter\" ? 0.05 : 0.08,\n\t\t\t\tstartDelay: config.startDelay,\n\t\t\t\treducedMotion: config.reducedMotion,\n\t\t\t}),\n\t\t[config.type, config.by, config.startDelay, config.reducedMotion],\n\t);\n\n\tconst child = useMemo(\n\t\t() =>\n\t\t\tfade({\n\t\t\t\t...animationParams,\n\t\t\t\texcludeDelay: true,\n\t\t\t\tduration: config.type === \"typeWriter\" ? 0.05 : config.duration,\n\t\t\t\treducedMotion: config.reducedMotion,\n\t\t\t}),\n\t\t[animationParams, config.type, config.duration, config.reducedMotion],\n\t);\n\n\tconst isWord = config.by === \"word\";\n\tconst itemStyle = isWord ? WORD_STYLE : SPAN_STYLE;\n\n\treturn (\n\t\t<MotionWrapper\n\t\t\tvariants={parent}\n\t\t\tinitial=\"initial\"\n\t\t\twhileInView=\"animate\"\n\t\t\tviewport={{ once: true }}\n\t\t\t{...props}\n\t\t>\n\t\t\t{units.map((unit, index) => {\n\t\t\t\tconst highlighted = isWord\n\t\t\t\t\t? isWordHighlighted(unit, config.highlight)\n\t\t\t\t\t: ranges.some(([start, end]) => index >= start && index < end);\n\t\t\t\tconst hasHtml = /<[^>]*>/.test(unit);\n\t\t\t\tconst key = `${index}-${unit}`;\n\t\t\t\treturn (\n\t\t\t\t\t<motion.span\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\tvariants={child}\n\t\t\t\t\t\tclassName={highlighted ? config.highlightClassName : undefined}\n\t\t\t\t\t\tstyle={itemStyle}\n\t\t\t\t\t\t{...(hasHtml\n\t\t\t\t\t\t\t? { dangerouslySetInnerHTML: { __html: unit } }\n\t\t\t\t\t\t\t: { children: unit === \"\" ? \"\\u00A0\" : unit })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t})}\n\t\t</MotionWrapper>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PanInfo, HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode, ReactElement, RefObject } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const counterOptionsSchema: z.ZodObject<{
|
|
7
|
+
from: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
to: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
decimals: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
prefix: z.ZodDefault<z.ZodString>;
|
|
11
|
+
suffix: z.ZodDefault<z.ZodString>;
|
|
12
|
+
separator: z.ZodDefault<z.ZodString>;
|
|
13
|
+
format: z.ZodOptional<z.ZodCustom<(value: number) => string, (value: number) => string>>;
|
|
14
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
reducedMotion: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
type CounterOptions = z.input<typeof counterOptionsSchema>;
|
|
18
|
+
type ResolvedCounterOptions = z.output<typeof counterOptionsSchema>;
|
|
19
|
+
|
|
20
|
+
declare const dragConstraintsSchema: z.ZodObject<{
|
|
21
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
declare const draggableOptionsSchema: z.ZodObject<{
|
|
27
|
+
axis: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
x: "x";
|
|
29
|
+
y: "y";
|
|
30
|
+
both: "both";
|
|
31
|
+
}>>;
|
|
32
|
+
bounds: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"parent">, z.ZodLiteral<"document">, z.ZodObject<{
|
|
33
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>]>>;
|
|
38
|
+
snapToGrid: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
39
|
+
dragElastic: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean]>>;
|
|
40
|
+
dragMomentum: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type DraggableOptions = z.input<typeof draggableOptionsSchema>;
|
|
43
|
+
type ResolvedDraggableOptions = z.output<typeof draggableOptionsSchema>;
|
|
44
|
+
type DragConstraints = z.infer<typeof dragConstraintsSchema>;
|
|
45
|
+
|
|
46
|
+
declare const marqueeOptionsSchema: z.ZodObject<{
|
|
47
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
49
|
+
right: "right";
|
|
50
|
+
left: "left";
|
|
51
|
+
}>>;
|
|
52
|
+
pauseOnHover: z.ZodDefault<z.ZodBoolean>;
|
|
53
|
+
gap: z.ZodDefault<z.ZodString>;
|
|
54
|
+
reducedMotion: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
type MarqueeOptions = z.input<typeof marqueeOptionsSchema>;
|
|
57
|
+
type ResolvedMarqueeOptions = z.output<typeof marqueeOptionsSchema>;
|
|
58
|
+
|
|
59
|
+
declare const textAnimateOptionsSchema: z.ZodObject<{
|
|
60
|
+
by: z.ZodDefault<z.ZodEnum<{
|
|
61
|
+
word: "word";
|
|
62
|
+
letter: "letter";
|
|
63
|
+
}>>;
|
|
64
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
65
|
+
blurIn: "blurIn";
|
|
66
|
+
slideUp: "slideUp";
|
|
67
|
+
slideDown: "slideDown";
|
|
68
|
+
slideLeft: "slideLeft";
|
|
69
|
+
slideRight: "slideRight";
|
|
70
|
+
typeWriter: "typeWriter";
|
|
71
|
+
}>>;
|
|
72
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
startDelay: z.ZodDefault<z.ZodNumber>;
|
|
74
|
+
highlight: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
75
|
+
highlightClassName: z.ZodDefault<z.ZodString>;
|
|
76
|
+
reducedMotion: z.ZodDefault<z.ZodBoolean>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type TextAnimateOptions = z.input<typeof textAnimateOptionsSchema>;
|
|
79
|
+
type ResolvedTextAnimateOptions = z.output<typeof textAnimateOptionsSchema>;
|
|
80
|
+
|
|
81
|
+
/** Formatea un número con decimales, separador de miles, prefijo/sufijo y `format` custom (CL-005). */
|
|
82
|
+
declare function formatCounterValue(value: number, options?: CounterOptions): string;
|
|
83
|
+
|
|
84
|
+
interface DraggableProps {
|
|
85
|
+
children?: ReactNode;
|
|
86
|
+
axis?: "x" | "y" | "both";
|
|
87
|
+
bounds?: "parent" | "document" | DragConstraints;
|
|
88
|
+
snapToGrid?: [number, number];
|
|
89
|
+
dragElastic?: number | boolean;
|
|
90
|
+
dragMomentum?: boolean;
|
|
91
|
+
dragControls?: unknown;
|
|
92
|
+
onDragStart?: (event: unknown, info: PanInfo) => void;
|
|
93
|
+
onDrag?: (event: unknown, info: PanInfo) => void;
|
|
94
|
+
onDragEnd?: (event: unknown, info: PanInfo) => void;
|
|
95
|
+
className?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Wrapper de `motion.div` con drag configurable por eje, límites, snap y callbacks.
|
|
99
|
+
* `bounds` inválidos se descartan con un `warn()` (CL-007).
|
|
100
|
+
*/
|
|
101
|
+
declare function Draggable({ children, axis, bounds, snapToGrid, dragElastic, dragMomentum, dragControls, onDragStart, onDrag, onDragEnd, className, }: DraggableProps): ReactElement;
|
|
102
|
+
|
|
103
|
+
/** `true` si los límites tienen `top > bottom` o `left > right` (CL-007). */
|
|
104
|
+
declare function hasInvalidBounds(bounds: DragConstraints): boolean;
|
|
105
|
+
type ResolvedDragBounds = "parent" | "document" | DragConstraints | null;
|
|
106
|
+
/** Normaliza `bounds` a un valor usable por motion, descartando límites inválidos (CL-007). */
|
|
107
|
+
declare function resolveDragConstraints(bounds: "parent" | "document" | DragConstraints | undefined): ResolvedDragBounds;
|
|
108
|
+
/**
|
|
109
|
+
* Traduce `bounds` al prop `dragConstraints` de motion.
|
|
110
|
+
* `"parent"`/`"document"` no son strings válidos en motion: se resuelven a un
|
|
111
|
+
* ref al elemento contenedor (`containerRef`) que motion mide al iniciar el drag.
|
|
112
|
+
*/
|
|
113
|
+
declare function getDragConstraintsProp(resolved: ResolvedDragBounds, containerRef: RefObject<Element | null>): Partial<DragConstraints> | {
|
|
114
|
+
current: Element | null;
|
|
115
|
+
} | undefined;
|
|
116
|
+
/** Construye el `modifyTarget` de `dragTransition` que ajusta el destino a la grilla. */
|
|
117
|
+
declare function buildSnapModifier(snapToGrid: [number, number] | undefined): ((value: number) => number) | undefined;
|
|
118
|
+
|
|
119
|
+
interface UseCounterResult {
|
|
120
|
+
value: number;
|
|
121
|
+
start: () => void;
|
|
122
|
+
reset: () => void;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Contador animado que escribe el valor formateado en `ref.current.textContent`
|
|
126
|
+
* y expone el valor actual de forma reactiva.
|
|
127
|
+
* Con `reducedMotion` activo muestra el valor final directamente (RF-095).
|
|
128
|
+
*/
|
|
129
|
+
declare function useCounter(ref: RefObject<HTMLElement | null>, options?: CounterOptions): UseCounterResult;
|
|
130
|
+
|
|
131
|
+
interface MarqueeProps {
|
|
132
|
+
children: ReactNode;
|
|
133
|
+
speed?: number;
|
|
134
|
+
direction?: "left" | "right";
|
|
135
|
+
pauseOnHover?: boolean;
|
|
136
|
+
gap?: string;
|
|
137
|
+
className?: string;
|
|
138
|
+
reducedMotion?: boolean;
|
|
139
|
+
}
|
|
140
|
+
/** Marquee con CSS puro (`@keyframes`) y children duplicados para un loop sin costuras. */
|
|
141
|
+
declare const Marquee: react.NamedExoticComponent<MarqueeProps>;
|
|
142
|
+
|
|
143
|
+
interface MarqueeKeyframesOptions {
|
|
144
|
+
id: string;
|
|
145
|
+
direction: "left" | "right";
|
|
146
|
+
gap: string;
|
|
147
|
+
speed: number;
|
|
148
|
+
pauseOnHover: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface MarqueeKeyframes {
|
|
151
|
+
animationName: string;
|
|
152
|
+
listClassName: string;
|
|
153
|
+
trackClassName: string;
|
|
154
|
+
css: string;
|
|
155
|
+
}
|
|
156
|
+
/** Genera los `@keyframes` y clases CSS del marquee (una función pura, sin React). */
|
|
157
|
+
declare function buildMarqueeKeyframes(options: MarqueeKeyframesOptions): MarqueeKeyframes;
|
|
158
|
+
|
|
159
|
+
type TextAnimateBy = "word" | "letter";
|
|
160
|
+
type TextAnimateType = "blurIn" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "typeWriter";
|
|
161
|
+
interface TextAnimationParams {
|
|
162
|
+
direction: "up" | "down" | "left" | "right" | "none";
|
|
163
|
+
distance: number;
|
|
164
|
+
blur: number;
|
|
165
|
+
}
|
|
166
|
+
/** Divide el texto en palabras o letras, preservando las etiquetas HTML (CL-004). */
|
|
167
|
+
declare function splitText(text: string, by?: TextAnimateBy): string[];
|
|
168
|
+
/**
|
|
169
|
+
* Rangos `[inicio, fin)` de coincidencias (case-insensitive) sobre el texto sin
|
|
170
|
+
* etiquetas. Los índices alinean 1:1 con las unidades de `splitText(..., "letter")`.
|
|
171
|
+
*/
|
|
172
|
+
declare function getHighlightRanges(text: string, highlights: string[]): Array<[number, number]>;
|
|
173
|
+
/** `true` si una palabra (sin etiquetas) contiene alguno de los resaltados. */
|
|
174
|
+
declare function isWordHighlighted(word: string, highlights: string[]): boolean;
|
|
175
|
+
/** Parámetros de `fade()` asociados a cada tipo de animación de texto. */
|
|
176
|
+
declare function getAnimationParams(type?: TextAnimateType): TextAnimationParams;
|
|
177
|
+
|
|
178
|
+
type IntrinsicTag = keyof react.JSX.IntrinsicElements;
|
|
179
|
+
interface TextAnimateProps extends HTMLMotionProps<"p"> {
|
|
180
|
+
text: string;
|
|
181
|
+
as?: IntrinsicTag;
|
|
182
|
+
by?: TextAnimateBy;
|
|
183
|
+
type?: TextAnimateType;
|
|
184
|
+
duration?: number;
|
|
185
|
+
startDelay?: number;
|
|
186
|
+
highlight?: string[];
|
|
187
|
+
highlightClassName?: string;
|
|
188
|
+
reducedMotion?: boolean;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Anima texto dividiéndolo en palabras o letras. Preserva el HTML inline (CL-004),
|
|
192
|
+
* resalta coincidencias (case-insensitive) y anima al entrar en viewport.
|
|
193
|
+
*
|
|
194
|
+
* ADVERTENCIA: el HTML inline se inyecta con `dangerouslySetInnerHTML`. No pases
|
|
195
|
+
* como `text` contenido no confiable sin sanitizarlo antes (riesgo de XSS).
|
|
196
|
+
*/
|
|
197
|
+
declare function TextAnimate({ text, as, by, type, duration, startDelay, highlight, highlightClassName, reducedMotion, ...props }: TextAnimateProps): ReactElement;
|
|
198
|
+
|
|
199
|
+
export { type CounterOptions, type DragConstraints, Draggable, type DraggableOptions, type DraggableProps, Marquee, type MarqueeKeyframes, type MarqueeKeyframesOptions, type MarqueeOptions, type MarqueeProps, type ResolvedCounterOptions, type ResolvedDragBounds, type ResolvedDraggableOptions, type ResolvedMarqueeOptions, type ResolvedTextAnimateOptions, TextAnimate, type TextAnimateBy, type TextAnimateOptions, type TextAnimateProps, type TextAnimateType, type TextAnimationParams, type UseCounterResult, buildMarqueeKeyframes, buildSnapModifier, counterOptionsSchema, dragConstraintsSchema, draggableOptionsSchema, formatCounterValue, getAnimationParams, getDragConstraintsProp, getHighlightRanges, hasInvalidBounds, isWordHighlighted, marqueeOptionsSchema, resolveDragConstraints, splitText, textAnimateOptionsSchema, useCounter };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PanInfo, HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode, ReactElement, RefObject } from 'react';
|
|
5
|
+
|
|
6
|
+
declare const counterOptionsSchema: z.ZodObject<{
|
|
7
|
+
from: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
to: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
decimals: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
prefix: z.ZodDefault<z.ZodString>;
|
|
11
|
+
suffix: z.ZodDefault<z.ZodString>;
|
|
12
|
+
separator: z.ZodDefault<z.ZodString>;
|
|
13
|
+
format: z.ZodOptional<z.ZodCustom<(value: number) => string, (value: number) => string>>;
|
|
14
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
reducedMotion: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
type CounterOptions = z.input<typeof counterOptionsSchema>;
|
|
18
|
+
type ResolvedCounterOptions = z.output<typeof counterOptionsSchema>;
|
|
19
|
+
|
|
20
|
+
declare const dragConstraintsSchema: z.ZodObject<{
|
|
21
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
declare const draggableOptionsSchema: z.ZodObject<{
|
|
27
|
+
axis: z.ZodDefault<z.ZodEnum<{
|
|
28
|
+
x: "x";
|
|
29
|
+
y: "y";
|
|
30
|
+
both: "both";
|
|
31
|
+
}>>;
|
|
32
|
+
bounds: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"parent">, z.ZodLiteral<"document">, z.ZodObject<{
|
|
33
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
}, z.core.$strip>]>>;
|
|
38
|
+
snapToGrid: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
39
|
+
dragElastic: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean]>>;
|
|
40
|
+
dragMomentum: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type DraggableOptions = z.input<typeof draggableOptionsSchema>;
|
|
43
|
+
type ResolvedDraggableOptions = z.output<typeof draggableOptionsSchema>;
|
|
44
|
+
type DragConstraints = z.infer<typeof dragConstraintsSchema>;
|
|
45
|
+
|
|
46
|
+
declare const marqueeOptionsSchema: z.ZodObject<{
|
|
47
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
direction: z.ZodDefault<z.ZodEnum<{
|
|
49
|
+
right: "right";
|
|
50
|
+
left: "left";
|
|
51
|
+
}>>;
|
|
52
|
+
pauseOnHover: z.ZodDefault<z.ZodBoolean>;
|
|
53
|
+
gap: z.ZodDefault<z.ZodString>;
|
|
54
|
+
reducedMotion: z.ZodDefault<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
type MarqueeOptions = z.input<typeof marqueeOptionsSchema>;
|
|
57
|
+
type ResolvedMarqueeOptions = z.output<typeof marqueeOptionsSchema>;
|
|
58
|
+
|
|
59
|
+
declare const textAnimateOptionsSchema: z.ZodObject<{
|
|
60
|
+
by: z.ZodDefault<z.ZodEnum<{
|
|
61
|
+
word: "word";
|
|
62
|
+
letter: "letter";
|
|
63
|
+
}>>;
|
|
64
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
65
|
+
blurIn: "blurIn";
|
|
66
|
+
slideUp: "slideUp";
|
|
67
|
+
slideDown: "slideDown";
|
|
68
|
+
slideLeft: "slideLeft";
|
|
69
|
+
slideRight: "slideRight";
|
|
70
|
+
typeWriter: "typeWriter";
|
|
71
|
+
}>>;
|
|
72
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
startDelay: z.ZodDefault<z.ZodNumber>;
|
|
74
|
+
highlight: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
75
|
+
highlightClassName: z.ZodDefault<z.ZodString>;
|
|
76
|
+
reducedMotion: z.ZodDefault<z.ZodBoolean>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type TextAnimateOptions = z.input<typeof textAnimateOptionsSchema>;
|
|
79
|
+
type ResolvedTextAnimateOptions = z.output<typeof textAnimateOptionsSchema>;
|
|
80
|
+
|
|
81
|
+
/** Formatea un número con decimales, separador de miles, prefijo/sufijo y `format` custom (CL-005). */
|
|
82
|
+
declare function formatCounterValue(value: number, options?: CounterOptions): string;
|
|
83
|
+
|
|
84
|
+
interface DraggableProps {
|
|
85
|
+
children?: ReactNode;
|
|
86
|
+
axis?: "x" | "y" | "both";
|
|
87
|
+
bounds?: "parent" | "document" | DragConstraints;
|
|
88
|
+
snapToGrid?: [number, number];
|
|
89
|
+
dragElastic?: number | boolean;
|
|
90
|
+
dragMomentum?: boolean;
|
|
91
|
+
dragControls?: unknown;
|
|
92
|
+
onDragStart?: (event: unknown, info: PanInfo) => void;
|
|
93
|
+
onDrag?: (event: unknown, info: PanInfo) => void;
|
|
94
|
+
onDragEnd?: (event: unknown, info: PanInfo) => void;
|
|
95
|
+
className?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Wrapper de `motion.div` con drag configurable por eje, límites, snap y callbacks.
|
|
99
|
+
* `bounds` inválidos se descartan con un `warn()` (CL-007).
|
|
100
|
+
*/
|
|
101
|
+
declare function Draggable({ children, axis, bounds, snapToGrid, dragElastic, dragMomentum, dragControls, onDragStart, onDrag, onDragEnd, className, }: DraggableProps): ReactElement;
|
|
102
|
+
|
|
103
|
+
/** `true` si los límites tienen `top > bottom` o `left > right` (CL-007). */
|
|
104
|
+
declare function hasInvalidBounds(bounds: DragConstraints): boolean;
|
|
105
|
+
type ResolvedDragBounds = "parent" | "document" | DragConstraints | null;
|
|
106
|
+
/** Normaliza `bounds` a un valor usable por motion, descartando límites inválidos (CL-007). */
|
|
107
|
+
declare function resolveDragConstraints(bounds: "parent" | "document" | DragConstraints | undefined): ResolvedDragBounds;
|
|
108
|
+
/**
|
|
109
|
+
* Traduce `bounds` al prop `dragConstraints` de motion.
|
|
110
|
+
* `"parent"`/`"document"` no son strings válidos en motion: se resuelven a un
|
|
111
|
+
* ref al elemento contenedor (`containerRef`) que motion mide al iniciar el drag.
|
|
112
|
+
*/
|
|
113
|
+
declare function getDragConstraintsProp(resolved: ResolvedDragBounds, containerRef: RefObject<Element | null>): Partial<DragConstraints> | {
|
|
114
|
+
current: Element | null;
|
|
115
|
+
} | undefined;
|
|
116
|
+
/** Construye el `modifyTarget` de `dragTransition` que ajusta el destino a la grilla. */
|
|
117
|
+
declare function buildSnapModifier(snapToGrid: [number, number] | undefined): ((value: number) => number) | undefined;
|
|
118
|
+
|
|
119
|
+
interface UseCounterResult {
|
|
120
|
+
value: number;
|
|
121
|
+
start: () => void;
|
|
122
|
+
reset: () => void;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Contador animado que escribe el valor formateado en `ref.current.textContent`
|
|
126
|
+
* y expone el valor actual de forma reactiva.
|
|
127
|
+
* Con `reducedMotion` activo muestra el valor final directamente (RF-095).
|
|
128
|
+
*/
|
|
129
|
+
declare function useCounter(ref: RefObject<HTMLElement | null>, options?: CounterOptions): UseCounterResult;
|
|
130
|
+
|
|
131
|
+
interface MarqueeProps {
|
|
132
|
+
children: ReactNode;
|
|
133
|
+
speed?: number;
|
|
134
|
+
direction?: "left" | "right";
|
|
135
|
+
pauseOnHover?: boolean;
|
|
136
|
+
gap?: string;
|
|
137
|
+
className?: string;
|
|
138
|
+
reducedMotion?: boolean;
|
|
139
|
+
}
|
|
140
|
+
/** Marquee con CSS puro (`@keyframes`) y children duplicados para un loop sin costuras. */
|
|
141
|
+
declare const Marquee: react.NamedExoticComponent<MarqueeProps>;
|
|
142
|
+
|
|
143
|
+
interface MarqueeKeyframesOptions {
|
|
144
|
+
id: string;
|
|
145
|
+
direction: "left" | "right";
|
|
146
|
+
gap: string;
|
|
147
|
+
speed: number;
|
|
148
|
+
pauseOnHover: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface MarqueeKeyframes {
|
|
151
|
+
animationName: string;
|
|
152
|
+
listClassName: string;
|
|
153
|
+
trackClassName: string;
|
|
154
|
+
css: string;
|
|
155
|
+
}
|
|
156
|
+
/** Genera los `@keyframes` y clases CSS del marquee (una función pura, sin React). */
|
|
157
|
+
declare function buildMarqueeKeyframes(options: MarqueeKeyframesOptions): MarqueeKeyframes;
|
|
158
|
+
|
|
159
|
+
type TextAnimateBy = "word" | "letter";
|
|
160
|
+
type TextAnimateType = "blurIn" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "typeWriter";
|
|
161
|
+
interface TextAnimationParams {
|
|
162
|
+
direction: "up" | "down" | "left" | "right" | "none";
|
|
163
|
+
distance: number;
|
|
164
|
+
blur: number;
|
|
165
|
+
}
|
|
166
|
+
/** Divide el texto en palabras o letras, preservando las etiquetas HTML (CL-004). */
|
|
167
|
+
declare function splitText(text: string, by?: TextAnimateBy): string[];
|
|
168
|
+
/**
|
|
169
|
+
* Rangos `[inicio, fin)` de coincidencias (case-insensitive) sobre el texto sin
|
|
170
|
+
* etiquetas. Los índices alinean 1:1 con las unidades de `splitText(..., "letter")`.
|
|
171
|
+
*/
|
|
172
|
+
declare function getHighlightRanges(text: string, highlights: string[]): Array<[number, number]>;
|
|
173
|
+
/** `true` si una palabra (sin etiquetas) contiene alguno de los resaltados. */
|
|
174
|
+
declare function isWordHighlighted(word: string, highlights: string[]): boolean;
|
|
175
|
+
/** Parámetros de `fade()` asociados a cada tipo de animación de texto. */
|
|
176
|
+
declare function getAnimationParams(type?: TextAnimateType): TextAnimationParams;
|
|
177
|
+
|
|
178
|
+
type IntrinsicTag = keyof react.JSX.IntrinsicElements;
|
|
179
|
+
interface TextAnimateProps extends HTMLMotionProps<"p"> {
|
|
180
|
+
text: string;
|
|
181
|
+
as?: IntrinsicTag;
|
|
182
|
+
by?: TextAnimateBy;
|
|
183
|
+
type?: TextAnimateType;
|
|
184
|
+
duration?: number;
|
|
185
|
+
startDelay?: number;
|
|
186
|
+
highlight?: string[];
|
|
187
|
+
highlightClassName?: string;
|
|
188
|
+
reducedMotion?: boolean;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Anima texto dividiéndolo en palabras o letras. Preserva el HTML inline (CL-004),
|
|
192
|
+
* resalta coincidencias (case-insensitive) y anima al entrar en viewport.
|
|
193
|
+
*
|
|
194
|
+
* ADVERTENCIA: el HTML inline se inyecta con `dangerouslySetInnerHTML`. No pases
|
|
195
|
+
* como `text` contenido no confiable sin sanitizarlo antes (riesgo de XSS).
|
|
196
|
+
*/
|
|
197
|
+
declare function TextAnimate({ text, as, by, type, duration, startDelay, highlight, highlightClassName, reducedMotion, ...props }: TextAnimateProps): ReactElement;
|
|
198
|
+
|
|
199
|
+
export { type CounterOptions, type DragConstraints, Draggable, type DraggableOptions, type DraggableProps, Marquee, type MarqueeKeyframes, type MarqueeKeyframesOptions, type MarqueeOptions, type MarqueeProps, type ResolvedCounterOptions, type ResolvedDragBounds, type ResolvedDraggableOptions, type ResolvedMarqueeOptions, type ResolvedTextAnimateOptions, TextAnimate, type TextAnimateBy, type TextAnimateOptions, type TextAnimateProps, type TextAnimateType, type TextAnimationParams, type UseCounterResult, buildMarqueeKeyframes, buildSnapModifier, counterOptionsSchema, dragConstraintsSchema, draggableOptionsSchema, formatCounterValue, getAnimationParams, getDragConstraintsProp, getHighlightRanges, hasInvalidBounds, isWordHighlighted, marqueeOptionsSchema, resolveDragConstraints, splitText, textAnimateOptionsSchema, useCounter };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Draggable, Marquee, TextAnimate, buildMarqueeKeyframes, buildSnapModifier, counterOptionsSchema, dragConstraintsSchema, draggableOptionsSchema, formatCounterValue, getAnimationParams, getDragConstraintsProp, getHighlightRanges, hasInvalidBounds, isWordHighlighted, marqueeOptionsSchema, resolveDragConstraints, splitText, textAnimateOptionsSchema, useCounter } from './chunk-GU3ZCMLK.js';
|
|
2
|
+
import './chunk-PFZKSPJW.js';
|
|
3
|
+
//# sourceMappingURL=components.js.map
|
|
4
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"components.js"}
|