@digitalculture/ochre-sdk 0.3.5 → 0.3.7

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
@@ -2102,23 +2102,28 @@ async function parseWebsite(websiteTree, projectName, website) {
2102
2102
  });
2103
2103
  if (sidebarResource) {
2104
2104
  sidebarTitle.label = typeof sidebarResource.identification.label === "string" || typeof sidebarResource.identification.label === "number" || typeof sidebarResource.identification.label === "boolean" ? parseFakeString(sidebarResource.identification.label) : parseStringContent(sidebarResource.identification.label);
2105
- const sidebarProperties = sidebarResource.properties ? parseProperties(
2105
+ const sidebarBaseProperties = sidebarResource.properties ? parseProperties(
2106
2106
  Array.isArray(sidebarResource.properties.property) ? sidebarResource.properties.property : [sidebarResource.properties.property]
2107
2107
  ) : [];
2108
+ const sidebarProperties = sidebarBaseProperties.find(
2109
+ (property) => property.label === "presentation" && property.values[0]?.content === "element"
2110
+ )?.properties.find(
2111
+ (property) => property.label === "component" && property.values[0]?.content === "sidebar"
2112
+ )?.properties ?? [];
2108
2113
  const sidebarLayoutProperty = sidebarProperties.find(
2109
2114
  (property) => property.label === "layout"
2110
2115
  );
2111
2116
  if (sidebarLayoutProperty) {
2112
2117
  sidebarLayout = sidebarLayoutProperty.values[0].content;
2113
2118
  }
2114
- const cssProperties = sidebarProperties.find(
2119
+ const cssProperties = sidebarBaseProperties.find(
2115
2120
  (property) => property.label === "presentation" && property.values[0].content === "css"
2116
2121
  )?.properties ?? [];
2117
2122
  for (const property of cssProperties) {
2118
2123
  const cssStyle = property.values[0].content;
2119
2124
  sidebarCssStyles.push({ label: property.label, value: cssStyle });
2120
2125
  }
2121
- const titleProperties = sidebarProperties.find(
2126
+ const titleProperties = sidebarBaseProperties.find(
2122
2127
  (property) => property.label === "presentation" && property.values[0].content === "title"
2123
2128
  )?.properties;
2124
2129
  if (titleProperties) {
package/dist/index.d.cts CHANGED
@@ -425,7 +425,7 @@ type WebsiteProperties = {
425
425
  privacy: "public" | "password" | "private";
426
426
  status: "development" | "preview" | "production";
427
427
  isHeaderDisplayed: boolean;
428
- headerVariant: "default" | "floating";
428
+ headerVariant: "default" | "floating" | "inline";
429
429
  headerAlignment: "start" | "center" | "end";
430
430
  isHeaderProjectDisplayed: boolean;
431
431
  isFooterDisplayed: boolean;
package/dist/index.d.ts CHANGED
@@ -425,7 +425,7 @@ type WebsiteProperties = {
425
425
  privacy: "public" | "password" | "private";
426
426
  status: "development" | "preview" | "production";
427
427
  isHeaderDisplayed: boolean;
428
- headerVariant: "default" | "floating";
428
+ headerVariant: "default" | "floating" | "inline";
429
429
  headerAlignment: "start" | "center" | "end";
430
430
  isHeaderProjectDisplayed: boolean;
431
431
  isFooterDisplayed: boolean;
package/dist/index.js CHANGED
@@ -2024,23 +2024,28 @@ async function parseWebsite(websiteTree, projectName, website) {
2024
2024
  });
2025
2025
  if (sidebarResource) {
2026
2026
  sidebarTitle.label = typeof sidebarResource.identification.label === "string" || typeof sidebarResource.identification.label === "number" || typeof sidebarResource.identification.label === "boolean" ? parseFakeString(sidebarResource.identification.label) : parseStringContent(sidebarResource.identification.label);
2027
- const sidebarProperties = sidebarResource.properties ? parseProperties(
2027
+ const sidebarBaseProperties = sidebarResource.properties ? parseProperties(
2028
2028
  Array.isArray(sidebarResource.properties.property) ? sidebarResource.properties.property : [sidebarResource.properties.property]
2029
2029
  ) : [];
2030
+ const sidebarProperties = sidebarBaseProperties.find(
2031
+ (property) => property.label === "presentation" && property.values[0]?.content === "element"
2032
+ )?.properties.find(
2033
+ (property) => property.label === "component" && property.values[0]?.content === "sidebar"
2034
+ )?.properties ?? [];
2030
2035
  const sidebarLayoutProperty = sidebarProperties.find(
2031
2036
  (property) => property.label === "layout"
2032
2037
  );
2033
2038
  if (sidebarLayoutProperty) {
2034
2039
  sidebarLayout = sidebarLayoutProperty.values[0].content;
2035
2040
  }
2036
- const cssProperties = sidebarProperties.find(
2041
+ const cssProperties = sidebarBaseProperties.find(
2037
2042
  (property) => property.label === "presentation" && property.values[0].content === "css"
2038
2043
  )?.properties ?? [];
2039
2044
  for (const property of cssProperties) {
2040
2045
  const cssStyle = property.values[0].content;
2041
2046
  sidebarCssStyles.push({ label: property.label, value: cssStyle });
2042
2047
  }
2043
- const titleProperties = sidebarProperties.find(
2048
+ const titleProperties = sidebarBaseProperties.find(
2044
2049
  (property) => property.label === "presentation" && property.values[0].content === "title"
2045
2050
  )?.properties;
2046
2051
  if (titleProperties) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
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",
@@ -46,7 +46,7 @@
46
46
  "devDependencies": {
47
47
  "@antfu/eslint-config": "^4.3.0",
48
48
  "@arethetypeswrong/cli": "^0.17.3",
49
- "@changesets/cli": "^2.28.0",
49
+ "@changesets/cli": "^2.28.1",
50
50
  "@total-typescript/ts-reset": "^0.6.1",
51
51
  "@types/node": "^22.13.4",
52
52
  "eslint": "^9.20.1",