@flozy/editor 4.0.7 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +21 -25
- package/dist/Editor/CommonEditor.js +3 -0
- package/dist/Editor/Editor.css +12 -1
- package/dist/Editor/Elements/Accordion/Accordion.js +1 -1
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +21 -5
- package/dist/Editor/Elements/EmbedScript/Code.js +14 -12
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +7 -115
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +130 -0
- package/dist/Editor/Elements/Emoji/EmojiPicker.js +4 -2
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +35 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +8 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +43 -6
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +4 -0
- package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +3 -1
- package/dist/Editor/Elements/FreeGrid/styles.js +9 -0
- package/dist/Editor/Elements/List/CheckList.js +2 -1
- package/dist/Editor/Elements/Table/Table.js +1 -1
- package/dist/Editor/Elements/Table/TableCell.js +1 -1
- package/dist/Editor/Elements/Table/TableRow.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +66 -0
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -8
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -4
- package/dist/Editor/common/ColorPickerButton.js +12 -4
- package/dist/Editor/common/FontLoader/FontLoader.js +68 -0
- package/dist/Editor/common/Icon.js +4 -0
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +7 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +4 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +3 -1
- package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +4 -2
- package/dist/Editor/common/RnD/OptionsPopup/style.js +23 -4
- package/dist/Editor/common/RnD/index.js +5 -3
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -1
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +1 -0
- package/dist/Editor/common/StyleBuilder/boxStyle.js +31 -0
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +1 -0
- package/dist/Editor/common/StyleBuilder/embedScriptStyle.js +10 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +15 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +18 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +6 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +19 -3
- package/dist/Editor/common/StyleBuilder/formButtonStyle.js +1 -0
- package/dist/Editor/common/StyleBuilder/formStyle.js +1 -0
- package/dist/Editor/helper/deserialize/index.js +3 -0
- package/dist/Editor/helper/index.js +22 -0
- package/dist/Editor/helper/theme.js +2 -1
- package/dist/Editor/hooks/useMouseMove.js +4 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +4 -10
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +9 -0
- package/dist/Editor/utils/embedScript.js +20 -2
- package/dist/Editor/utils/freegrid.js +61 -95
- package/dist/Editor/utils/mentions.js +2 -0
- package/package.json +2 -1
@@ -42,100 +42,66 @@ export const insertFreeGrid = (editor, path, extProps) => {
|
|
42
42
|
children: [{
|
43
43
|
type: "paragraph",
|
44
44
|
children: [{
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
type: "alignCenter",
|
52
|
-
children: [{
|
53
|
-
type: "paragraph",
|
54
|
-
children: [{
|
55
|
-
text: "Lorem ipsum sit ",
|
56
|
-
fontSize: {
|
57
|
-
xs: "80px",
|
58
|
-
sm: "80px",
|
59
|
-
md: "80px",
|
60
|
-
lg: "80px"
|
61
|
-
},
|
62
|
-
fontFamily: "PoppinsBold",
|
63
|
-
color: "rgb(132, 141, 151)"
|
64
|
-
}]
|
65
|
-
}]
|
66
|
-
}, {
|
67
|
-
type: "alignCenter",
|
68
|
-
children: [{
|
69
|
-
type: "paragraph",
|
70
|
-
children: [{
|
71
|
-
fontSize: {
|
72
|
-
xs: "80px",
|
73
|
-
sm: "80px",
|
74
|
-
md: "80px",
|
75
|
-
lg: "80px"
|
76
|
-
},
|
77
|
-
fontFamily: "PoppinsBold",
|
78
|
-
text: "amet.",
|
79
|
-
color: "rgb(132, 141, 151)"
|
80
|
-
}, {
|
81
|
-
fontSize: {
|
82
|
-
xs: "80px",
|
83
|
-
sm: "80px",
|
84
|
-
md: "80px",
|
85
|
-
lg: "80px"
|
86
|
-
},
|
87
|
-
fontFamily: "PoppinsBold",
|
88
|
-
text: " "
|
89
|
-
}, {
|
90
|
-
fontSize: {
|
91
|
-
xs: "80px",
|
92
|
-
sm: "80px",
|
93
|
-
md: "80px",
|
94
|
-
lg: "80px"
|
95
|
-
},
|
96
|
-
fontFamily: "PoppinsBold",
|
97
|
-
text: "Lorem",
|
98
|
-
color: "rgb(131, 96, 253)"
|
99
|
-
}]
|
100
|
-
}]
|
101
|
-
}],
|
102
|
-
bgColor: "rgba(255, 255, 255, 0)",
|
103
|
-
borderColor: "rgba(204, 204, 204, 0)",
|
104
|
-
lockSpacing: true,
|
105
|
-
bannerSpacing: {
|
106
|
-
top: "16",
|
107
|
-
left: "16",
|
108
|
-
right: "16",
|
109
|
-
bottom: "16"
|
110
|
-
}
|
111
|
-
}],
|
112
|
-
alignment: {
|
113
|
-
flexDirection: "column"
|
45
|
+
text: "Lorem ipsum sit ",
|
46
|
+
fontSize: {
|
47
|
+
xs: "80px",
|
48
|
+
sm: "80px",
|
49
|
+
md: "80px",
|
50
|
+
lg: "80px"
|
114
51
|
},
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
52
|
+
fontFamily: "PoppinsBold",
|
53
|
+
color: "rgb(132, 141, 151)"
|
54
|
+
}]
|
55
|
+
}]
|
56
|
+
}, {
|
57
|
+
type: "alignCenter",
|
58
|
+
children: [{
|
59
|
+
type: "paragraph",
|
60
|
+
children: [{
|
61
|
+
fontSize: {
|
62
|
+
xs: "80px",
|
63
|
+
sm: "80px",
|
64
|
+
md: "80px",
|
65
|
+
lg: "80px"
|
66
|
+
},
|
67
|
+
fontFamily: "PoppinsBold",
|
68
|
+
text: "amet.",
|
69
|
+
color: "rgb(132, 141, 151)"
|
70
|
+
}, {
|
71
|
+
fontSize: {
|
72
|
+
xs: "80px",
|
73
|
+
sm: "80px",
|
74
|
+
md: "80px",
|
75
|
+
lg: "80px"
|
76
|
+
},
|
77
|
+
fontFamily: "PoppinsBold",
|
78
|
+
text: " "
|
79
|
+
}, {
|
80
|
+
fontSize: {
|
81
|
+
xs: "80px",
|
82
|
+
sm: "80px",
|
83
|
+
md: "80px",
|
84
|
+
lg: "80px"
|
121
85
|
},
|
122
|
-
|
86
|
+
fontFamily: "PoppinsBold",
|
87
|
+
text: "Lorem",
|
88
|
+
color: "rgb(131, 96, 253)"
|
123
89
|
}]
|
124
90
|
}]
|
125
91
|
}],
|
126
|
-
gridArea: "
|
127
|
-
height:
|
92
|
+
gridArea: "3 / 1 / 4 / 2",
|
93
|
+
height: 226,
|
128
94
|
width: 746,
|
129
|
-
left:
|
130
|
-
marginTop:
|
131
|
-
top_xs:
|
132
|
-
left_xs:
|
133
|
-
marginTop_xs:
|
95
|
+
left: 143,
|
96
|
+
marginTop: 24,
|
97
|
+
top_xs: 24,
|
98
|
+
left_xs: 24,
|
99
|
+
marginTop_xs: 12,
|
134
100
|
width_xs: 272,
|
135
|
-
height_xs:
|
136
|
-
gridArea_xs: "
|
137
|
-
updated_at:
|
138
|
-
lg_updatedOn:
|
101
|
+
height_xs: 571.9921875,
|
102
|
+
gridArea_xs: "1 / 1 / 2 / 2",
|
103
|
+
updated_at: 1729091202016,
|
104
|
+
lg_updatedOn: 1729091202016,
|
139
105
|
xs_updatedOn: null
|
140
106
|
}, {
|
141
107
|
type: "freegridItem",
|
@@ -166,23 +132,23 @@ export const insertFreeGrid = (editor, path, extProps) => {
|
|
166
132
|
textAlign: "center",
|
167
133
|
label: "Get Started"
|
168
134
|
}],
|
169
|
-
gridArea: "
|
135
|
+
gridArea: "8 / 1 / 9 / 2",
|
170
136
|
left: 428,
|
171
|
-
marginTop:
|
137
|
+
marginTop: 38,
|
172
138
|
top: 0,
|
173
139
|
width: 143,
|
174
140
|
height: 50,
|
175
|
-
lg_updatedOn:
|
176
|
-
updated_at:
|
177
|
-
top_xs:
|
141
|
+
lg_updatedOn: 1729091190567,
|
142
|
+
updated_at: 1729091202016,
|
143
|
+
top_xs: 619.9921875,
|
178
144
|
left_xs: 24,
|
179
145
|
marginTop_xs: 12,
|
180
146
|
width_xs: 272,
|
181
147
|
height_xs: 48,
|
182
|
-
gridArea_xs: "
|
148
|
+
gridArea_xs: "13 / 1 / 14 / 2"
|
183
149
|
}],
|
184
|
-
height_xs:
|
185
|
-
updated_at:
|
150
|
+
height_xs: 667.9921875,
|
151
|
+
updated_at: 1729091202016,
|
186
152
|
width: 0,
|
187
153
|
sectionBgColor: "rgb(255, 255, 255)",
|
188
154
|
xs_updatedOn: null,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { Transforms } from "slate";
|
2
|
+
import { ReactEditor } from 'slate-react';
|
2
3
|
export const insertMention = (editor, character, type) => {
|
3
4
|
if (type === "mentions") {
|
4
5
|
const mention = {
|
@@ -9,6 +10,7 @@ export const insertMention = (editor, character, type) => {
|
|
9
10
|
}]
|
10
11
|
};
|
11
12
|
Transforms.insertNodes(editor, mention);
|
13
|
+
ReactEditor.focus(editor);
|
12
14
|
Transforms.move(editor);
|
13
15
|
} else if (type === "elements" && character && character.onInsert) {
|
14
16
|
character.onInsert(editor);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flozy/editor",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "An Editor for flozy app brain",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -49,6 +49,7 @@
|
|
49
49
|
"use-debounce": "^10.0.0",
|
50
50
|
"wavesurfer.js": "^7.8.6",
|
51
51
|
"web-vitals": "^2.1.4",
|
52
|
+
"webfontloader": "^1.6.28",
|
52
53
|
"y-websocket": "^1.5.0",
|
53
54
|
"yjs": "^13.6.8"
|
54
55
|
},
|