@yoopta/blockquote 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,11 +1,11 @@
|
|
|
1
|
-
import { YooEditor,
|
|
1
|
+
import { YooEditor, YooptaPathIndex } from '@yoopta/editor';
|
|
2
2
|
import { BlockquoteElement } from '../types';
|
|
3
3
|
type BlockquoteElementOptions = {
|
|
4
4
|
text?: string;
|
|
5
5
|
};
|
|
6
6
|
export type InsertBlockquoteOptions = {
|
|
7
7
|
text?: string;
|
|
8
|
-
at?:
|
|
8
|
+
at?: YooptaPathIndex;
|
|
9
9
|
focus?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export type BlockquoteCommands = {
|
|
@@ -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,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,iBAAiB,CAAC;IAC/G,gBAAgB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC1F,gBAAgB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,kBAAkB,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,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uBAAuB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,iBAAiB,CAAC;IAC/G,gBAAgB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC1F,gBAAgB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,kBAehC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateId as e,
|
|
1
|
+
import{generateId as e,buildBlockData as t,Blocks as o,YooptaPlugin as r,serializeTextNodesIntoMarkdown as l}from"@yoopta/editor";import{jsx as n}from"react/jsx-runtime";const a={buildBlockquoteElements:(t,o={})=>({id:e(),type:"blockquote",children:[{text:(null==o?void 0:o.text)||""}]}),insertBlockquote:(e,r={})=>{const{at:l,focus:n,text:i}=r,c=a.buildBlockquoteElements(e,{text:i}),d=t({value:[c],type:"Blockquote"});o.insertBlock(e,d.type,{at:l,focus:n,blockData:d})},deleteBlockquote:(e,t)=>{o.deleteBlock(e,{blockId:t})}};function i(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(e);l<r.length;l++)t.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(o[r[l]]=e[r[l]])}return o}"function"==typeof SuppressedError&&SuppressedError;const c=new r({type:"Blockquote",elements:{blockquote:{render:e=>{var{extendRender:t}=e,o=i(e,["extendRender"]);const r=o.HTMLAttributes||{},{className:l=""}=r,a=i(r,["className"]);return t?t(o):n("blockquote",Object.assign({className:`yoopta-blockquote ${l}`},a,o.attributes,{children:o.children}))}}},options:{display:{title:"Blockquote",description:"Capture quote"},shortcuts:[">"]},commands:a,parsers:{html:{deserialize:{nodeNames:["BLOCKQUOTE"]},serialize:(e,t,o)=>{const{align:r="left",depth:l=0}=o||{};return`<blockquote data-meta-align="${r}" data-meta-depth="${l}" style="margin-left: ${l}px; text-align: ${r}; border-left: 3px solid; color: #292929; padding: 2px 14px; margin-top: 8px;">${t}</blockquote>`}},markdown:{serialize:(e,t)=>`> ${l(e.children)}`}},extensions:function(e,t){return e}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===o&&r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}(".yoopta-blockquote{--tw-border-opacity:1;border-left-color:rgb(229 231 235/var(--tw-border-opacity));border-left-width:2px;line-height:1.75rem;margin:8px 0 0;padding-left:1.5rem}");export{a as BlockquoteCommands,c as default};
|
package/dist/plugin/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { YooptaPlugin } from '@yoopta/editor';
|
|
1
|
+
import { SlateEditor, YooEditor, YooptaPlugin } from '@yoopta/editor';
|
|
2
2
|
import { BlockquoteElement } from '../types';
|
|
3
3
|
declare const Blockquote: YooptaPlugin<Record<"blockquote", BlockquoteElement>, Record<string, unknown>>;
|
|
4
|
+
export declare function withBlockquote(slate: SlateEditor, editor: YooEditor): import("slate-react").ReactEditor;
|
|
4
5
|
export { Blockquote };
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAI7C,QAAA,MAAM,UAAU,gFAgCd,CAAC;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,qCAEnE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/blockquote",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.5-rc.10",
|
|
4
4
|
"description": "Blockquote 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-blockquote.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
|
}
|