@yoopta/callout 4.0.0-rc.4 → 4.0.0-rc.6
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UI as e,useBlockData as o,useYooptaEditor as t,YooptaPlugin as r}from"@yoopta/editor";import{jsxs as n,jsx as c}from"react/jsx-runtime";import*as l from"react";const i={default:{backgroundColor:"#f5f7f9",color:"#000"},info:{backgroundColor:"#e1f3fe",color:"#08a2e7",borderLeft:"4px solid #08a2e7"},success:{backgroundColor:"#d1fae5",color:"#12b77f",borderLeft:"4px solid #12b77f"},warning:{backgroundColor:"#fef3c9",color:"#f97415",borderLeft:"4px solid #f97415"},error:{backgroundColor:"#fee1e2",color:"#ee4443",borderLeft:"4px solid #ee4443"}};var s,a;function d(){return d=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d.apply(this,arguments)}var u,p=function(e){return l.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"success_svg__lucide success_svg__lucide-circle-check"},e),s||(s=l.createElement("circle",{cx:12,cy:12,r:10})),a||(a=l.createElement("path",{d:"m9 12 2 2 4-4"})))};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},h.apply(this,arguments)}var g,
|
|
1
|
+
import{UI as e,useBlockData as o,useYooptaEditor as t,YooptaPlugin as r}from"@yoopta/editor";import{jsxs as n,jsx as c}from"react/jsx-runtime";import*as l from"react";const i={default:{backgroundColor:"#f5f7f9",color:"#000"},info:{backgroundColor:"#e1f3fe",color:"#08a2e7",borderLeft:"4px solid #08a2e7"},success:{backgroundColor:"#d1fae5",color:"#12b77f",borderLeft:"4px solid #12b77f"},warning:{backgroundColor:"#fef3c9",color:"#f97415",borderLeft:"4px solid #f97415"},error:{backgroundColor:"#fee1e2",color:"#ee4443",borderLeft:"4px solid #ee4443"}};var s,a;function d(){return d=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d.apply(this,arguments)}var u,p=function(e){return l.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"success_svg__lucide success_svg__lucide-circle-check"},e),s||(s=l.createElement("circle",{cx:12,cy:12,r:10})),a||(a=l.createElement("path",{d:"m9 12 2 2 4-4"})))};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},h.apply(this,arguments)}var f,g,m=function(e){return l.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"warning_svg__lucide warning_svg__lucide-triangle-alert"},e),u||(u=l.createElement("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01"})))};function y(){return y=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y.apply(this,arguments)}var b,v,w=function(e){return l.createElement("svg",y({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"error_svg__lucide error_svg__lucide-circle-x"},e),f||(f=l.createElement("circle",{cx:12,cy:12,r:10})),g||(g=l.createElement("path",{d:"m15 9-6 6M9 9l6 6"})))};function k(){return k=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)}var x,C,j=function(e){return l.createElement("svg",k({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"default_svg__lucide default_svg__lucide-ban"},e),b||(b=l.createElement("circle",{cx:12,cy:12,r:10})),v||(v=l.createElement("path",{d:"m4.9 4.9 14.2 14.2"})))};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},O.apply(this,arguments)}var _=function(e){return l.createElement("svg",O({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"info_svg__lucide info_svg__lucide-info"},e),x||(x=l.createElement("circle",{cx:12,cy:12,r:10})),C||(C=l.createElement("path",{d:"M12 16v-4M12 8h.01"})))};const{ExtendedBlockActions:N,BlockOptionsMenuGroup:E,BlockOptionsMenuItem:L,BlockOptionsSeparator:B}=e,M=({editor:e,block:o,props:t})=>{const r=t=>{e.blocks.Callout.updateElement(o.id,"callout",{theme:t})},l=e=>(null==t?void 0:t.theme)===e;return n(N,Object.assign({onClick:()=>e.setSelection([o.meta.order]),className:"yoopta-callout-options"},{children:[c(B,{}),n(E,{children:[c(L,{children:n("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>r("default"),style:{backgroundColor:l("default")?i.default.backgroundColor:void 0}},{children:[c(j,{width:16,height:16,color:i.default.color,className:"w-4 h-4 mr-2"}),"Default"]}))}),c(L,{children:n("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>r("info"),style:{backgroundColor:l("info")?i.info.backgroundColor:void 0}},{children:[c(_,{width:16,height:16,color:i.info.color,className:"w-4 h-4 mr-2"}),"Info"]}))}),c(L,{children:n("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>r("success"),style:{backgroundColor:l("success")?i.success.backgroundColor:void 0}},{children:[c(p,{width:16,height:16,color:i.success.color,className:"w-4 h-4 mr-2"}),"Success"]}))}),c(L,{children:n("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>r("warning"),style:{backgroundColor:l("warning")?i.warning.backgroundColor:void 0}},{children:[c(m,{width:16,height:16,color:i.warning.color,className:"w-4 h-4 mr-2"}),"Warning"]}))}),c(L,{children:n("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>r("error"),style:{backgroundColor:l("error")?i.error.backgroundColor:void 0}},{children:[c(w,{width:16,height:16,color:i.error.color,className:"w-4 h-4 mr-2"}),"Error"]}))})]})]}))},W=({element:e,attributes:r,children:l,blockId:s})=>{const a=o(s),d=t(),{theme:u="default"}=e.props||{},p=i[u];return n("div",Object.assign({"data-element-type":e.type},r,{style:p,className:`yoo-c-rounded-md yoo-c-mt-2 yoo-c-p-2 yoo-c-pl-4 yoo-c-leading-7 yoo-c-bg-info yoo-c-text-info-foreground yoo-c-text-[16px] yoopta-callout yoopta-callout-theme-${u}`},{children:[c(M,{block:a,editor:d,props:e.props}),l]}))};W.displayName="Callout";const P=new r({type:"Callout",elements:{callout:{render:W,props:{theme:"default"}}},options:{display:{title:"Callout",description:"Make writing stand out"},shortcuts:["<"]}});!function(e,o){void 0===o&&(o={});var t=o.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-c-mt-2{margin-top:.5rem}.yoo-c-rounded-md{border-radius:.375rem}.yoo-c-p-2{padding:.5rem}.yoo-c-pl-4{padding-left:1rem}.yoo-c-text-\\[16px\\]{font-size:16px}.yoo-c-leading-7{line-height:1.75rem}.yoopta-callout .yoopta-callout-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-callout:hover .yoopta-callout-options{opacity:1}");export{P as default};
|
package/dist/ui/Callout.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PluginElementRenderProps } from '@yoopta/editor';
|
|
3
2
|
declare const CalloutRender: {
|
|
4
|
-
({ element, attributes, children, blockId }: PluginElementRenderProps): JSX.Element;
|
|
3
|
+
({ element, attributes, children, blockId }: PluginElementRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
displayName: string;
|
|
6
5
|
};
|
|
7
6
|
export { CalloutRender };
|
package/dist/ui/Callout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../src/ui/Callout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../src/ui/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiC,MAAM,gBAAgB,CAAC;AAIzF,QAAA,MAAM,aAAa;iDAAgD,wBAAwB;;CAiB1F,CAAC;AAIF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { YooEditor, YooptaBlockData } from '@yoopta/editor';
|
|
3
2
|
import { CalloutElementProps } from '../types';
|
|
4
3
|
type Props = {
|
|
@@ -6,6 +5,6 @@ type Props = {
|
|
|
6
5
|
block: YooptaBlockData;
|
|
7
6
|
props?: CalloutElementProps;
|
|
8
7
|
};
|
|
9
|
-
declare const CalloutBlockOptions: ({ editor, block, props: calloutProps }: Props) => JSX.Element;
|
|
8
|
+
declare const CalloutBlockOptions: ({ editor, block, props: calloutProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export { CalloutBlockOptions };
|
|
11
10
|
//# sourceMappingURL=CalloutBlockOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/CalloutBlockOptions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalloutBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/CalloutBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMhE,OAAO,EAAE,mBAAmB,EAA0C,MAAM,UAAU,CAAC;AAKvF,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,mBAAmB,2CAA4C,KAAK,4CA6EzE,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/callout",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.6",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/Darginec05/Editor-Yoopta/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7e5c32bd4c48dd21d84359a3fe87ed82cdaf964f"
|
|
38
38
|
}
|