lynkow 3.8.77 → 3.8.79
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/README.md +35 -5
- package/dist/index.d.mts +149 -35
- package/dist/index.d.ts +149 -35
- package/dist/index.js +68 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Official TypeScript SDK for [Lynkow](https://lynkow.com) Headless CMS.
|
|
|
11
11
|
- **Framework-agnostic** - Works with Next.js, Nuxt, Astro, SvelteKit, etc.
|
|
12
12
|
- **Tree-shakeable** - Only import what you need
|
|
13
13
|
- **Isomorphic** - Works on both browser and server (Node.js, Deno, Bun)
|
|
14
|
-
- **Image Transformations** -
|
|
14
|
+
- **Image Transformations** - Lynkow CDN srcset and responsive image helpers
|
|
15
15
|
- **Built-in Analytics** - Page views, events, and funnel tracking
|
|
16
16
|
- **Cookie Consent** - GDPR-compliant consent banner with preferences
|
|
17
17
|
- **Spam protection** - Built-in honeypot fields for form submissions
|
|
@@ -262,6 +262,36 @@ const result = await lynkow.reviews.submit({
|
|
|
262
262
|
})
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
+
### Search
|
|
266
|
+
|
|
267
|
+
Lynkow Instant Search exposes a full-text search backed by typo tolerance.
|
|
268
|
+
Site administrators define a single index configuration (which fields are
|
|
269
|
+
indexed, synonyms, stop words, ranking) and one or more named **search
|
|
270
|
+
profiles** that scope the search to a slice of the content (a category, a
|
|
271
|
+
set of tags, a path prefix, etc.) with their own searchable/displayed
|
|
272
|
+
fields, sort, facets and limits.
|
|
273
|
+
|
|
274
|
+
```typescript
|
|
275
|
+
// Search the site default profile
|
|
276
|
+
const { data, meta } = await lynkow.search.search('pagination', {
|
|
277
|
+
locale: 'en',
|
|
278
|
+
limit: 10,
|
|
279
|
+
})
|
|
280
|
+
|
|
281
|
+
// Search a specific profile by slug (e.g. one per docs space)
|
|
282
|
+
const { data: apiHits } = await lynkow.search.searchByProfile('api-docs', 'contents')
|
|
283
|
+
|
|
284
|
+
// Discover the public profiles configured for the site
|
|
285
|
+
const profiles = await lynkow.search.listProfiles()
|
|
286
|
+
profiles.forEach((p) => console.log(p.slug, p.name))
|
|
287
|
+
|
|
288
|
+
// Browser-side instant search (e.g. for a ⌘K palette)
|
|
289
|
+
const { host, apiKey, indexName } = await lynkow.search.getConfig()
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Search must be enabled in **Settings > SEO > Search** before any of these
|
|
293
|
+
methods work. When disabled, every method returns a 503.
|
|
294
|
+
|
|
265
295
|
### Site Configuration
|
|
266
296
|
|
|
267
297
|
```typescript
|
|
@@ -350,12 +380,12 @@ if (redirect) {
|
|
|
350
380
|
|
|
351
381
|
### Media (Image Transformations)
|
|
352
382
|
|
|
353
|
-
Build optimized image URLs
|
|
383
|
+
Build optimized image URLs backed by the Lynkow image transformation service.
|
|
354
384
|
|
|
355
385
|
```typescript
|
|
356
386
|
// Build a srcset for responsive images
|
|
357
387
|
const srcset = lynkow.media.srcset(content.featuredImage)
|
|
358
|
-
// => "https://cdn.../
|
|
388
|
+
// => "https://cdn.../image/w=400,.../photo.jpg 400w, ...800w, ...1200w, ...1920w"
|
|
359
389
|
|
|
360
390
|
// Custom widths and options
|
|
361
391
|
const srcset = lynkow.media.srcset(content.featuredImage, {
|
|
@@ -399,7 +429,7 @@ The API automatically includes pre-computed image variants:
|
|
|
399
429
|
|
|
400
430
|
| Field | Available on | Presets |
|
|
401
431
|
|-------|-------------|---------|
|
|
402
|
-
| `featuredImageVariants` | Content | `thumbnail`, `card`, `hero`, `og` |
|
|
432
|
+
| `featuredImageVariants` | Content | `thumbnail`, `card`, `medium`, `content`, `hero`, `og` |
|
|
403
433
|
| `ogImageVariants` | Content | `og` |
|
|
404
434
|
| `imageVariants` | Category | `thumbnail`, `card`, `og` |
|
|
405
435
|
|
|
@@ -1137,7 +1167,7 @@ import type {
|
|
|
1137
1167
|
|
|
1138
1168
|
### New in v3.7
|
|
1139
1169
|
|
|
1140
|
-
- **Image Transformations**: New `lynkow.media` service with `srcset()` and `transform()` helpers
|
|
1170
|
+
- **Image Transformations**: New `lynkow.media` service with `srcset()` and `transform()` helpers backed by the Lynkow image transformation service
|
|
1141
1171
|
- **ImageVariants type**: API responses now include pre-computed `featuredImageVariants`, `ogImageVariants`, and `imageVariants` fields
|
|
1142
1172
|
- **Body HTML srcset**: Content body images automatically include `srcset`, `loading="lazy"`, and `decoding="async"` attributes
|
|
1143
1173
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1515,15 +1515,16 @@ interface SearchOptions extends BaseRequestOptions {
|
|
|
1515
1515
|
*/
|
|
1516
1516
|
interface SearchConfig {
|
|
1517
1517
|
/**
|
|
1518
|
-
* Public search
|
|
1519
|
-
*
|
|
1520
|
-
* browser
|
|
1518
|
+
* Public Lynkow search host URL (e.g. `'https://search.lynkow.com'`).
|
|
1519
|
+
* Pass verbatim as the `host` when instantiating a search client in
|
|
1520
|
+
* the browser (for example the `meilisearch-js` npm package, which
|
|
1521
|
+
* speaks the same protocol). Does not include a trailing slash.
|
|
1521
1522
|
*/
|
|
1522
1523
|
host: string;
|
|
1523
1524
|
/** Short-lived tenant token (JWT, 1-hour expiry) scoped to your site's index */
|
|
1524
1525
|
apiKey: string;
|
|
1525
1526
|
/**
|
|
1526
|
-
*
|
|
1527
|
+
* Lynkow search index name for this site, of the form
|
|
1527
1528
|
* `site-<siteId>_<locale>` or `site-<siteId>` for single-locale sites.
|
|
1528
1529
|
* Pass verbatim as the `index` parameter in browser search queries.
|
|
1529
1530
|
*/
|
|
@@ -1625,6 +1626,106 @@ declare class SearchService extends BaseService {
|
|
|
1625
1626
|
* ```
|
|
1626
1627
|
*/
|
|
1627
1628
|
getConfig(options?: BaseRequestOptions): Promise<SearchConfig>;
|
|
1629
|
+
/**
|
|
1630
|
+
* List the public search profiles configured for the site.
|
|
1631
|
+
*
|
|
1632
|
+
* Site administrators can create multiple "search profiles", each scoped
|
|
1633
|
+
* to a slice of the content (a category, a set of tags, a path prefix,
|
|
1634
|
+
* etc.) with its own searchable/displayed fields and result limits. Use
|
|
1635
|
+
* this method to render a profile selector or to drive a tabbed search
|
|
1636
|
+
* experience (e.g. one tab per documentation space). Only profiles
|
|
1637
|
+
* marked as public are returned; private profiles remain accessible via
|
|
1638
|
+
* authenticated routes only.
|
|
1639
|
+
*
|
|
1640
|
+
* @param options - Base request options (custom fetch options)
|
|
1641
|
+
* @returns A list of `SearchProfilePublic` (slug, name, description,
|
|
1642
|
+
* facets, defaultLimit, maxLimit). Internal scope details are not
|
|
1643
|
+
* exposed.
|
|
1644
|
+
* @throws {LynkowError} With status `503` if search is not enabled for this site
|
|
1645
|
+
*
|
|
1646
|
+
* @example
|
|
1647
|
+
* ```typescript
|
|
1648
|
+
* const profiles = await lynkow.search.listProfiles()
|
|
1649
|
+
* for (const profile of profiles) {
|
|
1650
|
+
* console.log(profile.slug, profile.name)
|
|
1651
|
+
* }
|
|
1652
|
+
* ```
|
|
1653
|
+
*/
|
|
1654
|
+
listProfiles(options?: BaseRequestOptions): Promise<SearchProfilePublic[]>;
|
|
1655
|
+
/**
|
|
1656
|
+
* Search a specific profile.
|
|
1657
|
+
*
|
|
1658
|
+
* Equivalent to `search()` but targets a named profile slug instead of
|
|
1659
|
+
* the site default. The profile's scope, searchable subset, displayed
|
|
1660
|
+
* subset, sort, facets, and limits are applied server-side. Use this
|
|
1661
|
+
* to power per-section search experiences (API docs, marketing, help,
|
|
1662
|
+
* etc.) without re-implementing scoping in the client.
|
|
1663
|
+
*
|
|
1664
|
+
* @param profileSlug - The profile's slug (e.g. `'api-docs'`).
|
|
1665
|
+
* Must reference a public profile.
|
|
1666
|
+
* @param query - The search query string. Typos are handled automatically.
|
|
1667
|
+
* @param options - Optional locale/category/tag overrides plus pagination.
|
|
1668
|
+
* These are applied as additional AND filters on top of the profile scope.
|
|
1669
|
+
* @returns A `SearchResponse` containing matched hits and pagination meta.
|
|
1670
|
+
* When the profile defines `featured` content IDs, those appear first
|
|
1671
|
+
* on page 1 with `_isFeatured: true`. `boosted` IDs follow with
|
|
1672
|
+
* `_isBoosted: true`.
|
|
1673
|
+
* @throws {LynkowError} With status `404` if the profile does not exist
|
|
1674
|
+
* @throws {LynkowError} With status `403` if the profile is not public
|
|
1675
|
+
* @throws {LynkowError} With status `503` if search is not enabled for this site
|
|
1676
|
+
*
|
|
1677
|
+
* @example
|
|
1678
|
+
* ```typescript
|
|
1679
|
+
* const results = await lynkow.search.searchByProfile('api-docs', 'pagination', {
|
|
1680
|
+
* limit: 10,
|
|
1681
|
+
* })
|
|
1682
|
+
* ```
|
|
1683
|
+
*/
|
|
1684
|
+
searchByProfile(profileSlug: string, query: string, options?: SearchOptions): Promise<SearchResponse>;
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* A public-facing search profile descriptor.
|
|
1688
|
+
*
|
|
1689
|
+
* Returned by `lynkow.search.listProfiles()`. Profiles let site admins
|
|
1690
|
+
* create scoped search experiences (e.g. "API docs", "Marketing", "Help")
|
|
1691
|
+
* each with its own facets and result shape, while sharing a single
|
|
1692
|
+
* underlying search index per site.
|
|
1693
|
+
*/
|
|
1694
|
+
interface SearchProfilePublic {
|
|
1695
|
+
/**
|
|
1696
|
+
* URL-safe identifier for the profile (e.g. `'default'`, `'api-docs'`).
|
|
1697
|
+
* Pass this value to `lynkow.search.searchByProfile()` to query the
|
|
1698
|
+
* profile. Stable for the lifetime of the profile; renaming the slug
|
|
1699
|
+
* via the admin breaks any URL or bookmark referencing it.
|
|
1700
|
+
*/
|
|
1701
|
+
slug: string;
|
|
1702
|
+
/**
|
|
1703
|
+
* Human-readable label shown in profile selectors. Localized to the
|
|
1704
|
+
* site's default locale at the time the profile was last edited.
|
|
1705
|
+
*/
|
|
1706
|
+
name: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Optional admin-authored description explaining what the profile
|
|
1709
|
+
* covers. `null` when the admin did not provide one.
|
|
1710
|
+
*/
|
|
1711
|
+
description: string | null;
|
|
1712
|
+
/**
|
|
1713
|
+
* Field names available for facet aggregation when querying this
|
|
1714
|
+
* profile. Pass these to a UI that renders facet checkboxes (e.g.
|
|
1715
|
+
* `categories.slug`, `tags.slug`, `type`, `locale`). Empty array when
|
|
1716
|
+
* the admin did not enable any facet.
|
|
1717
|
+
*/
|
|
1718
|
+
facets: string[];
|
|
1719
|
+
/**
|
|
1720
|
+
* Default page size applied when the request omits `limit`. Always
|
|
1721
|
+
* positive; admins set it between 1 and 100.
|
|
1722
|
+
*/
|
|
1723
|
+
defaultLimit: number;
|
|
1724
|
+
/**
|
|
1725
|
+
* Upper bound on `limit` accepted by the search endpoint. Requests
|
|
1726
|
+
* with a higher limit are clamped to this value. Always positive.
|
|
1727
|
+
*/
|
|
1728
|
+
maxLimit: number;
|
|
1628
1729
|
}
|
|
1629
1730
|
|
|
1630
1731
|
/**
|
|
@@ -1784,12 +1885,18 @@ interface LynkowClient {
|
|
|
1784
1885
|
}
|
|
1785
1886
|
|
|
1786
1887
|
/**
|
|
1787
|
-
* CDN image variant URLs generated by
|
|
1888
|
+
* CDN image variant URLs generated by the Lynkow image transformation service.
|
|
1788
1889
|
*
|
|
1789
1890
|
* Each property is a pre-generated URL for a specific size/crop preset.
|
|
1790
|
-
* All URLs
|
|
1791
|
-
* via the `Accept` header.
|
|
1792
|
-
*
|
|
1891
|
+
* All URLs are served through the Lynkow CDN and support WebP/AVIF
|
|
1892
|
+
* auto-negotiation via the `Accept` header. A property is `undefined` only
|
|
1893
|
+
* when the endpoint returning this object excludes that preset from its
|
|
1894
|
+
* response (e.g. category images omit `medium`/`content`). For featured
|
|
1895
|
+
* images on content and pages, the six variants `thumbnail`, `card`,
|
|
1896
|
+
* `medium`, `content`, `hero`, and `og` are always present. The CDN uses
|
|
1897
|
+
* a `scale-down` fit that preserves the original size when the source
|
|
1898
|
+
* image is smaller than the target preset, so every URL is safe to use
|
|
1899
|
+
* in `src` or `srcset` regardless of the source dimensions.
|
|
1793
1900
|
*
|
|
1794
1901
|
* Use the smallest variant that fits your layout to minimize bandwidth.
|
|
1795
1902
|
*
|
|
@@ -1807,52 +1914,48 @@ interface ImageVariants {
|
|
|
1807
1914
|
/**
|
|
1808
1915
|
* 400x300px, cover crop with sharpening.
|
|
1809
1916
|
* Use case: list views, grid thumbnails, small cards.
|
|
1810
|
-
* `undefined` when the original image is smaller than 400x300.
|
|
1811
1917
|
*/
|
|
1812
1918
|
thumbnail?: string;
|
|
1813
1919
|
/**
|
|
1814
1920
|
* 600x400px, cover crop.
|
|
1815
1921
|
* Use case: card layouts, blog post previews, medium-sized list items.
|
|
1816
|
-
* `undefined` when the original image is smaller than 600x400.
|
|
1817
1922
|
*/
|
|
1818
1923
|
card?: string;
|
|
1819
1924
|
/**
|
|
1820
1925
|
* 1200px wide, scaled down proportionally (no crop).
|
|
1821
1926
|
* Use case: inline images within article body content.
|
|
1822
|
-
*
|
|
1927
|
+
* Serves the source at its native size when the original is narrower than 1200px.
|
|
1823
1928
|
*/
|
|
1824
1929
|
content?: string;
|
|
1825
1930
|
/**
|
|
1826
1931
|
* 960px wide, scaled down proportionally (no crop).
|
|
1827
1932
|
* Use case: medium-width displays, sidebar featured images, tablet layouts.
|
|
1828
|
-
*
|
|
1933
|
+
* Serves the source at its native size when the original is narrower than 960px.
|
|
1829
1934
|
*/
|
|
1830
1935
|
medium?: string;
|
|
1831
1936
|
/**
|
|
1832
1937
|
* 1920px wide, scaled down proportionally (no crop).
|
|
1833
1938
|
* Use case: full-width hero banners, page headers, background images.
|
|
1834
|
-
*
|
|
1939
|
+
* Serves the source at its native size when the original is narrower than 1920px.
|
|
1835
1940
|
*/
|
|
1836
1941
|
hero?: string;
|
|
1837
1942
|
/**
|
|
1838
1943
|
* 1200x630px, cover crop.
|
|
1839
1944
|
* Use case: Open Graph images, social media sharing (Facebook, LinkedIn, Twitter).
|
|
1840
1945
|
* Dimensions follow the recommended OG image ratio (1.91:1).
|
|
1841
|
-
* `undefined` when the original image is smaller than 1200x630.
|
|
1842
1946
|
*/
|
|
1843
1947
|
og?: string;
|
|
1844
1948
|
/**
|
|
1845
1949
|
* 128x128px, cover crop with face detection gravity.
|
|
1846
1950
|
* Use case: user avatars, author photos, profile pictures.
|
|
1847
1951
|
* Face detection ensures faces are centered in the crop.
|
|
1848
|
-
* `undefined` when the original image is smaller than 128x128.
|
|
1849
1952
|
*/
|
|
1850
1953
|
avatar?: string;
|
|
1851
1954
|
/**
|
|
1852
1955
|
* 2560px wide, scaled down proportionally (no crop).
|
|
1853
1956
|
* Use case: full-resolution display, lightbox/zoom views, retina hero images.
|
|
1854
|
-
* This is the largest available variant.
|
|
1855
|
-
*
|
|
1957
|
+
* This is the largest available variant. Serves the source at its native size
|
|
1958
|
+
* when the original is narrower than 2560px.
|
|
1856
1959
|
*/
|
|
1857
1960
|
full?: string;
|
|
1858
1961
|
}
|
|
@@ -2536,7 +2639,7 @@ interface Author {
|
|
|
2536
2639
|
fullName: string;
|
|
2537
2640
|
/**
|
|
2538
2641
|
* Absolute URL to the author's avatar image, or `null` if no avatar is set.
|
|
2539
|
-
* When available, points to
|
|
2642
|
+
* When available, points to an image hosted on the Lynkow CDN.
|
|
2540
2643
|
* Use `ImageVariants.avatar` (128x128) for optimized display if available elsewhere.
|
|
2541
2644
|
*/
|
|
2542
2645
|
avatarUrl: string | null;
|
|
@@ -2852,7 +2955,7 @@ interface SeoImage {
|
|
|
2852
2955
|
id: string;
|
|
2853
2956
|
/**
|
|
2854
2957
|
* Absolute URL to the image file.
|
|
2855
|
-
* Points to
|
|
2958
|
+
* Points to an image hosted on the Lynkow CDN. Recommended size: 1200x630px for Open Graph.
|
|
2856
2959
|
* Use this directly in `<meta property="og:image">` or `<meta name="twitter:image">` tags.
|
|
2857
2960
|
*/
|
|
2858
2961
|
url: string;
|
|
@@ -4056,6 +4159,16 @@ interface CookieConfig {
|
|
|
4056
4159
|
* When `false`, only "Accept All" and "Reject All" buttons are shown.
|
|
4057
4160
|
*/
|
|
4058
4161
|
showCustomizeButton?: boolean;
|
|
4162
|
+
/**
|
|
4163
|
+
* Banner layout orientation.
|
|
4164
|
+
* - `'auto'` (default): row layout on screens at least 600px wide,
|
|
4165
|
+
* automatically stacked into a column under 600px.
|
|
4166
|
+
* - `'column'`: forced column layout at every screen size.
|
|
4167
|
+
*
|
|
4168
|
+
* In every mode the banner is height-capped to the viewport with internal
|
|
4169
|
+
* scrolling, so it never overflows the screen.
|
|
4170
|
+
*/
|
|
4171
|
+
orientation?: 'auto' | 'column';
|
|
4059
4172
|
/**
|
|
4060
4173
|
* Per-theme color overrides for light and dark modes.
|
|
4061
4174
|
* Only relevant when {@link theme} is `'auto'`.
|
|
@@ -5522,6 +5635,7 @@ declare class ConsentService {
|
|
|
5522
5635
|
private resolveTheme;
|
|
5523
5636
|
private resolveColors;
|
|
5524
5637
|
private contrastColor;
|
|
5638
|
+
private injectBannerStylesOnce;
|
|
5525
5639
|
private createBannerHTML;
|
|
5526
5640
|
private createPreferencesHTML;
|
|
5527
5641
|
private attachBannerEvents;
|
|
@@ -5781,11 +5895,11 @@ interface SrcsetOptions {
|
|
|
5781
5895
|
*/
|
|
5782
5896
|
widths?: number[];
|
|
5783
5897
|
/**
|
|
5784
|
-
*
|
|
5785
|
-
*
|
|
5786
|
-
*
|
|
5787
|
-
*
|
|
5788
|
-
*
|
|
5898
|
+
* Resize fit mode. `'scale-down'` (default) preserves aspect ratio and
|
|
5899
|
+
* never upscales; `'cover'` fills the box and crops; `'contain'` fits
|
|
5900
|
+
* inside the box with letterboxing; `'crop'` hard crops to the exact
|
|
5901
|
+
* dimensions. Must pair with `gravity` for `'cover'` / `'crop'` when
|
|
5902
|
+
* the subject is not centered.
|
|
5789
5903
|
*/
|
|
5790
5904
|
fit?: 'cover' | 'contain' | 'scale-down' | 'crop';
|
|
5791
5905
|
/**
|
|
@@ -5802,9 +5916,9 @@ interface SrcsetOptions {
|
|
|
5802
5916
|
gravity?: string;
|
|
5803
5917
|
}
|
|
5804
5918
|
/**
|
|
5805
|
-
* Options for building a single transformed URL.
|
|
5806
|
-
*
|
|
5807
|
-
* choose a sensible default.
|
|
5919
|
+
* Options for building a single transformed URL. Each field maps to a
|
|
5920
|
+
* query parameter understood by the Lynkow image transformation service;
|
|
5921
|
+
* omit any value to let the CDN choose a sensible default.
|
|
5808
5922
|
*/
|
|
5809
5923
|
interface TransformOptions {
|
|
5810
5924
|
/**
|
|
@@ -5843,13 +5957,13 @@ interface TransformOptions {
|
|
|
5843
5957
|
dpr?: number;
|
|
5844
5958
|
}
|
|
5845
5959
|
/**
|
|
5846
|
-
* Service for building optimized image URLs
|
|
5960
|
+
* Service for building optimized image URLs backed by the Lynkow image
|
|
5961
|
+
* transformation service.
|
|
5847
5962
|
*
|
|
5848
5963
|
* Accessible via `lynkow.media`. This is a pure utility service (no API calls, no
|
|
5849
|
-
* caching) that constructs
|
|
5964
|
+
* caching) that constructs CDN transformation URLs from Lynkow media URLs.
|
|
5850
5965
|
* Works on both server and browser. Handles both original URLs (`/sites/...`) and
|
|
5851
|
-
* already-transformed URLs
|
|
5852
|
-
* when needed.
|
|
5966
|
+
* already-transformed URLs, re-extracting the original path when needed.
|
|
5853
5967
|
*
|
|
5854
5968
|
* @example
|
|
5855
5969
|
* ```typescript
|
|
@@ -5867,7 +5981,7 @@ declare class MediaHelperService {
|
|
|
5867
5981
|
/**
|
|
5868
5982
|
* Generates an HTML `srcset` attribute value from a Lynkow image URL, suitable
|
|
5869
5983
|
* for use in an `<img srcset="...">` or `<source srcset="...">` tag. Produces
|
|
5870
|
-
* one
|
|
5984
|
+
* one Lynkow CDN transformation URL per width breakpoint.
|
|
5871
5985
|
*
|
|
5872
5986
|
* @param imageUrl - Original image URL from the Lynkow API (e.g. `content.featuredImage`).
|
|
5873
5987
|
* Accepts `null` or `undefined` safely (returns empty string).
|
|
@@ -5892,7 +6006,7 @@ declare class MediaHelperService {
|
|
|
5892
6006
|
*/
|
|
5893
6007
|
srcset(imageUrl: string | null | undefined, options?: SrcsetOptions): string;
|
|
5894
6008
|
/**
|
|
5895
|
-
* Generates a single
|
|
6009
|
+
* Generates a single Lynkow CDN transformation URL from a Lynkow image URL.
|
|
5896
6010
|
* Useful for thumbnails, hero images, or any context where you need a specific
|
|
5897
6011
|
* size/format.
|
|
5898
6012
|
*
|
|
@@ -5905,7 +6019,7 @@ declare class MediaHelperService {
|
|
|
5905
6019
|
* - `format` — output format: `'auto'`, `'webp'`, `'avif'`, or `'jpeg'` (default: `'auto'`)
|
|
5906
6020
|
* - `gravity` — focal point for crop mode (e.g. `'0.5x0.3'`)
|
|
5907
6021
|
* - `dpr` — device pixel ratio 1-4 for retina displays
|
|
5908
|
-
* @returns The transformed
|
|
6022
|
+
* @returns The transformed Lynkow CDN URL, the original URL if transformation is
|
|
5909
6023
|
* not possible (non-Lynkow URL), or an empty string if the URL is null/undefined
|
|
5910
6024
|
*
|
|
5911
6025
|
* @example
|
|
@@ -6394,4 +6508,4 @@ declare function onSiteThemeChange(callback: (theme: 'dark' | 'light') => void):
|
|
|
6394
6508
|
*/
|
|
6395
6509
|
declare function renderJsonLdGraph(nodes: object[] | null | undefined): string;
|
|
6396
6510
|
|
|
6397
|
-
export { type Alternate, AnalyticsService, type ApiErrorDetail, type Author, type BaseRequestOptions, BlocksService, BrandingService, type CategoriesListResponse, CategoriesService, type Category, type CategoryDetail, type CategoryDetailResponse, type CategoryOptions, type CategoryResolveResponse, type CategoryTreeNode, type CategoryTreeResponse, type CategoryWithCount, type Client, type ClientConfig, type ConsentCategories, type ConsentLogResponse, ConsentService, type Content, type ContentBody, type ContentResolveResponse, type ContentSchema, type ContentSummary, type ContentsFilters, type ContentsListResponse, ContentsService, type CookieCategory, type CookieConfig, type CookiePreferences, type CookieTexts, CookiesService, EnhancementsService, type ErrorCode, type EventData, type EventName, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormSettings, type FormSubmitData, type FormSubmitResponse, FormsService, type GlobalBlock, type GlobalBlockResponse, type ImageVariants, type JsonLdGraphConfig, type JsonLdNode, type JsonLdNodeSource, type LegalDocument, LegalService, type LynkowClient, type LynkowConfig, LynkowError, type LynkowEvents, MediaHelperService, type Page, type PageSeo, type PageSummary, type PagesListResponse, PagesService, type PageviewData, type PaginatedResponse, type PaginationMeta, type PaginationOptions, type Path, type PathsListResponse, PathsService, type Redirect, type ResolveResponse, type Review, type ReviewResponse, type ReviewSettings, type ReviewSubmitData, type ReviewSubmitResponse, type ReviewsFilters, type ReviewsListResponse, ReviewsService, type SchemaField, type SchemaFieldOption, type SchemaFieldType, type SchemaFieldValidation, type SearchConfig, type SearchHit, type SearchOptions, type SearchResponse, SearchService, SeoService, type SiteConfig, type SiteConfigResponse, SiteService, type SortOptions, type SrcsetOptions, type SubmitOptions, type Tag, type TagsListResponse, TagsService, type TipTapMark, type TipTapNode, type TransformOptions, browserOnly, browserOnlyAsync, createClient, createLynkowClient, detectSiteTheme, isBrowser, isCategoryResolve, isContentResolve, isLynkowError, isServer, onSiteThemeChange, renderJsonLdGraph };
|
|
6511
|
+
export { type Alternate, AnalyticsService, type ApiErrorDetail, type Author, type BaseRequestOptions, BlocksService, BrandingService, type CategoriesListResponse, CategoriesService, type Category, type CategoryDetail, type CategoryDetailResponse, type CategoryOptions, type CategoryResolveResponse, type CategoryTreeNode, type CategoryTreeResponse, type CategoryWithCount, type Client, type ClientConfig, type ConsentCategories, type ConsentLogResponse, ConsentService, type Content, type ContentBody, type ContentResolveResponse, type ContentSchema, type ContentSummary, type ContentsFilters, type ContentsListResponse, ContentsService, type CookieCategory, type CookieConfig, type CookiePreferences, type CookieTexts, CookiesService, EnhancementsService, type ErrorCode, type EventData, type EventName, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormSettings, type FormSubmitData, type FormSubmitResponse, FormsService, type GlobalBlock, type GlobalBlockResponse, type ImageVariants, type JsonLdGraphConfig, type JsonLdNode, type JsonLdNodeSource, type LegalDocument, LegalService, type LynkowClient, type LynkowConfig, LynkowError, type LynkowEvents, MediaHelperService, type Page, type PageSeo, type PageSummary, type PagesListResponse, PagesService, type PageviewData, type PaginatedResponse, type PaginationMeta, type PaginationOptions, type Path, type PathsListResponse, PathsService, type Redirect, type ResolveResponse, type Review, type ReviewResponse, type ReviewSettings, type ReviewSubmitData, type ReviewSubmitResponse, type ReviewsFilters, type ReviewsListResponse, ReviewsService, type SchemaField, type SchemaFieldOption, type SchemaFieldType, type SchemaFieldValidation, type SearchConfig, type SearchHit, type SearchOptions, type SearchProfilePublic, type SearchResponse, SearchService, SeoService, type SiteConfig, type SiteConfigResponse, SiteService, type SortOptions, type SrcsetOptions, type SubmitOptions, type Tag, type TagsListResponse, TagsService, type TipTapMark, type TipTapNode, type TransformOptions, browserOnly, browserOnlyAsync, createClient, createLynkowClient, detectSiteTheme, isBrowser, isCategoryResolve, isContentResolve, isLynkowError, isServer, onSiteThemeChange, renderJsonLdGraph };
|