@btst/components 0.0.0-stage → 1.0.0-beta.0

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 (161) hide show
  1. package/LICENSE.md +17 -0
  2. package/dist/_private/ui/styles/markdown-editor.css +31 -0
  3. package/dist/auto-form/index.cjs +8 -0
  4. package/dist/auto-form/index.d.cts +26 -0
  5. package/dist/auto-form/index.d.mts +26 -0
  6. package/dist/auto-form/index.d.ts +26 -0
  7. package/dist/auto-form/index.mjs +1 -0
  8. package/dist/empty/index.cjs +12 -0
  9. package/dist/empty/index.d.cts +15 -0
  10. package/dist/empty/index.d.mts +15 -0
  11. package/dist/empty/index.d.ts +15 -0
  12. package/dist/empty/index.mjs +1 -0
  13. package/dist/form-builder/index.cjs +16 -0
  14. package/dist/form-builder/index.d.cts +395 -0
  15. package/dist/form-builder/index.d.mts +395 -0
  16. package/dist/form-builder/index.d.ts +395 -0
  17. package/dist/form-builder/index.mjs +4 -0
  18. package/dist/markdown/index.cjs +9 -0
  19. package/dist/markdown/index.d.cts +46 -0
  20. package/dist/markdown/index.d.mts +46 -0
  21. package/dist/markdown/index.d.ts +46 -0
  22. package/dist/markdown/index.mjs +2 -0
  23. package/dist/multi-select/index.cjs +7 -0
  24. package/dist/multi-select/index.d.cts +78 -0
  25. package/dist/multi-select/index.d.mts +78 -0
  26. package/dist/multi-select/index.d.ts +78 -0
  27. package/dist/multi-select/index.mjs +1 -0
  28. package/dist/search-select/index.cjs +7 -0
  29. package/dist/search-select/index.d.cts +16 -0
  30. package/dist/search-select/index.d.mts +16 -0
  31. package/dist/search-select/index.d.ts +16 -0
  32. package/dist/search-select/index.mjs +1 -0
  33. package/dist/shared/components.BdvBiegH.d.cts +291 -0
  34. package/dist/shared/components.BdvBiegH.d.mts +291 -0
  35. package/dist/shared/components.BdvBiegH.d.ts +291 -0
  36. package/dist/shared/components.CZMWR72v.d.cts +10 -0
  37. package/dist/shared/components.CZMWR72v.d.mts +10 -0
  38. package/dist/shared/components.CZMWR72v.d.ts +10 -0
  39. package/dist/stepped-auto-form/index.cjs +7 -0
  40. package/dist/stepped-auto-form/index.d.cts +37 -0
  41. package/dist/stepped-auto-form/index.d.mts +37 -0
  42. package/dist/stepped-auto-form/index.d.ts +37 -0
  43. package/dist/stepped-auto-form/index.mjs +1 -0
  44. package/dist/style.css +440 -0
  45. package/dist/ui/src/components/accordion.cjs +81 -0
  46. package/dist/ui/src/components/accordion.mjs +62 -0
  47. package/dist/ui/src/components/auto-form/common/label.cjs +18 -0
  48. package/dist/ui/src/components/auto-form/common/label.mjs +16 -0
  49. package/dist/ui/src/components/auto-form/common/tooltip.cjs +9 -0
  50. package/dist/ui/src/components/auto-form/common/tooltip.mjs +7 -0
  51. package/dist/ui/src/components/auto-form/config.cjs +40 -0
  52. package/dist/ui/src/components/auto-form/config.mjs +37 -0
  53. package/dist/ui/src/components/auto-form/dependencies.cjs +48 -0
  54. package/dist/ui/src/components/auto-form/dependencies.mjs +46 -0
  55. package/dist/ui/src/components/auto-form/fields/array.cjs +266 -0
  56. package/dist/ui/src/components/auto-form/fields/array.mjs +264 -0
  57. package/dist/ui/src/components/auto-form/fields/checkbox.cjs +38 -0
  58. package/dist/ui/src/components/auto-form/fields/checkbox.mjs +36 -0
  59. package/dist/ui/src/components/auto-form/fields/date.cjs +67 -0
  60. package/dist/ui/src/components/auto-form/fields/date.mjs +65 -0
  61. package/dist/ui/src/components/auto-form/fields/enum.cjs +73 -0
  62. package/dist/ui/src/components/auto-form/fields/enum.mjs +71 -0
  63. package/dist/ui/src/components/auto-form/fields/input.cjs +32 -0
  64. package/dist/ui/src/components/auto-form/fields/input.mjs +30 -0
  65. package/dist/ui/src/components/auto-form/fields/number.cjs +31 -0
  66. package/dist/ui/src/components/auto-form/fields/number.mjs +29 -0
  67. package/dist/ui/src/components/auto-form/fields/object.cjs +233 -0
  68. package/dist/ui/src/components/auto-form/fields/object.mjs +217 -0
  69. package/dist/ui/src/components/auto-form/fields/radio-group.cjs +67 -0
  70. package/dist/ui/src/components/auto-form/fields/radio-group.mjs +65 -0
  71. package/dist/ui/src/components/auto-form/fields/switch.cjs +38 -0
  72. package/dist/ui/src/components/auto-form/fields/switch.mjs +36 -0
  73. package/dist/ui/src/components/auto-form/fields/textarea.cjs +31 -0
  74. package/dist/ui/src/components/auto-form/fields/textarea.mjs +29 -0
  75. package/dist/ui/src/components/auto-form/helpers.cjs +270 -0
  76. package/dist/ui/src/components/auto-form/helpers.mjs +259 -0
  77. package/dist/ui/src/components/auto-form/index.cjs +102 -0
  78. package/dist/ui/src/components/auto-form/index.mjs +93 -0
  79. package/dist/ui/src/components/auto-form/stepped-auto-form.cjs +374 -0
  80. package/dist/ui/src/components/auto-form/stepped-auto-form.mjs +368 -0
  81. package/dist/ui/src/components/auto-form/types.cjs +11 -0
  82. package/dist/ui/src/components/auto-form/types.mjs +9 -0
  83. package/dist/ui/src/components/badge.cjs +42 -0
  84. package/dist/ui/src/components/badge.mjs +39 -0
  85. package/dist/ui/src/components/button.cjs +56 -0
  86. package/dist/ui/src/components/button.mjs +53 -0
  87. package/dist/ui/src/components/calendar.cjs +207 -0
  88. package/dist/ui/src/components/calendar.mjs +190 -0
  89. package/dist/ui/src/components/checkbox.cjs +48 -0
  90. package/dist/ui/src/components/checkbox.mjs +32 -0
  91. package/dist/ui/src/components/command.cjs +118 -0
  92. package/dist/ui/src/components/command.mjs +111 -0
  93. package/dist/ui/src/components/date-picker.cjs +41 -0
  94. package/dist/ui/src/components/date-picker.mjs +39 -0
  95. package/dist/ui/src/components/dialog.cjs +141 -0
  96. package/dist/ui/src/components/dialog.mjs +118 -0
  97. package/dist/ui/src/components/empty.cjs +104 -0
  98. package/dist/ui/src/components/empty.mjs +97 -0
  99. package/dist/ui/src/components/form-builder/canvas.cjs +111 -0
  100. package/dist/ui/src/components/form-builder/canvas.mjs +109 -0
  101. package/dist/ui/src/components/form-builder/components/index.cjs +571 -0
  102. package/dist/ui/src/components/form-builder/components/index.mjs +554 -0
  103. package/dist/ui/src/components/form-builder/edit-field-dialog.cjs +131 -0
  104. package/dist/ui/src/components/form-builder/edit-field-dialog.mjs +129 -0
  105. package/dist/ui/src/components/form-builder/form-preview.cjs +73 -0
  106. package/dist/ui/src/components/form-builder/form-preview.mjs +71 -0
  107. package/dist/ui/src/components/form-builder/index.cjs +350 -0
  108. package/dist/ui/src/components/form-builder/index.mjs +344 -0
  109. package/dist/ui/src/components/form-builder/nested-field-editor-dialog.cjs +263 -0
  110. package/dist/ui/src/components/form-builder/nested-field-editor-dialog.mjs +261 -0
  111. package/dist/ui/src/components/form-builder/palette.cjs +52 -0
  112. package/dist/ui/src/components/form-builder/palette.mjs +49 -0
  113. package/dist/ui/src/components/form-builder/schema-utils.cjs +128 -0
  114. package/dist/ui/src/components/form-builder/schema-utils.mjs +122 -0
  115. package/dist/ui/src/components/form-builder/sortable-field.cjs +151 -0
  116. package/dist/ui/src/components/form-builder/sortable-field.mjs +148 -0
  117. package/dist/ui/src/components/form-builder/step-tabs.cjs +180 -0
  118. package/dist/ui/src/components/form-builder/step-tabs.mjs +178 -0
  119. package/dist/ui/src/components/form-builder/types.cjs +7 -0
  120. package/dist/ui/src/components/form-builder/types.mjs +5 -0
  121. package/dist/ui/src/components/form-builder/validation-schemas.cjs +67 -0
  122. package/dist/ui/src/components/form-builder/validation-schemas.mjs +56 -0
  123. package/dist/ui/src/components/form.cjs +120 -0
  124. package/dist/ui/src/components/form.mjs +98 -0
  125. package/dist/ui/src/components/input.cjs +23 -0
  126. package/dist/ui/src/components/input.mjs +21 -0
  127. package/dist/ui/src/components/label.cjs +39 -0
  128. package/dist/ui/src/components/label.mjs +23 -0
  129. package/dist/ui/src/components/markdown-content.cjs +334 -0
  130. package/dist/ui/src/components/markdown-content.mjs +325 -0
  131. package/dist/ui/src/components/markdown-editor.cjs +180 -0
  132. package/dist/ui/src/components/markdown-editor.mjs +178 -0
  133. package/dist/ui/src/components/multi-select.cjs +555 -0
  134. package/dist/ui/src/components/multi-select.mjs +540 -0
  135. package/dist/ui/src/components/popover.cjs +60 -0
  136. package/dist/ui/src/components/popover.mjs +42 -0
  137. package/dist/ui/src/components/radio-group.cjs +62 -0
  138. package/dist/ui/src/components/radio-group.mjs +45 -0
  139. package/dist/ui/src/components/search-select.cjs +99 -0
  140. package/dist/ui/src/components/search-select.mjs +83 -0
  141. package/dist/ui/src/components/select.cjs +161 -0
  142. package/dist/ui/src/components/select.mjs +139 -0
  143. package/dist/ui/src/components/separator.cjs +43 -0
  144. package/dist/ui/src/components/separator.mjs +27 -0
  145. package/dist/ui/src/components/switch.cjs +48 -0
  146. package/dist/ui/src/components/switch.mjs +32 -0
  147. package/dist/ui/src/components/tabs.cjs +84 -0
  148. package/dist/ui/src/components/tabs.mjs +65 -0
  149. package/dist/ui/src/components/textarea.cjs +20 -0
  150. package/dist/ui/src/components/textarea.mjs +18 -0
  151. package/dist/ui/src/hooks/use-debounce.cjs +16 -0
  152. package/dist/ui/src/hooks/use-debounce.mjs +14 -0
  153. package/dist/ui/src/lib/schema-converter.cjs +94 -0
  154. package/dist/ui/src/lib/schema-converter.mjs +92 -0
  155. package/dist/ui/src/lib/throttle.cjs +56 -0
  156. package/dist/ui/src/lib/throttle.mjs +54 -0
  157. package/dist/ui/src/lib/utils.cjs +10 -0
  158. package/dist/ui/src/lib/utils.mjs +8 -0
  159. package/dist/ui.css +131 -0
  160. package/package.json +176 -3
  161. package/README.md +0 -3
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import React__default from 'react';
3
+ import { z } from 'zod';
4
+ import { UseFormReturn } from 'react-hook-form';
5
+ import { FieldConfig } from '../auto-form/index.mjs';
6
+ import { ZodObjectOrWrapped } from '../auto-form/index.mjs';
7
+
8
+ interface StepperComponentProps {
9
+ steps: Array<{
10
+ id: string;
11
+ label: string;
12
+ }>;
13
+ currentStepIndex: number;
14
+ currentStepId: string;
15
+ onStepClick?: (stepId: string) => void;
16
+ isFirst: boolean;
17
+ isLast: boolean;
18
+ }
19
+ interface SteppedAutoFormProps<SchemaType extends ZodObjectOrWrapped> {
20
+ formSchema: SchemaType;
21
+ values?: Partial<z.infer<SchemaType>>;
22
+ onValuesChange?: (values: Partial<z.infer<SchemaType>>, form?: UseFormReturn<z.infer<SchemaType>>) => void;
23
+ onSubmit?: (values: z.infer<SchemaType>) => void;
24
+ fieldConfig?: FieldConfig<z.infer<SchemaType>>;
25
+ children?: React__default.ReactNode;
26
+ className?: string;
27
+ nextButtonText?: string;
28
+ backButtonText?: string;
29
+ submitButtonText?: string;
30
+ StepperComponent?: React__default.ComponentType<StepperComponentProps>;
31
+ /** Whether the form is currently submitting. Disables submit/next buttons to prevent duplicate submissions. */
32
+ isSubmitting?: boolean;
33
+ }
34
+ declare function SteppedAutoForm<SchemaType extends ZodObjectOrWrapped>({ formSchema, values: initialValues, onValuesChange, onSubmit, fieldConfig, children, className, nextButtonText, backButtonText, submitButtonText, StepperComponent, isSubmitting, }: SteppedAutoFormProps<SchemaType>): React__default.JSX.Element | null;
35
+
36
+ export { SteppedAutoForm };
37
+ export type { SteppedAutoFormProps, StepperComponentProps };
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import React__default from 'react';
3
+ import { z } from 'zod';
4
+ import { UseFormReturn } from 'react-hook-form';
5
+ import { FieldConfig } from '../auto-form/index.js';
6
+ import { ZodObjectOrWrapped } from '../auto-form/index.js';
7
+
8
+ interface StepperComponentProps {
9
+ steps: Array<{
10
+ id: string;
11
+ label: string;
12
+ }>;
13
+ currentStepIndex: number;
14
+ currentStepId: string;
15
+ onStepClick?: (stepId: string) => void;
16
+ isFirst: boolean;
17
+ isLast: boolean;
18
+ }
19
+ interface SteppedAutoFormProps<SchemaType extends ZodObjectOrWrapped> {
20
+ formSchema: SchemaType;
21
+ values?: Partial<z.infer<SchemaType>>;
22
+ onValuesChange?: (values: Partial<z.infer<SchemaType>>, form?: UseFormReturn<z.infer<SchemaType>>) => void;
23
+ onSubmit?: (values: z.infer<SchemaType>) => void;
24
+ fieldConfig?: FieldConfig<z.infer<SchemaType>>;
25
+ children?: React__default.ReactNode;
26
+ className?: string;
27
+ nextButtonText?: string;
28
+ backButtonText?: string;
29
+ submitButtonText?: string;
30
+ StepperComponent?: React__default.ComponentType<StepperComponentProps>;
31
+ /** Whether the form is currently submitting. Disables submit/next buttons to prevent duplicate submissions. */
32
+ isSubmitting?: boolean;
33
+ }
34
+ declare function SteppedAutoForm<SchemaType extends ZodObjectOrWrapped>({ formSchema, values: initialValues, onValuesChange, onSubmit, fieldConfig, children, className, nextButtonText, backButtonText, submitButtonText, StepperComponent, isSubmitting, }: SteppedAutoFormProps<SchemaType>): React__default.JSX.Element | null;
35
+
36
+ export { SteppedAutoForm };
37
+ export type { SteppedAutoFormProps, StepperComponentProps };
@@ -0,0 +1 @@
1
+ export { SteppedAutoForm } from '../ui/src/components/auto-form/stepped-auto-form.mjs';
package/dist/style.css ADDED
@@ -0,0 +1,440 @@
1
+ @import "@milkdown/crepe/theme/common/style.css";
2
+ .markdown-content .markdown-inner .markdown-body {
3
+ font-family: var(--crepe-font-default);
4
+ color: var(--crepe-color-on-background);
5
+ background: var(--crepe-color-background);
6
+ padding: 0px;
7
+ }
8
+
9
+ .markdown-content .markdown-inner .markdown-body img {
10
+ vertical-align: bottom;
11
+ max-width: 100%;
12
+ }
13
+
14
+ .markdown-content .markdown-inner .markdown-body .markdown-image-wrapper {
15
+ display: block;
16
+ position: relative;
17
+ width: 100%;
18
+ aspect-ratio: 16 / 9;
19
+ min-height: 200px;
20
+ }
21
+
22
+ .markdown-content .markdown-inner .markdown-body .markdown-image-wrapper > div {
23
+ width: 100%;
24
+ height: 100%;
25
+ }
26
+
27
+ .markdown-content .markdown-inner .markdown-body .markdown-image-wrapper img {
28
+ object-fit: contain;
29
+ }
30
+
31
+ .markdown-content .markdown-inner .markdown-body h1,
32
+ .markdown-content .markdown-inner .markdown-body h2,
33
+ .markdown-content .markdown-inner .markdown-body h3,
34
+ .markdown-content .markdown-inner .markdown-body h4,
35
+ .markdown-content .markdown-inner .markdown-body h5,
36
+ .markdown-content .markdown-inner .markdown-body h6 {
37
+ font-family: var(--crepe-font-title);
38
+ font-weight: 400;
39
+ padding: 2px 0;
40
+ scroll-margin-top: 56px;
41
+ }
42
+
43
+ .markdown-content .markdown-inner .markdown-body h1 .heading-anchor,
44
+ .markdown-content .markdown-inner .markdown-body h2 .heading-anchor,
45
+ .markdown-content .markdown-inner .markdown-body h3 .heading-anchor,
46
+ .markdown-content .markdown-inner .markdown-body h4 .heading-anchor,
47
+ .markdown-content .markdown-inner .markdown-body h5 .heading-anchor,
48
+ .markdown-content .markdown-inner .markdown-body h6 .heading-anchor {
49
+ opacity: 0;
50
+ margin-left: 8px;
51
+ color: var(--crepe-color-on-surface-variant);
52
+ text-decoration: none;
53
+ transition: opacity 0.15s ease-in-out;
54
+ }
55
+
56
+ .markdown-content .markdown-inner .markdown-body h1:hover .heading-anchor,
57
+ .markdown-content .markdown-inner .markdown-body h2:hover .heading-anchor,
58
+ .markdown-content .markdown-inner .markdown-body h3:hover .heading-anchor,
59
+ .markdown-content .markdown-inner .markdown-body h4:hover .heading-anchor,
60
+ .markdown-content .markdown-inner .markdown-body h5:hover .heading-anchor,
61
+ .markdown-content .markdown-inner .markdown-body h6:hover .heading-anchor {
62
+ opacity: 1;
63
+ }
64
+
65
+ .markdown-content .markdown-inner .markdown-body h1 {
66
+ font-size: 42px;
67
+ line-height: 50px;
68
+ margin-top: 32px;
69
+ }
70
+
71
+ .markdown-content .markdown-inner .markdown-body h2 {
72
+ font-size: 36px;
73
+ line-height: 44px;
74
+ margin-top: 28px;
75
+ }
76
+
77
+ .markdown-content .markdown-inner .markdown-body h3 {
78
+ font-size: 32px;
79
+ line-height: 40px;
80
+ margin-top: 24px;
81
+ }
82
+
83
+ .markdown-content .markdown-inner .markdown-body h4 {
84
+ font-size: 28px;
85
+ line-height: 36px;
86
+ margin-top: 20px;
87
+ }
88
+
89
+ .markdown-content .markdown-inner .markdown-body h5 {
90
+ font-size: 24px;
91
+ line-height: 32px;
92
+ margin-top: 16px;
93
+ }
94
+
95
+ .markdown-content .markdown-inner .markdown-body h6 {
96
+ font-size: 18px;
97
+ font-weight: 700;
98
+ line-height: 28px;
99
+ margin-top: 16px;
100
+ }
101
+
102
+ .markdown-content .markdown-inner .markdown-body p {
103
+ font-size: 16px;
104
+ line-height: 24px;
105
+ padding: 4px 0;
106
+ }
107
+
108
+ .markdown-content .markdown-inner .markdown-body a {
109
+ color: var(--crepe-color-primary);
110
+ text-decoration: underline;
111
+ }
112
+
113
+ .markdown-content .markdown-inner .markdown-body code {
114
+ color: var(--crepe-color-inline-code);
115
+ background: color-mix(
116
+ in srgb,
117
+ var(--crepe-color-inline-area),
118
+ transparent 40%
119
+ );
120
+ font-family: var(--crepe-font-code);
121
+ padding: 0 2px;
122
+ border-radius: 4px;
123
+ font-size: 87.5%;
124
+ display: inline-block;
125
+ line-height: 1.4286;
126
+ }
127
+
128
+ .markdown-content .markdown-inner .markdown-body pre {
129
+ background: color-mix(
130
+ in srgb,
131
+ var(--crepe-color-inline-area),
132
+ transparent 40%
133
+ );
134
+ padding: 10px;
135
+ border-radius: 4px;
136
+ overflow-x: auto;
137
+ }
138
+
139
+ .markdown-content .markdown-inner .markdown-body pre code {
140
+ padding: 0;
141
+ background: transparent;
142
+ }
143
+
144
+ /* Ensure highlight.js themes color tokens inside our containers */
145
+ .markdown-content .markdown-inner .markdown-body pre code.hljs,
146
+ .markdown-content .markdown-inner .markdown-body code.hljs {
147
+ display: block;
148
+ overflow-x: auto;
149
+ }
150
+
151
+ /* Dark mode overrides for highlight.js tokens that have poor visibility */
152
+ @media (prefers-color-scheme: dark) {
153
+ .markdown-content .markdown-inner .markdown-body .hljs-attr {
154
+ color: #ff9ac1;
155
+ }
156
+ .markdown-content .markdown-inner .markdown-body .hljs-params {
157
+ color: #ffb86c;
158
+ }
159
+ .markdown-content .markdown-inner .markdown-body .hljs-punctuation {
160
+ color: #c9d1d9;
161
+ }
162
+ }
163
+
164
+ /* Also support Tailwind dark class for dark mode */
165
+ .dark .markdown-content .markdown-inner .markdown-body .hljs-attr {
166
+ color: #ff9ac1;
167
+ }
168
+ .dark .markdown-content .markdown-inner .markdown-body .hljs-params {
169
+ color: #ffb86c;
170
+ }
171
+ .dark .markdown-content .markdown-inner .markdown-body .hljs-punctuation {
172
+ color: #c9d1d9;
173
+ }
174
+
175
+ .markdown-content .markdown-inner .markdown-code-block {
176
+ display: block;
177
+ position: relative;
178
+ padding: 40px 8px 20px 20px;
179
+ margin: 4px 0;
180
+ }
181
+
182
+ .markdown-content .markdown-inner .markdown-code-block pre {
183
+ background: transparent;
184
+ padding: 0;
185
+ border-radius: 0;
186
+ }
187
+
188
+ /* Layout wrapper to host gutter and code content side-by-side */
189
+ .markdown-content .markdown-inner .markdown-code-block .code-content {
190
+ display: grid;
191
+ grid-template-columns: var(--code-gutter-width, 3ch) 1fr;
192
+ gap: 0.35rem;
193
+ align-items: stretch;
194
+ }
195
+
196
+ /* Gutter line numbers */
197
+ .markdown-content .markdown-inner .markdown-code-block .line-numbers {
198
+ list-style: none;
199
+ margin: 0;
200
+ user-select: none;
201
+ color: var(--crepe-color-on-surface-variant);
202
+ text-align: end;
203
+ display: flex;
204
+ flex-direction: column;
205
+ justify-content: space-between;
206
+ align-items: center;
207
+ height: 100%;
208
+ }
209
+
210
+ .markdown-content .markdown-inner .markdown-code-block .line-numbers li {
211
+ font-family: var(--crepe-font-code);
212
+ font-size: 12px;
213
+ }
214
+
215
+ .markdown-content .markdown-inner .markdown-code-block .code-toolbar {
216
+ position: absolute;
217
+ top: 8px;
218
+ left: 18px;
219
+ right: 18px;
220
+ display: flex;
221
+ align-items: center;
222
+ justify-content: space-between;
223
+ pointer-events: none;
224
+ opacity: 0;
225
+ transition: opacity 0.15s ease-in-out;
226
+ }
227
+
228
+ .markdown-content .markdown-inner .markdown-code-block:hover .code-toolbar {
229
+ opacity: 1;
230
+ }
231
+
232
+ /* Also reveal toolbar when focused via keyboard for accessibility */
233
+ .markdown-content .markdown-inner .markdown-code-block:focus-within .code-toolbar {
234
+ opacity: 1;
235
+ }
236
+
237
+ .markdown-content .markdown-inner .markdown-code-block .language-label {
238
+ pointer-events: auto;
239
+ font-family: var(--crepe-font-default);
240
+ font-size: 12px;
241
+ font-weight: 600;
242
+ line-height: 16px;
243
+ color: var(--crepe-color-on-surface-variant);
244
+ background: var(--crepe-color-surface-low);
245
+ padding: 2px 8px;
246
+ border-radius: 4px;
247
+ }
248
+
249
+ .markdown-content .markdown-inner .markdown-code-block .copy-button {
250
+ pointer-events: auto;
251
+ display: inline-flex;
252
+ align-items: center;
253
+ justify-content: center;
254
+ background: var(--crepe-color-surface-low);
255
+ color: var(--crepe-color-on-surface-variant);
256
+ border-radius: 4px;
257
+ padding: 4px 8px;
258
+ height: 26px;
259
+ width: 32px;
260
+ cursor: pointer;
261
+ transition: background-color 0.2s ease-in-out;
262
+ }
263
+
264
+ .markdown-content .markdown-inner .markdown-code-block .copy-button:hover {
265
+ background: var(--crepe-color-hover);
266
+ }
267
+
268
+ .markdown-content .markdown-inner .markdown-body blockquote {
269
+ position: relative;
270
+ padding-left: 40px;
271
+ padding-top: 0;
272
+ padding-bottom: 0;
273
+ box-sizing: content-box;
274
+ margin: 4px 0;
275
+ }
276
+
277
+ .markdown-content .markdown-inner .markdown-body blockquote::before {
278
+ content: "";
279
+ width: 4px;
280
+ left: 0;
281
+ top: 4px;
282
+ bottom: 4px;
283
+ position: absolute;
284
+ background: var(--crepe-color-selected);
285
+ border-radius: 100px;
286
+ }
287
+
288
+ .markdown-content .markdown-inner .markdown-body hr {
289
+ border: none;
290
+ background-color: color-mix(
291
+ in srgb,
292
+ var(--crepe-color-outline),
293
+ transparent 80%
294
+ );
295
+ background-clip: content-box;
296
+ padding: 6px 0;
297
+ height: 13px;
298
+ position: relative;
299
+ }
300
+
301
+ .markdown-content .markdown-inner .markdown-body ul:not(.contains-task-list) {
302
+ padding: 0;
303
+ list-style-type: disc;
304
+ margin-left: 26px;
305
+ }
306
+
307
+ .markdown-content
308
+ .markdown-inner
309
+ .markdown-body
310
+ ul:not(.contains-task-list)
311
+ li::marker {
312
+ color: var(--crepe-color-outline);
313
+ font-size: 1.2em;
314
+ }
315
+
316
+ .markdown-content .markdown-inner .markdown-body ol {
317
+ padding: 0;
318
+ list-style-type: decimal;
319
+ margin-left: 20px;
320
+ }
321
+
322
+ .markdown-content .markdown-inner .markdown-body li.task-list-item {
323
+ position: relative;
324
+ list-style: none;
325
+ padding-left: 28px;
326
+ }
327
+
328
+ .markdown-content
329
+ .markdown-inner
330
+ .markdown-body
331
+ li.task-list-item
332
+ input[type="checkbox"] {
333
+ width: 20px;
334
+ height: 20px;
335
+ position: absolute;
336
+ left: 0;
337
+ margin: 0;
338
+ }
339
+
340
+ .markdown-content .markdown-inner .markdown-body table {
341
+ border-collapse: collapse;
342
+ table-layout: fixed;
343
+ width: 100%;
344
+ margin: 4px 0;
345
+ }
346
+
347
+ .markdown-content .markdown-inner .markdown-body th,
348
+ .markdown-content .markdown-inner .markdown-body td {
349
+ border: 1px solid
350
+ color-mix(in srgb, var(--crepe-color-outline), transparent 80%);
351
+ padding: 4px 16px;
352
+ overflow-wrap: anywhere;
353
+ }
354
+
355
+ .markdown-content .markdown-inner .markdown-body .katex {
356
+ display: inline-block;
357
+ max-width: 100%;
358
+ overflow-x: auto;
359
+ text-align: start;
360
+ vertical-align: middle;
361
+ }
362
+
363
+ .markdown-content .markdown-inner .markdown-body .katex:focus-visible {
364
+ outline: 2px solid currentColor;
365
+ outline-offset: 2px;
366
+ }
367
+
368
+ /* Simplified chat variant - more compact for chat messages */
369
+ .markdown-content-chat .markdown-inner .markdown-body {
370
+ padding: 0;
371
+ }
372
+
373
+ .markdown-content-chat .markdown-inner .markdown-body h1,
374
+ .markdown-content-chat .markdown-inner .markdown-body h2,
375
+ .markdown-content-chat .markdown-inner .markdown-body h3,
376
+ .markdown-content-chat .markdown-inner .markdown-body h4,
377
+ .markdown-content-chat .markdown-inner .markdown-body h5,
378
+ .markdown-content-chat .markdown-inner .markdown-body h6 {
379
+ margin-top: 12px;
380
+ }
381
+
382
+ .markdown-content-chat .markdown-inner .markdown-body h1 {
383
+ font-size: 24px;
384
+ line-height: 32px;
385
+ }
386
+
387
+ .markdown-content-chat .markdown-inner .markdown-body h2 {
388
+ font-size: 20px;
389
+ line-height: 28px;
390
+ }
391
+
392
+ .markdown-content-chat .markdown-inner .markdown-body h3 {
393
+ font-size: 18px;
394
+ line-height: 26px;
395
+ }
396
+
397
+ .markdown-content-chat .markdown-inner .markdown-body p {
398
+ font-size: 14px;
399
+ line-height: 22px;
400
+ padding: 2px 0;
401
+ }
402
+
403
+ .markdown-content-chat .markdown-inner .markdown-code-block {
404
+ padding: 32px 8px 12px 12px;
405
+ }
406
+
407
+
408
+ .milkdown-custom .milkdown {
409
+ border-radius: calc(var(--radius) - 2px);
410
+ --crepe-color-background: var(--background);
411
+ --crepe-color-surface: var(--background);
412
+ --crepe-color-surface-low: var(--muted);
413
+ --crepe-color-on-background: var(--foreground);
414
+ --crepe-color-on-surface: var(--secondary-foreground);
415
+ --crepe-color-on-surface-variant: var(--muted-foreground);
416
+ --crepe-color-primary: var(--primary);
417
+ --crepe-color-secondary: var(--secondary);
418
+ --crepe-color-on-secondary: var(--secondary-foreground);
419
+ --crepe-color-outline: var(--muted-foreground);
420
+ --crepe-color-inverse: var(--popover);
421
+ --crepe-color-on-inverse: var(--popover-foreground);
422
+ --crepe-color-inline-code: var(--secondary-foreground);
423
+ --crepe-color-error: var(--destructive);
424
+ --crepe-color-hover: var(--accent);
425
+ --crepe-color-selected: var(--secondary);
426
+ --crepe-color-inline-area: var(--secondary);
427
+ --crepe-font-title: var(--font-sans);
428
+ --crepe-font-default: var(--font-sans);
429
+ --crepe-font-code: var(--font-mono);
430
+ --crepe-shadow-1:
431
+ 0px 1px 3px 1px color-mix(in oklch, var(--ring) 28%, transparent), 0px 1px
432
+ 2px 0px color-mix(in oklch, var(--ring) 22%, transparent);
433
+ --crepe-shadow-2:
434
+ 0px 2px 6px 2px color-mix(in oklch, var(--ring) 28%, transparent), 0px 1px
435
+ 2px 0px color-mix(in oklch, var(--ring) 22%, transparent);
436
+ height: inherit;
437
+ }
438
+
439
+
440
+ @source "./**/*.{mjs,cjs}";
@@ -0,0 +1,81 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const AccordionPrimitive = require('@radix-ui/react-accordion');
6
+ const lucideReact = require('lucide-react');
7
+ const utils = require('../lib/utils.cjs');
8
+
9
+ function _interopNamespaceCompat(e) {
10
+ if (e && typeof e === 'object' && 'default' in e) return e;
11
+ const n = Object.create(null);
12
+ if (e) {
13
+ for (const k in e) {
14
+ n[k] = e[k];
15
+ }
16
+ }
17
+ n.default = e;
18
+ return n;
19
+ }
20
+
21
+ const AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(AccordionPrimitive);
22
+
23
+ function Accordion({
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
27
+ }
28
+ function AccordionItem({
29
+ className,
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsxRuntime.jsx(
33
+ AccordionPrimitive__namespace.Item,
34
+ {
35
+ "data-slot": "accordion-item",
36
+ className: utils.cn("border-b last:border-b-0", className),
37
+ ...props
38
+ }
39
+ );
40
+ }
41
+ function AccordionTrigger({
42
+ className,
43
+ children,
44
+ ...props
45
+ }) {
46
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
47
+ AccordionPrimitive__namespace.Trigger,
48
+ {
49
+ "data-slot": "accordion-trigger",
50
+ className: utils.cn(
51
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
52
+ className
53
+ ),
54
+ ...props,
55
+ children: [
56
+ children,
57
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
58
+ ]
59
+ }
60
+ ) });
61
+ }
62
+ function AccordionContent({
63
+ className,
64
+ children,
65
+ ...props
66
+ }) {
67
+ return /* @__PURE__ */ jsxRuntime.jsx(
68
+ AccordionPrimitive__namespace.Content,
69
+ {
70
+ "data-slot": "accordion-content",
71
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
72
+ ...props,
73
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn("pt-0 pb-4", className), children })
74
+ }
75
+ );
76
+ }
77
+
78
+ exports.Accordion = Accordion;
79
+ exports.AccordionContent = AccordionContent;
80
+ exports.AccordionItem = AccordionItem;
81
+ exports.AccordionTrigger = AccordionTrigger;
@@ -0,0 +1,62 @@
1
+ 'use client';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
+ import { ChevronDownIcon } from 'lucide-react';
5
+ import { cn } from '../lib/utils.mjs';
6
+
7
+ function Accordion({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
11
+ }
12
+ function AccordionItem({
13
+ className,
14
+ ...props
15
+ }) {
16
+ return /* @__PURE__ */ jsx(
17
+ AccordionPrimitive.Item,
18
+ {
19
+ "data-slot": "accordion-item",
20
+ className: cn("border-b last:border-b-0", className),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+ function AccordionTrigger({
26
+ className,
27
+ children,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
31
+ AccordionPrimitive.Trigger,
32
+ {
33
+ "data-slot": "accordion-trigger",
34
+ className: cn(
35
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
36
+ className
37
+ ),
38
+ ...props,
39
+ children: [
40
+ children,
41
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
42
+ ]
43
+ }
44
+ ) });
45
+ }
46
+ function AccordionContent({
47
+ className,
48
+ children,
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */ jsx(
52
+ AccordionPrimitive.Content,
53
+ {
54
+ "data-slot": "accordion-content",
55
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
56
+ ...props,
57
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
58
+ }
59
+ );
60
+ }
61
+
62
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const form = require('../../form.cjs');
5
+ const utils = require('../../../lib/utils.cjs');
6
+
7
+ function AutoFormLabel({
8
+ label,
9
+ isRequired,
10
+ className
11
+ }) {
12
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(form.FormLabel, { className: utils.cn(className), children: [
13
+ label,
14
+ isRequired && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: " *" })
15
+ ] }) });
16
+ }
17
+
18
+ module.exports = AutoFormLabel;
@@ -0,0 +1,16 @@
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
+ import { FormLabel } from '../../form.mjs';
3
+ import { cn } from '../../../lib/utils.mjs';
4
+
5
+ function AutoFormLabel({
6
+ label,
7
+ isRequired,
8
+ className
9
+ }) {
10
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(FormLabel, { className: cn(className), children: [
11
+ label,
12
+ isRequired && /* @__PURE__ */ jsx("span", { className: "text-destructive", children: " *" })
13
+ ] }) });
14
+ }
15
+
16
+ export { AutoFormLabel as default };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+
5
+ function AutoFormTooltip({ fieldConfigItem }) {
6
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fieldConfigItem?.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-white", children: fieldConfigItem.description }) });
7
+ }
8
+
9
+ module.exports = AutoFormTooltip;