cinqcinqdev-seo 0.1.40 → 0.1.41

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.0.0"
6
6
  },
7
- "version": "0.1.40",
7
+ "version": "0.1.41",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "unknown"
@@ -48,7 +48,11 @@ const props = defineProps({
48
48
  const sectionPad = computed(() => ({ compact: "py-8 px-4 md:px-8", normal: "py-14 px-6 md:px-12", spacious: "py-24 px-8 md:px-16" })[props.spacing] || "py-14 px-6 md:px-12");
49
49
  const cardRound = computed(() => ({ sharp: "rounded-lg", rounded: "rounded-xl", pill: "rounded-full" })[props.radius] || "rounded-xl");
50
50
  const maxW = computed(() => ({ article: "max-w-2xl mx-auto", wide: "max-w-4xl mx-auto", full: "w-full" })[props.layout] || "max-w-2xl mx-auto");
51
- const rendered = computed(() => props.content || "");
51
+ const rendered = computed(() => {
52
+ if (!props.content) return "";
53
+ if (typeof props.content === "object") return props.content.fr || "";
54
+ return props.content;
55
+ });
52
56
  </script>
53
57
 
54
58
  <style scoped>
@@ -294,6 +294,20 @@ const applySeoAudit = () => {
294
294
  const fileInput = ref(null);
295
295
  let activeUploadTarget = null;
296
296
  const execRteCmd = (cmd, val) => document.execCommand(cmd, false, val);
297
+ const getRteProp = (props, name) => {
298
+ const v = props[name];
299
+ if (!v) return "";
300
+ if (typeof v === "string") return v;
301
+ if (typeof v === "object") return v[editingLang.value] || v.fr || "";
302
+ return "";
303
+ };
304
+ const setRteProp = (props, name, html) => {
305
+ if (props[name] && typeof props[name] === "object") {
306
+ props[name][editingLang.value] = html;
307
+ } else {
308
+ props[name] = html;
309
+ }
310
+ };
297
311
  const triggerUpload = (targetObj, key) => {
298
312
  activeUploadTarget = { obj: targetObj, key };
299
313
  fileInput.value?.click();
@@ -722,10 +736,10 @@ const savePage = async () => {
722
736
  class="w-7 h-7 flex items-center justify-center rounded-lg text-gray-400 hover:bg-white hover:shadow-sm text-[9px] transition-all">✕</button>
723
737
  </div>
724
738
  <div
725
- :key="`rte-${name}-${selectedBlockIndex}`"
739
+ :key="`rte-${name}-${selectedBlockIndex}-${editingLang}`"
726
740
  contenteditable="true"
727
- v-html="page.content[selectedBlockIndex].props[name]"
728
- @blur="page.content[selectedBlockIndex].props[name] = $event.target.innerHTML;
741
+ v-html="getRteProp(page.content[selectedBlockIndex].props, name)"
742
+ @blur="setRteProp(page.content[selectedBlockIndex].props, name, $event.target.innerHTML);
729
743
  trigger()"
730
744
  class="w-full min-h-[140px] bg-gray-50 rounded-xl p-3 text-[11px] leading-relaxed outline-none ring-1 ring-gray-100 focus:ring-[#3d35ff] overflow-auto rte-field"
731
745
  ></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cinqcinqdev-seo",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "A reusable Nuxt 3 admin CMS module with visual page editor powered by Supabase",
5
5
  "license": "MIT",
6
6
  "module": "./dist/module.mjs",