payload-richtext-tiptap 0.0.117 → 0.0.119

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 (77) hide show
  1. package/dist/src/fields/TiptapEditor/extensions/AudioBlock/AudioBlock.js.map +1 -1
  2. package/dist/src/fields/TiptapEditor/extensions/AudioBlock/components/AudioBlockMenu.js.map +1 -1
  3. package/dist/src/fields/TiptapEditor/extensions/FontSize/FontSize.js.map +1 -1
  4. package/dist/src/fields/TiptapEditor/extensions/Heading/Heading.js.map +1 -1
  5. package/dist/src/fields/TiptapEditor/extensions/Iframe/iframe.d.ts.map +1 -1
  6. package/dist/src/fields/TiptapEditor/extensions/Iframe/iframe.js +6 -0
  7. package/dist/src/fields/TiptapEditor/extensions/Iframe/iframe.js.map +1 -1
  8. package/dist/src/fields/TiptapEditor/extensions/ImageBlock/ImageBlock.js.map +1 -1
  9. package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockMenu.js.map +1 -1
  10. package/dist/src/fields/TiptapEditor/extensions/InsideLinks/InsideLink.client.js.map +1 -1
  11. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js +3 -3
  12. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js.map +1 -1
  13. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/menus/ColumnsMenu.js.map +1 -1
  14. package/dist/src/fields/TiptapEditor/extensions/SlashCommand/MenuList.js.map +1 -1
  15. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.d.ts +10 -0
  16. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.d.ts.map +1 -0
  17. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.js +55 -0
  18. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.js.map +1 -0
  19. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.d.ts +2 -0
  20. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.d.ts.map +1 -0
  21. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.js +3 -0
  22. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.js.map +1 -0
  23. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/VideoBlock.js.map +1 -1
  24. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockMenu.js.map +1 -1
  25. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.d.ts.map +1 -1
  26. package/dist/src/fields/TiptapEditor/extensions/extension-kit.d.ts +1 -1
  27. package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.d.ts +4 -0
  28. package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.d.ts.map +1 -0
  29. package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.js +148 -0
  30. package/dist/src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.js.map +1 -0
  31. package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.js.map +1 -1
  32. package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.js.map +1 -1
  33. package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.js.map +1 -1
  34. package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.js.map +1 -1
  35. package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.js.map +1 -1
  36. package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.js.map +1 -1
  37. package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.js.map +1 -1
  38. package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.js.map +1 -1
  39. package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.js.map +1 -1
  40. package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.d.ts +2 -0
  41. package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.d.ts.map +1 -0
  42. package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.js +35 -0
  43. package/dist/src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.js.map +1 -0
  44. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.d.ts +8 -0
  45. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.d.ts.map +1 -0
  46. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.js +32 -0
  47. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.js.map +1 -0
  48. package/dist/src/fields/TiptapEditor/features/Sidebar/index.d.ts +2 -0
  49. package/dist/src/fields/TiptapEditor/features/Sidebar/index.d.ts.map +1 -0
  50. package/dist/src/fields/TiptapEditor/features/Sidebar/index.js +3 -0
  51. package/dist/src/fields/TiptapEditor/features/Sidebar/index.js.map +1 -0
  52. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.d.ts +8 -0
  53. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.d.ts.map +1 -0
  54. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.js +57 -0
  55. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.js.map +1 -0
  56. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.d.ts +2 -0
  57. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.d.ts.map +1 -0
  58. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.js +3 -0
  59. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.js.map +1 -0
  60. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontFamilyPicker.js.map +1 -1
  61. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontSizePicker.js.map +1 -1
  62. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/hooks/useTextmenuCommands.js +1 -1
  63. package/dist/src/fields/TiptapEditor/features/menus/TextMenu/hooks/useTextmenuCommands.js.map +1 -1
  64. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.d.ts.map +1 -1
  65. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.js +13 -4
  66. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.js.map +1 -1
  67. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/tiptap.schema.d.ts +847 -0
  68. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/tiptap.schema.d.ts.map +1 -0
  69. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/tiptap.schema.js +88 -0
  70. package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/tiptap.schema.js.map +1 -0
  71. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.js +1 -1
  72. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/AIEditorPanel.js.map +1 -1
  73. package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/utils.js.map +1 -1
  74. package/dist/src/fields/TiptapEditor/hooks/useBlockEditor.js.map +1 -1
  75. package/dist/src/fields/TiptapEditor/lib/utils/cssVar.js.map +1 -1
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +36 -27
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockMenu.tsx"],"sourcesContent":["import { BubbleMenu as BaseBubbleMenu } from \"@tiptap/react\";\nimport { ReactNode, useCallback, useRef } from \"react\";\nimport { Instance, sticky } from \"tippy.js\";\nimport { v4 as uuid } from \"uuid\";\n\nimport {\n AlignHorizontalDistributeCenter,\n AlignHorizontalDistributeEnd,\n AlignHorizontalDistributeStart,\n Pencil,\n PencilOff,\n} from \"lucide-react\";\nimport { MenuProps } from \"../../../features/menus/types.js\";\nimport { Icon } from \"../../../features/ui/Icon.js\";\nimport { Toolbar } from \"../../../features/ui/Toolbar.js\";\nimport { getRenderContainer } from \"../../../lib/utils/index.js\";\nimport { VideoBlockWidth } from \"./VideoBlockWidth.js\";\nimport i18next from \"i18next\";\n\nexport const VideoBlockMenu = ({ editor, appendTo }: MenuProps): ReactNode => {\n const menuRef = useRef<HTMLDivElement>(null);\n const tippyInstance = useRef<Instance | null>(null);\n\n const getReferenceClientRect = useCallback(() => {\n const renderContainer = getRenderContainer(editor, \"node-videoBlock\");\n const rect =\n renderContainer?.getBoundingClientRect() ||\n new DOMRect(-1000, -1000, 0, 0);\n\n return rect;\n }, [editor]);\n\n const shouldShow = useCallback(() => {\n const isActive = editor.isActive(\"videoBlock\");\n\n return isActive;\n }, [editor]);\n\n const onAlignVideoLeft = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockAlign(\"left\")\n .run();\n }, [editor]);\n\n const onAlignVideoCenter = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockAlign(\"center\")\n .run();\n }, [editor]);\n\n const onAlignVideoRight = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockAlign(\"right\")\n .run();\n }, [editor]);\n\n const onHideCaption = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockCaption(\n editor.isActive(\"videoBlock\", { caption: false }) ? true : false\n )\n .run();\n }, [editor]);\n\n const onWidthChange = useCallback(\n (value: number) => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockWidth(value)\n .run();\n },\n [editor]\n );\n\n return (\n <BaseBubbleMenu\n editor={editor}\n pluginKey={`videoBlockMenu-${uuid()}`}\n shouldShow={shouldShow}\n updateDelay={0}\n tippyOptions={{\n offset: [0, 8],\n popperOptions: {\n modifiers: [{ name: \"flip\", enabled: false }],\n },\n getReferenceClientRect,\n onCreate: (instance: Instance) => {\n tippyInstance.current = instance;\n },\n appendTo: () => {\n return appendTo?.current;\n },\n plugins: [sticky],\n sticky: \"popper\",\n }}\n >\n <Toolbar.Wrapper shouldShowContent={shouldShow()} ref={menuRef}>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"toggleCaption\") || \"Hide/Show caption\"}\n active={editor.isActive(\"videoBlock\", { caption: false })}\n onClick={onHideCaption}\n >\n <Icon\n icon={\n editor.isActive(\"videoBlock\", { caption: false })\n ? PencilOff\n : Pencil\n }\n />\n </Toolbar.Button>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"alignVideoLeft\") || \"Align video left\"}\n active={editor.isActive(\"videoBlock\", { align: \"left\" })}\n onClick={onAlignVideoLeft}\n >\n <Icon icon={AlignHorizontalDistributeStart} />\n </Toolbar.Button>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"alignVideoCenter\") || \"Align video center\"}\n active={editor.isActive(\"videoBlock\", { align: \"center\" })}\n onClick={onAlignVideoCenter}\n >\n <Icon icon={AlignHorizontalDistributeCenter} />\n </Toolbar.Button>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"alignVideoRight\") || \"Align video right\"}\n active={editor.isActive(\"videoBlock\", { align: \"right\" })}\n onClick={onAlignVideoRight}\n >\n <Icon icon={AlignHorizontalDistributeEnd} />\n </Toolbar.Button>\n <Toolbar.Divider />\n <VideoBlockWidth\n onChange={onWidthChange}\n value={parseInt(editor.getAttributes(\"videoBlock\").width)}\n />\n </Toolbar.Wrapper>\n </BaseBubbleMenu>\n );\n};\n\nexport default VideoBlockMenu;\n"],"names":["BubbleMenu","BaseBubbleMenu","useCallback","useRef","sticky","v4","uuid","AlignHorizontalDistributeCenter","AlignHorizontalDistributeEnd","AlignHorizontalDistributeStart","Pencil","PencilOff","Icon","Toolbar","getRenderContainer","VideoBlockWidth","i18next","VideoBlockMenu","editor","appendTo","menuRef","tippyInstance","getReferenceClientRect","renderContainer","rect","getBoundingClientRect","DOMRect","shouldShow","isActive","onAlignVideoLeft","chain","focus","undefined","scrollIntoView","setVideoBlockAlign","run","onAlignVideoCenter","onAlignVideoRight","onHideCaption","setVideoBlockCaption","caption","onWidthChange","value","setVideoBlockWidth","pluginKey","updateDelay","tippyOptions","offset","popperOptions","modifiers","name","enabled","onCreate","instance","current","plugins","Wrapper","shouldShowContent","ref","Button","type","tooltip","t","active","onClick","icon","align","Divider","onChange","parseInt","getAttributes","width"],"mappings":";AAAA,SAASA,cAAcC,cAAc,QAAQ,gBAAgB;AAC7D,SAAoBC,WAAW,EAAEC,MAAM,QAAQ,QAAQ;AACvD,SAAmBC,MAAM,QAAQ,WAAW;AAC5C,SAASC,MAAMC,IAAI,QAAQ,OAAO;AAElC,SACEC,+BAA+B,EAC/BC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,MAAM,EACNC,SAAS,QACJ,eAAe;AAEtB,SAASC,IAAI,QAAQ,+BAA+B;AACpD,SAASC,OAAO,QAAQ,kCAAkC;AAC1D,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,OAAOC,aAAa,UAAU;AAE9B,OAAO,MAAMC,iBAAiB,CAAC,EAAEC,MAAM,EAAEC,QAAQ,EAAa;IAC5D,MAAMC,UAAUjB,OAAuB;IACvC,MAAMkB,gBAAgBlB,OAAwB;IAE9C,MAAMmB,yBAAyBpB,YAAY;QACzC,MAAMqB,kBAAkBT,mBAAmBI,QAAQ;QACnD,MAAMM,OACJD,iBAAiBE,2BACjB,IAAIC,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG;QAE/B,OAAOF;IACT,GAAG;QAACN;KAAO;IAEX,MAAMS,aAAazB,YAAY;QAC7B,MAAM0B,WAAWV,OAAOU,QAAQ,CAAC;QAEjC,OAAOA;IACT,GAAG;QAACV;KAAO;IAEX,MAAMW,mBAAmB3B,YAAY;QACnCgB,OACGY,KAAK,GACLC,KAAK,CAACC,WAAW;YAAEC,gBAAgB;QAAM,GACzCC,kBAAkB,CAAC,QACnBC,G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Q8C,CAAC,CAAC,oBAAoB;oBACvCC,QAAQ7C,OAAOU,QAAQ,CAAC,cAAc;wBAAEY,SAAS;oBAAM;oBACvDwB,SAAS1B;8BAET,cAAA,KAAC1B;wBACCqD,MACE/C,OAAOU,QAAQ,CAAC,cAAc;4BAAEY,SAAS;wBAAM,KAC3C7B,YACAD;;;8BAIV,KAACG,QAAQ8C,MAAM;oBACbC,MAAK;oBACLC,SAAS7C,QAAQ8C,CAAC,CAAC,qBAAqB;oBACxCC,QAAQ7C,OAAOU,QAAQ,CAAC,cAAc;wBAAEsC,OAAO;oBAAO;oBACtDF,SAASnC;8BAET,cAAA,KAACjB;wBAAKqD,MAAMxD;;;8BAEd,KAACI,QAAQ8C,MAAM;oBACbC,MAAK;oBACLC,SAAS7C,QAAQ8C,CAAC,CAAC,uBAAuB;oBAC1CC,QAAQ7C,OAAOU,QAAQ,CAAC,cAAc;wBAAEsC,OAAO;oBAAS;oBACxDF,SAAS5B;8BAET,cAAA,KAACxB;wBAAKqD,MAAM1D;;;8BAEd,KAACM,QAAQ8C,MAAM;oBACbC,MAAK;oBACLC,SAAS7C,QAAQ8C,CAAC,CAAC,sBAAsB;oBACzCC,QAAQ7C,OAAOU,QAAQ,CAAC,cAAc;wBAAEsC,OAAO;oBAAQ;oBACvDF,SAAS3B;8BAET,cAAA,KAACzB;wBAAKqD,MAAMzD;;;8BAEd,KAACK,QAAQsD,OAAO;8BAChB,KAACpD;oBACCqD,UAAU3B;oBACVC,OAAO2B,SAASnD,OAAOoD,aAAa,CAAC,cAAcC,KAAK;;;;;AAKlE,EAAE;AAEF,eAAetD,eAAe"}
1
+ {"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockMenu.tsx"],"sourcesContent":["import { BubbleMenu as BaseBubbleMenu } from \"@tiptap/react\";\nimport { ReactNode, useCallback, useRef } from \"react\";\nimport { Instance, sticky } from \"tippy.js\";\nimport { v4 as uuid } from \"uuid\";\n\nimport {\n AlignHorizontalDistributeCenter,\n AlignHorizontalDistributeEnd,\n AlignHorizontalDistributeStart,\n Pencil,\n PencilOff,\n} from \"lucide-react\";\nimport { MenuProps } from \"../../../features/menus/types.js\";\nimport { Icon } from \"../../../features/ui/Icon.js\";\nimport { Toolbar } from \"../../../features/ui/Toolbar.js\";\nimport { getRenderContainer } from \"../../../lib/utils/index.js\";\nimport { VideoBlockWidth } from \"./VideoBlockWidth.js\";\nimport i18next from \"i18next\";\n\nexport const VideoBlockMenu = ({ editor, appendTo }: MenuProps): ReactNode => {\n const menuRef = useRef<HTMLDivElement>(null);\n const tippyInstance = useRef<Instance | null>(null);\n\n const getReferenceClientRect = useCallback(() => {\n const renderContainer = getRenderContainer(editor, \"node-videoBlock\");\n const rect =\n renderContainer?.getBoundingClientRect() ||\n new DOMRect(-1000, -1000, 0, 0);\n\n return rect;\n }, [editor]);\n\n const shouldShow = useCallback(() => {\n const isActive = editor.isActive(\"videoBlock\");\n\n return isActive;\n }, [editor]);\n\n const onAlignVideoLeft = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockAlign(\"left\")\n .run();\n }, [editor]);\n\n const onAlignVideoCenter = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockAlign(\"center\")\n .run();\n }, [editor]);\n\n const onAlignVideoRight = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockAlign(\"right\")\n .run();\n }, [editor]);\n\n const onHideCaption = useCallback(() => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockCaption(\n editor.isActive(\"videoBlock\", { caption: false }) ? true : false\n )\n .run();\n }, [editor]);\n\n const onWidthChange = useCallback(\n (value: number) => {\n editor\n .chain()\n .focus(undefined, { scrollIntoView: false })\n .setVideoBlockWidth(value)\n .run();\n },\n [editor]\n );\n\n return (\n <BaseBubbleMenu\n editor={editor}\n pluginKey={`videoBlockMenu-${uuid()}`}\n shouldShow={shouldShow}\n updateDelay={0}\n tippyOptions={{\n offset: [0, 8],\n popperOptions: {\n modifiers: [{ name: \"flip\", enabled: false }],\n },\n getReferenceClientRect,\n onCreate: (instance: Instance) => {\n tippyInstance.current = instance;\n },\n appendTo: () => {\n return appendTo?.current;\n },\n plugins: [sticky],\n sticky: \"popper\",\n }}\n >\n <Toolbar.Wrapper shouldShowContent={shouldShow()} ref={menuRef}>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"toggleCaption\") || \"Hide/Show caption\"}\n active={editor.isActive(\"videoBlock\", { caption: false })}\n onClick={onHideCaption}\n >\n <Icon\n icon={\n editor.isActive(\"videoBlock\", { caption: false })\n ? PencilOff\n : Pencil\n }\n />\n </Toolbar.Button>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"alignVideoLeft\") || \"Align video left\"}\n active={editor.isActive(\"videoBlock\", { align: \"left\" })}\n onClick={onAlignVideoLeft}\n >\n <Icon icon={AlignHorizontalDistributeStart} />\n </Toolbar.Button>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"alignVideoCenter\") || \"Align video center\"}\n active={editor.isActive(\"videoBlock\", { align: \"center\" })}\n onClick={onAlignVideoCenter}\n >\n <Icon icon={AlignHorizontalDistributeCenter} />\n </Toolbar.Button>\n <Toolbar.Button\n type=\"button\"\n tooltip={i18next.t(\"alignVideoRight\") || \"Align video right\"}\n active={editor.isActive(\"videoBlock\", { align: \"right\" })}\n onClick={onAlignVideoRight}\n >\n <Icon icon={AlignHorizontalDistributeEnd} />\n </Toolbar.Button>\n <Toolbar.Divider />\n <VideoBlockWidth\n onChange={onWidthChange}\n value={parseInt(editor.getAttributes(\"videoBlock\").width)}\n />\n </Toolbar.Wrapper>\n </BaseBubbleMenu>\n );\n};\n\nexport default VideoBlockMenu;\n"],"names":["BubbleMenu","BaseBubbleMenu","useCallback","useRef","sticky","v4","uuid","AlignHorizontalDistributeCenter","AlignHorizontalDistributeEnd","AlignHorizontalDistributeStart","Pencil","PencilOff","Icon","Toolbar","getRenderContainer","VideoBlockWidth","i18next","VideoBlockMenu","editor","appendTo","menuRef","tippyInstance","getReferenceClientRect","renderContainer","rect","getBoundingClientRect","DOMRect","shouldShow","isActive","onAlignVideoLeft","chain","focus","undefined","scrollIntoView","setVideoBlockAlign","run","onAlignVideoCenter","onAlignVideoRight","onHideCaption","setVideoBlockCaption","caption","onWidthChange","value","setVideoBlockWidth","pluginKey","updateDelay","tippyOptions","offset","popperOptions","modifiers","name","enabled","onCreate","instance","current","plugins","Wrapper","shouldShowContent","ref","Button","type","tooltip","t","active","onClick","icon","align","Divider","onChange","parseInt","getAttributes","width"],"mappings":";AAAA,SAASA,cAAcC,cAAc,QAAQ,gBAAgB;AAC7D,SAAoBC,WAAW,EAAEC,MAAM,QAAQ,QAAQ;AACvD,SAAmBC,MAAM,QAAQ,WAAW;AAC5C,SAASC,MAAMC,IAAI,QAAQ,OAAO;AAElC,SACEC,+BAA+B,EAC/BC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,MAAM,EACNC,SAAS,QACJ,eAAe;AAEtB,SAASC,IAAI,QAAQ,+BAA+B;AACpD,SAASC,OAAO,QAAQ,kCAAkC;AAC1D,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,OAAOC,aAAa,UAAU;AAE9B,OAAO,MAAMC,iBAAiB,CAAC,EAAEC,MAAM,EAAEC,QAAQ,EAAa;IAC5D,MAAMC,UAAUjB,OAAuB;IACvC,MAAMkB,gBAAgBlB,OAAwB;IAE9C,MAAMmB,yBAAyBpB,YAAY;QACzC,MAAMqB,kBAAkBT,mBAAmBI,QAAQ;QACnD,MAAMM,OACJD,iBAAiBE,2BACjB,IAAIC,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG;QAE/B,OAAOF;IACT,GAAG;QAACN;KAAO;IAEX,MAAMS,aAAazB,YAAY;QAC7B,MAAM0B,WAAWV,OAAOU,QAAQ,CA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../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"names":[],"mappings":"AAAA,gCAAiC,kBAAkB,CAAC;AACpD,+BAAgC,iBAAiB,CAAC;AAClD,qCAAsC,sBAAsB,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"names":[],"mappings":"AAAA,mDAAoD;AACpD,iDAAkD;AAClD,4DAA6D"}
@@ -3,6 +3,6 @@ interface ExtensionKitProps {
3
3
  openAssetHQHandler: openAssetHQType;
4
4
  dir?: "ltr" | "rtl";
5
5
  }
6
- export declare const ExtensionKit: ({ dir, openAssetHQHandler, }: ExtensionKitProps) => (import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Node<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-subscript").SubscriptExtensionOptions, any>)[];
6
+ export declare const ExtensionKit: ({ dir, openAssetHQHandler, }: ExtensionKitProps) => (import("@tiptap/core").Node<any, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-subscript").SubscriptExtensionOptions, any>)[];
7
7
  export default ExtensionKit;
8
8
  //# sourceMappingURL=extension-kit.d.ts.map
@@ -0,0 +1,4 @@
1
+ export declare function ContentEmbedSupport({ body }: {
2
+ body: any;
3
+ }): import("react").JSX.Element;
4
+ //# sourceMappingURL=ContentEmbedSupport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentEmbedSupport.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.tsx"],"names":[],"mappings":"AAgJA,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE;;CAAA,+BAwB3C"}
@@ -0,0 +1,148 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Portal } from "@radix-ui/react-portal";
4
+ import Image from "next/image.js";
5
+ import { memo, useEffect, useState } from "react";
6
+ import { FacebookEmbed, InstagramEmbed, LinkedInEmbed, TikTokEmbed, XEmbed, YouTubeEmbed } from "react-social-media-embed";
7
+ import { cn } from "../../lib/utils/index.js";
8
+ import VideoBlockViewClientside from "../VideoBlock/components/VideoBlockViewClientside.js";
9
+ import { SocialMediaEmbedServerside } from "../SocialMedia/SocialMediaEmbedServerside.js";
10
+ import InsideLinksComponent from "../InsideLinks/InsideLinksComponent.js";
11
+ const renderContent = (content)=>{
12
+ switch(content.type){
13
+ case "twitter":
14
+ if (!checkIfValidLink(content.attrs.url)) {
15
+ return null;
16
+ }
17
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
18
+ children: /*#__PURE__*/ _jsx(XEmbed, {
19
+ url: content.attrs.url || "",
20
+ width: 325
21
+ })
22
+ });
23
+ case "youtube":
24
+ if (!checkIfValidLink(content.attrs.url)) {
25
+ return null;
26
+ }
27
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
28
+ children: /*#__PURE__*/ _jsx(YouTubeEmbed, {
29
+ url: content.attrs.url || ""
30
+ })
31
+ });
32
+ case "instagram":
33
+ if (!checkIfValidLink(content.attrs.url)) {
34
+ return null;
35
+ }
36
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
37
+ children: /*#__PURE__*/ _jsx(InstagramEmbed, {
38
+ className: "max-w-[328px]",
39
+ url: content.attrs.url || "",
40
+ width: 328,
41
+ captioned: true
42
+ })
43
+ });
44
+ case "tiktok":
45
+ if (!checkIfValidLink(content.attrs.url)) {
46
+ return null;
47
+ }
48
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
49
+ children: /*#__PURE__*/ _jsx(TikTokEmbed, {
50
+ className: "max-w-[328px]",
51
+ url: content.attrs.url || "",
52
+ width: 328
53
+ })
54
+ });
55
+ case "imageBlock":
56
+ return /*#__PURE__*/ _jsxs(_Fragment, {
57
+ children: [
58
+ /*#__PURE__*/ _jsx("div", {
59
+ className: cn("relative object-cover", {
60
+ "aspect-video": !content.attrs.height
61
+ }),
62
+ style: {
63
+ width: content.attrs.width || "100%",
64
+ ...content.attrs.height ? {
65
+ height: content.attrs.height
66
+ } : {}
67
+ },
68
+ children: /*#__PURE__*/ _jsx(Image, {
69
+ className: "rounded",
70
+ src: content.attrs.src,
71
+ alt: content.attrs.alt || content.attrs.caption,
72
+ fill: true
73
+ })
74
+ }),
75
+ content.attrs?.caption ? /*#__PURE__*/ _jsx("p", {
76
+ className: cn("tiptap-image-caption", "pt-2 font-sf text-sm font-light text-grey-7 mx-6 sm:mx-0 line-clamp-2"),
77
+ children: content.attrs?.caption
78
+ }) : null
79
+ ]
80
+ });
81
+ case "videoBlock":
82
+ // @ts-ignore
83
+ return /*#__PURE__*/ _jsx(VideoBlockViewClientside, {
84
+ node: content
85
+ });
86
+ case "facebook":
87
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
88
+ children: /*#__PURE__*/ _jsx(FacebookEmbed, {
89
+ url: content.attrs.url || "",
90
+ width: 550
91
+ })
92
+ });
93
+ case "linkedin":
94
+ if (!checkIfValidLink(content.attrs.url)) {
95
+ return null;
96
+ }
97
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
98
+ children: /*#__PURE__*/ _jsx(LinkedInEmbed, {
99
+ url: content.attrs.url || "",
100
+ width: 325,
101
+ height: 570
102
+ })
103
+ });
104
+ case "insideLinks":
105
+ return /*#__PURE__*/ _jsx(InsideLinksComponent, {
106
+ ...content
107
+ });
108
+ case "iframe":
109
+ return /*#__PURE__*/ _jsx(SocialMediaEmbedServerside, {
110
+ children: /*#__PURE__*/ _jsx("div", {
111
+ className: "iframe-wrapper",
112
+ children: /*#__PURE__*/ _jsx("iframe", {
113
+ src: content?.attrs?.src ?? "",
114
+ allowFullScreen: true
115
+ })
116
+ })
117
+ });
118
+ default:
119
+ return null;
120
+ }
121
+ };
122
+ const CustomPortal = /*#__PURE__*/ memo(({ content, ...props })=>{
123
+ useEffect(()=>{}, []);
124
+ return /*#__PURE__*/ _jsx(Portal, {
125
+ ...props,
126
+ children: renderContent(content)
127
+ });
128
+ });
129
+ function checkIfValidLink(link) {
130
+ return typeof link === "string";
131
+ }
132
+ export function ContentEmbedSupport({ body }) {
133
+ const [mounted, setMounted] = useState(false);
134
+ useEffect(()=>{
135
+ setMounted(true);
136
+ }, []);
137
+ if (!mounted) return null;
138
+ return /*#__PURE__*/ _jsx(_Fragment, {
139
+ children: body.content.filter((content)=>content?.attrs?.["data-id"]).map((content)=>{
140
+ return /*#__PURE__*/ _jsx(CustomPortal, {
141
+ container: document?.querySelector(`[data-id='${content.attrs["data-id"]}']`),
142
+ content: content
143
+ }, `embed-content-${content.attrs["data-id"]}-${content.attrs.key}`);
144
+ })
145
+ });
146
+ }
147
+
148
+ //# sourceMappingURL=ContentEmbedSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport Image from \"next/image.js\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\nimport {\n FacebookEmbed,\n InstagramEmbed,\n LinkedInEmbed,\n TikTokEmbed,\n XEmbed,\n YouTubeEmbed,\n} from \"react-social-media-embed\";\nimport { cn } from \"../../lib/utils/index.js\";\nimport VideoBlockViewClientside from \"../VideoBlock/components/VideoBlockViewClientside.js\";\nimport { SocialMediaEmbedServerside } from \"../SocialMedia/SocialMediaEmbedServerside.js\";\nimport InsideLinksComponent from \"../InsideLinks/InsideLinksComponent.js\";\n\nconst renderContent = (content) => {\n switch (content.type) {\n case \"twitter\":\n if (!checkIfValidLink(content.attrs.url)) {\n return null;\n }\n return (\n <SocialMediaEmbedServerside>\n <XEmbed url={content.attrs.url || \"\"} width={325} />\n </SocialMediaEmbedServerside>\n );\n case \"youtube\":\n if (!checkIfValidLink(content.attrs.url)) {\n return null;\n }\n return (\n <SocialMediaEmbedServerside>\n <YouTubeEmbed url={content.attrs.url || \"\"} />\n </SocialMediaEmbedServerside>\n );\n case \"instagram\":\n if (!checkIfValidLink(content.attrs.url)) {\n return null;\n }\n return (\n <SocialMediaEmbedServerside>\n <InstagramEmbed\n className=\"max-w-[328px]\"\n url={content.attrs.url || \"\"}\n width={328}\n captioned\n />\n </SocialMediaEmbedServerside>\n );\n case \"tiktok\":\n if (!checkIfValidLink(content.attrs.url)) {\n return null;\n }\n return (\n <SocialMediaEmbedServerside>\n <TikTokEmbed\n className=\"max-w-[328px]\"\n url={content.attrs.url || \"\"}\n width={328}\n />\n </SocialMediaEmbedServerside>\n );\n case \"imageBlock\":\n return (\n <>\n <div\n className={cn(\"relative object-cover\", {\n \"aspect-video\": !content.attrs.height,\n })}\n style={{\n width: content.attrs.width || \"100%\",\n ...(content.attrs.height ? { height: content.attrs.height } : {}),\n }}\n >\n {/* @ts-ignore */}\n <Image\n className=\"rounded\"\n src={content.attrs.src}\n alt={content.attrs.alt || content.attrs.caption}\n fill\n />\n </div>\n {content.attrs?.caption ? (\n <p\n className={cn(\n \"tiptap-image-caption\",\n \"pt-2 font-sf text-sm font-light text-grey-7 mx-6 sm:mx-0 line-clamp-2\"\n )}\n >\n {content.attrs?.caption}\n </p>\n ) : null}\n </>\n );\n case \"videoBlock\":\n // @ts-ignore\n return <VideoBlockViewClientside node={content} />;\n case \"facebook\":\n return (\n <SocialMediaEmbedServerside>\n <FacebookEmbed url={content.attrs.url || \"\"} width={550} />\n </SocialMediaEmbedServerside>\n );\n case \"linkedin\":\n if (!checkIfValidLink(content.attrs.url)) {\n return null;\n }\n return (\n <SocialMediaEmbedServerside>\n <LinkedInEmbed\n url={content.attrs.url || \"\"}\n width={325}\n height={570}\n />\n </SocialMediaEmbedServerside>\n );\n case \"insideLinks\":\n return <InsideLinksComponent {...content} />;\n case \"iframe\":\n return (\n <SocialMediaEmbedServerside>\n <div className=\"iframe-wrapper\">\n <iframe src={content?.attrs?.src ?? \"\"} allowFullScreen={true} />\n </div>\n </SocialMediaEmbedServerside>\n );\n default:\n return null;\n }\n};\n\nconst CustomPortal = memo(\n ({ content, ...props }: ComponentProps<typeof Portal>) => {\n useEffect(() => {}, []);\n return <Portal {...props}>{renderContent(content)}</Portal>;\n }\n);\n\nfunction checkIfValidLink(link: string) {\n return typeof link === \"string\";\n}\nexport function ContentEmbedSupport({ body }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .map((content) => {\n return (\n <CustomPortal\n key={`embed-content-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n content={content}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","Image","memo","useEffect","useState","FacebookEmbed","InstagramEmbed","LinkedInEmbed","TikTokEmbed","XEmbed","YouTubeEmbed","cn","VideoBlockViewClientside","SocialMediaEmbedServerside","InsideLinksComponent","renderContent","content","type","checkIfValidLink","attrs","url","width","className","captioned","div","height","style","src","alt","caption","fill","p","node","iframe","allowFullScreen","CustomPortal","props","link","ContentEmbedSupport","body","mounted","setMounted","filter","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,OAAOC,WAAW,gBAAgB;AAClC,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAClE,SACEC,aAAa,EACbC,cAAc,EACdC,aAAa,EACbC,WAAW,EACXC,MAAM,EACNC,YAAY,QACP,2BAA2B;AAClC,SAASC,EAAE,QAAQ,2BAA2B;AAC9C,OAAOC,8BAA8B,uDAAuD;AAC5F,SAASC,0BAA0B,QAAQ,+CAA+C;AAC1F,OAAOC,0BAA0B,yCAAyC;AAE1E,MAAMC,gBAAgB,CAACC;IACrB,OAAQA,QAAQC,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AC3B;YACJ,qBACE,KAACmB;gBAECS,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAE9B,QAAQG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAE3CH,SAASA;eAJJ,CAAC,cAAc,EAAEA,QAAQG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEH,QAAQG,KAAK,CAAC4B,GAAG,CAAC,CAAC;QAO3E;;AAGR"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\n\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\n\nconst CustomPortal = memo(\n ({ content, ...props }: ComponentProps<typeof Portal>) => {\n useEffect(() => {}, []);\n return <Portal {...props}>{renderEmbedContent(content)}</Portal>;\n }\n);\n\nexport function EmbedContentInlineRenderer({ body }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .map((content) => {\n return (\n <CustomPortal\n key={`embed-content-inline-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n content={content}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","memo","useEffect","useState","renderEmbedContent","CustomPortal","content","props","EmbedContentInlineRenderer","body","mounted","setMounted","filter","attrs","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAElE,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,MAAMC,6BAAeJ,KACnB,CAAC,EAAEK,OAAO,EAAE,GAAGC,OAAsC;IACnDL,UAAU,KAAO,GAAG,EAAE;IACtB,qBAAO,KAACF;QAAQ,GAAGO,KAAK;kBAAGH,mBAAmBE;;AAChD;AAGF,OAAO,SAASE,2BAA2B,EAAEC,IAAI,EAAE;IACjD,MAAM,CAACC,SAASC,WAAW,GAAGR,SAAS;IACvCD,UAAU;QACRS,WAAW;IACb,GAAG,EAAE;IAEL,IAAI,CAACD,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKH,OAAO,CACVM,MAAM,CAAC,CAACN,UAAYA,SAASO,OAAO,CAAC,UAAU,EAC/CC,GAAG,CAAC,CAACR;YACJ,qBACE,KAACD;gBAECU,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEX,QAAQO,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAE3CP,SAASA;eAJJ,CAAC,qBAAqB,EAAEA,QAAQO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEP,QAAQO,KAAK,CAACK,GAAG,EAAE;QAOlF;;AAGR"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\n\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\n\nconst CustomPortal = memo(\n ({ content, ...props }: ComponentProps<typeof Portal>) => {\n useEffect(() => {}, []);\n return <Portal {...props}>{renderEmbedContent(content)}</Portal>;\n }\n);\n\nexport function EmbedContentInlineRenderer({ body }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .map((content) => {\n return (\n <CustomPortal\n key={`embed-content-inline-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n content={content}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","memo","useEffect","useState","renderEmbedContent","CustomPortal","content","props","EmbedContentInlineRenderer","body","mounted","setMounted","filter","attrs","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAElE,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,MAAMC,6BAAeJ,KACnB,CAAC,EAAEK,OAAO,EAAE,GAAGC,OAAsC;IACnDL,UAAU,KAAO,GAAG,EAAE;IACtB,qBAAO,KAACF;QAAQ,GAAGO,KAAK;kBAAGH,mBAAmBE;;AAChD;AAGF,OAAO,SAASE,2BAA2B,EAAEC,IAAI,EAAE;IACjD,MAAM,CAACC,SAASC,WAAW,GAAGR,SAAS;IACvCD,UAAU;QACRS,WAAW;IACb,GAAG,EAAE;IAEL,IAAI,CAACD,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKH,OAAO,CACVM,MAAM,CAAC,CAACN,UAAYA,SAASO,OAAO,CAAC,UAAU,EAC/CC,GAAG,CAAC,CAACR;YACJ,qBACE,KAACD;gBAECU,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEX,QAAQO,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAE3CP,SAASA;eAJJ,CAAC,qBAAqB,EAAEA,QAAQO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEP,QAAQO,KAAK,CAACK,GAAG,CAAC,CAAC;QAOlF;;AAGR"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\n\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\n\nconst CustomPortal = memo(\n ({ content, ...props }: ComponentProps<typeof Portal>) => {\n useEffect(() => {}, []);\n return <Portal {...props}>{renderEmbedContent(content)}</Portal>;\n }\n);\n\nexport function EmbedContentSideRenderer({ body }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .filter((content) => content?.attrs?.side)\n .map((content) => {\n return (\n <CustomPortal\n key={`embed-content-side-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n content={content}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","memo","useEffect","useState","renderEmbedContent","CustomPortal","content","props","EmbedContentSideRenderer","body","mounted","setMounted","filter","attrs","side","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAElE,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,MAAMC,6BAAeJ,KACnB,CAAC,EAAEK,OAAO,EAAE,GAAGC,OAAsC;IACnDL,UAAU,KAAO,GAAG,EAAE;IACtB,qBAAO,KAACF;QAAQ,GAAGO,KAAK;kBAAGH,mBAAmBE;;AAChD;AAGF,OAAO,SAASE,yBAAyB,EAAEC,IAAI,EAAE;IAC/C,MAAM,CAACC,SAASC,WAAW,GAAGR,SAAS;IACvCD,UAAU;QACRS,WAAW;IACb,GAAG,EAAE;IAEL,IAAI,CAACD,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKH,OAAO,CACVM,MAAM,CAAC,CAACN,UAAYA,SAASO,OAAO,CAAC,UAAU,EAC/CD,MAAM,CAAC,CAACN,UAAYA,SAASO,OAAOC,MACpCC,GAAG,CAAC,CAACT;YACJ,qBACE,KAACD;gBAECW,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEZ,QAAQO,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAE3CP,SAASA;eAJJ,CAAC,mBAAmB,EAAEA,QAAQO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEP,QAAQO,KAAK,CAACM,GAAG,EAAE;QAOhF;;AAGR"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { Portal } from \"@radix-ui/react-portal\";\nimport { ComponentProps, memo, useEffect, useState } from \"react\";\n\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\n\nconst CustomPortal = memo(\n ({ content, ...props }: ComponentProps<typeof Portal>) => {\n useEffect(() => {}, []);\n return <Portal {...props}>{renderEmbedContent(content)}</Portal>;\n }\n);\n\nexport function EmbedContentSideRenderer({ body }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .filter((content) => content?.attrs?.side)\n .map((content) => {\n return (\n <CustomPortal\n key={`embed-content-side-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n content={content}\n />\n );\n })}\n </>\n );\n}\n"],"names":["Portal","memo","useEffect","useState","renderEmbedContent","CustomPortal","content","props","EmbedContentSideRenderer","body","mounted","setMounted","filter","attrs","side","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,SAAyBC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAElE,SAASC,kBAAkB,QAAQ,6BAA6B;AAEhE,MAAMC,6BAAeJ,KACnB,CAAC,EAAEK,OAAO,EAAE,GAAGC,OAAsC;IACnDL,UAAU,KAAO,GAAG,EAAE;IACtB,qBAAO,KAACF;QAAQ,GAAGO,KAAK;kBAAGH,mBAAmBE;;AAChD;AAGF,OAAO,SAASE,yBAAyB,EAAEC,IAAI,EAAE;IAC/C,MAAM,CAACC,SAASC,WAAW,GAAGR,SAAS;IACvCD,UAAU;QACRS,WAAW;IACb,GAAG,EAAE;IAEL,IAAI,CAACD,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKH,OAAO,CACVM,MAAM,CAAC,CAACN,UAAYA,SAASO,OAAO,CAAC,UAAU,EAC/CD,MAAM,CAAC,CAACN,UAAYA,SAASO,OAAOC,MACpCC,GAAG,CAAC,CAACT;YACJ,qBACE,KAACD;gBAECW,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEZ,QAAQO,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAE3CP,SAASA;eAJJ,CAAC,mBAAmB,EAAEA,QAAQO,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEP,QAAQO,KAAK,CAACM,GAAG,CAAC,CAAC;QAOhF;;AAGR"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\nconst HEIGHT = 320;\n\nfunction getContainerElement(containerId) {\n if (typeof window === \"undefined\" || !containerId) return null;\n return document.getElementById(containerId);\n}\n\nexport function EmbedContentSidebarRenderer({ body, containerId }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setTimeout(() => {\n setMounted(true);\n }, 200);\n }, []);\n const containerEl = useRef(getContainerElement(containerId));\n if (!mounted || typeof window === \"undefined\") return null;\n if (!containerEl.current) {\n containerEl.current = getContainerElement(containerId);\n }\n let lastRenderedPixel =\n containerEl.current?.getBoundingClientRect()?.top + window.scrollY ||\n window.innerHeight;\n\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .filter((content) => content?.attrs?.side)\n .map((content) => {\n const el = document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n );\n const relativeTopPosition = el.getBoundingClientRect().top;\n const topPosition = relativeTopPosition + window.scrollY;\n\n const tempBottomPixel = lastRenderedPixel;\n\n const marginTop = Math.max(\n 8,\n topPosition - tempBottomPixel - HEIGHT / 2\n );\n lastRenderedPixel = topPosition + HEIGHT;\n console.log(\n topPosition,\n tempBottomPixel,\n marginTop,\n window.innerHeight\n );\n return (\n <div\n key={`embed-content-sidebar-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n className=\"w-full\"\n style={{ marginTop }}\n >\n {renderEmbedContent(content)}\n </div>\n );\n })}\n </>\n );\n}\n"],"names":["useEffect","useRef","useState","renderEmbedContent","HEIGHT","getContainerElement","containerId","window","document","getElementById","EmbedContentSidebarRenderer","body","mounted","setMounted","setTimeout","containerEl","current","lastRenderedPixel","getBoundingClientRect","top","scrollY","innerHeight","content","filter","attrs","side","map","el","querySelector","relativeTopPosition","topPosition","tempBottomPixel","marginTop","Math","max","console","log","div","className","style","key"],"mappings":"AAAA;;AAEA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AACpD,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,MAAMC,SAAS;AAEf,SAASC,oBAAoBC,WAAW;IACtC,IAAI,OAAOC,WAAW,eAAe,CAACD,aAAa,OAAO;IAC1D,OAAOE,SAASC,cAAc,CAACH;AACjC;AAEA,OAAO,SAASI,4BAA4B,EAAEC,IAAI,EAAEL,WAAW,EAAE;IAC/D,MAAM,CAACM,SAASC,WAAW,GAAGX,SAAS;IACvCF,UAAU;QACRc,WAAW;YACTD,WAAW;QACb,GAAG;IACL,GAAG,EAAE;IACL,MAAME,cAAcd,OAAOI,oBAAoBC;IAC/C,IAAI,CAACM,WAAW,OAAOL,WAAW,aAAa,OAAO;IACtD,IAAI,CAACQ,YAAYC,OAAO,EAAE;QACxBD,YAAYC,OAAO,GAAGX,oBAAoBC;IAC5C;IACA,IAAIW,oBACFF,YAAYC,OAAO,EAAEE,yBAAyBC,MAAMZ,OAAOa,OAAO,IAClEb,OAAOc,WAAW;IAEpB,qBACE;kBACGV,KAAKW,OAAO,CACVC,MAAM,CAAC,CAACD,UAAYA,SAASE,OAAO,CAAC,UAAU,EAC/CD,MAAM,CAAC,CAACD,UAAYA,SAASE,OAAOC,MACpCC,GAAG,CAAC,CAACJ;YACJ,MAAMK,KAAKnB,UAAUoB,cACnB,CAAC,UAAU,EAAEN,QAAQE,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YAE3C,MAAMK,sBAAsBF,GAAGT,qBAAqB,GAAGC,GAAG;YAC1D,MAAMW,cAAcD,sBAAsBtB,OAAOa,OAAO;YAExD,MAAMW,kBAAkBd;YAExB,MAAMe,YAAYC,KAAKC,GAAG,CACxB,GACAJ,cAAcC,kBAAkB3B,SAAS;YAE3Ca,oBAAoBa,cAAc1B;YAClC+B,QAAQC,GAAG,CACTN,aACAC,iBACAC,WACAzB,OAAOc,WAAW;YAEpB,qBACE,KAACgB;gBAECC,WAAU;gBACVC,OAAO;oBAAEP;gBAAU;0BAElB7B,mBAAmBmB;eAJf,CAAC,sBAAsB,EAAEA,QAAQE,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEF,QAAQE,KAAK,CAACgB,GAAG,EAAE;QAOnF;;AAGR"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState } from \"react\";\nimport { renderEmbedContent } from \"./RenderEmbedClientSide.js\";\nconst HEIGHT = 320;\n\nfunction getContainerElement(containerId) {\n if (typeof window === \"undefined\" || !containerId) return null;\n return document.getElementById(containerId);\n}\n\nexport function EmbedContentSidebarRenderer({ body, containerId }) {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setTimeout(() => {\n setMounted(true);\n }, 200);\n }, []);\n const containerEl = useRef(getContainerElement(containerId));\n if (!mounted || typeof window === \"undefined\") return null;\n if (!containerEl.current) {\n containerEl.current = getContainerElement(containerId);\n }\n let lastRenderedPixel =\n containerEl.current?.getBoundingClientRect()?.top + window.scrollY ||\n window.innerHeight;\n\n return (\n <>\n {body.content\n .filter((content) => content?.attrs?.[\"data-id\"])\n .filter((content) => content?.attrs?.side)\n .map((content) => {\n const el = document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n );\n const relativeTopPosition = el.getBoundingClientRect().top;\n const topPosition = relativeTopPosition + window.scrollY;\n\n const tempBottomPixel = lastRenderedPixel;\n\n const marginTop = Math.max(\n 8,\n topPosition - tempBottomPixel - HEIGHT / 2\n );\n lastRenderedPixel = topPosition + HEIGHT;\n console.log(\n topPosition,\n tempBottomPixel,\n marginTop,\n window.innerHeight\n );\n return (\n <div\n key={`embed-content-sidebar-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n className=\"w-full\"\n style={{ marginTop }}\n >\n {renderEmbedContent(content)}\n </div>\n );\n })}\n </>\n );\n}\n"],"names":["useEffect","useRef","useState","renderEmbedContent","HEIGHT","getContainerElement","containerId","window","document","getElementById","EmbedContentSidebarRenderer","body","mounted","setMounted","setTimeout","containerEl","current","lastRenderedPixel","getBoundingClientRect","top","scrollY","innerHeight","content","filter","attrs","side","map","el","querySelector","relativeTopPosition","topPosition","tempBottomPixel","marginTop","Math","max","console","log","div","className","style","key"],"mappings":"AAAA;;AAEA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AACpD,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,MAAMC,SAAS;AAEf,SAASC,oBAAoBC,WAAW;IACtC,IAAI,OAAOC,WAAW,eAAe,CAACD,aAAa,OAAO;IAC1D,OAAOE,SAASC,cAAc,CAACH;AACjC;AAEA,OAAO,SAASI,4BAA4B,EAAEC,IAAI,EAAEL,WAAW,EAAE;IAC/D,MAAM,CAACM,SAASC,WAAW,GAAGX,SAAS;IACvCF,UAAU;QACRc,WAAW;YACTD,WAAW;QACb,GAAG;IACL,GAAG,EAAE;IACL,MAAME,cAAcd,OAAOI,oBAAoBC;IAC/C,IAAI,CAACM,WAAW,OAAOL,WAAW,aAAa,OAAO;IACtD,IAAI,CAACQ,YAAYC,OAAO,EAAE;QACxBD,YAAYC,OAAO,GAAGX,oBAAoBC;IAC5C;IACA,IAAIW,oBACFF,YAAYC,OAAO,EAAEE,yBAAyBC,MAAMZ,OAAOa,OAAO,IAClEb,OAAOc,WAAW;IAEpB,qBACE;kBACGV,KAAKW,OAAO,CACVC,MAAM,CAAC,CAACD,UAAYA,SAASE,OAAO,CAAC,UAAU,EAC/CD,MAAM,CAAC,CAACD,UAAYA,SAASE,OAAOC,MACpCC,GAAG,CAAC,CAACJ;YACJ,MAAMK,KAAKnB,UAAUoB,cACnB,CAAC,UAAU,EAAEN,QAAQE,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YAE3C,MAAMK,sBAAsBF,GAAGT,qBAAqB,GAAGC,GAAG;YAC1D,MAAMW,cAAcD,sBAAsBtB,OAAOa,OAAO;YAExD,MAAMW,kBAAkBd;YAExB,MAAMe,YAAYC,KAAKC,GAAG,CACxB,GACAJ,cAAcC,kBAAkB3B,SAAS;YAE3Ca,oBAAoBa,cAAc1B;YAClC+B,QAAQC,GAAG,CACTN,aACAC,iBACAC,WACAzB,OAAOc,WAAW;YAEpB,qBACE,KAACgB;gBAECC,WAAU;gBACVC,OAAO;oBAAEP;gBAAU;0BAElB7B,mBAAmBmB;eAJf,CAAC,sBAAsB,EAAEA,QAAQE,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEF,QAAQE,KAAK,CAACgB,GAAG,CAAC,CAAC;QAOnF;;AAGR"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/FacebookServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const FacebookServerside = Node.create({\n name: \"facebook\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"facebook\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-facebook\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"facebook\",\n class: `react-renderer node-facebook ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","FacebookServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAkB;QACtC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,6BAA6B,EAAEE,eAAeF,KAAK,EAAE;YAC/D;YACA;SACD;IACH;AACF,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/FacebookServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const FacebookServerside = Node.create({\n name: \"facebook\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"facebook\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-facebook\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"facebook\",\n class: `react-renderer node-facebook ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","FacebookServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAkB;QACtC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,6BAA6B,EAAEE,eAAeF,KAAK,CAAC,CAAC;YAC/D;YACA;SACD;IACH;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InstagramServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const InstagramServerside = Node.create({\n name: \"instagram\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"instagram\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-instagram\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"instagram\",\n class: `react-renderer node-instagram ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","InstagramServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,sBAAsBF,KAAKG,MAAM,CAAC;IAC7CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAmB;QACvC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,8BAA8B,EAAEE,eAAeF,KAAK,EAAE;YAChE;YACA;SACD;IACH;AACF,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InstagramServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const InstagramServerside = Node.create({\n name: \"instagram\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"instagram\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-instagram\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"instagram\",\n class: `react-renderer node-instagram ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","InstagramServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,sBAAsBF,KAAKG,MAAM,CAAC;IAC7CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAmB;QACvC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,8BAA8B,EAAEE,eAAeF,KAAK,CAAC,CAAC;YAChE;YACA;SACD;IACH;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const LinkedinServerside = Node.create({\n name: \"linkedin\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"linkedin\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-tiktok\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"linkedin\",\n class: `react-renderer node-linkedin ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","LinkedinServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAgB;QACpC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,6BAA6B,EAAEE,eAAeF,KAAK,EAAE;YAC/D;YACA;SACD;IACH;AACF,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const LinkedinServerside = Node.create({\n name: \"linkedin\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"linkedin\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-tiktok\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"linkedin\",\n class: `react-renderer node-linkedin ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","LinkedinServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,qBAAqBF,KAAKG,MAAM,CAAC;IAC5CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAgB;QACpC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,6BAA6B,EAAEE,eAAeF,KAAK,CAAC,CAAC;YAC/D;YACA;SACD;IACH;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/TiktokServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const TiktokServerside = Node.create({\n name: \"tiktok\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"tiktok\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-tiktok\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"tiktok\",\n class: `react-renderer node-tiktok ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","TiktokServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,mBAAmBF,KAAKG,MAAM,CAAC;IAC1CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAgB;QACpC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,2BAA2B,EAAEE,eAAeF,KAAK,EAAE;YAC7D;YACA;SACD;IACH;AACF,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/TiktokServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const TiktokServerside = Node.create({\n name: \"tiktok\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"tiktok\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-tiktok\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"tiktok\",\n class: `react-renderer node-tiktok ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","TiktokServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,mBAAmBF,KAAKG,MAAM,CAAC;IAC1CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAgB;QACpC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,2BAA2B,EAAEE,eAAeF,KAAK,CAAC,CAAC;YAC7D;YACA;SACD;IACH;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const TwitterBlockServerside = Node.create({\n name: \"twitter\",\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"twitter\"',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-twitter\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"twitter\",\n class: `react-renderer node-twitter ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","TwitterBlockServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,yBAAyBF,KAAKG,MAAM,CAAC;IAChDC,MAAM;IACNC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAiB;QACrC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,4BAA4B,EAAEE,eAAeF,KAAK,EAAE;YAC9D;YACA;SACD;IACH;AACF,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const TwitterBlockServerside = Node.create({\n name: \"twitter\",\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"twitter\"',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-twitter\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"twitter\",\n class: `react-renderer node-twitter ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","TwitterBlockServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,yBAAyBF,KAAKG,MAAM,CAAC;IAChDC,MAAM;IACNC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAiB;QACrC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,4BAA4B,EAAEE,eAAeF,KAAK,CAAC,CAAC;YAC9D;YACA;SACD;IACH;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const YouTubeServerside = Node.create({\n name: \"youtube\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"youtube\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-youtube\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"youtube\",\n class: `react-renderer node-youtube ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","YouTubeServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,oBAAoBF,KAAKG,MAAM,CAAC;IAC3CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAiB;QACrC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,4BAA4B,EAAEE,eAAeF,KAAK,EAAE;YAC9D;YACA;SACD;IACH;AACF,GAAG"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const YouTubeServerside = Node.create({\n name: \"youtube\",\n\n group: \"block\",\n content: \"inline*\",\n\n parseHTML() {\n return [\n {\n tag: 'a[data-type=\"youtube\"]',\n },\n ];\n },\n addAttributes() {\n return {\n url: { default: null },\n \"data-id\": { default: null },\n class: { default: \"inline-youtube\" },\n };\n },\n renderHTML({ HTMLAttributes }) {\n return [\n \"a\",\n mergeAttributes(HTMLAttributes, {\n \"data-type\": \"youtube\",\n class: `react-renderer node-youtube ${HTMLAttributes.class}`,\n }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","YouTubeServerside","create","name","group","content","parseHTML","tag","addAttributes","url","default","class","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,oBAAoBF,KAAKG,MAAM,CAAC;IAC3CC,MAAM;IAENC,OAAO;IACPC,SAAS;IAETC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IACAC;QACE,OAAO;YACLC,KAAK;gBAAEC,SAAS;YAAK;YACrB,WAAW;gBAAEA,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAiB;QACrC;IACF;IACAE,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACAb,gBAAgBa,gBAAgB;gBAC9B,aAAa;gBACbF,OAAO,CAAC,4BAA4B,EAAEE,eAAeF,KAAK,CAAC,CAAC;YAC9D;YACA;SACD;IACH;AACF,GAAG"}
@@ -0,0 +1,2 @@
1
+ export declare function appendIdToClientsideBlocks(body: any): any;
2
+ //# sourceMappingURL=useAppendIdToClientsideBlocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppendIdToClientsideBlocks.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"names":[],"mappings":"AAeA,wBAAgB,0BAA0B,CAAC,IAAI,KAAA,OAqB9C"}
@@ -0,0 +1,35 @@
1
+ const FILTERED_ARTICLE = [
2
+ "imageUpload"
3
+ ];
4
+ const SOCIAL_MEDIA = [
5
+ "twitter",
6
+ "youtube",
7
+ "facebook",
8
+ "instagram",
9
+ "linkedin",
10
+ "tiktok",
11
+ "imageBlock",
12
+ "videoBlock",
13
+ "insideLink"
14
+ ];
15
+ export function appendIdToClientsideBlocks(body) {
16
+ if (!body) return body;
17
+ return {
18
+ ...body,
19
+ content: body?.content?.filter((c)=>!FILTERED_ARTICLE.includes(c.type))?.map((block, index)=>{
20
+ if (SOCIAL_MEDIA.includes(block.type)) {
21
+ return {
22
+ ...block,
23
+ attrs: {
24
+ ...block.attrs,
25
+ "data-id": index,
26
+ key: Math.random()
27
+ }
28
+ };
29
+ }
30
+ return block;
31
+ })
32
+ };
33
+ }
34
+
35
+ //# sourceMappingURL=useAppendIdToClientsideBlocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nconst FILTERED_ARTICLE = [\"imageUpload\"];\n\nconst SOCIAL_MEDIA = [\n \"twitter\",\n \"youtube\",\n \"facebook\",\n \"instagram\",\n \"linkedin\",\n \"tiktok\",\n \"imageBlock\",\n \"videoBlock\",\n \"insideLink\",\n];\nexport function appendIdToClientsideBlocks(body) {\n if (!body) return body;\n return {\n ...body,\n content: body?.content\n ?.filter((c) => !FILTERED_ARTICLE.includes(c.type))\n ?.map((block, index) => {\n if (SOCIAL_MEDIA.includes(block.type)) {\n return {\n ...block,\n attrs: {\n ...block.attrs,\n \"data-id\": index,\n key: Math.random(),\n },\n };\n }\n\n return block;\n }),\n };\n}\n"],"names":["FILTERED_ARTICLE","SOCIAL_MEDIA","appendIdToClientsideBlocks","body","content","filter","c","includes","type","map","block","index","attrs","key","Math","random"],"mappings":"AAEA,MAAMA,mBAAmB;IAAC;CAAc;AAExC,MAAMC,eAAe;IACnB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AACD,OAAO,SAASC,2BAA2BC,IAAI;IAC7C,IAAI,CAACA,MAAM,OAAOA;IAClB,OAAO;QACL,GAAGA,IAAI;QACPC,SAASD,MAAMC,SACXC,OAAO,CAACC,IAAM,CAACN,iBAAiBO,QAAQ,CAACD,EAAEE,IAAI,IAC/CC,IAAI,CAACC,OAAOC;YACZ,IAAIV,aAAaM,QAAQ,CAACG,MAAMF,IAAI,GAAG;gBACrC,OAAO;oBACL,GAAGE,KAAK;oBACRE,OAAO;wBACL,GAAGF,MAAME,KAAK;wBACd,WAAWD;wBACXE,KAAKC,KAAKC,MAAM;oBAClB;gBACF;YACF;YAEA,OAAOL;QACT;IACJ;AACF"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Editor } from "@tiptap/react";
3
+ export declare const Sidebar: React.MemoExoticComponent<({ editor, isOpen, onClose, }: {
4
+ editor: Editor;
5
+ isOpen?: boolean;
6
+ onClose: () => void;
7
+ }) => React.JSX.Element>;
8
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/features/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,eAAO,MAAM,OAAO,2DAKf;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,uBA2BF,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import { memo, useCallback } from "react";
5
+ import { TableOfContents } from "../TableOfContents/index.js";
6
+ import { cn } from "../../lib/utils/index.js";
7
+ export const Sidebar = /*#__PURE__*/ memo(({ editor, isOpen, onClose })=>{
8
+ const handlePotentialClose = useCallback(()=>{
9
+ if (window.innerWidth < 1024) {
10
+ onClose();
11
+ }
12
+ }, [
13
+ onClose
14
+ ]);
15
+ const windowClassName = cn("absolute top-0 left-0 bg-white lg:bg-white/30 lg:backdrop-blur-xl h-full lg:h-auto lg:relative z-[999] w-0 duration-300 transition-all", "dark:bg-black lg:dark:bg-black/30", !isOpen && "border-r-transparent", isOpen && "w-80 border-r border-r-neutral-200 dark:border-r-neutral-800");
16
+ return /*#__PURE__*/ _jsx("div", {
17
+ className: windowClassName,
18
+ children: /*#__PURE__*/ _jsx("div", {
19
+ className: "w-full h-full overflow-hidden",
20
+ children: /*#__PURE__*/ _jsx("div", {
21
+ className: "w-full h-full p-2 overflow-auto",
22
+ children: /*#__PURE__*/ _jsx(TableOfContents, {
23
+ onItemClick: handlePotentialClose,
24
+ editor: editor
25
+ })
26
+ })
27
+ })
28
+ });
29
+ });
30
+ Sidebar.displayName = "TableOfContentSidepanel";
31
+
32
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/features/Sidebar/Sidebar.tsx"],"sourcesContent":["\"use client\";\nimport React from \"react\";\nimport { memo, useCallback } from \"react\";\nimport { Editor } from \"@tiptap/react\";\nimport { TableOfContents } from \"../TableOfContents/index.js\";\nimport { cn } from \"../../lib/utils/index.js\";\n\nexport const Sidebar = memo(\n ({\n editor,\n isOpen,\n onClose,\n }: {\n editor: Editor;\n isOpen?: boolean;\n onClose: () => void;\n }) => {\n const handlePotentialClose = useCallback(() => {\n if (window.innerWidth < 1024) {\n onClose();\n }\n }, [onClose]);\n\n const windowClassName = cn(\n \"absolute top-0 left-0 bg-white lg:bg-white/30 lg:backdrop-blur-xl h-full lg:h-auto lg:relative z-[999] w-0 duration-300 transition-all\",\n \"dark:bg-black lg:dark:bg-black/30\",\n !isOpen && \"border-r-transparent\",\n isOpen && \"w-80 border-r border-r-neutral-200 dark:border-r-neutral-800\"\n );\n\n return (\n <div className={windowClassName}>\n <div className=\"w-full h-full overflow-hidden\">\n <div className=\"w-full h-full p-2 overflow-auto\">\n <TableOfContents\n onItemClick={handlePotentialClose}\n editor={editor}\n />\n </div>\n </div>\n </div>\n );\n }\n);\n\nSidebar.displayName = \"TableOfContentSidepanel\";\n"],"names":["React","memo","useCallback","TableOfContents","cn","Sidebar","editor","isOpen","onClose","handlePotentialClose","window","innerWidth","windowClassName","div","className","onItemClick","displayName"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAQ;AAC1B,SAASC,IAAI,EAAEC,WAAW,QAAQ,QAAQ;AAE1C,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,EAAE,QAAQ,2BAA2B;AAE9C,OAAO,MAAMC,wBAAUJ,KACrB,CAAC,EACCK,MAAM,EACNC,MAAM,EACNC,OAAO,EAKR;IACC,MAAMC,uBAAuBP,YAAY;QACvC,IAAIQ,OAAOC,UAAU,GAAG,MAAM;YAC5BH;QACF;IACF,GAAG;QAACA;KAAQ;IAEZ,MAAMI,kBAAkBR,GACtB,0IACA,qCACA,CAACG,UAAU,wBACXA,UAAU;IAGZ,qBACE,KAACM;QAAIC,WAAWF;kBACd,cAAA,KAACC;YAAIC,WAAU;sBACb,cAAA,KAACD;gBAAIC,WAAU;0BACb,cAAA,KAACX;oBACCY,aAAaN;oBACbH,QAAQA;;;;;AAMpB,GACA;AAEFD,QAAQW,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ export * from "./Sidebar.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/features/Sidebar/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./Sidebar.js";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/features/Sidebar/index.tsx"],"sourcesContent":["export * from \"./Sidebar.js\";\n"],"names":[],"mappings":"AAAA,cAAc,eAAe"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Editor as CoreEditor } from "@tiptap/core";
3
+ export type TableOfContentsProps = {
4
+ editor: CoreEditor;
5
+ onItemClick?: () => void;
6
+ };
7
+ export declare const TableOfContents: React.MemoExoticComponent<({ editor, onItemClick }: TableOfContentsProps) => React.JSX.Element>;
8
+ //# sourceMappingURL=TableOfContents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableOfContents.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/features/TableOfContents/TableOfContents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAOpD,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,sDACA,oBAAoB,uBAoD/C,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { memo, useEffect, useState } from "react";
4
+ import { cn } from "../../lib/utils/index.js";
5
+ // import { toTranslationKey } from '@/languages'
6
+ import { useTranslation } from "@payloadcms/ui/providers/Translation";
7
+ export const TableOfContents = /*#__PURE__*/ memo(({ editor, onItemClick })=>{
8
+ const [data, setData] = useState(null);
9
+ useEffect(()=>{
10
+ const handler = ({ editor: currentEditor })=>{
11
+ setData({
12
+ ...currentEditor.extensionStorage.tableOfContents
13
+ });
14
+ };
15
+ handler({
16
+ editor
17
+ });
18
+ editor.on("update", handler);
19
+ editor.on("selectionUpdate", handler);
20
+ return ()=>{
21
+ editor.off("update", handler);
22
+ editor.off("selectionUpdate", handler);
23
+ };
24
+ }, [
25
+ editor
26
+ ]);
27
+ const { i18n } = useTranslation();
28
+ return /*#__PURE__*/ _jsxs("div", {
29
+ lang: i18n.language,
30
+ children: [
31
+ /*#__PURE__*/ _jsx("div", {
32
+ className: "mb-2 text-xs font-semibold uppercase text-neutral-500 dark:text-neutral-400"
33
+ }),
34
+ data && data.content.length > 0 ? /*#__PURE__*/ _jsx("div", {
35
+ className: "flex flex-col gap-1",
36
+ children: data.content.map((item)=>/*#__PURE__*/ _jsxs("a", {
37
+ href: `#${item.id}`,
38
+ style: {
39
+ marginLeft: `${1 * item.level - 1}rem`
40
+ },
41
+ onClick: onItemClick,
42
+ className: cn("block font-medium text-neutral-500 dark:text-neutral-300 p-1 rounded bg-opacity-10 text-sm hover:text-neutral-800 transition-all hover:bg-black hover:bg-opacity-5 truncate w-full", item.isActive && "text-neutral-800 bg-neutral-100 dark:text-neutral-100 dark:bg-neutral-900"),
43
+ children: [
44
+ item.itemIndex,
45
+ ". ",
46
+ item.textContent
47
+ ]
48
+ }, item.id))
49
+ }) : /*#__PURE__*/ _jsx("div", {
50
+ className: "text-sm text-neutral-500"
51
+ })
52
+ ]
53
+ });
54
+ });
55
+ TableOfContents.displayName = "TableOfContents";
56
+
57
+ //# sourceMappingURL=TableOfContents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/features/TableOfContents/TableOfContents.tsx"],"sourcesContent":["import React from \"react\";\nimport { Editor as CoreEditor } from \"@tiptap/core\";\nimport { memo, useEffect, useState } from \"react\";\nimport { TableOfContentsStorage } from \"@tiptap-pro/extension-table-of-contents\";\nimport { cn } from \"../../lib/utils/index.js\";\n// import { toTranslationKey } from '@/languages'\nimport { useTranslation } from \"@payloadcms/ui/providers/Translation\";\n\nexport type TableOfContentsProps = {\n editor: CoreEditor;\n onItemClick?: () => void;\n};\n\nexport const TableOfContents = memo(\n ({ editor, onItemClick }: TableOfContentsProps) => {\n const [data, setData] = useState<TableOfContentsStorage | null>(null);\n\n useEffect(() => {\n const handler = ({ editor: currentEditor }: { editor: CoreEditor }) => {\n setData({ ...currentEditor.extensionStorage.tableOfContents });\n };\n\n handler({ editor });\n\n editor.on(\"update\", handler);\n editor.on(\"selectionUpdate\", handler);\n\n return () => {\n editor.off(\"update\", handler);\n editor.off(\"selectionUpdate\", handler);\n };\n }, [editor]);\n const { i18n } = useTranslation();\n\n return (\n <div lang={i18n.language}>\n <div className=\"mb-2 text-xs font-semibold uppercase text-neutral-500 dark:text-neutral-400\">\n {/* {toTranslationKey('table_of_contents')}Table of Contents */}\n </div>\n {data && data.content.length > 0 ? (\n <div className=\"flex flex-col gap-1\">\n {data.content.map((item) => (\n <a\n key={item.id}\n href={`#${item.id}`}\n style={{ marginLeft: `${1 * item.level - 1}rem` }}\n onClick={onItemClick}\n className={cn(\n \"block font-medium text-neutral-500 dark:text-neutral-300 p-1 rounded bg-opacity-10 text-sm hover:text-neutral-800 transition-all hover:bg-black hover:bg-opacity-5 truncate w-full\",\n item.isActive &&\n \"text-neutral-800 bg-neutral-100 dark:text-neutral-100 dark:bg-neutral-900\"\n )}\n >\n {item.itemIndex}. {item.textContent}\n </a>\n ))}\n </div>\n ) : (\n <div className=\"text-sm text-neutral-500\">\n {/* Start adding headlines to your document */}\n {/* {toTranslationKey(\"start_adding_headlines_to_your_document\")} */}\n </div>\n )}\n </div>\n );\n }\n);\n\nTableOfContents.displayName = \"TableOfContents\";\n"],"names":["React","memo","useEffect","useState","cn","useTranslation","TableOfContents","editor","onItemClick","data","setData","handler","currentEditor","extensionStorage","tableOfContents","on","off","i18n","div","lang","language","className","content","length","map","item","a","href","id","style","marginLeft","level","onClick","isActive","itemIndex","textContent","displayName"],"mappings":";AAAA,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AAEFf,gBAAgB8B,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ export * from "./TableOfContents.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/features/TableOfContents/index.tsx"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./TableOfContents.js";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/features/TableOfContents/index.tsx"],"sourcesContent":["export * from \"./TableOfContents.js\";\n"],"names":[],"mappings":"AAAA,cAAc,uBAAuB"}