@select-org/select-post-builder 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/post-builder.cjs.js +456 -195
- package/dist/post-builder.css +85 -19
- package/dist/post-builder.js +457 -196
- package/package.json +1 -1
package/dist/post-builder.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import React__default, { createContext, useContext, useCallback, useMemo, forwardRef, useLayoutEffect, useState, createElement, useEffect, Component,
|
|
2
|
+
import React__default, { createContext, useContext, useCallback, useMemo, forwardRef, useLayoutEffect, useState, createElement, useRef, useEffect, Component, useImperativeHandle } from "react";
|
|
3
3
|
import * as ReactDOM from "react-dom";
|
|
4
4
|
import ReactDOM__default from "react-dom";
|
|
5
5
|
import { jsx, Fragment as Fragment$1, jsxs } from "react/jsx-runtime";
|
|
@@ -12950,119 +12950,119 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
12950
12950
|
* This source code is licensed under the ISC license.
|
|
12951
12951
|
* See the LICENSE file in the root directory of this source tree.
|
|
12952
12952
|
*/
|
|
12953
|
-
const __iconNode$
|
|
12953
|
+
const __iconNode$G = [
|
|
12954
12954
|
[
|
|
12955
12955
|
"path",
|
|
12956
12956
|
{ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
|
|
12957
12957
|
]
|
|
12958
12958
|
];
|
|
12959
|
-
const Bold = createLucideIcon("bold", __iconNode$
|
|
12959
|
+
const Bold = createLucideIcon("bold", __iconNode$G);
|
|
12960
12960
|
/**
|
|
12961
12961
|
* @license lucide-react v0.544.0 - ISC
|
|
12962
12962
|
*
|
|
12963
12963
|
* This source code is licensed under the ISC license.
|
|
12964
12964
|
* See the LICENSE file in the root directory of this source tree.
|
|
12965
12965
|
*/
|
|
12966
|
-
const __iconNode$
|
|
12967
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
12966
|
+
const __iconNode$F = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
12967
|
+
const Check = createLucideIcon("check", __iconNode$F);
|
|
12968
12968
|
/**
|
|
12969
12969
|
* @license lucide-react v0.544.0 - ISC
|
|
12970
12970
|
*
|
|
12971
12971
|
* This source code is licensed under the ISC license.
|
|
12972
12972
|
* See the LICENSE file in the root directory of this source tree.
|
|
12973
12973
|
*/
|
|
12974
|
-
const __iconNode$
|
|
12975
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
12974
|
+
const __iconNode$E = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
12975
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$E);
|
|
12976
12976
|
/**
|
|
12977
12977
|
* @license lucide-react v0.544.0 - ISC
|
|
12978
12978
|
*
|
|
12979
12979
|
* This source code is licensed under the ISC license.
|
|
12980
12980
|
* See the LICENSE file in the root directory of this source tree.
|
|
12981
12981
|
*/
|
|
12982
|
-
const __iconNode$
|
|
12983
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
12982
|
+
const __iconNode$D = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
12983
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$D);
|
|
12984
12984
|
/**
|
|
12985
12985
|
* @license lucide-react v0.544.0 - ISC
|
|
12986
12986
|
*
|
|
12987
12987
|
* This source code is licensed under the ISC license.
|
|
12988
12988
|
* See the LICENSE file in the root directory of this source tree.
|
|
12989
12989
|
*/
|
|
12990
|
-
const __iconNode$
|
|
12991
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
12990
|
+
const __iconNode$C = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
12991
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$C);
|
|
12992
12992
|
/**
|
|
12993
12993
|
* @license lucide-react v0.544.0 - ISC
|
|
12994
12994
|
*
|
|
12995
12995
|
* This source code is licensed under the ISC license.
|
|
12996
12996
|
* See the LICENSE file in the root directory of this source tree.
|
|
12997
12997
|
*/
|
|
12998
|
-
const __iconNode$
|
|
12999
|
-
const Circle = createLucideIcon("circle", __iconNode$
|
|
12998
|
+
const __iconNode$B = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
12999
|
+
const Circle = createLucideIcon("circle", __iconNode$B);
|
|
13000
13000
|
/**
|
|
13001
13001
|
* @license lucide-react v0.544.0 - ISC
|
|
13002
13002
|
*
|
|
13003
13003
|
* This source code is licensed under the ISC license.
|
|
13004
13004
|
* See the LICENSE file in the root directory of this source tree.
|
|
13005
13005
|
*/
|
|
13006
|
-
const __iconNode$
|
|
13006
|
+
const __iconNode$A = [
|
|
13007
13007
|
["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
|
|
13008
13008
|
["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
|
|
13009
13009
|
];
|
|
13010
|
-
const Code = createLucideIcon("code", __iconNode$
|
|
13010
|
+
const Code = createLucideIcon("code", __iconNode$A);
|
|
13011
13011
|
/**
|
|
13012
13012
|
* @license lucide-react v0.544.0 - ISC
|
|
13013
13013
|
*
|
|
13014
13014
|
* This source code is licensed under the ISC license.
|
|
13015
13015
|
* See the LICENSE file in the root directory of this source tree.
|
|
13016
13016
|
*/
|
|
13017
|
-
const __iconNode$
|
|
13017
|
+
const __iconNode$z = [
|
|
13018
13018
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
13019
13019
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
13020
13020
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
13021
13021
|
];
|
|
13022
|
-
const Ellipsis = createLucideIcon("ellipsis", __iconNode$
|
|
13022
|
+
const Ellipsis = createLucideIcon("ellipsis", __iconNode$z);
|
|
13023
13023
|
/**
|
|
13024
13024
|
* @license lucide-react v0.544.0 - ISC
|
|
13025
13025
|
*
|
|
13026
13026
|
* This source code is licensed under the ISC license.
|
|
13027
13027
|
* See the LICENSE file in the root directory of this source tree.
|
|
13028
13028
|
*/
|
|
13029
|
-
const __iconNode$
|
|
13029
|
+
const __iconNode$y = [
|
|
13030
13030
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
13031
13031
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
13032
13032
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
13033
13033
|
];
|
|
13034
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
13034
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$y);
|
|
13035
13035
|
/**
|
|
13036
13036
|
* @license lucide-react v0.544.0 - ISC
|
|
13037
13037
|
*
|
|
13038
13038
|
* This source code is licensed under the ISC license.
|
|
13039
13039
|
* See the LICENSE file in the root directory of this source tree.
|
|
13040
13040
|
*/
|
|
13041
|
-
const __iconNode$
|
|
13041
|
+
const __iconNode$x = [
|
|
13042
13042
|
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
|
|
13043
13043
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
13044
13044
|
["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
|
|
13045
13045
|
["path", { d: "m9 18 3-3-3-3", key: "112psh" }]
|
|
13046
13046
|
];
|
|
13047
|
-
const FileCode2 = createLucideIcon("file-code-2", __iconNode$
|
|
13047
|
+
const FileCode2 = createLucideIcon("file-code-2", __iconNode$x);
|
|
13048
13048
|
/**
|
|
13049
13049
|
* @license lucide-react v0.544.0 - ISC
|
|
13050
13050
|
*
|
|
13051
13051
|
* This source code is licensed under the ISC license.
|
|
13052
13052
|
* See the LICENSE file in the root directory of this source tree.
|
|
13053
13053
|
*/
|
|
13054
|
-
const __iconNode$
|
|
13054
|
+
const __iconNode$w = [
|
|
13055
13055
|
["path", { d: "m15 17 5-5-5-5", key: "nf172w" }],
|
|
13056
13056
|
["path", { d: "M4 18v-2a4 4 0 0 1 4-4h12", key: "jmiej9" }]
|
|
13057
13057
|
];
|
|
13058
|
-
const Forward = createLucideIcon("forward", __iconNode$
|
|
13058
|
+
const Forward = createLucideIcon("forward", __iconNode$w);
|
|
13059
13059
|
/**
|
|
13060
13060
|
* @license lucide-react v0.544.0 - ISC
|
|
13061
13061
|
*
|
|
13062
13062
|
* This source code is licensed under the ISC license.
|
|
13063
13063
|
* See the LICENSE file in the root directory of this source tree.
|
|
13064
13064
|
*/
|
|
13065
|
-
const __iconNode$
|
|
13065
|
+
const __iconNode$v = [
|
|
13066
13066
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
13067
13067
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
13068
13068
|
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
@@ -13070,68 +13070,68 @@ const __iconNode$u = [
|
|
|
13070
13070
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
13071
13071
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
13072
13072
|
];
|
|
13073
|
-
const GripVertical = createLucideIcon("grip-vertical", __iconNode$
|
|
13073
|
+
const GripVertical = createLucideIcon("grip-vertical", __iconNode$v);
|
|
13074
13074
|
/**
|
|
13075
13075
|
* @license lucide-react v0.544.0 - ISC
|
|
13076
13076
|
*
|
|
13077
13077
|
* This source code is licensed under the ISC license.
|
|
13078
13078
|
* See the LICENSE file in the root directory of this source tree.
|
|
13079
13079
|
*/
|
|
13080
|
-
const __iconNode$
|
|
13080
|
+
const __iconNode$u = [
|
|
13081
13081
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
13082
13082
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
13083
13083
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
13084
13084
|
["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
|
|
13085
13085
|
];
|
|
13086
|
-
const Heading1 = createLucideIcon("heading-1", __iconNode$
|
|
13086
|
+
const Heading1 = createLucideIcon("heading-1", __iconNode$u);
|
|
13087
13087
|
/**
|
|
13088
13088
|
* @license lucide-react v0.544.0 - ISC
|
|
13089
13089
|
*
|
|
13090
13090
|
* This source code is licensed under the ISC license.
|
|
13091
13091
|
* See the LICENSE file in the root directory of this source tree.
|
|
13092
13092
|
*/
|
|
13093
|
-
const __iconNode$
|
|
13093
|
+
const __iconNode$t = [
|
|
13094
13094
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
13095
13095
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
13096
13096
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
13097
13097
|
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
|
|
13098
13098
|
];
|
|
13099
|
-
const Heading2 = createLucideIcon("heading-2", __iconNode$
|
|
13099
|
+
const Heading2 = createLucideIcon("heading-2", __iconNode$t);
|
|
13100
13100
|
/**
|
|
13101
13101
|
* @license lucide-react v0.544.0 - ISC
|
|
13102
13102
|
*
|
|
13103
13103
|
* This source code is licensed under the ISC license.
|
|
13104
13104
|
* See the LICENSE file in the root directory of this source tree.
|
|
13105
13105
|
*/
|
|
13106
|
-
const __iconNode$
|
|
13106
|
+
const __iconNode$s = [
|
|
13107
13107
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
13108
13108
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
13109
13109
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
13110
13110
|
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
|
|
13111
13111
|
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
|
|
13112
13112
|
];
|
|
13113
|
-
const Heading3 = createLucideIcon("heading-3", __iconNode$
|
|
13113
|
+
const Heading3 = createLucideIcon("heading-3", __iconNode$s);
|
|
13114
13114
|
/**
|
|
13115
13115
|
* @license lucide-react v0.544.0 - ISC
|
|
13116
13116
|
*
|
|
13117
13117
|
* This source code is licensed under the ISC license.
|
|
13118
13118
|
* See the LICENSE file in the root directory of this source tree.
|
|
13119
13119
|
*/
|
|
13120
|
-
const __iconNode$
|
|
13120
|
+
const __iconNode$r = [
|
|
13121
13121
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
13122
13122
|
["path", { d: "M17 10v3a1 1 0 0 0 1 1h3", key: "tj5zdr" }],
|
|
13123
13123
|
["path", { d: "M21 10v8", key: "1kdml4" }],
|
|
13124
13124
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
13125
13125
|
["path", { d: "M4 18V6", key: "1rz3zl" }]
|
|
13126
13126
|
];
|
|
13127
|
-
const Heading4 = createLucideIcon("heading-4", __iconNode$
|
|
13127
|
+
const Heading4 = createLucideIcon("heading-4", __iconNode$r);
|
|
13128
13128
|
/**
|
|
13129
13129
|
* @license lucide-react v0.544.0 - ISC
|
|
13130
13130
|
*
|
|
13131
13131
|
* This source code is licensed under the ISC license.
|
|
13132
13132
|
* See the LICENSE file in the root directory of this source tree.
|
|
13133
13133
|
*/
|
|
13134
|
-
const __iconNode$
|
|
13134
|
+
const __iconNode$q = [
|
|
13135
13135
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
13136
13136
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
13137
13137
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
@@ -13141,28 +13141,28 @@ const __iconNode$p = [
|
|
|
13141
13141
|
{ d: "M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17", key: "2nebdn" }
|
|
13142
13142
|
]
|
|
13143
13143
|
];
|
|
13144
|
-
const Heading5 = createLucideIcon("heading-5", __iconNode$
|
|
13144
|
+
const Heading5 = createLucideIcon("heading-5", __iconNode$q);
|
|
13145
13145
|
/**
|
|
13146
13146
|
* @license lucide-react v0.544.0 - ISC
|
|
13147
13147
|
*
|
|
13148
13148
|
* This source code is licensed under the ISC license.
|
|
13149
13149
|
* See the LICENSE file in the root directory of this source tree.
|
|
13150
13150
|
*/
|
|
13151
|
-
const __iconNode$
|
|
13151
|
+
const __iconNode$p = [
|
|
13152
13152
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
13153
13153
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
13154
13154
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
13155
13155
|
["circle", { cx: "19", cy: "16", r: "2", key: "15mx69" }],
|
|
13156
13156
|
["path", { d: "M20 10c-2 2-3 3.5-3 6", key: "f35dl0" }]
|
|
13157
13157
|
];
|
|
13158
|
-
const Heading6 = createLucideIcon("heading-6", __iconNode$
|
|
13158
|
+
const Heading6 = createLucideIcon("heading-6", __iconNode$p);
|
|
13159
13159
|
/**
|
|
13160
13160
|
* @license lucide-react v0.544.0 - ISC
|
|
13161
13161
|
*
|
|
13162
13162
|
* This source code is licensed under the ISC license.
|
|
13163
13163
|
* See the LICENSE file in the root directory of this source tree.
|
|
13164
13164
|
*/
|
|
13165
|
-
const __iconNode$
|
|
13165
|
+
const __iconNode$o = [
|
|
13166
13166
|
[
|
|
13167
13167
|
"path",
|
|
13168
13168
|
{
|
|
@@ -13174,63 +13174,63 @@ const __iconNode$n = [
|
|
|
13174
13174
|
["path", { d: "m6 21 5-5", key: "1wyjai" }],
|
|
13175
13175
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
|
|
13176
13176
|
];
|
|
13177
|
-
const ImagePlay = createLucideIcon("image-play", __iconNode$
|
|
13177
|
+
const ImagePlay = createLucideIcon("image-play", __iconNode$o);
|
|
13178
13178
|
/**
|
|
13179
13179
|
* @license lucide-react v0.544.0 - ISC
|
|
13180
13180
|
*
|
|
13181
13181
|
* This source code is licensed under the ISC license.
|
|
13182
13182
|
* See the LICENSE file in the root directory of this source tree.
|
|
13183
13183
|
*/
|
|
13184
|
-
const __iconNode$
|
|
13184
|
+
const __iconNode$n = [
|
|
13185
13185
|
["path", { d: "M16 5h6", key: "1vod17" }],
|
|
13186
13186
|
["path", { d: "M19 2v6", key: "4bpg5p" }],
|
|
13187
13187
|
["path", { d: "M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5", key: "1ue2ih" }],
|
|
13188
13188
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }],
|
|
13189
13189
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
|
|
13190
13190
|
];
|
|
13191
|
-
const ImagePlus = createLucideIcon("image-plus", __iconNode$
|
|
13191
|
+
const ImagePlus = createLucideIcon("image-plus", __iconNode$n);
|
|
13192
13192
|
/**
|
|
13193
13193
|
* @license lucide-react v0.544.0 - ISC
|
|
13194
13194
|
*
|
|
13195
13195
|
* This source code is licensed under the ISC license.
|
|
13196
13196
|
* See the LICENSE file in the root directory of this source tree.
|
|
13197
13197
|
*/
|
|
13198
|
-
const __iconNode$
|
|
13198
|
+
const __iconNode$m = [
|
|
13199
13199
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
13200
13200
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
13201
13201
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
13202
13202
|
];
|
|
13203
|
-
const Image$1 = createLucideIcon("image", __iconNode$
|
|
13203
|
+
const Image$1 = createLucideIcon("image", __iconNode$m);
|
|
13204
13204
|
/**
|
|
13205
13205
|
* @license lucide-react v0.544.0 - ISC
|
|
13206
13206
|
*
|
|
13207
13207
|
* This source code is licensed under the ISC license.
|
|
13208
13208
|
* See the LICENSE file in the root directory of this source tree.
|
|
13209
13209
|
*/
|
|
13210
|
-
const __iconNode$
|
|
13210
|
+
const __iconNode$l = [
|
|
13211
13211
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
13212
13212
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
13213
13213
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
13214
13214
|
];
|
|
13215
|
-
const Italic = createLucideIcon("italic", __iconNode$
|
|
13215
|
+
const Italic = createLucideIcon("italic", __iconNode$l);
|
|
13216
13216
|
/**
|
|
13217
13217
|
* @license lucide-react v0.544.0 - ISC
|
|
13218
13218
|
*
|
|
13219
13219
|
* This source code is licensed under the ISC license.
|
|
13220
13220
|
* See the LICENSE file in the root directory of this source tree.
|
|
13221
13221
|
*/
|
|
13222
|
-
const __iconNode$
|
|
13222
|
+
const __iconNode$k = [
|
|
13223
13223
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
13224
13224
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
13225
13225
|
];
|
|
13226
|
-
const Link = createLucideIcon("link", __iconNode$
|
|
13226
|
+
const Link = createLucideIcon("link", __iconNode$k);
|
|
13227
13227
|
/**
|
|
13228
13228
|
* @license lucide-react v0.544.0 - ISC
|
|
13229
13229
|
*
|
|
13230
13230
|
* This source code is licensed under the ISC license.
|
|
13231
13231
|
* See the LICENSE file in the root directory of this source tree.
|
|
13232
13232
|
*/
|
|
13233
|
-
const __iconNode$
|
|
13233
|
+
const __iconNode$j = [
|
|
13234
13234
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
13235
13235
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
13236
13236
|
["path", { d: "M11 19h10", key: "11t30w" }],
|
|
@@ -13238,14 +13238,14 @@ const __iconNode$i = [
|
|
|
13238
13238
|
["path", { d: "M4 9h2", key: "r1h2o0" }],
|
|
13239
13239
|
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
|
|
13240
13240
|
];
|
|
13241
|
-
const ListOrdered = createLucideIcon("list-ordered", __iconNode$
|
|
13241
|
+
const ListOrdered = createLucideIcon("list-ordered", __iconNode$j);
|
|
13242
13242
|
/**
|
|
13243
13243
|
* @license lucide-react v0.544.0 - ISC
|
|
13244
13244
|
*
|
|
13245
13245
|
* This source code is licensed under the ISC license.
|
|
13246
13246
|
* See the LICENSE file in the root directory of this source tree.
|
|
13247
13247
|
*/
|
|
13248
|
-
const __iconNode$
|
|
13248
|
+
const __iconNode$i = [
|
|
13249
13249
|
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
13250
13250
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
13251
13251
|
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
@@ -13253,56 +13253,56 @@ const __iconNode$h = [
|
|
|
13253
13253
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
13254
13254
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
13255
13255
|
];
|
|
13256
|
-
const List = createLucideIcon("list", __iconNode$
|
|
13256
|
+
const List = createLucideIcon("list", __iconNode$i);
|
|
13257
13257
|
/**
|
|
13258
13258
|
* @license lucide-react v0.544.0 - ISC
|
|
13259
13259
|
*
|
|
13260
13260
|
* This source code is licensed under the ISC license.
|
|
13261
13261
|
* See the LICENSE file in the root directory of this source tree.
|
|
13262
13262
|
*/
|
|
13263
|
-
const __iconNode$
|
|
13264
|
-
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$
|
|
13263
|
+
const __iconNode$h = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
13264
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$h);
|
|
13265
13265
|
/**
|
|
13266
13266
|
* @license lucide-react v0.544.0 - ISC
|
|
13267
13267
|
*
|
|
13268
13268
|
* This source code is licensed under the ISC license.
|
|
13269
13269
|
* See the LICENSE file in the root directory of this source tree.
|
|
13270
13270
|
*/
|
|
13271
|
-
const __iconNode$
|
|
13271
|
+
const __iconNode$g = [
|
|
13272
13272
|
["path", { d: "M9 18V5l12-2v13", key: "1jmyc2" }],
|
|
13273
13273
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
13274
13274
|
["circle", { cx: "18", cy: "16", r: "3", key: "1hluhg" }]
|
|
13275
13275
|
];
|
|
13276
|
-
const Music = createLucideIcon("music", __iconNode$
|
|
13276
|
+
const Music = createLucideIcon("music", __iconNode$g);
|
|
13277
13277
|
/**
|
|
13278
13278
|
* @license lucide-react v0.544.0 - ISC
|
|
13279
13279
|
*
|
|
13280
13280
|
* This source code is licensed under the ISC license.
|
|
13281
13281
|
* See the LICENSE file in the root directory of this source tree.
|
|
13282
13282
|
*/
|
|
13283
|
-
const __iconNode$
|
|
13283
|
+
const __iconNode$f = [
|
|
13284
13284
|
["path", { d: "M21 7v6h-6", key: "3ptur4" }],
|
|
13285
13285
|
["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7", key: "1kgawr" }]
|
|
13286
13286
|
];
|
|
13287
|
-
const Redo = createLucideIcon("redo", __iconNode$
|
|
13287
|
+
const Redo = createLucideIcon("redo", __iconNode$f);
|
|
13288
13288
|
/**
|
|
13289
13289
|
* @license lucide-react v0.544.0 - ISC
|
|
13290
13290
|
*
|
|
13291
13291
|
* This source code is licensed under the ISC license.
|
|
13292
13292
|
* See the LICENSE file in the root directory of this source tree.
|
|
13293
13293
|
*/
|
|
13294
|
-
const __iconNode$
|
|
13294
|
+
const __iconNode$e = [
|
|
13295
13295
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
13296
13296
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
13297
13297
|
];
|
|
13298
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
13298
|
+
const Search = createLucideIcon("search", __iconNode$e);
|
|
13299
13299
|
/**
|
|
13300
13300
|
* @license lucide-react v0.544.0 - ISC
|
|
13301
13301
|
*
|
|
13302
13302
|
* This source code is licensed under the ISC license.
|
|
13303
13303
|
* See the LICENSE file in the root directory of this source tree.
|
|
13304
13304
|
*/
|
|
13305
|
-
const __iconNode$
|
|
13305
|
+
const __iconNode$d = [
|
|
13306
13306
|
[
|
|
13307
13307
|
"path",
|
|
13308
13308
|
{
|
|
@@ -13312,14 +13312,14 @@ const __iconNode$c = [
|
|
|
13312
13312
|
],
|
|
13313
13313
|
["path", { d: "M6 12h16", key: "s4cdu5" }]
|
|
13314
13314
|
];
|
|
13315
|
-
const SendHorizontal = createLucideIcon("send-horizontal", __iconNode$
|
|
13315
|
+
const SendHorizontal = createLucideIcon("send-horizontal", __iconNode$d);
|
|
13316
13316
|
/**
|
|
13317
13317
|
* @license lucide-react v0.544.0 - ISC
|
|
13318
13318
|
*
|
|
13319
13319
|
* This source code is licensed under the ISC license.
|
|
13320
13320
|
* See the LICENSE file in the root directory of this source tree.
|
|
13321
13321
|
*/
|
|
13322
|
-
const __iconNode$
|
|
13322
|
+
const __iconNode$c = [
|
|
13323
13323
|
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
|
|
13324
13324
|
[
|
|
13325
13325
|
"path",
|
|
@@ -13329,55 +13329,68 @@ const __iconNode$b = [
|
|
|
13329
13329
|
}
|
|
13330
13330
|
]
|
|
13331
13331
|
];
|
|
13332
|
-
const SquarePen = createLucideIcon("square-pen", __iconNode$
|
|
13332
|
+
const SquarePen = createLucideIcon("square-pen", __iconNode$c);
|
|
13333
13333
|
/**
|
|
13334
13334
|
* @license lucide-react v0.544.0 - ISC
|
|
13335
13335
|
*
|
|
13336
13336
|
* This source code is licensed under the ISC license.
|
|
13337
13337
|
* See the LICENSE file in the root directory of this source tree.
|
|
13338
13338
|
*/
|
|
13339
|
-
const __iconNode$
|
|
13339
|
+
const __iconNode$b = [
|
|
13340
13340
|
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
|
|
13341
13341
|
["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
|
|
13342
13342
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
|
|
13343
13343
|
];
|
|
13344
|
-
const Strikethrough = createLucideIcon("strikethrough", __iconNode$
|
|
13344
|
+
const Strikethrough = createLucideIcon("strikethrough", __iconNode$b);
|
|
13345
13345
|
/**
|
|
13346
13346
|
* @license lucide-react v0.544.0 - ISC
|
|
13347
13347
|
*
|
|
13348
13348
|
* This source code is licensed under the ISC license.
|
|
13349
13349
|
* See the LICENSE file in the root directory of this source tree.
|
|
13350
13350
|
*/
|
|
13351
|
-
const __iconNode$
|
|
13351
|
+
const __iconNode$a = [
|
|
13352
13352
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
13353
13353
|
["path", { d: "M17 12H7", key: "16if0g" }],
|
|
13354
13354
|
["path", { d: "M19 19H5", key: "vjpgq2" }]
|
|
13355
13355
|
];
|
|
13356
|
-
const TextAlignCenter = createLucideIcon("text-align-center", __iconNode$
|
|
13356
|
+
const TextAlignCenter = createLucideIcon("text-align-center", __iconNode$a);
|
|
13357
13357
|
/**
|
|
13358
13358
|
* @license lucide-react v0.544.0 - ISC
|
|
13359
13359
|
*
|
|
13360
13360
|
* This source code is licensed under the ISC license.
|
|
13361
13361
|
* See the LICENSE file in the root directory of this source tree.
|
|
13362
13362
|
*/
|
|
13363
|
-
const __iconNode$
|
|
13363
|
+
const __iconNode$9 = [
|
|
13364
13364
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
13365
13365
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
13366
13366
|
["path", { d: "M21 19H7", key: "4cu937" }]
|
|
13367
13367
|
];
|
|
13368
|
-
const TextAlignEnd = createLucideIcon("text-align-end", __iconNode$
|
|
13368
|
+
const TextAlignEnd = createLucideIcon("text-align-end", __iconNode$9);
|
|
13369
13369
|
/**
|
|
13370
13370
|
* @license lucide-react v0.544.0 - ISC
|
|
13371
13371
|
*
|
|
13372
13372
|
* This source code is licensed under the ISC license.
|
|
13373
13373
|
* See the LICENSE file in the root directory of this source tree.
|
|
13374
13374
|
*/
|
|
13375
|
-
const __iconNode$
|
|
13375
|
+
const __iconNode$8 = [
|
|
13376
13376
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
13377
13377
|
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
13378
13378
|
["path", { d: "M17 19H3", key: "z6ezky" }]
|
|
13379
13379
|
];
|
|
13380
|
-
const TextAlignStart = createLucideIcon("text-align-start", __iconNode$
|
|
13380
|
+
const TextAlignStart = createLucideIcon("text-align-start", __iconNode$8);
|
|
13381
|
+
/**
|
|
13382
|
+
* @license lucide-react v0.544.0 - ISC
|
|
13383
|
+
*
|
|
13384
|
+
* This source code is licensed under the ISC license.
|
|
13385
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13386
|
+
*/
|
|
13387
|
+
const __iconNode$7 = [
|
|
13388
|
+
["path", { d: "M17 5H3", key: "1cn7zz" }],
|
|
13389
|
+
["path", { d: "M21 12H8", key: "scolzb" }],
|
|
13390
|
+
["path", { d: "M21 19H8", key: "13qgcb" }],
|
|
13391
|
+
["path", { d: "M3 12v7", key: "1ri8j3" }]
|
|
13392
|
+
];
|
|
13393
|
+
const TextQuote = createLucideIcon("text-quote", __iconNode$7);
|
|
13381
13394
|
/**
|
|
13382
13395
|
* @license lucide-react v0.544.0 - ISC
|
|
13383
13396
|
*
|
|
@@ -13712,46 +13725,67 @@ function FieldError({
|
|
|
13712
13725
|
}
|
|
13713
13726
|
);
|
|
13714
13727
|
}
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
"
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
}
|
|
13731
|
-
|
|
13728
|
+
const Input = forwardRef(
|
|
13729
|
+
({ className, type, ...props }, ref) => {
|
|
13730
|
+
return /* @__PURE__ */ jsx(
|
|
13731
|
+
"input",
|
|
13732
|
+
{
|
|
13733
|
+
ref,
|
|
13734
|
+
type,
|
|
13735
|
+
"data-slot": "input",
|
|
13736
|
+
className: cn(
|
|
13737
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
13738
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
13739
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
13740
|
+
className
|
|
13741
|
+
),
|
|
13742
|
+
...props
|
|
13743
|
+
}
|
|
13744
|
+
);
|
|
13745
|
+
}
|
|
13746
|
+
);
|
|
13747
|
+
Input.displayName = "Input";
|
|
13748
|
+
function Textarea({ className, ...props }) {
|
|
13732
13749
|
return /* @__PURE__ */ jsx(
|
|
13733
|
-
"
|
|
13750
|
+
"textarea",
|
|
13734
13751
|
{
|
|
13735
|
-
"data-slot": "
|
|
13736
|
-
role: "group",
|
|
13752
|
+
"data-slot": "textarea",
|
|
13737
13753
|
className: cn(
|
|
13738
|
-
"
|
|
13739
|
-
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
13740
|
-
// Variants based on alignment.
|
|
13741
|
-
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
13742
|
-
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
13743
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
13744
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
13745
|
-
// Focus state.
|
|
13746
|
-
"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
13747
|
-
// Error state.
|
|
13748
|
-
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
13754
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
13749
13755
|
className
|
|
13750
13756
|
),
|
|
13751
13757
|
...props
|
|
13752
13758
|
}
|
|
13753
13759
|
);
|
|
13754
13760
|
}
|
|
13761
|
+
const InputGroup = forwardRef(
|
|
13762
|
+
({ className, ...props }, ref) => {
|
|
13763
|
+
return /* @__PURE__ */ jsx(
|
|
13764
|
+
"div",
|
|
13765
|
+
{
|
|
13766
|
+
ref,
|
|
13767
|
+
"data-slot": "input-group",
|
|
13768
|
+
role: "group",
|
|
13769
|
+
className: cn(
|
|
13770
|
+
"group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
|
|
13771
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
13772
|
+
// Variants based on alignment.
|
|
13773
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
13774
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
13775
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
13776
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
13777
|
+
// Focus state.
|
|
13778
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
13779
|
+
// Error state.
|
|
13780
|
+
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
13781
|
+
className
|
|
13782
|
+
),
|
|
13783
|
+
...props
|
|
13784
|
+
}
|
|
13785
|
+
);
|
|
13786
|
+
}
|
|
13787
|
+
);
|
|
13788
|
+
InputGroup.displayName = "InputGroup";
|
|
13755
13789
|
const inputGroupAddonVariants = cva(
|
|
13756
13790
|
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
13757
13791
|
{
|
|
@@ -13768,14 +13802,11 @@ const inputGroupAddonVariants = cva(
|
|
|
13768
13802
|
}
|
|
13769
13803
|
}
|
|
13770
13804
|
);
|
|
13771
|
-
|
|
13772
|
-
className,
|
|
13773
|
-
align = "inline-start",
|
|
13774
|
-
...props
|
|
13775
|
-
}) {
|
|
13805
|
+
const InputGroupAddon = forwardRef(({ className, align = "inline-start", ...props }, ref) => {
|
|
13776
13806
|
return /* @__PURE__ */ jsx(
|
|
13777
13807
|
"div",
|
|
13778
13808
|
{
|
|
13809
|
+
ref,
|
|
13779
13810
|
role: "group",
|
|
13780
13811
|
"data-slot": "input-group-addon",
|
|
13781
13812
|
"data-align": align,
|
|
@@ -13789,20 +13820,86 @@ function InputGroupAddon({
|
|
|
13789
13820
|
...props
|
|
13790
13821
|
}
|
|
13791
13822
|
);
|
|
13792
|
-
}
|
|
13793
|
-
|
|
13823
|
+
});
|
|
13824
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
13825
|
+
const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-center", {
|
|
13826
|
+
variants: {
|
|
13827
|
+
size: {
|
|
13828
|
+
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
13829
|
+
sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
13830
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
13831
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
13832
|
+
}
|
|
13833
|
+
},
|
|
13834
|
+
defaultVariants: {
|
|
13835
|
+
size: "xs"
|
|
13836
|
+
}
|
|
13837
|
+
});
|
|
13838
|
+
const InputGroupButton = forwardRef(({ className, type = "button", variant = "ghost", size: size2 = "xs", ...props }, ref) => {
|
|
13794
13839
|
return /* @__PURE__ */ jsx(
|
|
13795
|
-
|
|
13840
|
+
Button,
|
|
13796
13841
|
{
|
|
13797
|
-
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
),
|
|
13842
|
+
ref,
|
|
13843
|
+
type,
|
|
13844
|
+
"data-size": size2,
|
|
13845
|
+
variant,
|
|
13846
|
+
className: cn(inputGroupButtonVariants({ size: size2 }), className),
|
|
13802
13847
|
...props
|
|
13803
13848
|
}
|
|
13804
13849
|
);
|
|
13805
|
-
}
|
|
13850
|
+
});
|
|
13851
|
+
InputGroupButton.displayName = "InputGroupButton";
|
|
13852
|
+
const InputGroupText = forwardRef(
|
|
13853
|
+
({ className, ...props }, ref) => {
|
|
13854
|
+
return /* @__PURE__ */ jsx(
|
|
13855
|
+
"span",
|
|
13856
|
+
{
|
|
13857
|
+
ref,
|
|
13858
|
+
className: cn(
|
|
13859
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
13860
|
+
className
|
|
13861
|
+
),
|
|
13862
|
+
...props
|
|
13863
|
+
}
|
|
13864
|
+
);
|
|
13865
|
+
}
|
|
13866
|
+
);
|
|
13867
|
+
InputGroupText.displayName = "InputGroupText";
|
|
13868
|
+
const InputGroupInput = forwardRef(
|
|
13869
|
+
({ className, ref: legacyRef, ...props }, ref) => {
|
|
13870
|
+
console.log({ legacyRef });
|
|
13871
|
+
return /* @__PURE__ */ jsx(
|
|
13872
|
+
Input,
|
|
13873
|
+
{
|
|
13874
|
+
ref,
|
|
13875
|
+
"data-slot": "input-group-control",
|
|
13876
|
+
className: cn(
|
|
13877
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
13878
|
+
className
|
|
13879
|
+
),
|
|
13880
|
+
...props
|
|
13881
|
+
}
|
|
13882
|
+
);
|
|
13883
|
+
}
|
|
13884
|
+
);
|
|
13885
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
13886
|
+
const InputGroupTextarea = forwardRef(
|
|
13887
|
+
({ className, ...props }, ref) => {
|
|
13888
|
+
return /* @__PURE__ */ jsx(
|
|
13889
|
+
Textarea,
|
|
13890
|
+
{
|
|
13891
|
+
ref,
|
|
13892
|
+
"data-slot": "input-group-control",
|
|
13893
|
+
className: cn(
|
|
13894
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
13895
|
+
className
|
|
13896
|
+
),
|
|
13897
|
+
...props
|
|
13898
|
+
}
|
|
13899
|
+
);
|
|
13900
|
+
}
|
|
13901
|
+
);
|
|
13902
|
+
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
13806
13903
|
const Spinner = forwardRef(({ className, ...props }, ref) => {
|
|
13807
13904
|
return /* @__PURE__ */ jsx(
|
|
13808
13905
|
LoaderCircle,
|
|
@@ -14490,6 +14587,7 @@ const LinkDecoratorModal = ({
|
|
|
14490
14587
|
const [isValid, setIsValid] = useState(void 0);
|
|
14491
14588
|
const [isUpdate, setIsUpdate] = useState(false);
|
|
14492
14589
|
const [isLoading, setIsLoading] = useState(false);
|
|
14590
|
+
const textInputRef = useRef(null);
|
|
14493
14591
|
const handleOpenChange = (open2) => {
|
|
14494
14592
|
onOpenChange?.(open2);
|
|
14495
14593
|
if (!open2 || !editor) return;
|
|
@@ -14532,7 +14630,11 @@ const LinkDecoratorModal = ({
|
|
|
14532
14630
|
};
|
|
14533
14631
|
const handleKeyDown = (e) => {
|
|
14534
14632
|
if (e.key === "Enter") {
|
|
14535
|
-
|
|
14633
|
+
e.preventDefault();
|
|
14634
|
+
const isTextInput = textInputRef.current === e.target;
|
|
14635
|
+
if (isTextInput || hideTextInput) return handleInsertLink(link, text2, uid ?? void 0);
|
|
14636
|
+
console.log("Enter", isTextInput);
|
|
14637
|
+
textInputRef?.current?.focus();
|
|
14536
14638
|
}
|
|
14537
14639
|
};
|
|
14538
14640
|
useEffect(() => {
|
|
@@ -14547,7 +14649,7 @@ const LinkDecoratorModal = ({
|
|
|
14547
14649
|
}, [defaultValues]);
|
|
14548
14650
|
return /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: handleOpenChange, children: [
|
|
14549
14651
|
children ? /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children }) : null,
|
|
14550
|
-
/* @__PURE__ */ jsxs(DialogContent, {
|
|
14652
|
+
/* @__PURE__ */ jsxs(DialogContent, { className: "-translate-1/2", children: [
|
|
14551
14653
|
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Add Link" }) }),
|
|
14552
14654
|
/* @__PURE__ */ jsx(FieldSet, { children: /* @__PURE__ */ jsxs(FieldGroup, { className: "gap-3", children: [
|
|
14553
14655
|
/* @__PURE__ */ jsxs(Field, { className: "gap-1.5", children: [
|
|
@@ -14562,6 +14664,7 @@ const LinkDecoratorModal = ({
|
|
|
14562
14664
|
value: link,
|
|
14563
14665
|
onChange: handleChangeLink,
|
|
14564
14666
|
onBlur: handleBlurLinkInput,
|
|
14667
|
+
onKeyDown: handleKeyDown,
|
|
14565
14668
|
placeholder: "https://x.com/shadcn"
|
|
14566
14669
|
}
|
|
14567
14670
|
),
|
|
@@ -14575,8 +14678,10 @@ const LinkDecoratorModal = ({
|
|
|
14575
14678
|
/* @__PURE__ */ jsx(
|
|
14576
14679
|
InputGroupInput,
|
|
14577
14680
|
{
|
|
14681
|
+
ref: textInputRef,
|
|
14578
14682
|
value: text2,
|
|
14579
14683
|
onChange: handleChangeText,
|
|
14684
|
+
onKeyDown: handleKeyDown,
|
|
14580
14685
|
placeholder: "Text to display"
|
|
14581
14686
|
}
|
|
14582
14687
|
),
|
|
@@ -18318,42 +18423,60 @@ function findFirstByType(node, type, options = {}) {
|
|
|
18318
18423
|
const results = findByType(node, type, { ...options, findAll: false });
|
|
18319
18424
|
return results[0] || null;
|
|
18320
18425
|
}
|
|
18321
|
-
const truncateTextWithNodes = (json, maxLength = 200
|
|
18426
|
+
const truncateTextWithNodes = (json, maxLength = 200) => {
|
|
18322
18427
|
let charCount = 0;
|
|
18323
18428
|
let result = "";
|
|
18324
18429
|
let reachedLimit = false;
|
|
18325
|
-
|
|
18326
|
-
|
|
18327
|
-
(node)
|
|
18328
|
-
|
|
18329
|
-
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18430
|
+
const cloneWithTruncation = (node) => {
|
|
18431
|
+
if (reachedLimit) return null;
|
|
18432
|
+
if (node.type === "text") {
|
|
18433
|
+
const text2 = node.text ?? "";
|
|
18434
|
+
const hasLinkMark = node.marks?.some((m) => m.type === "customLink");
|
|
18435
|
+
if (hasLinkMark) {
|
|
18436
|
+
result += text2;
|
|
18437
|
+
charCount += text2.length;
|
|
18438
|
+
return node;
|
|
18439
|
+
} else {
|
|
18440
|
+
if (charCount + text2.length <= maxLength) {
|
|
18333
18441
|
result += text2;
|
|
18334
18442
|
charCount += text2.length;
|
|
18443
|
+
return node;
|
|
18335
18444
|
} else {
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18445
|
+
const remaining = maxLength - charCount;
|
|
18446
|
+
result += text2.slice(0, remaining);
|
|
18447
|
+
charCount += remaining;
|
|
18448
|
+
reachedLimit = true;
|
|
18449
|
+
return { ...node, text: text2.slice(0, remaining) };
|
|
18450
|
+
}
|
|
18451
|
+
}
|
|
18452
|
+
} else if (node.type === "mention") {
|
|
18453
|
+
const label = node.attrs?.label ?? "";
|
|
18454
|
+
const mentionText = `${node.attrs?.mentionSuggestionChar}${label}`;
|
|
18455
|
+
result += mentionText;
|
|
18456
|
+
charCount += mentionText.length;
|
|
18457
|
+
return node;
|
|
18458
|
+
} else {
|
|
18459
|
+
const clonedNode = { type: node.type };
|
|
18460
|
+
if (node.attrs) clonedNode.attrs = node.attrs;
|
|
18461
|
+
if (node.marks) clonedNode.marks = node.marks;
|
|
18462
|
+
if (node.content) {
|
|
18463
|
+
clonedNode.content = [];
|
|
18464
|
+
for (const child of node.content) {
|
|
18465
|
+
if (reachedLimit) break;
|
|
18466
|
+
const clonedChild = cloneWithTruncation(child);
|
|
18467
|
+
if (clonedChild) {
|
|
18468
|
+
clonedNode.content.push(clonedChild);
|
|
18345
18469
|
}
|
|
18346
18470
|
}
|
|
18347
|
-
} else if (node.type === "mention") {
|
|
18348
|
-
const label = node.attrs?.label ?? "";
|
|
18349
|
-
const mentionText = `${mentionSuggestionChar}${label}`;
|
|
18350
|
-
result += mentionText;
|
|
18351
|
-
charCount += mentionText.length;
|
|
18352
18471
|
}
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18472
|
+
return clonedNode;
|
|
18473
|
+
}
|
|
18474
|
+
};
|
|
18475
|
+
const truncatedJson = cloneWithTruncation(json);
|
|
18476
|
+
return {
|
|
18477
|
+
text: result.trim(),
|
|
18478
|
+
json: truncatedJson || { type: json.type }
|
|
18479
|
+
};
|
|
18357
18480
|
};
|
|
18358
18481
|
const TOOLBAR_FEATURES = {
|
|
18359
18482
|
[EditorTypes.Text]: {
|
|
@@ -18680,6 +18803,16 @@ const Toolbar = ({
|
|
|
18680
18803
|
),
|
|
18681
18804
|
/* @__PURE__ */ jsx(VerticalSeparator, {}),
|
|
18682
18805
|
/* @__PURE__ */ jsxs("div", { className: "hidden xl:flex flex-wrap items-center gap-2", children: [
|
|
18806
|
+
/* @__PURE__ */ jsx(
|
|
18807
|
+
ToolbarButton,
|
|
18808
|
+
{
|
|
18809
|
+
icon: TextQuote,
|
|
18810
|
+
tooltip: "BlockQuote",
|
|
18811
|
+
onClick: actions?.toggleBlockquote,
|
|
18812
|
+
active: editorState?.isBlockquote,
|
|
18813
|
+
disabled: !editorState?.canBlockquote
|
|
18814
|
+
}
|
|
18815
|
+
),
|
|
18683
18816
|
/* @__PURE__ */ jsx(
|
|
18684
18817
|
ToolbarButton,
|
|
18685
18818
|
{
|
|
@@ -18762,6 +18895,16 @@ const Toolbar = ({
|
|
|
18762
18895
|
disabled: !editorState?.canStrike
|
|
18763
18896
|
}
|
|
18764
18897
|
) }),
|
|
18898
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
18899
|
+
ToolbarButton,
|
|
18900
|
+
{
|
|
18901
|
+
icon: TextQuote,
|
|
18902
|
+
tooltip: "BlockQuote",
|
|
18903
|
+
onClick: actions?.toggleBlockquote,
|
|
18904
|
+
active: editorState?.isBlockquote,
|
|
18905
|
+
disabled: !editorState?.canBlockquote
|
|
18906
|
+
}
|
|
18907
|
+
) }),
|
|
18765
18908
|
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
18766
18909
|
ToolbarButton,
|
|
18767
18910
|
{
|
|
@@ -20940,7 +21083,7 @@ const OPTION_COLORS = ["#0091d5", "#fcc600", "#ce50a0", "#139e6b"];
|
|
|
20940
21083
|
const POLL_LIMITS = {
|
|
20941
21084
|
MIN: 1,
|
|
20942
21085
|
MAX: 4,
|
|
20943
|
-
MAX_TEXT_LENGTH:
|
|
21086
|
+
MAX_TEXT_LENGTH: 40
|
|
20944
21087
|
};
|
|
20945
21088
|
const TextChoiceCard = ({ choice, index: index2, canRemove, onRemove }) => {
|
|
20946
21089
|
const backgroundColor = OPTION_COLORS[index2 % OPTION_COLORS.length];
|
|
@@ -21127,10 +21270,16 @@ const PollHeader = ({ choiceCount, remainingSlots }) => /* @__PURE__ */ jsxs("di
|
|
|
21127
21270
|
" left"
|
|
21128
21271
|
] })
|
|
21129
21272
|
] });
|
|
21130
|
-
const EmptySlot = ({
|
|
21273
|
+
const EmptySlot = ({
|
|
21274
|
+
slotNumber,
|
|
21275
|
+
disabled,
|
|
21276
|
+
onDrop,
|
|
21277
|
+
isLoading = false
|
|
21278
|
+
}) => {
|
|
21131
21279
|
const ref = useRef(null);
|
|
21132
21280
|
const [isDragging, setIsDragging] = useState(false);
|
|
21133
21281
|
const handleDragOver = (e) => {
|
|
21282
|
+
if (disabled || isLoading) return;
|
|
21134
21283
|
e.preventDefault();
|
|
21135
21284
|
e.stopPropagation();
|
|
21136
21285
|
setIsDragging(true);
|
|
@@ -21141,6 +21290,7 @@ const EmptySlot = ({ slotNumber, disabled, onDrop }) => {
|
|
|
21141
21290
|
setIsDragging(false);
|
|
21142
21291
|
};
|
|
21143
21292
|
const handleDrop = (e) => {
|
|
21293
|
+
if (disabled || isLoading) return;
|
|
21144
21294
|
e.preventDefault();
|
|
21145
21295
|
e.stopPropagation();
|
|
21146
21296
|
setIsDragging(false);
|
|
@@ -21158,6 +21308,10 @@ const EmptySlot = ({ slotNumber, disabled, onDrop }) => {
|
|
|
21158
21308
|
void onDrop(files);
|
|
21159
21309
|
e.target.value = "";
|
|
21160
21310
|
};
|
|
21311
|
+
const handleClick = () => {
|
|
21312
|
+
if (disabled || isLoading) return;
|
|
21313
|
+
ref.current?.click();
|
|
21314
|
+
};
|
|
21161
21315
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
21162
21316
|
/* @__PURE__ */ jsx(
|
|
21163
21317
|
"input",
|
|
@@ -21168,35 +21322,41 @@ const EmptySlot = ({ slotNumber, disabled, onDrop }) => {
|
|
|
21168
21322
|
multiple: true,
|
|
21169
21323
|
className: "hidden",
|
|
21170
21324
|
onChange: handleFileSelect,
|
|
21171
|
-
disabled,
|
|
21325
|
+
disabled: disabled || isLoading,
|
|
21172
21326
|
"aria-label": "Upload image or video for poll choice"
|
|
21173
21327
|
}
|
|
21174
21328
|
),
|
|
21175
|
-
/* @__PURE__ */
|
|
21329
|
+
/* @__PURE__ */ jsx(
|
|
21176
21330
|
"div",
|
|
21177
21331
|
{
|
|
21178
21332
|
onDragOver: handleDragOver,
|
|
21179
21333
|
onDragLeave: handleDragLeave,
|
|
21180
21334
|
onDrop: handleDrop,
|
|
21181
|
-
onClick:
|
|
21335
|
+
onClick: handleClick,
|
|
21182
21336
|
className: cn(
|
|
21183
|
-
"
|
|
21184
|
-
|
|
21337
|
+
"rounded-xl border-2 border-dashed min-h-16 lg:min-h-32 flex flex-col items-center justify-center text-sm lg:gap-2 transition-all duration-200",
|
|
21338
|
+
isLoading && "cursor-not-allowed opacity-75",
|
|
21339
|
+
!isLoading && !disabled && "cursor-pointer",
|
|
21340
|
+
disabled && !isLoading && "cursor-not-allowed opacity-50",
|
|
21341
|
+
isDragging && !isLoading ? "border-primary bg-primary/10 text-primary scale-[1.02] shadow-md" : isLoading ? "border-primary/50 bg-primary/5 text-primary" : "border-muted-foreground/20 text-muted-foreground/60 bg-muted/20"
|
|
21185
21342
|
),
|
|
21186
|
-
children: [
|
|
21343
|
+
children: isLoading ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
21344
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
21345
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-primary", children: "Uploading..." })
|
|
21346
|
+
] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
21187
21347
|
/* @__PURE__ */ jsx(
|
|
21188
21348
|
"div",
|
|
21189
21349
|
{
|
|
21190
21350
|
className: cn(
|
|
21191
|
-
"text-xl lg:text-2xl font-bold transition-colors",
|
|
21351
|
+
"text-xl lg:text-2xl font-bold transition-colors pointer-events-none",
|
|
21192
21352
|
isDragging ? "text-primary/50" : "text-muted-foreground/30"
|
|
21193
21353
|
),
|
|
21194
21354
|
children: slotNumber
|
|
21195
21355
|
}
|
|
21196
21356
|
),
|
|
21197
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs", children: isDragging ? "Drop here" : "Drag & Drop" }),
|
|
21198
|
-
isDragging && /* @__PURE__ */ jsx(Image$1, { className: "h-5 w-5 animate-bounce" })
|
|
21199
|
-
]
|
|
21357
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs pointer-events-none", children: isDragging ? "Drop here" : "Drag & Drop" }),
|
|
21358
|
+
isDragging && /* @__PURE__ */ jsx(Image$1, { className: "pointer-events-none h-5 w-5 animate-bounce" })
|
|
21359
|
+
] })
|
|
21200
21360
|
}
|
|
21201
21361
|
)
|
|
21202
21362
|
] });
|
|
@@ -21252,58 +21412,146 @@ const createPollMediaOption = (uploadedFile, index2, searchFrom) => {
|
|
|
21252
21412
|
option_id: v4()
|
|
21253
21413
|
};
|
|
21254
21414
|
};
|
|
21415
|
+
const isPlaceholder = (item) => {
|
|
21416
|
+
return "type" in item && item.type === "placeholder";
|
|
21417
|
+
};
|
|
21255
21418
|
const PollCreator = ({ choices, onChange }) => {
|
|
21256
21419
|
const { fileStore } = useApi();
|
|
21257
21420
|
const [textValue, setTextValue] = useState("");
|
|
21258
|
-
const
|
|
21259
|
-
const
|
|
21260
|
-
|
|
21421
|
+
const [internalChoices, setInternalChoices] = useState(choices);
|
|
21422
|
+
const isInternalUpdate = useRef(false);
|
|
21423
|
+
useEffect(() => {
|
|
21424
|
+
if (!isInternalUpdate.current) {
|
|
21425
|
+
setInternalChoices(choices);
|
|
21426
|
+
}
|
|
21427
|
+
isInternalUpdate.current = false;
|
|
21428
|
+
}, [choices]);
|
|
21429
|
+
const remainingSlots = POLL_LIMITS.MAX - internalChoices.length;
|
|
21430
|
+
const canAddMore = internalChoices.length < POLL_LIMITS.MAX;
|
|
21431
|
+
const actualChoices = internalChoices.filter((c) => !isPlaceholder(c));
|
|
21432
|
+
const canRemoveChoices = actualChoices.length > POLL_LIMITS.MIN;
|
|
21433
|
+
const syncToParent = (items) => {
|
|
21434
|
+
const actual = items.filter((c) => !isPlaceholder(c));
|
|
21435
|
+
isInternalUpdate.current = true;
|
|
21436
|
+
onChange(actual);
|
|
21437
|
+
};
|
|
21438
|
+
const updateChoices = (items) => {
|
|
21439
|
+
setInternalChoices(items);
|
|
21440
|
+
setTimeout(() => {
|
|
21441
|
+
syncToParent(items);
|
|
21442
|
+
}, 0);
|
|
21443
|
+
};
|
|
21261
21444
|
const handleAddText = () => {
|
|
21262
21445
|
if (!textValue.trim() || !canAddMore) return;
|
|
21263
|
-
const newItem = createTextOption(textValue,
|
|
21264
|
-
|
|
21446
|
+
const newItem = createTextOption(textValue, internalChoices.length);
|
|
21447
|
+
updateChoices([...internalChoices, newItem]);
|
|
21265
21448
|
setTextValue("");
|
|
21266
21449
|
};
|
|
21267
21450
|
const handleFileUpload = async (files) => {
|
|
21268
21451
|
if (!files || !canAddMore) return;
|
|
21269
21452
|
const filesArray = files.slice(0, remainingSlots);
|
|
21270
|
-
const
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21274
|
-
|
|
21275
|
-
|
|
21276
|
-
|
|
21277
|
-
|
|
21278
|
-
|
|
21279
|
-
|
|
21280
|
-
|
|
21281
|
-
|
|
21453
|
+
const startIndex = internalChoices.length;
|
|
21454
|
+
const placeholders = filesArray.map((_, i) => ({
|
|
21455
|
+
type: "placeholder",
|
|
21456
|
+
key: `placeholder-${Date.now()}-${i}`
|
|
21457
|
+
}));
|
|
21458
|
+
const withPlaceholders = [...internalChoices, ...placeholders];
|
|
21459
|
+
setInternalChoices(withPlaceholders);
|
|
21460
|
+
try {
|
|
21461
|
+
const uploadPromises = filesArray.map(async (file, index2) => {
|
|
21462
|
+
try {
|
|
21463
|
+
const result = await fileStore.uploadImage(file);
|
|
21464
|
+
return createPollMediaOption(result, startIndex + index2);
|
|
21465
|
+
} catch (error) {
|
|
21466
|
+
console.error("Upload failed for", file.name, error);
|
|
21467
|
+
return null;
|
|
21468
|
+
}
|
|
21469
|
+
});
|
|
21470
|
+
const results = await Promise.all(uploadPromises);
|
|
21471
|
+
setInternalChoices((current) => {
|
|
21472
|
+
const updated = [...current];
|
|
21473
|
+
results.forEach((result, index2) => {
|
|
21474
|
+
const placeholderIndex = startIndex + index2;
|
|
21475
|
+
if (result !== null && placeholderIndex < updated.length) {
|
|
21476
|
+
updated[placeholderIndex] = result;
|
|
21477
|
+
}
|
|
21478
|
+
});
|
|
21479
|
+
const final = updated.filter((item) => !isPlaceholder(item));
|
|
21480
|
+
setTimeout(() => {
|
|
21481
|
+
syncToParent(final);
|
|
21482
|
+
}, 0);
|
|
21483
|
+
return final;
|
|
21484
|
+
});
|
|
21485
|
+
} catch (error) {
|
|
21486
|
+
console.error("Unexpected error during file upload:", error);
|
|
21487
|
+
setInternalChoices((current) => {
|
|
21488
|
+
const withoutPlaceholders = current.filter((c) => !isPlaceholder(c));
|
|
21489
|
+
setTimeout(() => {
|
|
21490
|
+
syncToParent(withoutPlaceholders);
|
|
21491
|
+
}, 0);
|
|
21492
|
+
return withoutPlaceholders;
|
|
21493
|
+
});
|
|
21494
|
+
}
|
|
21282
21495
|
};
|
|
21283
|
-
const handleUrlUpload = (url, searchFrom) => {
|
|
21284
|
-
|
|
21285
|
-
|
|
21496
|
+
const handleUrlUpload = async (url, searchFrom) => {
|
|
21497
|
+
if (!canAddMore) return;
|
|
21498
|
+
const index2 = internalChoices.length;
|
|
21499
|
+
const placeholder = {
|
|
21500
|
+
type: "placeholder",
|
|
21501
|
+
key: `placeholder-${Date.now()}`
|
|
21502
|
+
};
|
|
21503
|
+
const withPlaceholder = [...internalChoices, placeholder];
|
|
21504
|
+
setInternalChoices(withPlaceholder);
|
|
21505
|
+
try {
|
|
21506
|
+
const result = await fileStore.uploadUrl(url);
|
|
21286
21507
|
const choice = createPollMediaOption(result, index2, searchFrom);
|
|
21287
|
-
|
|
21288
|
-
|
|
21508
|
+
setInternalChoices((current) => {
|
|
21509
|
+
const updated = [...current];
|
|
21510
|
+
if (index2 < updated.length && isPlaceholder(updated[index2])) {
|
|
21511
|
+
updated[index2] = choice;
|
|
21512
|
+
}
|
|
21513
|
+
setTimeout(() => {
|
|
21514
|
+
syncToParent(updated);
|
|
21515
|
+
}, 0);
|
|
21516
|
+
return updated;
|
|
21517
|
+
});
|
|
21518
|
+
} catch (error) {
|
|
21519
|
+
console.error("URL upload failed:", error);
|
|
21520
|
+
setInternalChoices((current) => {
|
|
21521
|
+
const withoutPlaceholder = current.filter((c) => !isPlaceholder(c));
|
|
21522
|
+
setTimeout(() => {
|
|
21523
|
+
syncToParent(withoutPlaceholder);
|
|
21524
|
+
}, 0);
|
|
21525
|
+
return withoutPlaceholder;
|
|
21526
|
+
});
|
|
21527
|
+
}
|
|
21289
21528
|
};
|
|
21290
21529
|
const handleRemove = (index2) => {
|
|
21291
21530
|
if (!canRemoveChoices) return;
|
|
21292
|
-
const updated =
|
|
21293
|
-
|
|
21531
|
+
const updated = internalChoices.filter((_, i) => i !== index2);
|
|
21532
|
+
updateChoices(updated);
|
|
21294
21533
|
};
|
|
21295
|
-
console.log({ choices });
|
|
21296
21534
|
return /* @__PURE__ */ jsxs(
|
|
21297
21535
|
"div",
|
|
21298
21536
|
{
|
|
21299
21537
|
"data-type": "poll",
|
|
21300
21538
|
className: "w-full border border-border rounded-xl bg-card shadow-sm overflow-hidden",
|
|
21301
21539
|
children: [
|
|
21302
|
-
/* @__PURE__ */ jsx(PollHeader, { choiceCount:
|
|
21540
|
+
/* @__PURE__ */ jsx(PollHeader, { choiceCount: actualChoices.length, remainingSlots }),
|
|
21303
21541
|
/* @__PURE__ */ jsxs("div", { className: "sm:p-4 p-2 space-y-6", children: [
|
|
21304
21542
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4", children: [
|
|
21305
|
-
|
|
21306
|
-
(choice, index2) =>
|
|
21543
|
+
internalChoices.map(
|
|
21544
|
+
(choice, index2) => isPlaceholder(choice) ? /* @__PURE__ */ jsx(
|
|
21545
|
+
EmptySlot,
|
|
21546
|
+
{
|
|
21547
|
+
disabled: true,
|
|
21548
|
+
isLoading: true,
|
|
21549
|
+
onDrop: async () => {
|
|
21550
|
+
},
|
|
21551
|
+
slotNumber: index2 + 1
|
|
21552
|
+
},
|
|
21553
|
+
choice.key
|
|
21554
|
+
) : isTextChoice(choice) ? /* @__PURE__ */ jsx(
|
|
21307
21555
|
TextChoiceCard,
|
|
21308
21556
|
{
|
|
21309
21557
|
choice,
|
|
@@ -21327,8 +21575,9 @@ const PollCreator = ({ choices, onChange }) => {
|
|
|
21327
21575
|
EmptySlot,
|
|
21328
21576
|
{
|
|
21329
21577
|
disabled: !canAddMore,
|
|
21578
|
+
isLoading: false,
|
|
21330
21579
|
onDrop: handleFileUpload,
|
|
21331
|
-
slotNumber:
|
|
21580
|
+
slotNumber: internalChoices.length + i + 1
|
|
21332
21581
|
},
|
|
21333
21582
|
`empty-${i}`
|
|
21334
21583
|
))
|
|
@@ -21398,7 +21647,7 @@ const Poll = Node$1.create({
|
|
|
21398
21647
|
const nodeTypeName = this.name;
|
|
21399
21648
|
return [
|
|
21400
21649
|
new Plugin({
|
|
21401
|
-
key: new PluginKey("
|
|
21650
|
+
key: new PluginKey("pollKeyHandlerPlugin"),
|
|
21402
21651
|
props: {
|
|
21403
21652
|
/**
|
|
21404
21653
|
* Prevent keyboard deletion when the poll node is selected
|
|
@@ -27529,7 +27778,7 @@ const configureMentionExtension = (api, mfs, store) => {
|
|
|
27529
27778
|
`${char}${label}`
|
|
27530
27779
|
];
|
|
27531
27780
|
}
|
|
27532
|
-
const href = char === "@" ? `/
|
|
27781
|
+
const href = char === "@" ? `/users/${id}` : `/groups/${id}`;
|
|
27533
27782
|
return [
|
|
27534
27783
|
"a",
|
|
27535
27784
|
{
|
|
@@ -28255,7 +28504,17 @@ const getLinkExtensions = ({ api, store, user }) => {
|
|
|
28255
28504
|
const getEditorProps = () => ({
|
|
28256
28505
|
attributes: {
|
|
28257
28506
|
class: cn(
|
|
28258
|
-
|
|
28507
|
+
`max-w-full prose prose-sm sm:prose-base px-4 py-2 prose-img:my-3
|
|
28508
|
+
|
|
28509
|
+
prose-blockquote:p-4 prose-blockquote:my-4 prose-blockquote:border-s-4
|
|
28510
|
+
prose-blockquote:border-gray-300 prose-blockquote:bg-gray-50
|
|
28511
|
+
prose-blockquote:dark:border-gray-500 prose-blockquote:dark:bg-gray-800
|
|
28512
|
+
|
|
28513
|
+
prose-blockquote:[&>p]:text-xl prose-blockquote:[&>p]:italic prose-blockquote:[&>p]:font-medium prose-blockquote:[&>p]:leading-relaxed prose-blockquote:[&>p]:text-gray-900 prose-blockquote:[&>p]:dark:text-white
|
|
28514
|
+
|
|
28515
|
+
|
|
28516
|
+
prose-figcaption:text-xs prose-code:text-sm
|
|
28517
|
+
prose-codeblock:text-sm prose-a:text-blue-500 focus:outline-none`
|
|
28259
28518
|
)
|
|
28260
28519
|
}
|
|
28261
28520
|
});
|
|
@@ -28271,6 +28530,7 @@ const createEditorActions = (editor) => ({
|
|
|
28271
28530
|
insertLink: (url) => editor?.chain().focus().setLink({ href: url }).run(),
|
|
28272
28531
|
toggleBulletList: () => editor?.chain().focus().toggleBulletList().run(),
|
|
28273
28532
|
toggleOrderedList: () => editor?.chain().focus().toggleOrderedList().run(),
|
|
28533
|
+
toggleBlockquote: () => editor?.chain().focus().toggleBlockquote().run(),
|
|
28274
28534
|
toggleCode: () => editor?.chain().focus().toggleCode().run(),
|
|
28275
28535
|
toggleCodeBlock: () => editor?.chain().focus().toggleCodeBlock().run(),
|
|
28276
28536
|
toggleTextAlign: (align) => editor?.chain().focus().setTextAlign(align).run(),
|
|
@@ -30096,8 +30356,9 @@ const generateHtmlPostPayload = ({
|
|
|
30096
30356
|
}) => {
|
|
30097
30357
|
const { html: html2, json } = getEditorData(editor);
|
|
30098
30358
|
const commons = getCommonPayload();
|
|
30099
|
-
|
|
30100
|
-
const
|
|
30359
|
+
const { text: body, json: truncatedJson } = truncateTextWithNodes(json, 80) ?? "";
|
|
30360
|
+
const { mentionData } = getMentionDataPayload(truncatedJson);
|
|
30361
|
+
console.log({ body, truncatedJson, mentionData });
|
|
30101
30362
|
const items = new Array(findFirstByType(json, "media")?.attrs?.payload).filter(
|
|
30102
30363
|
Boolean
|
|
30103
30364
|
);
|
|
@@ -30109,7 +30370,7 @@ const generateHtmlPostPayload = ({
|
|
|
30109
30370
|
items,
|
|
30110
30371
|
htmlBody,
|
|
30111
30372
|
sendCrossMention,
|
|
30112
|
-
mentionData
|
|
30373
|
+
mentionData
|
|
30113
30374
|
};
|
|
30114
30375
|
};
|
|
30115
30376
|
const generateMediaPostPayload = ({
|
|
@@ -30158,8 +30419,8 @@ const generatePollPostPayload = ({
|
|
|
30158
30419
|
const { items } = getPollItemsPayload(json);
|
|
30159
30420
|
const polls = items.length === 1 ? items.concat(items).map((item, index2) => ({
|
|
30160
30421
|
...item,
|
|
30161
|
-
key:
|
|
30162
|
-
option_id: index2 === 0 ? item.
|
|
30422
|
+
key: item?.key ?? v4(),
|
|
30423
|
+
option_id: index2 === 0 ? item.option_id : v4(),
|
|
30163
30424
|
option_color: OPTION_COLORS[index2 % OPTION_COLORS.length]
|
|
30164
30425
|
})) : items;
|
|
30165
30426
|
console.log({ polls });
|
|
@@ -30226,7 +30487,7 @@ const PostBuilderEditor = ({
|
|
|
30226
30487
|
/* @__PURE__ */ jsx(EditorContext.Provider, { value: providerValue, children: openModal ? /* @__PURE__ */ jsx(Dialog, { open: openModal, onOpenChange: onModalOpenChange, children: /* @__PURE__ */ jsxs(
|
|
30227
30488
|
DialogContent,
|
|
30228
30489
|
{
|
|
30229
|
-
className: "bg-transparent shadow-none border-0 p-3 lg:max-w-4xl shrink-0
|
|
30490
|
+
className: "bg-transparent shadow-none border-0 p-3 lg:max-w-4xl shrink-0 max-h-[calc(100dvh-7rem)]! flex flex-col overflow-y-auto -translate-1/2",
|
|
30230
30491
|
showCloseButton: false,
|
|
30231
30492
|
children: [
|
|
30232
30493
|
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
@@ -30249,7 +30510,7 @@ const PostBuilderEditor = ({
|
|
|
30249
30510
|
)
|
|
30250
30511
|
]
|
|
30251
30512
|
}
|
|
30252
|
-
) }) : /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col space-y-3 max-w-full max-h-[calc(100dvh-7rem)]", children: [
|
|
30513
|
+
) }) : /* @__PURE__ */ jsxs("div", { className: "prose-blockquote: flex-1 flex flex-col space-y-3 max-w-full max-h-[calc(100dvh-7rem)]", children: [
|
|
30253
30514
|
!hideGroupSelector && /* @__PURE__ */ jsx(GroupSelector, { user, store }),
|
|
30254
30515
|
/* @__PURE__ */ jsx(
|
|
30255
30516
|
PostBuilderEditorInstance,
|