@selfhelp/shared 1.21.6 → 1.21.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/CHANGELOG.md CHANGED
@@ -10,10 +10,33 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
10
10
  This project follows semantic versioning.
11
11
 
12
12
 
13
+ ## v1.21.7
14
+
15
+ Additive page-content contract for the unreleased wave (pairs with core
16
+ `0.1.36`, frontend `0.1.63`, mobile `supports.core >=0.1.36`). Published as a
17
+ **new patch** because `1.21.6` is already immutable on npm.
18
+
19
+ - `IPageContent.should_fallback?: boolean` — when `true`, the web frontend
20
+ redirects to the static `/auth/*` fallback for system pages missing their
21
+ functional section. Emitted by core `>=0.1.36` only for the fallback-check
22
+ keyword set. Absence means the page does not participate in static fallback;
23
+ consumers must not infer fallback from empty `sections`.
24
+
13
25
  ## v1.21.6
14
26
 
15
27
  Unreleased wave cleanup (pairs with core `0.1.36`, frontend `0.1.63`, mobile
16
- `supports.core >=0.1.36`).
28
+ `supports.core >=0.1.36`). Pin consumers to **`1.21.7`** (or at least
29
+ `1.21.6` for resolve/prefill helpers; `should_fallback` typing requires
30
+ `1.21.7`).
31
+
32
+ ### Release tag warning (manual admin)
33
+
34
+ Do **not** use shared `2.x` / `3.x` tags or npm versions from this feature-branch
35
+ history for this release. The wave was republished on the `1.21.x` line
36
+ (`1.21.5` catalog, `1.21.6` cleanup). Review and remove any local/remote
37
+ `v2.*` / `v3.*` tags that may still exist from staging commits
38
+ (`v2.0.0`, `v2.1.0`, `v2.2.0`, `v3.0.0`, `v3.0.1`) before publishing — do not
39
+ delete tags from automation; handle them manually in the shared repository.
17
40
 
18
41
  ### Canonical public page resolve helper
19
42
 
package/dist/index.d.mts CHANGED
@@ -113,6 +113,15 @@ interface IPageContent {
113
113
  * exposes these to interpolation as `{{route.<name>}}`.
114
114
  */
115
115
  route_params?: Record<string, string>;
116
+ /**
117
+ * When true, the web frontend should redirect to the hardcoded static
118
+ * `/auth/*` fallback because this system page is missing its required
119
+ * functional section. Emitted by core >=0.1.36 only for the fallback-check
120
+ * keyword set (`login`, `profile`, `reset-password`, …). Absence means the
121
+ * page does not participate in static fallback — consumers must not infer
122
+ * fallback from empty `sections` (that was an older-backend shim).
123
+ */
124
+ should_fallback?: boolean;
116
125
  /** The `page_routes` pattern that matched (e.g. `/reset/{user_id}/{token}`). Resolve responses only. */
117
126
  matched_url_pattern?: string | null;
118
127
  /** The canonical active route pattern for the page, for canonical-link generation. Resolve responses only. */
package/dist/index.d.ts CHANGED
@@ -113,6 +113,15 @@ interface IPageContent {
113
113
  * exposes these to interpolation as `{{route.<name>}}`.
114
114
  */
115
115
  route_params?: Record<string, string>;
116
+ /**
117
+ * When true, the web frontend should redirect to the hardcoded static
118
+ * `/auth/*` fallback because this system page is missing its required
119
+ * functional section. Emitted by core >=0.1.36 only for the fallback-check
120
+ * keyword set (`login`, `profile`, `reset-password`, …). Absence means the
121
+ * page does not participate in static fallback — consumers must not infer
122
+ * fallback from empty `sections` (that was an older-backend shim).
123
+ */
124
+ should_fallback?: boolean;
116
125
  /** The `page_routes` pattern that matched (e.g. `/reset/{user_id}/{token}`). Resolve responses only. */
117
126
  matched_url_pattern?: string | null;
118
127
  /** The canonical active route pattern for the page, for canonical-link generation. Resolve responses only. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selfhelp/shared",
3
- "version": "1.21.6",
3
+ "version": "1.21.7",
4
4
  "description": "Shared TypeScript package for SelfHelp web frontend and mobile app: style registry, types, API contracts, Mantine theme tokens, condition + interpolation engines, CMS class allow-list.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,19 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Humdek, University of Bern
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ import { describe, expect, it } from 'vitest';
7
+ import type { IPageContent } from '../pages';
8
+
9
+ describe('IPageContent.should_fallback contract', () => {
10
+ it('accepts explicit true/false and absence without requiring sections inference', () => {
11
+ const withTrue = { should_fallback: true } as Pick<IPageContent, 'should_fallback'>;
12
+ const withFalse = { should_fallback: false } as Pick<IPageContent, 'should_fallback'>;
13
+ const absent = {} as Pick<IPageContent, 'should_fallback'>;
14
+
15
+ expect(withTrue.should_fallback === true).toBe(true);
16
+ expect(withFalse.should_fallback === true).toBe(false);
17
+ expect(absent.should_fallback === true).toBe(false);
18
+ });
19
+ });
@@ -114,6 +114,15 @@ export interface IPageContent {
114
114
  * exposes these to interpolation as `{{route.<name>}}`.
115
115
  */
116
116
  route_params?: Record<string, string>;
117
+ /**
118
+ * When true, the web frontend should redirect to the hardcoded static
119
+ * `/auth/*` fallback because this system page is missing its required
120
+ * functional section. Emitted by core >=0.1.36 only for the fallback-check
121
+ * keyword set (`login`, `profile`, `reset-password`, …). Absence means the
122
+ * page does not participate in static fallback — consumers must not infer
123
+ * fallback from empty `sections` (that was an older-backend shim).
124
+ */
125
+ should_fallback?: boolean;
117
126
  /** The `page_routes` pattern that matched (e.g. `/reset/{user_id}/{token}`). Resolve responses only. */
118
127
  matched_url_pattern?: string | null;
119
128
  /** The canonical active route pattern for the page, for canonical-link generation. Resolve responses only. */