@candor-ui/react 0.0.0-stage → 1.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.
Files changed (100) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +187 -2
  3. package/dist/adapters/ag-ui.d.ts +75 -0
  4. package/dist/adapters/ag-ui.js +441 -0
  5. package/dist/adapters/ai-sdk.d.ts +22 -0
  6. package/dist/adapters/ai-sdk.js +128 -0
  7. package/dist/adapters/claude-agent-sdk.d.ts +80 -0
  8. package/dist/adapters/claude-agent-sdk.js +265 -0
  9. package/dist/adapters/claude-agent-server.d.ts +53 -0
  10. package/dist/adapters/claude-agent-server.js +104 -0
  11. package/dist/adapters/use-ag-ui.d.ts +55 -0
  12. package/dist/adapters/use-ag-ui.js +168 -0
  13. package/dist/adapters/use-candor-chat.d.ts +40 -0
  14. package/dist/adapters/use-candor-chat.js +56 -0
  15. package/dist/adapters/use-claude-agent.d.ts +48 -0
  16. package/dist/adapters/use-claude-agent.js +143 -0
  17. package/dist/ag-ui.d.ts +2 -0
  18. package/dist/ag-ui.js +2 -0
  19. package/dist/ai-sdk.d.ts +2 -0
  20. package/dist/ai-sdk.js +2 -0
  21. package/dist/blocks/copy-field.d.ts +13 -0
  22. package/dist/blocks/copy-field.js +15 -0
  23. package/dist/blocks/degraded-panel.d.ts +19 -0
  24. package/dist/blocks/degraded-panel.js +14 -0
  25. package/dist/blocks/locked.d.ts +26 -0
  26. package/dist/blocks/locked.js +36 -0
  27. package/dist/blocks/relative-time.d.ts +13 -0
  28. package/dist/blocks/relative-time.js +62 -0
  29. package/dist/blocks/status-dot.d.ts +16 -0
  30. package/dist/blocks/status-dot.js +25 -0
  31. package/dist/blocks/step-list.d.ts +23 -0
  32. package/dist/blocks/step-list.js +37 -0
  33. package/dist/blocks/streaming-text.d.ts +17 -0
  34. package/dist/blocks/streaming-text.js +14 -0
  35. package/dist/blocks/surface.d.ts +9 -0
  36. package/dist/blocks/surface.js +35 -0
  37. package/dist/blocks/terms.d.ts +24 -0
  38. package/dist/blocks/terms.js +17 -0
  39. package/dist/chat/agent-avatar.d.ts +34 -0
  40. package/dist/chat/agent-avatar.js +42 -0
  41. package/dist/chat/card-registry.d.ts +39 -0
  42. package/dist/chat/card-registry.js +49 -0
  43. package/dist/chat/citation.d.ts +29 -0
  44. package/dist/chat/citation.js +44 -0
  45. package/dist/chat/composer.d.ts +54 -0
  46. package/dist/chat/composer.js +168 -0
  47. package/dist/chat/context-meter.d.ts +14 -0
  48. package/dist/chat/context-meter.js +30 -0
  49. package/dist/chat/entity-chip.d.ts +37 -0
  50. package/dist/chat/entity-chip.js +52 -0
  51. package/dist/chat/message-actions.d.ts +21 -0
  52. package/dist/chat/message-actions.js +20 -0
  53. package/dist/chat/message-content.d.ts +25 -0
  54. package/dist/chat/message-content.js +109 -0
  55. package/dist/chat/message.d.ts +39 -0
  56. package/dist/chat/message.js +44 -0
  57. package/dist/chat/payload.d.ts +16 -0
  58. package/dist/chat/payload.js +18 -0
  59. package/dist/chat/prompt-suggestions.d.ts +20 -0
  60. package/dist/chat/prompt-suggestions.js +18 -0
  61. package/dist/chat/reasoning.d.ts +18 -0
  62. package/dist/chat/reasoning.js +31 -0
  63. package/dist/chat/thread.d.ts +18 -0
  64. package/dist/chat/thread.js +60 -0
  65. package/dist/chat/tool-call.d.ts +19 -0
  66. package/dist/chat/tool-call.js +33 -0
  67. package/dist/claude-server.d.ts +1 -0
  68. package/dist/claude-server.js +2 -0
  69. package/dist/claude.d.ts +2 -0
  70. package/dist/claude.js +2 -0
  71. package/dist/index.d.ts +40 -0
  72. package/dist/index.js +38 -0
  73. package/dist/lib/chat.d.ts +221 -0
  74. package/dist/lib/chat.js +1 -0
  75. package/dist/lib/know.d.ts +123 -0
  76. package/dist/lib/know.js +1 -0
  77. package/dist/lib/render-prop.d.ts +16 -0
  78. package/dist/lib/render-prop.js +7 -0
  79. package/dist/lib/safe-markdown.d.ts +7 -0
  80. package/dist/lib/safe-markdown.js +89 -0
  81. package/dist/lib/status.d.ts +21 -0
  82. package/dist/lib/status.js +26 -0
  83. package/dist/lib/use-copy.d.ts +10 -0
  84. package/dist/lib/use-copy.js +24 -0
  85. package/dist/lib/use-shortcut.d.ts +15 -0
  86. package/dist/lib/use-shortcut.js +62 -0
  87. package/dist/lib/utils.d.ts +2 -0
  88. package/dist/lib/utils.js +5 -0
  89. package/dist/styles.css +460 -0
  90. package/dist/ui/button.d.ts +12 -0
  91. package/dist/ui/button.js +41 -0
  92. package/dist/ui/collapsible.d.ts +6 -0
  93. package/dist/ui/collapsible.js +15 -0
  94. package/dist/ui/popover.d.ts +11 -0
  95. package/dist/ui/popover.js +29 -0
  96. package/dist/ui/skeleton.d.ts +2 -0
  97. package/dist/ui/skeleton.js +6 -0
  98. package/dist/ui/tooltip.d.ts +9 -0
  99. package/dist/ui/tooltip.js +24 -0
  100. package/package.json +91 -4
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Popover as PopoverPrimitive } from "radix-ui";
6
+ import { withRender } from "../lib/render-prop.js";
7
+ function Popover({ ...props }) {
8
+ return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
9
+ }
10
+ function PopoverTrigger(allProps) {
11
+ const props = withRender(allProps);
12
+ return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
13
+ }
14
+ function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
15
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
16
+ }
17
+ function PopoverAnchor({ ...props }) {
18
+ return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
19
+ }
20
+ function PopoverHeader({ className, ...props }) {
21
+ return (_jsx("div", { "data-slot": "popover-header", className: cn("flex flex-col gap-1 text-sm", className), ...props }));
22
+ }
23
+ function PopoverTitle({ className, ...props }) {
24
+ return (_jsx("div", { "data-slot": "popover-title", className: cn("font-medium", className), ...props }));
25
+ }
26
+ function PopoverDescription({ className, ...props }) {
27
+ return (_jsx("p", { "data-slot": "popover-description", className: cn("text-muted-foreground", className), ...props }));
28
+ }
29
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ function Skeleton({ className, ...props }) {
4
+ return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-accent", className), ...props }));
5
+ }
6
+ export { Skeleton };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { Tooltip as TooltipPrimitive } from "radix-ui";
3
+ import { type RenderProp } from "../lib/render-prop.js";
4
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
5
+ /** Works with or without a TooltipProvider above; an app-level one sets the delay for all. */
6
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
7
+ declare function TooltipTrigger(allProps: React.ComponentProps<typeof TooltipPrimitive.Trigger> & RenderProp): React.JSX.Element;
8
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
9
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Tooltip as TooltipPrimitive } from "radix-ui";
6
+ import { withRender } from "../lib/render-prop.js";
7
+ // Whether a TooltipProvider is above, so a lone Tooltip can supply its own.
8
+ const HasProvider = React.createContext(false);
9
+ function TooltipProvider({ delayDuration = 0, ...props }) {
10
+ return (_jsx(HasProvider.Provider, { value: true, children: _jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }) }));
11
+ }
12
+ /** Works with or without a TooltipProvider above; an app-level one sets the delay for all. */
13
+ function Tooltip({ ...props }) {
14
+ const root = _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
15
+ return React.useContext(HasProvider) ? root : _jsx(TooltipProvider, { children: root });
16
+ }
17
+ function TooltipTrigger(allProps) {
18
+ const props = withRender(allProps);
19
+ return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
20
+ }
21
+ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
22
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })] }) }));
23
+ }
24
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
package/package.json CHANGED
@@ -1,6 +1,93 @@
1
1
  {
2
2
  "name": "@candor-ui/react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Candor UI's free tier as an npm package: React components for agents that do real work, on shadcn/ui and Tailwind 4.",
5
+ "license": "MIT",
6
+ "author": "Methodic LLC",
7
+ "homepage": "https://candor.themethodic.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/MethodicDev/candor-ui.git",
11
+ "directory": "packages/react"
12
+ },
13
+ "keywords": ["react", "agent", "chat", "ai", "shadcn", "tailwindcss", "claude", "ai-sdk", "ag-ui"],
14
+ "type": "module",
15
+ "sideEffects": ["*.css"],
16
+ "files": ["dist", "LICENSE", "README.md"],
17
+ "main": "./dist/index.js",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ },
25
+ "./ai-sdk": {
26
+ "types": "./dist/ai-sdk.d.ts",
27
+ "default": "./dist/ai-sdk.js"
28
+ },
29
+ "./claude": {
30
+ "types": "./dist/claude.d.ts",
31
+ "default": "./dist/claude.js"
32
+ },
33
+ "./claude/server": {
34
+ "types": "./dist/claude-server.d.ts",
35
+ "default": "./dist/claude-server.js"
36
+ },
37
+ "./ag-ui": {
38
+ "types": "./dist/ag-ui.d.ts",
39
+ "default": "./dist/ag-ui.js"
40
+ },
41
+ "./styles.css": "./dist/styles.css",
42
+ "./package.json": "./package.json"
43
+ },
44
+ "scripts": {
45
+ "build": "node scripts/build.mjs",
46
+ "prepack": "node scripts/build.mjs"
47
+ },
48
+ "dependencies": {
49
+ "@fontsource-variable/inter": "^5.3.0",
50
+ "class-variance-authority": "^0.7.1",
51
+ "clsx": "^2.1.1",
52
+ "lucide-react": "^1.67.0",
53
+ "radix-ui": "^1.8.1",
54
+ "tailwind-merge": "^3.7.0",
55
+ "tw-animate-css": "^1.4.0"
56
+ },
57
+ "peerDependencies": {
58
+ "@ag-ui/client": "^1.0.3",
59
+ "@ag-ui/core": "^1.0.3",
60
+ "@ai-sdk/react": "^4.0.166",
61
+ "@anthropic-ai/claude-agent-sdk": "^0.3.318",
62
+ "ai": "^7.0.162",
63
+ "react": "^19.0.0",
64
+ "react-dom": "^19.0.0",
65
+ "tailwindcss": "^4.3.4"
66
+ },
67
+ "peerDependenciesMeta": {
68
+ "@ag-ui/client": { "optional": true },
69
+ "@ag-ui/core": { "optional": true },
70
+ "@ai-sdk/react": { "optional": true },
71
+ "@anthropic-ai/claude-agent-sdk": { "optional": true },
72
+ "ai": { "optional": true },
73
+ "tailwindcss": { "optional": true }
74
+ },
75
+ "devDependencies": {
76
+ "@ag-ui/client": "^1.0.3",
77
+ "@ag-ui/core": "^1.0.3",
78
+ "@ai-sdk/react": "^4.0.166",
79
+ "@anthropic-ai/claude-agent-sdk": "^0.3.318",
80
+ "@types/react": "^19.3.0",
81
+ "@types/react-dom": "^19.3.0",
82
+ "ai": "^7.0.162",
83
+ "react": "^19.3.1",
84
+ "react-dom": "^19.3.1",
85
+ "typescript": "^5.9.3"
86
+ },
87
+ "publishConfig": {
88
+ "access": "public"
89
+ },
90
+ "engines": {
91
+ "node": ">=20"
92
+ }
93
+ }