cinqcinqdev-seo 0.1.70 → 0.1.71

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.70",
7
+ "version": "0.1.71",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "unknown"
@@ -193,9 +193,10 @@ const props = defineProps({
193
193
  paddingBottom: { type: String, default: "" },
194
194
  marginTop: { type: String, default: "" },
195
195
  marginBottom: { type: String, default: "" },
196
- overlay: { default: null },
196
+ overlay: { type: String, default: "auto" },
197
197
  overlayDirection: { type: String, default: "to top" },
198
- overlayStrength: { type: String, default: "medium" }
198
+ overlayStrength: { type: String, default: "medium" },
199
+ overlayColor: { type: String, default: "" }
199
200
  });
200
201
  const sectionEl = ref(null);
201
202
  const isVisible = ref(false);
@@ -225,13 +226,13 @@ const as_ = (n) => {
225
226
  return { animationDelay: `${n * 0.1}s`, animationFillMode: "both" };
226
227
  };
227
228
  const showOverlay = computed(() => {
228
- if (props.overlay === false) return false;
229
- if (props.overlay === true) return true;
229
+ if (props.overlay === "off") return false;
230
+ if (props.overlay === "on") return true;
230
231
  return ["fullscreen", "parallax", "video", "magazine"].includes(props.layout);
231
232
  });
232
233
  const overlayStyle = computed(() => {
233
234
  const dir = props.overlayDirection || "to top";
234
- const c = props.bgColor;
235
+ const c = props.overlayColor || props.bgColor;
235
236
  const stops = {
236
237
  light: `linear-gradient(${dir}, ${ca(c, "99")} 0%, ${ca(c, "44")} 40%, transparent 70%)`,
237
238
  medium: `linear-gradient(${dir}, ${c} 15%, ${ca(c, "cc")} 40%, ${ca(c, "44")} 65%, transparent 100%)`,
@@ -104,9 +104,10 @@ export const DEFAULT_SECTIONS = {
104
104
  paddingBottom: "",
105
105
  marginTop: "",
106
106
  marginBottom: "",
107
- overlay: null,
107
+ overlay: "auto",
108
108
  overlayDirection: "to top",
109
- overlayStrength: "medium"
109
+ overlayStrength: "medium",
110
+ overlayColor: ""
110
111
  },
111
112
  groups: [
112
113
  { key: "design", label: "Design" },
@@ -142,22 +143,23 @@ export const DEFAULT_SECTIONS = {
142
143
  contentWidth: { type: "cards", label: "Content Width", group: "design", options: contentWidthOptions },
143
144
  textSize: { type: "cards", label: "Text Size", group: "design", options: textSizeOptions },
144
145
  overlay: { type: "cards", label: "Gradient Overlay", group: "overlay", options: [
145
- { value: null, label: "Auto", icon: "\u2B24" },
146
- { value: true, label: "On", icon: "\u2713" },
147
- { value: false, label: "Off", icon: "\u2715" }
146
+ { value: "auto", label: "Auto", icon: "\u2B24" },
147
+ { value: "on", label: "On", icon: "\u2713" },
148
+ { value: "off", label: "Off", icon: "\u2715" }
148
149
  ] },
149
- overlayDirection: { type: "select", label: "Direction", group: "overlay", options: [
150
- { value: "to top", label: "Bottom \u2192 Top" },
151
- { value: "to bottom", label: "Top \u2192 Bottom" },
152
- { value: "to right", label: "Left \u2192 Right" },
153
- { value: "to left", label: "Right \u2192 Left" },
150
+ overlayColor: { type: "color", label: "Couleur du gradient", group: "overlay", showIf: (p) => p.overlay !== "off" },
151
+ overlayDirection: { type: "select", label: "Direction", group: "overlay", showIf: (p) => p.overlay !== "off", options: [
152
+ { value: "to top", label: "Bas \u2192 Haut" },
153
+ { value: "to bottom", label: "Haut \u2192 Bas" },
154
+ { value: "to right", label: "Gauche \u2192 Droite" },
155
+ { value: "to left", label: "Droite \u2192 Gauche" },
154
156
  { value: "to bottom right", label: "Diagonal \u2198" },
155
157
  { value: "to bottom left", label: "Diagonal \u2199" }
156
158
  ] },
157
- overlayStrength: { type: "cards", label: "Strength", group: "overlay", options: [
158
- { value: "light", label: "Light", icon: "\u25CB" },
159
- { value: "medium", label: "Medium", icon: "\u25D1" },
160
- { value: "strong", label: "Strong", icon: "\u25CF" }
159
+ overlayStrength: { type: "cards", label: "Intensit\xE9", group: "overlay", showIf: (p) => p.overlay !== "off", options: [
160
+ { value: "light", label: "L\xE9ger", icon: "\u25CB" },
161
+ { value: "medium", label: "Moyen", icon: "\u25D1" },
162
+ { value: "strong", label: "Fort", icon: "\u25CF" }
161
163
  ] },
162
164
  animation: { type: "cards", label: "Animation", group: "animation", options: animationOptions },
163
165
  paddingTop: { type: "select", label: "Padding Top", options: paddingOptions },
@@ -381,10 +381,13 @@ const CONTENT_FIELD_TYPES = ["text", "textarea", "image", "list", "richtext"];
381
381
  const visibleFields = computed(() => {
382
382
  const cfg = selectedCMSConfig.value;
383
383
  if (!cfg?.fields) return {};
384
+ const props = page.value?.content[selectedBlockIndex.value]?.props ?? {};
384
385
  return Object.fromEntries(
385
386
  Object.entries(cfg.fields).filter(([, f]) => {
386
387
  const isContent = CONTENT_FIELD_TYPES.includes(f.type);
387
- return selectedFieldGroup.value === "contenu" ? isContent : !isContent;
388
+ if (selectedFieldGroup.value === "contenu" ? !isContent : isContent) return false;
389
+ if (typeof f.showIf === "function" && !f.showIf(props)) return false;
390
+ return true;
388
391
  })
389
392
  );
390
393
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cinqcinqdev-seo",
3
- "version": "0.1.70",
3
+ "version": "0.1.71",
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",