@gaddario98/react-core 2.1.5 → 2.1.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.
@@ -497,7 +497,7 @@ function _temp6(item_1) {
497
497
  * @module config/metadata
498
498
  */
499
499
  // ─── Platform detection ──────────────────────────────────────
500
- const isWeb = typeof document !== 'undefined';
500
+ const isWeb = typeof document !== "undefined";
501
501
  // ─── Request-scoped Metadata Store ───────────────────────────
502
502
  /**
503
503
  * Create a new request-scoped metadata store.
@@ -523,18 +523,18 @@ const globalStore = createMetadataStore();
523
523
  function updateOrCreateMeta(selector, content, attributes = {}) {
524
524
  let element = document.querySelector(selector);
525
525
  if (!element) {
526
- element = document.createElement('meta');
526
+ element = document.createElement("meta");
527
527
  Object.entries(attributes).forEach(([key, value]) => {
528
528
  element === null || element === void 0 ? void 0 : element.setAttribute(key, value);
529
529
  });
530
530
  document.head.appendChild(element);
531
531
  }
532
- element.setAttribute('content', content);
532
+ element.setAttribute("content", content);
533
533
  }
534
534
  function updateOrCreateLink(selector, attributes) {
535
535
  let element = document.querySelector(selector);
536
536
  if (!element) {
537
- element = document.createElement('link');
537
+ element = document.createElement("link");
538
538
  document.head.appendChild(element);
539
539
  }
540
540
  Object.entries(attributes).forEach(([key, value]) => {
@@ -559,33 +559,33 @@ function applyMetadataToDom(resolved) {
559
559
  // ── Standard meta tags ──────────────────────────────────────
560
560
  if (resolved.description) {
561
561
  updateOrCreateMeta('meta[name="description"]', resolved.description, {
562
- name: 'description'
562
+ name: "description"
563
563
  });
564
564
  }
565
565
  if ((_a = resolved.keywords) === null || _a === void 0 ? void 0 : _a.length) {
566
- updateOrCreateMeta('meta[name="keywords"]', resolved.keywords.join(', '), {
567
- name: 'keywords'
566
+ updateOrCreateMeta('meta[name="keywords"]', resolved.keywords.join(", "), {
567
+ name: "keywords"
568
568
  });
569
569
  }
570
570
  if (resolved.author) {
571
571
  updateOrCreateMeta('meta[name="author"]', resolved.author, {
572
- name: 'author'
572
+ name: "author"
573
573
  });
574
574
  }
575
575
  if (resolved.viewport) {
576
576
  updateOrCreateMeta('meta[name="viewport"]', resolved.viewport, {
577
- name: 'viewport'
577
+ name: "viewport"
578
578
  });
579
579
  }
580
580
  if (resolved.themeColor) {
581
581
  updateOrCreateMeta('meta[name="theme-color"]', resolved.themeColor, {
582
- name: 'theme-color'
582
+ name: "theme-color"
583
583
  });
584
584
  }
585
585
  // ── Canonical ───────────────────────────────────────────────
586
586
  if (resolved.canonical) {
587
587
  updateOrCreateLink('link[rel="canonical"]', {
588
- rel: 'canonical',
588
+ rel: "canonical",
589
589
  href: resolved.canonical
590
590
  });
591
591
  }
@@ -598,39 +598,39 @@ function applyMetadataToDom(resolved) {
598
598
  const og = resolved.openGraph;
599
599
  if (og.title) {
600
600
  updateOrCreateMeta('meta[property="og:title"]', og.title, {
601
- property: 'og:title'
601
+ property: "og:title"
602
602
  });
603
603
  }
604
604
  if (og.description) {
605
605
  updateOrCreateMeta('meta[property="og:description"]', og.description, {
606
- property: 'og:description'
606
+ property: "og:description"
607
607
  });
608
608
  }
609
609
  if (og.type) {
610
610
  updateOrCreateMeta('meta[property="og:type"]', og.type, {
611
- property: 'og:type'
611
+ property: "og:type"
612
612
  });
613
613
  }
614
614
  if (og.url) {
615
615
  updateOrCreateMeta('meta[property="og:url"]', og.url, {
616
- property: 'og:url'
616
+ property: "og:url"
617
617
  });
618
618
  }
619
619
  if (og.siteName) {
620
620
  updateOrCreateMeta('meta[property="og:site_name"]', og.siteName, {
621
- property: 'og:site_name'
621
+ property: "og:site_name"
622
622
  });
623
623
  }
624
624
  if (og.locale) {
625
625
  updateOrCreateMeta('meta[property="og:locale"]', og.locale, {
626
- property: 'og:locale'
626
+ property: "og:locale"
627
627
  });
628
628
  }
629
629
  // OG images (advanced: multiple + alt/width/height)
630
630
  if ((_b = og.images) === null || _b === void 0 ? void 0 : _b.length) {
631
631
  applyOgImages(og.images);
632
632
  } else if (og.image) {
633
- const img = typeof og.image === 'string' ? {
633
+ const img = typeof og.image === "string" ? {
634
634
  url: og.image
635
635
  } : og.image;
636
636
  applyOgImages([img]);
@@ -640,35 +640,35 @@ function applyMetadataToDom(resolved) {
640
640
  const art = og.article;
641
641
  if (art.publishedTime) {
642
642
  updateOrCreateMeta('meta[property="article:published_time"]', art.publishedTime, {
643
- property: 'article:published_time'
643
+ property: "article:published_time"
644
644
  });
645
645
  }
646
646
  if (art.modifiedTime) {
647
647
  updateOrCreateMeta('meta[property="article:modified_time"]', art.modifiedTime, {
648
- property: 'article:modified_time'
648
+ property: "article:modified_time"
649
649
  });
650
650
  }
651
651
  if (art.expirationTime) {
652
652
  updateOrCreateMeta('meta[property="article:expiration_time"]', art.expirationTime, {
653
- property: 'article:expiration_time'
653
+ property: "article:expiration_time"
654
654
  });
655
655
  }
656
656
  if (art.section) {
657
657
  updateOrCreateMeta('meta[property="article:section"]', art.section, {
658
- property: 'article:section'
658
+ property: "article:section"
659
659
  });
660
660
  }
661
661
  const authors = Array.isArray(art.author) ? art.author : art.author ? [art.author] : [];
662
662
  authors.forEach((author, i) => {
663
663
  updateOrCreateMeta(`meta[property="article:author"][data-index="${i}"]`, author, {
664
- property: 'article:author',
665
- 'data-index': String(i)
664
+ property: "article:author",
665
+ "data-index": String(i)
666
666
  });
667
667
  });
668
668
  (_c = art.tags) === null || _c === void 0 ? void 0 : _c.forEach((tag, i) => {
669
669
  updateOrCreateMeta(`meta[property="article:tag"][data-index="${i}"]`, tag, {
670
- property: 'article:tag',
671
- 'data-index': String(i)
670
+ property: "article:tag",
671
+ "data-index": String(i)
672
672
  });
673
673
  });
674
674
  }
@@ -678,37 +678,37 @@ function applyMetadataToDom(resolved) {
678
678
  const tw = resolved.twitter;
679
679
  if (tw.card) {
680
680
  updateOrCreateMeta('meta[name="twitter:card"]', tw.card, {
681
- name: 'twitter:card'
681
+ name: "twitter:card"
682
682
  });
683
683
  }
684
684
  if (tw.site) {
685
685
  updateOrCreateMeta('meta[name="twitter:site"]', tw.site, {
686
- name: 'twitter:site'
686
+ name: "twitter:site"
687
687
  });
688
688
  }
689
689
  if (tw.creator) {
690
690
  updateOrCreateMeta('meta[name="twitter:creator"]', tw.creator, {
691
- name: 'twitter:creator'
691
+ name: "twitter:creator"
692
692
  });
693
693
  }
694
694
  if (tw.title) {
695
695
  updateOrCreateMeta('meta[name="twitter:title"]', tw.title, {
696
- name: 'twitter:title'
696
+ name: "twitter:title"
697
697
  });
698
698
  }
699
699
  if (tw.description) {
700
700
  updateOrCreateMeta('meta[name="twitter:description"]', tw.description, {
701
- name: 'twitter:description'
701
+ name: "twitter:description"
702
702
  });
703
703
  }
704
704
  if (tw.image) {
705
705
  updateOrCreateMeta('meta[name="twitter:image"]', tw.image, {
706
- name: 'twitter:image'
706
+ name: "twitter:image"
707
707
  });
708
708
  }
709
709
  if (tw.imageAlt) {
710
710
  updateOrCreateMeta('meta[name="twitter:image:alt"]', tw.imageAlt, {
711
- name: 'twitter:image:alt'
711
+ name: "twitter:image:alt"
712
712
  });
713
713
  }
714
714
  }
@@ -717,7 +717,7 @@ function applyMetadataToDom(resolved) {
717
717
  const alt = resolved.alternates;
718
718
  if (alt.canonical) {
719
719
  updateOrCreateLink('link[rel="canonical"]', {
720
- rel: 'canonical',
720
+ rel: "canonical",
721
721
  href: alt.canonical
722
722
  });
723
723
  }
@@ -725,8 +725,8 @@ function applyMetadataToDom(resolved) {
725
725
  // Remove old hreflang links first
726
726
  document.querySelectorAll('link[rel="alternate"][hreflang]').forEach(el => el.remove());
727
727
  Object.entries(alt.languages).forEach(([locale, url]) => {
728
- const link = document.createElement('link');
729
- link.rel = 'alternate';
728
+ const link = document.createElement("link");
729
+ link.rel = "alternate";
730
730
  link.hreflang = locale;
731
731
  link.href = url;
732
732
  document.head.appendChild(link);
@@ -735,7 +735,7 @@ function applyMetadataToDom(resolved) {
735
735
  if (alt.media) {
736
736
  Object.entries(alt.media).forEach(([mediaQuery, url]) => {
737
737
  updateOrCreateLink(`link[rel="alternate"][media="${mediaQuery}"]`, {
738
- rel: 'alternate',
738
+ rel: "alternate",
739
739
  media: mediaQuery,
740
740
  href: url
741
741
  });
@@ -746,10 +746,10 @@ function applyMetadataToDom(resolved) {
746
746
  items.forEach((item, i) => {
747
747
  const selector = `link[rel="alternate"][type="${mimeType}"][data-index="${i}"]`;
748
748
  const attrs = {
749
- rel: 'alternate',
749
+ rel: "alternate",
750
750
  type: mimeType,
751
751
  href: item.url,
752
- 'data-index': String(i)
752
+ "data-index": String(i)
753
753
  };
754
754
  if (item.title) attrs.title = item.title;
755
755
  updateOrCreateLink(selector, attrs);
@@ -759,11 +759,11 @@ function applyMetadataToDom(resolved) {
759
759
  }
760
760
  // ── Icons ───────────────────────────────────────────────────
761
761
  if (resolved.icons) {
762
- applyIcons(resolved.icons.icon, 'icon');
763
- applyIcons(resolved.icons.apple, 'apple-touch-icon');
762
+ applyIcons(resolved.icons.icon, "icon");
763
+ applyIcons(resolved.icons.apple, "apple-touch-icon");
764
764
  if (resolved.icons.shortcut) {
765
765
  updateOrCreateLink('link[rel="shortcut icon"]', {
766
- rel: 'shortcut icon',
766
+ rel: "shortcut icon",
767
767
  href: resolved.icons.shortcut
768
768
  });
769
769
  }
@@ -771,24 +771,24 @@ function applyMetadataToDom(resolved) {
771
771
  // ── Manifest ────────────────────────────────────────────────
772
772
  if (resolved.manifest) {
773
773
  updateOrCreateLink('link[rel="manifest"]', {
774
- rel: 'manifest',
774
+ rel: "manifest",
775
775
  href: resolved.manifest
776
776
  });
777
777
  }
778
778
  // ── Structured data JSON-LD ─────────────────────────────────
779
779
  if (resolved.structuredData) {
780
- const schemaScriptId = 'react-pages-schema-org';
780
+ const schemaScriptId = "react-pages-schema-org";
781
781
  let scriptElement = document.querySelector(`script[id="${schemaScriptId}"]`);
782
782
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
783
783
  if (!scriptElement) {
784
- scriptElement = document.createElement('script');
785
- scriptElement.type = 'application/ld+json';
784
+ scriptElement = document.createElement("script");
785
+ scriptElement.type = "application/ld+json";
786
786
  scriptElement.id = schemaScriptId;
787
787
  document.head.appendChild(scriptElement);
788
788
  }
789
789
  scriptElement.textContent = JSON.stringify(Object.assign({
790
- '@context': 'https://schema.org',
791
- '@type': resolved.structuredData.type
790
+ "@context": "https://schema.org",
791
+ "@type": resolved.structuredData.type
792
792
  }, resolved.structuredData.schema));
793
793
  }
794
794
  // ── AI crawler hints ────────────────────────────────────────
@@ -796,22 +796,22 @@ function applyMetadataToDom(resolved) {
796
796
  const hints = resolved.aiHints;
797
797
  if (hints.contentClassification) {
798
798
  updateOrCreateMeta('meta[name="ai-content-classification"]', hints.contentClassification, {
799
- name: 'ai-content-classification'
799
+ name: "ai-content-classification"
800
800
  });
801
801
  }
802
802
  if ((_d = hints.modelHints) === null || _d === void 0 ? void 0 : _d.length) {
803
- updateOrCreateMeta('meta[name="ai-model-hints"]', hints.modelHints.join(', '), {
804
- name: 'ai-model-hints'
803
+ updateOrCreateMeta('meta[name="ai-model-hints"]', hints.modelHints.join(", "), {
804
+ name: "ai-model-hints"
805
805
  });
806
806
  }
807
807
  if (hints.contextualInfo) {
808
808
  updateOrCreateMeta('meta[name="ai-context"]', hints.contextualInfo, {
809
- name: 'ai-context'
809
+ name: "ai-context"
810
810
  });
811
811
  }
812
812
  if (hints.excludeFromIndexing) {
813
- updateOrCreateMeta('meta[name="ai-exclude-from-indexing"]', 'true', {
814
- name: 'ai-exclude-from-indexing'
813
+ updateOrCreateMeta('meta[name="ai-exclude-from-indexing"]', "true", {
814
+ name: "ai-exclude-from-indexing"
815
815
  });
816
816
  }
817
817
  }
@@ -820,9 +820,9 @@ function applyMetadataToDom(resolved) {
820
820
  const robots = (_e = resolved.robots) !== null && _e !== void 0 ? _e : {};
821
821
  const noindex = resolved.disableIndexing || robots.noindex;
822
822
  const nofollow = resolved.disableIndexing || robots.nofollow;
823
- const robotsValue = [noindex ? 'noindex' : 'index', nofollow ? 'nofollow' : 'follow', robots.noarchive && 'noarchive', robots.nosnippet && 'nosnippet', robots.maxImagePreview && `max-image-preview:${robots.maxImagePreview}`, robots.maxSnippet != null && `max-snippet:${robots.maxSnippet}`].filter(Boolean).join(', ');
823
+ const robotsValue = [noindex ? "noindex" : "index", nofollow ? "nofollow" : "follow", robots.noarchive && "noarchive", robots.nosnippet && "nosnippet", robots.maxImagePreview && `max-image-preview:${robots.maxImagePreview}`, robots.maxSnippet != null && `max-snippet:${robots.maxSnippet}`].filter(Boolean).join(", ");
824
824
  updateOrCreateMeta('meta[name="robots"]', robotsValue, {
825
- name: 'robots'
825
+ name: "robots"
826
826
  });
827
827
  }
828
828
  // ── Custom meta tags ────────────────────────────────────────
@@ -834,7 +834,7 @@ function applyMetadataToDom(resolved) {
834
834
  } : tag.property ? {
835
835
  property: tag.property
836
836
  } : tag.httpEquiv ? {
837
- 'http-equiv': tag.httpEquiv
837
+ "http-equiv": tag.httpEquiv
838
838
  } : {};
839
839
  if (tag.id) attributes.id = tag.id;
840
840
  updateOrCreateMeta(selector, tag.content, attributes);
@@ -846,32 +846,32 @@ function applyOgImages(images) {
846
846
  // Remove existing OG image tags to avoid stale data
847
847
  document.querySelectorAll('meta[property="og:image"], meta[property="og:image:alt"], meta[property="og:image:width"], meta[property="og:image:height"], meta[property="og:image:type"]').forEach(el => el.remove());
848
848
  images.forEach(img => {
849
- const ogImg = document.createElement('meta');
850
- ogImg.setAttribute('property', 'og:image');
851
- ogImg.setAttribute('content', img.url);
849
+ const ogImg = document.createElement("meta");
850
+ ogImg.setAttribute("property", "og:image");
851
+ ogImg.setAttribute("content", img.url);
852
852
  document.head.appendChild(ogImg);
853
853
  if (img.alt) {
854
- const altMeta = document.createElement('meta');
855
- altMeta.setAttribute('property', 'og:image:alt');
856
- altMeta.setAttribute('content', img.alt);
854
+ const altMeta = document.createElement("meta");
855
+ altMeta.setAttribute("property", "og:image:alt");
856
+ altMeta.setAttribute("content", img.alt);
857
857
  document.head.appendChild(altMeta);
858
858
  }
859
859
  if (img.width) {
860
- const wMeta = document.createElement('meta');
861
- wMeta.setAttribute('property', 'og:image:width');
862
- wMeta.setAttribute('content', String(img.width));
860
+ const wMeta = document.createElement("meta");
861
+ wMeta.setAttribute("property", "og:image:width");
862
+ wMeta.setAttribute("content", String(img.width));
863
863
  document.head.appendChild(wMeta);
864
864
  }
865
865
  if (img.height) {
866
- const hMeta = document.createElement('meta');
867
- hMeta.setAttribute('property', 'og:image:height');
868
- hMeta.setAttribute('content', String(img.height));
866
+ const hMeta = document.createElement("meta");
867
+ hMeta.setAttribute("property", "og:image:height");
868
+ hMeta.setAttribute("content", String(img.height));
869
869
  document.head.appendChild(hMeta);
870
870
  }
871
871
  if (img.type) {
872
- const tMeta = document.createElement('meta');
873
- tMeta.setAttribute('property', 'og:image:type');
874
- tMeta.setAttribute('content', img.type);
872
+ const tMeta = document.createElement("meta");
873
+ tMeta.setAttribute("property", "og:image:type");
874
+ tMeta.setAttribute("content", img.type);
875
875
  document.head.appendChild(tMeta);
876
876
  }
877
877
  });
@@ -879,18 +879,18 @@ function applyOgImages(images) {
879
879
  /** Apply icon link tags to the DOM */
880
880
  function applyIcons(icons, rel) {
881
881
  if (!icons) return;
882
- const iconList = typeof icons === 'string' ? [{
882
+ const iconList = typeof icons === "string" ? [{
883
883
  url: icons
884
884
  }] : Array.isArray(icons) ? icons : [icons];
885
885
  // Remove old icons of this rel
886
886
  document.querySelectorAll(`link[rel="${rel}"]`).forEach(el => el.remove());
887
887
  iconList.forEach(icon => {
888
- const link = document.createElement('link');
888
+ const link = document.createElement("link");
889
889
  link.rel = rel;
890
890
  link.href = icon.url;
891
891
  if (icon.type) link.type = icon.type;
892
- if (icon.sizes) link.setAttribute('sizes', icon.sizes);
893
- if (icon.color) link.setAttribute('color', icon.color);
892
+ if (icon.sizes) link.setAttribute("sizes", icon.sizes);
893
+ if (icon.color) link.setAttribute("color", icon.color);
894
894
  document.head.appendChild(link);
895
895
  });
896
896
  }
@@ -912,7 +912,7 @@ function collectMetadataToHtml(resolved) {
912
912
  tags.push(`<link rel="canonical" href="${escapeAttr(resolved.canonical)}" />`);
913
913
  }
914
914
  if ((_a = resolved.keywords) === null || _a === void 0 ? void 0 : _a.length) {
915
- tags.push(`<meta name="keywords" content="${escapeAttr(resolved.keywords.join(', '))}" />`);
915
+ tags.push(`<meta name="keywords" content="${escapeAttr(resolved.keywords.join(", "))}" />`);
916
916
  }
917
917
  if (resolved.author) {
918
918
  tags.push(`<meta name="author" content="${escapeAttr(resolved.author)}" />`);
@@ -926,42 +926,42 @@ function collectMetadataToHtml(resolved) {
926
926
  // Open Graph
927
927
  if (resolved.openGraph) {
928
928
  const og = resolved.openGraph;
929
- if (og.type) tags.push(ogMeta('og:type', og.type));
930
- if (og.title) tags.push(ogMeta('og:title', og.title));
931
- if (og.description) tags.push(ogMeta('og:description', og.description));
932
- if (og.url) tags.push(ogMeta('og:url', og.url));
933
- if (og.siteName) tags.push(ogMeta('og:site_name', og.siteName));
934
- if (og.locale) tags.push(ogMeta('og:locale', og.locale));
935
- const images = (_b = og.images) !== null && _b !== void 0 ? _b : og.image ? [typeof og.image === 'string' ? {
929
+ if (og.type) tags.push(ogMeta("og:type", og.type));
930
+ if (og.title) tags.push(ogMeta("og:title", og.title));
931
+ if (og.description) tags.push(ogMeta("og:description", og.description));
932
+ if (og.url) tags.push(ogMeta("og:url", og.url));
933
+ if (og.siteName) tags.push(ogMeta("og:site_name", og.siteName));
934
+ if (og.locale) tags.push(ogMeta("og:locale", og.locale));
935
+ const images = (_b = og.images) !== null && _b !== void 0 ? _b : og.image ? [typeof og.image === "string" ? {
936
936
  url: og.image
937
937
  } : og.image] : [];
938
938
  images.forEach(img => {
939
- tags.push(ogMeta('og:image', img.url));
940
- if (img.alt) tags.push(ogMeta('og:image:alt', img.alt));
941
- if (img.width) tags.push(ogMeta('og:image:width', String(img.width)));
942
- if (img.height) tags.push(ogMeta('og:image:height', String(img.height)));
943
- if (img.type) tags.push(ogMeta('og:image:type', img.type));
939
+ tags.push(ogMeta("og:image", img.url));
940
+ if (img.alt) tags.push(ogMeta("og:image:alt", img.alt));
941
+ if (img.width) tags.push(ogMeta("og:image:width", String(img.width)));
942
+ if (img.height) tags.push(ogMeta("og:image:height", String(img.height)));
943
+ if (img.type) tags.push(ogMeta("og:image:type", img.type));
944
944
  });
945
945
  if (og.article) {
946
946
  const art = og.article;
947
- if (art.publishedTime) tags.push(ogMeta('article:published_time', art.publishedTime));
948
- if (art.modifiedTime) tags.push(ogMeta('article:modified_time', art.modifiedTime));
949
- if (art.section) tags.push(ogMeta('article:section', art.section));
947
+ if (art.publishedTime) tags.push(ogMeta("article:published_time", art.publishedTime));
948
+ if (art.modifiedTime) tags.push(ogMeta("article:modified_time", art.modifiedTime));
949
+ if (art.section) tags.push(ogMeta("article:section", art.section));
950
950
  const authors = Array.isArray(art.author) ? art.author : art.author ? [art.author] : [];
951
- authors.forEach(a => tags.push(ogMeta('article:author', a)));
952
- (_c = art.tags) === null || _c === void 0 ? void 0 : _c.forEach(t => tags.push(ogMeta('article:tag', t)));
951
+ authors.forEach(a => tags.push(ogMeta("article:author", a)));
952
+ (_c = art.tags) === null || _c === void 0 ? void 0 : _c.forEach(t => tags.push(ogMeta("article:tag", t)));
953
953
  }
954
954
  }
955
955
  // Twitter Card
956
956
  if (resolved.twitter) {
957
957
  const tw = resolved.twitter;
958
- if (tw.card) tags.push(nameMeta('twitter:card', tw.card));
959
- if (tw.site) tags.push(nameMeta('twitter:site', tw.site));
960
- if (tw.creator) tags.push(nameMeta('twitter:creator', tw.creator));
961
- if (tw.title) tags.push(nameMeta('twitter:title', tw.title));
962
- if (tw.description) tags.push(nameMeta('twitter:description', tw.description));
963
- if (tw.image) tags.push(nameMeta('twitter:image', tw.image));
964
- if (tw.imageAlt) tags.push(nameMeta('twitter:image:alt', tw.imageAlt));
958
+ if (tw.card) tags.push(nameMeta("twitter:card", tw.card));
959
+ if (tw.site) tags.push(nameMeta("twitter:site", tw.site));
960
+ if (tw.creator) tags.push(nameMeta("twitter:creator", tw.creator));
961
+ if (tw.title) tags.push(nameMeta("twitter:title", tw.title));
962
+ if (tw.description) tags.push(nameMeta("twitter:description", tw.description));
963
+ if (tw.image) tags.push(nameMeta("twitter:image", tw.image));
964
+ if (tw.imageAlt) tags.push(nameMeta("twitter:image:alt", tw.imageAlt));
965
965
  }
966
966
  // Alternates / hreflang
967
967
  if ((_d = resolved.alternates) === null || _d === void 0 ? void 0 : _d.languages) {
@@ -971,8 +971,8 @@ function collectMetadataToHtml(resolved) {
971
971
  }
972
972
  // Icons
973
973
  if (resolved.icons) {
974
- collectIconTags(resolved.icons.icon, 'icon', tags);
975
- collectIconTags(resolved.icons.apple, 'apple-touch-icon', tags);
974
+ collectIconTags(resolved.icons.icon, "icon", tags);
975
+ collectIconTags(resolved.icons.apple, "apple-touch-icon", tags);
976
976
  if (resolved.icons.shortcut) {
977
977
  tags.push(`<link rel="shortcut icon" href="${escapeAttr(resolved.icons.shortcut)}" />`);
978
978
  }
@@ -984,8 +984,8 @@ function collectMetadataToHtml(resolved) {
984
984
  // Structured data JSON-LD
985
985
  if (resolved.structuredData) {
986
986
  const jsonLd = JSON.stringify(Object.assign({
987
- '@context': 'https://schema.org',
988
- '@type': resolved.structuredData.type
987
+ "@context": "https://schema.org",
988
+ "@type": resolved.structuredData.type
989
989
  }, resolved.structuredData.schema));
990
990
  tags.push(`<script type="application/ld+json">${jsonLd}</script>`);
991
991
  }
@@ -994,7 +994,7 @@ function collectMetadataToHtml(resolved) {
994
994
  const robots = (_e = resolved.robots) !== null && _e !== void 0 ? _e : {};
995
995
  const noindex = resolved.disableIndexing || robots.noindex;
996
996
  const nofollow = resolved.disableIndexing || robots.nofollow;
997
- const robotsValue = [noindex ? 'noindex' : 'index', nofollow ? 'nofollow' : 'follow', robots.noarchive && 'noarchive', robots.nosnippet && 'nosnippet', robots.maxImagePreview && `max-image-preview:${robots.maxImagePreview}`, robots.maxSnippet != null && `max-snippet:${robots.maxSnippet}`].filter(Boolean).join(', ');
997
+ const robotsValue = [noindex ? "noindex" : "index", nofollow ? "nofollow" : "follow", robots.noarchive && "noarchive", robots.nosnippet && "nosnippet", robots.maxImagePreview && `max-image-preview:${robots.maxImagePreview}`, robots.maxSnippet != null && `max-snippet:${robots.maxSnippet}`].filter(Boolean).join(", ");
998
998
  tags.push(`<meta name="robots" content="${escapeAttr(robotsValue)}" />`);
999
999
  }
1000
1000
  // Custom meta tags
@@ -1007,11 +1007,11 @@ function collectMetadataToHtml(resolved) {
1007
1007
  tags.push(`<meta http-equiv="${escapeAttr(tag.httpEquiv)}" content="${escapeAttr(tag.content)}" />`);
1008
1008
  }
1009
1009
  });
1010
- return tags.join('\n');
1010
+ return tags.join("\n");
1011
1011
  }
1012
1012
  function collectIconTags(icons, rel, tags) {
1013
1013
  if (!icons) return;
1014
- const iconList = typeof icons === 'string' ? [{
1014
+ const iconList = typeof icons === "string" ? [{
1015
1015
  url: icons
1016
1016
  }] : Array.isArray(icons) ? icons : [icons];
1017
1017
  iconList.forEach(icon => {
@@ -1019,16 +1019,16 @@ function collectIconTags(icons, rel, tags) {
1019
1019
  if (icon.type) tag += ` type="${escapeAttr(icon.type)}"`;
1020
1020
  if (icon.sizes) tag += ` sizes="${escapeAttr(icon.sizes)}"`;
1021
1021
  if (icon.color) tag += ` color="${escapeAttr(icon.color)}"`;
1022
- tag += ' />';
1022
+ tag += " />";
1023
1023
  tags.push(tag);
1024
1024
  });
1025
1025
  }
1026
1026
  // ─── HTML helpers ────────────────────────────────────────────
1027
1027
  function escapeHtml(str) {
1028
- return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
1028
+ return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1029
1029
  }
1030
1030
  function escapeAttr(str) {
1031
- return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
1031
+ return str.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1032
1032
  }
1033
1033
  function ogMeta(property, content) {
1034
1034
  return `<meta property="${escapeAttr(property)}" content="${escapeAttr(content)}" />`;
@@ -1083,7 +1083,7 @@ const resetMetadata = () => {
1083
1083
  */
1084
1084
  function evaluate(value, ctx) {
1085
1085
  if (value === undefined || value === null) return undefined;
1086
- if (typeof value === 'function') {
1086
+ if (typeof value === "function") {
1087
1087
  return value(ctx);
1088
1088
  }
1089
1089
  return value;
@@ -1128,7 +1128,7 @@ function resolveMetadata(meta, ctx) {
1128
1128
  };
1129
1129
  // Normalize: if single image string, also put it in images array
1130
1130
  if (resolvedImage && !resolvedImages) {
1131
- const imgObj = typeof resolvedImage === 'string' ? {
1131
+ const imgObj = typeof resolvedImage === "string" ? {
1132
1132
  url: resolvedImage
1133
1133
  } : resolvedImage;
1134
1134
  resolved.openGraph.images = [imgObj];
@@ -1163,7 +1163,7 @@ function resolveMetadata(meta, ctx) {
1163
1163
  const sd = meta.structuredData;
1164
1164
  resolved.structuredData = {
1165
1165
  type: sd.type,
1166
- schema: typeof sd.schema === 'function' ? sd.schema(ctx) : sd.schema
1166
+ schema: typeof sd.schema === "function" ? sd.schema(ctx) : sd.schema
1167
1167
  };
1168
1168
  }
1169
1169
  // ── AI Hints ────────────────────────────────────────────────
@@ -1251,7 +1251,7 @@ function useMetadataStore() {
1251
1251
  *
1252
1252
  * @module config/metadataLogger
1253
1253
  */
1254
- const isDev = process.env.NODE_ENV === 'development';
1254
+ const isDev = process.env.NODE_ENV === "development";
1255
1255
  let logEnabled = false;
1256
1256
  const logEntries = [];
1257
1257
  /**
@@ -1278,7 +1278,7 @@ function logMetadata(pageId, action, metadata) {
1278
1278
  if (logEntries.length > 50) {
1279
1279
  logEntries.splice(0, logEntries.length - 50);
1280
1280
  }
1281
- console.log(`[Metadata:${action}] page="${pageId}"`, metadata.title ? `title="${metadata.title}"` : '', metadata.description ? `desc="${metadata.description.slice(0, 60)}..."` : '');
1281
+ console.log(`[Metadata:${action}] page="${pageId}"`, metadata.title ? `title="${metadata.title}"` : "", metadata.description ? `desc="${metadata.description.slice(0, 60)}..."` : "");
1282
1282
  }
1283
1283
  /**
1284
1284
  * Get all logged metadata entries (dev only).
@@ -1322,15 +1322,7 @@ let _pageConfig = {
1322
1322
  defaultMetadata: {},
1323
1323
  setMetadata,
1324
1324
  getMetadata,
1325
- resetMetadata,
1326
- // Lazy loading configuration
1327
- lazyLoading: {
1328
- enabled: true,
1329
- preloadOnHover: false,
1330
- preloadOnFocus: false,
1331
- timeout: 30000,
1332
- logMetrics: process.env.NODE_ENV === "development"
1333
- }
1325
+ resetMetadata
1334
1326
  };
1335
1327
  /**
1336
1328
  * Get or initialize the page configuration singleton
@@ -1360,15 +1352,7 @@ function initializePageConfig() {
1360
1352
  defaultMetadata: {},
1361
1353
  setMetadata,
1362
1354
  getMetadata,
1363
- resetMetadata,
1364
- // Lazy loading configuration
1365
- lazyLoading: {
1366
- enabled: true,
1367
- preloadOnHover: false,
1368
- preloadOnFocus: false,
1369
- timeout: 30000,
1370
- logMetrics: process.env.NODE_ENV === "development"
1371
- }
1355
+ resetMetadata
1372
1356
  };
1373
1357
  return _pageConfig;
1374
1358
  }
@@ -1551,14 +1535,13 @@ function useFormData({
1551
1535
  };
1552
1536
  };const EMPTY_ARRAY = [];
1553
1537
  const usePageConfig = t0 => {
1554
- const $ = c(28);
1538
+ const $ = c(27);
1555
1539
  const {
1556
1540
  queries: t1,
1557
1541
  form,
1558
1542
  ns,
1559
1543
  viewSettings: t2,
1560
1544
  meta,
1561
- lazyLoading,
1562
1545
  variables,
1563
1546
  pageId
1564
1547
  } = t0;
@@ -1673,24 +1656,22 @@ const usePageConfig = t0 => {
1673
1656
  }
1674
1657
  const mappedViewSettings = useViewSettings(t8);
1675
1658
  let t9;
1676
- if ($[21] !== form || $[22] !== formData || $[23] !== globalConfig || $[24] !== lazyLoading || $[25] !== mappedViewSettings || $[26] !== meta) {
1659
+ if ($[21] !== form || $[22] !== formData || $[23] !== globalConfig || $[24] !== mappedViewSettings || $[25] !== meta) {
1677
1660
  t9 = {
1678
1661
  formData,
1679
1662
  form,
1680
1663
  mappedViewSettings,
1681
1664
  meta,
1682
- lazyLoading,
1683
1665
  globalConfig
1684
1666
  };
1685
1667
  $[21] = form;
1686
1668
  $[22] = formData;
1687
1669
  $[23] = globalConfig;
1688
- $[24] = lazyLoading;
1689
- $[25] = mappedViewSettings;
1690
- $[26] = meta;
1691
- $[27] = t9;
1670
+ $[24] = mappedViewSettings;
1671
+ $[25] = meta;
1672
+ $[26] = t9;
1692
1673
  } else {
1693
- t9 = $[27];
1674
+ t9 = $[26];
1694
1675
  }
1695
1676
  const mergedConfig = t9;
1696
1677
  return mergedConfig;
@@ -1725,7 +1706,7 @@ function useMetadata({
1725
1706
  // Step 1: Evaluate metadata (if function)
1726
1707
  const evaluatedMeta = useMemo(() => {
1727
1708
  if (!meta) return {};
1728
- if (typeof meta === 'function') {
1709
+ if (typeof meta === "function") {
1729
1710
  return meta({
1730
1711
  get,
1731
1712
  set
@@ -1745,25 +1726,25 @@ function useMetadata({
1745
1726
  // Translate basic fields
1746
1727
  if (result.title) {
1747
1728
  result.title = t(result.title, {
1748
- ns: 'meta',
1729
+ ns: "meta",
1749
1730
  defaultValue: result.title
1750
1731
  });
1751
1732
  }
1752
1733
  if (result.description) {
1753
1734
  result.description = t(result.description, {
1754
- ns: 'meta',
1735
+ ns: "meta",
1755
1736
  defaultValue: result.description
1756
1737
  });
1757
1738
  }
1758
1739
  if (result.keywords) {
1759
1740
  result.keywords = result.keywords.map(kw => t(kw, {
1760
- ns: 'meta',
1741
+ ns: "meta",
1761
1742
  defaultValue: kw
1762
1743
  }));
1763
1744
  }
1764
1745
  if (result.author) {
1765
1746
  result.author = t(result.author, {
1766
- ns: 'meta',
1747
+ ns: "meta",
1767
1748
  defaultValue: result.author
1768
1749
  });
1769
1750
  }
@@ -1772,19 +1753,19 @@ function useMetadata({
1772
1753
  result.openGraph = Object.assign({}, result.openGraph);
1773
1754
  if (result.openGraph.title) {
1774
1755
  result.openGraph.title = t(result.openGraph.title, {
1775
- ns: 'meta',
1756
+ ns: "meta",
1776
1757
  defaultValue: result.openGraph.title
1777
1758
  });
1778
1759
  }
1779
1760
  if (result.openGraph.description) {
1780
1761
  result.openGraph.description = t(result.openGraph.description, {
1781
- ns: 'meta',
1762
+ ns: "meta",
1782
1763
  defaultValue: result.openGraph.description
1783
1764
  });
1784
1765
  }
1785
1766
  if (result.openGraph.siteName) {
1786
1767
  result.openGraph.siteName = t(result.openGraph.siteName, {
1787
- ns: 'meta',
1768
+ ns: "meta",
1788
1769
  defaultValue: result.openGraph.siteName
1789
1770
  });
1790
1771
  }
@@ -1794,13 +1775,13 @@ function useMetadata({
1794
1775
  result.twitter = Object.assign({}, result.twitter);
1795
1776
  if (result.twitter.title) {
1796
1777
  result.twitter.title = t(result.twitter.title, {
1797
- ns: 'meta',
1778
+ ns: "meta",
1798
1779
  defaultValue: result.twitter.title
1799
1780
  });
1800
1781
  }
1801
1782
  if (result.twitter.description) {
1802
1783
  result.twitter.description = t(result.twitter.description, {
1803
- ns: 'meta',
1784
+ ns: "meta",
1804
1785
  defaultValue: result.twitter.description
1805
1786
  });
1806
1787
  }
@@ -1817,7 +1798,7 @@ function useMetadata({
1817
1798
  metadataStore.setMetadata(translated);
1818
1799
  }
1819
1800
  // On the client, also apply to DOM
1820
- if (typeof document !== 'undefined') {
1801
+ if (typeof document !== "undefined") {
1821
1802
  applyMetadataToDom(translated);
1822
1803
  }
1823
1804
  }, [translated, autoApply, metadataStore]);
@@ -1911,7 +1892,7 @@ const MetadataManagerImpl = t0 => {
1911
1892
  useMetadata(t2);
1912
1893
  return null;
1913
1894
  };
1914
- MetadataManagerImpl.displayName = 'MetadataManager';
1895
+ MetadataManagerImpl.displayName = "MetadataManager";
1915
1896
  const MetadataManager = MetadataManagerImpl;const PageGenerator = _a => {
1916
1897
  var {
1917
1898
  enableAuthControl = true,
@@ -2214,8 +2195,8 @@ function toNextMetadata(resolved) {
2214
2195
  follow: !(resolved.disableIndexing || r.nofollow),
2215
2196
  noarchive: r.noarchive,
2216
2197
  nosnippet: r.nosnippet,
2217
- 'max-image-preview': r.maxImagePreview,
2218
- 'max-snippet': r.maxSnippet
2198
+ "max-image-preview": r.maxImagePreview,
2199
+ "max-snippet": r.maxSnippet
2219
2200
  };
2220
2201
  }
2221
2202
  // Alternates
@@ -2281,7 +2262,7 @@ function toNextMetadata(resolved) {
2281
2262
  const icons = resolved.icons;
2282
2263
  const nextIcons = {};
2283
2264
  if (icons.icon) {
2284
- const list = typeof icons.icon === 'string' ? [{
2265
+ const list = typeof icons.icon === "string" ? [{
2285
2266
  url: icons.icon
2286
2267
  }] : Array.isArray(icons.icon) ? icons.icon : [icons.icon];
2287
2268
  nextIcons.icon = list.map(i => ({
@@ -2291,7 +2272,7 @@ function toNextMetadata(resolved) {
2291
2272
  }));
2292
2273
  }
2293
2274
  if (icons.apple) {
2294
- const list = typeof icons.apple === 'string' ? [{
2275
+ const list = typeof icons.apple === "string" ? [{
2295
2276
  url: icons.apple
2296
2277
  }] : Array.isArray(icons.apple) ? icons.apple : [icons.apple];
2297
2278
  nextIcons.apple = list.map(i => ({
@@ -2312,68 +2293,68 @@ function toNextHeadTags(resolved) {
2312
2293
  const tags = [];
2313
2294
  if (resolved.title) {
2314
2295
  tags.push({
2315
- key: 'title',
2316
- tag: 'title',
2296
+ key: "title",
2297
+ tag: "title",
2317
2298
  attributes: {},
2318
2299
  content: resolved.title
2319
2300
  });
2320
2301
  }
2321
2302
  if (resolved.description) {
2322
2303
  tags.push({
2323
- key: 'desc',
2324
- tag: 'meta',
2304
+ key: "desc",
2305
+ tag: "meta",
2325
2306
  attributes: {
2326
- name: 'description',
2307
+ name: "description",
2327
2308
  content: resolved.description
2328
2309
  }
2329
2310
  });
2330
2311
  }
2331
2312
  if (resolved.canonical) {
2332
2313
  tags.push({
2333
- key: 'canonical',
2334
- tag: 'link',
2314
+ key: "canonical",
2315
+ tag: "link",
2335
2316
  attributes: {
2336
- rel: 'canonical',
2317
+ rel: "canonical",
2337
2318
  href: resolved.canonical
2338
2319
  }
2339
2320
  });
2340
2321
  }
2341
2322
  if ((_a = resolved.keywords) === null || _a === void 0 ? void 0 : _a.length) {
2342
2323
  tags.push({
2343
- key: 'keywords',
2344
- tag: 'meta',
2324
+ key: "keywords",
2325
+ tag: "meta",
2345
2326
  attributes: {
2346
- name: 'keywords',
2347
- content: resolved.keywords.join(', ')
2327
+ name: "keywords",
2328
+ content: resolved.keywords.join(", ")
2348
2329
  }
2349
2330
  });
2350
2331
  }
2351
2332
  if (resolved.author) {
2352
2333
  tags.push({
2353
- key: 'author',
2354
- tag: 'meta',
2334
+ key: "author",
2335
+ tag: "meta",
2355
2336
  attributes: {
2356
- name: 'author',
2337
+ name: "author",
2357
2338
  content: resolved.author
2358
2339
  }
2359
2340
  });
2360
2341
  }
2361
2342
  if (resolved.viewport) {
2362
2343
  tags.push({
2363
- key: 'viewport',
2364
- tag: 'meta',
2344
+ key: "viewport",
2345
+ tag: "meta",
2365
2346
  attributes: {
2366
- name: 'viewport',
2347
+ name: "viewport",
2367
2348
  content: resolved.viewport
2368
2349
  }
2369
2350
  });
2370
2351
  }
2371
2352
  if (resolved.themeColor) {
2372
2353
  tags.push({
2373
- key: 'theme-color',
2374
- tag: 'meta',
2354
+ key: "theme-color",
2355
+ tag: "meta",
2375
2356
  attributes: {
2376
- name: 'theme-color',
2357
+ name: "theme-color",
2377
2358
  content: resolved.themeColor
2378
2359
  }
2379
2360
  });
@@ -2382,50 +2363,50 @@ function toNextHeadTags(resolved) {
2382
2363
  if (resolved.openGraph) {
2383
2364
  const og = resolved.openGraph;
2384
2365
  if (og.type) tags.push({
2385
- key: 'og:type',
2386
- tag: 'meta',
2366
+ key: "og:type",
2367
+ tag: "meta",
2387
2368
  attributes: {
2388
- property: 'og:type',
2369
+ property: "og:type",
2389
2370
  content: og.type
2390
2371
  }
2391
2372
  });
2392
2373
  if (og.title) tags.push({
2393
- key: 'og:title',
2394
- tag: 'meta',
2374
+ key: "og:title",
2375
+ tag: "meta",
2395
2376
  attributes: {
2396
- property: 'og:title',
2377
+ property: "og:title",
2397
2378
  content: og.title
2398
2379
  }
2399
2380
  });
2400
2381
  if (og.description) tags.push({
2401
- key: 'og:desc',
2402
- tag: 'meta',
2382
+ key: "og:desc",
2383
+ tag: "meta",
2403
2384
  attributes: {
2404
- property: 'og:description',
2385
+ property: "og:description",
2405
2386
  content: og.description
2406
2387
  }
2407
2388
  });
2408
2389
  if (og.url) tags.push({
2409
- key: 'og:url',
2410
- tag: 'meta',
2390
+ key: "og:url",
2391
+ tag: "meta",
2411
2392
  attributes: {
2412
- property: 'og:url',
2393
+ property: "og:url",
2413
2394
  content: og.url
2414
2395
  }
2415
2396
  });
2416
2397
  if (og.siteName) tags.push({
2417
- key: 'og:site',
2418
- tag: 'meta',
2398
+ key: "og:site",
2399
+ tag: "meta",
2419
2400
  attributes: {
2420
- property: 'og:site_name',
2401
+ property: "og:site_name",
2421
2402
  content: og.siteName
2422
2403
  }
2423
2404
  });
2424
2405
  if (og.locale) tags.push({
2425
- key: 'og:locale',
2426
- tag: 'meta',
2406
+ key: "og:locale",
2407
+ tag: "meta",
2427
2408
  attributes: {
2428
- property: 'og:locale',
2409
+ property: "og:locale",
2429
2410
  content: og.locale
2430
2411
  }
2431
2412
  });
@@ -2433,33 +2414,33 @@ function toNextHeadTags(resolved) {
2433
2414
  images.forEach((img, i) => {
2434
2415
  tags.push({
2435
2416
  key: `og:img:${i}`,
2436
- tag: 'meta',
2417
+ tag: "meta",
2437
2418
  attributes: {
2438
- property: 'og:image',
2419
+ property: "og:image",
2439
2420
  content: img.url
2440
2421
  }
2441
2422
  });
2442
2423
  if (img.alt) tags.push({
2443
2424
  key: `og:img:alt:${i}`,
2444
- tag: 'meta',
2425
+ tag: "meta",
2445
2426
  attributes: {
2446
- property: 'og:image:alt',
2427
+ property: "og:image:alt",
2447
2428
  content: img.alt
2448
2429
  }
2449
2430
  });
2450
2431
  if (img.width) tags.push({
2451
2432
  key: `og:img:w:${i}`,
2452
- tag: 'meta',
2433
+ tag: "meta",
2453
2434
  attributes: {
2454
- property: 'og:image:width',
2435
+ property: "og:image:width",
2455
2436
  content: String(img.width)
2456
2437
  }
2457
2438
  });
2458
2439
  if (img.height) tags.push({
2459
2440
  key: `og:img:h:${i}`,
2460
- tag: 'meta',
2441
+ tag: "meta",
2461
2442
  attributes: {
2462
- property: 'og:image:height',
2443
+ property: "og:image:height",
2463
2444
  content: String(img.height)
2464
2445
  }
2465
2446
  });
@@ -2469,58 +2450,58 @@ function toNextHeadTags(resolved) {
2469
2450
  if (resolved.twitter) {
2470
2451
  const tw = resolved.twitter;
2471
2452
  if (tw.card) tags.push({
2472
- key: 'tw:card',
2473
- tag: 'meta',
2453
+ key: "tw:card",
2454
+ tag: "meta",
2474
2455
  attributes: {
2475
- name: 'twitter:card',
2456
+ name: "twitter:card",
2476
2457
  content: tw.card
2477
2458
  }
2478
2459
  });
2479
2460
  if (tw.site) tags.push({
2480
- key: 'tw:site',
2481
- tag: 'meta',
2461
+ key: "tw:site",
2462
+ tag: "meta",
2482
2463
  attributes: {
2483
- name: 'twitter:site',
2464
+ name: "twitter:site",
2484
2465
  content: tw.site
2485
2466
  }
2486
2467
  });
2487
2468
  if (tw.creator) tags.push({
2488
- key: 'tw:creator',
2489
- tag: 'meta',
2469
+ key: "tw:creator",
2470
+ tag: "meta",
2490
2471
  attributes: {
2491
- name: 'twitter:creator',
2472
+ name: "twitter:creator",
2492
2473
  content: tw.creator
2493
2474
  }
2494
2475
  });
2495
2476
  if (tw.title) tags.push({
2496
- key: 'tw:title',
2497
- tag: 'meta',
2477
+ key: "tw:title",
2478
+ tag: "meta",
2498
2479
  attributes: {
2499
- name: 'twitter:title',
2480
+ name: "twitter:title",
2500
2481
  content: tw.title
2501
2482
  }
2502
2483
  });
2503
2484
  if (tw.description) tags.push({
2504
- key: 'tw:desc',
2505
- tag: 'meta',
2485
+ key: "tw:desc",
2486
+ tag: "meta",
2506
2487
  attributes: {
2507
- name: 'twitter:description',
2488
+ name: "twitter:description",
2508
2489
  content: tw.description
2509
2490
  }
2510
2491
  });
2511
2492
  if (tw.image) tags.push({
2512
- key: 'tw:img',
2513
- tag: 'meta',
2493
+ key: "tw:img",
2494
+ tag: "meta",
2514
2495
  attributes: {
2515
- name: 'twitter:image',
2496
+ name: "twitter:image",
2516
2497
  content: tw.image
2517
2498
  }
2518
2499
  });
2519
2500
  if (tw.imageAlt) tags.push({
2520
- key: 'tw:img:alt',
2521
- tag: 'meta',
2501
+ key: "tw:img:alt",
2502
+ tag: "meta",
2522
2503
  attributes: {
2523
- name: 'twitter:image:alt',
2504
+ name: "twitter:image:alt",
2524
2505
  content: tw.imageAlt
2525
2506
  }
2526
2507
  });
@@ -2530,9 +2511,9 @@ function toNextHeadTags(resolved) {
2530
2511
  Object.entries(resolved.alternates.languages).forEach(([locale, url]) => {
2531
2512
  tags.push({
2532
2513
  key: `hreflang:${locale}`,
2533
- tag: 'link',
2514
+ tag: "link",
2534
2515
  attributes: {
2535
- rel: 'alternate',
2516
+ rel: "alternate",
2536
2517
  hreflang: locale,
2537
2518
  href: url
2538
2519
  }
@@ -2542,10 +2523,10 @@ function toNextHeadTags(resolved) {
2542
2523
  // Manifest
2543
2524
  if (resolved.manifest) {
2544
2525
  tags.push({
2545
- key: 'manifest',
2546
- tag: 'link',
2526
+ key: "manifest",
2527
+ tag: "link",
2547
2528
  attributes: {
2548
- rel: 'manifest',
2529
+ rel: "manifest",
2549
2530
  href: resolved.manifest
2550
2531
  }
2551
2532
  });
@@ -2556,7 +2537,7 @@ function toNextHeadTags(resolved) {
2556
2537
  function normalizeOgImages(images, singleImage) {
2557
2538
  if (images === null || images === void 0 ? void 0 : images.length) return images;
2558
2539
  if (!singleImage) return [];
2559
- return [typeof singleImage === 'string' ? {
2540
+ return [typeof singleImage === "string" ? {
2560
2541
  url: singleImage
2561
2542
  } : singleImage];
2562
2543
  }/**
@@ -2875,23 +2856,23 @@ function generateLlmsTxt(config) {
2875
2856
  const lines = [];
2876
2857
  // Header
2877
2858
  lines.push(`# ${config.siteName}`);
2878
- lines.push('');
2859
+ lines.push("");
2879
2860
  // Description
2880
2861
  if (config.siteDescription) {
2881
2862
  lines.push(`> ${config.siteDescription}`);
2882
- lines.push('');
2863
+ lines.push("");
2883
2864
  }
2884
2865
  // Entries grouped under "Docs"
2885
2866
  if (config.entries.length > 0) {
2886
- lines.push('## Docs');
2887
- lines.push('');
2867
+ lines.push("## Docs");
2868
+ lines.push("");
2888
2869
  config.entries.forEach(entry => {
2889
- const desc = entry.description ? `: ${entry.description}` : '';
2870
+ const desc = entry.description ? `: ${entry.description}` : "";
2890
2871
  lines.push(`- [${entry.title}](${entry.url})${desc}`);
2891
2872
  });
2892
- lines.push('');
2873
+ lines.push("");
2893
2874
  }
2894
- return lines.join('\n');
2875
+ return lines.join("\n");
2895
2876
  }
2896
2877
  /**
2897
2878
  * Generate a full markdown version (llms-full.txt) that includes
@@ -2903,29 +2884,29 @@ function generateLlmsTxt(config) {
2903
2884
  function generateLlmsFullTxt(config, pageContents) {
2904
2885
  const lines = [];
2905
2886
  lines.push(`# ${config.siteName}`);
2906
- lines.push('');
2887
+ lines.push("");
2907
2888
  if (config.siteDescription) {
2908
2889
  lines.push(`> ${config.siteDescription}`);
2909
- lines.push('');
2890
+ lines.push("");
2910
2891
  }
2911
2892
  pageContents.forEach(({
2912
2893
  entry,
2913
2894
  markdown
2914
2895
  }) => {
2915
2896
  lines.push(`## ${entry.title}`);
2916
- lines.push('');
2897
+ lines.push("");
2917
2898
  if (entry.description) {
2918
2899
  lines.push(`> ${entry.description}`);
2919
- lines.push('');
2900
+ lines.push("");
2920
2901
  }
2921
2902
  lines.push(`Source: ${entry.url}`);
2922
- lines.push('');
2903
+ lines.push("");
2923
2904
  lines.push(markdown);
2924
- lines.push('');
2925
- lines.push('---');
2926
- lines.push('');
2905
+ lines.push("");
2906
+ lines.push("---");
2907
+ lines.push("");
2927
2908
  });
2928
- return lines.join('\n');
2909
+ return lines.join("\n");
2929
2910
  }
2930
2911
  /**
2931
2912
  * Helper to convert a ResolvedMetadata + page text into a clean markdown
@@ -2936,13 +2917,13 @@ function generateLlmsFullTxt(config, pageContents) {
2936
2917
  function pageToMarkdown(options) {
2937
2918
  const lines = [];
2938
2919
  lines.push(`# ${options.title}`);
2939
- lines.push('');
2920
+ lines.push("");
2940
2921
  if (options.description) {
2941
2922
  lines.push(options.description);
2942
- lines.push('');
2923
+ lines.push("");
2943
2924
  }
2944
2925
  lines.push(`URL: ${options.url}`);
2945
- lines.push('');
2926
+ lines.push("");
2946
2927
  lines.push(options.content);
2947
- return lines.join('\n');
2928
+ return lines.join("\n");
2948
2929
  }export{MemoizationCache,MetadataStoreProvider,PageGenerator,RenderComponents,applyMetadataToDom,buildArticleJsonLd,buildBreadcrumbListJsonLd,buildFAQPageJsonLd,buildOrganizationJsonLd,buildProductJsonLd,buildWebSiteJsonLd,clearMetadataLog,collectMetadataToHtml,createMetadataStore,createScopePageVariablesAtom,deepEqual,generateLlmsFullTxt,generateLlmsTxt,generateRobotsTxt,generateSitemapEntries,generateSitemapXml,getMetadata,getMetadataLog,getPageConfig,getPageVariablesCompositeKey,isStableValue,logMetadata,memoPropsComparator,memoize,optimizeDeps,pageConfigAtom,pageToMarkdown,pageVariablesAtom,pageVariablesAtomFamily,resetMetadata,resolveMetadata,setMetadata,setMetadataLogging,shallowEqual,toNextHeadTags,toNextMetadata,useApplyMetadata,useFormData,useGenerateContent,useGenerateContentRender,useMetadata,useMetadataStore,usePageConfig,usePageConfigReset,usePageConfigState,usePageConfigValue,usePageUtiles,useViewSettings};//# sourceMappingURL=index.mjs.map