payload-richtext-tiptap 0.0.147 → 0.0.148

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 (46) hide show
  1. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js +3 -3
  2. package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js.map +1 -1
  3. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.d.ts.map +1 -1
  4. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.js +6 -4
  5. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.js.map +1 -1
  6. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.d.ts +1 -0
  7. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.d.ts.map +1 -1
  8. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.js +3 -2
  9. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.js.map +1 -1
  10. package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.d.ts.map +1 -1
  11. package/dist/src/fields/TiptapEditor/extensions/extension-kit.d.ts +1 -1
  12. package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.d.ts +1 -0
  13. package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.d.ts.map +1 -1
  14. package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.js +5 -1
  15. package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.js.map +1 -1
  16. package/dist/src/fields/TiptapEditor/lib/tiptapSchema.d.ts +40 -40
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/package.json +26 -30
  19. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.d.ts +0 -10
  20. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.d.ts.map +0 -1
  21. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.js +0 -55
  22. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/TableOfContentsNode.js.map +0 -1
  23. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.d.ts +0 -2
  24. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.d.ts.map +0 -1
  25. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.js +0 -3
  26. package/dist/src/fields/TiptapEditor/extensions/TableOfContentsNode/index.js.map +0 -1
  27. package/dist/src/fields/TiptapEditor/extensions/error-boundary.d.ts +0 -15
  28. package/dist/src/fields/TiptapEditor/extensions/error-boundary.d.ts.map +0 -1
  29. package/dist/src/fields/TiptapEditor/extensions/error-boundary.js +0 -35
  30. package/dist/src/fields/TiptapEditor/extensions/error-boundary.js.map +0 -1
  31. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.d.ts +0 -8
  32. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.d.ts.map +0 -1
  33. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.js +0 -32
  34. package/dist/src/fields/TiptapEditor/features/Sidebar/Sidebar.js.map +0 -1
  35. package/dist/src/fields/TiptapEditor/features/Sidebar/index.d.ts +0 -2
  36. package/dist/src/fields/TiptapEditor/features/Sidebar/index.d.ts.map +0 -1
  37. package/dist/src/fields/TiptapEditor/features/Sidebar/index.js +0 -3
  38. package/dist/src/fields/TiptapEditor/features/Sidebar/index.js.map +0 -1
  39. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.d.ts +0 -8
  40. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.d.ts.map +0 -1
  41. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.js +0 -57
  42. package/dist/src/fields/TiptapEditor/features/TableOfContents/TableOfContents.js.map +0 -1
  43. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.d.ts +0 -2
  44. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.d.ts.map +0 -1
  45. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.js +0 -3
  46. package/dist/src/fields/TiptapEditor/features/TableOfContents/index.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { Node } from '@tiptap/core';
2
- export var ColumnLayout;
3
- (function(ColumnLayout) {
2
+ export var ColumnLayout = /*#__PURE__*/ function(ColumnLayout) {
4
3
  ColumnLayout["SidebarLeft"] = "sidebar-left";
5
4
  ColumnLayout["SidebarRight"] = "sidebar-right";
6
5
  ColumnLayout["TwoColumn"] = "two-column";
7
- })(ColumnLayout || (ColumnLayout = {}));
6
+ return ColumnLayout;
7
+ }({});
8
8
  export const Columns = Node.create({
9
9
  name: 'columns',
10
10
  group: 'columns',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/MultiColumn/Columns.ts"],"sourcesContent":["import { Node } from '@tiptap/core'\n\nexport enum ColumnLayout {\n SidebarLeft = 'sidebar-left',\n SidebarRight = 'sidebar-right',\n TwoColumn = 'two-column',\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n columns: {\n setColumns: () => ReturnType\n setLayout: (layout: ColumnLayout) => ReturnType\n }\n }\n}\n\nexport const Columns = Node.create({\n name: 'columns',\n\n group: 'columns',\n\n content: 'column column',\n\n defining: true,\n\n isolating: true,\n\n addAttributes() {\n return {\n layout: {\n default: ColumnLayout.TwoColumn,\n },\n }\n },\n\n addCommands() {\n return {\n setColumns:\n () =>\n ({ commands }) =>\n commands.insertContent(\n `<div data-type=\"columns\"><div data-type=\"column\" data-position=\"left\"><p></p></div><div data-type=\"column\" data-position=\"right\"><p></p></div></div>`,\n ),\n setLayout:\n (layout: ColumnLayout) =>\n ({ commands }) =>\n commands.updateAttributes('columns', { layout }),\n }\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['div', { 'data-type': 'columns', class: `layout-${HTMLAttributes.layout}` }, 0]\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"columns\"]',\n },\n ]\n },\n})\n\nexport default Columns\n"],"names":["Node","ColumnLayout","Columns","create","name","group","content","defining","isolating","addAttributes","layout","default","addCommands","setColumns","commands","insertContent","setLayout","updateAttributes","renderHTML","HTMLAttributes","class","parseHTML","tag"],"mappings":"AAAA,SAASA,IAAI,QAAQ,eAAc;;UAEvBC;;;;GAAAA,iBAAAA;AAeZ,OAAO,MAAMC,UAAUF,KAAKG,MAAM,CAAC;IACjCC,MAAM;IAENC,OAAO;IAEPC,SAAS;IAETC,UAAU;IAEVC,WAAW;IAEXC;QACE,OAAO;YACLC,QAAQ;gBACNC,OAAO;YACT;QACF;IACF;IAEAC;QACE,OAAO;YACLC,YACE,IACA,CAAC,EAAEC,QAAQ,EAAE,GACXA,SAASC,aAAa,CACpB,CAAC,oJAAoJ,CAAC;YAE5JC,WACE,CAACN,SACD,CAAC,EAAEI,QAAQ,EAAE,GACXA,SAASG,gBAAgB,CAAC,WAAW;wBAAEP;oBAAO;QACpD;IACF;IAEAQ,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YAAC;YAAO;gBAAE,aAAa;gBAAWC,OAAO,CAAC,OAAO,EAAED,eAAeT,MAAM,EAAE;YAAC;YAAG;SAAE;IACzF;IAEAW;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;AACF,GAAE;AAEF,eAAepB,QAAO"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/MultiColumn/Columns.ts"],"sourcesContent":["import { Node } from '@tiptap/core'\n\nexport enum ColumnLayout {\n SidebarLeft = 'sidebar-left',\n SidebarRight = 'sidebar-right',\n TwoColumn = 'two-column',\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n columns: {\n setColumns: () => ReturnType\n setLayout: (layout: ColumnLayout) => ReturnType\n }\n }\n}\n\nexport const Columns = Node.create({\n name: 'columns',\n\n group: 'columns',\n\n content: 'column column',\n\n defining: true,\n\n isolating: true,\n\n addAttributes() {\n return {\n layout: {\n default: ColumnLayout.TwoColumn,\n },\n }\n },\n\n addCommands() {\n return {\n setColumns:\n () =>\n ({ commands }) =>\n commands.insertContent(\n `<div data-type=\"columns\"><div data-type=\"column\" data-position=\"left\"><p></p></div><div data-type=\"column\" data-position=\"right\"><p></p></div></div>`,\n ),\n setLayout:\n (layout: ColumnLayout) =>\n ({ commands }) =>\n commands.updateAttributes('columns', { layout }),\n }\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['div', { 'data-type': 'columns', class: `layout-${HTMLAttributes.layout}` }, 0]\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"columns\"]',\n },\n ]\n },\n})\n\nexport default Columns\n"],"names":["Node","ColumnLayout","Columns","create","name","group","content","defining","isolating","addAttributes","layout","default","addCommands","setColumns","commands","insertContent","setLayout","updateAttributes","renderHTML","HTMLAttributes","class","parseHTML","tag"],"mappings":"AAAA,SAASA,IAAI,QAAQ,eAAc;AAEnC,OAAO,IAAA,AAAKC,sCAAAA;;;;WAAAA;MAIX;AAWD,OAAO,MAAMC,UAAUF,KAAKG,MAAM,CAAC;IACjCC,MAAM;IAENC,OAAO;IAEPC,SAAS;IAETC,UAAU;IAEVC,WAAW;IAEXC;QACE,OAAO;YACLC,QAAQ;gBACNC,OAAO;YACT;QACF;IACF;IAEAC;QACE,OAAO;YACLC,YACE,IACA,CAAC,EAAEC,QAAQ,EAAE,GACXA,SAASC,aAAa,CACpB,CAAC,oJAAoJ,CAAC;YAE5JC,WACE,CAACN,SACD,CAAC,EAAEI,QAAQ,EAAE,GACXA,SAASG,gBAAgB,CAAC,WAAW;wBAAEP;oBAAO;QACpD;IACF;IAEAQ,YAAW,EAAEC,cAAc,EAAE;QAC3B,OAAO;YAAC;YAAO;gBAAE,aAAa;gBAAWC,OAAO,CAAC,OAAO,EAAED,eAAeT,MAAM,EAAE;YAAC;YAAG;SAAE;IACzF;IAEAW;QACE,OAAO;YACL;gBACEC,KAAK;YACP;SACD;IACH;AACF,GAAE;AAEF,eAAepB,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoBlockViewClientside.d.ts","sourceRoot":"","sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,KAAqC,MAAM,OAAO,CAAC;AAK1D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,IAAI,GAAG;QACX,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC;YACZ,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;KACH,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,4CAIlC,mBAAmB,sBAsIrB,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"VideoBlockViewClientside.d.ts","sourceRoot":"","sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,KAAqC,MAAM,OAAO,CAAC;AAK1D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,IAAI,GAAG;QACX,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC;YACZ,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,WAAW,CAAC,EAAE,MAAM,CAAC;SACtB,CAAC;KACH,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,4CAIlC,mBAAmB,sBAmIrB,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -8,7 +8,7 @@ export const VideoBlockViewClientside = ({ className, getVideoAspect, ...props }
8
8
  const { node } = props;
9
9
  const videoWrapperRef = useRef(null);
10
10
  const { src, poster, playlistUrl, caption, actualWidth, actualHeight } = node.attrs;
11
- const { aspectRatio, calculateAspectRatio } = useGetAssetsAspectRatio();
11
+ const { aspectRatio, calculateAspectRatio, isVertical } = useGetAssetsAspectRatio();
12
12
  const [playlistContent, setPlaylistContent] = React.useState();
13
13
  const [error, setError] = React.useState();
14
14
  useEffect(()=>{
@@ -77,7 +77,6 @@ export const VideoBlockViewClientside = ({ className, getVideoAspect, ...props }
77
77
  if (aspectRatio) {
78
78
  return {
79
79
  aspectRatio,
80
- maxHeight: "80vh",
81
80
  width: node.attrs.width
82
81
  };
83
82
  }
@@ -91,7 +90,10 @@ export const VideoBlockViewClientside = ({ className, getVideoAspect, ...props }
91
90
  className: className,
92
91
  children: [
93
92
  /*#__PURE__*/ _jsxs("div", {
94
- className: cn(wrapperClassName, "main-videojs-wrapper aspect-square"),
93
+ className: cn(wrapperClassName, "main-videojs-wrapper aspect-square h-full"),
94
+ ...isVertical && {
95
+ "data-vertical": isVertical
96
+ },
95
97
  ref: videoWrapperRef,
96
98
  style: style,
97
99
  children: [
@@ -104,7 +106,7 @@ export const VideoBlockViewClientside = ({ className, getVideoAspect, ...props }
104
106
  ]
105
107
  }),
106
108
  caption && playlistContent?.title && /*#__PURE__*/ _jsx("div", {
107
- className: "block mx-auto text-sm text-gray-500",
109
+ className: "block mx-auto text-sm text-gray-500 text-center mt-1",
108
110
  style: {
109
111
  width: node.attrs.width
110
112
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"sourcesContent":["import { Node } from \"@tiptap/pm/model\";\nimport { NodeViewWrapper } from \"@tiptap/react\";\nimport React, { useEffect, useMemo, useRef } from \"react\";\nimport { cn } from \"../../../lib/utils/index.js\";\nimport VideoPlayer from \"./videojs/VideoPlayer.js\";\nimport { useGetAssetsAspectRatio } from \"../../serverside/getAssetsAspectRatio.js\";\n\ninterface VideoBlockViewProps {\n node: Node & {\n attrs: {\n src: string;\n poster: string;\n assetId: string;\n playlistUrl?: string;\n };\n };\n className?: string;\n getVideoAspect?: () => void;\n}\n\nexport type Playlist = {\n id: string;\n title: string;\n description: string;\n poster: string;\n items: Item[];\n};\n\nexport type Item = {\n src: string;\n type: string;\n label: string;\n width: number;\n height: number;\n};\n\nexport const VideoBlockViewClientside = ({\n className,\n getVideoAspect,\n ...props\n}: VideoBlockViewProps) => {\n const { node } = props;\n const videoWrapperRef = useRef<HTMLDivElement>(null);\n const { src, poster, playlistUrl, caption, actualWidth, actualHeight } =\n node.attrs;\n const { aspectRatio, calculateAspectRatio } = useGetAssetsAspectRatio();\n const [playlistContent, setPlaylistContent] = React.useState<\n Playlist | undefined\n >();\n const [error, setError] = React.useState();\n\n useEffect(() => {\n async function getPlaylistContent() {\n const res = await fetch(playlistUrl, {\n cache: \"no-cache\",\n });\n return await res.json();\n }\n\n if (playlistUrl) {\n try {\n getPlaylistContent()\n .then((data) => {\n setPlaylistContent(data);\n })\n .catch((err) => {\n setError(err);\n });\n } catch (error) {\n setError(error);\n }\n }\n }, [playlistUrl]);\n\n const wrapperClassName = cn(\n node.attrs.align === \"left\" ? \"ml-0\" : \"ml-auto\",\n node.attrs.align === \"right\" ? \"mr-0\" : \"mr-auto\",\n node.attrs.align === \"center\" && \"mx-auto\"\n );\n\n const videoJsOptions = useMemo(() => {\n if (playlistContent == undefined) return {};\n\n if (\n playlistContent.items.some(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n ) {\n return {\n sources: playlistContent.items\n .filter(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n .map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n preload: \"auto\",\n };\n }\n return {\n sources: playlistContent.items.map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n preload: \"auto\",\n };\n }, [playlistContent]);\n\n useEffect(() => {\n if (!playlistContent?.items?.length) {\n return;\n }\n const source = playlistContent.items.find((item) => item.src);\n if (!aspectRatio && source?.src) {\n calculateAspectRatio(\n {\n src: source.src,\n actualWidth: actualWidth || source?.width,\n actualHeight: actualHeight || source?.height,\n },\n \"VIDEO\",\n getVideoAspect\n );\n }\n }, [playlistContent]);\n const style = useMemo(() => {\n if (aspectRatio) {\n return {\n aspectRatio,\n maxHeight: \"80vh\",\n width: node.attrs.width,\n };\n }\n return {\n width: node.attrs.width,\n };\n }, [aspectRatio]);\n return (\n <NodeViewWrapper className={className}>\n <div\n className={cn(wrapperClassName, \"main-videojs-wrapper aspect-square\")}\n ref={videoWrapperRef}\n style={style}\n >\n {error && <div>{error}</div>}\n {/* <video\n controls\n className=\"block\"\n src={src}\n poster={poster}\n title=\"\"\n onClick={onClick}\n /> */}\n {playlistContent && <VideoPlayer options={videoJsOptions} />}\n </div>\n {caption && playlistContent?.title && (\n <div\n className=\"block mx-auto text-sm text-gray-500\"\n style={{ width: node.attrs.width }}\n >\n {playlistContent?.title}\n </div>\n )}\n </NodeViewWrapper>\n );\n};\n\nexport default VideoBlockViewClientside;\n"],"names":["NodeViewWrapper","React","useEffect","useMemo","useRef","cn","VideoPlayer","useGetAssetsAspectRatio","VideoBlockViewClientside","className","getVideoAspect","props","node","videoWrapperRef","src","poster","playlistUrl","caption","actualWidth","actualHeight","attrs","aspectRatio","calculateAspectRatio","playlistContent","setPlaylistContent","useState","error","setError","getPlaylistContent","res","fetch","cache","json","then","data","catch","err","wrapperClassName","align","videoJsOptions","undefined","items","some","item","type","sources","filter","map","label","preload","length","source","find","width","height","style","maxHeight","div","ref","options","title"],"mappings":"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"}
1
+ {"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockViewClientside.tsx"],"sourcesContent":["import { Node } from \"@tiptap/pm/model\";\nimport { NodeViewWrapper } from \"@tiptap/react\";\nimport React, { useEffect, useMemo, useRef } from \"react\";\nimport { cn } from \"../../../lib/utils/index.js\";\nimport VideoPlayer from \"./videojs/VideoPlayer.js\";\nimport { useGetAssetsAspectRatio } from \"../../serverside/getAssetsAspectRatio.js\";\n\ninterface VideoBlockViewProps {\n node: Node & {\n attrs: {\n src: string;\n poster: string;\n assetId: string;\n playlistUrl?: string;\n };\n };\n className?: string;\n getVideoAspect?: () => void;\n}\n\nexport type Playlist = {\n id: string;\n title: string;\n description: string;\n poster: string;\n items: Item[];\n};\n\nexport type Item = {\n src: string;\n type: string;\n label: string;\n width: number;\n height: number;\n};\n\nexport const VideoBlockViewClientside = ({\n className,\n getVideoAspect,\n ...props\n}: VideoBlockViewProps) => {\n const { node } = props;\n const videoWrapperRef = useRef<HTMLDivElement>(null);\n const { src, poster, playlistUrl, caption, actualWidth, actualHeight } =\n node.attrs;\n const { aspectRatio, calculateAspectRatio, isVertical } =\n useGetAssetsAspectRatio();\n const [playlistContent, setPlaylistContent] = React.useState<\n Playlist | undefined\n >();\n const [error, setError] = React.useState();\n\n useEffect(() => {\n async function getPlaylistContent() {\n const res = await fetch(playlistUrl, {\n cache: \"no-cache\",\n });\n return await res.json();\n }\n\n if (playlistUrl) {\n try {\n getPlaylistContent()\n .then((data) => {\n setPlaylistContent(data);\n })\n .catch((err) => {\n setError(err);\n });\n } catch (error) {\n setError(error);\n }\n }\n }, [playlistUrl]);\n\n const wrapperClassName = cn(\n node.attrs.align === \"left\" ? \"ml-0\" : \"ml-auto\",\n node.attrs.align === \"right\" ? \"mr-0\" : \"mr-auto\",\n node.attrs.align === \"center\" && \"mx-auto\"\n );\n\n const videoJsOptions = useMemo(() => {\n if (playlistContent == undefined) return {};\n\n if (\n playlistContent.items.some(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n ) {\n return {\n sources: playlistContent.items\n .filter(\n (item) =>\n item.type === \"application/x-mpegURL\" ||\n item.type === \"application/vnd.apple.mpegurl\"\n )\n .map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n preload: \"auto\",\n };\n }\n return {\n sources: playlistContent.items.map((item) => ({\n src: item.src,\n type: item.type,\n label: item.label,\n })),\n poster: playlistContent.poster,\n preload: \"auto\",\n };\n }, [playlistContent]);\n\n useEffect(() => {\n if (!playlistContent?.items?.length) {\n return;\n }\n const source = playlistContent.items.find((item) => item.src);\n if (!aspectRatio && source?.src) {\n calculateAspectRatio(\n {\n src: source.src,\n actualWidth: actualWidth || source?.width,\n actualHeight: actualHeight || source?.height,\n },\n \"VIDEO\",\n getVideoAspect\n );\n }\n }, [playlistContent]);\n const style = useMemo(() => {\n if (aspectRatio) {\n return {\n aspectRatio,\n width: node.attrs.width,\n };\n }\n return {\n width: node.attrs.width,\n };\n }, [aspectRatio]);\n return (\n <NodeViewWrapper className={className}>\n <div\n className={cn(\n wrapperClassName,\n \"main-videojs-wrapper aspect-square h-full\"\n )}\n {...(isVertical && { \"data-vertical\": isVertical })}\n ref={videoWrapperRef}\n style={style}\n >\n {error && <div>{error}</div>}\n\n {playlistContent && <VideoPlayer options={videoJsOptions} />}\n </div>\n {caption && playlistContent?.title && (\n <div\n className=\"block mx-auto text-sm text-gray-500 text-center mt-1\"\n style={{ width: node.attrs.width }}\n >\n {playlistContent?.title}\n </div>\n )}\n </NodeViewWrapper>\n );\n};\n\nexport default VideoBlockViewClientside;\n"],"names":["NodeViewWrapper","React","useEffect","useMemo","useRef","cn","VideoPlayer","useGetAssetsAspectRatio","VideoBlockViewClientside","className","getVideoAspect","props","node","videoWrapperRef","src","poster","playlistUrl","caption","actualWidth","actualHeight","attrs","aspectRatio","calculateAspectRatio","isVertical","playlistContent","setPlaylistContent","useState","error","setError","getPlaylistContent","res","fetch","cache","json","then","data","catch","err","wrapperClassName","align","videoJsOptions","undefined","items","some","item","type","sources","filter","map","label","preload","length","source","find","width","height","style","div","ref","options","title"],"mappings":";AACA,SAASA,eAAe,QAAQ,gBAAgB;AAChD,OAAOC,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AAC1D,SAASC,EAAE,QAAQ,8BAA8B;AACjD,OAAOC,iBAAiB,2BAA2B;AACnD,SAASC,uBAAuB,QAAQ,2CAA2C;AA+BnF,OAAO,MAAMC,2BAA2B,CAAC,EACvCC,SAAS,EACTC,cAAc,EACd,GAAGC,OACiB;IACpB,MAAM,EAAEC,IAAI,EAAE,GAAGD;IACjB,MAAME,kBAAkBT,OAAuB;IAC/C,MAAM,EAAEU,GAAG,EAAEC,MAAM,EAAEC,WAAW,EAAEC,OAAO,EAAEC,WAAW,EAAEC,YAAY,EAAE,GACpEP,KAAKQ,KAAK;IACZ,MAAM,EAAEC,WAAW,EAAEC,oBAAoB,EAAEC,UAAU,EAAE,GACrDhB;IACF,MAAM,CAACiB,iBAAiBC,mBAAmB,GAAGxB,MAAMyB,QAAQ;IAG5D,MAAM,CAACC,OAAOC,SAAS,GAAG3B,MAAMyB,QAAQ;IAExCxB,UAAU;QACR,eAAe2B;YACb,MAAMC,MAAM,MAAMC,MAAMf,aAAa;gBACnCgB,OAAO;YACT;YACA,OAAO,MAAMF,IAAIG,IAAI;QACvB;QAEA,IAAIjB,aAAa;YACf,IAAI;gBACFa,qBACGK,IAAI,CAAC,CAACC;oBACLV,mBAAmBU;gBACrB,GACCC,KAAK,CAAC,CAACC;oBACNT,SAASS;gBACX;YACJ,EAAE,OAAOV,OAAO;gBACdC,SAASD;YACX;QACF;IACF,GAAG;QAACX;KAAY;IAEhB,MAAMsB,mBAAmBjC,GACvBO,KAAKQ,KAAK,CAACmB,KAAK,KAAK,SAAS,SAAS,WACvC3B,KAAKQ,KAAK,CAACmB,KAAK,KAAK,UAAU,SAAS,WACxC3B,KAAKQ,KAAK,CAACmB,KAAK,KAAK,YAAY;IAGnC,MAAMC,iBAAiBrC,QAAQ;QAC7B,IAAIqB,mBAAmBiB,WAAW,OAAO,CAAC;QAE1C,IACEjB,gBAAgBkB,KAAK,CAACC,IAAI,CACxB,CAACC,OACCA,KAAKC,IAAI,KAAK,2BACdD,KAAKC,IAAI,KAAK,kCAElB;YACA,OAAO;gBACLC,SAAStB,gBAAgBkB,KAAK,CAC3BK,MAAM,CACL,CAACH,OACCA,KAAKC,IAAI,KAAK,2BACdD,KAAKC,IAAI,KAAK,iCAEjBG,GAAG,CAAC,CAACJ,OAAU,CAAA;wBACd9B,KAAK8B,KAAK9B,GAAG;wBACb+B,MAAMD,KAAKC,IAAI;wBACfI,OAAOL,KAAKK,KAAK;oBACnB,CAAA;gBACFlC,QAAQS,gBAAgBT,MAAM;gBAC9BmC,SAAS;YACX;QACF;QACA,OAAO;YACLJ,SAAStB,gBAAgBkB,KAAK,CAACM,GAAG,CAAC,CAACJ,OAAU,CAAA;oBAC5C9B,KAAK8B,KAAK9B,GAAG;oBACb+B,MAAMD,KAAKC,IAAI;oBACfI,OAAOL,KAAKK,KAAK;gBACnB,CAAA;YACAlC,QAAQS,gBAAgBT,MAAM;YAC9BmC,SAAS;QACX;IACF,GAAG;QAAC1B;KAAgB;IAEpBtB,UAAU;QACR,IAAI,CAACsB,iBAAiBkB,OAAOS,QAAQ;YACnC;QACF;QACA,MAAMC,SAAS5B,gBAAgBkB,KAAK,CAACW,IAAI,CAAC,CAACT,OAASA,KAAK9B,GAAG;QAC5D,IAAI,CAACO,eAAe+B,QAAQtC,KAAK;YAC/BQ,qBACE;gBACER,KAAKsC,OAAOtC,GAAG;gBACfI,aAAaA,eAAekC,QAAQE;gBACpCnC,cAAcA,gBAAgBiC,QAAQG;YACxC,GACA,SACA7C;QAEJ;IACF,GAAG;QAACc;KAAgB;IACpB,MAAMgC,QAAQrD,QAAQ;QACpB,IAAIkB,aAAa;YACf,OAAO;gBACLA;gBACAiC,OAAO1C,KAAKQ,KAAK,CAACkC,KAAK;YACzB;QACF;QACA,OAAO;YACLA,OAAO1C,KAAKQ,KAAK,CAACkC,KAAK;QACzB;IACF,GAAG;QAACjC;KAAY;IAChB,qBACE,MAACrB;QAAgBS,WAAWA;;0BAC1B,MAACgD;gBACChD,WAAWJ,GACTiC,kBACA;gBAED,GAAIf,cAAc;oBAAE,iBAAiBA;gBAAW,CAAC;gBAClDmC,KAAK7C;gBACL2C,OAAOA;;oBAEN7B,uBAAS,KAAC8B;kCAAK9B;;oBAEfH,iCAAmB,KAAClB;wBAAYqD,SAASnB;;;;YAE3CvB,WAAWO,iBAAiBoC,uBAC3B,KAACH;gBACChD,WAAU;gBACV+C,OAAO;oBAAEF,OAAO1C,KAAKQ,KAAK,CAACkC,KAAK;gBAAC;0BAEhC9B,iBAAiBoC;;;;AAK5B,EAAE;AAEF,eAAepD,yBAAyB"}
@@ -7,6 +7,7 @@ interface IVideoPlayerProps {
7
7
  }
8
8
  declare const VideoPlayer: React.FC<IVideoPlayerProps & {
9
9
  style?: CSSProperties;
10
+ className?: string;
10
11
  }>;
11
12
  export default VideoPlayer;
12
13
  //# sourceMappingURL=VideoPlayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAgB,EAEd,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,4BAA4B,CAAC;AAGpC,OAAO,4BAA4B,CAAC;AAIpC,UAAU,iBAAiB;IACzB,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAYD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,CA8BxE,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"VideoPlayer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAgB,EAEd,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,4BAA4B,CAAC;AAGpC,OAAO,4BAA4B,CAAC;AAKpC,UAAU,iBAAiB;IACzB,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAYD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CACzB,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAkClE,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -5,6 +5,7 @@ import "video.js/dist/video-js.css";
5
5
  // Styles
6
6
  import "video.js/dist/video-js.css";
7
7
  import { QualitySelector } from "./quality-selector/index.js";
8
+ import { cn } from "../../../../lib/utils/index.js";
8
9
  const initialOptions = {
9
10
  controls: true,
10
11
  fluid: true,
@@ -14,7 +15,7 @@ const initialOptions = {
14
15
  }
15
16
  }
16
17
  };
17
- const VideoPlayer = ({ options, style })=>{
18
+ const VideoPlayer = ({ options, style, className })=>{
18
19
  const videoNode = React.useRef(null);
19
20
  const player = React.useRef(null);
20
21
  React.useEffect(()=>{
@@ -37,7 +38,7 @@ const VideoPlayer = ({ options, style })=>{
37
38
  ]);
38
39
  return /*#__PURE__*/ _jsx("video", {
39
40
  ref: videoNode,
40
- className: "video-js",
41
+ className: cn("video-js", className),
41
42
  style: style
42
43
  });
43
44
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.tsx"],"sourcesContent":["import React, { CSSProperties } from \"react\";\nimport videojs, {\n VideoJsPlayer,\n VideoJsPlayerOptions,\n} from \"video.js/dist/video.js\";\nimport \"video.js/dist/video-js.css\";\n\n// Styles\nimport \"video.js/dist/video-js.css\";\n\nimport { QualitySelector } from \"./quality-selector/index.js\";\n\ninterface IVideoPlayerProps {\n options: VideoJsPlayerOptions;\n}\n\nconst initialOptions: VideoJsPlayerOptions = {\n controls: true,\n fluid: true,\n controlBar: {\n volumePanel: {\n inline: false,\n },\n },\n};\n\nconst VideoPlayer: React.FC<IVideoPlayerProps & { style?: CSSProperties }> = ({\n options,\n style,\n}) => {\n const videoNode = React.useRef<HTMLVideoElement>(null);\n const player = React.useRef<videojs.Player>(null);\n\n React.useEffect(() => {\n QualitySelector(videojs);\n\n player.current = videojs(videoNode.current, {\n ...initialOptions,\n ...options,\n }).ready(function () {\n if (\n !this.controlBar\n .children()\n .some((c: { name_: string }) => c.name_ === \"QualitySelector\")\n ) {\n this.controlBar.addChild(\"QualitySelector\");\n }\n });\n return () => {\n if (player.current) {\n player.current.dispose();\n }\n };\n }, [options]);\n\n return <video ref={videoNode} className=\"video-js\" style={style} />;\n};\n\nexport default VideoPlayer;\n"],"names":["React","videojs","QualitySelector","initialOptions","controls","fluid","controlBar","volumePanel","inline","VideoPlayer","options","style","videoNode","useRef","player","useEffect","current","ready","children","some","c","name_","addChild","dispose","video","ref","className"],"mappings":";AAAA,OAAOA,WAA8B,QAAQ;AAC7C,OAAOC,aAGA,yBAAyB;AAChC,OAAO,6BAA6B;AAEpC,SAAS;AACT,OAAO,6BAA6B;AAEpC,SAASC,eAAe,QAAQ,8BAA8B;AAM9D,MAAMC,iBAAuC;IAC3CC,UAAU;IACVC,OAAO;IACPC,YAAY;QACVC,aAAa;YACXC,QAAQ;QACV;IACF;AACF;AAEA,MAAMC,cAAuE,CAAC,EAC5EC,OAAO,EACPC,KAAK,EACN;IACC,MAAMC,YAAYZ,MAAMa,MAAM,CAAmB;IACjD,MAAMC,SAASd,MAAMa,MAAM,CAAiB;IAE5Cb,MAAMe,SAAS,CAAC;QACdb,gBAAgBD;QAEhBa,OAAOE,OAAO,GAAGf,QAAQW,UAAUI,OAAO,EAAE;YAC1C,GAAGb,cAAc;YACjB,GAAGO,OAAO;QACZ,GAAGO,KAAK,CAAC;YACP,IACE,CAAC,IAAI,CAACX,UAAU,CACbY,QAAQ,GACRC,IAAI,CAAC,CAACC,IAAyBA,EAAEC,KAAK,KAAK,oBAC9C;gBACA,IAAI,CAACf,UAAU,CAACgB,QAAQ,CAAC;YAC3B;QACF;QACA,OAAO;YACL,IAAIR,OAAOE,OAAO,EAAE;gBAClBF,OAAOE,OAAO,CAACO,OAAO;YACxB;QACF;IACF,GAAG;QAACb;KAAQ;IAEZ,qBAAO,KAACc;QAAMC,KAAKb;QAAWc,WAAU;QAAWf,OAAOA;;AAC5D;AAEA,eAAeF,YAAY"}
1
+ {"version":3,"sources":["../../../../../../../../src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/VideoPlayer.tsx"],"sourcesContent":["import React, { CSSProperties } from \"react\";\nimport videojs, {\n VideoJsPlayer,\n VideoJsPlayerOptions,\n} from \"video.js/dist/video.js\";\nimport \"video.js/dist/video-js.css\";\n\n// Styles\nimport \"video.js/dist/video-js.css\";\n\nimport { QualitySelector } from \"./quality-selector/index.js\";\nimport { cn } from \"../../../../lib/utils/index.js\";\n\ninterface IVideoPlayerProps {\n options: VideoJsPlayerOptions;\n}\n\nconst initialOptions: VideoJsPlayerOptions = {\n controls: true,\n fluid: true,\n controlBar: {\n volumePanel: {\n inline: false,\n },\n },\n};\n\nconst VideoPlayer: React.FC<\n IVideoPlayerProps & { style?: CSSProperties; className?: string }\n> = ({ options, style, className }) => {\n const videoNode = React.useRef<HTMLVideoElement>(null);\n const player = React.useRef<videojs.Player>(null);\n\n React.useEffect(() => {\n QualitySelector(videojs);\n\n player.current = videojs(videoNode.current, {\n ...initialOptions,\n ...options,\n }).ready(function () {\n if (\n !this.controlBar\n .children()\n .some((c: { name_: string }) => c.name_ === \"QualitySelector\")\n ) {\n this.controlBar.addChild(\"QualitySelector\");\n }\n });\n return () => {\n if (player.current) {\n player.current.dispose();\n }\n };\n }, [options]);\n\n return (\n <video\n ref={videoNode}\n className={cn(\"video-js\", className)}\n style={style}\n />\n );\n};\n\nexport default VideoPlayer;\n"],"names":["React","videojs","QualitySelector","cn","initialOptions","controls","fluid","controlBar","volumePanel","inline","VideoPlayer","options","style","className","videoNode","useRef","player","useEffect","current","ready","children","some","c","name_","addChild","dispose","video","ref"],"mappings":";AAAA,OAAOA,WAA8B,QAAQ;AAC7C,OAAOC,aAGA,yBAAyB;AAChC,OAAO,6BAA6B;AAEpC,SAAS;AACT,OAAO,6BAA6B;AAEpC,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,EAAE,QAAQ,iCAAiC;AAMpD,MAAMC,iBAAuC;IAC3CC,UAAU;IACVC,OAAO;IACPC,YAAY;QACVC,aAAa;YACXC,QAAQ;QACV;IACF;AACF;AAEA,MAAMC,cAEF,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,SAAS,EAAE;IAChC,MAAMC,YAAYd,MAAMe,MAAM,CAAmB;IACjD,MAAMC,SAAShB,MAAMe,MAAM,CAAiB;IAE5Cf,MAAMiB,SAAS,CAAC;QACdf,gBAAgBD;QAEhBe,OAAOE,OAAO,GAAGjB,QAAQa,UAAUI,OAAO,EAAE;YAC1C,GAAGd,cAAc;YACjB,GAAGO,OAAO;QACZ,GAAGQ,KAAK,CAAC;YACP,IACE,CAAC,IAAI,CAACZ,UAAU,CACba,QAAQ,GACRC,IAAI,CAAC,CAACC,IAAyBA,EAAEC,KAAK,KAAK,oBAC9C;gBACA,IAAI,CAAChB,UAAU,CAACiB,QAAQ,CAAC;YAC3B;QACF;QACA,OAAO;YACL,IAAIR,OAAOE,OAAO,EAAE;gBAClBF,OAAOE,OAAO,CAACO,OAAO;YACxB;QACF;IACF,GAAG;QAACd;KAAQ;IAEZ,qBACE,KAACe;QACCC,KAAKb;QACLD,WAAWV,GAAG,YAAYU;QAC1BD,OAAOA;;AAGb;AAEA,eAAeF,YAAY"}
@@ -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"}
@@ -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").Node<any, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Mark<import("@tiptap/extension-subscript").SubscriptExtensionOptions, any>)[];
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>)[];
7
7
  export default ExtensionKit;
8
8
  //# sourceMappingURL=extension-kit.d.ts.map
@@ -1,5 +1,6 @@
1
1
  export declare function useGetAssetsAspectRatio(): {
2
2
  aspectRatio: string;
3
3
  calculateAspectRatio: (attrs: any, type: any, getVideoAspect: any) => Promise<void>;
4
+ isVertical: boolean;
4
5
  };
5
6
  //# sourceMappingURL=getAssetsAspectRatio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAssetsAspectRatio.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB;;;EA6BtC"}
1
+ {"version":3,"file":"getAssetsAspectRatio.d.ts","sourceRoot":"","sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB;;;;EAiCtC"}
@@ -1,12 +1,14 @@
1
1
  import { useCallback, useState } from "react";
2
2
  export function useGetAssetsAspectRatio() {
3
3
  const [aspectRatio, setAspectRatio] = useState("");
4
+ const [isVertical, setIsVertical] = useState(false);
4
5
  const [loading, setLoading] = useState(false);
5
6
  const calculateAspectRatio = useCallback(async (attrs, type, getVideoAspect)=>{
6
7
  if (loading) return;
7
8
  setLoading(true);
8
9
  const { src, actualWidth, actualHeight } = attrs;
9
10
  if (actualWidth && actualHeight) {
11
+ setIsVertical(actualWidth < actualHeight);
10
12
  setAspectRatio(`${actualWidth} / ${actualHeight}`);
11
13
  setLoading(false);
12
14
  return;
@@ -14,6 +16,7 @@ export function useGetAssetsAspectRatio() {
14
16
  if (type === "VIDEO" && getVideoAspect) {
15
17
  const metadata = await getVideoAspect(src);
16
18
  if (metadata.width && metadata.height) {
19
+ setIsVertical(metadata.width < metadata.height);
17
20
  setAspectRatio(`${metadata.width} / ${metadata.height}`);
18
21
  }
19
22
  setLoading(false);
@@ -24,7 +27,8 @@ export function useGetAssetsAspectRatio() {
24
27
  ]);
25
28
  return {
26
29
  aspectRatio,
27
- calculateAspectRatio
30
+ calculateAspectRatio,
31
+ isVertical
28
32
  };
29
33
  }
30
34
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\n\nexport function useGetAssetsAspectRatio() {\n const [aspectRatio, setAspectRatio] = useState(\"\");\n const [loading, setLoading] = useState(false);\n const calculateAspectRatio = useCallback(\n async (attrs, type, getVideoAspect) => {\n if (loading) return;\n setLoading(true);\n\n const { src, actualWidth, actualHeight } = attrs;\n if (actualWidth && actualHeight) {\n setAspectRatio(`${actualWidth} / ${actualHeight}`);\n setLoading(false);\n return;\n }\n\n if (type === \"VIDEO\" && getVideoAspect) {\n const metadata = await getVideoAspect(src);\n\n if (metadata.width && metadata.height) {\n setAspectRatio(`${metadata.width} / ${metadata.height}`);\n }\n setLoading(false);\n return;\n }\n },\n [loading]\n );\n\n return { aspectRatio, calculateAspectRatio };\n}\n"],"names":["useCallback","useState","useGetAssetsAspectRatio","aspectRatio","setAspectRatio","loading","setLoading","calculateAspectRatio","attrs","type","getVideoAspect","src","actualWidth","actualHeight","metadata","width","height"],"mappings":"AAAA,SAASA,WAAW,EAAaC,QAAQ,QAAQ,QAAQ;AAEzD,OAAO,SAASC;IACd,MAAM,CAACC,aAAaC,eAAe,GAAGH,SAAS;IAC/C,MAAM,CAACI,SAASC,WAAW,GAAGL,SAAS;IACvC,MAAMM,uBAAuBP,YAC3B,OAAOQ,OAAOC,MAAMC;QAClB,IAAIL,SAAS;QACbC,WAAW;QAEX,MAAM,EAAEK,GAAG,EAAEC,WAAW,EAAEC,YAAY,EAAE,GAAGL;QAC3C,IAAII,eAAeC,cAAc;YAC/BT,eAAe,GAAGQ,YAAY,GAAG,EAAEC,cAAc;YACjDP,WAAW;YACX;QACF;QAEA,IAAIG,SAAS,WAAWC,gBAAgB;YACtC,MAAMI,WAAW,MAAMJ,eAAeC;YAEtC,IAAIG,SAASC,KAAK,IAAID,SAASE,MAAM,EAAE;gBACrCZ,eAAe,GAAGU,SAASC,KAAK,CAAC,GAAG,EAAED,SAASE,MAAM,EAAE;YACzD;YACAV,WAAW;YACX;QACF;IACF,GACA;QAACD;KAAQ;IAGX,OAAO;QAAEF;QAAaI;IAAqB;AAC7C"}
1
+ {"version":3,"sources":["../../../../../../src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\n\nexport function useGetAssetsAspectRatio() {\n const [aspectRatio, setAspectRatio] = useState(\"\");\n const [isVertical, setIsVertical] = useState(false);\n const [loading, setLoading] = useState(false);\n const calculateAspectRatio = useCallback(\n async (attrs, type, getVideoAspect) => {\n if (loading) return;\n setLoading(true);\n\n const { src, actualWidth, actualHeight } = attrs;\n if (actualWidth && actualHeight) {\n setIsVertical(actualWidth < actualHeight);\n\n setAspectRatio(`${actualWidth} / ${actualHeight}`);\n setLoading(false);\n return;\n }\n\n if (type === \"VIDEO\" && getVideoAspect) {\n const metadata = await getVideoAspect(src);\n\n if (metadata.width && metadata.height) {\n setIsVertical(metadata.width < metadata.height);\n setAspectRatio(`${metadata.width} / ${metadata.height}`);\n }\n setLoading(false);\n return;\n }\n },\n [loading]\n );\n\n return { aspectRatio, calculateAspectRatio, isVertical };\n}\n"],"names":["useCallback","useState","useGetAssetsAspectRatio","aspectRatio","setAspectRatio","isVertical","setIsVertical","loading","setLoading","calculateAspectRatio","attrs","type","getVideoAspect","src","actualWidth","actualHeight","metadata","width","height"],"mappings":"AAAA,SAASA,WAAW,EAAaC,QAAQ,QAAQ,QAAQ;AAEzD,OAAO,SAASC;IACd,MAAM,CAACC,aAAaC,eAAe,GAAGH,SAAS;IAC/C,MAAM,CAACI,YAAYC,cAAc,GAAGL,SAAS;IAC7C,MAAM,CAACM,SAASC,WAAW,GAAGP,SAAS;IACvC,MAAMQ,uBAAuBT,YAC3B,OAAOU,OAAOC,MAAMC;QAClB,IAAIL,SAAS;QACbC,WAAW;QAEX,MAAM,EAAEK,GAAG,EAAEC,WAAW,EAAEC,YAAY,EAAE,GAAGL;QAC3C,IAAII,eAAeC,cAAc;YAC/BT,cAAcQ,cAAcC;YAE5BX,eAAe,GAAGU,YAAY,GAAG,EAAEC,cAAc;YACjDP,WAAW;YACX;QACF;QAEA,IAAIG,SAAS,WAAWC,gBAAgB;YACtC,MAAMI,WAAW,MAAMJ,eAAeC;YAEtC,IAAIG,SAASC,KAAK,IAAID,SAASE,MAAM,EAAE;gBACrCZ,cAAcU,SAASC,KAAK,GAAGD,SAASE,MAAM;gBAC9Cd,eAAe,GAAGY,SAASC,KAAK,CAAC,GAAG,EAAED,SAASE,MAAM,EAAE;YACzD;YACAV,WAAW;YACX;QACF;IACF,GACA;QAACD;KAAQ;IAGX,OAAO;QAAEJ;QAAaM;QAAsBJ;IAAW;AACzD"}
@@ -20,20 +20,20 @@ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
20
20
  }>, "many">>;
21
21
  }>, "strip", z.ZodTypeAny, {
22
22
  type?: string;
23
- attrs?: Record<string, any>;
24
23
  text?: string;
25
24
  marks?: {
26
25
  type?: string;
27
26
  attrs?: Record<string, any>;
28
27
  }[];
28
+ attrs?: Record<string, any>;
29
29
  }, {
30
30
  type?: string;
31
- attrs?: Record<string, any>;
32
31
  text?: string;
33
32
  marks?: {
34
33
  type?: string;
35
34
  attrs?: Record<string, any>;
36
35
  }[];
36
+ attrs?: Record<string, any>;
37
37
  }>, z.ZodObject<z.objectUtil.extendShape<{
38
38
  type: z.ZodString;
39
39
  attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
@@ -55,20 +55,20 @@ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
55
55
  }>, "many">>;
56
56
  }>, "strip", z.ZodTypeAny, {
57
57
  type?: string;
58
- attrs?: Record<string, any>;
59
58
  text?: string;
60
59
  marks?: {
61
60
  type?: string;
62
61
  attrs?: Record<string, any>;
63
62
  }[];
63
+ attrs?: Record<string, any>;
64
64
  }, {
65
65
  type?: string;
66
- attrs?: Record<string, any>;
67
66
  text?: string;
68
67
  marks?: {
69
68
  type?: string;
70
69
  attrs?: Record<string, any>;
71
70
  }[];
71
+ attrs?: Record<string, any>;
72
72
  }>, z.ZodObject<{
73
73
  type: z.ZodString;
74
74
  attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
@@ -81,89 +81,89 @@ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
81
81
  }>]>, "many">>;
82
82
  }>, "strip", z.ZodTypeAny, {
83
83
  type?: string;
84
- attrs?: Record<string, any>;
85
84
  content?: ({
86
85
  type?: string;
87
86
  attrs?: Record<string, any>;
88
87
  } | {
89
88
  type?: string;
90
- attrs?: Record<string, any>;
91
89
  text?: string;
92
90
  marks?: {
93
91
  type?: string;
94
92
  attrs?: Record<string, any>;
95
93
  }[];
94
+ attrs?: Record<string, any>;
96
95
  })[];
96
+ attrs?: Record<string, any>;
97
97
  }, {
98
98
  type?: string;
99
- attrs?: Record<string, any>;
100
99
  content?: ({
101
100
  type?: string;
102
101
  attrs?: Record<string, any>;
103
102
  } | {
104
103
  type?: string;
105
- attrs?: Record<string, any>;
106
104
  text?: string;
107
105
  marks?: {
108
106
  type?: string;
109
107
  attrs?: Record<string, any>;
110
108
  }[];
109
+ attrs?: Record<string, any>;
111
110
  })[];
111
+ attrs?: Record<string, any>;
112
112
  }>]>, "many">>;
113
113
  }>, "strip", z.ZodTypeAny, {
114
114
  type?: string;
115
- attrs?: Record<string, any>;
116
115
  content?: ({
117
116
  type?: string;
118
- attrs?: Record<string, any>;
119
117
  text?: string;
120
118
  marks?: {
121
119
  type?: string;
122
120
  attrs?: Record<string, any>;
123
121
  }[];
122
+ attrs?: Record<string, any>;
124
123
  } | {
125
124
  type?: string;
126
- attrs?: Record<string, any>;
127
125
  content?: ({
128
126
  type?: string;
129
127
  attrs?: Record<string, any>;
130
128
  } | {
131
129
  type?: string;
132
- attrs?: Record<string, any>;
133
130
  text?: string;
134
131
  marks?: {
135
132
  type?: string;
136
133
  attrs?: Record<string, any>;
137
134
  }[];
135
+ attrs?: Record<string, any>;
138
136
  })[];
137
+ attrs?: Record<string, any>;
139
138
  })[];
139
+ attrs?: Record<string, any>;
140
140
  }, {
141
141
  type?: string;
142
- attrs?: Record<string, any>;
143
142
  content?: ({
144
143
  type?: string;
145
- attrs?: Record<string, any>;
146
144
  text?: string;
147
145
  marks?: {
148
146
  type?: string;
149
147
  attrs?: Record<string, any>;
150
148
  }[];
149
+ attrs?: Record<string, any>;
151
150
  } | {
152
151
  type?: string;
153
- attrs?: Record<string, any>;
154
152
  content?: ({
155
153
  type?: string;
156
154
  attrs?: Record<string, any>;
157
155
  } | {
158
156
  type?: string;
159
- attrs?: Record<string, any>;
160
157
  text?: string;
161
158
  marks?: {
162
159
  type?: string;
163
160
  attrs?: Record<string, any>;
164
161
  }[];
162
+ attrs?: Record<string, any>;
165
163
  })[];
164
+ attrs?: Record<string, any>;
166
165
  })[];
166
+ attrs?: Record<string, any>;
167
167
  }>;
168
168
  export declare const TiptapSchema: z.ZodObject<{
169
169
  type: z.ZodLiteral<"doc">;
@@ -188,20 +188,20 @@ export declare const TiptapSchema: z.ZodObject<{
188
188
  }>, "many">>;
189
189
  }>, "strip", z.ZodTypeAny, {
190
190
  type?: string;
191
- attrs?: Record<string, any>;
192
191
  text?: string;
193
192
  marks?: {
194
193
  type?: string;
195
194
  attrs?: Record<string, any>;
196
195
  }[];
196
+ attrs?: Record<string, any>;
197
197
  }, {
198
198
  type?: string;
199
- attrs?: Record<string, any>;
200
199
  text?: string;
201
200
  marks?: {
202
201
  type?: string;
203
202
  attrs?: Record<string, any>;
204
203
  }[];
204
+ attrs?: Record<string, any>;
205
205
  }>, z.ZodObject<z.objectUtil.extendShape<{
206
206
  type: z.ZodString;
207
207
  attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
@@ -223,20 +223,20 @@ export declare const TiptapSchema: z.ZodObject<{
223
223
  }>, "many">>;
224
224
  }>, "strip", z.ZodTypeAny, {
225
225
  type?: string;
226
- attrs?: Record<string, any>;
227
226
  text?: string;
228
227
  marks?: {
229
228
  type?: string;
230
229
  attrs?: Record<string, any>;
231
230
  }[];
231
+ attrs?: Record<string, any>;
232
232
  }, {
233
233
  type?: string;
234
- attrs?: Record<string, any>;
235
234
  text?: string;
236
235
  marks?: {
237
236
  type?: string;
238
237
  attrs?: Record<string, any>;
239
238
  }[];
239
+ attrs?: Record<string, any>;
240
240
  }>, z.ZodObject<{
241
241
  type: z.ZodString;
242
242
  attrs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
@@ -249,149 +249,149 @@ export declare const TiptapSchema: z.ZodObject<{
249
249
  }>]>, "many">>;
250
250
  }>, "strip", z.ZodTypeAny, {
251
251
  type?: string;
252
- attrs?: Record<string, any>;
253
252
  content?: ({
254
253
  type?: string;
255
254
  attrs?: Record<string, any>;
256
255
  } | {
257
256
  type?: string;
258
- attrs?: Record<string, any>;
259
257
  text?: string;
260
258
  marks?: {
261
259
  type?: string;
262
260
  attrs?: Record<string, any>;
263
261
  }[];
262
+ attrs?: Record<string, any>;
264
263
  })[];
264
+ attrs?: Record<string, any>;
265
265
  }, {
266
266
  type?: string;
267
- attrs?: Record<string, any>;
268
267
  content?: ({
269
268
  type?: string;
270
269
  attrs?: Record<string, any>;
271
270
  } | {
272
271
  type?: string;
273
- attrs?: Record<string, any>;
274
272
  text?: string;
275
273
  marks?: {
276
274
  type?: string;
277
275
  attrs?: Record<string, any>;
278
276
  }[];
277
+ attrs?: Record<string, any>;
279
278
  })[];
279
+ attrs?: Record<string, any>;
280
280
  }>]>, "many">>;
281
281
  }>, "strip", z.ZodTypeAny, {
282
282
  type?: string;
283
- attrs?: Record<string, any>;
284
283
  content?: ({
285
284
  type?: string;
286
- attrs?: Record<string, any>;
287
285
  text?: string;
288
286
  marks?: {
289
287
  type?: string;
290
288
  attrs?: Record<string, any>;
291
289
  }[];
290
+ attrs?: Record<string, any>;
292
291
  } | {
293
292
  type?: string;
294
- attrs?: Record<string, any>;
295
293
  content?: ({
296
294
  type?: string;
297
295
  attrs?: Record<string, any>;
298
296
  } | {
299
297
  type?: string;
300
- attrs?: Record<string, any>;
301
298
  text?: string;
302
299
  marks?: {
303
300
  type?: string;
304
301
  attrs?: Record<string, any>;
305
302
  }[];
303
+ attrs?: Record<string, any>;
306
304
  })[];
305
+ attrs?: Record<string, any>;
307
306
  })[];
307
+ attrs?: Record<string, any>;
308
308
  }, {
309
309
  type?: string;
310
- attrs?: Record<string, any>;
311
310
  content?: ({
312
311
  type?: string;
313
- attrs?: Record<string, any>;
314
312
  text?: string;
315
313
  marks?: {
316
314
  type?: string;
317
315
  attrs?: Record<string, any>;
318
316
  }[];
317
+ attrs?: Record<string, any>;
319
318
  } | {
320
319
  type?: string;
321
- attrs?: Record<string, any>;
322
320
  content?: ({
323
321
  type?: string;
324
322
  attrs?: Record<string, any>;
325
323
  } | {
326
324
  type?: string;
327
- attrs?: Record<string, any>;
328
325
  text?: string;
329
326
  marks?: {
330
327
  type?: string;
331
328
  attrs?: Record<string, any>;
332
329
  }[];
330
+ attrs?: Record<string, any>;
333
331
  })[];
332
+ attrs?: Record<string, any>;
334
333
  })[];
334
+ attrs?: Record<string, any>;
335
335
  }>, "many">;
336
336
  }, "strip", z.ZodTypeAny, {
337
337
  type?: "doc";
338
338
  content?: {
339
339
  type?: string;
340
- attrs?: Record<string, any>;
341
340
  content?: ({
342
341
  type?: string;
343
- attrs?: Record<string, any>;
344
342
  text?: string;
345
343
  marks?: {
346
344
  type?: string;
347
345
  attrs?: Record<string, any>;
348
346
  }[];
347
+ attrs?: Record<string, any>;
349
348
  } | {
350
349
  type?: string;
351
- attrs?: Record<string, any>;
352
350
  content?: ({
353
351
  type?: string;
354
352
  attrs?: Record<string, any>;
355
353
  } | {
356
354
  type?: string;
357
- attrs?: Record<string, any>;
358
355
  text?: string;
359
356
  marks?: {
360
357
  type?: string;
361
358
  attrs?: Record<string, any>;
362
359
  }[];
360
+ attrs?: Record<string, any>;
363
361
  })[];
362
+ attrs?: Record<string, any>;
364
363
  })[];
364
+ attrs?: Record<string, any>;
365
365
  }[];
366
366
  }, {
367
367
  type?: "doc";
368
368
  content?: {
369
369
  type?: string;
370
- attrs?: Record<string, any>;
371
370
  content?: ({
372
371
  type?: string;
373
- attrs?: Record<string, any>;
374
372
  text?: string;
375
373
  marks?: {
376
374
  type?: string;
377
375
  attrs?: Record<string, any>;
378
376
  }[];
377
+ attrs?: Record<string, any>;
379
378
  } | {
380
379
  type?: string;
381
- attrs?: Record<string, any>;
382
380
  content?: ({
383
381
  type?: string;
384
382
  attrs?: Record<string, any>;
385
383
  } | {
386
384
  type?: string;
387
- attrs?: Record<string, any>;
388
385
  text?: string;
389
386
  marks?: {
390
387
  type?: string;
391
388
  attrs?: Record<string, any>;
392
389
  }[];
390
+ attrs?: Record<string, any>;
393
391
  })[];
392
+ attrs?: Record<string, any>;
394
393
  })[];
394
+ attrs?: Record<string, any>;
395
395
  }[];
396
396
  }>;
397
397
  //# sourceMappingURL=tiptapSchema.d.ts.map