@bigbinary/neeto-editor 1.16.4 → 1.16.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +19 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-editor",
3
- "version": "1.16.4",
3
+ "version": "1.16.5",
4
4
  "main": "./index.js",
5
5
  "module": "./index.js",
6
6
  "types": "./types.d.ts",
package/types.d.ts CHANGED
@@ -69,19 +69,25 @@ interface Config {
69
69
  placeholder?: Partial<PlaceholderOptions>;
70
70
  }
71
71
 
72
+ interface tooltip {
73
+ label: string;
74
+ keys: string[];
75
+ }
76
+
72
77
  interface tooltips {
73
- [key: string]: string;
78
+ [key: string]: tooltip;
74
79
  }
75
80
 
76
81
  interface MenuProps {
77
82
  tooltips?: tooltips;
78
- editor: string;
83
+ editor: TiptapEditor | null;
79
84
  menuType?: "fixed" | "bubble" | "headless" | "none";
80
85
  defaults?: string[];
81
86
  addons?: string[];
82
87
  uploadEndpoint?: string;
83
88
  mentions?: Mention[];
84
- variables: (VariableCategory | Variable)[];
89
+ editorSecrets?: Array<{ unsplash?: string }>;
90
+ variables?: (VariableCategory | Variable)[];
85
91
  addonCommands?: Command[];
86
92
  isIndependant?: boolean;
87
93
  className?: string;
@@ -112,7 +118,7 @@ interface EditorProps {
112
118
  onFocus?: EditorFocus;
113
119
  onBlur?: EditorFocus;
114
120
  onSubmit?: (htmlContent: string) => void;
115
- variables: (VariableCategory | Variable)[];
121
+ variables?: (VariableCategory | Variable)[];
116
122
  mentions?: Mention[];
117
123
  placeholder?: string;
118
124
  extensions?: Array<Node | Extension>;
@@ -123,7 +129,7 @@ interface EditorProps {
123
129
  error?: string;
124
130
  config?: Config;
125
131
  attachments?: Array<attachment>;
126
- onChangeAttachments: (attachments: attachment[]) => void;
132
+ onChangeAttachments?: (attachments: attachment[]) => void;
127
133
  [otherProps: string]: any;
128
134
  }
129
135
 
@@ -149,10 +155,17 @@ export function Attachments(props: AttachmentsProps): JSX.Element;
149
155
  export function EditorContent(props: {
150
156
  content?: string;
151
157
  className?: string;
152
- variables: (VariableCategory | Variable)[];
158
+ variables?: (VariableCategory | Variable)[];
153
159
  [otherProps: string]: any;
154
160
  }): JSX.Element;
155
161
 
156
162
  export function Menu(props: MenuProps): JSX.Element;
157
163
 
158
164
  export function isEditorEmpty(htmlContent: string | null | undefined): boolean;
165
+
166
+ export function isEditorOverlaysActive(): boolean;
167
+
168
+ export function substituteVariables(
169
+ highlightedContent: string,
170
+ variables: (VariableCategory | Variable)[]
171
+ ): string;