@digitalculture/ochre-sdk 0.2.8 → 0.2.9

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
@@ -1967,9 +1967,12 @@ function parseWebsiteProperties(properties) {
1967
1967
  const logoUuid = websiteProperties.find((property) => property.label === "logo")?.values[0]?.uuid ?? null;
1968
1968
  let isHeaderDisplayed = true;
1969
1969
  let headerVariant = "default";
1970
+ let headerAlignment = "start";
1971
+ let isHeaderProjectDisplayed = true;
1970
1972
  let isFooterDisplayed = true;
1971
1973
  let isSidebarDisplayed = false;
1972
1974
  let searchCollectionUuid = null;
1975
+ let supportsThemeToggle = true;
1973
1976
  const headerProperty = websiteProperties.find(
1974
1977
  (property) => property.label === "navbar-visible"
1975
1978
  )?.values[0];
@@ -1982,6 +1985,18 @@ function parseWebsiteProperties(properties) {
1982
1985
  if (headerVariantProperty) {
1983
1986
  headerVariant = headerVariantProperty.content;
1984
1987
  }
1988
+ const headerAlignmentProperty = websiteProperties.find(
1989
+ (property) => property.label === "navbar-alignment"
1990
+ )?.values[0];
1991
+ if (headerAlignmentProperty) {
1992
+ headerAlignment = headerAlignmentProperty.content;
1993
+ }
1994
+ const isHeaderProjectDisplayedProperty = websiteProperties.find(
1995
+ (property) => property.label === "navbar-project-visible"
1996
+ )?.values[0];
1997
+ if (isHeaderProjectDisplayedProperty) {
1998
+ isHeaderProjectDisplayed = isHeaderProjectDisplayedProperty.content === "Yes";
1999
+ }
1985
2000
  const footerProperty = websiteProperties.find(
1986
2001
  (property) => property.label === "footer-visible"
1987
2002
  )?.values[0];
@@ -2000,6 +2015,12 @@ function parseWebsiteProperties(properties) {
2000
2015
  if (collectionSearchProperty) {
2001
2016
  searchCollectionUuid = collectionSearchProperty.uuid;
2002
2017
  }
2018
+ const supportsThemeToggleProperty = websiteProperties.find(
2019
+ (property) => property.label === "supports-theme-toggle"
2020
+ )?.values[0];
2021
+ if (supportsThemeToggleProperty) {
2022
+ supportsThemeToggle = supportsThemeToggleProperty.content === "Yes";
2023
+ }
2003
2024
  const {
2004
2025
  type: validatedType,
2005
2026
  status: validatedStatus,
@@ -2011,8 +2032,11 @@ function parseWebsiteProperties(properties) {
2011
2032
  status: validatedStatus,
2012
2033
  isHeaderDisplayed,
2013
2034
  headerVariant,
2035
+ headerAlignment,
2036
+ isHeaderProjectDisplayed,
2014
2037
  isFooterDisplayed,
2015
2038
  isSidebarDisplayed,
2039
+ supportsThemeToggle,
2016
2040
  searchCollectionUuid,
2017
2041
  logoUrl: logoUuid !== null ? `https://ochre.lib.uchicago.edu/ochre?uuid=${logoUuid}&load` : null
2018
2042
  };
package/dist/index.d.cts CHANGED
@@ -421,8 +421,11 @@ type WebsiteProperties = {
421
421
  status: "development" | "preview" | "production";
422
422
  isHeaderDisplayed: boolean;
423
423
  headerVariant: "default" | "floating";
424
+ headerAlignment: "start" | "center" | "end";
425
+ isHeaderProjectDisplayed: boolean;
424
426
  isFooterDisplayed: boolean;
425
427
  isSidebarDisplayed: boolean;
428
+ supportsThemeToggle: boolean;
426
429
  searchCollectionUuid: string | null;
427
430
  logoUrl: string | null;
428
431
  };
package/dist/index.d.ts CHANGED
@@ -421,8 +421,11 @@ type WebsiteProperties = {
421
421
  status: "development" | "preview" | "production";
422
422
  isHeaderDisplayed: boolean;
423
423
  headerVariant: "default" | "floating";
424
+ headerAlignment: "start" | "center" | "end";
425
+ isHeaderProjectDisplayed: boolean;
424
426
  isFooterDisplayed: boolean;
425
427
  isSidebarDisplayed: boolean;
428
+ supportsThemeToggle: boolean;
426
429
  searchCollectionUuid: string | null;
427
430
  logoUrl: string | null;
428
431
  };
package/dist/index.js CHANGED
@@ -1889,9 +1889,12 @@ function parseWebsiteProperties(properties) {
1889
1889
  const logoUuid = websiteProperties.find((property) => property.label === "logo")?.values[0]?.uuid ?? null;
1890
1890
  let isHeaderDisplayed = true;
1891
1891
  let headerVariant = "default";
1892
+ let headerAlignment = "start";
1893
+ let isHeaderProjectDisplayed = true;
1892
1894
  let isFooterDisplayed = true;
1893
1895
  let isSidebarDisplayed = false;
1894
1896
  let searchCollectionUuid = null;
1897
+ let supportsThemeToggle = true;
1895
1898
  const headerProperty = websiteProperties.find(
1896
1899
  (property) => property.label === "navbar-visible"
1897
1900
  )?.values[0];
@@ -1904,6 +1907,18 @@ function parseWebsiteProperties(properties) {
1904
1907
  if (headerVariantProperty) {
1905
1908
  headerVariant = headerVariantProperty.content;
1906
1909
  }
1910
+ const headerAlignmentProperty = websiteProperties.find(
1911
+ (property) => property.label === "navbar-alignment"
1912
+ )?.values[0];
1913
+ if (headerAlignmentProperty) {
1914
+ headerAlignment = headerAlignmentProperty.content;
1915
+ }
1916
+ const isHeaderProjectDisplayedProperty = websiteProperties.find(
1917
+ (property) => property.label === "navbar-project-visible"
1918
+ )?.values[0];
1919
+ if (isHeaderProjectDisplayedProperty) {
1920
+ isHeaderProjectDisplayed = isHeaderProjectDisplayedProperty.content === "Yes";
1921
+ }
1907
1922
  const footerProperty = websiteProperties.find(
1908
1923
  (property) => property.label === "footer-visible"
1909
1924
  )?.values[0];
@@ -1922,6 +1937,12 @@ function parseWebsiteProperties(properties) {
1922
1937
  if (collectionSearchProperty) {
1923
1938
  searchCollectionUuid = collectionSearchProperty.uuid;
1924
1939
  }
1940
+ const supportsThemeToggleProperty = websiteProperties.find(
1941
+ (property) => property.label === "supports-theme-toggle"
1942
+ )?.values[0];
1943
+ if (supportsThemeToggleProperty) {
1944
+ supportsThemeToggle = supportsThemeToggleProperty.content === "Yes";
1945
+ }
1925
1946
  const {
1926
1947
  type: validatedType,
1927
1948
  status: validatedStatus,
@@ -1933,8 +1954,11 @@ function parseWebsiteProperties(properties) {
1933
1954
  status: validatedStatus,
1934
1955
  isHeaderDisplayed,
1935
1956
  headerVariant,
1957
+ headerAlignment,
1958
+ isHeaderProjectDisplayed,
1936
1959
  isFooterDisplayed,
1937
1960
  isSidebarDisplayed,
1961
+ supportsThemeToggle,
1938
1962
  searchCollectionUuid,
1939
1963
  logoUrl: logoUuid !== null ? `https://ochre.lib.uchicago.edu/ochre?uuid=${logoUuid}&load` : null
1940
1964
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
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",