libreria-astro-lefebvre 0.0.35 → 0.0.38

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.
@@ -1,44 +1,45 @@
1
- ---
2
- import Contenido_2025_Granada from "./Contenido_2025_Granada.astro";
3
- import CTA_2025_Formentera from "./CTA_2025_Formentera.astro";
4
-
5
-
6
- const {
7
- flexOrientationBlockIcoText = "flex-row",
8
- flexOrientationIcoText = "flex-row",
9
- positionFlex = "items-center",
10
- positionBtnFlex = "justify-center",
11
- headingType = 'h3',
12
- items = [],
13
- btnLabel = "Ver más",
14
- buttonUrl = "#",
15
- showBtn = false,
16
- } = Astro.props;
17
-
18
- ---
19
-
20
- <article class={`${positionFlex === 'items-center' ? 'items-center' : 'items-start'} flex flex-col justify-center mb-4`}>
21
- <div class={`flex ${flexOrientationBlockIcoText} items-start flex-wrap px-6`}>
22
- {items.map(item => (
23
- <Contenido_2025_Granada
24
- title={item.title}
25
- tipo={headingType}
26
- description={item.description}
27
- flexOrientationBlock={flexOrientationBlockIcoText}
28
- flexOrientationIcoText={flexOrientationIcoText}
29
- positionFlex={positionFlex}
30
- showIco={item.showIco}
31
- icon={item.icon}
32
- widthBlock={item.widthBlock}
33
- />
34
- ))}
35
- </div>
36
- <div class={`${positionBtnFlex === 'justify-center' ? 'justify-center' : 'justify-start'} pl-0 md:pl-[16px] lg:pl-[0px] w-full flex`}>
37
- {showBtn ? (
38
- <CTA_2025_Formentera buttonText={btnLabel} buttonUrl={buttonUrl} />
39
- ) : (
40
- <div class="flex justify-center"></div>
41
- )}
42
-
43
- </div>
1
+ ---
2
+ import Contenido_2025_Granada from "./Contenido_2025_Granada.astro";
3
+ import CTA_2025_Formentera from "./CTA_2025_Formentera.astro";
4
+
5
+
6
+ const {
7
+ flexOrientationBlockIcoText = "flex-row",
8
+ flexOrientationIcoText = "flex-row",
9
+ positionFlex = "items-center",
10
+ positionBtnFlex = "justify-center",
11
+ headingType = 'h3',
12
+ items = [],
13
+ btnLabel = "Ver más",
14
+ buttonUrl = "#",
15
+ showBtn = false,
16
+ widthArticle = "w-full"
17
+ } = Astro.props;
18
+
19
+ ---
20
+
21
+ <article class={`${positionFlex === 'items-center' ? 'items-center' : 'items-start'} ${widthArticle} flex flex-col justify-center mb-4`}>
22
+ <div class={`flex ${flexOrientationBlockIcoText} items-start flex-wrap px-6 md:px-0`}>
23
+ {items.map(item => (
24
+ <Contenido_2025_Granada
25
+ title={item.title}
26
+ tipo={headingType}
27
+ description={item.description}
28
+ flexOrientationBlock={flexOrientationBlockIcoText}
29
+ flexOrientationIcoText={flexOrientationIcoText}
30
+ positionFlex={positionFlex}
31
+ showIco={item.showIco}
32
+ icon={item.icon}
33
+ widthBlock={item.widthBlock}
34
+ />
35
+ ))}
36
+ </div>
37
+ <div class={`${positionBtnFlex === 'justify-center' ? 'justify-center' : 'justify-start'} pl-0 md:pl-[16px] lg:pl-[0px] w-full flex`}>
38
+ {showBtn ? (
39
+ <CTA_2025_Formentera buttonText={btnLabel} buttonUrl={buttonUrl} />
40
+ ) : (
41
+ <div class="flex justify-center"></div>
42
+ )}
43
+
44
+ </div>
44
45
  </article>
@@ -1,46 +1,62 @@
1
- ---
2
- const {
3
- orientation = 'left',
4
- items
5
- } = Astro.props;
6
-
7
- const structuredData = `<script type="application/ld+json">
8
- {
9
- "@context": "https://schema.org",
10
- "@type": "ItemList",
11
- "numberOfItems": ${items.length},
12
- "itemListElement": [
13
- ${items.map((item, index) => `{
14
- "@type": "ListItem",
15
- "position": ${index + 1},
16
- "item": {
17
- "@type": "Article",
18
- "name": "${item.title}",
19
- "description": "${item.description.replace(/<[^>]*>/g, '').replace(/"/g, '\\"')}",
20
- "image": "${item.image}"
21
- }
22
- }`).join(',')}
23
- ]
24
- }
25
- </script>`;
26
- ---
27
- <section class="w-full flex flex-col items-center justify-center">
28
- {items.map(item => (
29
- <article class="w-full flex flex-col items-center justify-center border-0 md:border-b-1 border-b-[#B6B7BB]" style={items.indexOf(item) === items.length - 1 ? 'border-bottom: none;' : ''} >
30
- <div class={`flex-col flex md:${orientation === 'left' ? 'flex-row' : 'flex-row-reverse'} items-center gap-4 mb-8 md:mb-0`}>
31
- <div class="w-full md:w-1/2 p-4 flex flex-col flex-wrap ">
32
- <h2 class="text-[28px] md:text-[32px] leading-[36px] md:leading-[40px] mb-[24px] text-[#363942] font-poppins font-semibold">{item.title}</h2>
33
- <div
34
- class="text-[#363942] font-inter font-normal text-base leading-[28px] flex flex-col gap-4 md-0 md:mb-8"
35
- set:html={item.description}
36
- />
37
- </div>
38
- <div class={`w-full md:w-1/2 p-4 flex items-center ${orientation === 'left' ? 'justify-end' : 'justify-start'}`}>
39
- <img src={item.image} alt={item.title} class="w-full md:w-1/2 rounded-2xl" />
40
- </div>
41
- </div>
42
- </article>
43
- ))}
44
- </section>
45
-
1
+ ---
2
+ import Formulario_2025_Teruel from './Formulario_2025_Teruel.astro';
3
+
4
+ const {
5
+ orientation = 'left',
6
+ showBtn = false,
7
+ txtBtn = 'Saber más',
8
+ linkBtn = '#',
9
+ showBtnModal = true,
10
+ txtBtnModal = 'Saber más',
11
+ items
12
+ } = Astro.props;
13
+
14
+ const randomId = Math.floor(Math.random() * 1000);
15
+
16
+ const structuredData = `<script type="application/ld+json">
17
+ {
18
+ "@context": "https://schema.org",
19
+ "@type": "ItemList",
20
+ "numberOfItems": ${items.length},
21
+ "itemListElement": [
22
+ ${items.map((item, index) => `{
23
+ "@type": "ListItem",
24
+ "position": ${index + 1},
25
+ "item": {
26
+ "@type": "Article",
27
+ "name": "${item.title}",
28
+ "description": "${item.description.replace(/<[^>]*>/g, '').replace(/"/g, '\\"')}",
29
+ "image": "${item.image}"
30
+ }
31
+ }`).join(',')}
32
+ ]
33
+ }
34
+ </script>`;
35
+ ---
36
+ <section class="w-full flex flex-col items-center gap-4 justify-center" id={`main-content-${randomId}`}>
37
+ {items.map((item, index) => {
38
+ const itemId = `${randomId}-${index}`;
39
+ return (
40
+ <Formulario_2025_Teruel
41
+ bottomBorder={items.indexOf(item) !== items.length - 1}
42
+ orientation={orientation}
43
+ showBtn={showBtn}
44
+ txtBtn={txtBtn}
45
+ linkBtn={linkBtn}
46
+ showBtnModal={showBtnModal}
47
+ txtBtnModal={txtBtnModal}
48
+ title={item.title}
49
+ description={item.description}
50
+ imageSrc={item.image}
51
+ imageModal={item.imageModal}
52
+ altModal={item.altModal}
53
+ titleModal={item.titleModal}
54
+ subtitleModal={item.subtitleModal}
55
+ descriptionModal={item.descriptionModal}
56
+ lf2FormTitle={item.lf2FormTitle}
57
+ />
58
+ );
59
+ })}
60
+ </section>
61
+
46
62
  <Fragment set:html={structuredData} />
@@ -59,7 +59,9 @@ const structuredData = `<script type="application/ld+json">
59
59
  align-items: start !important;
60
60
  }
61
61
  .glider-dots {
62
- display: none !important;
62
+ @media (max-width: 767px) {
63
+ display: none !important;
64
+ }
63
65
  }
64
66
  </style>
65
67
 
@@ -182,7 +184,7 @@ const structuredData = `<script type="application/ld+json">
182
184
 
183
185
  // Force centering slide after resize event
184
186
  resizeLock: true,
185
-
187
+
186
188
  // Glider.js breakpoints are mobile-first
187
189
  responsive: [
188
190
  {
@@ -230,6 +232,61 @@ const structuredData = `<script type="application/ld+json">
230
232
  ]
231
233
  });
232
234
 
235
+ // Auto-play functionality
236
+ // Source - https://stackoverflow.com/a
237
+ // Posted by Varuna
238
+ // Retrieved 2025-12-10, License - CC BY-SA 4.0
239
+
240
+ var slider = new Glider(document.querySelector('.glider'), {
241
+ slidesToScroll: 1,
242
+ slidesToShow: 1,
243
+ dots: '#dots',
244
+ arrows: {
245
+ prev: '.glider-prev',
246
+ next: '.glider-next'
247
+ }
248
+ });
249
+
250
+ slideAutoPaly(slider, '.glider');
251
+
252
+ function slideAutoPaly(glider, selector, delay = 5000, repeat = true) {
253
+ let autoplay = null;
254
+ const slidesCount = glider.track.childElementCount;
255
+ let nextIndex = 1;
256
+ let pause = true;
257
+
258
+ function slide() {
259
+ autoplay = setInterval(() => {
260
+ if (nextIndex >= slidesCount) {
261
+ if (!repeat) {
262
+ clearInterval(autoplay);
263
+ } else {
264
+ nextIndex = 0;
265
+ }
266
+ }
267
+ glider.scrollItem(nextIndex++);
268
+ }, delay);
269
+ }
270
+
271
+ slide();
272
+
273
+ var element = document.querySelector(selector);
274
+ element.addEventListener('mouseover', (event) => {
275
+ if (pause) {
276
+ clearInterval(autoplay);
277
+ pause = false;
278
+ }
279
+ }, 300);
280
+
281
+ element.addEventListener('mouseout', (event) => {
282
+ if (!pause) {
283
+ slide();
284
+ pause = true;
285
+ }
286
+ }, 300);
287
+ }
288
+
289
+
233
290
  });
234
291
  </script>
235
292
 
@@ -1,58 +1,59 @@
1
- ---
2
-
3
- const {
4
- title,
5
- h1Subtitle,
6
- description = "",
7
- tipo = "",
8
- descriptionWidth = "1/3", // 1/3 3/5 full
9
- flexJustify = "justify-center"
10
- } = Astro.props;
11
-
12
- const structuredData = `<script type="application/ld+json">
13
- {
14
- "@context": "https://schema.org",
15
- "@type": "WebPageElement",
16
- "name": "${title}",
17
- "description": "${description}",
18
- "headline": "${title}",
19
- "mainEntityOfPage": {
20
- "@type": "WebPage"
21
- },
22
- "author": {
23
- "@type": "Organization",
24
- "name": "Lefebvre"
25
- }
26
- }
27
- </script>`;
28
-
29
- ---
30
-
31
- <div class={`w-full md:w-3/5 max-w-auto md:w-full flex ${flexJustify === 'justify-center' ? 'justify-center' : 'justify-start'} flex-col`}>
32
- {h1Subtitle && h1Subtitle.trim() !== "" && (
33
- tipo === "h1" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:mb-[48px]" set:html={h1Subtitle}></h2>
34
- : tipo === "h1-home" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0px] mt-[32px] md:mt-[80px]" set:html={h1Subtitle}></h2>
35
- : tipo === "h1-40" ? <h2 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={h1Subtitle}></h2>
36
- : null
37
- )}
38
- {
39
- h1Subtitle && h1Subtitle.trim() !== ""
40
- ? <h1 class="font-poppins text-[#262626] text-[20px] md:text-[24px] font-normal text-center leading-[24px] my-[32px] md:mb-[32px]" set:html={title}></h1>
41
- : tipo === "h1" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:my-[48px]" set:html={title}></h1>
42
- : tipo === "h1-home" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0] md:mb-[64px] mt-[32px] md:mt-[80px]" set:html={title}></h1>
43
- : tipo === "h1-40" ? <h1 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={title}></h1>
44
- : tipo === "h2" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[48px] my-[32px] md:mb-[32px]" set:html={title}></h2>
45
- : tipo === "h2-mb64" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] p-6 md:p-2 md:pb-6 mb-[0]" set:html={title}></h2>
46
- : tipo === "h3" ? <h3 class="font-poppins text-[#262626] text-[24px] font-semibold text-center leading-[32px] mb-[8px]" set:html={title}></h3>
47
- : tipo === "h3-mb32" ? <h3 class="font-poppins text-[#262626] text-[32px] font-normal text-left leading-[40px] mb-[32px]" set:html={title}></h3>
48
- : tipo === "h4" ? <h4 class="font-poppins text-[#262626] text-center" set:html={title}></h4>
49
- : tipo === "h5" ? <h5 class="font-poppins text-[#262626] text-center" set:html={title}></h5>
50
- : tipo === "h6" ? <h6 class="font-poppins text-[#262626] text-center" set:html={title}></h6>
51
- : <p>{title}</p>
52
- }
53
- {description && description.trim() !== "" && (
54
- <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto font-inter text-base font-normal leading-[28px] mb-8 text-center`} set:html={description}></div>
55
- )}
56
- </div>
57
-
1
+ ---
2
+
3
+ const {
4
+ title,
5
+ h1Subtitle,
6
+ description = "",
7
+ tipo = "",
8
+ descriptionWidth = "1/3", // 1/3 3/5 full
9
+ flexJustify = "justify-center"
10
+ } = Astro.props;
11
+
12
+ const structuredData = `<script type="application/ld+json">
13
+ {
14
+ "@context": "https://schema.org",
15
+ "@type": "WebPageElement",
16
+ "name": "${title}",
17
+ "description": "${description}",
18
+ "headline": "${title}",
19
+ "mainEntityOfPage": {
20
+ "@type": "WebPage"
21
+ },
22
+ "author": {
23
+ "@type": "Organization",
24
+ "name": "Lefebvre"
25
+ }
26
+ }
27
+ </script>`;
28
+
29
+ ---
30
+
31
+ <div class={`w-full md:w-3/5 max-w-auto md:w-full flex ${flexJustify === 'justify-center' ? 'justify-center' : 'justify-start'} flex-col`}>
32
+ {h1Subtitle && h1Subtitle.trim() !== "" && (
33
+ tipo === "h1" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:mb-[48px]" set:html={h1Subtitle}></h2>
34
+ : tipo === "h1-home" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0px] mt-[32px] md:mt-[80px]" set:html={h1Subtitle}></h2>
35
+ : tipo === "h1-40" ? <h2 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={h1Subtitle}></h2>
36
+ : null
37
+ )}
38
+ {
39
+ h1Subtitle && h1Subtitle.trim() !== ""
40
+ ? <h1 class="font-poppins text-[#262626] text-[20px] md:text-[24px] font-normal text-center leading-[24px] my-[32px] md:mb-[32px]" set:html={title}></h1>
41
+ : tipo === "h1" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:my-[48px]" set:html={title}></h1>
42
+ : tipo === "h1-home" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0] md:mb-[64px] mt-[32px] md:mt-[80px]" set:html={title}></h1>
43
+ : tipo === "h1-40" ? <h1 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={title}></h1>
44
+ : tipo === "h1-40-left" ? <h1 class="font-poppins text-[#262626] text-[40px] font-normal text-left leading-[48px] mb-[0] md:mb-[32px]" set:html={title}></h1>
45
+ : tipo === "h2" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[48px] my-[32px] md:mb-[32px]" set:html={title}></h2>
46
+ : tipo === "h2-mb64" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] p-6 md:p-2 md:pb-6 mb-[0]" set:html={title}></h2>
47
+ : tipo === "h3" ? <h3 class="font-poppins text-[#262626] text-[24px] font-semibold text-center leading-[32px] mb-[8px]" set:html={title}></h3>
48
+ : tipo === "h3-mb32" ? <h3 class="font-poppins text-[#262626] text-[32px] font-normal text-left leading-[40px] mb-[32px]" set:html={title}></h3>
49
+ : tipo === "h4" ? <h4 class="font-poppins text-[#262626] text-center" set:html={title}></h4>
50
+ : tipo === "h5" ? <h5 class="font-poppins text-[#262626] text-center" set:html={title}></h5>
51
+ : tipo === "h6" ? <h6 class="font-poppins text-[#262626] text-center" set:html={title}></h6>
52
+ : <p>{title}</p>
53
+ }
54
+ {description && description.trim() !== "" && (
55
+ <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto font-inter text-base font-normal leading-[28px] mb-8 text-center`} set:html={description}></div>
56
+ )}
57
+ </div>
58
+
58
59
  <Fragment set:html={structuredData} />
@@ -13,6 +13,7 @@ import * as CorpHero from '../carbins/CorpHero.ts';
13
13
  import * as FooterCorporativo from '../carbins/FooterCorporativo.ts';
14
14
  import * as Footer_2025_Napoles from '../carbins/Footer_2025_Napoles.ts';
15
15
  import * as Formulario_2025_Seul from '../carbins/Formulario_2025_Seul.ts';
16
+ import * as Formulario_2025_Teruel from '../carbins/Formulario_2025_Teruel.ts';
16
17
  import * as GeometricShapeCard from '../carbins/GeometricShapeCard.ts';
17
18
  import * as HeaderCorporativo from '../carbins/HeaderCorporativo.ts';
18
19
  import * as ImageTextSimple from '../carbins/ImageTextSimple.ts';
@@ -61,6 +62,7 @@ export const components = [
61
62
  {component: FooterCorporativo},
62
63
  {component: Footer_2025_Napoles},
63
64
  {component: Formulario_2025_Seul},
65
+ {component: Formulario_2025_Teruel},
64
66
  {component: GeometricShapeCard},
65
67
  {component: HeaderCorporativo},
66
68
  {component: ImageTextSimple},
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import CorpNavigation from './components/Astro/CorpNavigation.astro';
18
18
  import FooterCorporativo from './components/Astro/FooterCorporativo.astro';
19
19
  import Footer_2025_Napoles from './components/Astro/Footer_2025_Napoles.astro';
20
20
  import Formulario_2025_Seul from './components/Astro/Formulario_2025_Seul.astro';
21
+ import Formulario_2025_Teruel from './components/Astro/Formulario_2025_Teruel.astro';
21
22
  import GeometricShape from './components/Astro/GeometricShape.astro';
22
23
  import GeometricShapeCard from './components/Astro/GeometricShapeCard.astro';
23
24
  import HeaderCorporativo from './components/Astro/HeaderCorporativo.astro';
@@ -56,7 +57,7 @@ import ReactButton from './components/React/ReactButton.jsx';
56
57
  // Exporta todos los componentes uno a uno para que puedan ser usados directamente.
57
58
 
58
59
 
59
- export { VueButton, Button, CTA_2025_Formentera, Cabecera_2025_Barcelona, Cabecera_2025_Madrid, Contenido_2025_Alcorcon, Contenido_2025_Granada, Contenido_2025_Malaga, Contenido_2025_Montevideo, CorpFooter, CorpHero, CorpNavigation, FooterCorporativo, Footer_2025_Napoles, Formulario_2025_Seul, GeometricShape, GeometricShapeCard, HeaderCorporativo, ImageTextSimple, Imagen_2025_Bogota, Repetidor_2025_Cabra, Repetidor_2025_Cordoba, Repetidor_2025_Dubai, Repetidor_2025_Estocolmo, Repetidor_2025_Mallorca, Repetidor_2025_Menorca, Repetidor_2025_Michigan, Repetidor_2025_Orcasitas, Repetidor_2025_Oslo, Repetidor_2025_Quito, Repetidor_2025_Seattle, Repetidor_2025_Tokyo, Repetidor_2025_Ubeda, Repetidor_2025_Yakarta, SEO_Head_Section, Separador_2025_Reinosa, SpectrumSeparator, TestHijo, TestPadre, TextBox, TextImageBackground, TextImageBlock, TextImageCard, TextImageHeader, Titulo_2025_Algeciras, Titulo_2025_Santorini, VideoAutoplay, Video_2025_Valencia, ReactButton };
60
+ export { VueButton, Button, CTA_2025_Formentera, Cabecera_2025_Barcelona, Cabecera_2025_Madrid, Contenido_2025_Alcorcon, Contenido_2025_Granada, Contenido_2025_Malaga, Contenido_2025_Montevideo, CorpFooter, CorpHero, CorpNavigation, FooterCorporativo, Footer_2025_Napoles, Formulario_2025_Seul, Formulario_2025_Teruel, GeometricShape, GeometricShapeCard, HeaderCorporativo, ImageTextSimple, Imagen_2025_Bogota, Repetidor_2025_Cabra, Repetidor_2025_Cordoba, Repetidor_2025_Dubai, Repetidor_2025_Estocolmo, Repetidor_2025_Mallorca, Repetidor_2025_Menorca, Repetidor_2025_Michigan, Repetidor_2025_Orcasitas, Repetidor_2025_Oslo, Repetidor_2025_Quito, Repetidor_2025_Seattle, Repetidor_2025_Tokyo, Repetidor_2025_Ubeda, Repetidor_2025_Yakarta, SEO_Head_Section, Separador_2025_Reinosa, SpectrumSeparator, TestHijo, TestPadre, TextBox, TextImageBackground, TextImageBlock, TextImageCard, TextImageHeader, Titulo_2025_Algeciras, Titulo_2025_Santorini, VideoAutoplay, Video_2025_Valencia, ReactButton };
60
61
 
61
62
 
62
63
  // Exporta la función listComponents para que sea usado en el Pagebuilder en Vue.
@@ -86,6 +87,7 @@ export const components = {
86
87
  FooterCorporativo: FooterCorporativo,
87
88
  Footer_2025_Napoles: Footer_2025_Napoles,
88
89
  Formulario_2025_Seul: Formulario_2025_Seul,
90
+ Formulario_2025_Teruel: Formulario_2025_Teruel,
89
91
  GeometricShape: GeometricShape,
90
92
  GeometricShapeCard: GeometricShapeCard,
91
93
  HeaderCorporativo: HeaderCorporativo,
@@ -0,0 +1,71 @@
1
+ ---
2
+ /**
3
+ * LimboProvider.astro
4
+ *
5
+ * Componente Astro que provee la integración con Limbo.
6
+ * Incluye los assets necesarios (CSS/JS) y la inicialización automática.
7
+ *
8
+ * Uso:
9
+ * ```astro
10
+ * ---
11
+ * import LimboProvider from 'libreria-astro-lefebvre/limbo/LimboProvider.astro';
12
+ * ---
13
+ * <LimboProvider
14
+ * publicKey="pk_xxx"
15
+ * apiKey="sk_xxx"
16
+ * prod={false}
17
+ * sizeModal="fullscreen"
18
+ * />
19
+ * ```
20
+ */
21
+
22
+ import { generateLimboInitScript, getLimboAssetUrls } from './init';
23
+
24
+ interface Props {
25
+ /** Public Key del portal de Limbo */
26
+ publicKey: string;
27
+ /** Usar API de producción */
28
+ prod?: boolean;
29
+ /** Selector CSS para detectar inputs (default: '.js-limbo') */
30
+ selector?: string;
31
+ /** Tipo de retorno por defecto */
32
+ defaultReturnType?: 'url' | 'assetId' | 'object' | 'json' | 'base64';
33
+ /** Tamaño del modal (default: 'xlarge') */
34
+ sizeModal?: 'small' | 'medium' | 'large' | 'xlarge' | 'fullscreen';
35
+ /** Versión de limbo-component a usar (default: 'latest') */
36
+ version?: string;
37
+ /** Usar assets locales en vez de CDN (para desarrollo con npm link) */
38
+ useLocalAssets?: boolean;
39
+ }
40
+
41
+ const {
42
+ publicKey,
43
+ prod = false,
44
+ selector = '.js-limbo',
45
+ defaultReturnType = 'json',
46
+ sizeModal = 'xlarge',
47
+ version = 'latest',
48
+ useLocalAssets = !prod
49
+ } = Astro.props;
50
+
51
+ // Obtener URLs de assets
52
+ const assets = getLimboAssetUrls({ prod: !useLocalAssets, version });
53
+
54
+ // Generar script de inicialización
55
+ const initScript = generateLimboInitScript({
56
+ publicKey,
57
+ prod,
58
+ selector,
59
+ defaultReturnType,
60
+ sizeModal
61
+ });
62
+ ---
63
+
64
+ <!-- Limbo CSS -->
65
+ <link rel="stylesheet" href={assets.css} />
66
+
67
+ <!-- Limbo JS -->
68
+ <script is:inline src={assets.js}></script>
69
+
70
+ <!-- Limbo Initialization -->
71
+ <script is:inline set:html={initScript}></script>
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Limbo Integration Module
3
+ *
4
+ * Exportaciones para integrar limbo-component con la librería de page-builder.
5
+ */
6
+
7
+ // Exportar funciones de inicialización
8
+ export {
9
+ generateLimboInitScript,
10
+ getLimboAssetUrls,
11
+ type LimboConfig,
12
+ type LimboInitOptions
13
+ } from './init';
14
+
15
+ // El componente Astro se importa directamente:
16
+ // import LimboProvider from 'libreria-astro-lefebvre/limbo/LimboProvider.astro';