@mhamz.01/easyflow-texteditor 0.1.33 → 0.1.36

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/dist/index.d.mts CHANGED
@@ -25,13 +25,27 @@ interface EditorChangePayload {
25
25
  source: EditorChangeSource;
26
26
  }
27
27
 
28
+ type TabContent$1 = any | null;
29
+ interface EditorSubTab {
30
+ id: string;
31
+ title: string;
32
+ content: TabContent$1;
33
+ }
34
+ interface EditorTab {
35
+ id: string;
36
+ title: string;
37
+ content: TabContent$1;
38
+ subtabs: EditorSubTab[];
39
+ }
40
+
28
41
  interface EditorProps {
29
42
  onChange?: (payload: EditorChangePayload) => void;
43
+ initialTabs?: EditorTab[];
30
44
  onTabsChange?: (tabs: any[]) => void;
31
45
  className?: string;
32
46
  style?: React.CSSProperties;
33
47
  }
34
- declare function Editor({ onChange, className, style, onTabsChange }: EditorProps): react_jsx_runtime.JSX.Element;
48
+ declare function Editor({ onChange, className, style, onTabsChange, initialTabs }: EditorProps): react_jsx_runtime.JSX.Element;
35
49
 
36
50
  type UserRef<T> = ((instance: T | null) => void) | React.RefObject<T | null> | null | undefined;
37
51
  declare const useComposedRef: <T extends HTMLElement>(libRef: React.RefObject<T | null>, userRef: UserRef<T>) => (instance: T | null) => void;
@@ -252,19 +266,6 @@ declare function useEditorBridge(): EditorBridgeValue;
252
266
 
253
267
  declare const GRADIENT_ROWS_70: string[];
254
268
 
255
- type TabContent$1 = any | null;
256
- interface EditorSubTab {
257
- id: string;
258
- title: string;
259
- content: TabContent$1;
260
- }
261
- interface EditorTab {
262
- id: string;
263
- title: string;
264
- content: TabContent$1;
265
- subtabs: EditorSubTab[];
266
- }
267
-
268
269
  type TabContent = any;
269
270
  declare function loadTabs(): EditorTab[];
270
271
  declare function saveTabs(tabs: EditorTab[]): void;
package/dist/index.d.ts CHANGED
@@ -25,13 +25,27 @@ interface EditorChangePayload {
25
25
  source: EditorChangeSource;
26
26
  }
27
27
 
28
+ type TabContent$1 = any | null;
29
+ interface EditorSubTab {
30
+ id: string;
31
+ title: string;
32
+ content: TabContent$1;
33
+ }
34
+ interface EditorTab {
35
+ id: string;
36
+ title: string;
37
+ content: TabContent$1;
38
+ subtabs: EditorSubTab[];
39
+ }
40
+
28
41
  interface EditorProps {
29
42
  onChange?: (payload: EditorChangePayload) => void;
43
+ initialTabs?: EditorTab[];
30
44
  onTabsChange?: (tabs: any[]) => void;
31
45
  className?: string;
32
46
  style?: React.CSSProperties;
33
47
  }
34
- declare function Editor({ onChange, className, style, onTabsChange }: EditorProps): react_jsx_runtime.JSX.Element;
48
+ declare function Editor({ onChange, className, style, onTabsChange, initialTabs }: EditorProps): react_jsx_runtime.JSX.Element;
35
49
 
36
50
  type UserRef<T> = ((instance: T | null) => void) | React.RefObject<T | null> | null | undefined;
37
51
  declare const useComposedRef: <T extends HTMLElement>(libRef: React.RefObject<T | null>, userRef: UserRef<T>) => (instance: T | null) => void;
@@ -252,19 +266,6 @@ declare function useEditorBridge(): EditorBridgeValue;
252
266
 
253
267
  declare const GRADIENT_ROWS_70: string[];
254
268
 
255
- type TabContent$1 = any | null;
256
- interface EditorSubTab {
257
- id: string;
258
- title: string;
259
- content: TabContent$1;
260
- }
261
- interface EditorTab {
262
- id: string;
263
- title: string;
264
- content: TabContent$1;
265
- subtabs: EditorSubTab[];
266
- }
267
-
268
269
  type TabContent = any;
269
270
  declare function loadTabs(): EditorTab[];
270
271
  declare function saveTabs(tabs: EditorTab[]): void;
package/dist/index.js CHANGED
@@ -7752,8 +7752,8 @@ function SimpleEditor() {
7752
7752
 
7753
7753
  // src/components/editor/editor.tsx
7754
7754
  var import_jsx_runtime77 = require("react/jsx-runtime");
7755
- function Editor({ onChange, className, style, onTabsChange }) {
7756
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EditorShell, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EditorLayout, { onChange, onTabsChange, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SimpleEditor, {}) }) }) });
7755
+ function Editor({ onChange, className, style, onTabsChange, initialTabs }) {
7756
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EditorShell, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(EditorLayout, { onChange, initialTabs, onTabsChange, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SimpleEditor, {}) }) }) });
7757
7757
  }
7758
7758
 
7759
7759
  // src/hooks/use-scrolling.ts