@mhamz.01/easyflow-texteditor 0.1.0 → 0.1.2
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/README.md +0 -0
- package/dist/index.css +2128 -22
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +71 -5
- package/dist/index.d.ts +71 -5
- package/dist/index.js +111 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -4
package/dist/index.mjs
CHANGED
|
@@ -939,6 +939,7 @@ function useEditorBridge() {
|
|
|
939
939
|
|
|
940
940
|
// src/lib/editorStorage.ts
|
|
941
941
|
var STORAGE_KEY = "tiptap-tabs-v1";
|
|
942
|
+
var ACTIVE_TAB_KEY = "tiptap-active-tab";
|
|
942
943
|
function loadTabs() {
|
|
943
944
|
if (typeof window === "undefined") return [];
|
|
944
945
|
try {
|
|
@@ -955,6 +956,14 @@ function saveTabs(tabs) {
|
|
|
955
956
|
if (typeof window === "undefined") return;
|
|
956
957
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(tabs));
|
|
957
958
|
}
|
|
959
|
+
function loadActiveTab() {
|
|
960
|
+
if (typeof window === "undefined") return "1";
|
|
961
|
+
return localStorage.getItem(ACTIVE_TAB_KEY) ?? "1";
|
|
962
|
+
}
|
|
963
|
+
function saveActiveTab(id) {
|
|
964
|
+
if (typeof window === "undefined") return;
|
|
965
|
+
localStorage.setItem(ACTIVE_TAB_KEY, id);
|
|
966
|
+
}
|
|
958
967
|
|
|
959
968
|
// src/components/editorLayout/editorLayout.tsx
|
|
960
969
|
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
@@ -7881,9 +7890,66 @@ function useScrolling(target, options = {}) {
|
|
|
7881
7890
|
}, [target, debounce2, fallbackToDocument, isScrolling]);
|
|
7882
7891
|
return isScrolling;
|
|
7883
7892
|
}
|
|
7893
|
+
|
|
7894
|
+
// src/lib/local-image.ts
|
|
7895
|
+
function fileToBase64(file) {
|
|
7896
|
+
return new Promise((resolve, reject) => {
|
|
7897
|
+
const reader = new FileReader();
|
|
7898
|
+
reader.readAsDataURL(file);
|
|
7899
|
+
reader.onload = () => resolve(reader.result);
|
|
7900
|
+
reader.onerror = (error) => reject(error);
|
|
7901
|
+
});
|
|
7902
|
+
}
|
|
7903
|
+
function saveImageBase64(key, base64) {
|
|
7904
|
+
localStorage.setItem(key, base64);
|
|
7905
|
+
}
|
|
7906
|
+
function loadImageBase64(key) {
|
|
7907
|
+
return localStorage.getItem(key);
|
|
7908
|
+
}
|
|
7884
7909
|
export {
|
|
7885
7910
|
Editor,
|
|
7886
7911
|
EditorBridgeProvider,
|
|
7912
|
+
FONT_OPTIONS,
|
|
7913
|
+
GRADIENT_ROWS_70,
|
|
7914
|
+
barlow,
|
|
7915
|
+
bebas,
|
|
7916
|
+
cabin,
|
|
7917
|
+
cn,
|
|
7918
|
+
dancing,
|
|
7919
|
+
fileToBase64,
|
|
7920
|
+
fira,
|
|
7921
|
+
inconsolata,
|
|
7922
|
+
inter,
|
|
7923
|
+
josefin,
|
|
7924
|
+
kanit,
|
|
7925
|
+
lato,
|
|
7926
|
+
librebask,
|
|
7927
|
+
loadActiveTab,
|
|
7928
|
+
loadImageBase64,
|
|
7929
|
+
loadTabs,
|
|
7930
|
+
manrope,
|
|
7931
|
+
merriweather,
|
|
7932
|
+
montserrat,
|
|
7933
|
+
mulish,
|
|
7934
|
+
notoserif,
|
|
7935
|
+
nunito,
|
|
7936
|
+
opensans,
|
|
7937
|
+
oswald,
|
|
7938
|
+
philosopher,
|
|
7939
|
+
playfair,
|
|
7940
|
+
poppins,
|
|
7941
|
+
ptsans,
|
|
7942
|
+
quicksand,
|
|
7943
|
+
raleway,
|
|
7944
|
+
roboto,
|
|
7945
|
+
rubik,
|
|
7946
|
+
saveActiveTab,
|
|
7947
|
+
saveImageBase64,
|
|
7948
|
+
saveTabs,
|
|
7949
|
+
sourceserif,
|
|
7950
|
+
spacegrotesk,
|
|
7951
|
+
teko,
|
|
7952
|
+
ubuntu,
|
|
7887
7953
|
useBodyRect,
|
|
7888
7954
|
useComposedRef,
|
|
7889
7955
|
useCursorVisibility,
|
|
@@ -7897,6 +7963,7 @@ export {
|
|
|
7897
7963
|
useThrottledCallback,
|
|
7898
7964
|
useTiptapEditor,
|
|
7899
7965
|
useUnmount,
|
|
7900
|
-
useWindowSize
|
|
7966
|
+
useWindowSize,
|
|
7967
|
+
worksans
|
|
7901
7968
|
};
|
|
7902
7969
|
//# sourceMappingURL=index.mjs.map
|