@flozy/editor 5.7.6 → 5.7.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.
@@ -1258,7 +1258,7 @@ blockquote {
1258
1258
  }
1259
1259
 
1260
1260
  .dividerComponent:hover .divider-settings,
1261
- .dividerComponent:hover .element-selector {
1261
+ .dividerComponent:hover .sectionIcon button {
1262
1262
  display: block;
1263
1263
  pointer-events: auto;
1264
1264
  }
@@ -57,9 +57,9 @@ const Divider = props => {
57
57
  // : {};
58
58
  return /*#__PURE__*/_jsx("div", {
59
59
  contentEditable: false,
60
- className: "divider-settings",
60
+ className: "element-toolbar dividerIcon",
61
61
  style: {
62
- top: "-33px",
62
+ top: "3px",
63
63
  left: 0
64
64
  },
65
65
  children: /*#__PURE__*/_jsx(Tooltip, {
@@ -76,7 +76,7 @@ const Divider = props => {
76
76
  // theme?.palette?.type === "dark"
77
77
  // ? "1px solid #E4E8EB33"
78
78
  // : "none",
79
- boxShadow: "0px 0px 4px 0px #00000040",
79
+ boxShadow: "0px 0px 4px 0px #00000040 !important",
80
80
  borderRadius: "50%",
81
81
  "& svg": {
82
82
  width: '16px',
@@ -1,11 +1,3 @@
1
- export const defaultFonts = [
2
- // "EB Garamond",
3
- "Anton", "DM Serif Text", "Libre Baskerville", "Montserrat", "Open Sans", "Public Sans", "Raleway", "Space Mono", "Great Vibes", "Zeyada", "Allura", "Pinyon Script", "Dancing Script", "Gaegu", "Kite One", "Merriweather"];
4
- export const otherFonts = ["PoppinsRegular", "PoppinsBold", "Monaco", "Qwitcher Grypen", "Bulgarian Garamond", "Redacted Script", "Herr Von Muellerhoff", "Dawning of a New Day", "Coming Soon", "Engagement", "Ingrid Darling", "La Belle Aurore", "Mea Culpa", "The Girl Next Door", "Helvetica", "Georgia", "Times New Roman", "Courier New", "Impact"];
5
- export const googleFontList = ["Roboto", "Noto Sans JP", "Poppins", "Lato", "Inter", "Roboto Condensed", "Roboto Mono", "Oswald", "Noto Sans", "Nunito", "Nunito Sans", "Ubuntu", "Rubik", "Playfair Display", "Noto Sans KR", "Roboto Slab", "PT Sans", "Kanit", "Work Sans", "Lora", "DM Sans", "Mulish", "Quicksand", "Fira Sans", "Noto Sans TC", "Inconsolata", "Barlow", "Manrope", "IBM Plex Sans", "PT Serif", "Karla", "Titillium Web", "Heebo", "Noto Serif", "Nanum Gothic", "Noto Color Emoji", "Agdasima", "Bebas Neue", "Libre Franklin", "Mukta", "Outfit", "Josefin Sans", "Source Code Pro", "Jost", "Space Grotesk", "Hind Siliguri", "Arimo", "Cabin", "Barlow Condensed", "Dosis", "Fira Sans Condensed", "Bitter", "Archivo", "Figtree", "Noto Serif JP", "PT Sans Narrow", "Abel", "Noto Sans SC",
6
- // "Source Sans 3",
7
- "Hind",
8
- // "Exo 2",
9
- "Teko", "Oxygen", "Cairo", "Crimson Text", "Plus Jakarta Sans", "Overpass", "Pacifico", "Prompt", "Red Hat Display", "Varela Round", "Cormorant Garamond", "Assistant", "Comfortaa", "Lexend", "Signika Negative",
10
- // "M PLUS Rounded 1c",
11
- "Fjalla One", "Caveat", "IBM Plex Mono", "Arvo", "Lobster", "Schibsted Grotesk", "Chakra Petch", "Maven Pro", "Sora", "Kalam", "Onest", "Space Grotesk", "Outfit", 'Titillium Web', ...defaultFonts];
1
+ const otherFonts = ["PoppinsRegular", "PoppinsBold", "Qwitcher Grypen", "Bulgarian Garamond", "Redacted Script", "Herr Von Muellerhoff", "Dawning of a New Day", "Coming Soon", "Engagement", "Ingrid Darling", "La Belle Aurore", "Mea Culpa", "The Girl Next Door"];
2
+ const mostUsedGoogleFonts = ["Roboto", "Poppins", "Lato", "Inter", "Nunito", "Ubuntu", "Oswald", "Rubik", "Roboto Slab", "PT Sans", "Work Sans", "Lora", "Mulish", "DM Sans", "Fira Sans", "Quicksand", "Barlow", "Manrope", "IBM Plex Sans", "PT Serif", "Libre Franklin", "Bebas Neue", "Cabin", "Titillium Web", "Heebo", "Noto Serif", "Jost", "Source Code Pro", "Josefin Sans", "Dosis", "Fira Sans Condensed", "Archivo", "Noto Serif JP", "Crimson Text", "Cairo", "Pacifico", "Red Hat Display", "Assistant", "Comfortaa", "Lexend", "Fjalla One", "Caveat", "Arvo", "Lobster", "Schibsted Grotesk", "EB Garamond", "Sora", "Kalam", "Onest", "Space Grotesk", "Outfit", "Plus Jakarta Sans"];
3
+ export const googleFontList = [...mostUsedGoogleFonts, ...otherFonts];
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useState } from "react";
2
2
  import WebFont from "webfontloader";
3
3
  import { useEditorContext } from "../../hooks/useMouseMove";
4
- import { defaultFonts, googleFontList, otherFonts } from "./FontList";
4
+ import { googleFontList } from "./FontList";
5
5
  import CircularProgress from '@mui/material/CircularProgress';
6
6
  import Box from "@mui/material/Box";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -18,12 +18,16 @@ const FontLoader = props => {
18
18
  const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
19
19
  let currentIndex = 0;
20
20
  let retryCount = 0;
21
+ let hideLoaderOn = 30;
21
22
  function loadNextBatch() {
22
23
  if (currentIndex >= families?.length) {
23
- console.log("All fonts have been loaded");
24
+ // console.log("All fonts have been loaded");
24
25
  setLoading(false);
25
26
  return;
26
27
  }
28
+ if (currentIndex >= hideLoaderOn) {
29
+ setLoading(false);
30
+ }
27
31
  const batch = families?.slice(currentIndex, currentIndex + batchSize);
28
32
  const batchWithWeights = batch.map(font => `${font}:300,400,600,700`);
29
33
  WebFont.load({
@@ -33,7 +37,7 @@ const FontLoader = props => {
33
37
  classes: false,
34
38
  timeout: 2000,
35
39
  active: () => {
36
- console.log(`Fonts loaded successfully: ${batch}`);
40
+ // console.log(`Fonts loaded successfully: ${batch}`);
37
41
  currentIndex += batchSize;
38
42
  retryCount = 0; // Reset retry count for the next batch
39
43
  loadNextBatch();
@@ -43,7 +47,7 @@ const FontLoader = props => {
43
47
 
44
48
  if (retryCount < maxRetries) {
45
49
  retryCount++;
46
- console.log(`Retrying batch (${retryCount}/${maxRetries})...`);
50
+ // console.log(`Retrying batch (${retryCount}/${maxRetries})...`);
47
51
  // Retry loading the same batch
48
52
  loadNextBatch();
49
53
  } else {
@@ -60,16 +64,15 @@ const FontLoader = props => {
60
64
  loadNextBatch();
61
65
  };
62
66
  useEffect(() => {
63
- let families = [...otherFonts, ...defaultFonts];
67
+ let families = [...googleFontList];
64
68
  if (!readOnly) {
65
69
  otherProps?.services("listGoogleFont", []).then(data => {
66
- families = [...families, ...(data?.data || [])];
67
- const filteredfamilies = families?.filter(font => !font?.includes("Material"));
70
+ families = [...(data?.data || [])];
68
71
  setFontFamilies({
69
72
  id: 1,
70
73
  format: "fontFamily",
71
74
  type: "fontfamilydropdown",
72
- options: filteredfamilies || []
75
+ options: families || []
73
76
  });
74
77
  loadFontsInBatches(families);
75
78
  }).catch(err => {
@@ -11,6 +11,9 @@ const SectionStyle = (themeReact, theme) => ({
11
11
  "& .sectionIcon": {
12
12
  opacity: 1
13
13
  },
14
+ '& .dividerIcon': {
15
+ opacity: 1
16
+ },
14
17
  "& .sectionPopper": {
15
18
  opacity: 1
16
19
  }
@@ -52,6 +55,18 @@ const SectionStyle = (themeReact, theme) => ({
52
55
  opacity: 1
53
56
  }
54
57
  },
58
+ "& .dividerIcon": {
59
+ opacity: 0,
60
+ padding: "0px",
61
+ background: "transparent",
62
+ border: "none",
63
+ width: "20px",
64
+ height: "20px",
65
+ "& button": {
66
+ boxShadow: "none",
67
+ background: "transparent"
68
+ }
69
+ },
55
70
  "& .ed-section-inner": {
56
71
  [themeReact.breakpoints.between("xs", "md")]: {
57
72
  maxWidth: `320px !important`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.7.6",
3
+ "version": "5.7.8",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"