@escape-game-over/atlas 0.1.45 → 0.1.46

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": "@escape-game-over/atlas",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "type": "module",
5
5
  "description": "Typed, data-driven machinery for static multi-locale, multi-deployment Astro sites.",
6
6
  "private": false,
@@ -4,7 +4,8 @@ import {
4
4
  type PhoneNumber,
5
5
  type PostalAddress,
6
6
  } from "../contact.ts";
7
- import { type HttpsUrl, joinUrl, type UrlPath } from "../url.ts";
7
+ import type { ImageAsset } from "../image.ts";
8
+ import { absoluteUrl, type HttpsUrl, joinUrl, type UrlPath } from "../url.ts";
8
9
  import { organizationId } from "./ids.ts";
9
10
  import { alternateName, type JsonLdNode } from "./node.ts";
10
11
  import { postalAddress } from "./place.ts";
@@ -45,6 +46,14 @@ export interface OrganizationInput {
45
46
  * engine keeps, not a page resource it re-fetches.
46
47
  */
47
48
  readonly logo?: UrlPath;
49
+ /**
50
+ * Photographs of the company's place, as on `LocalBusinessInput.image`.
51
+ *
52
+ * For the shape `address` below is for: one company at one place, with no
53
+ * venue node. Google reads an organization with an address as a local
54
+ * business and flags a missing image there. A logo is not one.
55
+ */
56
+ readonly image?: readonly ImageAsset[];
48
57
  /**
49
58
  * The registered name, where it differs from the trading one.
50
59
  *
@@ -156,6 +165,13 @@ export function organization(brand: OrganizationInput): JsonLdNode {
156
165
  ...(brand.logo === undefined
157
166
  ? {}
158
167
  : { logo: joinUrl(brand.url, brand.logo) }),
168
+ ...(brand.image === undefined || brand.image.length === 0
169
+ ? {}
170
+ : {
171
+ image: brand.image.map((photo) =>
172
+ absoluteUrl(brand.url, photo.src, "organization photo")
173
+ ),
174
+ }),
159
175
  ...(brand.legalName === undefined
160
176
  ? {}
161
177
  : { legalName: brand.legalName }),