payload-richtext-tiptap 0.0.139 → 0.0.141
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.
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/AudioBlock.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/AudioBlock/components/AudioBlockMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/FontSize/FontSize.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/Heading/Heading.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/ImageBlock.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/ImageBlock/components/ImageBlockMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/InsideLinks/InsideLink.client.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js +3 -3
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/Columns.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/MultiColumn/menus/ColumnsMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SlashCommand/MenuList.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Facebook/facebook.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Instagram/instagram.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Tiktok/tiktok.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Twitter/twitter.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/SocialMedia/Youtube/youtube.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/VideoBlock.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/VideoBlockMenu.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/VideoBlock/components/videojs/quality-selector/events.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/extension-kit.d.ts +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.js +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentInlineRenderer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.d.ts +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.js +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSideRenderer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/EmbedContentSidebarRenderer.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/FacebookServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/InstagramServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/LinkedinServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/TiktokServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/TwitterBlockServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/YouTubeServerside.js.map +1 -1
- package/dist/src/fields/TiptapEditor/extensions/serverside/getAssetsAspectRatio.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontFamilyPicker.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/FontSizePicker.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.d.ts.map +1 -1
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.js +16 -11
- package/dist/src/fields/TiptapEditor/features/menus/TextMenu/components/ai-selector-commands.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AICommandPanel/AICommandPanel.js.map +1 -1
- package/dist/src/fields/TiptapEditor/features/panels/AIEditorPanel/utils.js.map +1 -1
- package/dist/src/fields/TiptapEditor/hooks/useBlockEditor.js.map +1 -1
- package/dist/src/fields/TiptapEditor/lib/tiptapSchema.d.ts +68 -68
- package/dist/src/fields/TiptapEditor/lib/utils/cssVar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/features/panels/AIEditorPanel/utils.ts"],"sourcesContent":["\nimport json5 from 'json5';\n\nexport const convertBody = (body: string) => {\n try {\n let parsedBody = body.replace('```json', '').replace('```', '');\n parsedBody = json5.parse(parsedBody);\n return parsedBody as unknown as object[];\n } catch (error) {\n try {\n const fixedJson = jsonFixer(body);\n return json5.parse(fixedJson);\n } catch (error) {\n console.error('Error occured When parsing translated error: ', error);\n console.error('Error occured When parsing translated body ', body);\n throw new Error(\n `Openapi translate with assistant An error occurred while processing your request .error: ${error} body: ${body}`,\n );\n }\n }\n}\n\nexport const jsonFixer = (json: string, provider?: string) => {\n if (provider === 'bedrock') {\n json += '}';\n }\n let fixedText = json\n .replace('```json', '')\n .replace('```', '')\n .replace(/”/g, '\"')\n .replace(/“/g, '\"')\n .replace(/’/g, \"'\")\n .replace(/‘/g, \"'\");\n\n const regex = /\"text\":\\s*\"([^]*)\"/g;\n\n // Metinde her text alanını kontrol et\n fixedText = fixedText.replace(regex, (match, p1) => {\n let text = p1.trim();\n\n if (!text.startsWith('\"')) {\n text = '\"' + text;\n }\n\n if (!text.endsWith('\"')) {\n text = text + '\"';\n }\n\n return `\"text\": ${text}`;\n });\n\n return fixedText;\n};\n\nexport const formatCompletion = (completion: string) => {\n const translatedText = completion\n .trim()\n .replace(/<translated_text>/g, '')\n .replace('</translated_text>', '');\n const body = convertBody(translatedText)\n return body\n}\n\nexport const checkJsonCompletion = (completion: string) => {\n return completion.includes(\"```json\") || completion.includes(\"\\\"type\\\":\") || completion.includes(\"\\\"content\\\":\")\n}"],"names":["json5","convertBody","body","parsedBody","replace","parse","error","fixedJson","jsonFixer","console","Error","json","provider","fixedText","regex","match","p1","text","trim","startsWith","endsWith","formatCompletion","completion","translatedText","checkJsonCompletion","includes"],"mappings":"AACA,OAAOA,WAAW,QAAQ;AAE1B,OAAO,MAAMC,cAAc,CAACC;IACxB,IAAI;QACA,IAAIC,aAAaD,KAAKE,OAAO,CAAC,WAAW,IAAIA,OAAO,CAAC,OAAO;QAC5DD,aAAaH,MAAMK,KAAK,CAACF;QACzB,OAAOA;IACX,EAAE,OAAOG,OAAO;QACZ,IAAI;YACA,MAAMC,YAAYC,UAAUN;YAC5B,OAAOF,MAAMK,KAAK,CAACE;QACvB,EAAE,OAAOD,OAAO;YACZG,QAAQH,KAAK,CAAC,iDAAiDA;YAC/DG,QAAQH,KAAK,CAAC,+CAA+CJ;YAC7D,MAAM,IAAIQ,MACN,CAAC,yFAAyF,EAAEJ,MAAM,OAAO,EAAEJ,
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/fields/TiptapEditor/features/panels/AIEditorPanel/utils.ts"],"sourcesContent":["\nimport json5 from 'json5';\n\nexport const convertBody = (body: string) => {\n try {\n let parsedBody = body.replace('```json', '').replace('```', '');\n parsedBody = json5.parse(parsedBody);\n return parsedBody as unknown as object[];\n } catch (error) {\n try {\n const fixedJson = jsonFixer(body);\n return json5.parse(fixedJson);\n } catch (error) {\n console.error('Error occured When parsing translated error: ', error);\n console.error('Error occured When parsing translated body ', body);\n throw new Error(\n `Openapi translate with assistant An error occurred while processing your request .error: ${error} body: ${body}`,\n );\n }\n }\n}\n\nexport const jsonFixer = (json: string, provider?: string) => {\n if (provider === 'bedrock') {\n json += '}';\n }\n let fixedText = json\n .replace('```json', '')\n .replace('```', '')\n .replace(/”/g, '\"')\n .replace(/“/g, '\"')\n .replace(/’/g, \"'\")\n .replace(/‘/g, \"'\");\n\n const regex = /\"text\":\\s*\"([^]*)\"/g;\n\n // Metinde her text alanını kontrol et\n fixedText = fixedText.replace(regex, (match, p1) => {\n let text = p1.trim();\n\n if (!text.startsWith('\"')) {\n text = '\"' + text;\n }\n\n if (!text.endsWith('\"')) {\n text = text + '\"';\n }\n\n return `\"text\": ${text}`;\n });\n\n return fixedText;\n};\n\nexport const formatCompletion = (completion: string) => {\n const translatedText = completion\n .trim()\n .replace(/<translated_text>/g, '')\n .replace('</translated_text>', '');\n const body = convertBody(translatedText)\n return body\n}\n\nexport const checkJsonCompletion = (completion: string) => {\n return completion.includes(\"```json\") || completion.includes(\"\\\"type\\\":\") || completion.includes(\"\\\"content\\\":\")\n}"],"names":["json5","convertBody","body","parsedBody","replace","parse","error","fixedJson","jsonFixer","console","Error","json","provider","fixedText","regex","match","p1","text","trim","startsWith","endsWith","formatCompletion","completion","translatedText","checkJsonCompletion","includes"],"mappings":"AACA,OAAOA,WAAW,QAAQ;AAE1B,OAAO,MAAMC,cAAc,CAACC;IACxB,IAAI;QACA,IAAIC,aAAaD,KAAKE,OAAO,CAAC,WAAW,IAAIA,OAAO,CAAC,OAAO;QAC5DD,aAAaH,MAAMK,KAAK,CAACF;QACzB,OAAOA;IACX,EAAE,OAAOG,OAAO;QACZ,IAAI;YACA,MAAMC,YAAYC,UAAUN;YAC5B,OAAOF,MAAMK,KAAK,CAACE;QACvB,EAAE,OAAOD,OAAO;YACZG,QAAQH,KAAK,CAAC,iDAAiDA;YAC/DG,QAAQH,KAAK,CAAC,+CAA+CJ;YAC7D,MAAM,IAAIQ,MACN,CAAC,yFAAyF,EAAEJ,MAAM,OAAO,EAAEJ,MAAM;QAEzH;IACJ;AACJ,EAAC;AAED,OAAO,MAAMM,YAAY,CAACG,MAAcC;IACpC,IAAIA,aAAa,WAAW;QACxBD,QAAQ;IACZ;IACA,IAAIE,YAAYF,KACXP,OAAO,CAAC,WAAW,IACnBA,OAAO,CAAC,OAAO,IACfA,OAAO,CAAC,MAAM,KACdA,OAAO,CAAC,MAAM,KACdA,OAAO,CAAC,MAAM,KACdA,OAAO,CAAC,MAAM;IAEnB,MAAMU,QAAQ;IAEd,sCAAsC;IACtCD,YAAYA,UAAUT,OAAO,CAACU,OAAO,CAACC,OAAOC;QACzC,IAAIC,OAAOD,GAAGE,IAAI;QAElB,IAAI,CAACD,KAAKE,UAAU,CAAC,MAAM;YACvBF,OAAO,MAAMA;QACjB;QAEA,IAAI,CAACA,KAAKG,QAAQ,CAAC,MAAM;YACrBH,OAAOA,OAAO;QAClB;QAEA,OAAO,CAAC,QAAQ,EAAEA,MAAM;IAC5B;IAEA,OAAOJ;AACX,EAAE;AAEF,OAAO,MAAMQ,mBAAmB,CAACC;IAC7B,MAAMC,iBAAiBD,WAClBJ,IAAI,GACJd,OAAO,CAAC,sBAAsB,IAC9BA,OAAO,CAAC,sBAAsB;IACnC,MAAMF,OAAOD,YAAYsB;IACzB,OAAOrB;AACX,EAAC;AAED,OAAO,MAAMsB,sBAAsB,CAACF;IAChC,OAAOA,WAAWG,QAAQ,CAAC,cAAcH,WAAWG,QAAQ,CAAC,gBAAgBH,WAAWG,QAAQ,CAAC;AACrG,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/hooks/useBlockEditor.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo } from \"react\";\n\nimport { Editor, useEditor } from \"@tiptap/react\";\n\nimport ExtensionKit from \"../extensions/extension-kit.js\";\nimport { EditorUser } from \"../features/BlockEditor/types.js\";\nimport { useSidebar } from \"./useSidebar.js\";\n\nimport TurndownService from \"turndown\";\nimport { gfm } from \"turndown-plugin-gfm\";\nimport { AssetReturnType, openAssetHQType } from \"../types.js\";\nimport i18next from \"i18next\";\n\ndeclare global {\n interface Window {\n editor: Editor | null;\n }\n}\n\nconst dummyAssetHqHandler = (\n listener: (asset: AssetReturnType) => void,\n file?: File\n) => {};\n\nexport const useBlockEditor = ({\n content,\n handleChange,\n openAssetHQHandler,\n additionalContext,\n autoFocus,\n isEditable,\n}: {\n content: { html: string; json: any };\n handleChange?: (data: any) => void;\n openAssetHQHandler?: openAssetHQType;\n additionalContext?: Record<string, any>;\n autoFocus: boolean;\n isEditable?: boolean;\n}) => {\n const leftSidebar = useSidebar();\n\n const turndownService = new TurndownService({});\n // Use the gfm plugin\n turndownService.use(gfm);\n turndownService.addRule(\"twitter\", {\n filter: \"div\",\n replacement: function (content) {\n return \"\\n\\n\" + content + \"\\n\\n\";\n },\n });\n const dir = i18next.dir()\n\n const editor = useEditor(\n {\n content: content?.json ?? content ?? {},\n immediatelyRender: false,\n autofocus: autoFocus ?? true,\n editable: isEditable ?? true,\n onCreate: ({ editor }) => ({\n // provider?.on('synced', () => {\n // if (editor.isEmpty) {\n // editor.commands.setContent(initialContent)\n // }\n // })\n }),\n extensions: [\n ...ExtensionKit({\n dir: i18next.dir(),\n openAssetHQHandler: openAssetHQHandler ?? dummyAssetHqHandler,\n // provider,\n }),\n // Collaboration.configure({\n // document: ydoc,\n // }),\n // CollaborationCursor.configure({\n // provider,\n // user: {\n // name: randomElement(userNames),\n // color: randomElement(userColors),\n // },\n // }),\n ],\n editorProps: {\n attributes: {\n languages: i18next.language,\n autocomplete: \"off\",\n autocorrect: \"off\",\n autocapitalize: \"off\",\n class: \"min-h-full\",\n },\n },\n onUpdate: ({ editor }) => {\n handleChange(editor?.getJSON() ?? {});\n },\n },\n [dir]\n );\n\n useEffect(() => {\n if (editor?.storage?.aiCommand) {\n editor.storage.aiCommand.title = additionalContext?.title ?? \"\";\n editor.storage.aiCommand.language = additionalContext?.language ?? \"\";\n }\n }, [editor, additionalContext]);\n\n const users = useMemo(() => {\n if (!editor?.storage?.collaborationCursor?.users) {\n return [];\n }\n\n return editor?.storage?.collaborationCursor?.users.map(\n (user: EditorUser) => {\n const names = user.name?.split(\" \");\n const firstName = names?.[0];\n const lastName = names?.[names.length - 1];\n const initials = `${firstName?.[0] || \"?\"}${lastName?.[0] || \"?\"}`;\n\n return { ...user, initials: initials.length ? initials : \"?\" };\n }\n );\n }, [editor?.storage.collaborationCursor?.users]);\n\n const characterCount = editor?.storage.characterCount || {\n characters: () => 0,\n words: () => 0,\n };\n\n // useEffect(() => {\n // provider?.on('status', (event: { status: WebSocketStatus }) => {\n // setCollabState(event.status)\n // })\n // }, [provider])\n\n if (typeof window != \"undefined\") window.editor = editor;\n\n return { editor, users, characterCount, leftSidebar };\n};\n"],"names":["useEffect","useMemo","useEditor","ExtensionKit","useSidebar","TurndownService","gfm","i18next","dummyAssetHqHandler","listener","file","useBlockEditor","content","handleChange","openAssetHQHandler","additionalContext","autoFocus","isEditable","leftSidebar","turndownService","use","addRule","filter","replacement","dir","editor","json","immediatelyRender","autofocus","editable","onCreate","extensions","editorProps","attributes","languages","language","autocomplete","autocorrect","autocapitalize","class","onUpdate","getJSON","storage","aiCommand","title","users","collaborationCursor","map","user","names","name","split","firstName","lastName","length","initials","characterCount","characters","words","window"],"mappings":"AAAA;AACA,SAASA,SAAS,EAAEC,OAAO,QAAQ,QAAQ;AAE3C,SAAiBC,SAAS,QAAQ,gBAAgB;AAElD,OAAOC,kBAAkB,iCAAiC;AAE1D,SAASC,UAAU,QAAQ,kBAAkB;AAE7C,OAAOC,qBAAqB,WAAW;AACvC,SAASC,GAAG,QAAQ,sBAAsB;AAE1C,OAAOC,aAAa,UAAU;AAQ9B,MAAMC,sBAAsB,CAC1BC,UACAC,QACI;AAEN,OAAO,MAAMC,iBAAiB,CAAC,EAC7BC,OAAO,EACPC,YAAY,EACZC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,UAAU,EAQX;IACC,MAAMC,cAAcd;IAEpB,MAAMe,kBAAkB,IAAId,gBAAgB,CAAC;IAC7C,qBAAqB;IACrBc,gBAAgBC,GAAG,CAACd;IACpBa,gBAAgBE,OAAO,CAAC,WAAW;QACjCC,QAAQ;QACRC,aAAa,SAAUX,OAAO;YAC5B,OAAO,SAASA,UAAU;QAC5B;IACF;IACD,MAAMY,MAAMjB,QAAQiB,GAAG;IAEtB,MAAMC,SAASvB,UACb;QACEU,SAASA,SAASc,QAAQd,WAAW,CAAC;QACtCe,mBAAmB;QACnBC,WAAWZ,aAAa;QACxBa,UAAUZ,cAAc;QACxBa,UAAU,CAAC,EAAEL,MAAM,EAAE,GAAM,CAAA;YAM3B,CAAA;QACAM,YAAY;eACP5B,aAAa;gBACdqB,KAAKjB,QAAQiB,GAAG;gBAChBV,oBAAoBA,sBAAsBN;YAE5C;SAWD;QACDwB,aAAa;YACXC,YAAY;gBACVC,WAAW3B,QAAQ4B,QAAQ;gBAC3BC,cAAc;gBACdC,aAAa;gBACbC,gBAAgB;gBAChBC,OAAO;YACT;QACF;QACAC,UAAU,CAAC,EAAEf,MAAM,EAAE;YACnBZ,aAAaY,QAAQgB,aAAa,CAAC;QACrC;IACF,GACA;QAACjB;KAAI;IAGPxB,UAAU;QACR,IAAIyB,QAAQiB,SAASC,WAAW;YAC9BlB,OAAOiB,OAAO,CAACC,SAAS,CAACC,KAAK,GAAG7B,mBAAmB6B,SAAS;YAC7DnB,OAAOiB,OAAO,CAACC,SAAS,CAACR,QAAQ,GAAGpB,mBAAmBoB,YAAY;QACrE;IACF,GAAG;QAACV;QAAQV;KAAkB;IAE9B,MAAM8B,QAAQ5C,QAAQ;QACpB,IAAI,CAACwB,QAAQiB,SAASI,qBAAqBD,OAAO;YAChD,OAAO,EAAE;QACX;QAEA,OAAOpB,QAAQiB,SAASI,qBAAqBD,MAAME,IACjD,CAACC;YACC,MAAMC,QAAQD,KAAKE,IAAI,EAAEC,MAAM;YAC/B,MAAMC,YAAYH,OAAO,CAAC,EAAE;YAC5B,MAAMI,WAAWJ,OAAO,CAACA,MAAMK,MAAM,GAAG,EAAE;YAC1C,MAAMC,WAAW,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/fields/TiptapEditor/hooks/useBlockEditor.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo } from \"react\";\n\nimport { Editor, useEditor } from \"@tiptap/react\";\n\nimport ExtensionKit from \"../extensions/extension-kit.js\";\nimport { EditorUser } from \"../features/BlockEditor/types.js\";\nimport { useSidebar } from \"./useSidebar.js\";\n\nimport TurndownService from \"turndown\";\nimport { gfm } from \"turndown-plugin-gfm\";\nimport { AssetReturnType, openAssetHQType } from \"../types.js\";\nimport i18next from \"i18next\";\n\ndeclare global {\n interface Window {\n editor: Editor | null;\n }\n}\n\nconst dummyAssetHqHandler = (\n listener: (asset: AssetReturnType) => void,\n file?: File\n) => {};\n\nexport const useBlockEditor = ({\n content,\n handleChange,\n openAssetHQHandler,\n additionalContext,\n autoFocus,\n isEditable,\n}: {\n content: { html: string; json: any };\n handleChange?: (data: any) => void;\n openAssetHQHandler?: openAssetHQType;\n additionalContext?: Record<string, any>;\n autoFocus: boolean;\n isEditable?: boolean;\n}) => {\n const leftSidebar = useSidebar();\n\n const turndownService = new TurndownService({});\n // Use the gfm plugin\n turndownService.use(gfm);\n turndownService.addRule(\"twitter\", {\n filter: \"div\",\n replacement: function (content) {\n return \"\\n\\n\" + content + \"\\n\\n\";\n },\n });\n const dir = i18next.dir()\n\n const editor = useEditor(\n {\n content: content?.json ?? content ?? {},\n immediatelyRender: false,\n autofocus: autoFocus ?? true,\n editable: isEditable ?? true,\n onCreate: ({ editor }) => ({\n // provider?.on('synced', () => {\n // if (editor.isEmpty) {\n // editor.commands.setContent(initialContent)\n // }\n // })\n }),\n extensions: [\n ...ExtensionKit({\n dir: i18next.dir(),\n openAssetHQHandler: openAssetHQHandler ?? dummyAssetHqHandler,\n // provider,\n }),\n // Collaboration.configure({\n // document: ydoc,\n // }),\n // CollaborationCursor.configure({\n // provider,\n // user: {\n // name: randomElement(userNames),\n // color: randomElement(userColors),\n // },\n // }),\n ],\n editorProps: {\n attributes: {\n languages: i18next.language,\n autocomplete: \"off\",\n autocorrect: \"off\",\n autocapitalize: \"off\",\n class: \"min-h-full\",\n },\n },\n onUpdate: ({ editor }) => {\n handleChange(editor?.getJSON() ?? {});\n },\n },\n [dir]\n );\n\n useEffect(() => {\n if (editor?.storage?.aiCommand) {\n editor.storage.aiCommand.title = additionalContext?.title ?? \"\";\n editor.storage.aiCommand.language = additionalContext?.language ?? \"\";\n }\n }, [editor, additionalContext]);\n\n const users = useMemo(() => {\n if (!editor?.storage?.collaborationCursor?.users) {\n return [];\n }\n\n return editor?.storage?.collaborationCursor?.users.map(\n (user: EditorUser) => {\n const names = user.name?.split(\" \");\n const firstName = names?.[0];\n const lastName = names?.[names.length - 1];\n const initials = `${firstName?.[0] || \"?\"}${lastName?.[0] || \"?\"}`;\n\n return { ...user, initials: initials.length ? initials : \"?\" };\n }\n );\n }, [editor?.storage.collaborationCursor?.users]);\n\n const characterCount = editor?.storage.characterCount || {\n characters: () => 0,\n words: () => 0,\n };\n\n // useEffect(() => {\n // provider?.on('status', (event: { status: WebSocketStatus }) => {\n // setCollabState(event.status)\n // })\n // }, [provider])\n\n if (typeof window != \"undefined\") window.editor = editor;\n\n return { editor, users, characterCount, leftSidebar };\n};\n"],"names":["useEffect","useMemo","useEditor","ExtensionKit","useSidebar","TurndownService","gfm","i18next","dummyAssetHqHandler","listener","file","useBlockEditor","content","handleChange","openAssetHQHandler","additionalContext","autoFocus","isEditable","leftSidebar","turndownService","use","addRule","filter","replacement","dir","editor","json","immediatelyRender","autofocus","editable","onCreate","extensions","editorProps","attributes","languages","language","autocomplete","autocorrect","autocapitalize","class","onUpdate","getJSON","storage","aiCommand","title","users","collaborationCursor","map","user","names","name","split","firstName","lastName","length","initials","characterCount","characters","words","window"],"mappings":"AAAA;AACA,SAASA,SAAS,EAAEC,OAAO,QAAQ,QAAQ;AAE3C,SAAiBC,SAAS,QAAQ,gBAAgB;AAElD,OAAOC,kBAAkB,iCAAiC;AAE1D,SAASC,UAAU,QAAQ,kBAAkB;AAE7C,OAAOC,qBAAqB,WAAW;AACvC,SAASC,GAAG,QAAQ,sBAAsB;AAE1C,OAAOC,aAAa,UAAU;AAQ9B,MAAMC,sBAAsB,CAC1BC,UACAC,QACI;AAEN,OAAO,MAAMC,iBAAiB,CAAC,EAC7BC,OAAO,EACPC,YAAY,EACZC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,UAAU,EAQX;IACC,MAAMC,cAAcd;IAEpB,MAAMe,kBAAkB,IAAId,gBAAgB,CAAC;IAC7C,qBAAqB;IACrBc,gBAAgBC,GAAG,CAACd;IACpBa,gBAAgBE,OAAO,CAAC,WAAW;QACjCC,QAAQ;QACRC,aAAa,SAAUX,OAAO;YAC5B,OAAO,SAASA,UAAU;QAC5B;IACF;IACD,MAAMY,MAAMjB,QAAQiB,GAAG;IAEtB,MAAMC,SAASvB,UACb;QACEU,SAASA,SAASc,QAAQd,WAAW,CAAC;QACtCe,mBAAmB;QACnBC,WAAWZ,aAAa;QACxBa,UAAUZ,cAAc;QACxBa,UAAU,CAAC,EAAEL,MAAM,EAAE,GAAM,CAAA;YAM3B,CAAA;QACAM,YAAY;eACP5B,aAAa;gBACdqB,KAAKjB,QAAQiB,GAAG;gBAChBV,oBAAoBA,sBAAsBN;YAE5C;SAWD;QACDwB,aAAa;YACXC,YAAY;gBACVC,WAAW3B,QAAQ4B,QAAQ;gBAC3BC,cAAc;gBACdC,aAAa;gBACbC,gBAAgB;gBAChBC,OAAO;YACT;QACF;QACAC,UAAU,CAAC,EAAEf,MAAM,EAAE;YACnBZ,aAAaY,QAAQgB,aAAa,CAAC;QACrC;IACF,GACA;QAACjB;KAAI;IAGPxB,UAAU;QACR,IAAIyB,QAAQiB,SAASC,WAAW;YAC9BlB,OAAOiB,OAAO,CAACC,SAAS,CAACC,KAAK,GAAG7B,mBAAmB6B,SAAS;YAC7DnB,OAAOiB,OAAO,CAACC,SAAS,CAACR,QAAQ,GAAGpB,mBAAmBoB,YAAY;QACrE;IACF,GAAG;QAACV;QAAQV;KAAkB;IAE9B,MAAM8B,QAAQ5C,QAAQ;QACpB,IAAI,CAACwB,QAAQiB,SAASI,qBAAqBD,OAAO;YAChD,OAAO,EAAE;QACX;QAEA,OAAOpB,QAAQiB,SAASI,qBAAqBD,MAAME,IACjD,CAACC;YACC,MAAMC,QAAQD,KAAKE,IAAI,EAAEC,MAAM;YAC/B,MAAMC,YAAYH,OAAO,CAAC,EAAE;YAC5B,MAAMI,WAAWJ,OAAO,CAACA,MAAMK,MAAM,GAAG,EAAE;YAC1C,MAAMC,WAAW,GAAGH,WAAW,CAAC,EAAE,IAAI,MAAMC,UAAU,CAAC,EAAE,IAAI,KAAK;YAElE,OAAO;gBAAE,GAAGL,IAAI;gBAAEO,UAAUA,SAASD,MAAM,GAAGC,WAAW;YAAI;QAC/D;IAEJ,GAAG;QAAC9B,QAAQiB,QAAQI,qBAAqBD;KAAM;IAE/C,MAAMW,iBAAiB/B,QAAQiB,QAAQc,kBAAkB;QACvDC,YAAY,IAAM;QAClBC,OAAO,IAAM;IACf;IAEA,oBAAoB;IACpB,qEAAqE;IACrE,mCAAmC;IACnC,OAAO;IACP,iBAAiB;IAEjB,IAAI,OAAOC,UAAU,aAAaA,OAAOlC,MAAM,GAAGA;IAElD,OAAO;QAAEA;QAAQoB;QAAOW;QAAgBtC;IAAY;AACtD,EAAE"}
|
|
@@ -19,21 +19,21 @@ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
19
19
|
attrs?: Record<string, any>;
|
|
20
20
|
}>, "many">>;
|
|
21
21
|
}>, "strip", z.ZodTypeAny, {
|
|
22
|
-
type?: string;
|
|
23
|
-
attrs?: Record<string, any>;
|
|
24
22
|
text?: string;
|
|
25
23
|
marks?: {
|
|
26
24
|
type?: string;
|
|
27
25
|
attrs?: Record<string, any>;
|
|
28
26
|
}[];
|
|
29
|
-
}, {
|
|
30
27
|
type?: string;
|
|
31
28
|
attrs?: Record<string, any>;
|
|
29
|
+
}, {
|
|
32
30
|
text?: string;
|
|
33
31
|
marks?: {
|
|
34
32
|
type?: string;
|
|
35
33
|
attrs?: Record<string, any>;
|
|
36
34
|
}[];
|
|
35
|
+
type?: string;
|
|
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>>;
|
|
@@ -54,21 +54,21 @@ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
54
54
|
attrs?: Record<string, any>;
|
|
55
55
|
}>, "many">>;
|
|
56
56
|
}>, "strip", z.ZodTypeAny, {
|
|
57
|
-
type?: string;
|
|
58
|
-
attrs?: Record<string, any>;
|
|
59
57
|
text?: string;
|
|
60
58
|
marks?: {
|
|
61
59
|
type?: string;
|
|
62
60
|
attrs?: Record<string, any>;
|
|
63
61
|
}[];
|
|
64
|
-
}, {
|
|
65
62
|
type?: string;
|
|
66
63
|
attrs?: Record<string, any>;
|
|
64
|
+
}, {
|
|
67
65
|
text?: string;
|
|
68
66
|
marks?: {
|
|
69
67
|
type?: string;
|
|
70
68
|
attrs?: Record<string, any>;
|
|
71
69
|
}[];
|
|
70
|
+
type?: string;
|
|
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>>;
|
|
@@ -80,90 +80,90 @@ export declare const JSONContentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
80
80
|
attrs?: Record<string, any>;
|
|
81
81
|
}>]>, "many">>;
|
|
82
82
|
}>, "strip", z.ZodTypeAny, {
|
|
83
|
-
type?: string;
|
|
84
|
-
attrs?: Record<string, any>;
|
|
85
83
|
content?: ({
|
|
86
84
|
type?: string;
|
|
87
85
|
attrs?: Record<string, any>;
|
|
88
86
|
} | {
|
|
89
|
-
type?: string;
|
|
90
|
-
attrs?: Record<string, any>;
|
|
91
87
|
text?: string;
|
|
92
88
|
marks?: {
|
|
93
89
|
type?: string;
|
|
94
90
|
attrs?: Record<string, any>;
|
|
95
91
|
}[];
|
|
92
|
+
type?: string;
|
|
93
|
+
attrs?: Record<string, any>;
|
|
96
94
|
})[];
|
|
97
|
-
}, {
|
|
98
95
|
type?: string;
|
|
99
96
|
attrs?: Record<string, any>;
|
|
97
|
+
}, {
|
|
100
98
|
content?: ({
|
|
101
99
|
type?: string;
|
|
102
100
|
attrs?: Record<string, any>;
|
|
103
101
|
} | {
|
|
104
|
-
type?: string;
|
|
105
|
-
attrs?: Record<string, any>;
|
|
106
102
|
text?: string;
|
|
107
103
|
marks?: {
|
|
108
104
|
type?: string;
|
|
109
105
|
attrs?: Record<string, any>;
|
|
110
106
|
}[];
|
|
107
|
+
type?: string;
|
|
108
|
+
attrs?: Record<string, any>;
|
|
111
109
|
})[];
|
|
110
|
+
type?: string;
|
|
111
|
+
attrs?: Record<string, any>;
|
|
112
112
|
}>]>, "many">>;
|
|
113
113
|
}>, "strip", z.ZodTypeAny, {
|
|
114
|
-
type?: string;
|
|
115
|
-
attrs?: Record<string, any>;
|
|
116
114
|
content?: ({
|
|
117
|
-
type?: string;
|
|
118
|
-
attrs?: Record<string, any>;
|
|
119
115
|
text?: string;
|
|
120
116
|
marks?: {
|
|
121
117
|
type?: string;
|
|
122
118
|
attrs?: Record<string, any>;
|
|
123
119
|
}[];
|
|
124
|
-
} | {
|
|
125
120
|
type?: string;
|
|
126
121
|
attrs?: Record<string, any>;
|
|
122
|
+
} | {
|
|
127
123
|
content?: ({
|
|
128
124
|
type?: string;
|
|
129
125
|
attrs?: Record<string, any>;
|
|
130
126
|
} | {
|
|
131
|
-
type?: string;
|
|
132
|
-
attrs?: Record<string, any>;
|
|
133
127
|
text?: string;
|
|
134
128
|
marks?: {
|
|
135
129
|
type?: string;
|
|
136
130
|
attrs?: Record<string, any>;
|
|
137
131
|
}[];
|
|
132
|
+
type?: string;
|
|
133
|
+
attrs?: Record<string, any>;
|
|
138
134
|
})[];
|
|
135
|
+
type?: string;
|
|
136
|
+
attrs?: Record<string, any>;
|
|
139
137
|
})[];
|
|
140
|
-
}, {
|
|
141
138
|
type?: string;
|
|
142
139
|
attrs?: Record<string, any>;
|
|
140
|
+
}, {
|
|
143
141
|
content?: ({
|
|
144
|
-
type?: string;
|
|
145
|
-
attrs?: Record<string, any>;
|
|
146
142
|
text?: string;
|
|
147
143
|
marks?: {
|
|
148
144
|
type?: string;
|
|
149
145
|
attrs?: Record<string, any>;
|
|
150
146
|
}[];
|
|
151
|
-
} | {
|
|
152
147
|
type?: string;
|
|
153
148
|
attrs?: Record<string, any>;
|
|
149
|
+
} | {
|
|
154
150
|
content?: ({
|
|
155
151
|
type?: string;
|
|
156
152
|
attrs?: Record<string, any>;
|
|
157
153
|
} | {
|
|
158
|
-
type?: string;
|
|
159
|
-
attrs?: Record<string, any>;
|
|
160
154
|
text?: string;
|
|
161
155
|
marks?: {
|
|
162
156
|
type?: string;
|
|
163
157
|
attrs?: Record<string, any>;
|
|
164
158
|
}[];
|
|
159
|
+
type?: string;
|
|
160
|
+
attrs?: Record<string, any>;
|
|
165
161
|
})[];
|
|
162
|
+
type?: string;
|
|
163
|
+
attrs?: Record<string, any>;
|
|
166
164
|
})[];
|
|
165
|
+
type?: string;
|
|
166
|
+
attrs?: Record<string, any>;
|
|
167
167
|
}>;
|
|
168
168
|
export declare const TiptapSchema: z.ZodObject<{
|
|
169
169
|
type: z.ZodLiteral<"doc">;
|
|
@@ -187,21 +187,21 @@ export declare const TiptapSchema: z.ZodObject<{
|
|
|
187
187
|
attrs?: Record<string, any>;
|
|
188
188
|
}>, "many">>;
|
|
189
189
|
}>, "strip", z.ZodTypeAny, {
|
|
190
|
-
type?: string;
|
|
191
|
-
attrs?: Record<string, any>;
|
|
192
190
|
text?: string;
|
|
193
191
|
marks?: {
|
|
194
192
|
type?: string;
|
|
195
193
|
attrs?: Record<string, any>;
|
|
196
194
|
}[];
|
|
197
|
-
}, {
|
|
198
195
|
type?: string;
|
|
199
196
|
attrs?: Record<string, any>;
|
|
197
|
+
}, {
|
|
200
198
|
text?: string;
|
|
201
199
|
marks?: {
|
|
202
200
|
type?: string;
|
|
203
201
|
attrs?: Record<string, any>;
|
|
204
202
|
}[];
|
|
203
|
+
type?: string;
|
|
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>>;
|
|
@@ -222,21 +222,21 @@ export declare const TiptapSchema: z.ZodObject<{
|
|
|
222
222
|
attrs?: Record<string, any>;
|
|
223
223
|
}>, "many">>;
|
|
224
224
|
}>, "strip", z.ZodTypeAny, {
|
|
225
|
-
type?: string;
|
|
226
|
-
attrs?: Record<string, any>;
|
|
227
225
|
text?: string;
|
|
228
226
|
marks?: {
|
|
229
227
|
type?: string;
|
|
230
228
|
attrs?: Record<string, any>;
|
|
231
229
|
}[];
|
|
232
|
-
}, {
|
|
233
230
|
type?: string;
|
|
234
231
|
attrs?: Record<string, any>;
|
|
232
|
+
}, {
|
|
235
233
|
text?: string;
|
|
236
234
|
marks?: {
|
|
237
235
|
type?: string;
|
|
238
236
|
attrs?: Record<string, any>;
|
|
239
237
|
}[];
|
|
238
|
+
type?: string;
|
|
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>>;
|
|
@@ -248,150 +248,150 @@ export declare const TiptapSchema: z.ZodObject<{
|
|
|
248
248
|
attrs?: Record<string, any>;
|
|
249
249
|
}>]>, "many">>;
|
|
250
250
|
}>, "strip", z.ZodTypeAny, {
|
|
251
|
-
type?: string;
|
|
252
|
-
attrs?: Record<string, any>;
|
|
253
251
|
content?: ({
|
|
254
252
|
type?: string;
|
|
255
253
|
attrs?: Record<string, any>;
|
|
256
254
|
} | {
|
|
257
|
-
type?: string;
|
|
258
|
-
attrs?: Record<string, any>;
|
|
259
255
|
text?: string;
|
|
260
256
|
marks?: {
|
|
261
257
|
type?: string;
|
|
262
258
|
attrs?: Record<string, any>;
|
|
263
259
|
}[];
|
|
260
|
+
type?: string;
|
|
261
|
+
attrs?: Record<string, any>;
|
|
264
262
|
})[];
|
|
265
|
-
}, {
|
|
266
263
|
type?: string;
|
|
267
264
|
attrs?: Record<string, any>;
|
|
265
|
+
}, {
|
|
268
266
|
content?: ({
|
|
269
267
|
type?: string;
|
|
270
268
|
attrs?: Record<string, any>;
|
|
271
269
|
} | {
|
|
272
|
-
type?: string;
|
|
273
|
-
attrs?: Record<string, any>;
|
|
274
270
|
text?: string;
|
|
275
271
|
marks?: {
|
|
276
272
|
type?: string;
|
|
277
273
|
attrs?: Record<string, any>;
|
|
278
274
|
}[];
|
|
275
|
+
type?: string;
|
|
276
|
+
attrs?: Record<string, any>;
|
|
279
277
|
})[];
|
|
278
|
+
type?: string;
|
|
279
|
+
attrs?: Record<string, any>;
|
|
280
280
|
}>]>, "many">>;
|
|
281
281
|
}>, "strip", z.ZodTypeAny, {
|
|
282
|
-
type?: string;
|
|
283
|
-
attrs?: Record<string, any>;
|
|
284
282
|
content?: ({
|
|
285
|
-
type?: string;
|
|
286
|
-
attrs?: Record<string, any>;
|
|
287
283
|
text?: string;
|
|
288
284
|
marks?: {
|
|
289
285
|
type?: string;
|
|
290
286
|
attrs?: Record<string, any>;
|
|
291
287
|
}[];
|
|
292
|
-
} | {
|
|
293
288
|
type?: string;
|
|
294
289
|
attrs?: Record<string, any>;
|
|
290
|
+
} | {
|
|
295
291
|
content?: ({
|
|
296
292
|
type?: string;
|
|
297
293
|
attrs?: Record<string, any>;
|
|
298
294
|
} | {
|
|
299
|
-
type?: string;
|
|
300
|
-
attrs?: Record<string, any>;
|
|
301
295
|
text?: string;
|
|
302
296
|
marks?: {
|
|
303
297
|
type?: string;
|
|
304
298
|
attrs?: Record<string, any>;
|
|
305
299
|
}[];
|
|
300
|
+
type?: string;
|
|
301
|
+
attrs?: Record<string, any>;
|
|
306
302
|
})[];
|
|
303
|
+
type?: string;
|
|
304
|
+
attrs?: Record<string, any>;
|
|
307
305
|
})[];
|
|
308
|
-
}, {
|
|
309
306
|
type?: string;
|
|
310
307
|
attrs?: Record<string, any>;
|
|
308
|
+
}, {
|
|
311
309
|
content?: ({
|
|
312
|
-
type?: string;
|
|
313
|
-
attrs?: Record<string, any>;
|
|
314
310
|
text?: string;
|
|
315
311
|
marks?: {
|
|
316
312
|
type?: string;
|
|
317
313
|
attrs?: Record<string, any>;
|
|
318
314
|
}[];
|
|
319
|
-
} | {
|
|
320
315
|
type?: string;
|
|
321
316
|
attrs?: Record<string, any>;
|
|
317
|
+
} | {
|
|
322
318
|
content?: ({
|
|
323
319
|
type?: string;
|
|
324
320
|
attrs?: Record<string, any>;
|
|
325
321
|
} | {
|
|
326
|
-
type?: string;
|
|
327
|
-
attrs?: Record<string, any>;
|
|
328
322
|
text?: string;
|
|
329
323
|
marks?: {
|
|
330
324
|
type?: string;
|
|
331
325
|
attrs?: Record<string, any>;
|
|
332
326
|
}[];
|
|
327
|
+
type?: string;
|
|
328
|
+
attrs?: Record<string, any>;
|
|
333
329
|
})[];
|
|
330
|
+
type?: string;
|
|
331
|
+
attrs?: Record<string, any>;
|
|
334
332
|
})[];
|
|
333
|
+
type?: string;
|
|
334
|
+
attrs?: Record<string, any>;
|
|
335
335
|
}>, "many">;
|
|
336
336
|
}, "strip", z.ZodTypeAny, {
|
|
337
|
-
type?: "doc";
|
|
338
337
|
content?: {
|
|
339
|
-
type?: string;
|
|
340
|
-
attrs?: Record<string, any>;
|
|
341
338
|
content?: ({
|
|
342
|
-
type?: string;
|
|
343
|
-
attrs?: Record<string, any>;
|
|
344
339
|
text?: string;
|
|
345
340
|
marks?: {
|
|
346
341
|
type?: string;
|
|
347
342
|
attrs?: Record<string, any>;
|
|
348
343
|
}[];
|
|
349
|
-
} | {
|
|
350
344
|
type?: string;
|
|
351
345
|
attrs?: Record<string, any>;
|
|
346
|
+
} | {
|
|
352
347
|
content?: ({
|
|
353
348
|
type?: string;
|
|
354
349
|
attrs?: Record<string, any>;
|
|
355
350
|
} | {
|
|
356
|
-
type?: string;
|
|
357
|
-
attrs?: Record<string, any>;
|
|
358
351
|
text?: string;
|
|
359
352
|
marks?: {
|
|
360
353
|
type?: string;
|
|
361
354
|
attrs?: Record<string, any>;
|
|
362
355
|
}[];
|
|
356
|
+
type?: string;
|
|
357
|
+
attrs?: Record<string, any>;
|
|
363
358
|
})[];
|
|
359
|
+
type?: string;
|
|
360
|
+
attrs?: Record<string, any>;
|
|
364
361
|
})[];
|
|
362
|
+
type?: string;
|
|
363
|
+
attrs?: Record<string, any>;
|
|
365
364
|
}[];
|
|
366
|
-
}, {
|
|
367
365
|
type?: "doc";
|
|
366
|
+
}, {
|
|
368
367
|
content?: {
|
|
369
|
-
type?: string;
|
|
370
|
-
attrs?: Record<string, any>;
|
|
371
368
|
content?: ({
|
|
372
|
-
type?: string;
|
|
373
|
-
attrs?: Record<string, any>;
|
|
374
369
|
text?: string;
|
|
375
370
|
marks?: {
|
|
376
371
|
type?: string;
|
|
377
372
|
attrs?: Record<string, any>;
|
|
378
373
|
}[];
|
|
379
|
-
} | {
|
|
380
374
|
type?: string;
|
|
381
375
|
attrs?: Record<string, any>;
|
|
376
|
+
} | {
|
|
382
377
|
content?: ({
|
|
383
378
|
type?: string;
|
|
384
379
|
attrs?: Record<string, any>;
|
|
385
380
|
} | {
|
|
386
|
-
type?: string;
|
|
387
|
-
attrs?: Record<string, any>;
|
|
388
381
|
text?: string;
|
|
389
382
|
marks?: {
|
|
390
383
|
type?: string;
|
|
391
384
|
attrs?: Record<string, any>;
|
|
392
385
|
}[];
|
|
386
|
+
type?: string;
|
|
387
|
+
attrs?: Record<string, any>;
|
|
393
388
|
})[];
|
|
389
|
+
type?: string;
|
|
390
|
+
attrs?: Record<string, any>;
|
|
394
391
|
})[];
|
|
392
|
+
type?: string;
|
|
393
|
+
attrs?: Record<string, any>;
|
|
395
394
|
}[];
|
|
395
|
+
type?: "doc";
|
|
396
396
|
}>;
|
|
397
397
|
//# sourceMappingURL=tiptapSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/lib/utils/cssVar.ts"],"sourcesContent":["export const cssVar = (name: string, value?: string) => {\n let currentName = name\n if (name.substring(0, 2) !== '--') {\n currentName = `--${currentName}`\n }\n\n if (value) {\n document.documentElement.style.setProperty(currentName, value)\n }\n\n return getComputedStyle(document.body).getPropertyValue(currentName)\n}\n\nexport default cssVar\n"],"names":["cssVar","name","value","currentName","substring","document","documentElement","style","setProperty","getComputedStyle","body","getPropertyValue"],"mappings":"AAAA,OAAO,MAAMA,SAAS,CAACC,MAAcC;IACnC,IAAIC,cAAcF;IAClB,IAAIA,KAAKG,SAAS,CAAC,GAAG,OAAO,MAAM;QACjCD,cAAc,CAAC,EAAE,EAAEA,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/fields/TiptapEditor/lib/utils/cssVar.ts"],"sourcesContent":["export const cssVar = (name: string, value?: string) => {\n let currentName = name\n if (name.substring(0, 2) !== '--') {\n currentName = `--${currentName}`\n }\n\n if (value) {\n document.documentElement.style.setProperty(currentName, value)\n }\n\n return getComputedStyle(document.body).getPropertyValue(currentName)\n}\n\nexport default cssVar\n"],"names":["cssVar","name","value","currentName","substring","document","documentElement","style","setProperty","getComputedStyle","body","getPropertyValue"],"mappings":"AAAA,OAAO,MAAMA,SAAS,CAACC,MAAcC;IACnC,IAAIC,cAAcF;IAClB,IAAIA,KAAKG,SAAS,CAAC,GAAG,OAAO,MAAM;QACjCD,cAAc,CAAC,EAAE,EAAEA,aAAa;IAClC;IAEA,IAAID,OAAO;QACTG,SAASC,eAAe,CAACC,KAAK,CAACC,WAAW,CAACL,aAAaD;IAC1D;IAEA,OAAOO,iBAAiBJ,SAASK,IAAI,EAAEC,gBAAgB,CAACR;AAC1D,EAAC;AAED,eAAeH,OAAM"}
|