brome-builder 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -4015,9 +4015,6 @@ function mn({ editor: Q, setEditor: X, editorData: G, isEditorShouldLoad: V, set
4015
4015
  Q && G && V && (Q.setComponents(G.html), Q.setStyle(G.css), v(!1));
4016
4016
  }, [Q, G, V]), Me(() => {
4017
4017
  if (Q) {
4018
- Q.Css.setRule(".gjs-wrapper", {
4019
- direction: S ? "rtl" : "ltr"
4020
- });
4021
4018
  const r = document.querySelector(".gjs-frame");
4022
4019
  if (r && r.contentWindow && r.contentWindow.document) {
4023
4020
  const l = r.contentWindow.document.body;
@@ -1267,7 +1267,7 @@ React keys must be passed directly to JSX without using spread:
1267
1267
  adipiscing elit, sed do eiusmod tempor incididunt ut
1268
1268
  labore et dolore magna aliquased do eiusmod tempor incididunt
1269
1269
  ut labore et dolore magna aliquased do eiusmod tempor
1270
- incididunt ut labore et dolore magna aliqua</p>`,attributes:{class:"fa fa-regular fa-file-lines"}},Link:{label:"Lien",category:"Basic",content:"<a>Link here</a>",media:Qt},"Hero Over Content Image":{label:"Hero",category:"Composants",content:bt,media:'<img width="100%" src="'+wt+'"/>'},"Blue Card":{label:"Blue Card",category:"Composants",content:ht,media:'<img width="100%" src="'+xt+'"/>'},"ordered-card":{label:"Ordered Card",category:"Composants",content:()=>At(Ft++),media:'<img width="100%" src="'+It+'"/>'},"Réduction Card":{label:"Réduction Card",category:"Composants",content:kt,media:'<img width="100%" src="'+We+'"/>'},"Attention Card":{label:"Attention Card",category:"Composants",content:yt,media:'<img width="100%" src="'+Ye+'"/>'},"Bon à savoir Card":{label:"Bon à savoir Card",category:"Composants",content:Ct,media:'<img width="100%" src="'+Ne+'"/>'},"Définition Card":{label:"Définition Card",category:"Composants",content:Et,media:'<img width="100%" src="'+Ue+'"/>'}};function Gt({editor:Q,setEditor:X,editorData:G,isEditorShouldLoad:V,setIsEditorShouldLoad:v}){const[S,n]=de.useState(!1);de.useEffect(()=>{const r=pt.init({i18n:{locale:"fr",detectLocale:!1,localeFallback:"en",messages:{fr:Xe}},container:"#editor",height:"100vh",plugins:[$e,tt,Rt,Mt,Zt,Ot,ft],pluginsOpts:{[$e]:{blocks:["text-basic"]},[tt]:{blocks:["column1","column2","column3","column3-7","image","video"],labelColumn1:"1 Colonne",labelColumn2:"2 Colonnes",labelColumn3:"3 Colonnes",labelColumn3_7:"3/7 Colonnes",labelColumn4:"4 Colonnes",labelImage:"Image",labelVideo:"Vidéo"},gjsTabs:{},gtsIcons:{}},canvas:{styles:["/src/styles/tabs.css","/src/styles/tailwind.css","/src/styles/tailwind-build.css"]},storageManager:!1});return Vt(r),X(r),r.getWrapper().addClass("gjs-wrapper"),()=>{r.destroy()}},[]),de.useEffect(()=>{Q&&G&&V&&(Q.setComponents(G.html),Q.setStyle(G.css),v(!1))},[Q,G,V]),de.useEffect(()=>{if(Q){Q.Css.setRule(".gjs-wrapper",{direction:S?"rtl":"ltr"});const r=document.querySelector(".gjs-frame");if(r&&r.contentWindow&&r.contentWindow.document){const c=r.contentWindow.document.body;c.classList.toggle("rtl",S),c.classList.toggle("ltr",!S),c.setAttribute("dir",`${S?"rtl":"ltr"}`)}}},[Q,S]);const a=()=>{n(r=>!r)};return de.useEffect(()=>{if(Q){Object.entries(Kt).forEach(([A,g])=>{Q.BlockManager.add(A,g)});const r=Q.BlockManager.get("image");r&&r.set("category","Media");const c=Q.BlockManager.get("video");c&&c.set("category","Media");const p=Q.BlockManager.get("materialIcon");p&&p.set("category","Media");const x=Q.BlockManager.get("column1");x&&x.set("category","Architecture");const I=Q.BlockManager.get("column2");I&&I.set("category","Architecture");const R=Q.BlockManager.get("column3");R&&R.set("category","Architecture");const f=Q.BlockManager.get("column3-7");f&&f.set("category","Architecture");const J=Q.BlockManager.get("tabs");J&&(J.set("category","Composants"),J.set("media",'<img width="100%" src="'+St+'"/>')),window.editorInstance=Q;const E=document.querySelector(".gjs-pn-panel");if(E){E.innerHTML=`
1270
+ incididunt ut labore et dolore magna aliqua</p>`,attributes:{class:"fa fa-regular fa-file-lines"}},Link:{label:"Lien",category:"Basic",content:"<a>Link here</a>",media:Qt},"Hero Over Content Image":{label:"Hero",category:"Composants",content:bt,media:'<img width="100%" src="'+wt+'"/>'},"Blue Card":{label:"Blue Card",category:"Composants",content:ht,media:'<img width="100%" src="'+xt+'"/>'},"ordered-card":{label:"Ordered Card",category:"Composants",content:()=>At(Ft++),media:'<img width="100%" src="'+It+'"/>'},"Réduction Card":{label:"Réduction Card",category:"Composants",content:kt,media:'<img width="100%" src="'+We+'"/>'},"Attention Card":{label:"Attention Card",category:"Composants",content:yt,media:'<img width="100%" src="'+Ye+'"/>'},"Bon à savoir Card":{label:"Bon à savoir Card",category:"Composants",content:Ct,media:'<img width="100%" src="'+Ne+'"/>'},"Définition Card":{label:"Définition Card",category:"Composants",content:Et,media:'<img width="100%" src="'+Ue+'"/>'}};function Gt({editor:Q,setEditor:X,editorData:G,isEditorShouldLoad:V,setIsEditorShouldLoad:v}){const[S,n]=de.useState(!1);de.useEffect(()=>{const r=pt.init({i18n:{locale:"fr",detectLocale:!1,localeFallback:"en",messages:{fr:Xe}},container:"#editor",height:"100vh",plugins:[$e,tt,Rt,Mt,Zt,Ot,ft],pluginsOpts:{[$e]:{blocks:["text-basic"]},[tt]:{blocks:["column1","column2","column3","column3-7","image","video"],labelColumn1:"1 Colonne",labelColumn2:"2 Colonnes",labelColumn3:"3 Colonnes",labelColumn3_7:"3/7 Colonnes",labelColumn4:"4 Colonnes",labelImage:"Image",labelVideo:"Vidéo"},gjsTabs:{},gtsIcons:{}},canvas:{styles:["/src/styles/tabs.css","/src/styles/tailwind.css","/src/styles/tailwind-build.css"]},storageManager:!1});return Vt(r),X(r),r.getWrapper().addClass("gjs-wrapper"),()=>{r.destroy()}},[]),de.useEffect(()=>{Q&&G&&V&&(Q.setComponents(G.html),Q.setStyle(G.css),v(!1))},[Q,G,V]),de.useEffect(()=>{if(Q){const r=document.querySelector(".gjs-frame");if(r&&r.contentWindow&&r.contentWindow.document){const c=r.contentWindow.document.body;c.classList.toggle("rtl",S),c.classList.toggle("ltr",!S),c.setAttribute("dir",`${S?"rtl":"ltr"}`)}}},[Q,S]);const a=()=>{n(r=>!r)};return de.useEffect(()=>{if(Q){Object.entries(Kt).forEach(([A,g])=>{Q.BlockManager.add(A,g)});const r=Q.BlockManager.get("image");r&&r.set("category","Media");const c=Q.BlockManager.get("video");c&&c.set("category","Media");const p=Q.BlockManager.get("materialIcon");p&&p.set("category","Media");const x=Q.BlockManager.get("column1");x&&x.set("category","Architecture");const I=Q.BlockManager.get("column2");I&&I.set("category","Architecture");const R=Q.BlockManager.get("column3");R&&R.set("category","Architecture");const f=Q.BlockManager.get("column3-7");f&&f.set("category","Architecture");const J=Q.BlockManager.get("tabs");J&&(J.set("category","Composants"),J.set("media",'<img width="100%" src="'+St+'"/>')),window.editorInstance=Q;const E=document.querySelector(".gjs-pn-panel");if(E){E.innerHTML=`
1271
1271
  <div class="logo_toggle_rtl">
1272
1272
  <img class="gjs-logo" src="/logo.png" alt="Logo" style="height: 25px;">
1273
1273
  <!-- <button id="toggle-direction" class="rounded-lg p-1 text-[currentColor] bg-transparent border-0" >-->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brome-builder",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "A React-based GrapesJS editor component.",
5
5
  "type": "module",
6
6
  "main": "dist/brome-builder.umd.js",