@nadicodeai/ui 0.10.0 → 0.10.2
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/AGENTS.md +2 -2
- package/README.md +1 -1
- package/dist/components/ai-elements/code-block.d.ts.map +1 -1
- package/dist/components/ai-elements/code-block.js +9 -23
- package/dist/components/ai-elements/commit.d.ts.map +1 -1
- package/dist/components/ai-elements/commit.js +9 -23
- package/dist/components/ai-elements/context.d.ts.map +1 -1
- package/dist/components/ai-elements/context.js +21 -39
- package/dist/components/ai-elements/environment-variables.d.ts.map +1 -1
- package/dist/components/ai-elements/environment-variables.js +4 -29
- package/dist/components/ai-elements/shimmer.d.ts.map +1 -1
- package/dist/components/ai-elements/shimmer.js +12 -8
- package/dist/components/ai-elements/snippet.d.ts.map +1 -1
- package/dist/components/ai-elements/snippet.js +9 -23
- package/dist/components/ai-elements/stack-trace.d.ts.map +1 -1
- package/dist/components/ai-elements/stack-trace.js +8 -21
- package/dist/components/ai-elements/terminal.d.ts.map +1 -1
- package/dist/components/ai-elements/terminal.js +8 -21
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +3 -2
- package/dist/components/badge.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/carousel.js +2 -1
- package/dist/components/chart-time-series.d.ts.map +1 -1
- package/dist/components/chart-time-series.js +2 -2
- package/dist/components/chart.js +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +3 -2
- package/dist/components/diff-count.d.ts.map +1 -1
- package/dist/components/diff-count.js +10 -2
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +2 -1
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/files-preview.d.ts.map +1 -1
- package/dist/components/files-preview.js +2 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/logo-band.d.ts.map +1 -1
- package/dist/components/logo-band.js +8 -8
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +2 -1
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +2 -1
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +3 -2
- package/dist/components/sidebar.js +1 -1
- package/dist/components/stats-band.d.ts.map +1 -1
- package/dist/components/stats-band.js +8 -8
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +2 -1
- package/dist/lib/message-scroller-primitive/geometry.d.ts +1 -5
- package/dist/lib/message-scroller-primitive/geometry.d.ts.map +1 -1
- package/dist/lib/message-scroller-primitive/geometry.js +1 -1
- package/dist/lib/message-scroller-primitive/stores.d.ts +2 -3
- package/dist/lib/message-scroller-primitive/stores.d.ts.map +1 -1
- package/dist/lib/message-scroller-primitive/stores.js +1 -1
- package/dist/lib/message-scroller-primitive/types.d.ts +1 -2
- package/dist/lib/message-scroller-primitive/types.d.ts.map +1 -1
- package/dist/lib/message-scroller-primitive/types.js +1 -1
- package/dist/lib/motion.d.ts +12 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/motion.js +11 -0
- package/dist/lib/use-copy-to-clipboard.d.ts +11 -0
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/lib/use-copy-to-clipboard.js +27 -0
- package/dist/styles/globals.css +1 -0
- package/docs/agents/nadicodeai-ui.md +1 -1
- package/package.json +2 -2
- package/skills/nadicodeai-ui/SKILL.md +21 -0
|
@@ -82,8 +82,7 @@ type MessageScrollerContextValue = {
|
|
|
82
82
|
visibilityStore: MessageScrollerVisibilityStore;
|
|
83
83
|
};
|
|
84
84
|
declare const EMPTY_MESSAGE_SCROLLER_SCROLLABLE: MessageScrollerScrollable;
|
|
85
|
-
declare const EMPTY_VISIBLE_MESSAGE_IDS: string[];
|
|
86
85
|
declare const EMPTY_MESSAGE_SCROLLER_VISIBILITY_STATE: MessageScrollerVisibilityState;
|
|
87
|
-
export { AUTOSCROLLING_CLEAR_DELAY, DEFAULT_SCROLL_EDGE_THRESHOLD, DEFAULT_SCROLL_MARGIN, DEFAULT_SCROLL_PREVIOUS_ITEM_PEEK, EMPTY_MESSAGE_SCROLLER_SCROLLABLE, EMPTY_MESSAGE_SCROLLER_VISIBILITY_STATE,
|
|
86
|
+
export { AUTOSCROLLING_CLEAR_DELAY, DEFAULT_SCROLL_EDGE_THRESHOLD, DEFAULT_SCROLL_MARGIN, DEFAULT_SCROLL_PREVIOUS_ITEM_PEEK, EMPTY_MESSAGE_SCROLLER_SCROLLABLE, EMPTY_MESSAGE_SCROLLER_VISIBILITY_STATE, SCROLL_POSITION_EPSILON, USER_SCROLL_KEYS, };
|
|
88
87
|
export type { MessageScrollerButtonDirection, MessageScrollerButtonProps, MessageScrollerButtonRenderState, MessageScrollerContentProps, MessageScrollerContextValue, MessageScrollerDefaultScrollPosition, MessageScrollerItemProps, MessageScrollerMode, MessageScrollerProps, MessageScrollerProviderProps, MessageScrollerRegisterMessage, MessageScrollerScrollAlign, MessageScrollerScrollOptions, MessageScrollerScrollable, MessageScrollerStore, MessageScrollerViewportProps, MessageScrollerVisibilityState, MessageScrollerVisibilityStore, };
|
|
89
88
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/message-scroller-primitive/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAI5D,QAAA,MAAM,6BAA6B,IAAI,CAAC;AAIxC,QAAA,MAAM,iCAAiC,KAAK,CAAC;AAG7C,QAAA,MAAM,qBAAqB,IAAI,CAAC;AAIhC,QAAA,MAAM,uBAAuB,MAAM,C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C,CAAC;AAEF,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,iCAAiC,EACjC,iCAAiC,EACjC,uCAAuC,EACvC,uBAAuB,EACvB,gBAAgB,GACjB,CAAC;AAEF,YAAY,EACV,8BAA8B,EAC9B,0BAA0B,EAC1B,gCAAgC,EAChC,2BAA2B,EAC3B,2BAA2B,EAC3B,oCAAoC,EACpC,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,GAC/B,CAAC"}
|
|
@@ -37,4 +37,4 @@ const EMPTY_MESSAGE_SCROLLER_VISIBILITY_STATE = {
|
|
|
37
37
|
currentAnchorId: null,
|
|
38
38
|
visibleMessageIds: EMPTY_VISIBLE_MESSAGE_IDS,
|
|
39
39
|
};
|
|
40
|
-
export { AUTOSCROLLING_CLEAR_DELAY, DEFAULT_SCROLL_EDGE_THRESHOLD, DEFAULT_SCROLL_MARGIN, DEFAULT_SCROLL_PREVIOUS_ITEM_PEEK, EMPTY_MESSAGE_SCROLLER_SCROLLABLE, EMPTY_MESSAGE_SCROLLER_VISIBILITY_STATE,
|
|
40
|
+
export { AUTOSCROLLING_CLEAR_DELAY, DEFAULT_SCROLL_EDGE_THRESHOLD, DEFAULT_SCROLL_MARGIN, DEFAULT_SCROLL_PREVIOUS_ITEM_PEEK, EMPTY_MESSAGE_SCROLLER_SCROLLABLE, EMPTY_MESSAGE_SCROLLER_VISIBILITY_STATE, SCROLL_POSITION_EPSILON, USER_SCROLL_KEYS, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared motion classes for Base UI overlay primitives.
|
|
3
|
+
*
|
|
4
|
+
* Keeping these states behind one internal seam makes token timing and reduced
|
|
5
|
+
* motion part of every public primitive that consumes them. Base UI supplies
|
|
6
|
+
* the lifecycle attributes and transform origin; the classes only style them.
|
|
7
|
+
*/
|
|
8
|
+
declare const overlayBackdropMotion = "transition-opacity duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-starting-style:opacity-100";
|
|
9
|
+
declare const anchoredOverlayMotion = "origin-(--transform-origin) transition-[opacity,scale] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-instant:transition-none data-ending-style:opacity-0 data-ending-style:scale-[0.98] data-starting-style:opacity-0 data-starting-style:scale-[0.98] motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-starting-style:opacity-100 motion-reduce:data-starting-style:scale-100";
|
|
10
|
+
declare const modalOverlayMotion = "transition-[opacity,scale] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-ending-style:scale-[0.98] data-starting-style:opacity-0 data-starting-style:scale-[0.98] motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-starting-style:opacity-100 motion-reduce:data-starting-style:scale-100";
|
|
11
|
+
export { anchoredOverlayMotion, modalOverlayMotion, overlayBackdropMotion };
|
|
12
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,2TAC+R,CAAC;AAE3T,QAAA,MAAM,qBAAqB,khBACsf,CAAC;AAElhB,QAAA,MAAM,kBAAkB,ydACgc,CAAC;AAEzd,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared motion classes for Base UI overlay primitives.
|
|
3
|
+
*
|
|
4
|
+
* Keeping these states behind one internal seam makes token timing and reduced
|
|
5
|
+
* motion part of every public primitive that consumes them. Base UI supplies
|
|
6
|
+
* the lifecycle attributes and transform origin; the classes only style them.
|
|
7
|
+
*/
|
|
8
|
+
const overlayBackdropMotion = "transition-opacity duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-starting-style:opacity-100";
|
|
9
|
+
const anchoredOverlayMotion = "origin-(--transform-origin) transition-[opacity,scale] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-instant:transition-none data-ending-style:opacity-0 data-ending-style:scale-[0.98] data-starting-style:opacity-0 data-starting-style:scale-[0.98] motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-starting-style:opacity-100 motion-reduce:data-starting-style:scale-100";
|
|
10
|
+
const modalOverlayMotion = "transition-[opacity,scale] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-ending-style:scale-[0.98] data-starting-style:opacity-0 data-starting-style:scale-[0.98] motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-starting-style:opacity-100 motion-reduce:data-starting-style:scale-100";
|
|
11
|
+
export { anchoredOverlayMotion, modalOverlayMotion, overlayBackdropMotion };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function useCopyToClipboard({ text, onCopy, onError, timeout, skipWhileCopied, }: {
|
|
2
|
+
text: string;
|
|
3
|
+
onCopy?: () => void;
|
|
4
|
+
onError?: (error: Error) => void;
|
|
5
|
+
timeout: number;
|
|
6
|
+
skipWhileCopied?: boolean;
|
|
7
|
+
}): {
|
|
8
|
+
copyToClipboard: () => Promise<void>;
|
|
9
|
+
isCopied: boolean;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=use-copy-to-clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/lib/use-copy-to-clipboard.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAuB,GACxB,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;EA+BA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
export function useCopyToClipboard({ text, onCopy, onError, timeout, skipWhileCopied = false, }) {
|
|
3
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
4
|
+
const timeoutRef = useRef(0);
|
|
5
|
+
const copyToClipboard = useCallback(async () => {
|
|
6
|
+
if (typeof window === "undefined" || !navigator?.clipboard?.writeText) {
|
|
7
|
+
onError?.(new Error("Clipboard API not available"));
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (skipWhileCopied && isCopied) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
await navigator.clipboard.writeText(text);
|
|
15
|
+
setIsCopied(true);
|
|
16
|
+
onCopy?.();
|
|
17
|
+
timeoutRef.current = window.setTimeout(() => setIsCopied(false), timeout);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
onError?.(error);
|
|
21
|
+
}
|
|
22
|
+
}, [isCopied, onCopy, onError, skipWhileCopied, text, timeout]);
|
|
23
|
+
useEffect(() => () => {
|
|
24
|
+
window.clearTimeout(timeoutRef.current);
|
|
25
|
+
}, []);
|
|
26
|
+
return { copyToClipboard, isCopied };
|
|
27
|
+
}
|
package/dist/styles/globals.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
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.
|
|
66
|
+
"@nadicodeai/design-system": "0.10.2",
|
|
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,27 @@ 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`. Shared Button and overlay primitives use that contract at their public boundary. Audit other package components rather than assuming every older animation 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-msg-in` (360ms, one-time entrance only). `--nc-duration-reflow` remains defined only as a deprecated 0.10.x compatibility token; it is not adopted for runtime motion and is eligible for removal in a breaking release. Add no timing token without an approved first semantic use.
|
|
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 individual `translate`/`scale` properties and `opacity` without taking over a consumer's full `transform`; 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
|
+
- **NumberFlow is not adopted:** values on repeated money, usage, and KPI surfaces update immediately; no count-up.
|
|
92
|
+
- **AutoAnimate is not adopted:** repeated tables, lists, and queues remain spatially stable; no row reflow choreography.
|
|
93
|
+
- **View Transitions are not adopted:** do not enable experimental Next integration or animate routes/tabs.
|
|
94
|
+
- Rive is confined to an approved versioned asset on a rare onboarding or first-run boundary. No approved asset means no runtime surface.
|
|
95
|
+
- Do not add parallax, scroll-jacking, gradient shimmer, staggered letter reveals, idle loops, or a spinner/pulse for operational state.
|
|
96
|
+
|
|
76
97
|
## Verification
|
|
77
98
|
|
|
78
99
|
```bash
|