@duskmoon-dev/components 0.3.0 → 0.3.3

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 (62) hide show
  1. package/README.md +33 -5
  2. package/dist/{chunk-r9wkv7xd.js → chunk-fwjzvsrx.js} +3 -3
  3. package/dist/classes/chat.d.ts +35 -0
  4. package/dist/classes/index.d.ts +2 -0
  5. package/dist/classes/index.js +1282 -1177
  6. package/dist/classes/markdown.d.ts +9 -0
  7. package/dist/components/anchor/index.js +2 -2
  8. package/dist/components/app/index.js +85 -85
  9. package/dist/components/cascader/index.js +2 -2
  10. package/dist/components/chat/Chat.d.ts +14 -0
  11. package/dist/components/chat/Chat.types.d.ts +47 -0
  12. package/dist/components/chat/index.d.ts +2 -0
  13. package/dist/components/chat/index.js +220 -0
  14. package/dist/components/color-picker/index.js +4 -4
  15. package/dist/components/config-provider/index.js +2 -2
  16. package/dist/components/dm-breadcrumb/index.js +18 -18
  17. package/dist/components/dm-date-picker/index.js +94 -94
  18. package/dist/components/dm-drawer/index.js +16 -16
  19. package/dist/components/dm-layout/index.js +189 -189
  20. package/dist/components/dm-menu/index.js +24 -24
  21. package/dist/components/dm-message/index.js +18 -18
  22. package/dist/components/dm-page-header/index.js +158 -158
  23. package/dist/components/dm-pagination/index.js +39 -39
  24. package/dist/components/dm-pro-table/index.js +1558 -1558
  25. package/dist/components/dm-provider/index.js +94 -94
  26. package/dist/components/dm-query/index.js +33 -31
  27. package/dist/components/dm-search/index.js +25 -25
  28. package/dist/components/dm-splitter/index.js +32 -32
  29. package/dist/components/dm-status/index.js +25 -25
  30. package/dist/components/dm-table/index.js +595 -595
  31. package/dist/components/dm-tabs/index.js +34 -34
  32. package/dist/components/dm-toolbar/index.js +23 -23
  33. package/dist/components/dm-tree/index.js +92 -92
  34. package/dist/components/dm-truncate/index.js +33 -33
  35. package/dist/components/dropdown/index.js +83 -83
  36. package/dist/components/form/index.js +2 -2
  37. package/dist/components/grid/index.js +2 -2
  38. package/dist/components/input/index.js +4 -4
  39. package/dist/components/markdown/Markdown.d.ts +3 -0
  40. package/dist/components/markdown/Markdown.types.d.ts +14 -0
  41. package/dist/components/markdown/index.d.ts +2 -0
  42. package/dist/components/markdown/index.js +171 -0
  43. package/dist/components/message/index.js +5 -5
  44. package/dist/components/notification/index.js +2 -2
  45. package/dist/components/popconfirm/index.js +42 -42
  46. package/dist/components/skeleton/index.js +5 -5
  47. package/dist/components/spin/index.js +2 -2
  48. package/dist/components/steps/index.js +2 -2
  49. package/dist/components/table/index.js +2 -2
  50. package/dist/components/tabs/index.js +2 -2
  51. package/dist/components/tag/index.js +2 -2
  52. package/dist/components/tour/index.js +62 -62
  53. package/dist/components/typography/index.js +4 -4
  54. package/dist/components/upload/index.js +5 -5
  55. package/dist/generated/version.d.ts +1 -1
  56. package/dist/index.d.ts +2 -0
  57. package/dist/index.js +1845 -1512
  58. package/dist/infrastructure.js +11 -11
  59. package/dist/styles.css +13457 -9832
  60. package/dist/theme/index.js +3 -3
  61. package/dist/utils/index.js +5 -5
  62. package/package.json +18 -7
@@ -344,9 +344,9 @@ var Input = Object.assign(InputRoot, {
344
344
  Group
345
345
  });
346
346
  export {
347
- TextArea,
348
- Search,
349
- Password,
347
+ Group,
350
348
  Input,
351
- Group
349
+ Password,
350
+ Search,
351
+ TextArea
352
352
  };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { MarkdownProps } from "./Markdown.types";
3
+ export declare const Markdown: React.ForwardRefExoticComponent<Omit<MarkdownProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,14 @@
1
+ import type { ComponentProps } from "react";
2
+ export type MarkdownFrontMatterMode = "render" | "hidden" | "disabled";
3
+ export interface MarkdownProps extends Omit<ComponentProps<"div">, "children"> {
4
+ /** Markdown source to render. */
5
+ markdown?: string;
6
+ /** Convert soft line endings to `<br>` elements. @default true */
7
+ breaks?: boolean;
8
+ /** Add a visual swatch to inline code containing a valid CSS color. @default true */
9
+ colorChips?: boolean;
10
+ /** Control handling of YAML front matter at the beginning of the source. @default "render" */
11
+ frontMatter?: MarkdownFrontMatterMode;
12
+ /** Optional color variant used to build the `markdown-body-{variant}` class. */
13
+ variant?: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Markdown";
2
+ export type * from "./Markdown.types";
@@ -0,0 +1,171 @@
1
+ "use client";
2
+
3
+ // src/components/markdown/Markdown.tsx
4
+ import { forwardRef } from "react";
5
+ import ReactMarkdown from "react-markdown";
6
+ import remarkBreaks from "remark-breaks";
7
+ import remarkGfm from "remark-gfm";
8
+
9
+ // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
10
+ function r(e) {
11
+ var t, f, n = "";
12
+ if (typeof e == "string" || typeof e == "number")
13
+ n += e;
14
+ else if (typeof e == "object")
15
+ if (Array.isArray(e)) {
16
+ var o = e.length;
17
+ for (t = 0;t < o; t++)
18
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
19
+ } else
20
+ for (f in e)
21
+ e[f] && (n && (n += " "), n += f);
22
+ return n;
23
+ }
24
+ function clsx() {
25
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
26
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
27
+ return n;
28
+ }
29
+
30
+ // src/utils/cn.ts
31
+ function cn(...inputs) {
32
+ return clsx(inputs);
33
+ }
34
+ // src/classes/markdown.ts
35
+ var markdownBaseClass = "markdown-body";
36
+ var markdownFrontMatterClass = "dm-front-matter";
37
+ var markdownColorCodeClass = "dm-color-code";
38
+ var markdownColorChipClass = "dm-color-chip";
39
+ var markdownColorChipSwatchClass = "dm-color-chip-swatch";
40
+ function getMarkdownClasses({
41
+ variant,
42
+ className
43
+ }) {
44
+ return cn(markdownBaseClass, variant && `${markdownBaseClass}-${variant}`, className);
45
+ }
46
+
47
+ // src/components/markdown/Markdown.tsx
48
+ import { jsx, jsxs } from "react/jsx-runtime";
49
+ function splitFrontMatter(markdown) {
50
+ const source = markdown.startsWith("\uFEFF") ? markdown.slice(1) : markdown;
51
+ const lines = source.split(/\r?\n/);
52
+ if (lines.length < 2 || lines[0] !== "---")
53
+ return;
54
+ for (let index = 1;index < lines.length; index += 1) {
55
+ if (lines[index] === "---" || lines[index] === "...") {
56
+ return {
57
+ source: lines.slice(1, index).join(`
58
+ `),
59
+ body: lines.slice(index + 1).join(`
60
+ `)
61
+ };
62
+ }
63
+ }
64
+ return;
65
+ }
66
+ function numberInRange(value, minimum, maximum) {
67
+ if (!/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/.test(value))
68
+ return false;
69
+ const number = Number(value);
70
+ return Number.isFinite(number) && number >= minimum && number <= maximum;
71
+ }
72
+ function percentage(value) {
73
+ return value.endsWith("%") && numberInRange(value.slice(0, -1), 0, 100);
74
+ }
75
+ function alpha(value) {
76
+ return percentage(value) || numberInRange(value, 0, 1);
77
+ }
78
+ function isCssColor(value) {
79
+ if (!value || Array.from(value).some((character) => character.charCodeAt(0) > 127) || value.trim() !== value) {
80
+ return false;
81
+ }
82
+ if (/^#[\da-f]{3,4}(?:[\da-f]{2}){0,2}$/i.test(value))
83
+ return true;
84
+ const match = /^(rgba?|hsla?)\((.*)\)$/i.exec(value);
85
+ if (!match || match[2].includes("(") || match[2].includes(")"))
86
+ return false;
87
+ const name = match[1].toLowerCase();
88
+ const parts = match[2].split(",").map((part) => part.trim());
89
+ const hasAlpha = name.endsWith("a");
90
+ if (parts.length !== (hasAlpha ? 4 : 3))
91
+ return false;
92
+ if (name.startsWith("rgb")) {
93
+ const channels = parts.slice(0, 3);
94
+ const allPercentages = channels.every(percentage);
95
+ const allNumbers = channels.every((part) => numberInRange(part, 0, 255));
96
+ return (allPercentages || allNumbers) && (!hasAlpha || alpha(parts[3]));
97
+ }
98
+ const hue = parts[0].replace(/deg$/i, "");
99
+ return numberInRange(hue, 0, 360) && percentage(parts[1]) && percentage(parts[2]) && (!hasAlpha || alpha(parts[3]));
100
+ }
101
+ function markdownSource(markdown, mode) {
102
+ if (mode === "disabled")
103
+ return { body: markdown, source: undefined };
104
+ const frontMatter = splitFrontMatter(markdown);
105
+ return frontMatter ?? { body: markdown, source: undefined };
106
+ }
107
+ var Markdown = forwardRef(function Markdown({
108
+ markdown = "",
109
+ breaks = true,
110
+ colorChips = true,
111
+ frontMatter = "render",
112
+ variant,
113
+ className,
114
+ ...props
115
+ }, ref) {
116
+ const source = markdownSource(markdown, frontMatter);
117
+ const components = colorChips ? {
118
+ code({ children, className: codeClassName, node, ...codeProps }) {
119
+ const value = String(children).replace(/\n$/, "");
120
+ const isInline = node?.position?.start.line === node?.position?.end.line;
121
+ if (!isInline || !isCssColor(value)) {
122
+ return /* @__PURE__ */ jsx("code", {
123
+ className: codeClassName,
124
+ ...codeProps,
125
+ children
126
+ });
127
+ }
128
+ return /* @__PURE__ */ jsxs("code", {
129
+ className: markdownColorCodeClass,
130
+ ...codeProps,
131
+ children: [
132
+ children,
133
+ /* @__PURE__ */ jsx("span", {
134
+ className: markdownColorChipClass,
135
+ role: "img",
136
+ "aria-label": `Color ${value}`,
137
+ children: /* @__PURE__ */ jsx("span", {
138
+ className: markdownColorChipSwatchClass,
139
+ style: { backgroundColor: value },
140
+ "aria-hidden": "true"
141
+ })
142
+ })
143
+ ]
144
+ });
145
+ }
146
+ } : undefined;
147
+ return /* @__PURE__ */ jsxs("div", {
148
+ ref,
149
+ className: getMarkdownClasses({ variant, className }),
150
+ ...props,
151
+ children: [
152
+ frontMatter === "render" && source.source !== undefined ? /* @__PURE__ */ jsx("div", {
153
+ className: markdownFrontMatterClass,
154
+ children: /* @__PURE__ */ jsx("pre", {
155
+ children: /* @__PURE__ */ jsx("code", {
156
+ className: "language-yaml",
157
+ children: source.source
158
+ })
159
+ })
160
+ }) : null,
161
+ /* @__PURE__ */ jsx(ReactMarkdown, {
162
+ remarkPlugins: breaks ? [remarkGfm, remarkBreaks] : [remarkGfm],
163
+ components,
164
+ children: source.body
165
+ })
166
+ ]
167
+ });
168
+ });
169
+ export {
170
+ Markdown
171
+ };
@@ -154,13 +154,13 @@ function config(nextConfig) {
154
154
  emit();
155
155
  }
156
156
  function MessageHolder({ className }) {
157
- const snapshot2 = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
157
+ const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
158
158
  return /* @__PURE__ */ jsx("div", {
159
159
  className: getMessageHolderClasses({
160
- placement: snapshot2.config.placement,
160
+ placement: snapshot.config.placement,
161
161
  className
162
162
  }),
163
- children: snapshot2.messages.map((item) => /* @__PURE__ */ jsxs("div", {
163
+ children: snapshot.messages.map((item) => /* @__PURE__ */ jsxs("div", {
164
164
  className: getMessageClasses({
165
165
  type: item.type,
166
166
  className: item.className
@@ -200,6 +200,6 @@ var message = {
200
200
  useMessage: () => [message, /* @__PURE__ */ jsx(MessageHolder, {}, "message-holder")]
201
201
  };
202
202
  export {
203
- message,
204
- MessageHolder
203
+ MessageHolder,
204
+ message
205
205
  };
@@ -415,6 +415,6 @@ function useNotification(config = {}) {
415
415
  }
416
416
  var notification = globalApi;
417
417
  export {
418
- useNotification,
419
- notification
418
+ notification,
419
+ useNotification
420
420
  };
@@ -1,5 +1,12 @@
1
1
  "use client";
2
2
 
3
+ // src/components/popconfirm/Popconfirm.tsx
4
+ import {
5
+ forwardRef,
6
+ useId,
7
+ useState
8
+ } from "react";
9
+
3
10
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
4
11
  function r(e) {
5
12
  var t, f, n = "";
@@ -25,6 +32,41 @@ function clsx() {
25
32
  function cn(...inputs) {
26
33
  return clsx(inputs);
27
34
  }
35
+ // src/classes/popconfirm.ts
36
+ var popconfirmWrapperClass = "popover-wrapper popconfirm-wrapper";
37
+ var popconfirmBaseClass = "popover popconfirm";
38
+ var popconfirmOpenClass = "popover-show popconfirm-open";
39
+ var popconfirmArrowClass = "popover-arrow popconfirm-arrow";
40
+ var popconfirmNoArrowClass = "popover-no-arrow popconfirm-no-arrow";
41
+ var popconfirmBodyClass = "popconfirm-body";
42
+ var popconfirmIconClass = "popconfirm-icon";
43
+ var popconfirmContentClass = "popconfirm-content";
44
+ var popconfirmTitleClass = "popconfirm-title";
45
+ var popconfirmDescriptionClass = "popconfirm-description";
46
+ var popconfirmActionsClass = "popconfirm-actions";
47
+ var popconfirmPlacementClasses = {
48
+ top: "popover-top popconfirm-top",
49
+ bottom: "popover-bottom popconfirm-bottom",
50
+ left: "popover-left popconfirm-left",
51
+ right: "popover-right popconfirm-right",
52
+ topLeft: "popover-top popconfirm-top-left",
53
+ topRight: "popover-top popconfirm-top-right",
54
+ bottomLeft: "popover-bottom popconfirm-bottom-left",
55
+ bottomRight: "popover-bottom popconfirm-bottom-right",
56
+ leftTop: "popover-left popconfirm-left-top",
57
+ leftBottom: "popover-left popconfirm-left-bottom",
58
+ rightTop: "popover-right popconfirm-right-top",
59
+ rightBottom: "popover-right popconfirm-right-bottom"
60
+ };
61
+ function getPopconfirmClasses({
62
+ placement = "top",
63
+ open,
64
+ arrow = true,
65
+ className
66
+ }) {
67
+ return cn(popconfirmBaseClass, popconfirmPlacementClasses[placement], open && popconfirmOpenClass, !arrow && popconfirmNoArrowClass, className);
68
+ }
69
+
28
70
  // src/classes/button.ts
29
71
  var buttonBaseClass = "btn";
30
72
  var buttonColorClasses = {
@@ -123,48 +165,6 @@ function Button({
123
165
  ]
124
166
  });
125
167
  }
126
- // src/components/popconfirm/Popconfirm.tsx
127
- import {
128
- forwardRef,
129
- useId,
130
- useState
131
- } from "react";
132
-
133
- // src/classes/popconfirm.ts
134
- var popconfirmWrapperClass = "popover-wrapper popconfirm-wrapper";
135
- var popconfirmBaseClass = "popover popconfirm";
136
- var popconfirmOpenClass = "popover-show popconfirm-open";
137
- var popconfirmArrowClass = "popover-arrow popconfirm-arrow";
138
- var popconfirmNoArrowClass = "popover-no-arrow popconfirm-no-arrow";
139
- var popconfirmBodyClass = "popconfirm-body";
140
- var popconfirmIconClass = "popconfirm-icon";
141
- var popconfirmContentClass = "popconfirm-content";
142
- var popconfirmTitleClass = "popconfirm-title";
143
- var popconfirmDescriptionClass = "popconfirm-description";
144
- var popconfirmActionsClass = "popconfirm-actions";
145
- var popconfirmPlacementClasses = {
146
- top: "popover-top popconfirm-top",
147
- bottom: "popover-bottom popconfirm-bottom",
148
- left: "popover-left popconfirm-left",
149
- right: "popover-right popconfirm-right",
150
- topLeft: "popover-top popconfirm-top-left",
151
- topRight: "popover-top popconfirm-top-right",
152
- bottomLeft: "popover-bottom popconfirm-bottom-left",
153
- bottomRight: "popover-bottom popconfirm-bottom-right",
154
- leftTop: "popover-left popconfirm-left-top",
155
- leftBottom: "popover-left popconfirm-left-bottom",
156
- rightTop: "popover-right popconfirm-right-top",
157
- rightBottom: "popover-right popconfirm-right-bottom"
158
- };
159
- function getPopconfirmClasses({
160
- placement = "top",
161
- open,
162
- arrow = true,
163
- className
164
- }) {
165
- return cn(popconfirmBaseClass, popconfirmPlacementClasses[placement], open && popconfirmOpenClass, !arrow && popconfirmNoArrowClass, className);
166
- }
167
-
168
168
  // src/components/popconfirm/Popconfirm.tsx
169
169
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
170
170
  function normalizeTriggers(trigger) {
@@ -229,10 +229,10 @@ var Skeleton = Object.assign(SkeletonRoot, {
229
229
  Node: SkeletonNode
230
230
  });
231
231
  export {
232
- SkeletonNode,
233
- SkeletonInput,
234
- SkeletonImage,
235
- SkeletonButton,
232
+ Skeleton,
236
233
  SkeletonAvatar,
237
- Skeleton
234
+ SkeletonButton,
235
+ SkeletonImage,
236
+ SkeletonInput,
237
+ SkeletonNode
238
238
  };
@@ -65,8 +65,8 @@ function useDelayedSpinning(spinning, delay) {
65
65
  return;
66
66
  }
67
67
  if (!spinning) {
68
- const resetTimer2 = window.setTimeout(() => setDelayedActive(false), 0);
69
- return () => window.clearTimeout(resetTimer2);
68
+ const resetTimer = window.setTimeout(() => setDelayedActive(false), 0);
69
+ return () => window.clearTimeout(resetTimer);
70
70
  }
71
71
  const resetTimer = window.setTimeout(() => setDelayedActive(false), 0);
72
72
  const showTimer = window.setTimeout(() => setDelayedActive(true), delay);
@@ -306,6 +306,6 @@ var Steps = Object.assign(StepsRoot, {
306
306
  Step
307
307
  });
308
308
  export {
309
- Steps,
310
- Step
309
+ Step,
310
+ Steps
311
311
  };
@@ -112,8 +112,8 @@ function getRecordKey(record, index, rowKey) {
112
112
  return rowKey(record, index);
113
113
  }
114
114
  if (rowKey) {
115
- const key2 = record[rowKey];
116
- return typeof key2 === "string" || typeof key2 === "number" ? key2 : index;
115
+ const key = record[rowKey];
116
+ return typeof key === "string" || typeof key === "number" ? key : index;
117
117
  }
118
118
  const key = record.key;
119
119
  return typeof key === "string" || typeof key === "number" ? key : index;
@@ -354,6 +354,6 @@ var Tabs = Object.assign(TabsBase, {
354
354
  TabPane
355
355
  });
356
356
  export {
357
- Tabs,
358
- TabPane
357
+ TabPane,
358
+ Tabs
359
359
  };
@@ -149,6 +149,6 @@ var Tag = Object.assign(TagRoot, {
149
149
  CheckableTag
150
150
  });
151
151
  export {
152
- Tag,
153
- CheckableTag
152
+ CheckableTag,
153
+ Tag
154
154
  };
@@ -1,5 +1,13 @@
1
1
  "use client";
2
2
 
3
+ // src/components/tour/Tour.tsx
4
+ import {
5
+ forwardRef,
6
+ useEffect,
7
+ useId,
8
+ useState
9
+ } from "react";
10
+
3
11
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
4
12
  function r(e) {
5
13
  var t, f, n = "";
@@ -25,6 +33,60 @@ function clsx() {
25
33
  function cn(...inputs) {
26
34
  return clsx(inputs);
27
35
  }
36
+ // src/classes/tour.ts
37
+ var tourRootClass = "tour-root";
38
+ var tourOpenClass = "tour-open";
39
+ var tourMaskClass = "tour-mask";
40
+ var tourMaskHiddenClass = "tour-mask-hidden";
41
+ var tourTargetClass = "tour-target";
42
+ var tourPanelClass = "tour-panel popover";
43
+ var tourArrowClass = "tour-arrow popover-arrow";
44
+ var tourHeaderClass = "tour-header";
45
+ var tourTitleClass = "tour-title";
46
+ var tourCloseClass = "tour-close";
47
+ var tourBodyClass = "tour-body";
48
+ var tourCoverClass = "tour-cover";
49
+ var tourFooterClass = "tour-footer";
50
+ var tourIndicatorsClass = "tour-indicators";
51
+ var tourIndicatorClass = "tour-indicator";
52
+ var tourIndicatorActiveClass = "tour-indicator-active";
53
+ var tourActionsClass = "tour-actions";
54
+ var tourPlacementClasses = {
55
+ top: "popover-top tour-top",
56
+ bottom: "popover-bottom tour-bottom",
57
+ left: "popover-left tour-left",
58
+ right: "popover-right tour-right",
59
+ topLeft: "popover-top tour-top-left",
60
+ topRight: "popover-top tour-top-right",
61
+ bottomLeft: "popover-bottom tour-bottom-left",
62
+ bottomRight: "popover-bottom tour-bottom-right",
63
+ leftTop: "popover-left tour-left-top",
64
+ leftBottom: "popover-left tour-left-bottom",
65
+ rightTop: "popover-right tour-right-top",
66
+ rightBottom: "popover-right tour-right-bottom"
67
+ };
68
+ function getTourRootClasses({
69
+ open,
70
+ className
71
+ }) {
72
+ return cn(tourRootClass, open && tourOpenClass, className);
73
+ }
74
+ function getTourMaskClasses({
75
+ visible,
76
+ className
77
+ }) {
78
+ return cn(tourMaskClass, !visible && tourMaskHiddenClass, className);
79
+ }
80
+ function getTourPanelClasses({
81
+ placement = "bottom",
82
+ className
83
+ }) {
84
+ return cn(tourPanelClass, "popover-show", tourPlacementClasses[placement], className);
85
+ }
86
+ function getTourIndicatorClasses({ active }) {
87
+ return cn(tourIndicatorClass, active && tourIndicatorActiveClass);
88
+ }
89
+
28
90
  // src/classes/button.ts
29
91
  var buttonBaseClass = "btn";
30
92
  var buttonColorClasses = {
@@ -123,68 +185,6 @@ function Button({
123
185
  ]
124
186
  });
125
187
  }
126
- // src/components/tour/Tour.tsx
127
- import {
128
- forwardRef,
129
- useEffect,
130
- useId,
131
- useState
132
- } from "react";
133
-
134
- // src/classes/tour.ts
135
- var tourRootClass = "tour-root";
136
- var tourOpenClass = "tour-open";
137
- var tourMaskClass = "tour-mask";
138
- var tourMaskHiddenClass = "tour-mask-hidden";
139
- var tourTargetClass = "tour-target";
140
- var tourPanelClass = "tour-panel popover";
141
- var tourArrowClass = "tour-arrow popover-arrow";
142
- var tourHeaderClass = "tour-header";
143
- var tourTitleClass = "tour-title";
144
- var tourCloseClass = "tour-close";
145
- var tourBodyClass = "tour-body";
146
- var tourCoverClass = "tour-cover";
147
- var tourFooterClass = "tour-footer";
148
- var tourIndicatorsClass = "tour-indicators";
149
- var tourIndicatorClass = "tour-indicator";
150
- var tourIndicatorActiveClass = "tour-indicator-active";
151
- var tourActionsClass = "tour-actions";
152
- var tourPlacementClasses = {
153
- top: "popover-top tour-top",
154
- bottom: "popover-bottom tour-bottom",
155
- left: "popover-left tour-left",
156
- right: "popover-right tour-right",
157
- topLeft: "popover-top tour-top-left",
158
- topRight: "popover-top tour-top-right",
159
- bottomLeft: "popover-bottom tour-bottom-left",
160
- bottomRight: "popover-bottom tour-bottom-right",
161
- leftTop: "popover-left tour-left-top",
162
- leftBottom: "popover-left tour-left-bottom",
163
- rightTop: "popover-right tour-right-top",
164
- rightBottom: "popover-right tour-right-bottom"
165
- };
166
- function getTourRootClasses({
167
- open,
168
- className
169
- }) {
170
- return cn(tourRootClass, open && tourOpenClass, className);
171
- }
172
- function getTourMaskClasses({
173
- visible,
174
- className
175
- }) {
176
- return cn(tourMaskClass, !visible && tourMaskHiddenClass, className);
177
- }
178
- function getTourPanelClasses({
179
- placement = "bottom",
180
- className
181
- }) {
182
- return cn(tourPanelClass, "popover-show", tourPlacementClasses[placement], className);
183
- }
184
- function getTourIndicatorClasses({ active }) {
185
- return cn(tourIndicatorClass, active && tourIndicatorActiveClass);
186
- }
187
-
188
188
  // src/components/tour/Tour.tsx
189
189
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
190
190
  var defaultCloseIcon = "x";
@@ -675,9 +675,9 @@ var Typography = Object.assign(TypographyRoot, {
675
675
  Link
676
676
  });
677
677
  export {
678
- Typography,
679
- Title,
680
- Text,
678
+ Link,
681
679
  Paragraph,
682
- Link
680
+ Text,
681
+ Title,
682
+ Typography
683
683
  };
@@ -185,12 +185,12 @@ function UploadRoot({
185
185
  }
186
186
  const uploadFile = fileToUploadFile(sourceFile);
187
187
  if (result === false) {
188
- const nextFile3 = {
188
+ const nextFile = {
189
189
  ...uploadFile,
190
190
  status: undefined,
191
191
  percent: undefined
192
192
  };
193
- commitFileList([...currentFileListRef.current, nextFile3], nextFile3);
193
+ commitFileList([...currentFileListRef.current, nextFile], nextFile);
194
194
  continue;
195
195
  }
196
196
  if (result instanceof File) {
@@ -200,9 +200,9 @@ function UploadRoot({
200
200
  type: result.type || sourceFile.type
201
201
  });
202
202
  }
203
- const nextFile2 = fileToUploadFile(uploadSource);
204
- commitFileList([...currentFileListRef.current, nextFile2], nextFile2);
205
- startRequest(nextFile2, uploadSource);
203
+ const nextFile = fileToUploadFile(uploadSource);
204
+ commitFileList([...currentFileListRef.current, nextFile], nextFile);
205
+ startRequest(nextFile, uploadSource);
206
206
  continue;
207
207
  }
208
208
  const nextFile = fileToUploadFile(uploadSource);
@@ -1 +1 @@
1
- export declare const version = "0.3.0";
1
+ export declare const version = "0.3.3";
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export type { Breakpoint } from "./components/grid";
8
8
  export * from "./components/button";
9
9
  export * from "./components/calendar";
10
10
  export * from "./components/card";
11
+ export * from "./components/chat";
11
12
  export * from "./components/carousel";
12
13
  export * from "./components/cascader";
13
14
  export * from "./components/badge";
@@ -95,5 +96,6 @@ export * from "./components/transfer";
95
96
  export * from "./components/tree";
96
97
  export * from "./components/tree-select";
97
98
  export * from "./components/typography";
99
+ export * from "./components/markdown";
98
100
  export * from "./components/upload";
99
101
  export * from "./components/watermark";