@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.
- package/README.md +2 -2
- package/dist/{chunk-r9wkv7xd.js → chunk-fwjzvsrx.js} +3 -3
- package/dist/classes/chat.d.ts +35 -0
- package/dist/classes/index.d.ts +1 -0
- package/dist/classes/index.js +1271 -1184
- package/dist/components/anchor/index.js +2 -2
- package/dist/components/app/index.js +85 -85
- package/dist/components/cascader/index.js +2 -2
- package/dist/components/chat/Chat.d.ts +14 -0
- package/dist/components/chat/Chat.types.d.ts +47 -0
- package/dist/components/chat/index.d.ts +2 -0
- package/dist/components/chat/index.js +220 -0
- package/dist/components/color-picker/index.js +4 -4
- package/dist/components/config-provider/index.js +2 -2
- package/dist/components/dm-breadcrumb/index.js +18 -18
- package/dist/components/dm-date-picker/index.js +94 -94
- package/dist/components/dm-drawer/index.js +16 -16
- package/dist/components/dm-layout/index.js +189 -189
- package/dist/components/dm-menu/index.js +24 -24
- package/dist/components/dm-message/index.js +18 -18
- package/dist/components/dm-page-header/index.js +158 -158
- package/dist/components/dm-pagination/index.js +39 -39
- package/dist/components/dm-pro-table/index.js +1558 -1558
- package/dist/components/dm-provider/index.js +94 -94
- package/dist/components/dm-query/index.js +33 -31
- package/dist/components/dm-search/index.js +25 -25
- package/dist/components/dm-splitter/index.js +32 -32
- package/dist/components/dm-status/index.js +25 -25
- package/dist/components/dm-table/index.js +595 -595
- package/dist/components/dm-tabs/index.js +34 -34
- package/dist/components/dm-toolbar/index.js +23 -23
- package/dist/components/dm-tree/index.js +92 -92
- package/dist/components/dm-truncate/index.js +33 -33
- package/dist/components/dropdown/index.js +83 -83
- package/dist/components/form/index.js +2 -2
- package/dist/components/grid/index.js +2 -2
- package/dist/components/input/index.js +4 -4
- package/dist/components/markdown/index.js +1 -1
- package/dist/components/message/index.js +5 -5
- package/dist/components/notification/index.js +2 -2
- package/dist/components/popconfirm/index.js +42 -42
- package/dist/components/skeleton/index.js +5 -5
- package/dist/components/spin/index.js +2 -2
- package/dist/components/steps/index.js +2 -2
- package/dist/components/table/index.js +2 -2
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tag/index.js +2 -2
- package/dist/components/tour/index.js +62 -62
- package/dist/components/typography/index.js +4 -4
- package/dist/components/upload/index.js +5 -5
- package/dist/generated/version.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1716 -1525
- package/dist/infrastructure.js +11 -11
- package/dist/styles.css +13430 -9848
- package/dist/theme/index.js +3 -3
- package/dist/utils/index.js +5 -5
- package/package.json +10 -6
|
@@ -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
|
|
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
|
|
157
|
+
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
158
158
|
return /* @__PURE__ */ jsx("div", {
|
|
159
159
|
className: getMessageHolderClasses({
|
|
160
|
-
placement:
|
|
160
|
+
placement: snapshot.config.placement,
|
|
161
161
|
className
|
|
162
162
|
}),
|
|
163
|
-
children:
|
|
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
|
-
|
|
204
|
-
|
|
203
|
+
MessageHolder,
|
|
204
|
+
message
|
|
205
205
|
};
|
|
@@ -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
|
-
|
|
233
|
-
SkeletonInput,
|
|
234
|
-
SkeletonImage,
|
|
235
|
-
SkeletonButton,
|
|
232
|
+
Skeleton,
|
|
236
233
|
SkeletonAvatar,
|
|
237
|
-
|
|
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
|
|
69
|
-
return () => window.clearTimeout(
|
|
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);
|
|
@@ -112,8 +112,8 @@ function getRecordKey(record, index, rowKey) {
|
|
|
112
112
|
return rowKey(record, index);
|
|
113
113
|
}
|
|
114
114
|
if (rowKey) {
|
|
115
|
-
const
|
|
116
|
-
return typeof
|
|
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;
|
|
@@ -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";
|
|
@@ -185,12 +185,12 @@ function UploadRoot({
|
|
|
185
185
|
}
|
|
186
186
|
const uploadFile = fileToUploadFile(sourceFile);
|
|
187
187
|
if (result === false) {
|
|
188
|
-
const
|
|
188
|
+
const nextFile = {
|
|
189
189
|
...uploadFile,
|
|
190
190
|
status: undefined,
|
|
191
191
|
percent: undefined
|
|
192
192
|
};
|
|
193
|
-
commitFileList([...currentFileListRef.current,
|
|
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
|
|
204
|
-
commitFileList([...currentFileListRef.current,
|
|
205
|
-
startRequest(
|
|
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
|
+
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";
|