@apify/docs-theme 1.0.158 → 1.0.159

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/docs-theme",
3
- "version": "1.0.158",
3
+ "version": "1.0.159",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -1698,6 +1698,7 @@ iframe[src*="youtube"] {
1698
1698
  justify-content: start;
1699
1699
  }
1700
1700
 
1701
+ .openapi-endpoint.api-method::before,
1701
1702
  .api-method > .menu__link::before,
1702
1703
  .schema > .menu__link::before {
1703
1704
  width: 55px;
@@ -1726,73 +1727,88 @@ iframe[src*="youtube"] {
1726
1727
  }
1727
1728
 
1728
1729
  .get > .menu__link::before,
1730
+ .openapi-endpoint.api-method.get::before,
1729
1731
  .theme-api-markdown .openapi__method-endpoint .badge--primary {
1730
1732
  background-color: var(--ifm-color-info-contrast-background);
1731
1733
  color: var(--ifm-color-info-contrast-foreground);
1732
1734
  border-color: var(--ifm-color-info-dark);
1733
1735
  }
1734
1736
 
1737
+ .openapi-endpoint.api-method.get::before,
1735
1738
  .get > .menu__link::before {
1736
1739
  content: 'get';
1737
1740
  }
1738
1741
 
1742
+ .openapi-endpoint.api-method.post::before,
1739
1743
  .post > .menu__link::before {
1740
1744
  content: 'post';
1741
1745
  }
1742
1746
 
1743
1747
  .post > .menu__link::before,
1748
+ .openapi-endpoint.api-method.post::before,
1744
1749
  .theme-api-markdown .openapi__method-endpoint .badge--success {
1745
1750
  background-color: var(--ifm-color-success-contrast-background);
1746
1751
  color: var(--ifm-color-success-contrast-foreground);
1747
1752
  border-color: var(--ifm-color-success-dark);
1748
1753
  }
1749
1754
 
1755
+ .openapi-endpoint.api-method.delete::before,
1750
1756
  .delete > .menu__link::before {
1751
1757
  content: 'del';
1752
1758
  }
1753
1759
 
1754
1760
  .delete > .menu__link::before,
1761
+ .openapi-endpoint.api-method.delete::before,
1755
1762
  .theme-api-markdown .openapi__method-endpoint .badge--danger {
1756
1763
  background-color: var(--ifm-color-danger-contrast-background);
1757
1764
  color: var(--ifm-color-danger-contrast-foreground);
1758
1765
  border-color: var(--ifm-color-danger-dark);
1759
1766
  }
1760
1767
 
1768
+ .openapi-endpoint.api-method.put::before,
1761
1769
  .put > .menu__link::before {
1762
1770
  content: 'put';
1763
1771
  }
1764
1772
 
1765
1773
  .put > .menu__link::before,
1774
+ .openapi-endpoint.api-method.put::before,
1766
1775
  .theme-api-markdown .openapi__method-endpoint .badge--info {
1767
1776
  background-color: var(--ifm-color-warning-contrast-background);
1768
1777
  color: var(--ifm-color-warning-contrast-foreground);
1769
1778
  border-color: var(--ifm-color-warning-dark);
1770
1779
  }
1771
1780
 
1781
+ .openapi-endpoint.api-method.patch::before,
1772
1782
  .patch > .menu__link::before {
1773
1783
  content: 'patch';
1774
1784
  }
1775
1785
 
1776
1786
  .patch > .menu__link::before,
1787
+ .openapi-endpoint.api-method.patch::before,
1777
1788
  .theme-api-markdown .openapi__method-endpoint .badge--warning {
1778
1789
  background-color: var(--ifm-color-success-contrast-background);
1779
1790
  color: var(--ifm-color-success-contrast-foreground);
1780
1791
  border-color: var(--ifm-color-success-dark);
1781
1792
  }
1782
1793
 
1794
+ .openapi-endpoint.api-method.head::before,
1783
1795
  .head > .menu__link::before {
1784
1796
  content: 'head';
1785
1797
  }
1786
1798
 
1787
1799
  .head > .menu__link::before,
1800
+ .openapi-endpoint.api-method.head::before,
1788
1801
  .event > .menu__link::before,
1802
+ .openapi-endpoint.api-method.event::before,
1789
1803
  .schema > .menu__link::before,
1804
+ .openapi-endpoint.api-method.schema::before,
1790
1805
  .theme-api-markdown .openapi__method-endpoint .badge--secondary {
1791
1806
  background-color: var(--ifm-color-secondary-contrast-background);
1792
1807
  color: var(--ifm-color-secondary-contrast-foreground);
1793
1808
  border-color: var(--ifm-color-secondary-dark);
1794
1809
  }
1795
1810
 
1811
+ .openapi-endpoint.api-method.event::before,
1796
1812
  .event > .menu__link::before {
1797
1813
  content: 'event';
1798
1814
  }
@@ -78,8 +78,7 @@ function scrollOpenApiSidebarItemIntoView() {
78
78
  function redirectOpenApiDocs() {
79
79
  const { hash, pathname, origin } = new URL(window.location.href);
80
80
 
81
- // TODO change to '/api/v2'
82
- if (pathname.replace(/\/$/, '') !== '/api/v2-new') {
81
+ if (!pathname.startsWith('/api/v2') || pathname.startsWith('/api/v2-')) {
83
82
  return;
84
83
  }
85
84
 
@@ -129,5 +128,6 @@ window.addEventListener('load', () => {
129
128
  });
130
129
 
131
130
  window.addEventListener('popstate', () => {
131
+ setTimeout(() => redirectOpenApiDocs(), 50);
132
132
  setTimeout(() => scrollOpenApiSidebarItemIntoView(), 50);
133
133
  });