@duskmoon-dev/components 0.3.1 → 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 (58) hide show
  1. package/README.md +2 -2
  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 +1 -0
  5. package/dist/classes/index.js +1271 -1184
  6. package/dist/components/anchor/index.js +2 -2
  7. package/dist/components/app/index.js +85 -85
  8. package/dist/components/cascader/index.js +2 -2
  9. package/dist/components/chat/Chat.d.ts +14 -0
  10. package/dist/components/chat/Chat.types.d.ts +47 -0
  11. package/dist/components/chat/index.d.ts +2 -0
  12. package/dist/components/chat/index.js +220 -0
  13. package/dist/components/color-picker/index.js +4 -4
  14. package/dist/components/config-provider/index.js +2 -2
  15. package/dist/components/dm-breadcrumb/index.js +18 -18
  16. package/dist/components/dm-date-picker/index.js +94 -94
  17. package/dist/components/dm-drawer/index.js +16 -16
  18. package/dist/components/dm-layout/index.js +189 -189
  19. package/dist/components/dm-menu/index.js +24 -24
  20. package/dist/components/dm-message/index.js +18 -18
  21. package/dist/components/dm-page-header/index.js +158 -158
  22. package/dist/components/dm-pagination/index.js +39 -39
  23. package/dist/components/dm-pro-table/index.js +1558 -1558
  24. package/dist/components/dm-provider/index.js +94 -94
  25. package/dist/components/dm-query/index.js +33 -31
  26. package/dist/components/dm-search/index.js +25 -25
  27. package/dist/components/dm-splitter/index.js +32 -32
  28. package/dist/components/dm-status/index.js +25 -25
  29. package/dist/components/dm-table/index.js +595 -595
  30. package/dist/components/dm-tabs/index.js +34 -34
  31. package/dist/components/dm-toolbar/index.js +23 -23
  32. package/dist/components/dm-tree/index.js +92 -92
  33. package/dist/components/dm-truncate/index.js +33 -33
  34. package/dist/components/dropdown/index.js +83 -83
  35. package/dist/components/form/index.js +2 -2
  36. package/dist/components/grid/index.js +2 -2
  37. package/dist/components/input/index.js +4 -4
  38. package/dist/components/markdown/index.js +1 -1
  39. package/dist/components/message/index.js +5 -5
  40. package/dist/components/notification/index.js +2 -2
  41. package/dist/components/popconfirm/index.js +42 -42
  42. package/dist/components/skeleton/index.js +5 -5
  43. package/dist/components/spin/index.js +2 -2
  44. package/dist/components/steps/index.js +2 -2
  45. package/dist/components/table/index.js +2 -2
  46. package/dist/components/tabs/index.js +2 -2
  47. package/dist/components/tag/index.js +2 -2
  48. package/dist/components/tour/index.js +62 -62
  49. package/dist/components/typography/index.js +4 -4
  50. package/dist/components/upload/index.js +5 -5
  51. package/dist/generated/version.d.ts +1 -1
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +1716 -1525
  54. package/dist/infrastructure.js +11 -11
  55. package/dist/styles.css +13430 -9848
  56. package/dist/theme/index.js +3 -3
  57. package/dist/utils/index.js +5 -5
  58. package/package.json +10 -6
@@ -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
  };
@@ -104,7 +104,7 @@ function markdownSource(markdown, mode) {
104
104
  const frontMatter = splitFrontMatter(markdown);
105
105
  return frontMatter ?? { body: markdown, source: undefined };
106
106
  }
107
- var Markdown = forwardRef(function Markdown2({
107
+ var Markdown = forwardRef(function Markdown({
108
108
  markdown = "",
109
109
  breaks = true,
110
110
  colorChips = true,
@@ -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.1";
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";