payload-richtext-tiptap 0.0.86 → 0.0.87

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEmbedSupport.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE;;CAAA,+BAsH3C"}
1
+ {"version":3,"file":"ContentEmbedSupport.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/ContentEmbedSupport.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE;;CAAA,+BAuH3C"}
@@ -7,6 +7,7 @@ import { FacebookEmbed, InstagramEmbed, LinkedInEmbed, TikTokEmbed, XEmbed, YouT
7
7
  import { cn } from "../../lib/utils/index.js";
8
8
  import VideoBlockViewClientside from "../VideoBlock/components/VideoBlockViewClientside.js";
9
9
  import { SocialMediaEmbedServerside } from "../SocialMedia/SocialMediaEmbedServerside.js";
10
+ import InsideLinksComponent from "../InsideLinks/InsideLinksComponent.js";
10
11
  function checkIfValidLink(link) {
11
12
  return typeof link === "string";
12
13
  }
@@ -99,6 +100,10 @@ export function ContentEmbedSupport({ body }) {
99
100
  height: 570
100
101
  })
101
102
  });
103
+ case "insideLinks":
104
+ return /*#__PURE__*/ _jsx(InsideLinksComponent, {
105
+ ...content
106
+ });
102
107
  default:
103
108
  return null;
104
109
  }
@@ -1 +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 { 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\";\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 const 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 <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 src={content.attrs.src}\n alt={content.attrs.caption || \"\"}\n fill\n />\n </div>\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\n default:\n return null;\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 <Portal\n key={`embed-content-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n >\n {renderContent(content)}\n </Portal>\n );\n })}\n </>\n );\n}\n"],"names":["Portal","Image","useEffect","useState","FacebookEmbed","InstagramEmbed","LinkedInEmbed","TikTokEmbed","XEmbed","YouTubeEmbed","cn","VideoBlockViewClientside","SocialMediaEmbedServerside","checkIfValidLink","link","ContentEmbedSupport","body","mounted","setMounted","renderContent","content","type","attrs","url","width","className","captioned","div","height","style","src","alt","caption","fill","node","filter","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,OAAOC,WAAW,gBAAgB;AAClC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAC5C,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;AAE1F,SAASC,iBAAiBC,IAAY;IACpC,OAAO,OAAOA,SAAS;AACzB;AACA,OAAO,SAASC,oBAAoB,EAAEC,IAAI,EAAE;IAC1C,MAAM,CAACC,SAASC,WAAW,GAAGf,SAAS;IACvCD,UAAU;QACRgB,WAAW;IACb,GAAG,EAAE;IAEL,MAAMC,gBAAgB,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AC9BC,IAAI;;;YAIZ,KAAK;gBACH,aAAa;gBACb,qBAAO,KAACtB;oBAAyBuB,MAAMd;;YACzC,KAAK;gBACH,qBACE,KAACR;8BACC,cAAA,KAACR;wBAAcmB,KAAKH,QAAQE,KAAK,CAACC,GAAG,IAAI;wBAAIC,OAAO;;;YAG1D,KAAK;gBACH,IAAI,CAACX,iBAAiBO,QAAQE,KAAK,CAACC,GAAG,GAAG;oBACxC,OAAO;gBACT;gBACA,qBACE,KAACX;8BACC,cAAA,KAACN;wBACCiB,KAAKH,QAAQE,KAAK,CAACC,GAAG,IAAI;wBAC1BC,OAAO;wBACPI,QAAQ;;;YAKhB;gBACE,OAAO;QACX;IACF;IACA,IAAI,CAACX,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKI,OAAO,CACVe,MAAM,CAAC,CAACf,UAAYA,SAASE,OAAO,CAAC,UAAU,EAC/Cc,GAAG,CAAC,CAAChB;YACJ,qBACE,KAACpB;gBAECqC,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEnB,QAAQE,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;0BAG1CH,cAAcC;eALV,CAAC,cAAc,EAAEA,QAAQE,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEF,QAAQE,KAAK,CAACkB,GAAG,EAAE;QAQ3E;;AAGR"}
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 { 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\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 const 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 <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 src={content.attrs.src}\n alt={content.attrs.caption || \"\"}\n fill\n />\n </div>\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 default:\n return null;\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 <Portal\n key={`embed-content-${content.attrs[\"data-id\"]}-${content.attrs.key}`}\n container={document?.querySelector(\n `[data-id='${content.attrs[\"data-id\"]}']`\n )}\n >\n {renderContent(content)}\n </Portal>\n );\n })}\n </>\n );\n}\n"],"names":["Portal","Image","useEffect","useState","FacebookEmbed","InstagramEmbed","LinkedInEmbed","TikTokEmbed","XEmbed","YouTubeEmbed","cn","VideoBlockViewClientside","SocialMediaEmbedServerside","InsideLinksComponent","checkIfValidLink","link","ContentEmbedSupport","body","mounted","setMounted","renderContent","content","type","attrs","url","width","className","captioned","div","height","style","src","alt","caption","fill","node","filter","map","container","document","querySelector","key"],"mappings":"AAAA;;AAEA,SAASA,MAAM,QAAQ,yBAAyB;AAChD,OAAOC,WAAW,gBAAgB;AAClC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AAC5C,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,SAASC,iBAAiBC,IAAY;IACpC,OAAO,OAAOA,SAAS;AACzB;AACA,OAAO,SAASC,oBAAoB,EAAEC,IAAI,EAAE;IAC1C,MAAM,CAACC,SAASC,WAAW,GAAGhB,SAAS;IACvCD,UAAU;QACRiB,WAAW;IACb,GAAG,EAAE;IAEL,MAAMC,gBAAgB,CAACC;QACrB,OAAQA,QAAQC,IAAI;YAClB,KAAK;gB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;gBACb,qBAAO,KAACvB;oBAAyBwB,MAAMd;;YACzC,KAAK;gBACH,qBACE,KAACT;8BACC,cAAA,KAACR;wBAAcoB,KAAKH,QAAQE,KAAK,CAACC,GAAG,IAAI;wBAAIC,OAAO;;;YAG1D,KAAK;gBACH,IAAI,CAACX,iBAAiBO,QAAQE,KAAK,CAACC,GAAG,GAAG;oBACxC,OAAO;gBACT;gBACA,qBACE,KAACZ;8BACC,cAAA,KAACN;wBACCkB,KAAKH,QAAQE,KAAK,CAACC,GAAG,IAAI;wBAC1BC,OAAO;wBACPI,QAAQ;;;YAIhB,KAAK;gBACH,qBAAO,KAAChB;oBAAsB,GAAGQ,OAAO;;YAC1C;gBACE,OAAO;QACX;IACF;IACA,IAAI,CAACH,SAAS,OAAO;IACrB,qBACE;kBACGD,KAAKI,OAAO,CACVe,MAAM,CAAC,CAACf,UAAYA,SAASE,OAAO,CAAC,UAAU,EAC/Cc,GAAG,CAAC,CAAChB;YACJ,qBACE,KAACrB;gBAECsC,WAAWC,UAAUC,cACnB,CAAC,UAAU,EAAEnB,QAAQE,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;0BAG1CH,cAAcC;eALV,CAAC,cAAc,EAAEA,QAAQE,KAAK,CAAC,UAAU,CAAC,CAAC,EAAEF,QAAQE,KAAK,CAACkB,GAAG,EAAE;QAQ3E;;AAGR"}
@@ -0,0 +1,3 @@
1
+ import { Node } from "@tiptap/core";
2
+ export declare const InsideLinkServerside: Node<any, any>;
3
+ //# sourceMappingURL=InsideLinkServerside.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsideLinkServerside.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InsideLinkServerside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAErD,eAAO,MAAM,oBAAoB,gBAgD/B,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { Node, mergeAttributes } from "@tiptap/core";
2
+ export const InsideLinkServerside = Node.create({
3
+ name: "insideLinks",
4
+ group: "block",
5
+ content: "inline*",
6
+ draggable: true,
7
+ // content: 'inline*',
8
+ parseHTML () {
9
+ return [
10
+ {
11
+ tag: 'div[data-type="insideLinks"]'
12
+ }
13
+ ];
14
+ },
15
+ addAttributes () {
16
+ return {
17
+ thumbnail: {
18
+ default: null
19
+ },
20
+ title: {
21
+ default: null
22
+ },
23
+ id: {
24
+ default: null
25
+ },
26
+ type: {
27
+ default: null
28
+ },
29
+ url: {
30
+ default: null
31
+ }
32
+ };
33
+ },
34
+ addKeyboardShortcuts () {
35
+ return {
36
+ "Mod-Enter": ()=>{
37
+ return this.editor.chain().insertContentAt(this.editor.state.selection.head, {
38
+ type: this.type.name
39
+ }).focus().run();
40
+ }
41
+ };
42
+ },
43
+ renderHTML ({ HTMLAttributes }) {
44
+ return [
45
+ "div",
46
+ mergeAttributes(HTMLAttributes, {
47
+ "data-type": "insideLinks"
48
+ }),
49
+ 0
50
+ ];
51
+ }
52
+ });
53
+
54
+ //# sourceMappingURL=InsideLinkServerside.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/InsideLinkServerside.ts"],"sourcesContent":["import { Node, mergeAttributes } from \"@tiptap/core\";\n\nexport const InsideLinkServerside = Node.create({\n name: \"insideLinks\",\n\n group: \"block\",\n content: \"inline*\",\n draggable: true,\n\n // content: 'inline*',\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"insideLinks\"]',\n },\n ];\n },\n\n addAttributes() {\n return {\n thumbnail: { default: null },\n title: { default: null },\n id: { default: null },\n type: { default: null },\n url: { default: null },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n \"Mod-Enter\": () => {\n return this.editor\n .chain()\n .insertContentAt(this.editor.state.selection.head, {\n type: this.type.name,\n })\n .focus()\n .run();\n },\n };\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"div\",\n mergeAttributes(HTMLAttributes, { \"data-type\": \"insideLinks\" }),\n 0,\n ];\n },\n});\n"],"names":["Node","mergeAttributes","InsideLinkServerside","create","name","group","content","draggable","parseHTML","tag","addAttributes","thumbnail","default","title","id","type","url","addKeyboardShortcuts","editor","chain","insertContentAt","state","selection","head","focus","run","renderHTML","HTMLAttributes"],"mappings":"AAAA,SAASA,IAAI,EAAEC,eAAe,QAAQ,eAAe;AAErD,OAAO,MAAMC,uBAAuBF,KAAKG,MAAM,CAAC;IAC9CC,MAAM;IAENC,OAAO;IACPC,SAAS;IACTC,WAAW;IAEX,sBAAsB;IAEtBC;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;IAEAC;QACE,OAAO;YACLC,WAAW;gBAAEC,SAAS;YAAK;YAC3BC,OAAO;gBAAED,SAAS;YAAK;YACvBE,IAAI;gBAAEF,SAAS;YAAK;YACpBG,MAAM;gBAAEH,SAAS;YAAK;YACtBI,KAAK;gBAAEJ,SAAS;YAAK;QACvB;IACF;IAEAK;QACE,OAAO;YACL,aAAa;gBACX,OAAO,IAAI,CAACC,MAAM,CACfC,KAAK,GACLC,eAAe,CAAC,IAAI,CAACF,MAAM,CAACG,KAAK,CAACC,SAAS,CAACC,IAAI,EAAE;oBACjDR,MAAM,IAAI,CAACA,IAAI,CAACX,IAAI;gBACtB,GACCoB,KAAK,GACLC,GAAG;YACR;QACF;IACF;IAEAC,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YACL;YACA1B,gBAAgB0B,gBAAgB;gBAAE,aAAa;YAAc;YAC7D;SACD;IACH;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAppendIdToClientsideBlocks.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"names":[],"mappings":"AAYA,wBAAgB,0BAA0B,CAAC,IAAI,KAAA,OAa9C"}
1
+ {"version":3,"file":"useAppendIdToClientsideBlocks.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"names":[],"mappings":"AAaA,wBAAgB,0BAA0B,CAAC,IAAI,KAAA,OAa9C"}
@@ -6,7 +6,8 @@ const SOCIAL_MEDIA = [
6
6
  "linkedin",
7
7
  "tiktok",
8
8
  "imageBlock",
9
- "videoBlock"
9
+ "videoBlock",
10
+ "insideLink"
10
11
  ];
11
12
  export function appendIdToClientsideBlocks(body) {
12
13
  if (!body) return body;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nconst SOCIAL_MEDIA = [\n \"twitter\",\n \"youtube\",\n \"facebook\",\n \"instagram\",\n \"linkedin\",\n \"tiktok\",\n \"imageBlock\",\n \"videoBlock\",\n];\nexport function appendIdToClientsideBlocks(body) {\n if (!body) return body;\n return {\n ...body,\n content: body?.content?.map((c, index) => {\n if (SOCIAL_MEDIA.includes(c.type)) {\n c.attrs[\"data-id\"] = index;\n c.key = Math.random();\n }\n\n return c;\n }),\n };\n}\n"],"names":["SOCIAL_MEDIA","appendIdToClientsideBlocks","body","content","map","c","index","includes","type","attrs","key","Math","random"],"mappings":"AAEA,MAAMA,eAAe;IACnB;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,SAASC,IAAI,CAACC,GAAGC;YAC9B,IAAIN,aAAaO,QAAQ,CAACF,EAAEG,IAAI,GAAG;gBACjCH,EAAEI,KAAK,CAAC,UAAU,GAAGH;gBACrBD,EAAEK,GAAG,GAAGC,KAAKC,MAAM;YACrB;YAEA,OAAOP;QACT;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"sourcesContent":["import { useCallback } from \"react\";\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?.map((c, index) => {\n if (SOCIAL_MEDIA.includes(c.type)) {\n c.attrs[\"data-id\"] = index;\n c.key = Math.random();\n }\n\n return c;\n }),\n };\n}\n"],"names":["SOCIAL_MEDIA","appendIdToClientsideBlocks","body","content","map","c","index","includes","type","attrs","key","Math","random"],"mappings":"AAEA,MAAMA,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,SAASC,IAAI,CAACC,GAAGC;YAC9B,IAAIN,aAAaO,QAAQ,CAACF,EAAEG,IAAI,GAAG;gBACjCH,EAAEI,KAAK,CAAC,UAAU,GAAGH;gBACrBD,EAAEK,GAAG,GAAGC,KAAKC,MAAM;YACrB;YAEA,OAAOP;QACT;IACF;AACF"}
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  /*
110
- ! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com
110
+ ! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com
111
111
  */
112
112
 
113
113
  /*