@digitalculture/ochre-sdk 0.3.3 → 0.3.4

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/index.cjs CHANGED
@@ -1884,6 +1884,7 @@ async function parseWebpage(webpageResource) {
1884
1884
  let displayedInHeader = true;
1885
1885
  let width = "default";
1886
1886
  let variant = "default";
1887
+ let isSidebarDisplayed = true;
1887
1888
  const webpageSubProperties = webpageProperties.find(
1888
1889
  (property) => property.label === "presentation" && property.values[0]?.content === "page"
1889
1890
  )?.properties;
@@ -1906,6 +1907,12 @@ async function parseWebpage(webpageResource) {
1906
1907
  if (variantProperty) {
1907
1908
  variant = variantProperty.content;
1908
1909
  }
1910
+ const isSidebarDisplayedProperty = webpageSubProperties.find(
1911
+ (property) => property.label === "sidebar-visible"
1912
+ )?.values[0];
1913
+ if (isSidebarDisplayedProperty) {
1914
+ isSidebarDisplayed = isSidebarDisplayedProperty.content === "Yes";
1915
+ }
1909
1916
  }
1910
1917
  const cssStyleSubProperties = webpageProperties.find(
1911
1918
  (property) => property.label === "presentation" && property.values[0]?.content === "css"
@@ -1928,6 +1935,7 @@ async function parseWebpage(webpageResource) {
1928
1935
  width,
1929
1936
  variant,
1930
1937
  backgroundImageUrl: imageLink ? `https://ochre.lib.uchicago.edu/ochre?uuid=${imageLink.uuid}&load` : null,
1938
+ isSidebarDisplayed,
1931
1939
  cssStyles
1932
1940
  },
1933
1941
  webpages
package/dist/index.d.cts CHANGED
@@ -449,6 +449,7 @@ type WebpageProperties = {
449
449
  width: "full" | "large" | "narrow" | "default";
450
450
  variant: "default" | "no-background";
451
451
  backgroundImageUrl: string | null;
452
+ isSidebarDisplayed: boolean;
452
453
  cssStyles: Array<Style>;
453
454
  };
454
455
  /**
package/dist/index.d.ts CHANGED
@@ -449,6 +449,7 @@ type WebpageProperties = {
449
449
  width: "full" | "large" | "narrow" | "default";
450
450
  variant: "default" | "no-background";
451
451
  backgroundImageUrl: string | null;
452
+ isSidebarDisplayed: boolean;
452
453
  cssStyles: Array<Style>;
453
454
  };
454
455
  /**
package/dist/index.js CHANGED
@@ -1806,6 +1806,7 @@ async function parseWebpage(webpageResource) {
1806
1806
  let displayedInHeader = true;
1807
1807
  let width = "default";
1808
1808
  let variant = "default";
1809
+ let isSidebarDisplayed = true;
1809
1810
  const webpageSubProperties = webpageProperties.find(
1810
1811
  (property) => property.label === "presentation" && property.values[0]?.content === "page"
1811
1812
  )?.properties;
@@ -1828,6 +1829,12 @@ async function parseWebpage(webpageResource) {
1828
1829
  if (variantProperty) {
1829
1830
  variant = variantProperty.content;
1830
1831
  }
1832
+ const isSidebarDisplayedProperty = webpageSubProperties.find(
1833
+ (property) => property.label === "sidebar-visible"
1834
+ )?.values[0];
1835
+ if (isSidebarDisplayedProperty) {
1836
+ isSidebarDisplayed = isSidebarDisplayedProperty.content === "Yes";
1837
+ }
1831
1838
  }
1832
1839
  const cssStyleSubProperties = webpageProperties.find(
1833
1840
  (property) => property.label === "presentation" && property.values[0]?.content === "css"
@@ -1850,6 +1857,7 @@ async function parseWebpage(webpageResource) {
1850
1857
  width,
1851
1858
  variant,
1852
1859
  backgroundImageUrl: imageLink ? `https://ochre.lib.uchicago.edu/ochre?uuid=${imageLink.uuid}&load` : null,
1860
+ isSidebarDisplayed,
1853
1861
  cssStyles
1854
1862
  },
1855
1863
  webpages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",