@lexical/react 0.1.16 → 0.1.19
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/DEPRECATED_useLexicalAutoFormatter.dev.js +5 -729
- package/DEPRECATED_useLexicalAutoFormatter.prod.js +1 -19
- package/DEPRECATED_useLexicalCanShowPlaceholder.dev.js +1 -1
- package/DEPRECATED_useLexicalCanShowPlaceholder.prod.js +1 -1
- package/DEPRECATED_useLexicalCharacterLimit.dev.js +9 -10
- package/DEPRECATED_useLexicalCharacterLimit.prod.js +7 -7
- package/DEPRECATED_useLexicalDecorators.dev.js +1 -1
- package/DEPRECATED_useLexicalDecorators.prod.js +1 -1
- package/DEPRECATED_useLexicalEditorEvents.dev.js +1 -1
- package/DEPRECATED_useLexicalEditorEvents.prod.js +1 -1
- package/DEPRECATED_useLexicalHistory.dev.js +5 -307
- package/DEPRECATED_useLexicalHistory.prod.js +1 -7
- package/DEPRECATED_useLexicalList.dev.js +29 -25
- package/DEPRECATED_useLexicalList.prod.js +3 -1
- package/DEPRECATED_useLexicalPlainText.dev.js +8 -662
- package/DEPRECATED_useLexicalPlainText.prod.js +2 -14
- package/DEPRECATED_useLexicalRichText.dev.js +8 -747
- package/DEPRECATED_useLexicalRichText.prod.js +2 -17
- package/LICENSE +1 -1
- package/{withSubscriptions.prod.js → LexicalAutoFocusPlugin.d.ts} +3 -1
- package/{withSubscriptions.dev.js → LexicalAutoFocusPlugin.dev.js} +10 -5
- package/LexicalAutoFocusPlugin.js +9 -0
- package/{LexicalAutoFormatterPlugin.js.flow → LexicalAutoFocusPlugin.js.flow} +1 -1
- package/LexicalAutoFocusPlugin.prod.js +7 -0
- package/LexicalAutoLinkPlugin.dev.js +12 -15
- package/LexicalAutoLinkPlugin.prod.js +6 -6
- package/LexicalAutoScrollPlugin.d.ts +13 -0
- package/LexicalAutoScrollPlugin.dev.js +82 -0
- package/LexicalAutoScrollPlugin.js +9 -0
- package/{withSubscriptions.d.ts → LexicalAutoScrollPlugin.js.flow} +5 -5
- package/LexicalAutoScrollPlugin.prod.js +8 -0
- package/LexicalCharacterLimitPlugin.dev.js +9 -10
- package/LexicalCharacterLimitPlugin.prod.js +7 -7
- package/LexicalClearEditorPlugin.dev.js +15 -19
- package/LexicalClearEditorPlugin.prod.js +1 -1
- package/LexicalCollaborationPlugin.d.ts +6 -3
- package/LexicalCollaborationPlugin.dev.js +30 -41
- package/LexicalCollaborationPlugin.js.flow +7 -4
- package/LexicalCollaborationPlugin.prod.js +10 -9
- package/LexicalComposer.d.ts +2 -2
- package/LexicalComposer.dev.js +3 -19
- package/LexicalComposer.js.flow +2 -2
- package/LexicalComposer.prod.js +2 -3
- package/LexicalContentEditable.dev.js +3 -1
- package/LexicalContentEditable.prod.js +2 -2
- package/LexicalHashtagPlugin.dev.js +20 -94
- package/LexicalHashtagPlugin.prod.js +4 -7
- package/LexicalHistoryPlugin.dev.js +5 -307
- package/LexicalHistoryPlugin.prod.js +1 -7
- package/LexicalHorizontalRuleNode.d.ts +3 -1
- package/LexicalHorizontalRuleNode.dev.js +2 -0
- package/LexicalHorizontalRuleNode.js.flow +6 -2
- package/LexicalHorizontalRuleNode.prod.js +2 -2
- package/LexicalLinkPlugin.dev.js +19 -20
- package/LexicalLinkPlugin.prod.js +4 -3
- package/LexicalListPlugin.dev.js +29 -25
- package/LexicalListPlugin.prod.js +3 -2
- package/{LexicalAutoFormatterPlugin.d.ts → LexicalMarkdownShortcutPlugin.d.ts} +1 -1
- package/LexicalMarkdownShortcutPlugin.dev.js +42 -0
- package/LexicalMarkdownShortcutPlugin.js +9 -0
- package/{withSubscriptions.js.flow → LexicalMarkdownShortcutPlugin.js.flow} +1 -4
- package/LexicalMarkdownShortcutPlugin.prod.js +7 -0
- package/LexicalNestedComposer.dev.js +20 -15
- package/LexicalNestedComposer.prod.js +3 -3
- package/LexicalOnChangePlugin.dev.js +1 -1
- package/LexicalOnChangePlugin.prod.js +1 -1
- package/LexicalPlainTextPlugin.dev.js +6 -359
- package/LexicalPlainTextPlugin.prod.js +4 -11
- package/LexicalRichTextPlugin.dev.js +6 -444
- package/LexicalRichTextPlugin.prod.js +4 -12
- package/LexicalTablePlugin.dev.js +27 -30
- package/LexicalTablePlugin.prod.js +3 -3
- package/LexicalTreeView.dev.js +1 -1
- package/LexicalTreeView.prod.js +1 -1
- package/package.json +17 -14
- package/useLexicalIsTextContentEmpty.dev.js +1 -1
- package/useLexicalIsTextContentEmpty.prod.js +1 -1
- package/useLexicalNodeSelection.dev.js +1 -1
- package/useLexicalNodeSelection.prod.js +1 -1
- package/useLexicalTextEntity.d.ts +19 -0
- package/useLexicalTextEntity.dev.js +29 -0
- package/{withSubscriptions.js → useLexicalTextEntity.js} +2 -2
- package/useLexicalTextEntity.js.flow +18 -0
- package/useLexicalTextEntity.prod.js +7 -0
- package/LexicalAutoFormatterPlugin.dev.js +0 -766
- package/LexicalAutoFormatterPlugin.js +0 -9
- package/LexicalAutoFormatterPlugin.prod.js +0 -25
|
@@ -4,20 +4,5 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
g=d.get(g.anchor.key),e&&g&&!a._nodeMap.has(e.__key)&&u.$isTextNode(e)&&1===e.__text.length&&1===b.anchor.offset?2:0;e=c[0];a=a._nodeMap.get(e.__key);if(!u.$isTextNode(a)||!u.$isTextNode(e)||a.__mode!==e.__mode)return 0;a=a.__text;e=e.__text;if(a===e)return 0;b=b.anchor;g=g.anchor;if(b.key!==g.key||"text"!==b.type)return 0;b=b.offset;g=g.offset;a=e.length-a.length;return 1===a&&g===b-1?2:-1===a&&g===b+1?3:-1===a&&g===b?4:0}
|
|
10
|
-
function z(a,e){let f=Date.now(),d=0;return(c,b,g,h,k,n)=>{const t=Date.now();if(n.has("historic"))return d=0,f=t,2;const m=y(c,b,h,k,a.isComposing()),r=(()=>{const q=n.has("history-push");if(!q&&n.has("history-merge"))return 0;if(null===c)return 1;var p=b._selection;const C=c._selection;if(!(0<h.size||0<k.size))return null===C&&null!==p?0:2;p=null===g||g.editor===a;return!1===q&&0!==m&&m===d&&t<f+e&&p?0:1})();f=t;d=m;return r}}
|
|
11
|
-
function A(a,e,f=1E3){const d=v.useMemo(()=>e||{current:null,redoStack:[],undoStack:[]},[e]),c=v.useCallback(()=>{d.undoStack=[];d.redoStack=[];d.current=null},[d]);v.useEffect(()=>{const b=z(a,f);return l(a.addListener("command",g=>{switch(g){case "undo":g=d.redoStack;var h=d.undoStack;if(0!==h.length){var k=d.current;const n=h.pop();null!==k&&(g.push(k),a.execCommand("canRedo",!0));0===h.length&&a.execCommand("canUndo",!1);d.current=n;n.editor.setEditorState(n.editorState.clone(n.undoSelection),
|
|
12
|
-
{tag:"historic"})}return!0;case "redo":return g=d.redoStack,h=d.undoStack,0!==g.length&&(k=d.current,null!==k&&(h.push(k),a.execCommand("canUndo",!0)),h=g.pop(),0===g.length&&a.execCommand("canRedo",!1),d.current=h,h.editor.setEditorState(h.editorState,{tag:"historic"})),!0;case "clearEditor":return c(),!1;case "clearHistory":return c(),!0;default:return!1}},0),a.addListener("update",({editorState:g,prevEditorState:h,dirtyLeaves:k,dirtyElements:n,tags:t})=>{const m=d.current,r=d.redoStack,q=d.undoStack,
|
|
13
|
-
p=null===m?null:m.editorState;if(null===m||g!==p){k=b(h,g,m,k,n,t);if(1===k)0!==r.length&&(d.redoStack=[]),null!==m&&(q.push({...m,undoSelection:h.read(u.$getSelection)}),a.execCommand("canUndo",!0));else if(2===k)return;d.current={editor:a,editorState:g}}}))},[c,f,a,d])}function B(a,e,f=1E3){return A(a,e,f)}var D="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?v.useLayoutEffect:v.useEffect;
|
|
14
|
-
function E(a,e){F(a,e);e.update(()=>{const f=u.$getSelection();u.$isRangeSelection(f)&&f.removeText()})}function F(a,e){a.preventDefault();e.update(()=>{const f=a.clipboardData,d=u.$getSelection();if(null!==d&&null!=f){const c=w.getHtmlContent(e),b=w.$getLexicalContent(e);null!==c&&f.setData("text/html",c);null!==b&&f.setData("application/x-lexical-editor",b);f.setData("text/plain",d.getTextContent())}})}
|
|
15
|
-
function G(a,e){a.preventDefault();e.update(()=>{const f=u.$getSelection(),d=a.clipboardData;null!=d&&u.$isRangeSelection(f)&&w.$insertDataTransferForRichText(d,f,e)})}const H={tag:"history-merge"};
|
|
16
|
-
function I(a,e){if(null!==e)if(void 0===e)a.update(()=>{var f=u.$getRoot();if(null===f.getFirstChild()){const d=u.$createParagraphNode();f.append(d);f=document.activeElement;(null!==u.$getSelection()||null!==f&&f===a.getRootElement())&&d.select()}},H);else if(null!==e)switch(typeof e){case "string":e=a.parseEditorState(e);a.setEditorState(e,H);break;case "object":a.setEditorState(e,H);break;case "function":a.update(e,H)}}
|
|
17
|
-
function J(a){v.useEffect(()=>{const e=f=>{var d=a.getRootElement();if(document.activeElement===d&&(d=f.data,"string"===typeof d)){try{var c=JSON.parse(d)}catch(b){return}if(c&&"nuanria_messaging"===c.protocol&&"request"===c.type&&(c=c.payload)&&"makeChanges"===c.functionId&&(c=c.args)){const [b,g,h,k,n]=c;a.update(()=>{const t=u.$getSelection();if(u.$isRangeSelection(t)){var m=t.anchor;let r=m.getNode(),q=0,p=0;u.$isTextNode(r)&&0<=b&&0<=g&&(q=b,p=b+g,t.setTextNodeRange(r,q,r,p));if(q!==p||""!==
|
|
18
|
-
h)t.insertRawText(h),r=m.getNode();u.$isTextNode(r)&&(q=k,p=k+n,m=r.getTextContentSize(),q=q>m?m:q,p=p>m?m:p,t.setTextNodeRange(r,q,r,p));f.stopImmediatePropagation()}})}}};window.addEventListener("message",e,!0);return()=>{window.removeEventListener("message",e,!0)}},[a])}
|
|
19
|
-
function K(a,e){D(()=>{const f=a.addListener("command",(d,c)=>{var b=u.$getSelection();if("click"===d&&u.$isNodeSelection(b))return b.clear(),!0;if(!u.$isRangeSelection(b))return!1;switch(d){case "deleteCharacter":return b.deleteCharacter(c),!0;case "deleteWord":return b.deleteWord(c),!0;case "deleteLine":return b.deleteLine(c),!0;case "insertText":return"string"===typeof c?b.insertText(c):(d=c.dataTransfer,null!=d?w.$insertDataTransferForRichText(d,b,a):(c=c.data)&&b.insertText(c)),!0;case "removeText":return b.removeText(),
|
|
20
|
-
!0;case "formatText":return b.formatText(c),!0;case "formatElement":return b=b.anchor.getNode(),(u.$isElementNode(b)?b:b.getParentOrThrow()).setFormat(c),!0;case "insertLineBreak":return b.insertLineBreak(c),!0;case "insertParagraph":return b.insertParagraph(),!0;case "indentContent":return b=b.anchor,b="element"===b.type?b.getNode():b.getNode().getParentOrThrow(),b.canInsertTab()?a.execCommand("insertText","\t"):10!==b.getIndent()&&b.setIndent(b.getIndent()+1),!0;case "outdentContent":return b=b.anchor,
|
|
21
|
-
c=b.getNode(),d="element"===b.type?b.getNode():b.getNode().getParentOrThrow(),d.canInsertTab()?"\t"===c.getTextContent()[b.offset-1]&&a.execCommand("deleteCharacter",!0):0!==d.getIndent()&&d.setIndent(d.getIndent()-1),!0;case "keyArrowLeft":d=c.shiftKey;if(x.$shouldOverrideDefaultCharacterSelection(b,!0))return c.preventDefault(),x.$moveCharacter(b,d,!0),!0;break;case "keyArrowRight":d=c.shiftKey;if(x.$shouldOverrideDefaultCharacterSelection(b,!1))return c.preventDefault(),x.$moveCharacter(b,d,!1),
|
|
22
|
-
!0;break;case "keyBackspace":return c.preventDefault(),{anchor:c}=b,b.isCollapsed()&&0===c.offset&&0<("element"===c.type?c.getNode():c.getNode().getParentOrThrow()).getIndent()?a.execCommand("outdentContent"):a.execCommand("deleteCharacter",!0);case "keyDelete":return c.preventDefault(),a.execCommand("deleteCharacter",!1);case "keyEnter":return c.preventDefault(),c.shiftKey?a.execCommand("insertLineBreak"):a.execCommand("insertParagraph");case "keyTab":return c.preventDefault(),a.execCommand(c.shiftKey?
|
|
23
|
-
"outdentContent":"indentContent");case "keyEscape":return a.blur(),!0;case "copy":return F(c,a),!0;case "cut":return E(c,a),!0;case "paste":return G(c,a),!0;case "drop":case "dragstart":return c.preventDefault(),!0}return!1},0);I(a,e);return f},[a]);J(a)}module.exports=function(a,e,f){K(a,f);B(a,e)};
|
|
7
|
+
var d=require("@lexical/history"),e=require("react"),g=require("@lexical/dragon"),h=require("@lexical/rich-text"),k=require("@lexical/utils");function l(a,b,c=1E3){const f=e.useMemo(()=>b||d.createEmptyHistoryState(),[b]);e.useEffect(()=>d.registerHistory(a,f,c),[c,a,f])}function m(a,b,c=1E3){return l(a,b,c)}var n="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?e.useLayoutEffect:e.useEffect;
|
|
8
|
+
function p(a,b){n(()=>k.mergeRegister(h.registerRichText(a,b),g.registerDragonSupport(a)),[a])}module.exports=function(a,b,c){p(a,c);m(a,b)};
|
package/LICENSE
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
+
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
10
|
+
var react = require('react');
|
|
11
|
+
|
|
9
12
|
/**
|
|
10
13
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
14
|
*
|
|
@@ -14,10 +17,12 @@
|
|
|
14
17
|
*
|
|
15
18
|
*
|
|
16
19
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
function LexicalAutoFocusPlugin() {
|
|
21
|
+
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
22
|
+
react.useEffect(() => {
|
|
23
|
+
editor.focus();
|
|
24
|
+
}, [editor]);
|
|
25
|
+
return null;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
|
-
module.exports =
|
|
28
|
+
module.exports = LexicalAutoFocusPlugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
'use strict'
|
|
8
|
+
const LexicalAutoFocusPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalAutoFocusPlugin.dev.js') : require('./LexicalAutoFocusPlugin.prod.js')
|
|
9
|
+
module.exports = LexicalAutoFocusPlugin;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
var b=require("@lexical/react/LexicalComposerContext"),c=require("react");module.exports=function(){const [a]=b.useLexicalComposerContext();c.useEffect(()=>{a.focus()},[a]);return null};
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
+
var link = require('@lexical/link');
|
|
9
10
|
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
10
|
-
var
|
|
11
|
+
var utils = require('@lexical/utils');
|
|
11
12
|
var lexical = require('lexical');
|
|
12
|
-
var AutoLinkNode = require('lexical/AutoLinkNode');
|
|
13
13
|
var react = require('react');
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -59,7 +59,6 @@ function handleLinkCreation(node, matchers, onChange) {
|
|
|
59
59
|
let text = nodeText;
|
|
60
60
|
let textOffset = 0;
|
|
61
61
|
let lastNode = node;
|
|
62
|
-
let lastNodeOffset = 0;
|
|
63
62
|
let match;
|
|
64
63
|
|
|
65
64
|
while ((match = findFirstMatch(text, matchers)) && match !== null) {
|
|
@@ -92,18 +91,16 @@ function handleLinkCreation(node, matchers, onChange) {
|
|
|
92
91
|
|
|
93
92
|
if (contentBeforeMatchIsValid && contentAfterMatchIsValid) {
|
|
94
93
|
let middleNode;
|
|
95
|
-
const lastNodeMatchOffset = offset - lastNodeOffset;
|
|
96
94
|
|
|
97
|
-
if (
|
|
95
|
+
if (matchOffset === 0) {
|
|
98
96
|
[middleNode, lastNode] = lastNode.splitText(matchLength);
|
|
99
97
|
} else {
|
|
100
|
-
[, middleNode, lastNode] = lastNode.splitText(
|
|
98
|
+
[, middleNode, lastNode] = lastNode.splitText(matchOffset, matchOffset + matchLength);
|
|
101
99
|
}
|
|
102
100
|
|
|
103
|
-
const linkNode =
|
|
101
|
+
const linkNode = link.$createAutoLinkNode(match.url);
|
|
104
102
|
linkNode.append(lexical.$createTextNode(match.text));
|
|
105
103
|
middleNode.replace(linkNode);
|
|
106
|
-
lastNodeOffset = lastNodeMatchOffset + matchLength;
|
|
107
104
|
onChange(match.url, null);
|
|
108
105
|
}
|
|
109
106
|
|
|
@@ -160,12 +157,12 @@ function handleBadNeighbors(textNode, onChange) {
|
|
|
160
157
|
const nextSibling = textNode.getNextSibling();
|
|
161
158
|
const text = textNode.getTextContent();
|
|
162
159
|
|
|
163
|
-
if (
|
|
160
|
+
if (link.$isAutoLinkNode(previousSibling) && !text.startsWith(' ')) {
|
|
164
161
|
replaceWithChildren(previousSibling);
|
|
165
162
|
onChange(null, previousSibling.getURL());
|
|
166
163
|
}
|
|
167
164
|
|
|
168
|
-
if (
|
|
165
|
+
if (link.$isAutoLinkNode(nextSibling) && !text.endsWith(' ')) {
|
|
169
166
|
replaceWithChildren(nextSibling);
|
|
170
167
|
onChange(null, nextSibling.getURL());
|
|
171
168
|
}
|
|
@@ -185,7 +182,7 @@ function replaceWithChildren(node) {
|
|
|
185
182
|
|
|
186
183
|
function useAutoLink(editor, matchers, onChange) {
|
|
187
184
|
react.useEffect(() => {
|
|
188
|
-
if (!editor.hasNodes([
|
|
185
|
+
if (!editor.hasNodes([link.AutoLinkNode])) {
|
|
189
186
|
{
|
|
190
187
|
throw Error(`LexicalAutoLinkPlugin: AutoLinkNode, TableCellNode or TableRowNode not registered on editor`);
|
|
191
188
|
}
|
|
@@ -197,19 +194,19 @@ function useAutoLink(editor, matchers, onChange) {
|
|
|
197
194
|
}
|
|
198
195
|
};
|
|
199
196
|
|
|
200
|
-
return
|
|
197
|
+
return utils.mergeRegister(editor.registerNodeTransform(lexical.TextNode, textNode => {
|
|
201
198
|
const parent = textNode.getParentOrThrow();
|
|
202
199
|
|
|
203
|
-
if (
|
|
200
|
+
if (link.$isAutoLinkNode(parent)) {
|
|
204
201
|
handleLinkEdit(parent, matchers, onChangeWrapped);
|
|
205
|
-
} else {
|
|
202
|
+
} else if (!link.$isLinkNode(parent)) {
|
|
206
203
|
if (textNode.isSimpleText()) {
|
|
207
204
|
handleLinkCreation(textNode, matchers, onChangeWrapped);
|
|
208
205
|
}
|
|
209
206
|
|
|
210
207
|
handleBadNeighbors(textNode, onChangeWrapped);
|
|
211
208
|
}
|
|
212
|
-
}), editor.
|
|
209
|
+
}), editor.registerNodeTransform(link.AutoLinkNode, linkNode => {
|
|
213
210
|
handleLinkEdit(linkNode, matchers, onChangeWrapped);
|
|
214
211
|
}));
|
|
215
212
|
}, [editor, matchers, onChange]);
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
var h=require("@lexical/
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
z+
|
|
12
|
-
e=>{
|
|
7
|
+
var h=require("@lexical/link"),k=require("@lexical/react/LexicalComposerContext"),p=require("@lexical/utils"),v=require("lexical"),w=require("react");function x(a,b){for(let c=0;c<b.length;c++){const d=b[c](a);if(d)return d}return null}function y(a){a=a.getPreviousSibling();v.$isElementNode(a)&&(a=a.getLastDescendant());return null===a||v.$isLineBreakNode(a)||v.$isTextNode(a)&&a.getTextContent().endsWith(" ")}
|
|
8
|
+
function A(a){a=a.getNextSibling();v.$isElementNode(a)&&(a=a.getFirstDescendant());return null===a||v.$isLineBreakNode(a)||v.$isTextNode(a)&&a.getTextContent().startsWith(" ")}
|
|
9
|
+
function B(a,b,c){var d=a.getChildren();const e=d.length;for(let g=0;g<e;g++){const f=d[g];if(!v.$isTextNode(f)||!f.isSimpleText()){C(a);c(null,a.getURL());return}}d=a.getTextContent();b=x(d,b);null===b||b.text!==d?(C(a),c(null,a.getURL())):y(a)&&A(a)?(d=a.getURL(),null!==b&&d!==b.url&&(a.setURL(b.url),c(b.url,d))):(C(a),c(null,a.getURL()))}function C(a){const b=a.getChildren();var c=b.length;for(--c;0<=c;c--)a.insertAfter(b[c]);a.remove();return b.map(d=>d.getLatest())}
|
|
10
|
+
function D(a,b,c){w.useEffect(()=>{if(!a.hasNodes([h.AutoLinkNode]))throw Error("Minified Lexical error #53; see codes.json for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");const d=(...e)=>{c&&c(...e)};return p.mergeRegister(a.registerNodeTransform(v.TextNode,e=>{var g=e.getParentOrThrow();if(h.$isAutoLinkNode(g))B(g,b,d);else if(!h.$isLinkNode(g)){if(e.isSimpleText()){g=e.getTextContent();const E=g.length;let u=g,z=0,t=e;for(var f;(f=
|
|
11
|
+
x(u,b))&&null!==f;){var l=f.index,n=z+l;const q=f.length;var r=void 0;r=0<n?" "===g[n-1]:y(e);n=n+q<E?" "===g[n+q]:A(e);if(r&&n){var m=void 0;0===l?[m,t]=t.splitText(q):[,m,t]=t.splitText(l,l+q);r=h.$createAutoLinkNode(f.url);r.append(v.$createTextNode(f.text));m.replace(r);d(f.url,null)}l+=q;u=u.substring(l);z+=l}}f=e.getPreviousSibling();m=e.getNextSibling();e=e.getTextContent();h.$isAutoLinkNode(f)&&!e.startsWith(" ")&&(C(f),d(null,f.getURL()));h.$isAutoLinkNode(m)&&!e.endsWith(" ")&&(C(m),d(null,
|
|
12
|
+
m.getURL()))}}),a.registerNodeTransform(h.AutoLinkNode,e=>{B(e,b,d)}))},[a,b,c])}module.exports=function({matchers:a,onChange:b}){const [c]=k.useLexicalComposerContext();D(c,a,b);return null};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {$ReadOnly} from 'utility-types';
|
|
10
|
+
type Props = $ReadOnly<{
|
|
11
|
+
scrollRef: { current: HTMLElement | null };
|
|
12
|
+
}>;
|
|
13
|
+
export default function LexicalAutoScrollPlugin(props: Props): null;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
10
|
+
var lexical = require('lexical');
|
|
11
|
+
var react = require('react');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the MIT license found in the
|
|
27
|
+
* LICENSE file in the root directory of this source tree.
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
|
|
32
|
+
var useLayoutEffect = useLayoutEffectImpl;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
function LexicalAutoScrollPlugin({
|
|
43
|
+
scrollRef
|
|
44
|
+
}) {
|
|
45
|
+
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
46
|
+
useLayoutEffect(() => {
|
|
47
|
+
return editor.registerUpdateListener(({
|
|
48
|
+
tags,
|
|
49
|
+
editorState
|
|
50
|
+
}) => {
|
|
51
|
+
const scrollElement = scrollRef.current;
|
|
52
|
+
|
|
53
|
+
if (scrollElement === null || !tags.has('scroll-into-view')) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const selection = editorState.read(() => lexical.$getSelection());
|
|
58
|
+
|
|
59
|
+
if (!lexical.$isRangeSelection(selection) || !selection.isCollapsed()) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const anchorElement = editor.getElementByKey(selection.anchor.key);
|
|
64
|
+
|
|
65
|
+
if (anchorElement === null) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const scrollRect = scrollElement.getBoundingClientRect();
|
|
70
|
+
const rect = anchorElement.getBoundingClientRect();
|
|
71
|
+
|
|
72
|
+
if (rect.bottom > scrollRect.bottom) {
|
|
73
|
+
anchorElement.scrollIntoView(false);
|
|
74
|
+
} else if (rect.top < scrollRect.top) {
|
|
75
|
+
anchorElement.scrollIntoView();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}, [editor, scrollRef]);
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = LexicalAutoScrollPlugin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
'use strict'
|
|
8
|
+
const LexicalAutoScrollPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalAutoScrollPlugin.dev.js') : require('./LexicalAutoScrollPlugin.prod.js')
|
|
9
|
+
module.exports = LexicalAutoScrollPlugin;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
+
* @flow strict
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
): () => void;
|
|
9
|
+
type Props = $ReadOnly<{
|
|
10
|
+
scrollRef: {current: HTMLElement | null},
|
|
11
|
+
}>;
|
|
12
|
+
declare export default function LexicalAutoScrollPlugin(props: Props): React$Node;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
var e=require("@lexical/react/LexicalComposerContext"),f=require("lexical"),h=require("react"),k="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?h.useLayoutEffect:h.useEffect;
|
|
8
|
+
module.exports=function({scrollRef:g}){const [d]=e.useLexicalComposerContext();k(()=>d.registerUpdateListener(({tags:a,editorState:c})=>{var b=g.current;null!==b&&a.has("scroll-into-view")&&(a=c.read(()=>f.$getSelection()),f.$isRangeSelection(a)&&a.isCollapsed()&&(a=d.getElementByKey(a.anchor.key),null!==a&&(b=b.getBoundingClientRect(),c=a.getBoundingClientRect(),c.bottom>b.bottom?a.scrollIntoView(!1):c.top<b.top&&a.scrollIntoView())))}),[d,g]);return null};
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
|
|
10
10
|
var React = require('react');
|
|
11
|
-
var
|
|
11
|
+
var overflow = require('@lexical/overflow');
|
|
12
12
|
var text = require('@lexical/text');
|
|
13
13
|
var utils = require('@lexical/utils');
|
|
14
14
|
var lexical = require('lexical');
|
|
15
|
-
var OverflowNode = require('lexical/OverflowNode');
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -29,7 +28,7 @@ function useCharacterLimit(editor, maxCharacters, optional = Object.freeze({}))
|
|
|
29
28
|
remainingCharacters = characters => {}
|
|
30
29
|
} = optional;
|
|
31
30
|
React.useEffect(() => {
|
|
32
|
-
if (!editor.hasNodes([
|
|
31
|
+
if (!editor.hasNodes([overflow.OverflowNode])) {
|
|
33
32
|
{
|
|
34
33
|
throw Error(`useCharacterLimit: OverflowNode not registered on editor`);
|
|
35
34
|
}
|
|
@@ -38,9 +37,9 @@ function useCharacterLimit(editor, maxCharacters, optional = Object.freeze({}))
|
|
|
38
37
|
React.useEffect(() => {
|
|
39
38
|
let text$1 = editor.getEditorState().read(text.$rootTextContentCurry);
|
|
40
39
|
let lastComputedTextLength = 0;
|
|
41
|
-
return
|
|
40
|
+
return utils.mergeRegister(editor.registerTextContentListener(currentText => {
|
|
42
41
|
text$1 = currentText;
|
|
43
|
-
}), editor.
|
|
42
|
+
}), editor.registerUpdateListener(({
|
|
44
43
|
dirtyLeaves
|
|
45
44
|
}) => {
|
|
46
45
|
const isComposing = editor.isComposing();
|
|
@@ -76,7 +75,7 @@ function findOffset(text, maxCharacters, strlen) {
|
|
|
76
75
|
|
|
77
76
|
if (typeof Segmenter === 'function') {
|
|
78
77
|
const segmenter = new Segmenter();
|
|
79
|
-
const graphemes = segmenter.segment(text);
|
|
78
|
+
const graphemes = segmenter.segment(text);
|
|
80
79
|
|
|
81
80
|
for (const {
|
|
82
81
|
segment: grapheme
|
|
@@ -120,7 +119,7 @@ function $wrapOverflowedNodes(offset) {
|
|
|
120
119
|
node
|
|
121
120
|
} = dfsNodes[i];
|
|
122
121
|
|
|
123
|
-
if (
|
|
122
|
+
if (overflow.$isOverflowNode(node)) {
|
|
124
123
|
const previousLength = accumulatedLength;
|
|
125
124
|
const nextLength = accumulatedLength + node.getTextContentSize();
|
|
126
125
|
|
|
@@ -157,7 +156,7 @@ function $wrapOverflowedNodes(offset) {
|
|
|
157
156
|
const previousAccumulatedLength = accumulatedLength;
|
|
158
157
|
accumulatedLength += node.getTextContentSize();
|
|
159
158
|
|
|
160
|
-
if (accumulatedLength > offset && !
|
|
159
|
+
if (accumulatedLength > offset && !overflow.$isOverflowNode(node.getParent())) {
|
|
161
160
|
const previousSelection = lexical.$getSelection();
|
|
162
161
|
let overflowNode; // For simple text we can improve the limit accuracy by splitting the TextNode
|
|
163
162
|
// on the split point
|
|
@@ -180,7 +179,7 @@ function $wrapOverflowedNodes(offset) {
|
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
function $wrapNode(node) {
|
|
183
|
-
const overflowNode =
|
|
182
|
+
const overflowNode = overflow.$createOverflowNode();
|
|
184
183
|
node.insertBefore(overflowNode);
|
|
185
184
|
overflowNode.append(node);
|
|
186
185
|
return overflowNode;
|
|
@@ -201,7 +200,7 @@ function $unwrapNode(node) {
|
|
|
201
200
|
function mergePrevious(overflowNode) {
|
|
202
201
|
const previousNode = overflowNode.getPreviousSibling();
|
|
203
202
|
|
|
204
|
-
if (!
|
|
203
|
+
if (!overflow.$isOverflowNode(previousNode)) {
|
|
205
204
|
return;
|
|
206
205
|
}
|
|
207
206
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
var m=require("@lexical/react/LexicalComposerContext"),u=require("react"),v=require("@lexical/
|
|
8
|
-
function
|
|
9
|
-
p=0<p.size;if(!w&&p){w=g(d);p=w>c||null!==e&&e>c;q(c-w);if(null===e||p){const r=
|
|
10
|
-
r&&(h=a.getFirstDescendant(),k=null!==h?h.getTextContentSize():0,f+=k,h=C.$isTextNode(h)&&h.isSimpleText(),f=f<=r,(h||f)&&
|
|
11
|
-
h;l++)k.insertBefore(t[l]);l=C.$getSelection();if(C.$isRangeSelection(l)){k=l.anchor;t=k.getNode();l=l.focus;const
|
|
12
|
-
function
|
|
13
|
-
module.exports=function({charset:b="UTF-16"}){const [c]=m.useLexicalComposerContext(),[n,g]=u.useState(0),q=u.useMemo(()=>({remainingCharacters:g,strlen:d=>{if("UTF-8"===b){if(void 0===window.TextEncoder)var e=null;else null===
|
|
7
|
+
var m=require("@lexical/react/LexicalComposerContext"),u=require("react"),v=require("@lexical/overflow"),z=require("@lexical/text"),A=require("@lexical/utils"),C=require("lexical");
|
|
8
|
+
function D(b,c,n=Object.freeze({})){const {strlen:g=d=>d.length,remainingCharacters:q=()=>{}}=n;u.useEffect(()=>{if(!b.hasNodes([v.OverflowNode]))throw Error("Minified Lexical error #58; see codes.json for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");},[b]);u.useEffect(()=>{let d=b.getEditorState().read(z.$rootTextContentCurry),e=0;return A.mergeRegister(b.registerTextContentListener(p=>{d=p}),b.registerUpdateListener(({dirtyLeaves:p})=>
|
|
9
|
+
{var w=b.isComposing();p=0<p.size;if(!w&&p){w=g(d);p=w>c||null!==e&&e>c;q(c-w);if(null===e||p){const r=F(d,c,g);b.update(()=>{const B=A.$dfs(),J=B.length;let x=0;for(let y=0;y<J;y+=1){var {node:a}=B[y];if(v.$isOverflowNode(a)){var f=x;if(x+a.getTextContentSize()<=r){var h=a.getParent();f=a.getPreviousSibling();var k=a.getNextSibling();G(a);a=C.$getSelection();!C.$isRangeSelection(a)||a.anchor.getNode().isAttached()&&a.focus.getNode().isAttached()||(C.$isTextNode(f)?f.select():C.$isTextNode(k)?k.select():
|
|
10
|
+
null!==h&&h.select())}else f<r&&(h=a.getFirstDescendant(),k=null!==h?h.getTextContentSize():0,f+=k,h=C.$isTextNode(h)&&h.isSimpleText(),f=f<=r,(h||f)&&G(a))}else if(C.$isLeafNode(a)&&(f=x,x+=a.getTextContentSize(),x>r&&!v.$isOverflowNode(a.getParent())&&(h=C.$getSelection(),f<r&&C.$isTextNode(a)&&a.isSimpleText()?([,a]=a.splitText(r-f),a=H(a)):a=H(a),null!==h&&C.$setSelection(h),f=a.getPreviousSibling(),v.$isOverflowNode(f)))){k=a.getFirstChild();var t=f.getChildren();h=t.length;if(null===k)a.append(...t);
|
|
11
|
+
else for(var l=0;l<h;l++)k.insertBefore(t[l]);l=C.$getSelection();if(C.$isRangeSelection(l)){k=l.anchor;t=k.getNode();l=l.focus;const E=k.getNode();t.is(f)?k.set(a.getKey(),k.offset,"element"):t.is(a)&&k.set(a.getKey(),h+k.offset,"element");E.is(f)?l.set(a.getKey(),l.offset,"element"):E.is(a)&&l.set(a.getKey(),h+l.offset,"element")}f.remove()}}},{tag:"history-merge"})}e=w}}))},[b,c,q,g])}
|
|
12
|
+
function F(b,c,n){var g=Intl.Segmenter;let q=0;var d=0;if("function"===typeof g){b=(new g).segment(b);for(var {segment:e}of b){d+=n(e);if(d>c)break;q+=e.length}}else for(e=Array.from(b),b=e.length,g=0;g<b;g++){const p=e[g];d+=n(p);if(d>c)break;q+=p.length}return q}function H(b){const c=v.$createOverflowNode();b.insertBefore(c);c.append(b);return c}function G(b){const c=b.getChildren(),n=c.length;for(let g=0;g<n;g++)b.insertBefore(c[g]);b.remove();return 0<n?c[n-1]:null}let I=null;
|
|
13
|
+
module.exports=function({charset:b="UTF-16"}){const [c]=m.useLexicalComposerContext(),[n,g]=u.useState(0),q=u.useMemo(()=>({remainingCharacters:g,strlen:d=>{if("UTF-8"===b){if(void 0===window.TextEncoder)var e=null;else null===I&&(I=new window.TextEncoder),e=I;null===e?(e=encodeURIComponent(d).match(/%[89ABab]/g),d=d.length+(e?e.length:0)):d=e.encode(d).length;return d}if("UTF-16"===b)return d.length;throw Error("Unrecognized charset");}}),[b]);D(c,5,q);return u.createElement("span",{className:`characters-limit ${0>
|
|
14
14
|
n?"characters-limit-exceeded":""}`},n)};
|
|
@@ -44,27 +44,23 @@ function LexicalClearEditorPlugin({
|
|
|
44
44
|
}) {
|
|
45
45
|
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
46
46
|
useLayoutEffect(() => {
|
|
47
|
-
return editor.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
root.append(paragraph);
|
|
47
|
+
return editor.registerCommand(lexical.CLEAR_EDITOR_COMMAND, payload => {
|
|
48
|
+
editor.update(() => {
|
|
49
|
+
if (onClear == null) {
|
|
50
|
+
const root = lexical.$getRoot();
|
|
51
|
+
const selection = lexical.$getSelection();
|
|
52
|
+
const paragraph = lexical.$createParagraphNode();
|
|
53
|
+
root.clear();
|
|
54
|
+
root.append(paragraph);
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
onClear();
|
|
56
|
+
if (selection !== null) {
|
|
57
|
+
paragraph.select();
|
|
62
58
|
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return
|
|
59
|
+
} else {
|
|
60
|
+
onClear();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return true;
|
|
68
64
|
}, 0);
|
|
69
65
|
}, [editor, onClear]);
|
|
70
66
|
return null;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
var a=require("@lexical/react/LexicalComposerContext"),d=require("lexical"),g=require("react"),h="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?g.useLayoutEffect:g.useEffect;
|
|
8
|
-
module.exports=function({onClear:b}){const [c]=a.useLexicalComposerContext();h(()=>c.
|
|
8
|
+
module.exports=function({onClear:b}){const [c]=a.useLexicalComposerContext();h(()=>c.registerCommand(d.CLEAR_EDITOR_COMMAND,()=>{c.update(()=>{if(null==b){const e=d.$getRoot(),k=d.$getSelection(),f=d.$createParagraphNode();e.clear();e.append(f);null!==k&&f.select()}else b()});return!0},0),[c,b]);return null};
|
|
@@ -29,12 +29,12 @@ export interface Provider {
|
|
|
29
29
|
on(type: 'status', cb: (arg0: {status: string}) => void): void;
|
|
30
30
|
// $FlowFixMe: temp
|
|
31
31
|
on(type: 'update', cb: (arg0: any) => void): void;
|
|
32
|
-
on(type: 'reload', cb: (doc: Doc) => boolean): void;
|
|
32
|
+
on(type: 'reload', cb: (doc: Doc) => boolean): void;
|
|
33
33
|
off(type: 'sync', cb: (isSynced: boolean) => void): void;
|
|
34
34
|
// $FlowFixMe: temp
|
|
35
35
|
off(type: 'update', cb: (arg0: any) => void): void;
|
|
36
36
|
off(type: 'status', cb: (arg0: {status: string}) => void): void;
|
|
37
|
-
off(type: 'reload', cb: (doc: Doc) => boolean): void;
|
|
37
|
+
off(type: 'reload', cb: (doc: Doc) => boolean): void;
|
|
38
38
|
}
|
|
39
39
|
type CollaborationContextType = {
|
|
40
40
|
clientID: number;
|
|
@@ -42,7 +42,10 @@ type CollaborationContextType = {
|
|
|
42
42
|
name: string;
|
|
43
43
|
yjsDocMap: Map<string, Doc>;
|
|
44
44
|
};
|
|
45
|
-
export type ProviderFactory = (
|
|
45
|
+
export type ProviderFactory = (
|
|
46
|
+
id: string,
|
|
47
|
+
yjsDocMap: Map<string, Doc>,
|
|
48
|
+
) => Provider;
|
|
46
49
|
export function CollaborationPlugin(arg0: {
|
|
47
50
|
id: string;
|
|
48
51
|
providerFactory: ProviderFactory;
|