@frontify/fondue 12.0.0-beta.10 → 12.0.0-beta.12

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 (41) hide show
  1. package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js +8 -9
  2. package/dist/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.es.js.map +1 -1
  3. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +7 -5
  4. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
  5. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.d.ts +3 -3
  6. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +1678 -23
  7. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +1 -1
  8. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/index.d.ts +0 -1
  9. package/dist/components/RichTextEditor/Plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -1
  10. package/dist/components/RichTextEditor/Plugins/LinkPlugin/index.es.js +16 -10
  11. package/dist/components/RichTextEditor/Plugins/LinkPlugin/index.es.js.map +1 -1
  12. package/dist/components/RichTextEditor/Plugins/MentionPlugin/MentionMarkupElement/MentionMarkupElementNode.es.js +1 -1
  13. package/dist/components/RichTextEditor/Plugins/MentionPlugin/MentionMarkupElement/MentionMarkupElementNode.es.js.map +1 -1
  14. package/dist/components/RichTextEditor/Plugins/MentionPlugin/createMentionPlugin.es.js.map +1 -1
  15. package/dist/components/RichTextEditor/Plugins/MentionPlugin/index.d.ts +2 -0
  16. package/dist/components/RichTextEditor/Plugins/MentionPlugin/index.es.js.map +1 -1
  17. package/dist/components/RichTextEditor/Plugins/MentionPlugin/types.d.ts +3 -8
  18. package/dist/components/RichTextEditor/Plugins/MentionPlugin/types.es.js +1 -1
  19. package/dist/components/RichTextEditor/Plugins/MentionPlugin/types.es.js.map +1 -1
  20. package/dist/components/RichTextEditor/RichTextEditor.es.js +33 -33
  21. package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
  22. package/dist/components/RichTextEditor/context/RichTextEditorContext.d.ts +1 -1
  23. package/dist/components/RichTextEditor/context/RichTextEditorContext.es.js +16 -15
  24. package/dist/components/RichTextEditor/context/RichTextEditorContext.es.js.map +1 -1
  25. package/dist/components/Tree/Node.es.js +1795 -127
  26. package/dist/components/Tree/Node.es.js.map +1 -1
  27. package/dist/components/Tree/Tree.d.ts +2 -1
  28. package/dist/components/Tree/Tree.es.js.map +1 -1
  29. package/dist/components/Tree/utils/mocks.es.js +5 -4
  30. package/dist/components/Tree/utils/mocks.es.js.map +1 -1
  31. package/dist/index.cjs.js +4 -4
  32. package/dist/index.cjs.js.map +1 -1
  33. package/dist/index.es.js +3332 -3330
  34. package/dist/index.es.js.map +1 -1
  35. package/dist/index.umd.js +4 -4
  36. package/dist/index.umd.js.map +1 -1
  37. package/dist/styles.css +1 -1
  38. package/package.json +1 -1
  39. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.d.ts +0 -2
  40. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +0 -36
  41. package/dist/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +0 -1
@@ -1,13 +1,12 @@
1
- import { withPlateEventProvider as u, useEventPlateId as c, usePlateEditorState as i, someNode as m, ToolbarButton as f, unwrapList as p, getPreventDefaultHandler as P, toggleNodeType as E } from "@udecode/plate";
2
- import T from "react";
3
- const g = u(({ id: t, type: n, inactiveType: s, active: o, ...l }) => {
4
- t = c(t);
5
- const e = i(t), r = o != null ? o : !!(e != null && e.selection) && m(e, { match: { type: n } });
6
- return /* @__PURE__ */ T.createElement(f, {
7
- active: r,
1
+ import { withPlateEventProvider as i, usePlateEditorState as u, useEventPlateId as c, someNode as m, ToolbarButton as d, unwrapList as f, getPreventDefaultHandler as p, toggleNodeType as P } from "@udecode/plate";
2
+ import E from "react";
3
+ const g = i(({ id: r, type: o, inactiveType: s, active: t, ...l }) => {
4
+ const e = u(c(r)), n = t != null ? t : !!(e != null && e.selection) && m(e, { match: { type: o } });
5
+ return /* @__PURE__ */ E.createElement(d, {
6
+ active: n,
8
7
  onMouseDown: (a) => {
9
- !e || !e.selection || (r || p(e, {}), P(E, e, {
10
- activeType: n,
8
+ !e || !e.selection || (n || f(e, {}), p(P, e, {
9
+ activeType: o,
11
10
  inactiveType: s
12
11
  })(a));
13
12
  },
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxListToolbarButton.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.tsx"],"sourcesContent":["import {\n BlockToolbarButtonProps,\n ToolbarButton,\n getPreventDefaultHandler,\n someNode,\n toggleNodeType,\n unwrapList,\n useEventPlateId,\n usePlateEditorState,\n withPlateEventProvider,\n} from '@udecode/plate';\nimport React from 'react';\n\nexport const CheckboxListToolbarButton = withPlateEventProvider(\n ({ id, type, inactiveType, active, ...props }: BlockToolbarButtonProps) => {\n id = useEventPlateId(id);\n const editor = usePlateEditorState(id);\n\n const isActive = active ?? (!!editor?.selection && someNode(editor, { match: { type } }));\n\n return (\n <ToolbarButton\n active={isActive}\n onMouseDown={(event) => {\n if (!editor || !editor.selection) {\n return;\n }\n\n if (!isActive) {\n unwrapList(editor, {});\n }\n\n getPreventDefaultHandler(toggleNodeType, editor, {\n activeType: type,\n inactiveType,\n })(event);\n }}\n {...props}\n />\n );\n },\n);\n"],"names":[],"mappings":";;AAaa,MAAA,IAA4B,EACrC,CAAC,EAAE,OAAI,SAAM,iBAAc,cAAW,QAAqC;AACvE,MAAK,EAAgB,CAAE;AACjB,QAAA,IAAS,EAAoB,CAAE,GAE/B,IAAW,gBAAY,CAAA,CAAC,gBAAQ,cAAa,EAAS,GAAQ,EAAE,OAAO,EAAE,WAAQ;AAEvF,SACK,kBAAA,cAAA,GAAA;AAAA,IACG,QAAQ;AAAA,IACR,aAAa,CAAC,MAAU;AACpB,MAAI,CAAC,KAAU,CAAC,EAAO,aAIlB,MACU,EAAA,GAAQ,CAAA,CAAE,GAGzB,EAAyB,GAAgB,GAAQ;AAAA,QAC7C,YAAY;AAAA,QACZ;AAAA,MAAA,CACH,EAAE,CAAK;AAAA,IACZ;AAAA,IACC,GAAG;AAAA,EAAA,CACR;AAER,CACJ;"}
1
+ {"version":3,"file":"CheckboxListToolbarButton.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/CheckboxListPlugin/CheckboxListButton/CheckboxListToolbarButton.tsx"],"sourcesContent":["import {\n BlockToolbarButtonProps,\n ToolbarButton,\n getPreventDefaultHandler,\n someNode,\n toggleNodeType,\n unwrapList,\n useEventPlateId,\n usePlateEditorState,\n withPlateEventProvider,\n} from '@udecode/plate';\nimport React from 'react';\n\nexport const CheckboxListToolbarButton = withPlateEventProvider(\n ({ id, type, inactiveType, active, ...props }: BlockToolbarButtonProps) => {\n const editor = usePlateEditorState(useEventPlateId(id));\n\n const isActive = active ?? (!!editor?.selection && someNode(editor, { match: { type } }));\n\n return (\n <ToolbarButton\n active={isActive}\n onMouseDown={(event) => {\n if (!editor || !editor.selection) {\n return;\n }\n\n if (!isActive) {\n unwrapList(editor, {});\n }\n\n getPreventDefaultHandler(toggleNodeType, editor, {\n activeType: type,\n inactiveType,\n })(event);\n }}\n {...props}\n />\n );\n },\n);\n"],"names":[],"mappings":";;AAaa,MAAA,IAA4B,EACrC,CAAC,EAAE,OAAI,SAAM,iBAAc,cAAW,QAAqC;AACvE,QAAM,IAAS,EAAoB,EAAgB,CAAE,CAAC,GAEhD,IAAW,gBAAY,CAAA,CAAC,gBAAQ,cAAa,EAAS,GAAQ,EAAE,OAAO,EAAE,WAAQ;AAEvF,SACK,kBAAA,cAAA,GAAA;AAAA,IACG,QAAQ;AAAA,IACR,aAAa,CAAC,MAAU;AACpB,MAAI,CAAC,KAAU,CAAC,EAAO,aAIlB,MACU,EAAA,GAAQ,CAAA,CAAE,GAGzB,EAAyB,GAAgB,GAAQ;AAAA,QAC7C,YAAY;AAAA,QACZ;AAAA,MAAA,CACH,EAAE,CAAK;AAAA,IACZ;AAAA,IACC,GAAG;AAAA,EAAA,CACR;AAER,CACJ;"}
@@ -1,11 +1,13 @@
1
1
  import t from "react";
2
2
  import { useFloatingLinkSelectors as i } from "@udecode/plate";
3
- import { FloatingLink as e } from "./FloatingLink.es.js";
4
- const c = () => {
5
- const o = i().isEditing(), n = /* @__PURE__ */ t.createElement(e.InsertModal, null), l = o ? n : /* @__PURE__ */ t.createElement(e.EditModal, null);
6
- return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(e.InsertRoot, null, n), /* @__PURE__ */ t.createElement(e.EditRoot, null, l));
3
+ import { FloatingLink as n } from "./FloatingLink.es.js";
4
+ import { EditModal as l } from "./EditLinkModal/EditModal.es.js";
5
+ import { InsertModal as m } from "./InsertLinkModal/InsertModal.es.js";
6
+ const d = () => {
7
+ const o = i().isEditing(), e = /* @__PURE__ */ t.createElement(m, null), r = o ? e : /* @__PURE__ */ t.createElement(l, null);
8
+ return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(n.InsertRoot, null, e), /* @__PURE__ */ t.createElement(n.EditRoot, null, r));
7
9
  };
8
10
  export {
9
- c as CustomFloatingLink
11
+ d as CustomFloatingLink
10
12
  };
11
13
  //# sourceMappingURL=CustomFloatingLink.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomFloatingLink.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React from 'react';\nimport { useFloatingLinkSelectors } from '@udecode/plate';\nimport { FloatingLink } from './FloatingLink';\n\nexport const CustomFloatingLink = () => {\n const isEditing = useFloatingLinkSelectors().isEditing();\n\n const input = <FloatingLink.InsertModal />;\n const editContent = !isEditing ? <FloatingLink.EditModal /> : input;\n\n return (\n <>\n <FloatingLink.InsertRoot>{input}</FloatingLink.InsertRoot>\n\n <FloatingLink.EditRoot>{editContent}</FloatingLink.EditRoot>\n </>\n );\n};\n"],"names":[],"mappings":";;;AAMO,MAAM,IAAqB,MAAM;AAC9B,QAAA,IAAY,IAA2B,aAEvC,IAAQ,kBAAA,cAAC,EAAa,aAAb,IAAyB,GAClC,IAAc,AAAC,IAAyC,oCAA5B,EAAa,WAAb,IAAuB;AAEzD,SAEQ,kBAAA,cAAA,EAAA,UAAA,MAAA,kBAAA,cAAC,EAAa,YAAb,MAAyB,CAAM,GAEhC,kBAAA,cAAC,EAAa,UAAb,MAAuB,CAAY,CACxC;AAER;"}
1
+ {"version":3,"file":"CustomFloatingLink.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/LinkPlugin/FloatingLink/CustomFloatingLink.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React from 'react';\nimport { useFloatingLinkSelectors } from '@udecode/plate';\nimport { FloatingLink } from './FloatingLink';\nimport { EditModal } from './EditLinkModal';\nimport { InsertModal } from './InsertLinkModal';\n\nexport const CustomFloatingLink = () => {\n const isEditing = useFloatingLinkSelectors().isEditing();\n\n const input = <InsertModal />;\n const editContent = !isEditing ? <EditModal /> : input;\n\n return (\n <>\n <FloatingLink.InsertRoot>{input}</FloatingLink.InsertRoot>\n\n <FloatingLink.EditRoot>{editContent}</FloatingLink.EditRoot>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAQO,MAAM,IAAqB,MAAM;AAC9B,QAAA,IAAY,IAA2B,aAEvC,oCAAS,GAAY,IAAA,GACrB,IAAc,AAAC,IAA4B,IAAhB,kBAAA,cAAC,OAAU;AAE5C,SAEQ,kBAAA,cAAA,EAAA,UAAA,MAAA,kBAAA,cAAC,EAAa,YAAb,MAAyB,CAAM,GAEhC,kBAAA,cAAC,EAAa,UAAb,MAAuB,CAAY,CACxC;AAER;"}
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
1
  import { FloatingLinkProps } from '@udecode/plate';
3
2
  export declare const FloatingLink: {
4
3
  EditRoot: import("@udecode/plate").Component<FloatingLinkProps>;
5
4
  InsertRoot: import("@udecode/plate").Component<FloatingLinkProps>;
6
- EditModal: () => JSX.Element;
7
- InsertModal: () => JSX.Element;
5
+ UrlInput: import("@udecode/plate").Component<import("@udecode/plate").AsProps<"input">>;
6
+ TextInput: import("@udecode/plate").Component<import("@udecode/plate").AsProps<"input">>;
7
+ NewTabInput: import("@udecode/plate").Component<import("@udecode/plate").AsProps<"input">>;
8
8
  EditButton: import("@udecode/plate").Component<import("@udecode/plate").AsProps<"button">>;
9
9
  UnlinkButton: import("@udecode/plate").Component<import("@udecode/plate").AsProps<"button">>;
10
10
  OpenLinkButton: import("@udecode/plate").Component<import("@udecode/plate").AsProps<"a">>;