@yoopta/paragraph 4.8.4-rc.0 → 4.8.5-rc.10
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/commands/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { YooEditor,
|
|
1
|
+
import { YooEditor, YooptaPathIndex } from '@yoopta/editor';
|
|
2
2
|
import { ParagraphElement } from '../types';
|
|
3
3
|
type ParagraphElementOptions = {
|
|
4
4
|
text?: string;
|
|
5
5
|
};
|
|
6
6
|
type ParagraphInsertOptions = ParagraphElementOptions & {
|
|
7
|
-
at?:
|
|
7
|
+
at?: YooptaPathIndex;
|
|
8
8
|
focus?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export type ParagraphCommands = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,sBAAsB,GAAG,uBAAuB,GAAG;IACtD,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sBAAsB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,gBAAgB,CAAC;IAC5G,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IACxF,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,sBAAsB,GAAG,uBAAuB,GAAG;IACtD,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sBAAsB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,gBAAgB,CAAC;IAC5G,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IACxF,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAc/B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateId as e,Blocks as t,
|
|
1
|
+
import{generateId as e,Blocks as t,YooptaPlugin as r,serializeTextNodes as a,serializeTextNodesIntoMarkdown as n}from"@yoopta/editor";import{jsx as o}from"react/jsx-runtime";const i={buildParagraphElements:(t,r={})=>({id:e(),type:"paragraph",children:[{text:(null==r?void 0:r.text)||""}]}),insertParagraph:(e,r={})=>{const{at:a,focus:n,text:o}=r,p=i.buildParagraphElements(e,{text:o}),l=t.buildBlockData({value:[p],type:"Paragraph"});t.insertBlock(e,l.type,{at:a,focus:n,blockData:l})},deleteParagraph:(e,r)=>{t.deleteBlock(e,{blockId:r})}};function p(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}"function"==typeof SuppressedError&&SuppressedError;const l=new r({type:"Paragraph",elements:{paragraph:{render:e=>{var{extendRender:t}=e,r=p(e,["extendRender"]);const a=r.HTMLAttributes||{},{className:n=""}=a,i=p(a,["className"]);return t?t(r):o("p",Object.assign({className:`yoopta-paragraph ${n}`},i,r.attributes,{children:r.children}))}}},options:{display:{title:"Text",description:"Start writing plain text."},shortcuts:["p","text"]},parsers:{html:{deserialize:{nodeNames:["P"]},serialize:(e,t,r)=>{const{align:n="left",depth:o=0}=r||{};return`<p data-meta-align="${n}" data-meta-depth="${o}" style="margin-left: ${o}px; text-align: ${n}">${a(e.children)}</p>`}},markdown:{serialize:(e,t)=>`${n(e.children)}\n`}},commands:i});!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoopta-paragraph{font-size:16px;line-height:1.75rem;margin:.5rem 0 0}");export{i as ParagraphCommands,l as default};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/paragraph",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.5-rc.10",
|
|
4
4
|
"description": "Paragraph plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
|
-
"homepage": "https://github.com/Darginec05/Editor
|
|
6
|
+
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
9
9
|
"main": "dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"react-dom": ">=17.0.2"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
|
-
"registry": "https://registry.
|
|
22
|
+
"registry": "https://registry.npmjs.org"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/Darginec05/Editor
|
|
26
|
+
"url": "git+https://github.com/Darginec05/Yoopta-Editor.git"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"test": "node ./__tests__/@yoopta/paragraph.test.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build": "rollup --config rollup.config.js --bundleConfigAsCjs --environment NODE_ENV:production"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
|
-
"url": "https://github.com/Darginec05/Editor
|
|
35
|
+
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "3182313ed88751f9e847925251811e079e467940"
|
|
38
38
|
}
|