listpage-next 0.0.237 → 0.0.239

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.
@@ -11,7 +11,8 @@ export type BubbleProps = {
11
11
  references?: ReferenceListProps['references'];
12
12
  placement?: 'start' | 'end';
13
13
  role?: 'user' | 'assistant';
14
- markdownRender?: (text: string) => ReactNode;
14
+ status?: 'pending' | 'success' | 'error';
15
+ markdownRender?: (text: string, status: BubbleProps['status']) => ReactNode;
15
16
  reasoningMarkdownRender?: (text: string) => ReactNode;
16
17
  };
17
18
  export declare const Bubble: (props: BubbleProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,16 +6,17 @@ import { Markdown } from "./Markdown.js";
6
6
  import { Reasoning } from "./Reasoning.js";
7
7
  import { ReferenceList } from "./ReferenceList.js";
8
8
  const Bubble = (props)=>{
9
- const { className, content, reasoning_content, extra, feedback, markdownRender, reasoningMarkdownRender = markdownRender, references, suggests, role = 'user', placement = 'user' === role ? 'end' : 'start', showFeedback = (hovered)=>hovered } = props;
9
+ const { className, content, reasoning_content, extra, feedback, markdownRender, reasoningMarkdownRender = markdownRender, references, suggests, role = 'user', status, placement = 'user' === role ? 'end' : 'start', showFeedback = (hovered)=>hovered } = props;
10
10
  const containerRef = useRef(null);
11
11
  const feedbackRef = useRef(null);
12
12
  const containerHovered = useHover(containerRef);
13
13
  const feedbackHovered = useHover(feedbackRef);
14
14
  const hovered = containerHovered || feedbackHovered;
15
- const messageMarkdownEle = markdownRender ? markdownRender(content || '') : /*#__PURE__*/ jsx(Markdown, {
16
- content: content || ''
15
+ const cursorPlaceholder = 'pending' === status && 'assistant' === role ? '<placeholder type="pending" />' : '';
16
+ const messageMarkdownEle = markdownRender ? markdownRender(content || '', status) : /*#__PURE__*/ jsx(Markdown, {
17
+ content: (content || '') + cursorPlaceholder
17
18
  });
18
- const reasoningMarkdownEle = reasoningMarkdownRender ? reasoningMarkdownRender(reasoning_content || '') : /*#__PURE__*/ jsx(Markdown, {
19
+ const reasoningMarkdownEle = reasoningMarkdownRender ? reasoningMarkdownRender(reasoning_content || '', status) : /*#__PURE__*/ jsx(Markdown, {
19
20
  content: reasoning_content || ''
20
21
  });
21
22
  const message = 'user' === role ? /*#__PURE__*/ jsx(UserContentWrapper, {
@@ -1,8 +1,8 @@
1
1
  import { type JsonValue } from './types';
2
2
  export interface JsonEditorProps {
3
- defaultValue?: JsonValue;
4
3
  value?: JsonValue;
5
4
  onChange?: (v: JsonValue) => void;
5
+ schema?: any;
6
6
  }
7
7
  export interface JsonEditorHandle {
8
8
  update: () => void;
@@ -3,6 +3,7 @@ import { Flex, message } from "antd";
3
3
  import { forwardRef, useImperativeHandle, useState } from "react";
4
4
  import { Card } from "../../components/index.js";
5
5
  import styled_components from "styled-components";
6
+ import { JSONSchemaFaker } from "json-schema-faker";
6
7
  import { Toolbar } from "./Toolbar.js";
7
8
  import { CodeEditor } from "./CodeEditor.js";
8
9
  import { formatJson, minifyJson, validateJson } from "./utils.js";
@@ -41,8 +42,8 @@ const InfoBar = styled_components.div`
41
42
  border-radius: 4px;
42
43
  `;
43
44
  const JsonEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
44
- const { value, onChange, defaultValue } = props;
45
- const initialText = void 0 !== value ? JSON.stringify(value, null, 2) : defaultValue ? JSON.stringify(defaultValue, null, 2) : '';
45
+ const { value, onChange, schema } = props;
46
+ const initialText = void 0 !== value ? JSON.stringify(value, null, 2) : '';
46
47
  const [jsonInput, setJsonInput] = useState(initialText);
47
48
  const [validation, setValidation] = useState({
48
49
  isValid: true,
@@ -61,7 +62,7 @@ const JsonEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
61
62
  };
62
63
  useImperativeHandle(ref, ()=>({
63
64
  update: ()=>{
64
- updateInput(initialText);
65
+ setJsonInput(initialText);
65
66
  }
66
67
  }), [
67
68
  initialText,
@@ -79,7 +80,24 @@ const JsonEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
79
80
  navigator.clipboard.writeText(jsonInput);
80
81
  message.success('复制成功');
81
82
  };
83
+ const handleGenerateMock = ()=>{
84
+ if (schema) try {
85
+ JSONSchemaFaker.option({
86
+ alwaysFakeOptionals: true,
87
+ fillProperties: false
88
+ });
89
+ const mock = JSONSchemaFaker.generate(schema);
90
+ const formatted = JSON.stringify(mock, null, 2);
91
+ updateInput(formatted);
92
+ } catch (error) {
93
+ message.error('Mock 数据生成失败');
94
+ console.log(error);
95
+ }
96
+ };
82
97
  return /*#__PURE__*/ jsx(Card, {
98
+ style: {
99
+ height: '100%'
100
+ },
83
101
  title: /*#__PURE__*/ jsxs(Flex, {
84
102
  align: "center",
85
103
  gap: 6,
@@ -99,7 +117,8 @@ const JsonEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
99
117
  disabled: !validation.isValid,
100
118
  onFormat: handleFormat,
101
119
  onMinify: handleMinify,
102
- onCopy: handleCopy
120
+ onCopy: handleCopy,
121
+ onGenerateMock: schema && handleGenerateMock
103
122
  })
104
123
  }),
105
124
  children: /*#__PURE__*/ jsx(EditorWrapper, {
@@ -3,6 +3,7 @@ interface ToolbarProps {
3
3
  onFormat: () => void;
4
4
  onMinify: () => void;
5
5
  onCopy: () => void;
6
+ onGenerateMock: () => void;
6
7
  }
7
- export declare const Toolbar: ({ onFormat, onMinify, onCopy, disabled, }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Toolbar: ({ onGenerateMock, onFormat, onMinify, onCopy, disabled, }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Button, Tooltip } from "antd";
3
- import { Braces, Copy, FileArchive } from "lucide-react";
3
+ import { Braces, Copy, FileArchive, Sparkles } from "lucide-react";
4
4
  import styled_components from "styled-components";
5
5
  const ToolbarContainer = styled_components.div`
6
6
  display: flex;
@@ -12,8 +12,23 @@ const ActionButton = styled_components(Button)`
12
12
  background-color: rgba(31, 41, 55, 0.5);
13
13
  }
14
14
  `;
15
- const Toolbar = ({ onFormat, onMinify, onCopy, disabled })=>/*#__PURE__*/ jsxs(ToolbarContainer, {
15
+ const Toolbar = ({ onGenerateMock, onFormat, onMinify, onCopy, disabled })=>/*#__PURE__*/ jsxs(ToolbarContainer, {
16
16
  children: [
17
+ onGenerateMock && /*#__PURE__*/ jsx(Tooltip, {
18
+ title: "随机生成数据",
19
+ children: /*#__PURE__*/ jsx(ActionButton, {
20
+ disabled: disabled,
21
+ size: "small",
22
+ type: "text",
23
+ onClick: onGenerateMock,
24
+ icon: /*#__PURE__*/ jsx(Sparkles, {
25
+ style: {
26
+ width: 14,
27
+ height: 14
28
+ }
29
+ })
30
+ })
31
+ }),
17
32
  /*#__PURE__*/ jsx(Tooltip, {
18
33
  title: "格式化",
19
34
  children: /*#__PURE__*/ jsx(ActionButton, {
@@ -23,7 +38,8 @@ const Toolbar = ({ onFormat, onMinify, onCopy, disabled })=>/*#__PURE__*/ jsxs(T
23
38
  onClick: onFormat,
24
39
  icon: /*#__PURE__*/ jsx(Braces, {
25
40
  style: {
26
- fontSize: 16
41
+ width: 14,
42
+ height: 14
27
43
  }
28
44
  })
29
45
  })
@@ -37,7 +53,8 @@ const Toolbar = ({ onFormat, onMinify, onCopy, disabled })=>/*#__PURE__*/ jsxs(T
37
53
  onClick: onMinify,
38
54
  icon: /*#__PURE__*/ jsx(FileArchive, {
39
55
  style: {
40
- fontSize: 16
56
+ width: 14,
57
+ height: 14
41
58
  }
42
59
  })
43
60
  })
@@ -51,7 +68,8 @@ const Toolbar = ({ onFormat, onMinify, onCopy, disabled })=>/*#__PURE__*/ jsxs(T
51
68
  onClick: onCopy,
52
69
  icon: /*#__PURE__*/ jsx(Copy, {
53
70
  style: {
54
- fontSize: 16
71
+ width: 14,
72
+ height: 14
55
73
  }
56
74
  })
57
75
  })
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ButtonProps {
3
+ onClick?: () => void;
4
+ disabled?: boolean;
5
+ loading?: boolean;
6
+ children?: ReactNode;
7
+ type?: 'primary' | 'secondary';
8
+ size?: 'large' | 'medium' | 'small';
9
+ }
10
+ export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import 'prismjs/components/prism-markdown';
2
+ export interface PromptEditorProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ placeholder?: string;
6
+ className?: string;
7
+ }
8
+ export declare const PromptEditor: ({ value, onChange, placeholder, className, }: PromptEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { PromptEditor, type PromptEditorProps } from './PromptEditor';
2
+ export { Button, type ButtonProps } from './Button';
package/dist/ui.css ADDED
@@ -0,0 +1,625 @@
1
+ /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
7
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
8
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
9
+ "Courier New", monospace;
10
+ --color-blue-500: oklch(62.3% 0.214 259.815);
11
+ --color-blue-600: oklch(54.6% 0.245 262.881);
12
+ --color-blue-900: oklch(37.9% 0.146 265.522);
13
+ --color-slate-300: oklch(86.9% 0.022 252.894);
14
+ --color-gray-300: oklch(87.2% 0.01 258.338);
15
+ --color-gray-500: oklch(55.1% 0.027 264.364);
16
+ --color-gray-700: oklch(37.3% 0.034 259.733);
17
+ --color-gray-800: oklch(27.8% 0.033 256.848);
18
+ --color-white: #fff;
19
+ --spacing: 0.25rem;
20
+ --text-xs: 0.75rem;
21
+ --text-xs--line-height: calc(1 / 0.75);
22
+ --text-sm: 0.875rem;
23
+ --text-sm--line-height: calc(1.25 / 0.875);
24
+ --font-weight-medium: 500;
25
+ --radius-md: 0.375rem;
26
+ --radius-lg: 0.5rem;
27
+ --animate-spin: spin 1s linear infinite;
28
+ --default-transition-duration: 150ms;
29
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
30
+ --default-font-family: var(--font-sans);
31
+ --default-mono-font-family: var(--font-mono);
32
+ }
33
+ }
34
+ @layer base {
35
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
36
+ box-sizing: border-box;
37
+ margin: 0;
38
+ padding: 0;
39
+ border: 0 solid;
40
+ }
41
+ html, :host {
42
+ line-height: 1.5;
43
+ -webkit-text-size-adjust: 100%;
44
+ tab-size: 4;
45
+ font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
46
+ font-feature-settings: var(--default-font-feature-settings, normal);
47
+ font-variation-settings: var(--default-font-variation-settings, normal);
48
+ -webkit-tap-highlight-color: transparent;
49
+ }
50
+ hr {
51
+ height: 0;
52
+ color: inherit;
53
+ border-top-width: 1px;
54
+ }
55
+ abbr:where([title]) {
56
+ -webkit-text-decoration: underline dotted;
57
+ text-decoration: underline dotted;
58
+ }
59
+ h1, h2, h3, h4, h5, h6 {
60
+ font-size: inherit;
61
+ font-weight: inherit;
62
+ }
63
+ a {
64
+ color: inherit;
65
+ -webkit-text-decoration: inherit;
66
+ text-decoration: inherit;
67
+ }
68
+ b, strong {
69
+ font-weight: bolder;
70
+ }
71
+ code, kbd, samp, pre {
72
+ font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
73
+ font-feature-settings: var(--default-mono-font-feature-settings, normal);
74
+ font-variation-settings: var(--default-mono-font-variation-settings, normal);
75
+ font-size: 1em;
76
+ }
77
+ small {
78
+ font-size: 80%;
79
+ }
80
+ sub, sup {
81
+ font-size: 75%;
82
+ line-height: 0;
83
+ position: relative;
84
+ vertical-align: baseline;
85
+ }
86
+ sub {
87
+ bottom: -0.25em;
88
+ }
89
+ sup {
90
+ top: -0.5em;
91
+ }
92
+ table {
93
+ text-indent: 0;
94
+ border-color: inherit;
95
+ border-collapse: collapse;
96
+ }
97
+ :-moz-focusring {
98
+ outline: auto;
99
+ }
100
+ progress {
101
+ vertical-align: baseline;
102
+ }
103
+ summary {
104
+ display: list-item;
105
+ }
106
+ ol, ul, menu {
107
+ list-style: none;
108
+ }
109
+ img, svg, video, canvas, audio, iframe, embed, object {
110
+ display: block;
111
+ vertical-align: middle;
112
+ }
113
+ img, video {
114
+ max-width: 100%;
115
+ height: auto;
116
+ }
117
+ button, input, select, optgroup, textarea, ::file-selector-button {
118
+ font: inherit;
119
+ font-feature-settings: inherit;
120
+ font-variation-settings: inherit;
121
+ letter-spacing: inherit;
122
+ color: inherit;
123
+ border-radius: 0;
124
+ background-color: transparent;
125
+ opacity: 1;
126
+ }
127
+ :where(select:is([multiple], [size])) optgroup {
128
+ font-weight: bolder;
129
+ }
130
+ :where(select:is([multiple], [size])) optgroup option {
131
+ padding-inline-start: 20px;
132
+ }
133
+ ::file-selector-button {
134
+ margin-inline-end: 4px;
135
+ }
136
+ ::placeholder {
137
+ opacity: 1;
138
+ }
139
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
140
+ ::placeholder {
141
+ color: currentcolor;
142
+ @supports (color: color-mix(in lab, red, red)) {
143
+ color: color-mix(in oklab, currentcolor 50%, transparent);
144
+ }
145
+ }
146
+ }
147
+ textarea {
148
+ resize: vertical;
149
+ }
150
+ ::-webkit-search-decoration {
151
+ -webkit-appearance: none;
152
+ }
153
+ ::-webkit-date-and-time-value {
154
+ min-height: 1lh;
155
+ text-align: inherit;
156
+ }
157
+ ::-webkit-datetime-edit {
158
+ display: inline-flex;
159
+ }
160
+ ::-webkit-datetime-edit-fields-wrapper {
161
+ padding: 0;
162
+ }
163
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
164
+ padding-block: 0;
165
+ }
166
+ ::-webkit-calendar-picker-indicator {
167
+ line-height: 1;
168
+ }
169
+ :-moz-ui-invalid {
170
+ box-shadow: none;
171
+ }
172
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
173
+ appearance: button;
174
+ }
175
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
176
+ height: auto;
177
+ }
178
+ [hidden]:where(:not([hidden="until-found"])) {
179
+ display: none !important;
180
+ }
181
+ }
182
+ @layer utilities {
183
+ .visible {
184
+ visibility: visible;
185
+ }
186
+ .absolute {
187
+ position: absolute;
188
+ }
189
+ .relative {
190
+ position: relative;
191
+ }
192
+ .block {
193
+ display: block;
194
+ }
195
+ .flex {
196
+ display: flex;
197
+ }
198
+ .inline {
199
+ display: inline;
200
+ }
201
+ .inline-flex {
202
+ display: inline-flex;
203
+ }
204
+ .table {
205
+ display: table;
206
+ }
207
+ .h-full {
208
+ height: 100%;
209
+ }
210
+ .flex-1 {
211
+ flex: 1;
212
+ }
213
+ .flex-shrink {
214
+ flex-shrink: 1;
215
+ }
216
+ .flex-grow {
217
+ flex-grow: 1;
218
+ }
219
+ .border-collapse {
220
+ border-collapse: collapse;
221
+ }
222
+ .transform {
223
+ transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
224
+ }
225
+ .animate-spin {
226
+ animation: var(--animate-spin);
227
+ }
228
+ .cursor-pointer {
229
+ cursor: pointer;
230
+ }
231
+ .resize {
232
+ resize: both;
233
+ }
234
+ .flex-col {
235
+ flex-direction: column;
236
+ }
237
+ .items-center {
238
+ align-items: center;
239
+ }
240
+ .gap-2 {
241
+ gap: calc(var(--spacing) * 2);
242
+ }
243
+ .overflow-auto {
244
+ overflow: auto;
245
+ }
246
+ .overflow-hidden {
247
+ overflow: hidden;
248
+ }
249
+ .rounded {
250
+ border-radius: 0.25rem;
251
+ }
252
+ .rounded-lg {
253
+ border-radius: var(--radius-lg);
254
+ }
255
+ .rounded-md {
256
+ border-radius: var(--radius-md);
257
+ }
258
+ .border {
259
+ border-style: var(--tw-border-style);
260
+ border-width: 1px;
261
+ }
262
+ .border-gray-700 {
263
+ border-color: var(--color-gray-700);
264
+ }
265
+ .bg-\[\#0B1120\] {
266
+ background-color: #0B1120;
267
+ }
268
+ .bg-blue-600 {
269
+ background-color: var(--color-blue-600);
270
+ }
271
+ .px-3 {
272
+ padding-inline: calc(var(--spacing) * 3);
273
+ }
274
+ .px-4 {
275
+ padding-inline: calc(var(--spacing) * 4);
276
+ }
277
+ .px-6 {
278
+ padding-inline: calc(var(--spacing) * 6);
279
+ }
280
+ .py-1\.5 {
281
+ padding-block: calc(var(--spacing) * 1.5);
282
+ }
283
+ .py-2 {
284
+ padding-block: calc(var(--spacing) * 2);
285
+ }
286
+ .py-2\.5 {
287
+ padding-block: calc(var(--spacing) * 2.5);
288
+ }
289
+ .font-mono {
290
+ font-family: var(--font-mono);
291
+ }
292
+ .text-sm {
293
+ font-size: var(--text-sm);
294
+ line-height: var(--tw-leading, var(--text-sm--line-height));
295
+ }
296
+ .text-xs {
297
+ font-size: var(--text-xs);
298
+ line-height: var(--tw-leading, var(--text-xs--line-height));
299
+ }
300
+ .font-medium {
301
+ --tw-font-weight: var(--font-weight-medium);
302
+ font-weight: var(--font-weight-medium);
303
+ }
304
+ .text-gray-300 {
305
+ color: var(--color-gray-300);
306
+ }
307
+ .text-slate-300 {
308
+ color: var(--color-slate-300);
309
+ }
310
+ .text-white {
311
+ color: var(--color-white);
312
+ }
313
+ .shadow-lg {
314
+ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
315
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
316
+ }
317
+ .shadow-blue-900\/20 {
318
+ --tw-shadow-color: color-mix(in srgb, oklch(37.9% 0.146 265.522) 20%, transparent);
319
+ @supports (color: color-mix(in lab, red, red)) {
320
+ --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-blue-900) 20%, transparent) var(--tw-shadow-alpha), transparent);
321
+ }
322
+ }
323
+ .outline {
324
+ outline-style: var(--tw-outline-style);
325
+ outline-width: 1px;
326
+ }
327
+ .filter {
328
+ filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
329
+ }
330
+ .transition {
331
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
332
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
333
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
334
+ }
335
+ .transition-all {
336
+ transition-property: all;
337
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
338
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
339
+ }
340
+ .transition-colors {
341
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
342
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
343
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
344
+ }
345
+ .hover\:scale-\[1\.02\] {
346
+ &:hover {
347
+ @media (hover: hover) {
348
+ scale: 1.02;
349
+ }
350
+ }
351
+ }
352
+ .hover\:bg-blue-500 {
353
+ &:hover {
354
+ @media (hover: hover) {
355
+ background-color: var(--color-blue-500);
356
+ }
357
+ }
358
+ }
359
+ .hover\:bg-gray-800 {
360
+ &:hover {
361
+ @media (hover: hover) {
362
+ background-color: var(--color-gray-800);
363
+ }
364
+ }
365
+ }
366
+ .hover\:text-white {
367
+ &:hover {
368
+ @media (hover: hover) {
369
+ color: var(--color-white);
370
+ }
371
+ }
372
+ }
373
+ .focus\:outline-none {
374
+ &:focus {
375
+ --tw-outline-style: none;
376
+ outline-style: none;
377
+ }
378
+ }
379
+ .focus-visible\:ring-2 {
380
+ &:focus-visible {
381
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
382
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
383
+ }
384
+ }
385
+ .focus-visible\:ring-blue-500 {
386
+ &:focus-visible {
387
+ --tw-ring-color: var(--color-blue-500);
388
+ }
389
+ }
390
+ .focus-visible\:ring-gray-500 {
391
+ &:focus-visible {
392
+ --tw-ring-color: var(--color-gray-500);
393
+ }
394
+ }
395
+ .focus-visible\:ring-offset-2 {
396
+ &:focus-visible {
397
+ --tw-ring-offset-width: 2px;
398
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
399
+ }
400
+ }
401
+ .focus-visible\:outline-none {
402
+ &:focus-visible {
403
+ --tw-outline-style: none;
404
+ outline-style: none;
405
+ }
406
+ }
407
+ .active\:scale-\[0\.98\] {
408
+ &:active {
409
+ scale: 0.98;
410
+ }
411
+ }
412
+ .active\:bg-gray-700 {
413
+ &:active {
414
+ background-color: var(--color-gray-700);
415
+ }
416
+ }
417
+ .disabled\:cursor-not-allowed {
418
+ &:disabled {
419
+ cursor: not-allowed;
420
+ }
421
+ }
422
+ .disabled\:opacity-50 {
423
+ &:disabled {
424
+ opacity: 50%;
425
+ }
426
+ }
427
+ }
428
+ @property --tw-rotate-x {
429
+ syntax: "*";
430
+ inherits: false;
431
+ }
432
+ @property --tw-rotate-y {
433
+ syntax: "*";
434
+ inherits: false;
435
+ }
436
+ @property --tw-rotate-z {
437
+ syntax: "*";
438
+ inherits: false;
439
+ }
440
+ @property --tw-skew-x {
441
+ syntax: "*";
442
+ inherits: false;
443
+ }
444
+ @property --tw-skew-y {
445
+ syntax: "*";
446
+ inherits: false;
447
+ }
448
+ @property --tw-border-style {
449
+ syntax: "*";
450
+ inherits: false;
451
+ initial-value: solid;
452
+ }
453
+ @property --tw-font-weight {
454
+ syntax: "*";
455
+ inherits: false;
456
+ }
457
+ @property --tw-shadow {
458
+ syntax: "*";
459
+ inherits: false;
460
+ initial-value: 0 0 #0000;
461
+ }
462
+ @property --tw-shadow-color {
463
+ syntax: "*";
464
+ inherits: false;
465
+ }
466
+ @property --tw-shadow-alpha {
467
+ syntax: "<percentage>";
468
+ inherits: false;
469
+ initial-value: 100%;
470
+ }
471
+ @property --tw-inset-shadow {
472
+ syntax: "*";
473
+ inherits: false;
474
+ initial-value: 0 0 #0000;
475
+ }
476
+ @property --tw-inset-shadow-color {
477
+ syntax: "*";
478
+ inherits: false;
479
+ }
480
+ @property --tw-inset-shadow-alpha {
481
+ syntax: "<percentage>";
482
+ inherits: false;
483
+ initial-value: 100%;
484
+ }
485
+ @property --tw-ring-color {
486
+ syntax: "*";
487
+ inherits: false;
488
+ }
489
+ @property --tw-ring-shadow {
490
+ syntax: "*";
491
+ inherits: false;
492
+ initial-value: 0 0 #0000;
493
+ }
494
+ @property --tw-inset-ring-color {
495
+ syntax: "*";
496
+ inherits: false;
497
+ }
498
+ @property --tw-inset-ring-shadow {
499
+ syntax: "*";
500
+ inherits: false;
501
+ initial-value: 0 0 #0000;
502
+ }
503
+ @property --tw-ring-inset {
504
+ syntax: "*";
505
+ inherits: false;
506
+ }
507
+ @property --tw-ring-offset-width {
508
+ syntax: "<length>";
509
+ inherits: false;
510
+ initial-value: 0px;
511
+ }
512
+ @property --tw-ring-offset-color {
513
+ syntax: "*";
514
+ inherits: false;
515
+ initial-value: #fff;
516
+ }
517
+ @property --tw-ring-offset-shadow {
518
+ syntax: "*";
519
+ inherits: false;
520
+ initial-value: 0 0 #0000;
521
+ }
522
+ @property --tw-outline-style {
523
+ syntax: "*";
524
+ inherits: false;
525
+ initial-value: solid;
526
+ }
527
+ @property --tw-blur {
528
+ syntax: "*";
529
+ inherits: false;
530
+ }
531
+ @property --tw-brightness {
532
+ syntax: "*";
533
+ inherits: false;
534
+ }
535
+ @property --tw-contrast {
536
+ syntax: "*";
537
+ inherits: false;
538
+ }
539
+ @property --tw-grayscale {
540
+ syntax: "*";
541
+ inherits: false;
542
+ }
543
+ @property --tw-hue-rotate {
544
+ syntax: "*";
545
+ inherits: false;
546
+ }
547
+ @property --tw-invert {
548
+ syntax: "*";
549
+ inherits: false;
550
+ }
551
+ @property --tw-opacity {
552
+ syntax: "*";
553
+ inherits: false;
554
+ }
555
+ @property --tw-saturate {
556
+ syntax: "*";
557
+ inherits: false;
558
+ }
559
+ @property --tw-sepia {
560
+ syntax: "*";
561
+ inherits: false;
562
+ }
563
+ @property --tw-drop-shadow {
564
+ syntax: "*";
565
+ inherits: false;
566
+ }
567
+ @property --tw-drop-shadow-color {
568
+ syntax: "*";
569
+ inherits: false;
570
+ }
571
+ @property --tw-drop-shadow-alpha {
572
+ syntax: "<percentage>";
573
+ inherits: false;
574
+ initial-value: 100%;
575
+ }
576
+ @property --tw-drop-shadow-size {
577
+ syntax: "*";
578
+ inherits: false;
579
+ }
580
+ @keyframes spin {
581
+ to {
582
+ transform: rotate(360deg);
583
+ }
584
+ }
585
+ @layer properties {
586
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
587
+ *, ::before, ::after, ::backdrop {
588
+ --tw-rotate-x: initial;
589
+ --tw-rotate-y: initial;
590
+ --tw-rotate-z: initial;
591
+ --tw-skew-x: initial;
592
+ --tw-skew-y: initial;
593
+ --tw-border-style: solid;
594
+ --tw-font-weight: initial;
595
+ --tw-shadow: 0 0 #0000;
596
+ --tw-shadow-color: initial;
597
+ --tw-shadow-alpha: 100%;
598
+ --tw-inset-shadow: 0 0 #0000;
599
+ --tw-inset-shadow-color: initial;
600
+ --tw-inset-shadow-alpha: 100%;
601
+ --tw-ring-color: initial;
602
+ --tw-ring-shadow: 0 0 #0000;
603
+ --tw-inset-ring-color: initial;
604
+ --tw-inset-ring-shadow: 0 0 #0000;
605
+ --tw-ring-inset: initial;
606
+ --tw-ring-offset-width: 0px;
607
+ --tw-ring-offset-color: #fff;
608
+ --tw-ring-offset-shadow: 0 0 #0000;
609
+ --tw-outline-style: solid;
610
+ --tw-blur: initial;
611
+ --tw-brightness: initial;
612
+ --tw-contrast: initial;
613
+ --tw-grayscale: initial;
614
+ --tw-hue-rotate: initial;
615
+ --tw-invert: initial;
616
+ --tw-opacity: initial;
617
+ --tw-saturate: initial;
618
+ --tw-sepia: initial;
619
+ --tw-drop-shadow: initial;
620
+ --tw-drop-shadow-color: initial;
621
+ --tw-drop-shadow-alpha: 100%;
622
+ --tw-drop-shadow-size: initial;
623
+ }
624
+ }
625
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "listpage-next",
3
- "version": "0.0.237",
3
+ "version": "0.0.239",
4
4
  "description": "A React component library for creating filter forms with Ant Design",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,7 +9,12 @@
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.js"
12
- }
12
+ },
13
+ "./ui": {
14
+ "types": "./dist/ui/ui.d.ts",
15
+ "import": "./dist/ui/ui.js"
16
+ },
17
+ "./ui.css": "./dist/ui.css"
13
18
  },
14
19
  "types": "./dist/index.d.ts",
15
20
  "files": [
@@ -25,7 +30,8 @@
25
30
  ],
26
31
  "license": "MIT",
27
32
  "scripts": {
28
- "build": "rslib build",
33
+ "build": "rslib build && npm run build:css || true",
34
+ "build:css": "npx -p @tailwindcss/cli@4.1.17 -p tailwindcss@4.1.17 tailwindcss -c tailwind.config.cjs -i ./src/ui/tailwind.css -o ./dist/ui.css --min",
29
35
  "format": "prettier --write .",
30
36
  "prepublishOnly": "npm run build"
31
37
  },
@@ -41,7 +47,11 @@
41
47
  "typescript": "^5.9.2",
42
48
  "react": "^19.1.1",
43
49
  "react-router-dom": ">=6.0.0",
44
- "@types/markdown-it": "~14.1.2"
50
+ "@types/markdown-it": "~14.1.2",
51
+ "tailwindcss": "~4.1.17",
52
+ "@tailwindcss/cli": "^4.1.0",
53
+ "postcss": "^8.4.49",
54
+ "autoprefixer": "^10.4.20"
45
55
  },
46
56
  "peerDependencies": {
47
57
  "react": ">=16.9.0",
@@ -70,6 +80,10 @@
70
80
  "@tiptap/core": "~3.10.7",
71
81
  "@tiptap/pm": "~3.10.7",
72
82
  "prosemirror-state": "~1.4.4",
73
- "lucide-react": "~0.555.0"
83
+ "lucide-react": "~0.555.0",
84
+ "react-simple-code-editor": "~0.14.1",
85
+ "prismjs": "~1.30.0",
86
+ "@types/prismjs": "~1.26.5",
87
+ "json-schema-faker": "~0.5.9"
74
88
  }
75
89
  }