@nikitph/flux-ui 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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +310 -0
  3. package/dist/config/flux.config.d.ts +36 -0
  4. package/dist/context/FluxProvider.d.ts +11 -0
  5. package/dist/hooks/useAnimationBudget.d.ts +7 -0
  6. package/dist/hooks/useInView.d.ts +3 -0
  7. package/dist/hooks/useIsClient.d.ts +1 -0
  8. package/dist/hooks/useMergedRef.d.ts +2 -0
  9. package/dist/hooks/usePhysics.d.ts +7 -0
  10. package/dist/hooks/usePrefersReducedMotion.d.ts +1 -0
  11. package/dist/hooks/useReducedMotion.d.ts +1 -0
  12. package/dist/hooks/useScrollProgress.d.ts +2 -0
  13. package/dist/index.d.ts +53 -0
  14. package/dist/index.js +3330 -0
  15. package/dist/index.js.map +7 -0
  16. package/dist/primitives/01-reveal.d.ts +22 -0
  17. package/dist/primitives/02-presence.d.ts +15 -0
  18. package/dist/primitives/03-stagger.d.ts +23 -0
  19. package/dist/primitives/04-text-reveal.d.ts +21 -0
  20. package/dist/primitives/05-count-up.d.ts +22 -0
  21. package/dist/primitives/06-morph-text.d.ts +19 -0
  22. package/dist/primitives/07-flip-card.d.ts +17 -0
  23. package/dist/primitives/08-collapse.d.ts +16 -0
  24. package/dist/primitives/09-magnetic.d.ts +14 -0
  25. package/dist/primitives/10-hover-scale.d.ts +16 -0
  26. package/dist/primitives/11-tilt.d.ts +20 -0
  27. package/dist/primitives/12-drag.d.ts +31 -0
  28. package/dist/primitives/13-swipe.d.ts +20 -0
  29. package/dist/primitives/14-long-press.d.ts +18 -0
  30. package/dist/primitives/15-hover-3d.d.ts +23 -0
  31. package/dist/primitives/16-scroll-velocity.d.ts +15 -0
  32. package/dist/primitives/17-spotlight.d.ts +17 -0
  33. package/dist/primitives/18-follow-cursor.d.ts +20 -0
  34. package/dist/primitives/19-morph.d.ts +14 -0
  35. package/dist/primitives/20-fluid-layout.d.ts +14 -0
  36. package/dist/primitives/21-reorder.d.ts +25 -0
  37. package/dist/primitives/22-page-transition.d.ts +16 -0
  38. package/dist/primitives/23-animated-list.d.ts +20 -0
  39. package/dist/primitives/24-marquee.d.ts +16 -0
  40. package/dist/primitives/25-dock.d.ts +25 -0
  41. package/dist/primitives/26-infinite-scroll.d.ts +21 -0
  42. package/dist/primitives/27-scroll-progress.d.ts +14 -0
  43. package/dist/primitives/28-parallax.d.ts +11 -0
  44. package/dist/primitives/29-sticky-scroll.d.ts +14 -0
  45. package/dist/primitives/30-scroll-snap.d.ts +22 -0
  46. package/dist/primitives/31-aurora.d.ts +12 -0
  47. package/dist/primitives/32-mesh-gradient.d.ts +9 -0
  48. package/dist/primitives/33-particles.d.ts +11 -0
  49. package/dist/primitives/34-grid-pattern.d.ts +10 -0
  50. package/dist/primitives/35-noise.d.ts +9 -0
  51. package/dist/primitives/36-streaming-text.d.ts +14 -0
  52. package/dist/primitives/37-typing-indicator.d.ts +10 -0
  53. package/dist/primitives/38-skeleton.d.ts +13 -0
  54. package/dist/primitives/39-ai-message.d.ts +13 -0
  55. package/dist/primitives/40-hero-highlight.d.ts +13 -0
  56. package/dist/utils/clamp.d.ts +1 -0
  57. package/dist/utils/resolveMotion.d.ts +2 -0
  58. package/dist/utils/slot.d.ts +4 -0
  59. package/package.json +86 -0
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface NoiseProps {
3
+ opacity?: number;
4
+ blendMode?: React.CSSProperties["mixBlendMode"];
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const Noise: React.ForwardRefExoticComponent<NoiseProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { PhysicsPreset } from "../config/flux.config";
3
+ export interface StreamingTextProps {
4
+ text: string;
5
+ speed?: number;
6
+ cursor?: boolean;
7
+ cursorChar?: string;
8
+ physics?: PhysicsPreset;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ onComplete?: () => void;
12
+ disabled?: boolean;
13
+ }
14
+ export declare const StreamingText: React.ForwardRefExoticComponent<StreamingTextProps & React.RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface TypingIndicatorProps {
3
+ color?: string;
4
+ size?: number;
5
+ speed?: number;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ disabled?: boolean;
9
+ }
10
+ export declare const TypingIndicator: React.ForwardRefExoticComponent<TypingIndicatorProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export interface SkeletonProps {
3
+ width?: number | string;
4
+ height?: number | string;
5
+ borderRadius?: number | string;
6
+ baseColor?: string;
7
+ highlightColor?: string;
8
+ speed?: number;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ disabled?: boolean;
12
+ }
13
+ export declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { PhysicsPreset } from "../config/flux.config";
3
+ export interface AIMessageProps {
4
+ children: React.ReactNode;
5
+ role?: "user" | "assistant" | "system";
6
+ avatar?: React.ReactNode;
7
+ delay?: number;
8
+ physics?: PhysicsPreset;
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ disabled?: boolean;
12
+ }
13
+ export declare const AIMessage: React.ForwardRefExoticComponent<AIMessageProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export interface HeroHighlightProps {
3
+ children: React.ReactNode;
4
+ containerClassName?: string;
5
+ className?: string;
6
+ color?: string;
7
+ disabled?: boolean;
8
+ }
9
+ export declare const HeroHighlight: React.ForwardRefExoticComponent<HeroHighlightProps & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const Highlight: ({ children, className, }: {
11
+ children: React.ReactNode;
12
+ className?: string;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function clamp(val: number, min: number, max: number): number;
@@ -0,0 +1,2 @@
1
+ import { PhysicsPreset } from "../config/flux.config";
2
+ export declare function resolveMotion(preset: PhysicsPreset | undefined, overrideSpring: any, isReducedMotion: boolean): any;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const Slot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
3
+ children?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@nikitph/flux-ui",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "A motion-first, physics-based React component library. 40 composable primitives that turn animation from a feature into a language.",
6
+ "keywords": [
7
+ "react",
8
+ "motion",
9
+ "animation",
10
+ "physics",
11
+ "framer-motion",
12
+ "ui",
13
+ "components",
14
+ "primitives",
15
+ "tailwindcss",
16
+ "spring",
17
+ "gesture",
18
+ "scroll",
19
+ "ai",
20
+ "streaming",
21
+ "accessible"
22
+ ],
23
+ "author": "CREDIT IQ",
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/credit-iq/flux-ui"
28
+ },
29
+ "homepage": "https://github.com/credit-iq/flux-ui#readme",
30
+ "main": "./dist/index.js",
31
+ "module": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "exports": {
34
+ ".": {
35
+ "import": "./dist/index.js",
36
+ "types": "./dist/index.d.ts"
37
+ }
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "README.md",
42
+ "LICENSE"
43
+ ],
44
+ "sideEffects": false,
45
+ "scripts": {
46
+ "dev": "vite",
47
+ "build": "tsc -b && vite build",
48
+ "build:lib": "node build.mjs && tsc --project tsconfig.build.json",
49
+ "lint": "eslint .",
50
+ "preview": "vite preview",
51
+ "prepublishOnly": "npm run build:lib"
52
+ },
53
+ "peerDependencies": {
54
+ "motion": ">=12.0.0",
55
+ "react": ">=19.0.0",
56
+ "react-dom": ">=19.0.0",
57
+ "tailwindcss": ">=4.0.0"
58
+ },
59
+ "dependencies": {
60
+ "@radix-ui/react-slot": "^1.2.4",
61
+ "clsx": "^2.1.1",
62
+ "tailwind-merge": "^3.5.0"
63
+ },
64
+ "devDependencies": {
65
+ "@esbuild/linux-arm64": "^0.27.3",
66
+ "@eslint/js": "^9.39.1",
67
+ "@rollup/rollup-linux-arm64-gnu": "^4.58.0",
68
+ "@tailwindcss/vite": "^4.2.0",
69
+ "@types/node": "^24.10.1",
70
+ "@types/react": "^19.2.7",
71
+ "@types/react-dom": "^19.2.3",
72
+ "@vitejs/plugin-react": "^5.1.1",
73
+ "esbuild": "^0.27.3",
74
+ "eslint": "^9.39.1",
75
+ "eslint-plugin-react-hooks": "^7.0.1",
76
+ "eslint-plugin-react-refresh": "^0.4.24",
77
+ "globals": "^16.5.0",
78
+ "motion": "^12.34.2",
79
+ "react": "^19.2.0",
80
+ "react-dom": "^19.2.0",
81
+ "tailwindcss": "^4.2.0",
82
+ "typescript": "~5.9.3",
83
+ "typescript-eslint": "^8.48.0",
84
+ "vite": "^7.3.1"
85
+ }
86
+ }