@aglyn/aglyn 1.0.0-beta.225 → 1.0.0-beta.227
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 +11 -11
- package/src/lib/app-utils/account-acquisition.d.ts +7 -0
- package/src/lib/app-utils/account-acquisition.js +11 -3
- package/src/lib/app-utils/account-acquisition.js.map +1 -1
- package/src/lib/app-utils/after-response.d.ts +32 -0
- package/src/lib/app-utils/after-response.js +98 -0
- package/src/lib/app-utils/after-response.js.map +1 -0
- package/src/lib/app-utils/analytics-events.d.ts +7 -0
- package/src/lib/app-utils/analytics-events.js +1 -0
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/api-adapter.d.ts +10 -0
- package/src/lib/app-utils/api-adapter.js +18 -0
- package/src/lib/app-utils/api-adapter.js.map +1 -1
- package/src/lib/app-utils/binding-token-catalog.js +5 -0
- package/src/lib/app-utils/binding-token-catalog.js.map +1 -1
- package/src/lib/app-utils/collection-entries.d.ts +21 -0
- package/src/lib/app-utils/collection-entries.js +20 -1
- package/src/lib/app-utils/collection-entries.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +1 -1
- package/src/lib/app-utils/docs-help.generated.js +1 -0
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +22 -15
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +3 -2
- package/src/lib/app-utils/notifications.js +11 -3
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +8 -0
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +38 -5
- package/src/lib/plugin-manager/feature-plugins.js +11 -1
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
|
@@ -335,13 +335,28 @@ categories) {
|
|
|
335
335
|
url: ((_ref4 = author == null ? void 0 : author.url) != null ? _ref4 : '').trim()
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* A featured video's stored length as whole seconds, or `undefined` when it
|
|
340
|
+
* names none (AGL-3584).
|
|
341
|
+
*
|
|
342
|
+
* The one reading of `coverVideoDuration` for every side that touches it: the
|
|
343
|
+
* console's save, the loader, the token and the built-in page. A number or a
|
|
344
|
+
* numeric string (a form field, an import) counts when it is finite and
|
|
345
|
+
* positive; it is rounded to the second, never down to `0`, because a stored
|
|
346
|
+
* `0` reads as "no duration" downstream — the rule `videoMediaProps` applies
|
|
347
|
+
* to a library film's own length.
|
|
348
|
+
*/ export function collectionEntryVideoDurationSeconds(value) {
|
|
349
|
+
const seconds = typeof value === 'number' ? value : typeof value === 'string' && value.trim() ? Number(value.trim()) : Number.NaN;
|
|
350
|
+
if (!Number.isFinite(seconds) || seconds <= 0) return undefined;
|
|
351
|
+
return Math.max(1, Math.round(seconds));
|
|
352
|
+
}
|
|
338
353
|
/**
|
|
339
354
|
* The `{{entry.*}}` token map for one entry (AGL-105/551): substituted
|
|
340
355
|
* globally on entry-template screens and per-clone inside the Collection
|
|
341
356
|
* entries block. `entry.url` resolves to the entry's auto-route so links
|
|
342
357
|
* (`Read more`, titles) work without hardcoding the collection slug.
|
|
343
358
|
*/ export function collectionEntryTokens(entry, collectionSlug, categories, /** The site's zone (AGL-3237); UTC when a site has not named one. */ timeZone) {
|
|
344
|
-
var _entry_collectionSlug, _entry_title, _entry_excerpt, _entry_body, _entry_coverImage, _entry_coverVideo, _entry_slug, _entry_slug1, _entry_collectionName;
|
|
359
|
+
var _entry_collectionSlug, _entry_title, _entry_excerpt, _entry_body, _entry_coverImage, _entry_coverVideo, _collectionEntryVideoDurationSeconds, _entry_slug, _entry_slug1, _entry_collectionName;
|
|
345
360
|
const meta = collectionEntryMetaValues(entry, categories, undefined, timeZone);
|
|
346
361
|
const author = collectionEntryAuthorValues(entry);
|
|
347
362
|
// The entry's OWN collection wins over the routed one (AGL-2518) — see
|
|
@@ -357,6 +372,10 @@ categories) {
|
|
|
357
372
|
// into a Video element's source, and the element resolves a reference
|
|
358
373
|
// against the site rendering it.
|
|
359
374
|
'entry.coverVideo': (_entry_coverVideo = entry.coverVideo) != null ? _entry_coverVideo : '',
|
|
375
|
+
// Its length in seconds (AGL-3584), for the Video element's duration, so
|
|
376
|
+
// the watch page's `VideoObject` carries `duration`. `''` when unknown,
|
|
377
|
+
// which the element reads as no duration.
|
|
378
|
+
'entry.coverVideoDuration': String((_collectionEntryVideoDurationSeconds = collectionEntryVideoDurationSeconds(entry.coverVideoDuration)) != null ? _collectionEntryVideoDurationSeconds : ''),
|
|
360
379
|
'entry.slug': (_entry_slug = entry.slug) != null ? _entry_slug : '',
|
|
361
380
|
'entry.url': `/${slug}/${(_entry_slug1 = entry.slug) != null ? _entry_slug1 : ''}`,
|
|
362
381
|
// Which section this entry belongs to (AGL-2518). Worth binding only on a
|