@yoopta/blockquote 4.8.5-rc.9 → 4.9.1
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/index.js +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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};
|
|
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: ${20*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};
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,gFAkCd,CAAC;AAEH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,qCAEnE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/blockquote",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.1",
|
|
4
4
|
"description": "Blockquote plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "35395d0531032215038090494c72bc33d2bcc535"
|
|
38
38
|
}
|