diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 538fd517..7f58594c 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -12,3 +12,18 @@ jobs:
with:
node_version: '20'
publish_docs: true
+
+ notify-downstream:
+ needs: release
+ if: needs.release.outputs.published == 'true'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Wait for npm propagation
+ run: sleep 30
+
+ - name: Dispatch to bluprint_graphics-kit
+ uses: peter-evans/repository-dispatch@v4
+ with:
+ token: ${{ secrets.REPO_PAT_TOKEN }}
+ repository: reuters-graphics/bluprint_graphics-kit
+ event-type: dependency-updated
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 78bed107..5681f61b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,47 @@
# @reuters-graphics/graphics-components
+## 3.0.25
+
+### Patch Changes
+
+- 257f967: Updates svelte-fa version
+
+## 3.0.24
+
+### Patch Changes
+
+- 0fce4cd: Removes dev from $app/environment
+
+## 3.0.23
+
+### Patch Changes
+
+- 022d0dc: Test downstream notification workflow with updated reusable workflow
+
+## 3.0.22
+
+### Patch Changes
+
+- bf550d5: Test downstream workflow notification system
+
+## 3.0.21
+
+### Patch Changes
+
+- a2e6e8d: Fixes a bug in PhotoPack that on earlier iPhones would break. Also adds smarter default layouts based on the number of images in the pack and the max width of the PhotoPack.
+
+## 3.0.20
+
+### Patch Changes
+
+- 6d5c152: Removes stray Google Analytics loading call so GA is only loaded via Google Tag Manager.
+
+## 3.0.19
+
+### Patch Changes
+
+- 627f267: Enhances progress reactivity for ScrollerVideo
+
## 3.0.18
### Patch Changes
diff --git a/package.json b/package.json
index b6cbdd37..bfc49daa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@reuters-graphics/graphics-components",
- "version": "3.0.18",
+ "version": "3.0.25",
"type": "module",
"private": false,
"homepage": "https://reuters-graphics.github.io/graphics-components",
@@ -109,7 +109,7 @@
"pym.js": "^1.3.2",
"slugify": "^1.6.6",
"storybook-addon-rtl": "^1.1.0",
- "svelte-fa": "^4.0.3",
+ "svelte-fa": "^4.0.4",
"svelte-intersection-observer": "^1.0.0",
"ua-parser-js": "^2.0.3",
"vitest": "^3.2.4"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f872bd4a..99a6a95d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -48,8 +48,8 @@ importers:
specifier: ^1.1.0
version: 1.1.0
svelte-fa:
- specifier: ^4.0.3
- version: 4.0.3(svelte@5.28.1)
+ specifier: ^4.0.4
+ version: 4.0.4(svelte@5.28.1)
svelte-intersection-observer:
specifier: ^1.0.0
version: 1.0.0
@@ -3800,8 +3800,8 @@ packages:
svelte:
optional: true
- svelte-fa@4.0.3:
- resolution: {integrity: sha512-saZ8yACM0k9Aexey+2NXU1W0MBosU5lBsRgqFCJKM+Taw7d0HyimPaPAjmvY/Xkyi3UwEYL/Sdu1IZJv/p0Flw==}
+ svelte-fa@4.0.4:
+ resolution: {integrity: sha512-85BomCGkTrH8kPDGvb8JrVwq9CqR9foprbKjxemP4Dtg3zPR7OXj5hD0xVYK0C+UCzFI1zooLoK/ndIX6aYXAw==}
peerDependencies:
svelte: ^4.0.0 || ^5.0.0
@@ -8564,7 +8564,7 @@ snapshots:
optionalDependencies:
svelte: 5.28.1
- svelte-fa@4.0.3(svelte@5.28.1):
+ svelte-fa@4.0.4(svelte@5.28.1):
dependencies:
svelte: 5.28.1
diff --git a/src/components/Analytics/providers/ga.ts b/src/components/Analytics/providers/ga.ts
index 159f1d55..29b3f335 100644
--- a/src/components/Analytics/providers/ga.ts
+++ b/src/components/Analytics/providers/ga.ts
@@ -1,6 +1,3 @@
-// Reuters Google Tag ID
-const GOOGLE_TAG_ID = 'G-WBSR7WLTGD';
-
export default () => {
try {
window.dataLayer = window.dataLayer || [];
@@ -11,10 +8,6 @@ export default () => {
window.dataLayer.push(arguments);
};
window.gtag('js', new Date());
- // config event registers a pageview by default
- window.gtag('config', GOOGLE_TAG_ID, {
- send_page_view: false,
- });
registerPageview();
}
} catch (e) {
diff --git a/src/components/PhotoPack/PhotoPack.mdx b/src/components/PhotoPack/PhotoPack.mdx
index c6fefd49..e5988a1b 100644
--- a/src/components/PhotoPack/PhotoPack.mdx
+++ b/src/components/PhotoPack/PhotoPack.mdx
@@ -8,9 +8,22 @@ import * as PhotoPackStories from './PhotoPack.stories.svelte';
The `PhotoPack` component makes simple photo grids with custom layouts at various breakpoints.
-`images` are defined with their src, alt text, captions and an optional `maxHeight`, which ensures that the images are no taller than that height in any layout.
+`images` are defined with their src, alt text, captions and an optional `maxHeight`, which ensures that an image is no taller than that height in any layout.
-`layouts` describe how images will be laid out at different breakpoints. The default layout is one photo per row, stacked vertically -- i.e. mobile layout. You can customise the layouts and group images into `rows` above a certain `breakpoint` by specifying the number of images that should go in that row. For example:
+```javascript
+const images = [
+ {
+ src: 'https://...',
+ altText: 'Alt text',
+ caption: 'Lorem ipsum. REUTERS/Photog',
+ // Optional max-height of images across all layouts
+ maxHeight: 800,
+ },
+ // ...
+];
+```
+
+`layouts` optionally define how images are laid out at different breakpoints. You can customise the layouts and group images into `rows` above a certain `breakpoint` by specifying the number of images that should go in that row. For example:
```javascript
const layouts = [
@@ -23,6 +36,8 @@ const layouts = [
... tells the component that when the `PhotoPack` container is 450 pixels or wider, it should group the 4 images in 3 rows: 1 in the first, 2 in the second and 1 in the last.
+If you don't specify any layouts, the component will use a default responsive layout based on the number of images in your pack.
+
You can define as many layouts for as many images as you like.
```svelte
@@ -123,3 +138,40 @@ gap: 10 # Optional; must be a number.
```
+
+## Smart default layouts
+
+If you don't specify the `layouts` prop, `PhotoPack` will automatically generate responsive layouts based on the number of images and the container width.
+
+**How it works:**
+
+- **Desktop** (1024px+): Number of images per row depends on container width:
+ - `normal`: max 2 per row
+ - `wide` / `wider`: max 3 per row
+ - `widest` / `fluid`: max 4 per row
+- **Tablet** (768px+): Always max 2 per row
+- **Mobile** (below 768px): 1 per row
+
+The smart defaults use a **bottom-heavy distribution**, meaning earlier rows have fewer images (making them larger and more prominent), while later rows have more images.
+
+**Examples:**
+
+- 5 images, `wide` container, desktop: `[2, 3]` (2 in first row, 3 in second)
+- 7 images, `widest` container, desktop: `[3, 4]` (3 in first row, 4 in second)
+- 4 images, any container, desktop: `[2, 2]` (evenly distributed)
+
+```svelte
+
+
+
+
+```
diff --git a/src/components/PhotoPack/PhotoPack.stories.svelte b/src/components/PhotoPack/PhotoPack.stories.svelte
index b512d389..1eb8522b 100644
--- a/src/components/PhotoPack/PhotoPack.stories.svelte
+++ b/src/components/PhotoPack/PhotoPack.stories.svelte
@@ -19,6 +19,12 @@