gemi 0.177.0 → 0.178.0

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.
Files changed (41) hide show
  1. package/dist/ai/index.js +1 -1
  2. package/dist/{chunk-11aqfdr7.js → chunk-5d7qhnt9.js} +1 -1
  3. package/dist/{chunk-h968axww.js → chunk-640mjh9h.js} +1 -1
  4. package/dist/{chunk-f76hstxx.js → chunk-9tt0bb0p.js} +2 -2
  5. package/dist/{chunk-f76hstxx.js.map → chunk-9tt0bb0p.js.map} +1 -1
  6. package/dist/{chunk-50hrefzf.js → chunk-e4f6xw7b.js} +1 -1
  7. package/dist/{chunk-y5c9xqme.js → chunk-fsesx3mr.js} +1 -1
  8. package/dist/{chunk-ezrf5vv9.js → chunk-h9kgvg25.js} +1 -1
  9. package/dist/chunk-hmvbj1rq.js +5 -0
  10. package/dist/{chunk-pha2mqjr.js.map → chunk-hmvbj1rq.js.map} +3 -3
  11. package/dist/{chunk-hrj2d0w4.js → chunk-s1x12f0b.js} +1 -1
  12. package/dist/{chunk-pb2bap50.js → chunk-wap1efbn.js} +5 -5
  13. package/dist/{chunk-pb2bap50.js.map → chunk-wap1efbn.js.map} +3 -3
  14. package/dist/client/Head.d.ts.map +1 -1
  15. package/dist/client/index.js +45 -7
  16. package/dist/client/index.js.map +1 -1
  17. package/dist/facades/Meta.d.ts +16 -3
  18. package/dist/facades/Meta.d.ts.map +1 -1
  19. package/dist/facades/index.js +1 -1
  20. package/dist/http/HttpRequest.d.ts +1 -0
  21. package/dist/http/HttpRequest.d.ts.map +1 -1
  22. package/dist/http/Metadata.d.ts +40 -4
  23. package/dist/http/Metadata.d.ts.map +1 -1
  24. package/dist/http/index.d.ts +1 -1
  25. package/dist/http/index.d.ts.map +1 -1
  26. package/dist/http/index.js +1 -1
  27. package/dist/http/requestContext.d.ts +1 -0
  28. package/dist/http/requestContext.d.ts.map +1 -1
  29. package/dist/i18n/index.js +1 -1
  30. package/dist/kernel/index.js +1 -1
  31. package/dist/orm/index.js +1 -1
  32. package/dist/server/index.js +1 -1
  33. package/dist/services/index.js +1 -1
  34. package/package.json +1 -1
  35. package/dist/chunk-pha2mqjr.js +0 -5
  36. /package/dist/{chunk-11aqfdr7.js.map → chunk-5d7qhnt9.js.map} +0 -0
  37. /package/dist/{chunk-h968axww.js.map → chunk-640mjh9h.js.map} +0 -0
  38. /package/dist/{chunk-50hrefzf.js.map → chunk-e4f6xw7b.js.map} +0 -0
  39. /package/dist/{chunk-y5c9xqme.js.map → chunk-fsesx3mr.js.map} +0 -0
  40. /package/dist/{chunk-ezrf5vv9.js.map → chunk-h9kgvg25.js.map} +0 -0
  41. /package/dist/{chunk-hrj2d0w4.js.map → chunk-s1x12f0b.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Head.d.ts","sourceRoot":"","sources":["../../client/Head.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAyCnD,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,QA0E3D;AAkED,eAAO,MAAM,IAAI,GAAI,wBAGlB;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,4CAuE5C,CAAC"}
1
+ {"version":3,"file":"Head.d.ts","sourceRoot":"","sources":["../../client/Head.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAsDnD,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,QAmF3D;AA6ED,eAAO,MAAM,IAAI,GAAI,wBAGlB;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,4CAmF5C,CAAC"}
@@ -1658,7 +1658,10 @@ function fontPreloads(fonts) {
1658
1658
  }
1659
1659
  //#endregion
1660
1660
  //#region client/Head.tsx
1661
- /** Marks the `<link>`s and `<meta name="robots">` rendered from metadata, so a navigation can replace them. */
1661
+ /**
1662
+ * Marks the `<link>`s, `<meta name="robots">` and `Meta.tags` rendered from
1663
+ * metadata, so a navigation can replace them.
1664
+ */
1662
1665
  var GEMI_META_ATTRIBUTE = "data-gemi-meta";
1663
1666
  function metaLinks(canonical, alternates) {
1664
1667
  const links = [];
@@ -1666,13 +1669,18 @@ function metaLinks(canonical, alternates) {
1666
1669
  rel: "canonical",
1667
1670
  href: canonical
1668
1671
  });
1669
- for (const { hrefLang, href } of alternates ?? []) links.push({
1672
+ for (const alternate of alternates ?? []) links.push({
1670
1673
  rel: "alternate",
1671
- href,
1672
- hrefLang
1674
+ href: alternate.href,
1675
+ hrefLang: "hrefLang" in alternate ? alternate.hrefLang : void 0,
1676
+ type: "type" in alternate ? alternate.type : void 0
1673
1677
  });
1674
1678
  return links;
1675
1679
  }
1680
+ /** The attribute (`name` or `property`) and its value of a `Meta.tags` entry. */
1681
+ function tagKey(tag) {
1682
+ return tag.name !== void 0 ? ["name", tag.name] : ["property", tag.property];
1683
+ }
1676
1684
  /** Marks the `<style>`s holding `Meta.fonts`' `@font-face` rules. */
1677
1685
  var GEMI_FONTS_ATTRIBUTE = "data-gemi-fonts";
1678
1686
  /**
@@ -1689,7 +1697,7 @@ var notranslateRemoved = false;
1689
1697
  var htmlAttributesApplied = false;
1690
1698
  function updateMeta(meta, locale) {
1691
1699
  if (!meta) return;
1692
- const { title, description, htmlAttributes, canonical, alternates, fonts, robots, translate } = meta;
1700
+ const { title, description, htmlAttributes, canonical, alternates, fonts, robots, translate, tags } = meta;
1693
1701
  if (translate === true) {
1694
1702
  const notranslate = document.head.querySelector(NOTRANSLATE_SELECTOR);
1695
1703
  if (notranslate) {
@@ -1715,11 +1723,20 @@ function updateMeta(meta, locale) {
1715
1723
  element.setAttribute(GEMI_META_ATTRIBUTE, "");
1716
1724
  document.head.appendChild(element);
1717
1725
  }
1726
+ for (const tag of tags ?? []) {
1727
+ const [key, value] = tagKey(tag);
1728
+ const element = document.createElement("meta");
1729
+ element.setAttribute(key, value);
1730
+ element.setAttribute("content", tag.content);
1731
+ element.setAttribute(GEMI_META_ATTRIBUTE, "");
1732
+ document.head.appendChild(element);
1733
+ }
1718
1734
  for (const link of metaLinks(canonical, alternates)) {
1719
1735
  const element = document.createElement("link");
1720
1736
  element.setAttribute("rel", link.rel);
1721
1737
  element.setAttribute("href", link.href);
1722
1738
  if (link.hrefLang) element.setAttribute("hreflang", link.hrefLang);
1739
+ if (link.type) element.setAttribute("type", link.type);
1723
1740
  element.setAttribute(GEMI_META_ATTRIBUTE, "");
1724
1741
  document.head.appendChild(element);
1725
1742
  }
@@ -1744,7 +1761,7 @@ function updateMeta(meta, locale) {
1744
1761
  }
1745
1762
  }
1746
1763
  var OpenGraph = (props) => {
1747
- const { title, description, type, url, image, imageAlt, imageWidth, imageHeight, twitterImage, twitterImageAlt, twitterImageWidth, twitterImageHeight, twitterCard = twitterImage ? "summary_large_image" : "summary" } = props;
1764
+ const { title, description, type, url, image, imageAlt, imageWidth, imageHeight, siteName, twitterTitle, twitterDescription, twitterImage, twitterImageAlt, twitterImageWidth, twitterImageHeight, twitterCard = twitterImage ? "summary_large_image" : "summary" } = props;
1748
1765
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1749
1766
  /* @__PURE__ */ jsx("meta", {
1750
1767
  property: "og:title",
@@ -1778,6 +1795,10 @@ var OpenGraph = (props) => {
1778
1795
  property: "og:image:height",
1779
1796
  content: String(imageHeight)
1780
1797
  }),
1798
+ siteName && /* @__PURE__ */ jsx("meta", {
1799
+ property: "og:site_name",
1800
+ content: siteName
1801
+ }),
1781
1802
  twitterImage && /* @__PURE__ */ jsx("meta", {
1782
1803
  name: "twitter:image",
1783
1804
  content: twitterImage
@@ -1786,6 +1807,14 @@ var OpenGraph = (props) => {
1786
1807
  name: "twitter:card",
1787
1808
  content: twitterCard
1788
1809
  }),
1810
+ twitterTitle && /* @__PURE__ */ jsx("meta", {
1811
+ name: "twitter:title",
1812
+ content: twitterTitle
1813
+ }),
1814
+ twitterDescription && /* @__PURE__ */ jsx("meta", {
1815
+ name: "twitter:description",
1816
+ content: twitterDescription
1817
+ }),
1789
1818
  twitterImageAlt && /* @__PURE__ */ jsx("meta", {
1790
1819
  name: "twitter:image:alt",
1791
1820
  content: twitterImageAlt
@@ -1827,12 +1856,21 @@ var Head = ({ children = null, charSet = "utf-8" }) => {
1827
1856
  [GEMI_META_ATTRIBUTE]: ""
1828
1857
  }),
1829
1858
  meta?.openGraph && /* @__PURE__ */ jsx(OpenGraph, { ...meta.openGraph }),
1859
+ (meta?.tags ?? []).map((tag, index) => {
1860
+ const [key, value] = tagKey(tag);
1861
+ return /* @__PURE__ */ jsx("meta", {
1862
+ [key]: value,
1863
+ content: tag.content,
1864
+ [GEMI_META_ATTRIBUTE]: ""
1865
+ }, `${index}:${key}:${value}`);
1866
+ }),
1830
1867
  metaLinks(meta?.canonical, meta?.alternates).map((link) => /* @__PURE__ */ jsx("link", {
1831
1868
  rel: link.rel,
1832
1869
  href: link.href,
1833
1870
  hrefLang: link.hrefLang,
1871
+ type: link.type,
1834
1872
  [GEMI_META_ATTRIBUTE]: ""
1835
- }, `${link.rel}:${link.hrefLang ?? ""}:${link.href}`)),
1873
+ }, `${link.rel}:${link.hrefLang ?? ""}:${link.type ?? ""}:${link.href}`)),
1836
1874
  fontPreloads(meta?.fonts).map((preload) => /* @__PURE__ */ jsx("link", {
1837
1875
  rel: "preload",
1838
1876
  as: "font",