@danxbot/ui 9.0.0 → 10.0.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.
@@ -98,4 +98,4 @@ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProp
98
98
  ref?: Ref<HTMLSpanElement>;
99
99
  }
100
100
  export declare function Badge({ className, tone, size, dot, icon, pulse, dismiss, children, ref, ...props }: BadgeProps): import("react").JSX.Element;
101
- export { badge as badgeVariants };
101
+ export {};
@@ -160,4 +160,4 @@ export interface CalloutProps extends Omit<HTMLAttributes<HTMLDivElement>, "titl
160
160
  ref?: Ref<HTMLDivElement>;
161
161
  }
162
162
  export declare function Callout({ tone, emphasis, title, icon, children, actions, live, className, ref, ...props }: CalloutProps): import("react").JSX.Element;
163
- export { callout as calloutVariants };
163
+ export {};
@@ -1,53 +1,4 @@
1
1
  import { type ReactNode, type Ref } from "react";
2
- declare const readMore: import("tailwind-variants").TVReturnType<{
3
- [key: string]: {
4
- [key: string]: import("tailwind-variants").ClassValue | {
5
- bar?: import("tailwind-variants").ClassValue;
6
- content?: import("tailwind-variants").ClassValue;
7
- toggle?: import("tailwind-variants").ClassValue;
8
- root?: import("tailwind-variants").ClassValue;
9
- viewport?: import("tailwind-variants").ClassValue;
10
- };
11
- };
12
- } | {
13
- [x: string]: {
14
- [x: string]: import("tailwind-variants").ClassValue | {
15
- bar?: import("tailwind-variants").ClassValue;
16
- content?: import("tailwind-variants").ClassValue;
17
- toggle?: import("tailwind-variants").ClassValue;
18
- root?: import("tailwind-variants").ClassValue;
19
- viewport?: import("tailwind-variants").ClassValue;
20
- };
21
- };
22
- } | {}, {
23
- root: string;
24
- viewport: string[];
25
- content: string;
26
- bar: string;
27
- toggle: string;
28
- }, undefined, {
29
- [key: string]: {
30
- [key: string]: import("tailwind-variants").ClassValue | {
31
- bar?: import("tailwind-variants").ClassValue;
32
- content?: import("tailwind-variants").ClassValue;
33
- toggle?: import("tailwind-variants").ClassValue;
34
- root?: import("tailwind-variants").ClassValue;
35
- viewport?: import("tailwind-variants").ClassValue;
36
- };
37
- };
38
- } | {}, {
39
- root: string;
40
- viewport: string[];
41
- content: string;
42
- bar: string;
43
- toggle: string;
44
- }, import("tailwind-variants").TVReturnTypeLike<unknown, {
45
- root: string;
46
- viewport: string[];
47
- content: string;
48
- bar: string;
49
- toggle: string;
50
- }>>;
51
2
  export interface ReadMoreProps {
52
3
  /** Collapsed line count — how many rendered lines show before the fade strip. Must be a positive integer; anything else throws. */
53
4
  lines: number;
@@ -73,4 +24,3 @@ export interface ReadMoreProps {
73
24
  * is decided.
74
25
  */
75
26
  export declare function ReadMore({ lines, children, expanded: expandedProp, defaultExpanded, onExpandedChange, moreLabel, lessLabel, className, ref, }: ReadMoreProps): import("react").JSX.Element;
76
- export { readMore as readMoreVariants };
@@ -68,7 +68,6 @@ export interface ComponentPart {
68
68
  props?: Record<string, unknown>;
69
69
  }
70
70
  export type MessagePart = TextPart | CodePart | ReasoningPart | ToolPart | FilePart | ComponentPart;
71
- export type MessagePartType = MessagePart["type"];
72
71
  export interface ChatFile {
73
72
  id: string;
74
73
  name: string;
@@ -10,12 +10,12 @@
10
10
  */
11
11
  import "./styles/lib.css";
12
12
  export { Icon, type IconProps, type IconSize, type IconName } from "./components/Icon";
13
- export { registerIcon, registerIcons, getIcon, hasIcon, iconNames, type IconNode, type IconNodeChild, } from "./lib/icons";
13
+ export { getIcon, hasIcon, iconNames, type IconNode, type IconNodeChild, } from "./lib/icons";
14
14
  export { coreIcons, type CoreIconName } from "./icons/data";
15
- export { Button, buttonVariants, type ButtonProps } from "./components/Button";
15
+ export { Button, type ButtonProps } from "./components/Button";
16
16
  export { IconButton, type IconButtonProps, type IconButtonVariant, type IconButtonTone, } from "./components/IconButton";
17
- export { Badge, badgeVariants, type BadgeProps, type BadgeDismiss, } from "./components/Badge";
18
- export { Callout, calloutVariants, type CalloutProps } from "./components/Callout";
17
+ export { Badge, type BadgeProps, type BadgeDismiss, } from "./components/Badge";
18
+ export { Callout, type CalloutProps } from "./components/Callout";
19
19
  export { Spinner, type SpinnerProps } from "./components/Spinner";
20
20
  export { Skeleton, SkeletonText, LoadingOverlay, type SkeletonProps, type SkeletonTextProps, type LoadingOverlayProps, } from "./components/Loading";
21
21
  export { ErrorBoundary, type ErrorBoundaryProps } from "./components/ErrorBoundary";
@@ -64,7 +64,7 @@ export { DataTable, TableEmptyState, CellStack, type DataTableProps, type TableD
64
64
  export { CodeEditor, CodeEditorToolbar, CodeEditorCaption, CodeEditorCopyButton, CodeEditorWrapToggle, CodeEditorViewSwitch, type CodeEditorProps, type CodeEditorToolbarProps, type CodeEditorView, } from "./components/CodeEditor";
65
65
  export { Markdown, CodeBlock, type MarkdownProps, type CodeBlockProps } from "./components/Markdown";
66
66
  export { MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorHandle, } from "./components/MarkdownEditor";
67
- export { ReadMore, readMoreVariants, type ReadMoreProps } from "./components/ReadMore";
67
+ export { ReadMore, type ReadMoreProps } from "./components/ReadMore";
68
68
  export { MarkdownSurface, type SurfaceOptions, type Splice } from "./lib/markdown/surface";
69
69
  export { project, projectedText, ProjectionError } from "./lib/markdown/project";
70
70
  export type { Projection, PNode, PText, PElement } from "./lib/markdown/project";
@@ -91,7 +91,7 @@ export { DEFAULT_DRAG_STRINGS, DRAG_INSTRUCTIONS_ID, DragInstructions, DragLiveR
91
91
  export { Board, BoardColumn, BoardCard, BoardCardSurface, type BoardProps, type BoardColumnProps, type BoardCardProps, type BoardCardSurfaceProps, } from "./components/Board";
92
92
  export { buildBoardModel, resolveMove, applyBoardMoves, useBoard, type BoardModel, type UseBoardResult, } from "./lib/board";
93
93
  export type { BoardAccessors, BoardColumnDef, BoardColumnId, BoardColumnModel, BoardItemId, BoardMove, BoardMoveRequest, BoardMoveSource, BoardMoveVerdict, UseBoardOptions, } from "./lib/board";
94
- export type { MessageRole, MessagePart, MessagePartType, TextPart, CodePart, ReasoningPart, ToolPart, ToolStatus, FilePart, ComponentPart, ChatFile, ChatMessage, RenderContext, PartRenderer, PartRenderers, ChatComponentRenderer, ChatComponents, } from "./components/chat/types";
94
+ export type { MessageRole, MessagePart, TextPart, CodePart, ReasoningPart, ToolPart, ToolStatus, FilePart, ComponentPart, ChatFile, ChatMessage, RenderContext, PartRenderer, PartRenderers, ChatComponentRenderer, ChatComponents, } from "./components/chat/types";
95
95
  export { Chat, ChatPopover, type ChatProps, type ChatPopoverProps, type ChatSurface, } from "./components/chat/Chat";
96
96
  export { Message, MessagePartView, ToolCall, type MessageProps, type MessageAction, type MessagePartViewProps, type ToolCallProps, } from "./components/chat/Message";
97
97
  export { MessageScroller, type MessageScrollerProps, } from "./components/chat/MessageScroller";
@@ -105,7 +105,6 @@ export { cn } from "./lib/cn";
105
105
  export { formatBytes, formatTokens, formatCompactNumber } from "./lib/format";
106
106
  export { formatDate, parseDate, formatDateTime, parseDateTime, type FormatDateTimeOptions, type ParseDateTimeOptions, formatCurrency, parseCurrency, formatNumber, parseNumber, type FormatNumberOptions, formatBoolean, parseBoolean, type FormatBooleanOptions, } from "./lib/values";
107
107
  export { useFillHeight } from "./lib/use-fill-height";
108
- export { useDebouncedValue } from "./lib/use-debounced-value";
109
108
  export { useTheme, useUiScale, useContrast, useMotionPreference, type Theme, type UiScale, type ContrastPreference, type MotionPreference, } from "./lib/preferences";
110
109
  export { usePersistedState, readStored, writeStored, clearStored, storageKey, type PersistedStateOptions, } from "./lib/persist";
111
110
  export { CalendarMonth, type CalendarMonthProps } from "./components/calendar/CalendarMonth";
@@ -1,21 +1,18 @@
1
1
  /**
2
- * Icon registry.
2
+ * Icon lookup.
3
3
  *
4
4
  * Icons are DATA here, not components. A `[tag, attrs]` tuple list is ~100
5
- * bytes, carries no React overhead, and can be registered at runtime — which
6
- * is what makes the icon set swappable rather than baked in.
5
+ * bytes and carries no React overhead — components reference icons BY NAME
6
+ * (`<Icon name="check" />`) and resolve the geometry from `coreIcons` at
7
+ * render.
7
8
  *
8
- * WHY A REGISTRY AT ALL, rather than importing icon components directly:
9
- *
10
- * 1. Components reference icons BY NAME (`<Icon name="check" />`), so a
11
- * consumer can re-point `check` at their own drawing and every checkbox,
12
- * menu tick and status chip in the system follows. Direct imports would
13
- * hard-wire our drawing into their app.
14
- * 2. It keeps any icon library an OPTIONAL dependency. The core set below is
15
- * shipped as data with no package behind it; anything further is
16
- * registered by the consumer from whatever set they already use.
17
- * 3. Names resolve at render, so an icon can be swapped per theme or per
18
- * brand without re-rendering the tree that uses it.
9
+ * DX-3254: the runtime `registerIcon`/`registerIcons` mutation API this
10
+ * lookup used to expose publicly was removed — zero consumers ever called
11
+ * it (verified by grep across every known consumer repo and this package's
12
+ * own demo before deletion), so the map below is seeded once from
13
+ * `coreIcons` at module load and never mutated afterward. A future need to
14
+ * swap icons at runtime is a new, deliberately-scoped feature to design
15
+ * again, not a resurrection of this one.
19
16
  *
20
17
  * The core set's geometry is Lucide's (ISC licensed — see src/icons/data.ts),
21
18
  * extracted to data at build time so nothing ships at runtime.
@@ -24,17 +21,9 @@
24
21
  export type IconNodeChild = readonly [tag: string, attrs: Record<string, string | number>];
25
22
  /** An icon's full geometry — the children of a 24x24 `<svg>`. */
26
23
  export type IconNode = readonly IconNodeChild[];
27
- /**
28
- * Register (or replace) one icon. Replacement is deliberate and unguarded:
29
- * overriding a core name with a brand's own drawing is the primary reason this
30
- * registry exists, so it must not require a different call than adding one.
31
- */
32
- export declare function registerIcon(name: string, node: IconNode): void;
33
- /** Register many at once — the shape a generated icon module exports. */
34
- export declare function registerIcons(icons: Record<string, IconNode>): void;
35
- /** Look up an icon, or `undefined` when the name was never registered. */
24
+ /** Look up an icon, or `undefined` when the name is not in the core set. */
36
25
  export declare function getIcon(name: string): IconNode | undefined;
37
- /** Every registered name, sorted — powers icon galleries and docs pages. */
26
+ /** Every name in the core set, sorted — powers icon galleries and docs pages. */
38
27
  export declare function iconNames(): string[];
39
28
  /** True when `name` resolves — for a consumer validating config-driven icons. */
40
29
  export declare function hasIcon(name: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "9.0.0",
3
+ "version": "10.0.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",
@@ -1,22 +0,0 @@
1
- /**
2
- * A value that lags the input by a fixed delay, settling once the input stops
3
- * changing (SG-833 slice 7).
4
- *
5
- * WHY THIS SHAPE, RATHER THAN A DEBOUNCED CALLBACK. gpt-manager's Demand Desk
6
- * had written `DebouncedSearchField` — a search box holding its own local
7
- * text state, syncing it back to a controlled `value` after a timeout — as
8
- * the shared shape behind both of its search boxes. That component still
9
- * belongs in the app (it also owns the box's markup, its clear button, its
10
- * re-sync-on-external-change effect), but the debounce INSIDE it is the
11
- * general-purpose half: take a value that changes on every keystroke, return
12
- * one that only changes after the keystrokes stop. This hook is that half,
13
- * usable anywhere a rapidly-changing value needs to drive something
14
- * expensive (a filter, a server round trip, a live validation) without
15
- * firing on every change.
16
- *
17
- * `delayMs <= 0` updates synchronously on every render rather than arming a
18
- * zero-length timer — a real `setTimeout(fn, 0)` still yields to the event
19
- * loop once, which would mean the very first render shows the PREVIOUS value
20
- * for one paint even when the caller asked for no delay at all.
21
- */
22
- export declare function useDebouncedValue<T>(value: T, delayMs?: number): T;