@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.
Files changed (54) hide show
  1. package/dist/Editor/ChatEditor.js +21 -25
  2. package/dist/Editor/CommonEditor.js +3 -0
  3. package/dist/Editor/Editor.css +12 -1
  4. package/dist/Editor/Elements/Accordion/Accordion.js +1 -1
  5. package/dist/Editor/Elements/Accordion/AccordionSummary.js +21 -5
  6. package/dist/Editor/Elements/EmbedScript/Code.js +14 -12
  7. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +7 -115
  8. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +130 -0
  9. package/dist/Editor/Elements/Emoji/EmojiPicker.js +4 -2
  10. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +35 -2
  11. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +8 -2
  12. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +43 -6
  13. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +4 -0
  14. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +3 -1
  15. package/dist/Editor/Elements/FreeGrid/styles.js +9 -0
  16. package/dist/Editor/Elements/List/CheckList.js +2 -1
  17. package/dist/Editor/Elements/Table/Table.js +1 -1
  18. package/dist/Editor/Elements/Table/TableCell.js +1 -1
  19. package/dist/Editor/Elements/Table/TableRow.js +2 -1
  20. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +66 -0
  21. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -8
  22. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -4
  23. package/dist/Editor/common/ColorPickerButton.js +12 -4
  24. package/dist/Editor/common/FontLoader/FontLoader.js +68 -0
  25. package/dist/Editor/common/Icon.js +4 -0
  26. package/dist/Editor/common/RnD/ElementOptions/Actions.js +7 -0
  27. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +4 -2
  28. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +47 -0
  29. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +4 -2
  30. package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +3 -1
  31. package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +4 -2
  32. package/dist/Editor/common/RnD/OptionsPopup/style.js +23 -4
  33. package/dist/Editor/common/RnD/index.js +5 -3
  34. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -1
  35. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +1 -0
  36. package/dist/Editor/common/StyleBuilder/boxStyle.js +31 -0
  37. package/dist/Editor/common/StyleBuilder/buttonStyle.js +1 -0
  38. package/dist/Editor/common/StyleBuilder/embedScriptStyle.js +10 -0
  39. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +15 -9
  40. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +18 -16
  41. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +6 -4
  42. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +19 -3
  43. package/dist/Editor/common/StyleBuilder/formButtonStyle.js +1 -0
  44. package/dist/Editor/common/StyleBuilder/formStyle.js +1 -0
  45. package/dist/Editor/helper/deserialize/index.js +3 -0
  46. package/dist/Editor/helper/index.js +22 -0
  47. package/dist/Editor/helper/theme.js +2 -1
  48. package/dist/Editor/hooks/useMouseMove.js +4 -1
  49. package/dist/Editor/utils/SlateUtilityFunctions.js +4 -10
  50. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +9 -0
  51. package/dist/Editor/utils/embedScript.js +20 -2
  52. package/dist/Editor/utils/freegrid.js +61 -95
  53. package/dist/Editor/utils/mentions.js +2 -0
  54. 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
- type: "grid",
46
- grid: "container",
47
- children: [{
48
- type: "grid-item",
49
- grid: 12,
50
- children: [{
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
- lockSpacing: false,
116
- bannerSpacing: {
117
- top: "32",
118
- left: "16",
119
- right: "16",
120
- bottom: "16"
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
- gridSize: 8
86
+ fontFamily: "PoppinsBold",
87
+ text: "Lorem",
88
+ color: "rgb(131, 96, 253)"
123
89
  }]
124
90
  }]
125
91
  }],
126
- gridArea: "1 / 1 / 2 / 2",
127
- height: 323,
92
+ gridArea: "3 / 1 / 4 / 2",
93
+ height: 226,
128
94
  width: 746,
129
- left: 127,
130
- marginTop: 25,
131
- top_xs: 105.1875,
132
- left_xs: 22,
133
- marginTop_xs: 38,
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: 163.0078125,
136
- gridArea_xs: "2 / 1 / 3 / 2",
137
- updated_at: 1729055084817,
138
- lg_updatedOn: 1729055010519,
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: "7 / 1 / 8 / 2",
135
+ gridArea: "8 / 1 / 9 / 2",
170
136
  left: 428,
171
- marginTop: 42,
137
+ marginTop: 38,
172
138
  top: 0,
173
139
  width: 143,
174
140
  height: 50,
175
- lg_updatedOn: 1729055084816,
176
- updated_at: 1729055084817,
177
- top_xs: 366,
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: "8 / 1 / 9 / 2"
148
+ gridArea_xs: "13 / 1 / 14 / 2"
183
149
  }],
184
- height_xs: 593.0625,
185
- updated_at: 1729055084816,
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.7",
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
  },