payload-richtext-tiptap 0.0.99 → 0.0.101

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":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.js"],"names":[],"mappings":"AAAA,mDAAoD;AACpD,iDAAkD;AAClD,4DAA6D"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../../../../../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 +1 @@
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"}
1
+ {"version":3,"file":"useAppendIdToClientsideBlocks.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/useAppendIdToClientsideBlocks.ts"],"names":[],"mappings":"AAeA,wBAAgB,0BAA0B,CAAC,IAAI,KAAA,OAe9C"}
@@ -1,3 +1,6 @@
1
+ const FILTERED_ARTICLE = [
2
+ "imageUpload"
3
+ ];
1
4
  const SOCIAL_MEDIA = [
2
5
  "twitter",
3
6
  "youtube",
@@ -13,7 +16,7 @@ export function appendIdToClientsideBlocks(body) {
13
16
  if (!body) return body;
14
17
  return {
15
18
  ...body,
16
- content: body?.content?.map((c, index)=>{
19
+ content: body?.content?.filter((c)=>!FILTERED_ARTICLE.includes(c.type))?.map((c, index)=>{
17
20
  if (SOCIAL_MEDIA.includes(c.type)) {
18
21
  c.attrs["data-id"] = index;
19
22
  c.key = Math.random();
@@ -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 \"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"}
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((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":["FILTERED_ARTICLE","SOCIAL_MEDIA","appendIdToClientsideBlocks","body","content","filter","c","includes","type","map","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,CAACH,GAAGI;YACR,IAAIT,aAAaM,QAAQ,CAACD,EAAEE,IAAI,GAAG;gBACjCF,EAAEK,KAAK,CAAC,UAAU,GAAGD;gBACrBJ,EAAEM,GAAG,GAAGC,KAAKC,MAAM;YACrB;YAEA,OAAOR;QACT;IACJ;AACF"}