@nebutra/ui 0.2.1 → 0.2.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.
Files changed (55) hide show
  1. package/LICENSE +21 -676
  2. package/README.md +81 -86
  3. package/dist/agent/index.d.ts +119 -0
  4. package/dist/agent/index.js +135 -0
  5. package/dist/agent/index.js.map +1 -0
  6. package/dist/canonical-CrO71UPO.d.ts +4058 -0
  7. package/dist/components/index.d.ts +51 -56
  8. package/dist/components/index.js +1467 -1160
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/hooks/index.d.ts +62 -15
  11. package/dist/hooks/index.js +56 -34
  12. package/dist/hooks/index.js.map +1 -1
  13. package/dist/index-CKLIGfiU.d.ts +19 -0
  14. package/dist/index-Dg4jRJV2.d.ts +57 -0
  15. package/dist/layout/index.d.ts +5 -1
  16. package/dist/layout/index.js +427 -533
  17. package/dist/layout/index.js.map +1 -1
  18. package/dist/layouts/index.js +11 -9
  19. package/dist/layouts/index.js.map +1 -1
  20. package/dist/patterns/index.d.ts +128 -2
  21. package/dist/patterns/index.js +1478 -786
  22. package/dist/patterns/index.js.map +1 -1
  23. package/dist/primitives/canonical.d.ts +25 -0
  24. package/dist/primitives/canonical.js +11903 -0
  25. package/dist/primitives/canonical.js.map +1 -0
  26. package/dist/primitives/index.d.ts +577 -3545
  27. package/dist/primitives/index.js +8002 -6159
  28. package/dist/primitives/index.js.map +1 -1
  29. package/dist/shared/animation/css/index.d.ts +1 -0
  30. package/dist/shared/animation/css/index.js +14 -0
  31. package/dist/shared/animation/css/index.js.map +1 -0
  32. package/dist/shared/animation/index.d.ts +6 -0
  33. package/dist/shared/animation/index.js +272 -0
  34. package/dist/shared/animation/index.js.map +1 -0
  35. package/dist/shared/animation/motion/index.d.ts +4 -0
  36. package/dist/shared/animation/motion/index.js +205 -0
  37. package/dist/shared/animation/motion/index.js.map +1 -0
  38. package/dist/styles/brand-override.css +11 -11
  39. package/dist/tailwind.preset.d.ts +10 -10
  40. package/dist/tailwind.preset.js +7 -4
  41. package/dist/tailwind.preset.js.map +1 -1
  42. package/dist/theme/index.d.ts +2 -2
  43. package/dist/tokens-EAC6uPem.d.ts +302 -0
  44. package/dist/typography/fonts.css +31 -12
  45. package/dist/typography/index.d.ts +27 -27
  46. package/dist/typography/index.js +24 -4
  47. package/dist/typography/index.js.map +1 -1
  48. package/dist/utils/index.d.ts +36 -14
  49. package/dist/utils/index.js +44 -10
  50. package/dist/utils/index.js.map +1 -1
  51. package/package.json +38 -12
  52. package/src/styles/brand-override.css +61 -0
  53. package/src/styles/preset.css +29 -0
  54. package/src/styles/sources.css +27 -0
  55. package/src/typography/fonts.css +129 -0
@@ -1,18 +1,53 @@
1
1
  export { ActionIcon, ActionIconGroup, Alert, Avatar, Button, Checkbox, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, Flexbox, FlexboxProps, Form, FormGroup, FormItem, Highlighter, Image, Input, List, Markdown, Menu, Modal, SearchBar, Segmented, Select, SideNav, Tag, TextArea, Tooltip } from '@lobehub/ui';
2
- export { Spotlight } from '@lobehub/ui/awesome';
3
2
  export { ChatInputArea, ChatItem, ChatItemProps, ChatList, ChatListProps, ChatMessage, MessageInput, MessageModal } from '@lobehub/ui/chat';
3
+ export { default as Spotlight } from '@lobehub/ui/es/awesome/Spotlight/Spotlight';
4
+ export { AnimatePresence, HTMLMotionProps, LayoutGroup, LazyMotion, MotionConfig, MotionProps, MotionStyle, MotionValue, Transition, Variants, animate, domAnimation, m, motion, useAnimationFrame, useInView, useMotionTemplate, useMotionValue, useReducedMotion, useScroll, useSpring, useTransform, useVelocity } from 'framer-motion';
5
+ export { A as AnimatedCard, a as AnimatedDrawer, b as AnimatedList, c as AnimatedModal, d as AnimatedPopover, e as AnimationDuration, f as AnimationTransition, F as FadeIn, P as PageTransition, S as ScaleIn, g as SlideIn, h as animatedList, i as animatedListItem, j as animationDistances, k as animationDurations, l as animationEasings, m as animationSprings, n as animationTransitions, o as drawerSurface, p as fadeIn, q as modalSurface, r as pageTransition, s as popoverSurface, t as reducedMotionVariants, u as scaleIn, v as slideIn } from '../tokens-EAC6uPem.js';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
7
  import * as React from 'react';
5
8
  import React__default, { ReactNode } from 'react';
6
- import * as react_jsx_runtime from 'react/jsx-runtime';
7
9
  import { GraphEdge, GraphNode, Graph } from '@nebutra/graph-model';
8
10
 
11
+ declare const isImageFile: (file: File) => boolean;
12
+ declare const getFilePreviewKey: (file: File) => string;
13
+ declare const preventDragDefaults: (e: React__default.DragEvent) => void;
14
+ interface ImageViewDialogProps {
15
+ imageUrl: string | null;
16
+ onClose: () => void;
17
+ }
18
+ declare const ImageViewDialog: React__default.FC<ImageViewDialogProps>;
19
+ type PromptAttachmentPreviewsProps = {
20
+ files: File[];
21
+ filePreviews: Record<string, string>;
22
+ isRecording: boolean;
23
+ onPreview: (imageUrl: string) => void;
24
+ onRemove: (file: File) => void;
25
+ };
26
+ declare function PromptAttachmentPreviews({ files, filePreviews, isRecording, onPreview, onRemove, }: PromptAttachmentPreviewsProps): react_jsx_runtime.JSX.Element | null;
27
+
9
28
  interface PromptInputBoxProps {
10
29
  onSend?: (message: string, files?: File[]) => void;
11
30
  isLoading?: boolean;
12
31
  placeholder?: string;
13
32
  className?: string;
33
+ ref?: React__default.Ref<HTMLDivElement>;
14
34
  }
15
- declare const PromptInputBox: React__default.ForwardRefExoticComponent<PromptInputBoxProps & React__default.RefAttributes<HTMLDivElement>>;
35
+ declare const PromptInputBox: React__default.FC<PromptInputBoxProps>;
36
+
37
+ declare const MAX_VISUALIZER_BARS = 64;
38
+ declare const VISUALIZER_BAR_STYLES: {
39
+ id: string;
40
+ height: string;
41
+ animationDelay: string;
42
+ animationDuration: string;
43
+ }[];
44
+ declare const formatRecordingTime: (seconds: number) => string;
45
+ interface VoiceRecorderProps {
46
+ isRecording: boolean;
47
+ time: number;
48
+ visualizerBars?: number;
49
+ }
50
+ declare const VoiceRecorder: React__default.FC<VoiceRecorderProps>;
16
51
 
17
52
  declare const PRESETS: {
18
53
  readonly emerge: {
@@ -32,8 +67,8 @@ declare const PRESETS: {
32
67
  readonly filter: "blur(4px)";
33
68
  };
34
69
  readonly transition: {
35
- readonly duration: 0.5;
36
- readonly ease: readonly [0.16, 1, 0.3, 1];
70
+ duration: 0.5;
71
+ ease: [number, number, number, number];
37
72
  };
38
73
  };
39
74
  readonly flow: {
@@ -50,8 +85,8 @@ declare const PRESETS: {
50
85
  readonly x: 20;
51
86
  };
52
87
  readonly transition: {
53
- readonly duration: 0.3;
54
- readonly ease: readonly [0, 0, 0.2, 1];
88
+ duration: 0.3;
89
+ ease: [number, number, number, number];
55
90
  };
56
91
  };
57
92
  readonly fade: {
@@ -82,30 +117,10 @@ declare const PRESETS: {
82
117
  readonly y: 16;
83
118
  };
84
119
  readonly transition: {
85
- readonly default: {
86
- readonly type: "spring";
87
- readonly stiffness: 200;
88
- readonly damping: 24;
89
- readonly mass: 1;
90
- };
91
- readonly bouncy: {
92
- readonly type: "spring";
93
- readonly stiffness: 300;
94
- readonly damping: 15;
95
- readonly mass: 0.8;
96
- };
97
- readonly heavy: {
98
- readonly type: "spring";
99
- readonly stiffness: 120;
100
- readonly damping: 28;
101
- readonly mass: 1.5;
102
- };
103
- readonly gentle: {
104
- readonly type: "spring";
105
- readonly stiffness: 80;
106
- readonly damping: 20;
107
- readonly mass: 1;
108
- };
120
+ type: "spring";
121
+ stiffness: 200;
122
+ damping: 24;
123
+ mass: 1;
109
124
  };
110
125
  };
111
126
  readonly scale: {
@@ -122,30 +137,10 @@ declare const PRESETS: {
122
137
  readonly scale: 0.95;
123
138
  };
124
139
  readonly transition: {
125
- readonly default: {
126
- readonly type: "spring";
127
- readonly stiffness: 200;
128
- readonly damping: 24;
129
- readonly mass: 1;
130
- };
131
- readonly bouncy: {
132
- readonly type: "spring";
133
- readonly stiffness: 300;
134
- readonly damping: 15;
135
- readonly mass: 0.8;
136
- };
137
- readonly heavy: {
138
- readonly type: "spring";
139
- readonly stiffness: 120;
140
- readonly damping: 28;
141
- readonly mass: 1.5;
142
- };
143
- readonly gentle: {
144
- readonly type: "spring";
145
- readonly stiffness: 80;
146
- readonly damping: 20;
147
- readonly mass: 1;
148
- };
140
+ type: "spring";
141
+ stiffness: 200;
142
+ damping: 24;
143
+ mass: 1;
149
144
  };
150
145
  };
151
146
  };
@@ -377,4 +372,4 @@ interface TeamChatProps {
377
372
  */
378
373
  declare function TeamChat({ chatName, tagline, messages, inputPlaceholder, onSendMessage, onReactionClick, onMoreOptions, className, }: TeamChatProps): react_jsx_runtime.JSX.Element;
379
374
 
380
- export { AnimateIn, AnimateInGroup, type AnimateInGroupProps, type AnimateInProps, AsciiText, type ChangelogEntry, ChangelogWidget, type ChangelogWidgetProps, type ChatReaction, type ChatSender, type ChecklistItem, type EdgeIdentity, type FlowConnection, type MakeEdge, NodeGraphCanvas, type NodeGraphCanvasProps, type NodeView, OnboardingChecklist, type OnboardingChecklistProps, PromptInputBox, TeamChat, type TeamChatProps };
375
+ export { AnimateIn, AnimateInGroup, type AnimateInGroupProps, type AnimateInProps, AsciiText, type ChangelogEntry, ChangelogWidget, type ChangelogWidgetProps, type ChatReaction, type ChatSender, type ChecklistItem, type EdgeIdentity, type FlowConnection, ImageViewDialog, type ImageViewDialogProps, MAX_VISUALIZER_BARS, type MakeEdge, NodeGraphCanvas, type NodeGraphCanvasProps, type NodeView, OnboardingChecklist, type OnboardingChecklistProps, PromptAttachmentPreviews, type PromptAttachmentPreviewsProps, PromptInputBox, type PromptInputBoxProps, TeamChat, type TeamChatProps, VISUALIZER_BAR_STYLES, VoiceRecorder, type VoiceRecorderProps, formatRecordingTime, getFilePreviewKey, isImageFile, preventDragDefaults };