@flozy/editor 10.8.2 → 10.8.3

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.
@@ -1,5 +1,5 @@
1
1
  import { useSlate } from "slate-react";
2
- import { defaultTheme } from "../theme/index";
2
+ import { baseTheme } from "../theme";
3
3
  import { getPageSettings, updatePageSettings } from "../utils/pageSettings";
4
4
  import { HEADING_THEME_FIELDS, PARAGRAPH_THEME_FIELDS } from "../helper/theme";
5
5
  import { useEditorContext } from "./useMouseMove";
@@ -146,7 +146,7 @@ export const useEditorTheme = () => {
146
146
  theme
147
147
  } = pageProps || {};
148
148
  return {
149
- selectedTheme: theme?.theme || defaultTheme?.theme,
149
+ selectedTheme: theme?.theme || baseTheme?.theme,
150
150
  updateTheme: (update, actionData) => updateTheme(editor, pageSt, update, actionData, triggerRender),
151
151
  theme
152
152
  };
@@ -1,5 +1,5 @@
1
1
  import { Box, MenuItem, Select } from "@mui/material";
2
- import { defaultTheme } from ".";
2
+ import { baseTheme } from ".";
3
3
  import { useEditorTheme } from "../hooks/useEditorTheme";
4
4
  import { useEffect, useState } from "react";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -31,7 +31,7 @@ function ThemeList({
31
31
  const {
32
32
  value
33
33
  } = e.target;
34
- const selectedTheme = themes.find(t => t.id === value) || defaultTheme;
34
+ const selectedTheme = themes.find(t => t.id === value) || baseTheme;
35
35
  updateTheme(selectedTheme, "THEME_CHANGE");
36
36
  };
37
37
  return /*#__PURE__*/_jsx(Box, {
@@ -117,7 +117,7 @@ export const transformTheme = (selectedTheme = {}) => {
117
117
  ...others
118
118
  };
119
119
  };
120
- export const defaultTheme = {
120
+ export const baseTheme = {
121
121
  theme: {
122
122
  cssVars: {},
123
123
  elementProps: {
@@ -145,5 +145,5 @@ export const defaultTheme = {
145
145
  }
146
146
  };
147
147
  export function getTheme(selectedTheme) {
148
- return transformTheme(selectedTheme?.theme || defaultTheme.theme);
148
+ return transformTheme(selectedTheme?.theme || baseTheme.theme);
149
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "10.8.2",
3
+ "version": "10.8.3",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"