@btst/stack 2.6.0 → 2.6.1

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 (153) hide show
  1. package/dist/components/auto-form/index.cjs +8 -0
  2. package/dist/components/auto-form/index.d.cts +26 -0
  3. package/dist/components/auto-form/index.d.mts +26 -0
  4. package/dist/components/auto-form/index.d.ts +26 -0
  5. package/dist/components/auto-form/index.mjs +1 -0
  6. package/dist/components/empty/index.cjs +12 -0
  7. package/dist/components/empty/index.d.cts +15 -0
  8. package/dist/components/empty/index.d.mts +15 -0
  9. package/dist/components/empty/index.d.ts +15 -0
  10. package/dist/components/empty/index.mjs +1 -0
  11. package/dist/components/form-builder/index.cjs +16 -0
  12. package/dist/components/form-builder/index.d.cts +385 -0
  13. package/dist/components/form-builder/index.d.mts +385 -0
  14. package/dist/components/form-builder/index.d.ts +385 -0
  15. package/dist/components/form-builder/index.mjs +4 -0
  16. package/dist/components/markdown/index.cjs +9 -0
  17. package/dist/components/markdown/index.d.cts +30 -0
  18. package/dist/components/markdown/index.d.mts +30 -0
  19. package/dist/components/markdown/index.d.ts +30 -0
  20. package/dist/components/markdown/index.mjs +2 -0
  21. package/dist/components/markdown/style.css +394 -0
  22. package/dist/components/minimal-tiptap/style.css +548 -0
  23. package/dist/components/multi-select/index.cjs +7 -0
  24. package/dist/components/multi-select/index.d.cts +78 -0
  25. package/dist/components/multi-select/index.d.mts +78 -0
  26. package/dist/components/multi-select/index.d.ts +78 -0
  27. package/dist/components/multi-select/index.mjs +1 -0
  28. package/dist/components/search-select/index.cjs +7 -0
  29. package/dist/components/search-select/index.d.cts +15 -0
  30. package/dist/components/search-select/index.d.mts +15 -0
  31. package/dist/components/search-select/index.d.ts +15 -0
  32. package/dist/components/search-select/index.mjs +1 -0
  33. package/dist/components/stepped-auto-form/index.cjs +7 -0
  34. package/dist/components/stepped-auto-form/index.d.cts +37 -0
  35. package/dist/components/stepped-auto-form/index.d.mts +37 -0
  36. package/dist/components/stepped-auto-form/index.d.ts +37 -0
  37. package/dist/components/stepped-auto-form/index.mjs +1 -0
  38. package/dist/components/ui-builder/style.css +552 -0
  39. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +1 -1
  40. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1 -1
  41. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +2 -2
  42. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1 -1
  43. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +3 -3
  44. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -1
  45. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.cjs +23 -0
  46. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.mjs +21 -0
  47. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor.cjs +11 -12
  48. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor.mjs +11 -12
  49. package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.cjs +2 -2
  50. package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.mjs +2 -2
  51. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-input.cjs +0 -3
  52. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-input.mjs +1 -1
  53. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-modal.cjs +0 -3
  54. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-modal.mjs +1 -1
  55. package/dist/packages/ui/src/components/auto-form/index.cjs +12 -2
  56. package/dist/packages/ui/src/components/auto-form/index.mjs +9 -2
  57. package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +2 -2
  58. package/dist/packages/ui/src/components/empty.cjs +28 -0
  59. package/dist/packages/ui/src/components/empty.mjs +27 -1
  60. package/dist/packages/ui/src/components/form-builder/components/index.mjs +2 -2
  61. package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +1 -1
  62. package/dist/packages/ui/src/components/form-builder/index.mjs +2 -2
  63. package/dist/packages/ui/src/components/form.mjs +1 -1
  64. package/dist/packages/ui/src/components/kanban.mjs +1 -1
  65. package/dist/packages/ui/src/components/multi-select.mjs +2 -2
  66. package/dist/packages/ui/src/components/ui-builder/internal/config-panel.cjs +1 -1
  67. package/dist/packages/ui/src/components/ui-builder/internal/props-panel.cjs +1 -1
  68. package/dist/plugins/blog/api/index.d.cts +2 -2
  69. package/dist/plugins/blog/api/index.d.mts +2 -2
  70. package/dist/plugins/blog/api/index.d.ts +2 -2
  71. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  72. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  73. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  74. package/dist/plugins/blog/client/index.d.cts +2 -2
  75. package/dist/plugins/blog/client/index.d.mts +2 -2
  76. package/dist/plugins/blog/client/index.d.ts +2 -2
  77. package/dist/plugins/blog/query-keys.d.cts +2 -2
  78. package/dist/plugins/blog/query-keys.d.mts +2 -2
  79. package/dist/plugins/blog/query-keys.d.ts +2 -2
  80. package/dist/plugins/cms/client/index.d.cts +1 -1
  81. package/dist/plugins/cms/client/index.d.mts +1 -1
  82. package/dist/plugins/cms/client/index.d.ts +1 -1
  83. package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
  84. package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
  85. package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
  86. package/dist/plugins/form-builder/client/index.d.cts +1 -1
  87. package/dist/plugins/form-builder/client/index.d.mts +1 -1
  88. package/dist/plugins/form-builder/client/index.d.ts +1 -1
  89. package/dist/plugins/kanban/api/index.d.cts +1 -1
  90. package/dist/plugins/kanban/api/index.d.mts +1 -1
  91. package/dist/plugins/kanban/api/index.d.ts +1 -1
  92. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  93. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  94. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  95. package/dist/plugins/ui-builder/client/components/index.d.cts +2 -2
  96. package/dist/plugins/ui-builder/client/components/index.d.mts +2 -2
  97. package/dist/plugins/ui-builder/client/components/index.d.ts +2 -2
  98. package/dist/plugins/ui-builder/client/hooks/index.d.cts +3 -3
  99. package/dist/plugins/ui-builder/client/hooks/index.d.mts +3 -3
  100. package/dist/plugins/ui-builder/client/hooks/index.d.ts +3 -3
  101. package/dist/plugins/ui-builder/client/index.d.cts +3 -3
  102. package/dist/plugins/ui-builder/client/index.d.mts +3 -3
  103. package/dist/plugins/ui-builder/client/index.d.ts +3 -3
  104. package/dist/plugins/ui-builder/index.d.cts +3 -3
  105. package/dist/plugins/ui-builder/index.d.mts +3 -3
  106. package/dist/plugins/ui-builder/index.d.ts +3 -3
  107. package/dist/shared/{stack.B2DwzF3r.d.ts → stack.ASwEoINr.d.ts} +1 -1
  108. package/dist/shared/{stack.C5ZSOJGJ.d.cts → stack.B1srlBud.d.mts} +1 -1
  109. package/dist/shared/{stack.CQAZwXhV.d.cts → stack.B8vT-Yt4.d.mts} +3 -3
  110. package/dist/shared/{stack.D3BsrpAz.d.ts → stack.BAT540yW.d.ts} +3 -3
  111. package/dist/shared/{stack.D0QupDcQ.d.ts → stack.BK9Z2dcL.d.ts} +1 -1
  112. package/dist/shared/{stack.CNLHlv7r.d.mts → stack.BwA7trxA.d.cts} +3 -3
  113. package/dist/shared/{stack.Cl7ok_cY.d.cts → stack.CFECM0ew.d.cts} +1 -1
  114. package/dist/shared/stack.CZMWR72v.d.cts +10 -0
  115. package/dist/shared/stack.CZMWR72v.d.mts +10 -0
  116. package/dist/shared/stack.CZMWR72v.d.ts +10 -0
  117. package/dist/shared/{stack.VMmQdbsJ.d.mts → stack.DVtk5CNw.d.mts} +1 -1
  118. package/dist/shared/{stack.B8_74ror.d.ts → stack.DXnclTG7.d.ts} +4 -4
  119. package/dist/shared/{stack.CL4mKxe7.d.mts → stack.DaZM10cp.d.cts} +4 -4
  120. package/dist/shared/{stack.Dq4qVr1F.d.mts → stack.DmpPDPxA.d.cts} +1 -1
  121. package/dist/shared/{stack.C21-LFX8.d.cts → stack.cfCkioTe.d.mts} +4 -4
  122. package/dist/shared/stack.fdi94T4S.d.cts +291 -0
  123. package/dist/shared/stack.fdi94T4S.d.mts +291 -0
  124. package/dist/shared/stack.fdi94T4S.d.ts +291 -0
  125. package/package.json +97 -3
  126. package/src/components/auto-form/index.ts +12 -0
  127. package/src/components/empty/index.ts +8 -0
  128. package/src/components/form-builder/index.ts +23 -0
  129. package/src/components/kanban/index.ts +9 -0
  130. package/src/components/markdown/index.ts +5 -0
  131. package/src/components/markdown/style.css +3 -0
  132. package/src/components/minimal-tiptap/index.ts +5 -0
  133. package/src/components/minimal-tiptap/style.css +1 -0
  134. package/src/components/multi-select/index.ts +5 -0
  135. package/src/components/search-select/index.ts +1 -0
  136. package/src/components/stepped-auto-form/index.ts +5 -0
  137. package/src/components/ui-builder/index.ts +50 -0
  138. package/src/components/ui-builder/style.css +5 -0
  139. package/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.tsx +29 -0
  140. package/src/plugins/blog/client/components/forms/markdown-editor.tsx +24 -21
  141. package/src/plugins/blog/client/components/forms/post-forms.tsx +2 -2
  142. package/src/plugins/blog/client/components/shared/posts-list.tsx +1 -1
  143. package/src/plugins/blog/client/components/shared/search-input.tsx +0 -2
  144. package/src/plugins/blog/client/components/shared/search-modal.tsx +0 -2
  145. package/dist/shared/stack.8nldKomx.d.cts +0 -114
  146. package/dist/shared/stack.8nldKomx.d.mts +0 -114
  147. package/dist/shared/stack.8nldKomx.d.ts +0 -114
  148. package/dist/shared/{stack.Ba_Ks8qi.d.mts → stack.B8D4r97Z.d.mts} +12 -12
  149. package/dist/shared/{stack.BWp0hcm9.d.cts → stack.BQmuNl5p.d.cts} +3 -3
  150. package/dist/shared/{stack.BWp0hcm9.d.mts → stack.BQmuNl5p.d.mts} +3 -3
  151. package/dist/shared/{stack.BWp0hcm9.d.ts → stack.BQmuNl5p.d.ts} +3 -3
  152. package/dist/shared/{stack.DMobugrZ.d.ts → stack.DgKOwl20.d.ts} +12 -12
  153. package/dist/shared/{stack.CFqqZUes.d.cts → stack.uWSqCWAb.d.cts} +12 -12
@@ -0,0 +1,552 @@
1
+ /* Import minimal-tiptap styles for rich text editor in form field overrides */
2
+ /* Reference tailwindcss for @apply directives to work in distributed packages */
3
+ @reference "tailwindcss";
4
+
5
+ .minimal-tiptap-editor .ProseMirror code.inline {
6
+ @apply rounded border border-[var(--mt-code-color)] bg-[var(--mt-code-background)] px-1 py-0.5 text-sm;
7
+ }
8
+
9
+ .minimal-tiptap-editor .ProseMirror pre {
10
+ @apply relative overflow-auto rounded border font-mono text-sm;
11
+ @apply border-[var(--mt-pre-border)] bg-[var(--mt-pre-background)] text-[var(--mt-pre-color)];
12
+ @apply text-left hyphens-none whitespace-pre;
13
+ }
14
+
15
+ .minimal-tiptap-editor .ProseMirror code {
16
+ @apply leading-[1.7em] break-words;
17
+ }
18
+
19
+ .minimal-tiptap-editor .ProseMirror pre code {
20
+ @apply block overflow-x-auto p-3.5;
21
+ }
22
+
23
+ .minimal-tiptap-editor .ProseMirror pre {
24
+ .hljs-keyword,
25
+ .hljs-operator,
26
+ .hljs-function,
27
+ .hljs-built_in,
28
+ .hljs-builtin-name {
29
+ color: var(--hljs-keyword);
30
+ }
31
+
32
+ .hljs-attr,
33
+ .hljs-symbol,
34
+ .hljs-property,
35
+ .hljs-attribute,
36
+ .hljs-variable,
37
+ .hljs-template-variable,
38
+ .hljs-params {
39
+ color: var(--hljs-attr);
40
+ }
41
+
42
+ .hljs-name,
43
+ .hljs-regexp,
44
+ .hljs-link,
45
+ .hljs-type,
46
+ .hljs-addition {
47
+ color: var(--hljs-name);
48
+ }
49
+
50
+ .hljs-string,
51
+ .hljs-bullet {
52
+ color: var(--hljs-string);
53
+ }
54
+
55
+ .hljs-title,
56
+ .hljs-subst,
57
+ .hljs-section {
58
+ color: var(--hljs-title);
59
+ }
60
+
61
+ .hljs-literal,
62
+ .hljs-type,
63
+ .hljs-deletion {
64
+ color: var(--hljs-literal);
65
+ }
66
+
67
+ .hljs-selector-tag,
68
+ .hljs-selector-id,
69
+ .hljs-selector-class {
70
+ color: var(--hljs-selector-tag);
71
+ }
72
+
73
+ .hljs-number {
74
+ color: var(--hljs-number);
75
+ }
76
+
77
+ .hljs-comment,
78
+ .hljs-meta,
79
+ .hljs-quote {
80
+ color: var(--hljs-comment);
81
+ }
82
+
83
+ .hljs-emphasis {
84
+ @apply italic;
85
+ }
86
+
87
+ .hljs-strong {
88
+ @apply font-bold;
89
+ }
90
+ }
91
+
92
+ .minimal-tiptap-editor .ProseMirror > p.is-editor-empty::before {
93
+ content: attr(data-placeholder);
94
+ @apply pointer-events-none float-left h-0 text-[var(--mt-secondary)];
95
+ }
96
+
97
+ .minimal-tiptap-editor .ProseMirror ol {
98
+ @apply list-decimal;
99
+ }
100
+
101
+ .minimal-tiptap-editor .ProseMirror ol ol {
102
+ list-style: lower-alpha;
103
+ }
104
+
105
+ .minimal-tiptap-editor .ProseMirror ol ol ol {
106
+ list-style: lower-roman;
107
+ }
108
+
109
+ .minimal-tiptap-editor .ProseMirror ul {
110
+ list-style: disc;
111
+ }
112
+
113
+ .minimal-tiptap-editor .ProseMirror ul ul {
114
+ list-style: circle;
115
+ }
116
+
117
+ .minimal-tiptap-editor .ProseMirror ul ul ul {
118
+ list-style: square;
119
+ }
120
+
121
+ /* Task Lists */
122
+ .minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] {
123
+ @apply list-none pl-0;
124
+ }
125
+
126
+ .minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] li {
127
+ @apply flex items-start gap-2;
128
+ }
129
+
130
+ .minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] li > label {
131
+ @apply flex items-center mt-1.5;
132
+ }
133
+
134
+ .minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] li > label input[type="checkbox"] {
135
+ @apply size-4 cursor-pointer rounded border border-input accent-primary;
136
+ }
137
+
138
+ .minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] li > div {
139
+ @apply flex-1;
140
+ }
141
+
142
+ .minimal-tiptap-editor .ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div {
143
+ @apply text-muted-foreground line-through;
144
+ }
145
+
146
+ .minimal-tiptap-editor .ProseMirror .heading-node {
147
+ @apply relative font-semibold;
148
+ }
149
+
150
+ .minimal-tiptap-editor .ProseMirror .heading-node:first-child {
151
+ @apply mt-0;
152
+ }
153
+
154
+ .minimal-tiptap-editor .ProseMirror h1 {
155
+ @apply mt-[46px] mb-4 text-[1.375rem] leading-7 tracking-[-0.004375rem];
156
+ }
157
+
158
+ .minimal-tiptap-editor .ProseMirror h2 {
159
+ @apply mt-8 mb-3.5 text-[1.1875rem] leading-7 tracking-[0.003125rem];
160
+ }
161
+
162
+ .minimal-tiptap-editor .ProseMirror h3 {
163
+ @apply mt-6 mb-3 text-[1.0625rem] leading-6 tracking-[0.00625rem];
164
+ }
165
+
166
+ .minimal-tiptap-editor .ProseMirror h4 {
167
+ @apply mt-4 mb-2 text-[0.9375rem] leading-6;
168
+ }
169
+
170
+ .minimal-tiptap-editor .ProseMirror h5 {
171
+ @apply mt-4 mb-2 text-sm;
172
+ }
173
+
174
+ .minimal-tiptap-editor .ProseMirror h5 {
175
+ @apply mt-4 mb-2 text-sm;
176
+ }
177
+
178
+ .minimal-tiptap-editor .ProseMirror a.link {
179
+ @apply text-primary underline;
180
+ }
181
+
182
+ .minimal-tiptap-editor .ProseMirror a.link:hover {
183
+ @apply underline;
184
+ }
185
+
186
+ [data-rmiz-ghost] {
187
+ position: absolute;
188
+ pointer-events: none;
189
+ }
190
+ [data-rmiz-btn-zoom],
191
+ [data-rmiz-btn-unzoom] {
192
+ background-color: rgba(0, 0, 0, 0.7);
193
+ border-radius: 50%;
194
+ border: none;
195
+ box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
196
+ color: #fff;
197
+ height: 40px;
198
+ margin: 0;
199
+ outline-offset: 2px;
200
+ padding: 9px;
201
+ touch-action: manipulation;
202
+ width: 40px;
203
+ -webkit-appearance: none;
204
+ -moz-appearance: none;
205
+ appearance: none;
206
+ }
207
+ [data-rmiz-btn-zoom]:not(:focus):not(:active) {
208
+ position: absolute;
209
+ clip: rect(0 0 0 0);
210
+ clip-path: inset(50%);
211
+ height: 1px;
212
+ overflow: hidden;
213
+ pointer-events: none;
214
+ white-space: nowrap;
215
+ width: 1px;
216
+ }
217
+ [data-rmiz-btn-zoom] {
218
+ position: absolute;
219
+ inset: 10px 10px auto auto;
220
+ cursor: zoom-in;
221
+ }
222
+ [data-rmiz-btn-unzoom] {
223
+ position: absolute;
224
+ inset: 20px 20px auto auto;
225
+ cursor: zoom-out;
226
+ z-index: 1;
227
+ }
228
+ [data-rmiz-content="found"] img,
229
+ [data-rmiz-content="found"] svg,
230
+ [data-rmiz-content="found"] [role="img"],
231
+ [data-rmiz-content="found"] [data-zoom] {
232
+ cursor: inherit;
233
+ }
234
+ [data-rmiz-modal]::backdrop {
235
+ display: none;
236
+ }
237
+ [data-rmiz-modal][open] {
238
+ position: fixed;
239
+ width: 100vw;
240
+ width: 100dvw;
241
+ height: 100vh;
242
+ height: 100dvh;
243
+ max-width: none;
244
+ max-height: none;
245
+ margin: 0;
246
+ padding: 0;
247
+ border: 0;
248
+ background: transparent;
249
+ overflow: hidden;
250
+ }
251
+ [data-rmiz-modal-overlay] {
252
+ position: absolute;
253
+ inset: 0;
254
+ transition: background-color 0.3s;
255
+ }
256
+ [data-rmiz-modal-overlay="hidden"] {
257
+ background-color: rgba(255, 255, 255, 0);
258
+ }
259
+ [data-rmiz-modal-overlay="visible"] {
260
+ background-color: rgba(255, 255, 255, 1);
261
+ }
262
+ [data-rmiz-modal-content] {
263
+ position: relative;
264
+ width: 100%;
265
+ height: 100%;
266
+ }
267
+ [data-rmiz-modal-img] {
268
+ position: absolute;
269
+ cursor: zoom-out;
270
+ image-rendering: high-quality;
271
+ transform-origin: top left;
272
+ transition: transform 0.3s;
273
+ }
274
+ @media (prefers-reduced-motion: reduce) {
275
+ [data-rmiz-modal-overlay],
276
+ [data-rmiz-modal-img] {
277
+ transition-duration: 0.01ms !important;
278
+ }
279
+ }
280
+
281
+
282
+ :root {
283
+ --mt-overlay: rgba(251, 251, 251, 0.75);
284
+ --mt-transparent-foreground: rgba(0, 0, 0, 0.4);
285
+ --mt-bg-secondary: rgba(251, 251, 251, 0.8);
286
+ --mt-code-background: #082b781f;
287
+ --mt-code-color: #d4d4d4;
288
+ --mt-secondary: #9d9d9f;
289
+ --mt-pre-background: #ececec;
290
+ --mt-pre-border: #e0e0e0;
291
+ --mt-pre-color: #2f2f31;
292
+ --mt-hr: #dcdcdc;
293
+ --mt-drag-handle-hover: #5c5c5e;
294
+
295
+ --mt-accent-bold-blue: #05c;
296
+ --mt-accent-bold-teal: #206a83;
297
+ --mt-accent-bold-green: #216e4e;
298
+ --mt-accent-bold-orange: #a54800;
299
+ --mt-accent-bold-red: #ae2e24;
300
+ --mt-accent-bold-purple: #5e4db2;
301
+
302
+ --mt-accent-gray: #758195;
303
+ --mt-accent-blue: #1d7afc;
304
+ --mt-accent-teal: #2898bd;
305
+ --mt-accent-green: #22a06b;
306
+ --mt-accent-orange: #fea362;
307
+ --mt-accent-red: #c9372c;
308
+ --mt-accent-purple: #8270db;
309
+
310
+ --mt-accent-blue-subtler: #cce0ff;
311
+ --mt-accent-teal-subtler: #c6edfb;
312
+ --mt-accent-green-subtler: #baf3db;
313
+ --mt-accent-yellow-subtler: #f8e6a0;
314
+ --mt-accent-red-subtler: #ffd5d2;
315
+ --mt-accent-purple-subtler: #dfd8fd;
316
+
317
+ --hljs-string: #aa430f;
318
+ --hljs-title: #b08836;
319
+ --hljs-comment: #999999;
320
+ --hljs-keyword: #0c5eb1;
321
+ --hljs-attr: #3a92bc;
322
+ --hljs-literal: #c82b0f;
323
+ --hljs-name: #259792;
324
+ --hljs-selector-tag: #c8500f;
325
+ --hljs-number: #3da067;
326
+ }
327
+
328
+ .dark {
329
+ --mt-overlay: rgba(31, 32, 35, 0.75);
330
+ --mt-transparent-foreground: rgba(255, 255, 255, 0.4);
331
+ --mt-bg-secondary: rgba(31, 32, 35, 0.8);
332
+ --mt-code-background: #ffffff13;
333
+ --mt-code-color: #2c2e33;
334
+ --mt-secondary: #595a5c;
335
+ --mt-pre-background: #080808;
336
+ --mt-pre-border: #23252a;
337
+ --mt-pre-color: #e3e4e6;
338
+ --mt-hr: #26282d;
339
+ --mt-drag-handle-hover: #969799;
340
+
341
+ --mt-accent-bold-blue: #85b8ff;
342
+ --mt-accent-bold-teal: #9dd9ee;
343
+ --mt-accent-bold-green: #7ee2b8;
344
+ --mt-accent-bold-orange: #fec195;
345
+ --mt-accent-bold-red: #fd9891;
346
+ --mt-accent-bold-purple: #b8acf6;
347
+
348
+ --mt-accent-gray: #738496;
349
+ --mt-accent-blue: #388bff;
350
+ --mt-accent-teal: #42b2d7;
351
+ --mt-accent-green: #2abb7f;
352
+ --mt-accent-orange: #a54800;
353
+ --mt-accent-red: #e2483d;
354
+ --mt-accent-purple: #8f7ee7;
355
+
356
+ --mt-accent-blue-subtler: #09326c;
357
+ --mt-accent-teal-subtler: #164555;
358
+ --mt-accent-green-subtler: #164b35;
359
+ --mt-accent-yellow-subtler: #533f04;
360
+ --mt-accent-red-subtler: #5d1f1a;
361
+ --mt-accent-purple-subtler: #352c63;
362
+
363
+ --hljs-string: #da936b;
364
+ --hljs-title: #f1d59d;
365
+ --hljs-comment: #aaaaaa;
366
+ --hljs-keyword: #6699cc;
367
+ --hljs-attr: #90cae8;
368
+ --hljs-literal: #f2777a;
369
+ --hljs-name: #5fc0a0;
370
+ --hljs-selector-tag: #e8c785;
371
+ --hljs-number: #b6e7b6;
372
+ }
373
+
374
+ .minimal-tiptap-editor .ProseMirror {
375
+ @apply flex max-w-full cursor-text flex-col;
376
+ @apply z-0 outline-0;
377
+ }
378
+
379
+ .minimal-tiptap-editor .ProseMirror > div.editor {
380
+ @apply block flex-1 whitespace-pre-wrap;
381
+ }
382
+
383
+ .minimal-tiptap-editor .ProseMirror .block-node:not(:last-child),
384
+ .minimal-tiptap-editor .ProseMirror .list-node:not(:last-child),
385
+ .minimal-tiptap-editor .ProseMirror .text-node:not(:last-child) {
386
+ @apply mb-2.5;
387
+ }
388
+
389
+ .minimal-tiptap-editor .ProseMirror ol,
390
+ .minimal-tiptap-editor .ProseMirror ul {
391
+ @apply pl-6;
392
+ }
393
+
394
+ .minimal-tiptap-editor .ProseMirror blockquote,
395
+ .minimal-tiptap-editor .ProseMirror dl,
396
+ .minimal-tiptap-editor .ProseMirror ol,
397
+ .minimal-tiptap-editor .ProseMirror p,
398
+ .minimal-tiptap-editor .ProseMirror pre,
399
+ .minimal-tiptap-editor .ProseMirror ul {
400
+ @apply m-0;
401
+ }
402
+
403
+ .minimal-tiptap-editor .ProseMirror li {
404
+ @apply leading-7;
405
+ }
406
+
407
+ .minimal-tiptap-editor .ProseMirror p {
408
+ @apply break-words;
409
+ }
410
+
411
+ .minimal-tiptap-editor .ProseMirror li .text-node:has(+ .list-node),
412
+ .minimal-tiptap-editor .ProseMirror li > .list-node,
413
+ .minimal-tiptap-editor .ProseMirror li > .text-node,
414
+ .minimal-tiptap-editor .ProseMirror li p {
415
+ @apply mb-0;
416
+ }
417
+
418
+ .minimal-tiptap-editor .ProseMirror blockquote {
419
+ @apply relative pl-3.5;
420
+ }
421
+
422
+ .minimal-tiptap-editor .ProseMirror blockquote::before,
423
+ .minimal-tiptap-editor .ProseMirror blockquote.is-empty::before {
424
+ @apply bg-accent-foreground/15 absolute top-0 bottom-0 left-0 h-full w-1 rounded-sm content-[''];
425
+ }
426
+
427
+ .minimal-tiptap-editor .ProseMirror hr {
428
+ @apply my-3 h-0.5 w-full border-none bg-[var(--mt-hr)];
429
+ }
430
+
431
+ .minimal-tiptap-editor .ProseMirror-focused hr.ProseMirror-selectednode {
432
+ @apply outline-muted-foreground rounded-full outline-2 outline-offset-1;
433
+ }
434
+
435
+ .minimal-tiptap-editor .ProseMirror .ProseMirror-gapcursor {
436
+ @apply pointer-events-none absolute hidden;
437
+ }
438
+
439
+ .minimal-tiptap-editor .ProseMirror .ProseMirror-hideselection {
440
+ @apply caret-transparent;
441
+ }
442
+
443
+ .minimal-tiptap-editor .ProseMirror.resize-cursor {
444
+ @apply cursor-col-resize;
445
+ }
446
+
447
+ .minimal-tiptap-editor .ProseMirror .selection {
448
+ @apply inline-block;
449
+ }
450
+
451
+ .minimal-tiptap-editor .ProseMirror s span {
452
+ @apply line-through;
453
+ }
454
+
455
+ .minimal-tiptap-editor .ProseMirror .selection,
456
+ .minimal-tiptap-editor .ProseMirror *::selection {
457
+ @apply bg-primary/25;
458
+ }
459
+
460
+ /* Override native selection when custom selection is present */
461
+ .minimal-tiptap-editor .ProseMirror .selection::selection {
462
+ background: transparent;
463
+ }
464
+
465
+ /* Tables */
466
+ .minimal-tiptap-editor .ProseMirror table {
467
+ @apply my-4 w-full border-collapse overflow-hidden rounded-lg border border-border;
468
+ }
469
+
470
+ .minimal-tiptap-editor .ProseMirror table td,
471
+ .minimal-tiptap-editor .ProseMirror table th {
472
+ @apply relative min-w-[100px] border border-border px-3 py-2 text-left align-top;
473
+ }
474
+
475
+ .minimal-tiptap-editor .ProseMirror table th {
476
+ @apply bg-muted font-semibold;
477
+ }
478
+
479
+ .minimal-tiptap-editor .ProseMirror table .selectedCell {
480
+ @apply bg-primary/10;
481
+ }
482
+
483
+ .minimal-tiptap-editor .ProseMirror table .selectedCell::after {
484
+ @apply pointer-events-none absolute inset-0 bg-primary/10 content-[''];
485
+ }
486
+
487
+ /* Column resize handle */
488
+ .minimal-tiptap-editor .ProseMirror .column-resize-handle {
489
+ @apply absolute -right-0.5 top-0 bottom-0 z-10 w-1 cursor-col-resize bg-primary/50;
490
+ }
491
+
492
+ .minimal-tiptap-editor .ProseMirror.resize-cursor {
493
+ @apply cursor-col-resize;
494
+ }
495
+
496
+ /* Mentions */
497
+ .minimal-tiptap-editor .ProseMirror .mention {
498
+ @apply inline-block rounded-md bg-primary/10 px-1.5 py-0.5 font-medium text-primary;
499
+ }
500
+
501
+ .minimal-tiptap-editor .ProseMirror .mention:hover {
502
+ @apply bg-primary/20;
503
+ }
504
+
505
+ /* Highlight */
506
+ .minimal-tiptap-editor .ProseMirror mark {
507
+ @apply rounded-sm bg-yellow-200 px-0.5 dark:bg-yellow-500/40;
508
+ }
509
+
510
+ .minimal-tiptap-editor .ProseMirror mark[data-color] {
511
+ background-color: var(--highlight-color, #fef08a);
512
+ }
513
+
514
+ /* Details / Collapsible */
515
+ .minimal-tiptap-editor .ProseMirror details {
516
+ @apply my-2 rounded-lg border border-border bg-muted/30;
517
+ }
518
+
519
+ .minimal-tiptap-editor .ProseMirror details summary {
520
+ @apply cursor-pointer px-4 py-2 font-medium select-none;
521
+ }
522
+
523
+ .minimal-tiptap-editor .ProseMirror details summary:hover {
524
+ @apply bg-muted/50;
525
+ }
526
+
527
+ .minimal-tiptap-editor .ProseMirror details[open] summary {
528
+ @apply border-b border-border;
529
+ }
530
+
531
+ .minimal-tiptap-editor .ProseMirror details > div:not(summary) {
532
+ @apply px-4 py-3;
533
+ }
534
+
535
+ /* YouTube / Twitch embeds */
536
+ .minimal-tiptap-editor .ProseMirror .youtube-node,
537
+ .minimal-tiptap-editor .ProseMirror .twitch-node {
538
+ @apply my-4;
539
+ }
540
+
541
+ .minimal-tiptap-editor .ProseMirror iframe {
542
+ @apply max-w-full rounded-lg border border-border;
543
+ aspect-ratio: 16 / 9;
544
+ }
545
+
546
+ .minimal-tiptap-editor .ProseMirror .ProseMirror-selectednode iframe {
547
+ @apply outline outline-2 outline-offset-2 outline-primary;
548
+ }
549
+
550
+
551
+ /* Load Tailwind Typography plugin for prose classes used by Markdown component */
552
+ @plugin "@tailwindcss/typography";
@@ -301,7 +301,7 @@ function getFirstCollision(collisions, property) {
301
301
  }
302
302
 
303
303
  const [firstCollision] = collisions;
304
- return property ? firstCollision[property] : firstCollision;
304
+ return firstCollision[property] ;
305
305
  }
306
306
 
307
307
  /**
@@ -295,7 +295,7 @@ function getFirstCollision(collisions, property) {
295
295
  }
296
296
 
297
297
  const [firstCollision] = collisions;
298
- return property ? firstCollision[property] : firstCollision;
298
+ return firstCollision[property] ;
299
299
  }
300
300
 
301
301
  /**
@@ -1,6 +1,6 @@
1
1
  import React__default, { useMemo, useRef, useEffect, useContext, useState } from 'react';
2
- import { useDndContext, useDroppable, useDraggable, getClientRect, KeyboardCode, closestCorners, getFirstCollision, getScrollableAncestors } from '../../../../../@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs';
3
- import { useUniqueId, useIsomorphicLayoutEffect, useCombinedRefs, CSS, isKeyboardEvent, subtract } from '../../../../../@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs';
2
+ import { KeyboardCode, closestCorners, getFirstCollision, getScrollableAncestors, useDndContext, useDroppable, useDraggable, getClientRect } from '../../../../../@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs';
3
+ import { subtract, useUniqueId, useIsomorphicLayoutEffect, useCombinedRefs, CSS, isKeyboardEvent } from '../../../../../@dnd-kit_utilities@3.2.2_react@19.2.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs';
4
4
 
5
5
  /**
6
6
  * Move an array item to a different position. Returns a new array with the item moved to the new position.
@@ -1,4 +1,4 @@
1
- import { evaluate, getSideAxis, getSide, clamp, getAlignment, getPaddingObject, rectToClientRect, getOppositeAxis, getAlignmentAxis, getAxisLength, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, getAlignmentSides, min, max, sides, placements, getOppositeAlignmentPlacement } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs';
1
+ import { evaluate, getSideAxis, getSide, clamp, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, getAlignmentSides, getAlignment, min, max, getPaddingObject, rectToClientRect, getOppositeAxis, getAlignmentAxis, sides, getAxisLength, placements, getOppositeAlignmentPlacement } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs';
2
2
 
3
3
  function computeCoordsFromPlacement(_ref, placement, rtl) {
4
4
  let {
@@ -1,6 +1,6 @@
1
- import { offset as offset$1, shift as shift$1, limitShift as limitShift$1, computePosition as computePosition$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, autoPlacement as autoPlacement$1, inline as inline$1 } from '../../../../../@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs';
2
- import { createCoords, rectToClientRect, round, max, min, floor } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs';
3
- import { getOverflowAncestors, isElement, getDocumentElement, getWindow, getFrameElement, getComputedStyle as getComputedStyle$1, isHTMLElement, isTopLayer, getParentNode, isLastTraversableNode, isTableElement, isContainingBlock, getContainingBlock, getNodeName, isOverflowElement, getNodeScroll, isWebKit } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs';
1
+ import { offset as offset$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, limitShift as limitShift$1, computePosition as computePosition$1, arrow as arrow$1, autoPlacement as autoPlacement$1, inline as inline$1 } from '../../../../../@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs';
2
+ import { createCoords, round, max, min, rectToClientRect, floor } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs';
3
+ import { isElement, getDocumentElement, getOverflowAncestors, getComputedStyle as getComputedStyle$1, isHTMLElement, getWindow, isTopLayer, getParentNode, isLastTraversableNode, isTableElement, isContainingBlock, getContainingBlock, getNodeName, isOverflowElement, getNodeScroll, getFrameElement, isWebKit } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs';
4
4
 
5
5
  function getCssDimensions(element) {
6
6
  const css = getComputedStyle$1(element);
@@ -1,4 +1,4 @@
1
- import { offset as offset$1, shift as shift$1, limitShift as limitShift$1, computePosition, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$2 } from '../../../../../@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs';
1
+ import { computePosition, offset as offset$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, limitShift as limitShift$1, arrow as arrow$2 } from '../../../../../@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs';
2
2
  export { autoUpdate, platform } from '../../../../../@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs';
3
3
  import * as React from 'react';
4
4
  import { useLayoutEffect } from 'react';
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const context = require('@btst/stack/context');
6
+ const index = require('../../localization/index.cjs');
7
+ const markdownEditor = require('./markdown-editor.cjs');
8
+
9
+ function MarkdownEditorWithOverrides(props) {
10
+ const { uploadImage, localization } = context.usePluginOverrides("blog", {
11
+ localization: index.BLOG_LOCALIZATION
12
+ });
13
+ return /* @__PURE__ */ jsxRuntime.jsx(
14
+ markdownEditor.MarkdownEditor,
15
+ {
16
+ ...props,
17
+ uploadImage,
18
+ placeholder: localization?.BLOG_FORMS_EDITOR_PLACEHOLDER
19
+ }
20
+ );
21
+ }
22
+
23
+ exports.MarkdownEditorWithOverrides = MarkdownEditorWithOverrides;
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { usePluginOverrides } from '@btst/stack/context';
4
+ import { BLOG_LOCALIZATION } from '../../localization/index.mjs';
5
+ import { MarkdownEditor } from './markdown-editor.mjs';
6
+
7
+ function MarkdownEditorWithOverrides(props) {
8
+ const { uploadImage, localization } = usePluginOverrides("blog", {
9
+ localization: BLOG_LOCALIZATION
10
+ });
11
+ return /* @__PURE__ */ jsx(
12
+ MarkdownEditor,
13
+ {
14
+ ...props,
15
+ uploadImage,
16
+ placeholder: localization?.BLOG_FORMS_EDITOR_PLACEHOLDER
17
+ }
18
+ );
19
+ }
20
+
21
+ export { MarkdownEditorWithOverrides };
@@ -10,17 +10,14 @@ const listener = require('@milkdown/kit/plugin/listener');
10
10
  const model = require('@milkdown/kit/prose/model');
11
11
  const state = require('@milkdown/kit/prose/state');
12
12
  const React = require('react');
13
- const context = require('@btst/stack/context');
14
- const index = require('../../localization/index.cjs');
15
13
 
16
14
  function MarkdownEditor({
17
15
  value,
18
16
  onChange,
19
- className
17
+ className,
18
+ uploadImage,
19
+ placeholder = "Write something..."
20
20
  }) {
21
- const { uploadImage, localization } = context.usePluginOverrides("blog", {
22
- localization: index.BLOG_LOCALIZATION
23
- });
24
21
  const containerRef = React.useRef(null);
25
22
  const crepeRef = React.useRef(null);
26
23
  const isReadyRef = React.useRef(false);
@@ -38,14 +35,16 @@ function MarkdownEditor({
38
35
  defaultValue: initialValueRef.current,
39
36
  featureConfigs: {
40
37
  [crepe.CrepeFeature.Placeholder]: {
41
- text: localization.BLOG_FORMS_EDITOR_PLACEHOLDER
38
+ text: placeholder
42
39
  },
43
- [crepe.CrepeFeature.ImageBlock]: {
44
- onUpload: async (file) => {
45
- const url = await uploadImage(file);
46
- return url;
40
+ ...uploadImage ? {
41
+ [crepe.CrepeFeature.ImageBlock]: {
42
+ onUpload: async (file) => {
43
+ const url = await uploadImage(file);
44
+ return url;
45
+ }
47
46
  }
48
- }
47
+ } : {}
49
48
  }
50
49
  });
51
50
  throttledOnChangeRef.current = utils.throttle((markdown) => {