@tdacorp/hyle-sdk 0.14.1 → 0.17.0
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 +20 -8
- package/dist/check-routes-bin.js +10 -8
- package/dist/{chunk-4V4VKB3O.js → chunk-DMK4XQLU.js} +470 -385
- package/dist/{chunk-R5EMI4HQ.js → chunk-PJMJMP66.js} +3 -1
- package/dist/comments.cjs +6 -4
- package/dist/comments.js +6 -5
- package/dist/{diagram-viewer-DYX6R63Y.js → diagram-viewer-FJPED4SN.js} +46 -26
- package/dist/{embed-B76zRRPa.d.cts → embed-BmdwA2G9.d.cts} +9 -4
- package/dist/{embed-SqOBGI-E.d.ts → embed-DNTZ2UXv.d.ts} +9 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/labels-nmukKYgL.d.cts +37 -0
- package/dist/labels-nmukKYgL.d.ts +37 -0
- package/dist/mermaid-diagram.cjs +59 -30
- package/dist/mermaid-diagram.d.cts +4 -37
- package/dist/mermaid-diagram.d.ts +4 -37
- package/dist/mermaid-diagram.js +7 -5
- package/dist/mermaid-image.cjs +1382 -0
- package/dist/mermaid-image.d.cts +29 -0
- package/dist/mermaid-image.d.ts +29 -0
- package/dist/mermaid-image.js +94 -0
- package/dist/next.cjs +1330 -1118
- package/dist/next.d.cts +61 -11
- package/dist/next.d.ts +61 -11
- package/dist/next.js +922 -793
- package/dist/react.cjs +267 -184
- package/dist/react.d.cts +29 -6
- package/dist/react.d.ts +29 -6
- package/dist/react.js +1 -1
- package/dist/{resolve-DC2ccfwA.d.ts → resolve-Ae7UFjsQ.d.ts} +1 -1
- package/dist/{resolve-DKLVftk_.d.cts → resolve-euZ4-aC9.d.cts} +1 -1
- package/dist/styles.css +11 -22
- package/dist/{types-ByodIyEv.d.cts → types-Czt887Iv.d.cts} +19 -3
- package/dist/{types-ByodIyEv.d.ts → types-Czt887Iv.d.ts} +19 -3
- package/dist/use-cache.d.cts +2 -2
- package/dist/use-cache.d.ts +2 -2
- package/package.json +1 -1
package/dist/next.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { A as ArticleRef, O as OgImage, J as JsonLdConfig, H as HyleComponents, a as HyleSlots, E as EngagementConfig, b as EmbedHeading } from './embed-
|
|
3
|
-
export { c as HyleCommentsFallback } from './embed-
|
|
4
|
-
import { F as FetchResolverOptions, H as HyleResolver } from './resolve-
|
|
5
|
-
export { f as fetchResolver, w as workspaceTags } from './resolve-
|
|
6
|
-
import { MetadataRoute, Metadata } from 'next';
|
|
2
|
+
import { A as ArticleRef, O as OgImage, J as JsonLdConfig, H as HyleComponents, a as HyleSlots, E as EngagementConfig, b as EmbedHeading } from './embed-BmdwA2G9.cjs';
|
|
3
|
+
export { c as HyleCommentsFallback } from './embed-BmdwA2G9.cjs';
|
|
4
|
+
import { F as FetchResolverOptions, H as HyleResolver } from './resolve-euZ4-aC9.cjs';
|
|
5
|
+
export { f as fetchResolver, w as workspaceTags } from './resolve-euZ4-aC9.cjs';
|
|
6
|
+
import { MetadataRoute, ResolvingMetadata, Metadata } from 'next';
|
|
7
7
|
import { a as RevalidationCallbackRoute } from './revalidation-callback-D7Ms_Puz.cjs';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-Czt887Iv.cjs';
|
|
9
9
|
|
|
10
10
|
type RouteParams = Record<string, string | string[] | undefined>;
|
|
11
11
|
interface CommonOptions {
|
|
@@ -34,9 +34,34 @@ interface CommonOptions {
|
|
|
34
34
|
/**
|
|
35
35
|
* The Open Graph / Twitter card image of an article. Return an absolute https URL, or a root-relative path (joined onto
|
|
36
36
|
* `siteOrigin`); anything invalid, or a relative path without a valid `siteOrigin`, is omitted rather than emitted broken.
|
|
37
|
-
* The same image becomes the BlogPosting `image`.
|
|
37
|
+
* The same image becomes the BlogPosting `image`. Unset, see `ogImageRoute`.
|
|
38
38
|
*/
|
|
39
39
|
readonly ogImage?: (article: ArticleRef) => OgImage | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* "More in this section" under article pages (layout "article"): one extra list request of the article's section, the current
|
|
42
|
+
* article left out, rendered after the pager, plus the article's own child pages when it has any. `limit` is the number of
|
|
43
|
+
* related articles (default 5, at most 100), `title` the heading (default localized). A failed request renders nothing.
|
|
44
|
+
*/
|
|
45
|
+
readonly related?: {
|
|
46
|
+
readonly limit?: number;
|
|
47
|
+
readonly title?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Use the generated card as the article image when `ogImage` is unset and `siteOrigin` is valid: `/api/hyle/og/<canonical path>?locale=`.
|
|
51
|
+
* Opt-in because it needs `createOgImageRoute` mounted at `app/api/hyle/og/[...path]/route.ts`; without it the URL would 404. Default false.
|
|
52
|
+
*/
|
|
53
|
+
readonly ogImageRoute?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Where the host mounted `hyleFeed` (for example "/feed.xml", or a function of the locale). With it, article and list metadata carry
|
|
56
|
+
* `<link rel="alternate" type="application/rss+xml">` (absolute with `siteOrigin`; the path is not localized, so return the locale's own feed path from the function form if feeds are per-locale, which receives the page's locale and is skipped when none is configured); `hyleFeedLink` gives the same link for a host-owned page.
|
|
57
|
+
* `title` defaults to "<siteName> feed", else "Feed". Unset: no link.
|
|
58
|
+
*/
|
|
59
|
+
readonly feed?: {
|
|
60
|
+
readonly path: string | ((locale: string) => string);
|
|
61
|
+
readonly title?: string;
|
|
62
|
+
};
|
|
63
|
+
/** Set when `createMarkdownRoute` and its middleware rewrite are mounted: article metadata then carries `<link rel="alternate" type="text/markdown">` to `<canonical>.md`. Default false. */
|
|
64
|
+
readonly markdownTwin?: boolean;
|
|
40
65
|
/** Open Graph `og:site_name`. Unset: not emitted. */
|
|
41
66
|
readonly siteName?: string;
|
|
42
67
|
/** `twitter:site` and `twitter:creator` handles (for example "@TDACorp"), emitted with the Twitter card (needs `ogImage`). Unset: not emitted. */
|
|
@@ -155,6 +180,11 @@ type HyleSitemapOptions = HyleNextOptions & {
|
|
|
155
180
|
*/
|
|
156
181
|
declare function hyleSitemap(options: HyleSitemapOptions): Promise<MetadataRoute.Sitemap>;
|
|
157
182
|
|
|
183
|
+
/** The RSS `<link rel="alternate">` for `options.feed` in `locale` (absolute with a valid `siteOrigin`), or undefined when `feed` is unset or its function form has no locale. The path is the host's own, never locale-prefixed. For a host-owned page's own metadata. */
|
|
184
|
+
declare function hyleFeedLink(options: HyleNextOptions, locale?: string): {
|
|
185
|
+
url: string;
|
|
186
|
+
title: string;
|
|
187
|
+
} | undefined;
|
|
158
188
|
/**
|
|
159
189
|
* `export const generateMetadata = hyleMetadata({ ... })` with the same options as `hylePage`. Title (`titleTemplate` applied last, as an
|
|
160
190
|
* absolute title), description, a canonical URL in the page's own locale (so a fallback copy under another locale prefix points at the
|
|
@@ -167,7 +197,7 @@ declare function hyleSitemap(options: HyleSitemapOptions): Promise<MetadataRoute
|
|
|
167
197
|
* gives no metadata; any other failure (network, timeout, 5xx, 401, 403, 429) is rethrown, so a transient outage is not
|
|
168
198
|
* cached as a page; Next control flow is rethrown.
|
|
169
199
|
*/
|
|
170
|
-
declare function hyleMetadata(options: HyleNextOptions): (props: PageProps) => Promise<Metadata>;
|
|
200
|
+
declare function hyleMetadata(options: HyleNextOptions): (props: PageProps, parent?: ResolvingMetadata) => Promise<Metadata>;
|
|
171
201
|
|
|
172
202
|
type HyleFeedOptions = HyleNextOptions & {
|
|
173
203
|
/** Items in the feed (the server maximum is 100). Default 50. */
|
|
@@ -238,7 +268,7 @@ declare const MOUNTS_MAX_STALE_MS: number;
|
|
|
238
268
|
*/
|
|
239
269
|
declare function hyleRootPage(options: Configs): (props: PageProps) => Promise<ReactElement>;
|
|
240
270
|
/** `export const generateMetadata = hyleRootMetadata({ ... })` with the same options as `hyleRootPage`: no metadata for a path no mount serves. */
|
|
241
|
-
declare function hyleRootMetadata(options: Configs): (props: PageProps) => Promise<Metadata>;
|
|
271
|
+
declare function hyleRootMetadata(options: Configs): (props: PageProps, parent?: ResolvingMetadata) => Promise<Metadata>;
|
|
242
272
|
interface HyleRootSitemapOptions {
|
|
243
273
|
/** The site's public origin, for example "https://tdacorp.in": https, no path, query or credentials. */
|
|
244
274
|
readonly origin: string;
|
|
@@ -292,6 +322,22 @@ declare function createLlmsTxtRoute(options: Configs, llms: LlmsTxtOptions): {
|
|
|
292
322
|
GET(): Promise<Response>;
|
|
293
323
|
};
|
|
294
324
|
|
|
325
|
+
interface OgImageRoute {
|
|
326
|
+
GET(req: Request, ctx: {
|
|
327
|
+
params: Promise<{
|
|
328
|
+
path?: string[];
|
|
329
|
+
}>;
|
|
330
|
+
}): Promise<Response>;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* `export const { GET } = createOgImageRoute({ ...same options as hylePage })` in `app/api/hyle/og/[...path]/route.ts`.
|
|
334
|
+
*
|
|
335
|
+
* The default `og:image` of an article page when `ogImage` is unset: a plain 1200x630 card with the title and `siteName`, in the
|
|
336
|
+
* system font. The URL is `/api/hyle/og` + the article's canonical path (no `basePath` involved, so any mount works), resolved with the page's own resolver (a redirect, such as a renamed slug, is followed once), so cache tags and purges are the
|
|
337
|
+
* page's. `?locale=` is honoured only when it names a translation the article has (the path is resolved without it first), so it cannot fan out requests. An unknown path is a 404, an outage a 502.
|
|
338
|
+
*/
|
|
339
|
+
declare function createOgImageRoute(options: HyleNextOptions): OgImageRoute;
|
|
340
|
+
|
|
295
341
|
interface AssetRouteOptions {
|
|
296
342
|
/** hyle's origin (HYLE_TARGET_BASE_URL). */
|
|
297
343
|
readonly baseUrl: string | undefined;
|
|
@@ -345,9 +391,13 @@ interface HyleListProps {
|
|
|
345
391
|
readonly headingLevel?: EmbedHeading | undefined;
|
|
346
392
|
/** Where "View all" goes, usually the mount's index. Omit to hide it. */
|
|
347
393
|
readonly moreHref?: string | undefined;
|
|
394
|
+
/** Start after this `next_cursor` (a malformed one is ignored). The host reads it from its own `?cursor=`. */
|
|
395
|
+
readonly cursor?: string | undefined;
|
|
396
|
+
/** Builds the "Older posts" href from the list's validated `next_cursor`; called only when there is one. Omit to hide the link. */
|
|
397
|
+
readonly olderHref?: ((nextCursor: string) => string) | undefined;
|
|
348
398
|
}
|
|
349
399
|
/** The newest articles of a section as a list or a grid of links to the mount. Slots: `list.item`, `list.empty`. */
|
|
350
|
-
declare function HyleList({ options, limit, locale, layout, title, headingLevel, moreHref }: HyleListProps): Promise<ReactElement | null>;
|
|
400
|
+
declare function HyleList({ options, limit, locale, layout, title, headingLevel, moreHref, cursor, olderHref }: HyleListProps): Promise<ReactElement | null>;
|
|
351
401
|
interface HyleArticleProps {
|
|
352
402
|
readonly options: HyleNextOptions;
|
|
353
403
|
/** The article's canonical site path, as hyle sends it (`canonical_path`, with the workspace prefix, no locale prefix). */
|
|
@@ -459,4 +509,4 @@ declare const ENGAGE_CSRF_HEADER = "x-hyle-engage";
|
|
|
459
509
|
*/
|
|
460
510
|
declare function createEngagementRoute(options: EngagementRouteOptions): EngagementRoute;
|
|
461
511
|
|
|
462
|
-
export { type AssetRoute, type AssetRouteOptions, ENGAGE_CSRF_HEADER, type EngageReader, type EngagementRoute, type EngagementRouteOptions, FetchResolverOptions, HyleArticle, type HyleArticleProps, HyleComments, type HyleCommentsProps, type HyleFeedOptions, HyleList, type HyleListProps, type HyleNextOptions, HyleResolver, type HyleRootConfig, type HyleRootSitemapOptions, type HyleSitemapOptions, type LlmsTxtOptions, MOUNTS_MAX_STALE_MS, type MarkdownRoute, type PageProps, type RevalidateRouteOptions, type RouteParams, createAssetRoute, createEngagementRoute, createLlmsTxtRoute, createMarkdownRoute, createRevalidateRoute, hyleFeed, hyleMetadata, hylePage, hyleRootMetadata, hyleRootPage, hyleRootSitemap, hyleSitemap, markdownRewritePath };
|
|
512
|
+
export { type AssetRoute, type AssetRouteOptions, ENGAGE_CSRF_HEADER, type EngageReader, type EngagementRoute, type EngagementRouteOptions, FetchResolverOptions, HyleArticle, type HyleArticleProps, HyleComments, type HyleCommentsProps, type HyleFeedOptions, HyleList, type HyleListProps, type HyleNextOptions, HyleResolver, type HyleRootConfig, type HyleRootSitemapOptions, type HyleSitemapOptions, type LlmsTxtOptions, MOUNTS_MAX_STALE_MS, type MarkdownRoute, type OgImageRoute, type PageProps, type RevalidateRouteOptions, type RouteParams, createAssetRoute, createEngagementRoute, createLlmsTxtRoute, createMarkdownRoute, createOgImageRoute, createRevalidateRoute, hyleFeed, hyleFeedLink, hyleMetadata, hylePage, hyleRootMetadata, hyleRootPage, hyleRootSitemap, hyleSitemap, markdownRewritePath };
|
package/dist/next.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { A as ArticleRef, O as OgImage, J as JsonLdConfig, H as HyleComponents, a as HyleSlots, E as EngagementConfig, b as EmbedHeading } from './embed-
|
|
3
|
-
export { c as HyleCommentsFallback } from './embed-
|
|
4
|
-
import { F as FetchResolverOptions, H as HyleResolver } from './resolve-
|
|
5
|
-
export { f as fetchResolver, w as workspaceTags } from './resolve-
|
|
6
|
-
import { MetadataRoute, Metadata } from 'next';
|
|
2
|
+
import { A as ArticleRef, O as OgImage, J as JsonLdConfig, H as HyleComponents, a as HyleSlots, E as EngagementConfig, b as EmbedHeading } from './embed-DNTZ2UXv.js';
|
|
3
|
+
export { c as HyleCommentsFallback } from './embed-DNTZ2UXv.js';
|
|
4
|
+
import { F as FetchResolverOptions, H as HyleResolver } from './resolve-Ae7UFjsQ.js';
|
|
5
|
+
export { f as fetchResolver, w as workspaceTags } from './resolve-Ae7UFjsQ.js';
|
|
6
|
+
import { MetadataRoute, ResolvingMetadata, Metadata } from 'next';
|
|
7
7
|
import { a as RevalidationCallbackRoute } from './revalidation-callback-D7Ms_Puz.js';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-Czt887Iv.js';
|
|
9
9
|
|
|
10
10
|
type RouteParams = Record<string, string | string[] | undefined>;
|
|
11
11
|
interface CommonOptions {
|
|
@@ -34,9 +34,34 @@ interface CommonOptions {
|
|
|
34
34
|
/**
|
|
35
35
|
* The Open Graph / Twitter card image of an article. Return an absolute https URL, or a root-relative path (joined onto
|
|
36
36
|
* `siteOrigin`); anything invalid, or a relative path without a valid `siteOrigin`, is omitted rather than emitted broken.
|
|
37
|
-
* The same image becomes the BlogPosting `image`.
|
|
37
|
+
* The same image becomes the BlogPosting `image`. Unset, see `ogImageRoute`.
|
|
38
38
|
*/
|
|
39
39
|
readonly ogImage?: (article: ArticleRef) => OgImage | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* "More in this section" under article pages (layout "article"): one extra list request of the article's section, the current
|
|
42
|
+
* article left out, rendered after the pager, plus the article's own child pages when it has any. `limit` is the number of
|
|
43
|
+
* related articles (default 5, at most 100), `title` the heading (default localized). A failed request renders nothing.
|
|
44
|
+
*/
|
|
45
|
+
readonly related?: {
|
|
46
|
+
readonly limit?: number;
|
|
47
|
+
readonly title?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Use the generated card as the article image when `ogImage` is unset and `siteOrigin` is valid: `/api/hyle/og/<canonical path>?locale=`.
|
|
51
|
+
* Opt-in because it needs `createOgImageRoute` mounted at `app/api/hyle/og/[...path]/route.ts`; without it the URL would 404. Default false.
|
|
52
|
+
*/
|
|
53
|
+
readonly ogImageRoute?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Where the host mounted `hyleFeed` (for example "/feed.xml", or a function of the locale). With it, article and list metadata carry
|
|
56
|
+
* `<link rel="alternate" type="application/rss+xml">` (absolute with `siteOrigin`; the path is not localized, so return the locale's own feed path from the function form if feeds are per-locale, which receives the page's locale and is skipped when none is configured); `hyleFeedLink` gives the same link for a host-owned page.
|
|
57
|
+
* `title` defaults to "<siteName> feed", else "Feed". Unset: no link.
|
|
58
|
+
*/
|
|
59
|
+
readonly feed?: {
|
|
60
|
+
readonly path: string | ((locale: string) => string);
|
|
61
|
+
readonly title?: string;
|
|
62
|
+
};
|
|
63
|
+
/** Set when `createMarkdownRoute` and its middleware rewrite are mounted: article metadata then carries `<link rel="alternate" type="text/markdown">` to `<canonical>.md`. Default false. */
|
|
64
|
+
readonly markdownTwin?: boolean;
|
|
40
65
|
/** Open Graph `og:site_name`. Unset: not emitted. */
|
|
41
66
|
readonly siteName?: string;
|
|
42
67
|
/** `twitter:site` and `twitter:creator` handles (for example "@TDACorp"), emitted with the Twitter card (needs `ogImage`). Unset: not emitted. */
|
|
@@ -155,6 +180,11 @@ type HyleSitemapOptions = HyleNextOptions & {
|
|
|
155
180
|
*/
|
|
156
181
|
declare function hyleSitemap(options: HyleSitemapOptions): Promise<MetadataRoute.Sitemap>;
|
|
157
182
|
|
|
183
|
+
/** The RSS `<link rel="alternate">` for `options.feed` in `locale` (absolute with a valid `siteOrigin`), or undefined when `feed` is unset or its function form has no locale. The path is the host's own, never locale-prefixed. For a host-owned page's own metadata. */
|
|
184
|
+
declare function hyleFeedLink(options: HyleNextOptions, locale?: string): {
|
|
185
|
+
url: string;
|
|
186
|
+
title: string;
|
|
187
|
+
} | undefined;
|
|
158
188
|
/**
|
|
159
189
|
* `export const generateMetadata = hyleMetadata({ ... })` with the same options as `hylePage`. Title (`titleTemplate` applied last, as an
|
|
160
190
|
* absolute title), description, a canonical URL in the page's own locale (so a fallback copy under another locale prefix points at the
|
|
@@ -167,7 +197,7 @@ declare function hyleSitemap(options: HyleSitemapOptions): Promise<MetadataRoute
|
|
|
167
197
|
* gives no metadata; any other failure (network, timeout, 5xx, 401, 403, 429) is rethrown, so a transient outage is not
|
|
168
198
|
* cached as a page; Next control flow is rethrown.
|
|
169
199
|
*/
|
|
170
|
-
declare function hyleMetadata(options: HyleNextOptions): (props: PageProps) => Promise<Metadata>;
|
|
200
|
+
declare function hyleMetadata(options: HyleNextOptions): (props: PageProps, parent?: ResolvingMetadata) => Promise<Metadata>;
|
|
171
201
|
|
|
172
202
|
type HyleFeedOptions = HyleNextOptions & {
|
|
173
203
|
/** Items in the feed (the server maximum is 100). Default 50. */
|
|
@@ -238,7 +268,7 @@ declare const MOUNTS_MAX_STALE_MS: number;
|
|
|
238
268
|
*/
|
|
239
269
|
declare function hyleRootPage(options: Configs): (props: PageProps) => Promise<ReactElement>;
|
|
240
270
|
/** `export const generateMetadata = hyleRootMetadata({ ... })` with the same options as `hyleRootPage`: no metadata for a path no mount serves. */
|
|
241
|
-
declare function hyleRootMetadata(options: Configs): (props: PageProps) => Promise<Metadata>;
|
|
271
|
+
declare function hyleRootMetadata(options: Configs): (props: PageProps, parent?: ResolvingMetadata) => Promise<Metadata>;
|
|
242
272
|
interface HyleRootSitemapOptions {
|
|
243
273
|
/** The site's public origin, for example "https://tdacorp.in": https, no path, query or credentials. */
|
|
244
274
|
readonly origin: string;
|
|
@@ -292,6 +322,22 @@ declare function createLlmsTxtRoute(options: Configs, llms: LlmsTxtOptions): {
|
|
|
292
322
|
GET(): Promise<Response>;
|
|
293
323
|
};
|
|
294
324
|
|
|
325
|
+
interface OgImageRoute {
|
|
326
|
+
GET(req: Request, ctx: {
|
|
327
|
+
params: Promise<{
|
|
328
|
+
path?: string[];
|
|
329
|
+
}>;
|
|
330
|
+
}): Promise<Response>;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* `export const { GET } = createOgImageRoute({ ...same options as hylePage })` in `app/api/hyle/og/[...path]/route.ts`.
|
|
334
|
+
*
|
|
335
|
+
* The default `og:image` of an article page when `ogImage` is unset: a plain 1200x630 card with the title and `siteName`, in the
|
|
336
|
+
* system font. The URL is `/api/hyle/og` + the article's canonical path (no `basePath` involved, so any mount works), resolved with the page's own resolver (a redirect, such as a renamed slug, is followed once), so cache tags and purges are the
|
|
337
|
+
* page's. `?locale=` is honoured only when it names a translation the article has (the path is resolved without it first), so it cannot fan out requests. An unknown path is a 404, an outage a 502.
|
|
338
|
+
*/
|
|
339
|
+
declare function createOgImageRoute(options: HyleNextOptions): OgImageRoute;
|
|
340
|
+
|
|
295
341
|
interface AssetRouteOptions {
|
|
296
342
|
/** hyle's origin (HYLE_TARGET_BASE_URL). */
|
|
297
343
|
readonly baseUrl: string | undefined;
|
|
@@ -345,9 +391,13 @@ interface HyleListProps {
|
|
|
345
391
|
readonly headingLevel?: EmbedHeading | undefined;
|
|
346
392
|
/** Where "View all" goes, usually the mount's index. Omit to hide it. */
|
|
347
393
|
readonly moreHref?: string | undefined;
|
|
394
|
+
/** Start after this `next_cursor` (a malformed one is ignored). The host reads it from its own `?cursor=`. */
|
|
395
|
+
readonly cursor?: string | undefined;
|
|
396
|
+
/** Builds the "Older posts" href from the list's validated `next_cursor`; called only when there is one. Omit to hide the link. */
|
|
397
|
+
readonly olderHref?: ((nextCursor: string) => string) | undefined;
|
|
348
398
|
}
|
|
349
399
|
/** The newest articles of a section as a list or a grid of links to the mount. Slots: `list.item`, `list.empty`. */
|
|
350
|
-
declare function HyleList({ options, limit, locale, layout, title, headingLevel, moreHref }: HyleListProps): Promise<ReactElement | null>;
|
|
400
|
+
declare function HyleList({ options, limit, locale, layout, title, headingLevel, moreHref, cursor, olderHref }: HyleListProps): Promise<ReactElement | null>;
|
|
351
401
|
interface HyleArticleProps {
|
|
352
402
|
readonly options: HyleNextOptions;
|
|
353
403
|
/** The article's canonical site path, as hyle sends it (`canonical_path`, with the workspace prefix, no locale prefix). */
|
|
@@ -459,4 +509,4 @@ declare const ENGAGE_CSRF_HEADER = "x-hyle-engage";
|
|
|
459
509
|
*/
|
|
460
510
|
declare function createEngagementRoute(options: EngagementRouteOptions): EngagementRoute;
|
|
461
511
|
|
|
462
|
-
export { type AssetRoute, type AssetRouteOptions, ENGAGE_CSRF_HEADER, type EngageReader, type EngagementRoute, type EngagementRouteOptions, FetchResolverOptions, HyleArticle, type HyleArticleProps, HyleComments, type HyleCommentsProps, type HyleFeedOptions, HyleList, type HyleListProps, type HyleNextOptions, HyleResolver, type HyleRootConfig, type HyleRootSitemapOptions, type HyleSitemapOptions, type LlmsTxtOptions, MOUNTS_MAX_STALE_MS, type MarkdownRoute, type PageProps, type RevalidateRouteOptions, type RouteParams, createAssetRoute, createEngagementRoute, createLlmsTxtRoute, createMarkdownRoute, createRevalidateRoute, hyleFeed, hyleMetadata, hylePage, hyleRootMetadata, hyleRootPage, hyleRootSitemap, hyleSitemap, markdownRewritePath };
|
|
512
|
+
export { type AssetRoute, type AssetRouteOptions, ENGAGE_CSRF_HEADER, type EngageReader, type EngagementRoute, type EngagementRouteOptions, FetchResolverOptions, HyleArticle, type HyleArticleProps, HyleComments, type HyleCommentsProps, type HyleFeedOptions, HyleList, type HyleListProps, type HyleNextOptions, HyleResolver, type HyleRootConfig, type HyleRootSitemapOptions, type HyleSitemapOptions, type LlmsTxtOptions, MOUNTS_MAX_STALE_MS, type MarkdownRoute, type OgImageRoute, type PageProps, type RevalidateRouteOptions, type RouteParams, createAssetRoute, createEngagementRoute, createLlmsTxtRoute, createMarkdownRoute, createOgImageRoute, createRevalidateRoute, hyleFeed, hyleFeedLink, hyleMetadata, hylePage, hyleRootMetadata, hyleRootPage, hyleRootSitemap, hyleSitemap, markdownRewritePath };
|