@nadicodeai/ui 0.10.0 → 0.10.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,yBAAyB,CAAC;AAGxF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAU5C,KAAK,OAAO,GAAG,MAAM,CAAC;AAEtB,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAcD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG,aAAa,CAAC;AAE5E,eAAO,MAAM,OAAO,GAAI,qDAAqD,YAAY,gCAWxF,CAAC;AA2CF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,cAAc,GAAI,wBAAwB,mBAAmB,gCAsBzE,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1E,eAAO,MAAM,cAAc,GAAI,yBAAyB,mBAAmB,gCAE1E,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE9D,eAAO,MAAM,oBAAoB,GAAI,mCAIlC,yBAAyB,gCA+B3B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;A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AO,MAAM,iBAAiB,GAAI,mCAAmC,sBAAsB,iVA0B1F,CAAC"}
@@ -11,6 +11,17 @@ const ICON_RADIUS = 10;
11
11
  const ICON_VIEWBOX = 24;
12
12
  const ICON_CENTER = 12;
13
13
  const ICON_STROKE_WIDTH = 2;
14
+ const PERCENT_FORMATTER = new Intl.NumberFormat("en-US", {
15
+ maximumFractionDigits: 1,
16
+ style: "percent",
17
+ });
18
+ const COMPACT_NUMBER_FORMATTER = new Intl.NumberFormat("en-US", {
19
+ notation: "compact",
20
+ });
21
+ const USD_FORMATTER = new Intl.NumberFormat("en-US", {
22
+ currency: "USD",
23
+ style: "currency",
24
+ });
14
25
  const ContextContext = createContext(null);
15
26
  const useContextValue = () => {
16
27
  const context = useContext(ContextContext);
@@ -33,10 +44,7 @@ const ContextIcon = () => {
33
44
  export const ContextTrigger = ({ children, ...props }) => {
34
45
  const { usedTokens, maxTokens } = useContextValue();
35
46
  const usedPercent = usedTokens / maxTokens;
36
- const renderedPercent = new Intl.NumberFormat("en-US", {
37
- maximumFractionDigits: 1,
38
- style: "percent",
39
- }).format(usedPercent);
47
+ const renderedPercent = PERCENT_FORMATTER.format(usedPercent);
40
48
  const trigger = isValidElement(children) ? (children) : (_jsx(Button, { type: "button", variant: "ghost", ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx("span", { className: "font-medium text-muted-foreground", children: renderedPercent }), _jsx(ContextIcon, {})] })) }));
41
49
  return _jsx(HoverCardTrigger, { closeDelay: 0, delay: 0, render: trigger });
42
50
  };
@@ -44,16 +52,9 @@ export const ContextContent = ({ className, ...props }) => (_jsx(HoverCardConten
44
52
  export const ContextContentHeader = ({ children, className, ...props }) => {
45
53
  const { usedTokens, maxTokens } = useContextValue();
46
54
  const usedPercent = usedTokens / maxTokens;
47
- const displayPct = new Intl.NumberFormat("en-US", {
48
- maximumFractionDigits: 1,
49
- style: "percent",
50
- }).format(usedPercent);
51
- const used = new Intl.NumberFormat("en-US", {
52
- notation: "compact",
53
- }).format(usedTokens);
54
- const total = new Intl.NumberFormat("en-US", {
55
- notation: "compact",
56
- }).format(maxTokens);
55
+ const displayPct = PERCENT_FORMATTER.format(usedPercent);
56
+ const used = COMPACT_NUMBER_FORMATTER.format(usedTokens);
57
+ const total = COMPACT_NUMBER_FORMATTER.format(maxTokens);
57
58
  return (_jsx("div", { className: cn("flex w-full flex-col gap-2 p-3", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-xs", children: [_jsx("p", { children: displayPct }), _jsxs("p", { className: "font-mono text-muted-foreground", children: [used, " / ", total] })] }), _jsx("div", { className: "flex flex-col gap-2", children: _jsx(Progress, { className: "bg-muted", value: usedPercent * PERCENT_MAX }) })] })) }));
58
59
  };
59
60
  export const ContextContentBody = ({ children, className, ...props }) => (_jsx("div", { className: cn("w-full p-3", className), ...props, children: children }));
@@ -68,17 +69,10 @@ export const ContextContentFooter = ({ children, className, ...props }) => {
68
69
  },
69
70
  }).costUSD?.totalUSD
70
71
  : undefined;
71
- const totalCost = new Intl.NumberFormat("en-US", {
72
- currency: "USD",
73
- style: "currency",
74
- }).format(costUSD ?? 0);
72
+ const totalCost = USD_FORMATTER.format(costUSD ?? 0);
75
73
  return (_jsx("div", { className: cn("flex w-full items-center justify-between gap-3 bg-secondary p-3 text-xs", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground", children: "Total cost" }), _jsx("span", { children: totalCost })] })) }));
76
74
  };
77
- const TokensWithCost = ({ tokens, costText }) => (_jsxs("span", { children: [tokens === undefined
78
- ? "—"
79
- : new Intl.NumberFormat("en-US", {
80
- notation: "compact",
81
- }).format(tokens), costText ? _jsxs("span", { className: "ml-2 text-muted-foreground", children: ["\u2022 ", costText] }) : null] }));
75
+ const TokensWithCost = ({ tokens, costText }) => (_jsxs("span", { children: [tokens === undefined ? "—" : COMPACT_NUMBER_FORMATTER.format(tokens), costText ? _jsxs("span", { className: "ml-2 text-muted-foreground", children: ["\u2022 ", costText] }) : null] }));
82
76
  export const ContextInputUsage = ({ className, children, ...props }) => {
83
77
  const { usage, modelId } = useContextValue();
84
78
  const inputTokens = usage?.inputTokens ?? 0;
@@ -94,10 +88,7 @@ export const ContextInputUsage = ({ className, children, ...props }) => {
94
88
  usage: { input: inputTokens, output: 0 },
95
89
  }).costUSD?.totalUSD
96
90
  : undefined;
97
- const inputCostText = new Intl.NumberFormat("en-US", {
98
- currency: "USD",
99
- style: "currency",
100
- }).format(inputCost ?? 0);
91
+ const inputCostText = USD_FORMATTER.format(inputCost ?? 0);
101
92
  return (_jsxs("div", { className: cn("flex items-center justify-between text-xs", className), ...props, children: [_jsx("span", { className: "text-muted-foreground", children: "Input" }), _jsx(TokensWithCost, { costText: inputCostText, tokens: inputTokens })] }));
102
93
  };
103
94
  export const ContextOutputUsage = ({ className, children, ...props }) => {
@@ -115,10 +106,7 @@ export const ContextOutputUsage = ({ className, children, ...props }) => {
115
106
  usage: { input: 0, output: outputTokens },
116
107
  }).costUSD?.totalUSD
117
108
  : undefined;
118
- const outputCostText = new Intl.NumberFormat("en-US", {
119
- currency: "USD",
120
- style: "currency",
121
- }).format(outputCost ?? 0);
109
+ const outputCostText = USD_FORMATTER.format(outputCost ?? 0);
122
110
  return (_jsxs("div", { className: cn("flex items-center justify-between text-xs", className), ...props, children: [_jsx("span", { className: "text-muted-foreground", children: "Output" }), _jsx(TokensWithCost, { costText: outputCostText, tokens: outputTokens })] }));
123
111
  };
124
112
  export const ContextReasoningUsage = ({ className, children, ...props }) => {
@@ -136,10 +124,7 @@ export const ContextReasoningUsage = ({ className, children, ...props }) => {
136
124
  usage: { reasoningTokens },
137
125
  }).costUSD?.totalUSD
138
126
  : undefined;
139
- const reasoningCostText = new Intl.NumberFormat("en-US", {
140
- currency: "USD",
141
- style: "currency",
142
- }).format(reasoningCost ?? 0);
127
+ const reasoningCostText = USD_FORMATTER.format(reasoningCost ?? 0);
143
128
  return (_jsxs("div", { className: cn("flex items-center justify-between text-xs", className), ...props, children: [_jsx("span", { className: "text-muted-foreground", children: "Reasoning" }), _jsx(TokensWithCost, { costText: reasoningCostText, tokens: reasoningTokens })] }));
144
129
  };
145
130
  export const ContextCacheUsage = ({ className, children, ...props }) => {
@@ -157,9 +142,6 @@ export const ContextCacheUsage = ({ className, children, ...props }) => {
157
142
  usage: { cacheReads: cacheTokens, input: 0, output: 0 },
158
143
  }).costUSD?.totalUSD
159
144
  : undefined;
160
- const cacheCostText = new Intl.NumberFormat("en-US", {
161
- currency: "USD",
162
- style: "currency",
163
- }).format(cacheCost ?? 0);
145
+ const cacheCostText = USD_FORMATTER.format(cacheCost ?? 0);
164
146
  return (_jsxs("div", { className: cn("flex items-center justify-between text-xs", className), ...props, children: [_jsx("span", { className: "text-muted-foreground", children: "Cache" }), _jsx(TokensWithCost, { costText: cacheCostText, tokens: cacheTokens })] }));
165
147
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shimmer.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/shimmer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAiB,WAAW,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAoB7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwCD,eAAO,MAAM,OAAO,kGAhCjB,gBAAgB,iBAgC0B,CAAC"}
1
+ {"version":3,"file":"shimmer.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/shimmer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,WAAW,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAsB7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8CD,eAAO,MAAM,OAAO,kGAtCjB,gBAAgB,iBAsC0B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from "../../lib/utils.js";
4
- import { motion } from "motion/react";
3
+ import { motion, useReducedMotion } from "motion/react";
5
4
  import { memo, useMemo } from "react";
5
+ import { cn } from "../../lib/utils.js";
6
6
  // Cache motion components at module level to avoid creating during render
7
7
  const motionComponentCache = new Map();
8
8
  const getMotionComponent = (element) => {
@@ -14,15 +14,19 @@ const getMotionComponent = (element) => {
14
14
  return component;
15
15
  };
16
16
  const ShimmerComponent = ({ children, as: Component = "p", className, duration = 2, spread = 2, }) => {
17
+ const shouldReduceMotion = useReducedMotion();
17
18
  const MotionComponent = getMotionComponent(Component);
18
19
  const dynamicSpread = useMemo(() => (children?.length ?? 0) * spread, [children, spread]);
19
- return (_jsx(MotionComponent, { animate: { backgroundPosition: "0% center" }, className: cn("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent", "[--bg:linear-gradient(90deg,transparent_calc(50%-var(--spread)),var(--color-background),transparent_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]", className), initial: { backgroundPosition: "100% center" }, style: {
20
+ return (_jsx(MotionComponent, { animate: shouldReduceMotion ? undefined : { backgroundPosition: "0% center" }, className: cn("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent", "[--bg:linear-gradient(90deg,transparent_calc(50%-var(--spread)),var(--color-background),transparent_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]", className), initial: shouldReduceMotion ? false : { backgroundPosition: "100% center" }, style: {
20
21
  "--spread": `${dynamicSpread}px`,
21
22
  backgroundImage: "var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
22
- }, transition: {
23
- duration,
24
- ease: "linear",
25
- repeat: Number.POSITIVE_INFINITY,
26
- }, children: children }));
23
+ ...(shouldReduceMotion ? { backgroundPosition: "50% center" } : {}),
24
+ }, transition: shouldReduceMotion
25
+ ? undefined
26
+ : {
27
+ duration,
28
+ ease: "linear",
29
+ repeat: Number.POSITIVE_INFINITY,
30
+ }, children: children }));
27
31
  };
28
32
  export const Shimmer = memo(ShimmerComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,gBAAgB,EAAE,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGnF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAChD,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAE/C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,WAAW,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAA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IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,qBAuBrC;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,qBAuBrC;AAED,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,CAAC"}
@@ -54,7 +54,8 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
54
54
  api.on("reInit", onSelect);
55
55
  api.on("select", onSelect);
56
56
  return () => {
57
- api?.off("select", onSelect);
57
+ api.off("reInit", onSelect);
58
+ api.off("select", onSelect);
58
59
  };
59
60
  }, [api, onSelect]);
60
61
  return (_jsx(CarouselContext.Provider, { value: {
@@ -1 +1 @@
1
- {"version":3,"file":"diff-count.d.ts","sourceRoot":"","sources":["../../src/components/diff-count.tsx"],"names":[],"mappings":"AAgBA,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,sCAoBzE;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"diff-count.d.ts","sourceRoot":"","sources":["../../src/components/diff-count.tsx"],"names":[],"mappings":"AA0BA,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,sCAoBzE;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,13 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { motion, useSpring, useTransform } from "motion/react";
3
+ import { motion, useReducedMotion, useSpring, useTransform } from "motion/react";
4
4
  import { useEffect } from "react";
5
5
  import { cn } from "../lib/utils.js";
6
6
  const SPRING = { stiffness: 320, damping: 30, mass: 0.5 };
7
7
  function AnimatedInt({ value }) {
8
+ const shouldReduceMotion = useReducedMotion();
8
9
  const spring = useSpring(value, SPRING);
9
10
  const text = useTransform(spring, (latest) => Math.round(latest).toString());
10
- useEffect(() => spring.set(value), [spring, value]);
11
+ useEffect(() => {
12
+ if (!shouldReduceMotion) {
13
+ spring.set(value);
14
+ }
15
+ }, [shouldReduceMotion, spring, value]);
16
+ if (shouldReduceMotion) {
17
+ return _jsx("span", { children: value });
18
+ }
11
19
  return _jsx(motion.span, { children: text });
12
20
  }
13
21
  function DiffCount({ added, removed, className, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,+BAW1E;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAAE,+BAYnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,C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,+BAa3E;AAED,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,+BAsBA;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;CAClD,sCAuCA;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,CAAC"}
@@ -56,7 +56,7 @@ function FieldError({ className, children, errors, ...props }) {
56
56
  if (uniqueErrors?.length == 1) {
57
57
  return uniqueErrors[0]?.message;
58
58
  }
59
- return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && _jsx("li", { children: error.message }, index)) }));
59
+ return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error) => error?.message && _jsx("li", { children: error.message }, error.message)) }));
60
60
  }, [children, errors]);
61
61
  if (!content) {
62
62
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"files-preview.d.ts","sourceRoot":"","sources":["../../src/components/files-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAgC,MAAM,oCAAoC,CAAC;AAE5F,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAKrC,M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ACL,YAAY,EACZ,oBAA2C,EAC3C,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CACL,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EACrC,iBAAiB,GAAG,UAAU,GAAG,kBAAkB,GAAG,UAAU,CACjE,GAAG;IACF,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CAC9C,qBAuCA;AA4CD,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,qBA2CA;AAED,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -9,6 +9,7 @@ import { Badge } from "./badge.js";
9
9
  import { FeedbackState } from "./feedback-state.js";
10
10
  import { cn } from "../lib/utils.js";
11
11
  const defaultCodeLanguage = "plaintext";
12
+ const EMPTY_EXPANDED_PATHS = [];
12
13
  const fileStatusMeta = {
13
14
  added: { label: "Added", icon: _jsx(CircleCheckIcon, { className: "size-3" }) },
14
15
  blocked: { label: "Blocked", icon: _jsx(CircleAlertIcon, { className: "size-3" }) },
@@ -50,7 +51,7 @@ function renderFileNode(node) {
50
51
  }
51
52
  return (_jsxs(FileTreeFile, { path: node.path, name: node.name, children: [_jsx("span", { className: "size-4 shrink-0" }), _jsx(FileIcon, { className: "size-4 shrink-0 text-muted-foreground" }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: node.name }), _jsx(FileStatusBadge, { status: node.status })] }, node.id));
52
53
  }
53
- function ProjectFileTree({ files, selectedPath, defaultExpandedPaths = [], expandedPaths, onExpandedPathsChange, onSelectFile, className, ...props }) {
54
+ function ProjectFileTree({ files, selectedPath, defaultExpandedPaths = EMPTY_EXPANDED_PATHS, expandedPaths, onExpandedPathsChange, onSelectFile, className, ...props }) {
54
55
  const nodeByPath = React.useMemo(() => collectNodes(files), [files]);
55
56
  const defaultExpanded = React.useMemo(() => new Set(defaultExpandedPaths), [defaultExpandedPaths]);
56
57
  const controlledExpanded = React.useMemo(() => (expandedPaths ? new Set(expandedPaths) : undefined), [expandedPaths]);
@@ -1 +1 @@
1
- {"version":3,"file":"logo-band.d.ts","sourceRoot":"","sources":["../../src/components/logo-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;GAaG;AAEH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,OAAW,EACX,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC5B,qBAcA;AAED,iBAAS,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,qBAEpE;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,qBAE5E;AAED,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"logo-band.d.ts","sourceRoot":"","sources":["../../src/components/logo-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;;;;;;;;;;;GAaG;AAEH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,OAAW,EACX,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC5B,qBAYA;AAED,iBAAS,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,qBAEpE;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,qBAE5E;AAED,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,6 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { seamSurfaceClass } from "../lib/seam.js";
4
+ const LOGO_GRID_COLUMNS = {
5
+ 2: "grid-cols-2",
6
+ 3: "grid-cols-2 sm:grid-cols-3",
7
+ 4: "grid-cols-2 sm:grid-cols-4",
8
+ 5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
9
+ 6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",
10
+ };
4
11
  /**
5
12
  * logo-band / integrations-grid — wall of monochrome marks (replaces the retired
6
13
  * `sections/logo-band.css` + `sections/integrations-grid.css` + their coupled
@@ -16,14 +23,7 @@ import { seamSurfaceClass } from "../lib/seam.js";
16
23
  * seam colour, never its weight. Token-only; no `dark:` styling.
17
24
  */
18
25
  function LogoGrid({ className, columns = 4, surface = "canvas", ...props }) {
19
- const cols = {
20
- 2: "grid-cols-2",
21
- 3: "grid-cols-2 sm:grid-cols-3",
22
- 4: "grid-cols-2 sm:grid-cols-4",
23
- 5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
24
- 6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",
25
- };
26
- return (_jsx("div", { className: cn("grid h-full gap-px", cols[columns], seamSurfaceClass(surface), className), ...props }));
26
+ return (_jsx("div", { className: cn("grid h-full gap-px", LOGO_GRID_COLUMNS[columns], seamSurfaceClass(surface), className), ...props }));
27
27
  }
28
28
  function LogoBand({ ...props }) {
29
29
  return _jsx(LogoGrid, { "data-slot": "logo-band", ...props });
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAUvE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ7E;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAE/D;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ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AQ7E;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAE/D;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,CAAC,GACnD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAE5B,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAa,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,qBAiB5F;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,qBAYjE;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,IAAa,EACb,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,qBAYjE;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAehF;AAED,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAC"}
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
3
3
  import { Button } from "./button.js";
4
4
  import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
5
5
  function Pagination({ className, ...props }) {
6
- return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
6
+ return (_jsx("nav", { "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
7
7
  }
8
8
  function PaginationContent({ className, ...props }) {
9
9
  return (_jsx("ul", { "data-slot": "pagination-content", className: cn("flex items-center gap-0.5", className), ...props }));
@@ -1 +1 @@
1
- {"version":3,"file":"stats-band.d.ts","sourceRoot":"","sources":["../../src/components/stats-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;GAUG;AAEH,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAW,EACX,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC5B,qBAiBA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"stats-band.d.ts","sourceRoot":"","sources":["../../src/components/stats-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B;;;;;;;;;;GAUG;AAEH,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAW,EACX,OAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAC5B,qBAUA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,6 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { SeamGrid } from "./seam-grid.js";
4
+ const STATS_BAND_COLUMNS = {
5
+ 2: "grid-cols-1 sm:grid-cols-2",
6
+ 3: "grid-cols-1 sm:grid-cols-3",
7
+ 4: "grid-cols-2 lg:grid-cols-4",
8
+ 5: "grid-cols-2 lg:grid-cols-5",
9
+ 6: "grid-cols-2 lg:grid-cols-6",
10
+ };
4
11
  /**
5
12
  * stats-band — proof row of headline statistics (replaces the retired
6
13
  * `sections/stats-band.css` + its coupled `stat-block` cells).
@@ -13,15 +20,8 @@ import { SeamGrid } from "./seam-grid.js";
13
20
  * Token-only; no `dark:` styling.
14
21
  */
15
22
  function StatsBand({ className, columns = 4, surface = "canvas", ...props }) {
16
- const cols = {
17
- 2: "grid-cols-1 sm:grid-cols-2",
18
- 3: "grid-cols-1 sm:grid-cols-3",
19
- 4: "grid-cols-2 lg:grid-cols-4",
20
- 5: "grid-cols-2 lg:grid-cols-5",
21
- 6: "grid-cols-2 lg:grid-cols-6",
22
- };
23
23
  return (
24
24
  // single-owner seam: SeamGrid owns every divider; ink flips only its colour.
25
- _jsx(SeamGrid, { "data-slot": "stats-band", surface: surface, className: cn("h-full", cols[columns], className), ...props }));
25
+ _jsx(SeamGrid, { "data-slot": "stats-band", surface: surface, className: cn("h-full", STATS_BAND_COLUMNS[columns], className), ...props }));
26
26
  }
27
27
  export { StatsBand };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@base-ui/react": "^1.6.0",
66
- "@nadicodeai/design-system": "0.10.0",
66
+ "@nadicodeai/design-system": "0.10.1",
67
67
  "@rive-app/react-webgl2": "^4.29.1",
68
68
  "@streamdown/cjk": "^1.0.3",
69
69
  "@streamdown/code": "^1.1.1",
@@ -73,6 +73,23 @@ import { AgentChat } from "@nadicodeai/ui/components/agent-chat";
73
73
  - Compose app pages/screens from existing package components; extract new shared UI only after a second concrete consumer, a plan-approved shared component, or a named validation slice proves the package boundary.
74
74
  - For source maintenance, run shadcn commands with `--dry-run` before writing and do not use `--overwrite` without explicit maintainer approval.
75
75
 
76
+ ## Motion
77
+
78
+ Importing `@nadicodeai/design-system/css` in Required Setup gives you the brand motion contract at the CSS layer: the tokens below plus the four sanctioned moves — **Settle** (entrance, once), **Type** (agent transcript rhythm), **Confirm** (state change, colour arrives with meaning), **Invite** (hover/press) — each honouring `prefers-reduced-motion`. That CSS is the guarantee. Individual React components are not all under the contract yet: a few still carry motion that predates it (for example the animated `Edge`'s indefinite loop and `Button`'s `transition-all`), so audit a component's motion against the rules below rather than assuming it already complies.
79
+
80
+ For any motion you add in your app, use the design-system tokens; never invent a `cubic-bezier` or a raw duration:
81
+
82
+ - Durations: `--nc-duration-confirm` (180ms, state feedback), `--nc-duration-open` (220ms) / `--nc-duration-close` (140ms, popover/dialog open vs dismiss), `--nc-duration-reflow` (250ms, medium-frequency UI — list reflow, rolling numbers), `--nc-duration-msg-in` (360ms, one-time entrance only).
83
+ - Easings: `--nc-ease-emphasized` (settle), `--nc-ease-out-strong` (feedback/press).
84
+
85
+ Rules for app-authored motion:
86
+
87
+ - **Animate only to carry meaning.** Motion a user meets repeatedly (product UI, keyboard actions) stays minimal — Confirm and Invite only. Save entrances and richer motion for rarely-seen surfaces.
88
+ - **Stay under 300ms** for UI feedback; open deliberate (`--nc-duration-open`) and close snappier (`--nc-duration-close`); popovers scale from their trigger, not screen-centre.
89
+ - **Compositor-only movement:** animate `transform`/`opacity`; a state change may transition `background-color`/`border-color`/`color` at `--nc-duration-confirm`; never `transition: all` or a layout-shifting property; gate hover behind `(hover: hover) and (pointer: fine)`.
90
+ - **The reduced-motion test:** under `prefers-reduced-motion: reduce` the surface must read identically motionless. If turning motion off changes what the user understands, cut the motion.
91
+ - Reach for a small library only for what the package doesn't cover, and keep it token-timed and reduced-motion-safe: rolling numbers → `@number-flow/react`; list/queue reflow → `@formkit/auto-animate`; route/tab transitions → the browser View Transitions API (on Next its `experimental.viewTransition` integration is flagged experimental and not recommended for production, so keep it to prototypes or gate it behind an explicit production decision with a no-transition fallback). Do not add parallax, scroll-jacking, gradient shimmer, staggered letter reveals, or a spinner/pulse for operational state.
92
+
76
93
  ## Verification
77
94
 
78
95
  ```bash