@webiny/lexical-nodes 6.0.0-alpha.5 → 6.0.0-rc.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 (64) hide show
  1. package/FontColorNode.d.ts +3 -3
  2. package/FontColorNode.js +12 -6
  3. package/FontColorNode.js.map +1 -1
  4. package/HeadingNode.d.ts +4 -4
  5. package/HeadingNode.js +14 -11
  6. package/HeadingNode.js.map +1 -1
  7. package/ImageNode.d.ts +1 -11
  8. package/ImageNode.js +8 -34
  9. package/ImageNode.js.map +1 -1
  10. package/LinkNode.js +1 -3
  11. package/LinkNode.js.map +1 -1
  12. package/ListItemNode.js +5 -6
  13. package/ListItemNode.js.map +1 -1
  14. package/ListNode.d.ts +4 -4
  15. package/ListNode.js +14 -19
  16. package/ListNode.js.map +1 -1
  17. package/ParagraphNode.d.ts +3 -3
  18. package/ParagraphNode.js +15 -13
  19. package/ParagraphNode.js.map +1 -1
  20. package/QuoteNode.d.ts +3 -3
  21. package/QuoteNode.js +7 -11
  22. package/QuoteNode.js.map +1 -1
  23. package/README.md +9 -4
  24. package/components/ImageNode/ImageComponent.d.ts +2 -7
  25. package/components/ImageNode/ImageComponent.js +10 -84
  26. package/components/ImageNode/ImageComponent.js.map +1 -1
  27. package/components/ImageNode/ImageResizer.d.ts +1 -8
  28. package/components/ImageNode/ImageResizer.js +2 -12
  29. package/components/ImageNode/ImageResizer.js.map +1 -1
  30. package/index.d.ts +17 -17
  31. package/index.js +31 -28
  32. package/index.js.map +1 -1
  33. package/package.json +16 -20
  34. package/prepareLexicalState.js +2 -2
  35. package/prepareLexicalState.js.map +1 -1
  36. package/utils/formatList.d.ts +2 -2
  37. package/utils/formatList.js +4 -4
  38. package/utils/formatList.js.map +1 -1
  39. package/utils/formatToHeading.js +1 -1
  40. package/utils/formatToHeading.js.map +1 -1
  41. package/utils/formatToParagraph.js +1 -1
  42. package/utils/formatToParagraph.js.map +1 -1
  43. package/utils/formatToQuote.js +1 -1
  44. package/utils/formatToQuote.js.map +1 -1
  45. package/utils/getStyleId.d.ts +1 -1
  46. package/utils/getStyleId.js.map +1 -1
  47. package/utils/listNode.d.ts +2 -2
  48. package/utils/listNode.js +2 -2
  49. package/utils/listNode.js.map +1 -1
  50. package/utils/toggleLink.d.ts +1 -1
  51. package/utils/toggleLink.js +1 -1
  52. package/utils/toggleLink.js.map +1 -1
  53. package/components/ImageNode/ContentEditable.css +0 -22
  54. package/components/ImageNode/ContentEditable.d.ts +0 -12
  55. package/components/ImageNode/ContentEditable.js +0 -19
  56. package/components/ImageNode/ContentEditable.js.map +0 -1
  57. package/components/ImageNode/ImageComponent.css +0 -43
  58. package/components/ImageNode/Placeholder.css +0 -20
  59. package/components/ImageNode/Placeholder.d.ts +0 -15
  60. package/components/ImageNode/Placeholder.js +0 -24
  61. package/components/ImageNode/Placeholder.js.map +0 -1
  62. package/components/ImageNode/SharedHistoryContext.d.ts +0 -10
  63. package/components/ImageNode/SharedHistoryContext.js +0 -19
  64. package/components/ImageNode/SharedHistoryContext.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Placeholder","children","className","styles","createElement","style"],"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 type { 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":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAO,SAASC,WAAWA,CAAC;EACxBC,QAAQ;EACRC,SAAS;EACTC;AAKJ,CAAC,EAAe;EACZ,oBACIJ,KAAA,CAAAK,aAAA;IAAKC,KAAK,EAAE;MAAE,GAAGF;IAAO,CAAE;IAACD,SAAS,EAAEA,SAAS,IAAI;EAAoB,GAClED,QACA,CAAC;AAEd","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import type { HistoryState } from "@lexical/history";
3
- type ContextShape = {
4
- historyState?: HistoryState;
5
- };
6
- export declare const SharedHistoryContext: ({ children }: {
7
- children: ReactNode;
8
- }) => JSX.Element;
9
- export declare const useSharedHistoryContext: () => ContextShape;
10
- export {};
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import { createContext, useContext, useMemo } from "react";
3
- import { createEmptyHistoryState } from "@lexical/history";
4
- const Context = /*#__PURE__*/createContext({});
5
- export const SharedHistoryContext = ({
6
- children
7
- }) => {
8
- const historyContext = useMemo(() => ({
9
- historyState: createEmptyHistoryState()
10
- }), []);
11
- return /*#__PURE__*/React.createElement(Context.Provider, {
12
- value: historyContext
13
- }, children);
14
- };
15
- export const useSharedHistoryContext = () => {
16
- return useContext(Context);
17
- };
18
-
19
- //# sourceMappingURL=SharedHistoryContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","createContext","useContext","useMemo","createEmptyHistoryState","Context","SharedHistoryContext","children","historyContext","historyState","createElement","Provider","value","useSharedHistoryContext"],"sources":["SharedHistoryContext.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type { ReactNode } from \"react\";\nimport { createContext, useContext, useMemo } from \"react\";\nimport type { HistoryState } from \"@lexical/history\";\nimport { createEmptyHistoryState } 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,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAE1D,SAASC,uBAAuB,QAAQ,kBAAkB;AAM1D,MAAMC,OAAoC,gBAAGJ,aAAa,CAAC,CAAC,CAAC,CAAC;AAE9D,OAAO,MAAMK,oBAAoB,GAAGA,CAAC;EAAEC;AAAkC,CAAC,KAAkB;EACxF,MAAMC,cAAc,GAAGL,OAAO,CAAC,OAAO;IAAEM,YAAY,EAAEL,uBAAuB,CAAC;EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;EACvF,oBAAOJ,KAAA,CAAAU,aAAA,CAACL,OAAO,CAACM,QAAQ;IAACC,KAAK,EAAEJ;EAAe,GAAED,QAA2B,CAAC;AACjF,CAAC;AAED,OAAO,MAAMM,uBAAuB,GAAGA,CAAA,KAAoB;EACvD,OAAOX,UAAU,CAACG,OAAO,CAAC;AAC9B,CAAC","ignoreList":[]}