@webiny/lexical-nodes 5.38.0-beta.0

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 (72) hide show
  1. package/FontColorNode.d.ts +43 -0
  2. package/FontColorNode.js +125 -0
  3. package/FontColorNode.js.map +1 -0
  4. package/HeadingNode.d.ts +32 -0
  5. package/HeadingNode.js +193 -0
  6. package/HeadingNode.js.map +1 -0
  7. package/ImageNode.d.ts +58 -0
  8. package/ImageNode.js +217 -0
  9. package/ImageNode.js.map +1 -0
  10. package/LICENSE +21 -0
  11. package/LinkNode.d.ts +106 -0
  12. package/LinkNode.js +531 -0
  13. package/LinkNode.js.map +1 -0
  14. package/ListItemNode.d.ts +44 -0
  15. package/ListItemNode.js +442 -0
  16. package/ListItemNode.js.map +1 -0
  17. package/ListNode.d.ts +42 -0
  18. package/ListNode.js +290 -0
  19. package/ListNode.js.map +1 -0
  20. package/ParagraphNode.d.ts +31 -0
  21. package/ParagraphNode.js +220 -0
  22. package/ParagraphNode.js.map +1 -0
  23. package/QuoteNode.d.ts +33 -0
  24. package/QuoteNode.js +227 -0
  25. package/QuoteNode.js.map +1 -0
  26. package/README.md +6 -0
  27. package/TypographyNode.d.ts +41 -0
  28. package/TypographyNode.js +153 -0
  29. package/TypographyNode.js.map +1 -0
  30. package/components/ImageNode/ContentEditable.css +22 -0
  31. package/components/ImageNode/ContentEditable.d.ts +12 -0
  32. package/components/ImageNode/ContentEditable.js +26 -0
  33. package/components/ImageNode/ContentEditable.js.map +1 -0
  34. package/components/ImageNode/ImageComponent.css +43 -0
  35. package/components/ImageNode/ImageComponent.d.ts +16 -0
  36. package/components/ImageNode/ImageComponent.js +254 -0
  37. package/components/ImageNode/ImageComponent.js.map +1 -0
  38. package/components/ImageNode/ImageResizer.d.ts +26 -0
  39. package/components/ImageNode/ImageResizer.js +215 -0
  40. package/components/ImageNode/ImageResizer.js.map +1 -0
  41. package/components/ImageNode/Placeholder.css +20 -0
  42. package/components/ImageNode/Placeholder.d.ts +15 -0
  43. package/components/ImageNode/Placeholder.js +30 -0
  44. package/components/ImageNode/Placeholder.js.map +1 -0
  45. package/components/ImageNode/SharedHistoryContext.d.ts +11 -0
  46. package/components/ImageNode/SharedHistoryContext.js +28 -0
  47. package/components/ImageNode/SharedHistoryContext.js.map +1 -0
  48. package/index.d.ts +22 -0
  49. package/index.js +226 -0
  50. package/index.js.map +1 -0
  51. package/package.json +32 -0
  52. package/types.d.ts +15 -0
  53. package/types.js +7 -0
  54. package/types.js.map +1 -0
  55. package/utils/clearNodeFormating.d.ts +2 -0
  56. package/utils/clearNodeFormating.js +30 -0
  57. package/utils/clearNodeFormating.js.map +1 -0
  58. package/utils/formatList.d.ts +19 -0
  59. package/utils/formatList.js +449 -0
  60. package/utils/formatList.js.map +1 -0
  61. package/utils/formatToHeading.d.ts +3 -0
  62. package/utils/formatToHeading.js +27 -0
  63. package/utils/formatToHeading.js.map +1 -0
  64. package/utils/formatToParagraph.d.ts +2 -0
  65. package/utils/formatToParagraph.js +22 -0
  66. package/utils/formatToParagraph.js.map +1 -0
  67. package/utils/formatToQuote.d.ts +2 -0
  68. package/utils/formatToQuote.js +27 -0
  69. package/utils/formatToQuote.js.map +1 -0
  70. package/utils/listNode.d.ts +11 -0
  71. package/utils/listNode.js +109 -0
  72. package/utils/listNode.js.map +1 -0
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Placeholder = Placeholder;
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
+ require("./Placeholder.css");
11
+ var React = _interopRequireWildcard(require("react"));
12
+ /**
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ *
18
+ */
19
+
20
+ function Placeholder(_ref) {
21
+ var children = _ref.children,
22
+ className = _ref.className,
23
+ styles = _ref.styles;
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ style: (0, _objectSpread2.default)({}, styles),
26
+ className: className || "Placeholder__root"
27
+ }, children);
28
+ }
29
+
30
+ //# sourceMappingURL=Placeholder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["require","React","_interopRequireWildcard","Placeholder","_ref","children","className","styles","createElement","style","_objectSpread2","default"],"sources":["Placeholder.tsx"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport \"./Placeholder.css\";\n\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\n\nexport function Placeholder({\n children,\n className,\n styles\n}: {\n children: ReactNode;\n className?: string;\n styles?: React.CSSProperties;\n}): JSX.Element {\n return (\n <div style={{ ...styles }} className={className || \"Placeholder__root\"}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAQAA,OAAA;AAEA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAVA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOO,SAASG,WAAWA,CAAAC,IAAA,EAQX;EAAA,IAPZC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,MAAM,GAAAH,IAAA,CAANG,MAAM;EAMN,oBACIN,KAAA,CAAAO,aAAA;IAAKC,KAAK,MAAAC,cAAA,CAAAC,OAAA,MAAOJ,MAAM,CAAG;IAACD,SAAS,EAAEA,SAAS,IAAI;EAAoB,GAClED,QACA,CAAC;AAEd"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="web" />
2
+ import { ReactNode } from "react";
3
+ import { HistoryState } from "@lexical/history";
4
+ declare type ContextShape = {
5
+ historyState?: HistoryState;
6
+ };
7
+ export declare const SharedHistoryContext: ({ children }: {
8
+ children: ReactNode;
9
+ }) => JSX.Element;
10
+ export declare const useSharedHistoryContext: () => ContextShape;
11
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useSharedHistoryContext = exports.SharedHistoryContext = void 0;
8
+ var React = _interopRequireWildcard(require("react"));
9
+ var _history = require("@lexical/history");
10
+ var Context = /*#__PURE__*/(0, React.createContext)({});
11
+ var SharedHistoryContext = function SharedHistoryContext(_ref) {
12
+ var children = _ref.children;
13
+ var historyContext = (0, React.useMemo)(function () {
14
+ return {
15
+ historyState: (0, _history.createEmptyHistoryState)()
16
+ };
17
+ }, []);
18
+ return /*#__PURE__*/React.createElement(Context.Provider, {
19
+ value: historyContext
20
+ }, children);
21
+ };
22
+ exports.SharedHistoryContext = SharedHistoryContext;
23
+ var useSharedHistoryContext = function useSharedHistoryContext() {
24
+ return (0, React.useContext)(Context);
25
+ };
26
+ exports.useSharedHistoryContext = useSharedHistoryContext;
27
+
28
+ //# sourceMappingURL=SharedHistoryContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_history","Context","createContext","SharedHistoryContext","_ref","children","historyContext","useMemo","historyState","createEmptyHistoryState","createElement","Provider","value","exports","useSharedHistoryContext","useContext"],"sources":["SharedHistoryContext.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { createContext, ReactNode, useContext, useMemo } from \"react\";\nimport { createEmptyHistoryState, HistoryState } from \"@lexical/history\";\n\ntype ContextShape = {\n historyState?: HistoryState;\n};\n\nconst Context: React.Context<ContextShape> = createContext({});\n\nexport const SharedHistoryContext = ({ children }: { children: ReactNode }): JSX.Element => {\n const historyContext = useMemo(() => ({ historyState: createEmptyHistoryState() }), []);\n return <Context.Provider value={historyContext}>{children}</Context.Provider>;\n};\n\nexport const useSharedHistoryContext = (): ContextShape => {\n return useContext(Context);\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAME,OAAoC,gBAAG,IAAAC,mBAAa,EAAC,CAAC,CAAC,CAAC;AAEvD,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,EAA2D;EAAA,IAArDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAC3C,IAAMC,cAAc,GAAG,IAAAC,aAAO,EAAC;IAAA,OAAO;MAAEC,YAAY,EAAE,IAAAC,gCAAuB,EAAC;IAAE,CAAC;EAAA,CAAC,EAAE,EAAE,CAAC;EACvF,oBAAOZ,KAAA,CAAAa,aAAA,CAACT,OAAO,CAACU,QAAQ;IAACC,KAAK,EAAEN;EAAe,GAAED,QAA2B,CAAC;AACjF,CAAC;AAACQ,OAAA,CAAAV,oBAAA,GAAAA,oBAAA;AAEK,IAAMW,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAA,EAAuB;EACvD,OAAO,IAAAC,gBAAU,EAACd,OAAO,CAAC;AAC9B,CAAC;AAACY,OAAA,CAAAC,uBAAA,GAAAA,uBAAA"}
package/index.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { Klass, LexicalNode } from "lexical";
2
+ export * from "./FontColorNode";
3
+ export * from "./TypographyNode";
4
+ export * from "./ListNode";
5
+ export * from "./ListItemNode";
6
+ export * from "./HeadingNode";
7
+ export * from "./ParagraphNode";
8
+ export * from "./QuoteNode";
9
+ export * from "./ImageNode";
10
+ export * from "./LinkNode";
11
+ export * from "./utils/formatList";
12
+ export * from "./utils/listNode";
13
+ export * from "./utils/formatToQuote";
14
+ export * from "./utils/formatToHeading";
15
+ export * from "./utils/formatToParagraph";
16
+ export * from "./utils/clearNodeFormating";
17
+ export declare const allNodes: ReadonlyArray<Klass<LexicalNode> | {
18
+ replace: Klass<LexicalNode>;
19
+ with: <T extends {
20
+ new (...args: any): any;
21
+ }>(node: InstanceType<T>) => LexicalNode;
22
+ }>;
package/index.js ADDED
@@ -0,0 +1,226 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ allNodes: true
8
+ };
9
+ exports.allNodes = void 0;
10
+ var _lexical = require("lexical");
11
+ var _code = require("@lexical/code");
12
+ var _hashtag = require("@lexical/hashtag");
13
+ var _mark = require("@lexical/mark");
14
+ var _richText = require("@lexical/rich-text");
15
+ var _overflow = require("@lexical/overflow");
16
+ var _LinkNode = require("./LinkNode");
17
+ Object.keys(_LinkNode).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
20
+ if (key in exports && exports[key] === _LinkNode[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _LinkNode[key];
25
+ }
26
+ });
27
+ });
28
+ var _FontColorNode = require("./FontColorNode");
29
+ Object.keys(_FontColorNode).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
32
+ if (key in exports && exports[key] === _FontColorNode[key]) return;
33
+ Object.defineProperty(exports, key, {
34
+ enumerable: true,
35
+ get: function get() {
36
+ return _FontColorNode[key];
37
+ }
38
+ });
39
+ });
40
+ var _TypographyNode = require("./TypographyNode");
41
+ Object.keys(_TypographyNode).forEach(function (key) {
42
+ if (key === "default" || key === "__esModule") return;
43
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
44
+ if (key in exports && exports[key] === _TypographyNode[key]) return;
45
+ Object.defineProperty(exports, key, {
46
+ enumerable: true,
47
+ get: function get() {
48
+ return _TypographyNode[key];
49
+ }
50
+ });
51
+ });
52
+ var _ListNode = require("./ListNode");
53
+ Object.keys(_ListNode).forEach(function (key) {
54
+ if (key === "default" || key === "__esModule") return;
55
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
56
+ if (key in exports && exports[key] === _ListNode[key]) return;
57
+ Object.defineProperty(exports, key, {
58
+ enumerable: true,
59
+ get: function get() {
60
+ return _ListNode[key];
61
+ }
62
+ });
63
+ });
64
+ var _ListItemNode = require("./ListItemNode");
65
+ Object.keys(_ListItemNode).forEach(function (key) {
66
+ if (key === "default" || key === "__esModule") return;
67
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
68
+ if (key in exports && exports[key] === _ListItemNode[key]) return;
69
+ Object.defineProperty(exports, key, {
70
+ enumerable: true,
71
+ get: function get() {
72
+ return _ListItemNode[key];
73
+ }
74
+ });
75
+ });
76
+ var _HeadingNode = require("./HeadingNode");
77
+ Object.keys(_HeadingNode).forEach(function (key) {
78
+ if (key === "default" || key === "__esModule") return;
79
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
80
+ if (key in exports && exports[key] === _HeadingNode[key]) return;
81
+ Object.defineProperty(exports, key, {
82
+ enumerable: true,
83
+ get: function get() {
84
+ return _HeadingNode[key];
85
+ }
86
+ });
87
+ });
88
+ var _ParagraphNode = require("./ParagraphNode");
89
+ Object.keys(_ParagraphNode).forEach(function (key) {
90
+ if (key === "default" || key === "__esModule") return;
91
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
92
+ if (key in exports && exports[key] === _ParagraphNode[key]) return;
93
+ Object.defineProperty(exports, key, {
94
+ enumerable: true,
95
+ get: function get() {
96
+ return _ParagraphNode[key];
97
+ }
98
+ });
99
+ });
100
+ var _QuoteNode = require("./QuoteNode");
101
+ Object.keys(_QuoteNode).forEach(function (key) {
102
+ if (key === "default" || key === "__esModule") return;
103
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
104
+ if (key in exports && exports[key] === _QuoteNode[key]) return;
105
+ Object.defineProperty(exports, key, {
106
+ enumerable: true,
107
+ get: function get() {
108
+ return _QuoteNode[key];
109
+ }
110
+ });
111
+ });
112
+ var _ImageNode = require("./ImageNode");
113
+ Object.keys(_ImageNode).forEach(function (key) {
114
+ if (key === "default" || key === "__esModule") return;
115
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
116
+ if (key in exports && exports[key] === _ImageNode[key]) return;
117
+ Object.defineProperty(exports, key, {
118
+ enumerable: true,
119
+ get: function get() {
120
+ return _ImageNode[key];
121
+ }
122
+ });
123
+ });
124
+ var _formatList = require("./utils/formatList");
125
+ Object.keys(_formatList).forEach(function (key) {
126
+ if (key === "default" || key === "__esModule") return;
127
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
128
+ if (key in exports && exports[key] === _formatList[key]) return;
129
+ Object.defineProperty(exports, key, {
130
+ enumerable: true,
131
+ get: function get() {
132
+ return _formatList[key];
133
+ }
134
+ });
135
+ });
136
+ var _listNode = require("./utils/listNode");
137
+ Object.keys(_listNode).forEach(function (key) {
138
+ if (key === "default" || key === "__esModule") return;
139
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
140
+ if (key in exports && exports[key] === _listNode[key]) return;
141
+ Object.defineProperty(exports, key, {
142
+ enumerable: true,
143
+ get: function get() {
144
+ return _listNode[key];
145
+ }
146
+ });
147
+ });
148
+ var _formatToQuote = require("./utils/formatToQuote");
149
+ Object.keys(_formatToQuote).forEach(function (key) {
150
+ if (key === "default" || key === "__esModule") return;
151
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
152
+ if (key in exports && exports[key] === _formatToQuote[key]) return;
153
+ Object.defineProperty(exports, key, {
154
+ enumerable: true,
155
+ get: function get() {
156
+ return _formatToQuote[key];
157
+ }
158
+ });
159
+ });
160
+ var _formatToHeading = require("./utils/formatToHeading");
161
+ Object.keys(_formatToHeading).forEach(function (key) {
162
+ if (key === "default" || key === "__esModule") return;
163
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
164
+ if (key in exports && exports[key] === _formatToHeading[key]) return;
165
+ Object.defineProperty(exports, key, {
166
+ enumerable: true,
167
+ get: function get() {
168
+ return _formatToHeading[key];
169
+ }
170
+ });
171
+ });
172
+ var _formatToParagraph = require("./utils/formatToParagraph");
173
+ Object.keys(_formatToParagraph).forEach(function (key) {
174
+ if (key === "default" || key === "__esModule") return;
175
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
176
+ if (key in exports && exports[key] === _formatToParagraph[key]) return;
177
+ Object.defineProperty(exports, key, {
178
+ enumerable: true,
179
+ get: function get() {
180
+ return _formatToParagraph[key];
181
+ }
182
+ });
183
+ });
184
+ var _clearNodeFormating = require("./utils/clearNodeFormating");
185
+ Object.keys(_clearNodeFormating).forEach(function (key) {
186
+ if (key === "default" || key === "__esModule") return;
187
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
188
+ if (key in exports && exports[key] === _clearNodeFormating[key]) return;
189
+ Object.defineProperty(exports, key, {
190
+ enumerable: true,
191
+ get: function get() {
192
+ return _clearNodeFormating[key];
193
+ }
194
+ });
195
+ });
196
+ // This is a list of all the nodes that our Lexical implementation supports OOTB.
197
+ var allNodes = [
198
+ // These nodes are copy-pasted from Lexical and modified to fit our needs.
199
+ // https://github.com/facebook/lexical/tree/main/packages/lexical-playground/src/nodes
200
+ // https://github.com/facebook/lexical/tree/main/packages
201
+ _ImageNode.ImageNode, _ListNode.ListNode, _ListItemNode.ListItemNode,
202
+ // These nodes are directly imported from Lexical.
203
+ _code.CodeNode, _hashtag.HashtagNode, _code.CodeHighlightNode, _LinkNode.AutoLinkNode, _overflow.OverflowNode, _mark.MarkNode,
204
+ // Our custom nodes.
205
+ _FontColorNode.FontColorNode, _TypographyNode.TypographyNode,
206
+ // The following code replaces the built-in Lexical nodes with our custom ones.
207
+ // https://lexical.dev/docs/concepts/node-replacement
208
+ _ParagraphNode.ParagraphNode, {
209
+ replace: _lexical.ParagraphNode,
210
+ with: function _with() {
211
+ return new _ParagraphNode.ParagraphNode();
212
+ }
213
+ }, _HeadingNode.HeadingNode, {
214
+ replace: _richText.HeadingNode,
215
+ with: function _with(node) {
216
+ return new _HeadingNode.HeadingNode(node.getTag());
217
+ }
218
+ }, _QuoteNode.QuoteNode, {
219
+ replace: _richText.QuoteNode,
220
+ with: function _with() {
221
+ return new _QuoteNode.QuoteNode();
222
+ }
223
+ }, _LinkNode.LinkNode];
224
+ exports.allNodes = allNodes;
225
+
226
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_lexical","require","_code","_hashtag","_mark","_richText","_overflow","_LinkNode","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_FontColorNode","_TypographyNode","_ListNode","_ListItemNode","_HeadingNode","_ParagraphNode","_QuoteNode","_ImageNode","_formatList","_listNode","_formatToQuote","_formatToHeading","_formatToParagraph","_clearNodeFormating","allNodes","ImageNode","ListNode","ListItemNode","CodeNode","HashtagNode","CodeHighlightNode","AutoLinkNode","OverflowNode","MarkNode","FontColorNode","TypographyNode","ParagraphNode","replace","BaseParagraphNode","with","_with","HeadingNode","BaseHeadingNode","node","getTag","QuoteNode","BaseQuoteNode","LinkNode"],"sources":["index.ts"],"sourcesContent":["import type { Klass, LexicalNode } from \"lexical\";\nimport { ParagraphNode as BaseParagraphNode } from \"lexical\";\nimport { CodeHighlightNode, CodeNode } from \"@lexical/code\";\nimport { HashtagNode } from \"@lexical/hashtag\";\nimport { MarkNode } from \"@lexical/mark\";\nimport { HeadingNode as BaseHeadingNode, QuoteNode as BaseQuoteNode } from \"@lexical/rich-text\";\nimport { OverflowNode } from \"@lexical/overflow\";\n\nimport { AutoLinkNode, LinkNode } from \"./LinkNode\";\nimport { FontColorNode } from \"./FontColorNode\";\nimport { TypographyNode } from \"./TypographyNode\";\nimport { ListNode } from \"./ListNode\";\nimport { ListItemNode } from \"./ListItemNode\";\nimport { HeadingNode } from \"./HeadingNode\";\nimport { ParagraphNode } from \"./ParagraphNode\";\nimport { QuoteNode } from \"./QuoteNode\";\nimport { ImageNode } from \"./ImageNode\";\n\nexport * from \"./FontColorNode\";\nexport * from \"./TypographyNode\";\nexport * from \"./ListNode\";\nexport * from \"./ListItemNode\";\nexport * from \"./HeadingNode\";\nexport * from \"./ParagraphNode\";\nexport * from \"./QuoteNode\";\nexport * from \"./ImageNode\";\nexport * from \"./LinkNode\";\n\nexport * from \"./utils/formatList\";\nexport * from \"./utils/listNode\";\nexport * from \"./utils/formatToQuote\";\nexport * from \"./utils/formatToHeading\";\nexport * from \"./utils/formatToParagraph\";\nexport * from \"./utils/clearNodeFormating\";\n\n// This is a list of all the nodes that our Lexical implementation supports OOTB.\nexport const allNodes: ReadonlyArray<\n | Klass<LexicalNode>\n | {\n replace: Klass<LexicalNode>;\n with: <T extends { new (...args: any): any }>(node: InstanceType<T>) => LexicalNode;\n }\n> = [\n // These nodes are copy-pasted from Lexical and modified to fit our needs.\n // https://github.com/facebook/lexical/tree/main/packages/lexical-playground/src/nodes\n // https://github.com/facebook/lexical/tree/main/packages\n ImageNode,\n ListNode,\n ListItemNode,\n\n // These nodes are directly imported from Lexical.\n CodeNode,\n HashtagNode,\n CodeHighlightNode,\n AutoLinkNode,\n OverflowNode,\n MarkNode,\n\n // Our custom nodes.\n FontColorNode,\n TypographyNode,\n\n // The following code replaces the built-in Lexical nodes with our custom ones.\n // https://lexical.dev/docs/concepts/node-replacement\n ParagraphNode,\n {\n replace: BaseParagraphNode,\n with: () => {\n return new ParagraphNode();\n }\n },\n HeadingNode,\n {\n replace: BaseHeadingNode,\n with: (node: BaseHeadingNode) => {\n return new HeadingNode(node.getTag());\n }\n },\n QuoteNode,\n {\n replace: BaseQuoteNode,\n with: () => {\n return new QuoteNode();\n }\n },\n LinkNode\n];\n"],"mappings":";;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SA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AO,EAAES,mBAAa;EACtBP,IAAI,EAAE,SAAAC,MAAA,EAAM;IACR,OAAO,IAAIK,oBAAS,CAAC,CAAC;EAC1B;AACJ,CAAC,EACDE,kBAAQ,CACX;AAACzC,OAAA,CAAAkB,QAAA,GAAAA,QAAA"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@webiny/lexical-nodes",
3
+ "version": "5.38.0-beta.0",
4
+ "dependencies": {
5
+ "@lexical/code": "0.12.2",
6
+ "@lexical/hashtag": "0.12.2",
7
+ "@lexical/history": "0.12.2",
8
+ "@lexical/list": "0.12.2",
9
+ "@lexical/mark": "0.12.2",
10
+ "@lexical/overflow": "0.12.2",
11
+ "@lexical/react": "0.12.2",
12
+ "@lexical/rich-text": "0.12.2",
13
+ "@lexical/selection": "0.12.2",
14
+ "@lexical/utils": "0.12.2",
15
+ "@webiny/lexical-theme": "5.38.0-beta.0",
16
+ "lexical": "0.12.2"
17
+ },
18
+ "devDependencies": {
19
+ "@webiny/cli": "5.38.0-beta.0",
20
+ "@webiny/project-utils": "5.38.0-beta.0",
21
+ "react": "17.0.2"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "directory": "dist"
26
+ },
27
+ "scripts": {
28
+ "build": "yarn webiny run build",
29
+ "watch": "yarn webiny run watch"
30
+ },
31
+ "gitHead": "5746389d4988626b50e2523ccfa0a9a5e398e0ed"
32
+ }
package/types.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export declare type ThemeStyleType = "typography" | "colors" | "fonts";
2
+ export interface ThemeStyleValue {
3
+ styleId: string;
4
+ type: ThemeStyleType;
5
+ }
6
+ export interface TextNodeThemeStyles {
7
+ getThemeStyles: () => ThemeStyleValue[];
8
+ setThemeStyles: (styles: ThemeStyleValue[]) => void;
9
+ }
10
+ export interface TypographyStylesNode {
11
+ setTypography: (typographyStyleId: string) => void;
12
+ getTypographyStyleId: () => string | undefined;
13
+ clearTypographyStyle: () => void;
14
+ hasTypographyStyle: () => boolean;
15
+ }
package/types.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type ThemeStyleType = \"typography\" | \"colors\" | \"fonts\";\n\nexport interface ThemeStyleValue {\n styleId: string;\n type: ThemeStyleType;\n}\n\nexport interface TextNodeThemeStyles {\n getThemeStyles: () => ThemeStyleValue[];\n setThemeStyles: (styles: ThemeStyleValue[]) => void;\n}\n\n/*\n * Indicates that the node is implementing the typography styles\n */\nexport interface TypographyStylesNode {\n setTypography: (typographyStyleId: string) => void;\n getTypographyStyleId: () => string | undefined;\n clearTypographyStyle: () => void;\n hasTypographyStyle: () => boolean;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { GridSelection, LexicalEditor, NodeSelection, RangeSelection } from "lexical";
2
+ export declare const clearNodeFormatting: (activeEditor: LexicalEditor, selection: RangeSelection | NodeSelection | GridSelection | null) => void;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.clearNodeFormatting = void 0;
7
+ var _lexical = require("lexical");
8
+ var _selection = require("@lexical/selection");
9
+ var _utils = require("@lexical/utils");
10
+ var _LexicalDecoratorBlockNode = require("@lexical/react/LexicalDecoratorBlockNode");
11
+ var clearNodeFormatting = function clearNodeFormatting(activeEditor, selection) {
12
+ activeEditor.update(function () {
13
+ if ((0, _lexical.$isRangeSelection)(selection)) {
14
+ (0, _selection.$selectAll)(selection);
15
+ selection.getNodes().forEach(function (node) {
16
+ if ((0, _lexical.$isTextNode)(node)) {
17
+ node.setFormat(0);
18
+ node.setStyle("");
19
+ (0, _utils.$getNearestBlockElementAncestorOrThrow)(node).setFormat("");
20
+ }
21
+ if ((0, _LexicalDecoratorBlockNode.$isDecoratorBlockNode)(node)) {
22
+ node.setFormat("");
23
+ }
24
+ });
25
+ }
26
+ });
27
+ };
28
+ exports.clearNodeFormatting = clearNodeFormatting;
29
+
30
+ //# sourceMappingURL=clearNodeFormating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_lexical","require","_selection","_utils","_LexicalDecoratorBlockNode","clearNodeFormatting","activeEditor","selection","update","$isRangeSelection","$selectAll","getNodes","forEach","node","$isTextNode","setFormat","setStyle","$getNearestBlockElementAncestorOrThrow","$isDecoratorBlockNode","exports"],"sources":["clearNodeFormating.ts"],"sourcesContent":["import {\n $isRangeSelection,\n $isTextNode,\n GridSelection,\n LexicalEditor,\n NodeSelection,\n RangeSelection\n} from \"lexical\";\nimport { $selectAll } from \"@lexical/selection\";\nimport { $getNearestBlockElementAncestorOrThrow } from \"@lexical/utils\";\nimport { $isDecoratorBlockNode } from \"@lexical/react/LexicalDecoratorBlockNode\";\n\nexport const clearNodeFormatting = (\n activeEditor: LexicalEditor,\n selection: RangeSelection | NodeSelection | GridSelection | null\n) => {\n activeEditor.update(() => {\n if ($isRangeSelection(selection)) {\n $selectAll(selection);\n selection.getNodes().forEach(node => {\n if ($isTextNode(node)) {\n node.setFormat(0);\n node.setStyle(\"\");\n $getNearestBlockElementAncestorOrThrow(node).setFormat(\"\");\n }\n if ($isDecoratorBlockNode(node)) {\n node.setFormat(\"\");\n }\n });\n }\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAQA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AAEO,IAAMI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAC5BC,YAA2B,EAC3BC,SAAgE,EAC/D;EACDD,YAAY,CAACE,MAAM,CAAC,YAAM;IACtB,IAAI,IAAAC,0BAAiB,EAACF,SAAS,CAAC,EAAE;MAC9B,IAAAG,qBAAU,EAACH,SAAS,CAAC;MACrBA,SAAS,CAACI,QAAQ,CAAC,CAAC,CAACC,OAAO,CAAC,UAAAC,IAAI,EAAI;QACjC,IAAI,IAAAC,oBAAW,EAACD,IAAI,CAAC,EAAE;UACnBA,IAAI,CAACE,SAAS,CAAC,CAAC,CAAC;UACjBF,IAAI,CAACG,QAAQ,CAAC,EAAE,CAAC;UACjB,IAAAC,6CAAsC,EAACJ,IAAI,CAAC,CAACE,SAAS,CAAC,EAAE,CAAC;QAC9D;QACA,IAAI,IAAAG,gDAAqB,EAACL,IAAI,CAAC,EAAE;UAC7BA,IAAI,CAACE,SAAS,CAAC,EAAE,CAAC;QACtB;MACJ,CAAC,CAAC;IACN;EACJ,CAAC,CAAC;AACN,CAAC;AAACI,OAAA,CAAAd,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,19 @@
1
+ import { LexicalEditor, LexicalNode } from "lexical";
2
+ import { ListNode } from "../ListNode";
3
+ import { ListItemNode } from "../ListItemNode";
4
+ import { ListType } from "@lexical/list";
5
+ export declare function insertList(editor: LexicalEditor, listType: ListType, styleId?: string): void;
6
+ /**
7
+ * A recursive function that goes through each list and their children, including nested lists,
8
+ * appending list2 children after list1 children and updating ListItemNode values.
9
+ * @param list1 - The first list to be merged.
10
+ * @param list2 - The second list to be merged.
11
+ */
12
+ export declare function mergeLists(list1: ListNode, list2: ListNode): void;
13
+ export declare function removeList(editor: LexicalEditor): void;
14
+ export declare function updateChildrenListItemValue(list: ListNode, children?: Array<LexicalNode>): void;
15
+ export declare function $handleIndent(WebinyListItemNodes: Array<ListItemNode>): void;
16
+ export declare function $handleOutdent(WebinyListItemNodes: Array<ListItemNode>): void;
17
+ export declare function indentList(): void;
18
+ export declare function outdentList(): void;
19
+ export declare function $handleListInsertParagraph(): boolean;