@gradial/aci 0.1.20-preview.3 → 0.1.20
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 +48 -108
- package/bin/{aci → aci-darwin-arm64} +0 -0
- package/bin/aci.js +99 -6
- package/dist/assets/index.d.ts +3 -3
- package/dist/assets/index.js +3 -3
- package/dist/astro/index.d.ts +12 -3
- package/dist/astro/index.js +20 -5
- package/dist/content/assets.d.ts +17 -0
- package/dist/content/assets.js +65 -0
- package/dist/content/index.d.ts +1 -0
- package/dist/content/index.js +1 -0
- package/dist/define-component.d.ts +1 -2
- package/dist/define-component.js +73 -5
- package/dist/dev/content-watch.d.ts +37 -0
- package/dist/dev/content-watch.js +154 -0
- package/dist/dev/index.d.ts +24 -43
- package/dist/dev/index.js +4 -169
- package/dist/index.d.ts +14 -6
- package/dist/index.js +8 -9
- package/dist/next/asset-route.js +2 -2
- package/dist/next/config.d.ts +2 -2
- package/dist/next/config.js +5 -5
- package/dist/next/content-watch.js +6 -1
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +2 -2
- package/dist/next/middleware.d.ts +2 -2
- package/dist/next/middleware.js +6 -6
- package/dist/next/page.d.ts +1 -1
- package/dist/next/page.js +14 -12
- package/dist/next/render.d.ts +3 -3
- package/dist/next/render.js +11 -9
- package/dist/next/server.d.ts +12 -12
- package/dist/next/server.js +1 -1
- package/dist/react/Media.d.ts +24 -0
- package/dist/react/Media.js +30 -0
- package/dist/react/Picture.d.ts +12 -0
- package/dist/react/Picture.js +11 -0
- package/dist/react/VideoPlayer.d.ts +13 -0
- package/dist/react/{GradialVideoPlayer.js → VideoPlayer.js} +6 -5
- package/dist/react/index.d.ts +333 -3
- package/dist/react/index.js +89 -3
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +3 -3
- package/dist/types/block-ref.d.ts +26 -0
- package/dist/types/block-ref.js +28 -0
- package/dist/types/component.d.ts +36 -32
- package/dist/types/config.d.ts +1 -1
- package/dist/types/image.d.ts +33 -20
- package/dist/types/image.js +42 -50
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/link.d.ts +38 -0
- package/dist/types/link.js +58 -0
- package/dist/types/media.d.ts +16 -35
- package/dist/types/media.js +15 -84
- package/dist/types/renderer.d.ts +1 -1
- package/dist/types/rich-text.d.ts +40 -0
- package/dist/types/rich-text.js +39 -0
- package/dist/types/video.d.ts +7 -13
- package/dist/types/video.js +3 -3
- package/package.json +28 -76
- package/src/cli/compile-registry.mjs +120 -63
- package/src/cli/validate-content.mjs +38 -75
- package/src/types/image.ts +79 -60
- package/templates/astro/template/.aci.yaml +27 -0
- package/templates/astro/template/.storybook/main.ts +79 -0
- package/templates/astro/template/.storybook/manager.ts +6 -0
- package/templates/astro/template/.storybook/preview.ts +33 -0
- package/templates/astro/template/astro.config.mjs +37 -0
- package/templates/astro/template/package.json.tmpl +41 -0
- package/templates/astro/template/src/cms/contracts/layouts/index.ts +18 -0
- package/templates/astro/template/src/cms/registry.ts +28 -0
- package/templates/astro/template/src/components/chrome/Footer.astro +107 -0
- package/templates/astro/template/src/components/chrome/Header.astro +94 -0
- package/templates/astro/template/src/components/elements/AtomicBlock.astro +15 -0
- package/templates/astro/template/src/components/elements/AtomicBlocks.astro +16 -0
- package/templates/astro/template/src/components/elements/Button.astro +51 -0
- package/templates/astro/template/src/components/elements/ButtonBlock.astro +25 -0
- package/templates/astro/template/src/components/elements/Container.astro +11 -0
- package/templates/astro/template/src/components/elements/Icon.astro +31 -0
- package/templates/astro/template/src/components/elements/Logo.astro +29 -0
- package/templates/astro/template/src/components/elements/RemoteImage.astro +41 -0
- package/templates/astro/template/src/components/sections/ContainerSection.astro +32 -0
- package/templates/astro/template/src/components/sections/FeatureCard.astro +23 -0
- package/templates/astro/template/src/components/sections/FeatureGrid.astro +35 -0
- package/templates/astro/template/src/components/sections/HomeHero.astro +51 -0
- package/templates/astro/template/src/components/sections/StatsBar.astro +33 -0
- package/templates/astro/template/src/design-system/styles.css +399 -0
- package/templates/astro/template/src/design-system/tokens/colors.css +60 -0
- package/templates/astro/template/src/design-system/tokens/components.css +69 -0
- package/templates/astro/template/src/design-system/tokens/index.css +6 -0
- package/templates/astro/template/src/design-system/tokens/radii.css +5 -0
- package/templates/astro/template/src/design-system/tokens/shadows.css +5 -0
- package/templates/astro/template/src/design-system/tokens/spacing.css +13 -0
- package/templates/astro/template/src/design-system/tokens/typography.css +24 -0
- package/templates/astro/template/src/env.d.ts +1 -0
- package/templates/astro/template/src/fixtures/atomicBlocks.ts +33 -0
- package/templates/astro/template/src/fixtures/composition.ts +31 -0
- package/templates/astro/template/src/fixtures/index.ts +17 -0
- package/templates/astro/template/src/fixtures/sections.ts +39 -0
- package/templates/astro/template/src/layouts/SiteLayout.astro +30 -0
- package/templates/astro/template/src/pages/[...slug].astro +61 -0
- package/templates/astro/template/src/render/RenderPage.astro +66 -0
- package/templates/astro/template/src/stories/CompositionStoryFrame.astro +15 -0
- package/templates/astro/template/src/stories/HomeHero.stories.ts +24 -0
- package/templates/astro/template/src/stories/SectionStoryFrame.astro +16 -0
- package/templates/astro/template/src/stories/StoryDocFrame.astro +31 -0
- package/templates/astro/template/tsconfig.json +11 -0
- package/templates/common/.agents/AGENTS.md +37 -0
- package/templates/common/.agents/skills/aci/SKILL.md +162 -0
- package/templates/common/.agents/skills/authoring/SKILL.md +590 -0
- package/templates/common/.agents/skills/authoring/references/block-registry.md +151 -0
- package/templates/common/.agents/skills/authoring/references/contracts.md +153 -0
- package/templates/common/.agents/skills/authoring/references/design-system.md +171 -0
- package/templates/common/.agents/skills/authoring/references/image-assets.md +73 -0
- package/templates/common/.agents/skills/authoring/references/repo-structure.md +157 -0
- package/templates/common/.agents/skills/migration/SKILL.md +160 -0
- package/templates/common/.agents/skills/migration/references/analyzing-source.md +215 -0
- package/templates/common/.agents/skills/migration/references/component-migration.md +200 -0
- package/templates/common/.agents/skills/migration/references/selector-map.md +31 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/7f/bf/7fbfc7fe230ff12688c496f660119e41d9725c4504d82e310c15665c73c09292 +0 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/a0/f5/a0f506689de9b15a7055f70103a3f02cd3ba105771ae2de6754df2ede1210d3a +0 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/dd/b7/ddb7e9642be08317bcd4b2bd26b58ba8d0d34dd7239e03e684a4f3634fa3845b +0 -0
- package/templates/common/.content/.gradial-dam/blobs/sha256/fb/32/fb3260e8286ea8231ea1c77b9c0be92d6edd9026565731eb14cfdcfd6b1b75b3 +0 -0
- package/templates/common/.content/config/site.json +192 -0
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/asset.json +9 -0
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/editorial.json +14 -0
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/governance.json +23 -0
- package/templates/common/.content/dam/folders/seed/ast_site_about_hero/versions/v0001.json +37 -0
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/asset.json +9 -0
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/editorial.json +14 -0
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/governance.json +23 -0
- package/templates/common/.content/dam/folders/seed/ast_site_home_hero/versions/v0001.json +37 -0
- package/templates/common/.content/fragments/navbar/_index.json +25 -0
- package/templates/common/.content/fragments/site-footer/_index.json +62 -0
- package/templates/common/.content/pages/about/_index.json +51 -0
- package/templates/common/.content/pages/home/_index.json +112 -0
- package/templates/common/.content/schemas/site.schema.json +123 -0
- package/templates/common/README.md.tmpl +45 -0
- package/templates/common/contracts/components/button.contract.ts +19 -0
- package/templates/common/contracts/components/container.contract.ts +19 -0
- package/templates/common/contracts/components/featureCard.contract.ts +15 -0
- package/templates/common/contracts/components/featureGrid.contract.ts +16 -0
- package/templates/common/contracts/components/homeHero.contract.ts +36 -0
- package/templates/common/contracts/components/index.ts +21 -0
- package/templates/common/contracts/components/siteFooter.contract.ts +45 -0
- package/templates/common/contracts/components/siteNavigation.contract.ts +30 -0
- package/templates/common/contracts/components/statsBar.contract.ts +19 -0
- package/templates/common/design-system/styles.css +346 -0
- package/templates/common/design-system/tokens/colors.css +110 -0
- package/templates/common/design-system/tokens/components.css +86 -0
- package/templates/common/design-system/tokens/index.css +6 -0
- package/templates/common/design-system/tokens/radii.css +5 -0
- package/templates/common/design-system/tokens/shadows.css +9 -0
- package/templates/common/design-system/tokens/spacing.css +26 -0
- package/templates/common/design-system/tokens/typography.css +32 -0
- package/templates/common/eslint-rules/no-raw-tailwind-values.js +127 -0
- package/templates/common/public/assets/Dwire-model.png +0 -0
- package/templates/common/public/assets/bare-metal-logo.png +0 -0
- package/templates/common/public/assets/meridian-logo.svg +8 -0
- package/templates/common/public/assets/seattle.avif +0 -0
- package/templates/nextjs/template/.aci.yaml +25 -0
- package/templates/nextjs/template/.storybook/main.ts +13 -0
- package/templates/nextjs/template/.storybook/preview.ts +34 -0
- package/templates/nextjs/template/eslint.config.mjs +36 -0
- package/templates/nextjs/template/next-env.d.ts +6 -0
- package/templates/nextjs/template/next.config.ts +8 -0
- package/templates/nextjs/template/package.json.tmpl +46 -0
- package/templates/nextjs/template/postcss.config.mjs +7 -0
- package/templates/nextjs/template/src/app/[[...slug]]/page.tsx +8 -0
- package/templates/nextjs/template/src/app/gradial/assets/[releaseId]/[...path]/route.ts +31 -0
- package/templates/nextjs/template/src/app/layout.tsx +29 -0
- package/templates/nextjs/template/src/cms/contracts/components/button.contract.ts +19 -0
- package/templates/nextjs/template/src/cms/contracts/components/container.contract.ts +20 -0
- package/templates/nextjs/template/src/cms/contracts/components/homeHero.contract.ts +36 -0
- package/templates/nextjs/template/src/cms/contracts/components/index.ts +15 -0
- package/templates/nextjs/template/src/cms/contracts/components/siteFooter.contract.ts +45 -0
- package/templates/nextjs/template/src/cms/contracts/components/siteNavigation.contract.ts +30 -0
- package/templates/nextjs/template/src/cms/contracts/layouts/index.ts +16 -0
- package/templates/nextjs/template/src/cms/registry.ts +28 -0
- package/templates/nextjs/template/src/components/chrome/Footer.tsx +86 -0
- package/templates/nextjs/template/src/components/chrome/Header.tsx +74 -0
- package/templates/nextjs/template/src/components/elements/AtomicBlock.tsx +13 -0
- package/templates/nextjs/template/src/components/elements/Button.tsx +40 -0
- package/templates/nextjs/template/src/components/elements/ButtonBlock.tsx +18 -0
- package/templates/nextjs/template/src/components/elements/Container.tsx +14 -0
- package/templates/nextjs/template/src/components/elements/Icon.tsx +29 -0
- package/templates/nextjs/template/src/components/elements/Logo.tsx +38 -0
- package/templates/nextjs/template/src/components/sections/ContainerSection.tsx +28 -0
- package/templates/nextjs/template/src/components/sections/FeatureCard.tsx +25 -0
- package/templates/nextjs/template/src/components/sections/FeatureGrid.tsx +36 -0
- package/templates/nextjs/template/src/components/sections/HomeHero.tsx +62 -0
- package/templates/nextjs/template/src/components/sections/StatsBar.tsx +30 -0
- package/templates/nextjs/template/src/middleware.ts +4 -0
- package/templates/nextjs/template/src/stories/Button.stories.tsx +38 -0
- package/templates/nextjs/template/src/stories/Header.stories.tsx +30 -0
- package/templates/nextjs/template/src/stories/HomeHero.stories.tsx +33 -0
- package/templates/nextjs/template/tsconfig.json +23 -0
- package/templates/nextjs/template/vercel.json +6 -0
- package/dist/content/contract.d.ts +0 -83
- package/dist/content/contract.js +0 -104
- package/dist/content/tailwind-validator.d.ts +0 -6
- package/dist/content/tailwind-validator.js +0 -31
- package/dist/content/validation.d.ts +0 -108
- package/dist/content/validation.js +0 -183
- package/dist/react/GradialMedia.d.ts +0 -24
- package/dist/react/GradialMedia.js +0 -31
- package/dist/react/GradialPicture.d.ts +0 -14
- package/dist/react/GradialPicture.js +0 -30
- package/dist/react/GradialVideoPlayer.d.ts +0 -13
- package/dist/sveltekit/index.d.ts +0 -25
- package/dist/sveltekit/index.js +0 -66
- package/dist/sveltekit/preview.d.ts +0 -5
- package/dist/sveltekit/preview.js +0 -33
- package/src/types/component.ts +0 -49
- package/src/types/config.ts +0 -37
- package/src/types/data.ts +0 -47
- package/src/types/index.ts +0 -10
- package/src/types/layout.ts +0 -29
- package/src/types/media.ts +0 -125
- package/src/types/page.ts +0 -47
- package/src/types/render-mode.ts +0 -10
- package/src/types/renderer.ts +0 -83
- package/src/types/video.ts +0 -66
package/dist/next/page.js
CHANGED
|
@@ -10,7 +10,7 @@ import { renderBlocks } from './render.js';
|
|
|
10
10
|
* Usage in `src/app/[[...slug]]/page.tsx`:
|
|
11
11
|
*
|
|
12
12
|
* ```tsx
|
|
13
|
-
* import { createPage } from '@gradial/aci/next
|
|
13
|
+
* import { createPage } from '@gradial/aci/next';
|
|
14
14
|
* import { registry } from '@/cms/registry';
|
|
15
15
|
*
|
|
16
16
|
* const page = createPage(registry);
|
|
@@ -48,20 +48,22 @@ export function createPage(registry, options) {
|
|
|
48
48
|
const route = await routeFromNextParams(params);
|
|
49
49
|
try {
|
|
50
50
|
const input = await getRenderInput(route);
|
|
51
|
-
if (!input.page
|
|
51
|
+
if (!input.page)
|
|
52
52
|
notFound();
|
|
53
53
|
const layout = await getLayout(input.page.layout);
|
|
54
54
|
const resolvedSlots = await resolveSlots(layout, input.page.regions || {}, (id) => getFragment(id));
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
}
|
|
55
|
+
const renderedSlots = await Promise.all(layout.slots.map(async (slot) => {
|
|
56
|
+
const blocks = resolvedSlots[slot.name];
|
|
57
|
+
if (!blocks?.length)
|
|
58
|
+
return null;
|
|
59
|
+
const extraProps = options?.slotProps?.(slot.name, input.page);
|
|
60
|
+
const renderedBlocks = await renderBlocks(blocks, registry, extraProps);
|
|
61
|
+
if (slot.name === 'main') {
|
|
62
|
+
return (_jsx("main", { id: "content-main", children: renderedBlocks }, "main"));
|
|
63
|
+
}
|
|
64
|
+
return (_jsx(Fragment, { children: renderedBlocks }, slot.name));
|
|
65
|
+
}));
|
|
66
|
+
return _jsx(_Fragment, { children: renderedSlots.filter(Boolean) });
|
|
65
67
|
}
|
|
66
68
|
catch (error) {
|
|
67
69
|
if (error instanceof PageNotFoundError)
|
package/dist/next/render.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type { Registry } from '../registry.js';
|
|
3
2
|
import type { KernelPageBlock } from '../content/types.js';
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
3
|
+
import type { Registry } from '../registry.js';
|
|
4
|
+
export declare function renderBlock(block: KernelPageBlock, registry: Registry, extraProps?: Record<string, unknown>): Promise<ReactElement>;
|
|
5
|
+
export declare function renderBlocks(blocks: readonly KernelPageBlock[], registry: Registry, extraProps?: Record<string, unknown>): Promise<ReactElement[]>;
|
package/dist/next/render.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function renderBlock(block, registry, extraProps) {
|
|
3
|
-
const entry = registry.find((r) => r.
|
|
2
|
+
export async function renderBlock(block, registry, extraProps) {
|
|
3
|
+
const entry = registry.find((r) => r.id === block.component);
|
|
4
4
|
if (!entry) {
|
|
5
|
-
|
|
6
|
-
return (_jsxs("div", { className: "mx-auto my-4 max-w-[var(--max-width-container)] rounded-card border-2 border-red-600 bg-red-50 px-5 py-4 font-mono text-sm leading-relaxed text-red-900", children: [_jsx("strong", { children: "Unknown block:" }), " ", _jsx("code", { children: block.component }), _jsx("br", {}), _jsxs("span", { className: "text-red-800 opacity-70", children: ["id: ", block.id] })] }, block.id));
|
|
7
|
-
}
|
|
8
|
-
return null;
|
|
5
|
+
return (_jsxs("div", { className: "mx-auto my-4 max-w-[var(--max-width-container)] rounded-card border-2 border-red-600 bg-red-50 px-5 py-4 font-mono text-sm leading-relaxed text-red-900", children: [_jsx("strong", { children: "Unknown block:" }), " ", _jsx("code", { children: block.component }), _jsx("br", {}), _jsxs("span", { className: "text-red-800 opacity-70", children: ["id: ", block.id] })] }, block.id));
|
|
9
6
|
}
|
|
10
7
|
const Component = entry.component;
|
|
11
|
-
|
|
8
|
+
const hasBlockSlots = !!entry.contract.blockSlots;
|
|
9
|
+
const componentProps = { ...block.props, ...extraProps };
|
|
10
|
+
if (hasBlockSlots) {
|
|
11
|
+
componentProps.renderChildren = (blocks) => renderBlocks(blocks, registry, extraProps);
|
|
12
|
+
}
|
|
13
|
+
return _jsx(Component, { ...componentProps }, block.id);
|
|
12
14
|
}
|
|
13
|
-
export function renderBlocks(blocks, registry, extraProps) {
|
|
14
|
-
return blocks.map((block) => renderBlock(block, registry, extraProps));
|
|
15
|
+
export async function renderBlocks(blocks, registry, extraProps) {
|
|
16
|
+
return Promise.all(blocks.map((block) => renderBlock(block, registry, extraProps)));
|
|
15
17
|
}
|
package/dist/next/server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FragmentNotFoundError, LayoutNotFoundError, PageNotFoundError } from '../content/provider.js';
|
|
2
2
|
import type { RenderInput } from '../content/types.js';
|
|
3
3
|
export { FragmentNotFoundError, PageNotFoundError, LayoutNotFoundError };
|
|
4
|
-
export interface
|
|
4
|
+
export interface FetchConfig {
|
|
5
5
|
siteId?: string;
|
|
6
6
|
bucket?: string;
|
|
7
7
|
keyPrefix?: string;
|
|
@@ -14,7 +14,7 @@ export interface GradialFetchConfig {
|
|
|
14
14
|
edgeConfig?: string;
|
|
15
15
|
deploymentId?: string;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface ServerRenderInput<TPage, TSite extends SiteConfig = SiteConfig> {
|
|
18
18
|
route: string;
|
|
19
19
|
domain: string;
|
|
20
20
|
locale: string;
|
|
@@ -22,16 +22,16 @@ export interface GradialRenderInput<TPage, TSite extends GradialSiteConfig = Gra
|
|
|
22
22
|
page: TPage;
|
|
23
23
|
fragments?: Record<string, unknown>;
|
|
24
24
|
}
|
|
25
|
-
export interface
|
|
25
|
+
export interface SiteConfig {
|
|
26
26
|
domain?: string;
|
|
27
27
|
defaultLocale?: string;
|
|
28
28
|
}
|
|
29
|
-
export declare function getPage<T = unknown>(route?: string, config?:
|
|
30
|
-
export declare function getSiteConfig<T extends
|
|
31
|
-
export declare function getFragment<T = unknown>(name: string, config?:
|
|
32
|
-
export declare function getLayout<T = unknown>(name: string, config?:
|
|
33
|
-
export declare function getRoutes(config?:
|
|
34
|
-
export declare function getRenderInput<TPage, TSite extends
|
|
29
|
+
export declare function getPage<T = unknown>(route?: string, config?: FetchConfig): Promise<T>;
|
|
30
|
+
export declare function getSiteConfig<T extends SiteConfig = SiteConfig>(config?: FetchConfig): Promise<T>;
|
|
31
|
+
export declare function getFragment<T = unknown>(name: string, config?: FetchConfig): Promise<T>;
|
|
32
|
+
export declare function getLayout<T = unknown>(name: string, config?: FetchConfig): Promise<T>;
|
|
33
|
+
export declare function getRoutes(config?: FetchConfig): Promise<string[]>;
|
|
34
|
+
export declare function getRenderInput<TPage, TSite extends SiteConfig = SiteConfig>(route?: string, config?: FetchConfig): Promise<ServerRenderInput<TPage, TSite>>;
|
|
35
35
|
export declare function getPageRuntimeRenderInput(): Promise<RenderInput | null>;
|
|
36
36
|
export { isPreviewMode } from './preview-mode.js';
|
|
37
37
|
export declare function routeFromNextParams(params?: Promise<{
|
|
@@ -39,11 +39,11 @@ export declare function routeFromNextParams(params?: Promise<{
|
|
|
39
39
|
}> | {
|
|
40
40
|
slug?: string[];
|
|
41
41
|
}): Promise<string>;
|
|
42
|
-
export declare function
|
|
42
|
+
export declare function generateStaticParams(): Promise<Array<{
|
|
43
43
|
slug?: string[];
|
|
44
44
|
}>>;
|
|
45
45
|
export declare class ReleaseAssetNotFoundError extends Error {
|
|
46
46
|
constructor(releaseId: string, assetPath: string, cause?: unknown);
|
|
47
47
|
}
|
|
48
|
-
export declare function getReleaseAssetResponse(releaseId: string, assetPath: string, config?:
|
|
49
|
-
export declare function resolveReleaseId(config?:
|
|
48
|
+
export declare function getReleaseAssetResponse(releaseId: string, assetPath: string, config?: FetchConfig): Promise<Response>;
|
|
49
|
+
export declare function resolveReleaseId(config?: FetchConfig): Promise<string>;
|
package/dist/next/server.js
CHANGED
|
@@ -84,7 +84,7 @@ export async function routeFromNextParams(params) {
|
|
|
84
84
|
return '/';
|
|
85
85
|
return `/${resolved.slug.join('/')}/`;
|
|
86
86
|
}
|
|
87
|
-
export async function
|
|
87
|
+
export async function generateStaticParams() {
|
|
88
88
|
const { FileContentProvider } = await import('../providers/file.js');
|
|
89
89
|
const provider = new FileContentProvider();
|
|
90
90
|
const routes = await provider.listRoutes();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CSSProperties, type ImgHTMLAttributes, type VideoHTMLAttributes } from 'react';
|
|
2
|
+
import type { Asset } from '../types/media.js';
|
|
3
|
+
export interface MediaProps {
|
|
4
|
+
/** The compiler-resolved media to render. */
|
|
5
|
+
media: Asset;
|
|
6
|
+
/** CSS class applied to the rendered element. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Inline styles applied to the rendered element. */
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
/** Loading strategy for images. Defaults to 'lazy'. */
|
|
11
|
+
loading?: 'eager' | 'lazy';
|
|
12
|
+
/** Additional image attributes (only applied when media is an image). */
|
|
13
|
+
imgProps?: Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt'>;
|
|
14
|
+
/** Additional video attributes (only applied when media is a video). */
|
|
15
|
+
videoProps?: Omit<VideoHTMLAttributes<HTMLVideoElement>, 'src' | 'poster' | 'width' | 'height'>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Polymorphic media component — renders an Image or Video as the appropriate
|
|
19
|
+
* HTML element based on $type.
|
|
20
|
+
*
|
|
21
|
+
* - gradial.image → <img> with srcset via Picture
|
|
22
|
+
* - gradial.video → <video> via VideoPlayer
|
|
23
|
+
*/
|
|
24
|
+
export declare function Media({ media, className, style, loading, imgProps, videoProps, }: MediaProps): import("react").FunctionComponentElement<import("./VideoPlayer.js").VideoPlayerProps> | import("react").FunctionComponentElement<import("./Picture.js").PictureProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { Picture } from './Picture.js';
|
|
3
|
+
import { VideoPlayer } from './VideoPlayer.js';
|
|
4
|
+
/**
|
|
5
|
+
* Polymorphic media component — renders an Image or Video as the appropriate
|
|
6
|
+
* HTML element based on $type.
|
|
7
|
+
*
|
|
8
|
+
* - gradial.image → <img> with srcset via Picture
|
|
9
|
+
* - gradial.video → <video> via VideoPlayer
|
|
10
|
+
*/
|
|
11
|
+
export function Media({ media, className, style, loading = 'lazy', imgProps, videoProps, }) {
|
|
12
|
+
switch (media.$type) {
|
|
13
|
+
case 'gradial.video':
|
|
14
|
+
return createElement(VideoPlayer, {
|
|
15
|
+
video: media,
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
...videoProps,
|
|
19
|
+
});
|
|
20
|
+
case 'gradial.image':
|
|
21
|
+
default:
|
|
22
|
+
return createElement(Picture, {
|
|
23
|
+
image: media,
|
|
24
|
+
className,
|
|
25
|
+
style,
|
|
26
|
+
loading,
|
|
27
|
+
...imgProps,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ImgHTMLAttributes } from 'react';
|
|
2
|
+
import { type Image } from '../types/image.js';
|
|
3
|
+
export interface PictureProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'width' | 'height'> {
|
|
4
|
+
image: Image;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Renders an Image as a responsive <img> element.
|
|
8
|
+
*
|
|
9
|
+
* Delegates attribute computation to the shared `imageAttrs()` pure function
|
|
10
|
+
* so React, Astro, and Svelte all produce identical output.
|
|
11
|
+
*/
|
|
12
|
+
export declare function Picture({ image, ...attrs }: PictureProps): import("react").DetailedReactHTMLElement<import("../types/image.js").ImageAttrs, HTMLElement>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { imageAttrs } from '../types/image.js';
|
|
3
|
+
/**
|
|
4
|
+
* Renders an Image as a responsive <img> element.
|
|
5
|
+
*
|
|
6
|
+
* Delegates attribute computation to the shared `imageAttrs()` pure function
|
|
7
|
+
* so React, Astro, and Svelte all produce identical output.
|
|
8
|
+
*/
|
|
9
|
+
export function Picture({ image, ...attrs }) {
|
|
10
|
+
return createElement('img', imageAttrs(image, attrs));
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VideoHTMLAttributes } from 'react';
|
|
2
|
+
import type { Video } from '../types/video.js';
|
|
3
|
+
export interface VideoPlayerProps extends Omit<VideoHTMLAttributes<HTMLVideoElement>, 'src' | 'poster' | 'width' | 'height'> {
|
|
4
|
+
video: Video;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Renders a Video as a <video> element.
|
|
8
|
+
*
|
|
9
|
+
* - Uses the primary source from poster for the poster attribute.
|
|
10
|
+
* - Includes <source> elements for format variants when available.
|
|
11
|
+
* - Uses the src attribute on <video> when no source variants exist.
|
|
12
|
+
*/
|
|
13
|
+
export declare function VideoPlayer({ video, ...attrs }: VideoPlayerProps): import("react").DetailedReactHTMLElement<Record<string, unknown>, HTMLElement>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
+
import { primaryImageSource } from '../types/image.js';
|
|
2
3
|
/**
|
|
3
|
-
* Renders a
|
|
4
|
+
* Renders a Video as a <video> element.
|
|
4
5
|
*
|
|
5
|
-
* - Uses poster
|
|
6
|
+
* - Uses the primary source from poster for the poster attribute.
|
|
6
7
|
* - Includes <source> elements for format variants when available.
|
|
7
|
-
* -
|
|
8
|
+
* - Uses the src attribute on <video> when no source variants exist.
|
|
8
9
|
*/
|
|
9
|
-
export function
|
|
10
|
-
const posterSrc = video.poster
|
|
10
|
+
export function VideoPlayer({ video, ...attrs }) {
|
|
11
|
+
const posterSrc = video.poster ? primaryImageSource(video.poster).src : undefined;
|
|
11
12
|
const hasSources = video.sources && video.sources.length > 0;
|
|
12
13
|
const videoAttrs = {
|
|
13
14
|
poster: posterSrc,
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,3 +1,333 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { type ImgHTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type Image as ImageData } from '../types/image.js';
|
|
3
|
+
import { type Link as LinkData } from '../types/link.js';
|
|
4
|
+
import type { Heading as HeadingData, RichTextValue } from '../types/rich-text.js';
|
|
5
|
+
import type { BlockRef } from '../types/block-ref.js';
|
|
6
|
+
export { Picture, type PictureProps } from './Picture.js';
|
|
7
|
+
export { Media, type MediaProps } from './Media.js';
|
|
8
|
+
export { VideoPlayer, type VideoPlayerProps } from './VideoPlayer.js';
|
|
9
|
+
export type RenderChildren<T extends readonly BlockRef[]> = (blocks: T) => Promise<ReactElement[]>;
|
|
10
|
+
export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt'> {
|
|
11
|
+
image?: ImageData;
|
|
12
|
+
value?: ImageData;
|
|
13
|
+
}
|
|
14
|
+
export declare function Image({ image, value, ...attrs }: ImageProps): import("react").DetailedReactHTMLElement<import("../types/image.js").ImageAttrs, HTMLElement> | import("react").DetailedReactHTMLElement<{
|
|
15
|
+
prefix?: string | undefined | undefined;
|
|
16
|
+
id?: string | undefined | undefined;
|
|
17
|
+
width?: number | string | undefined | undefined;
|
|
18
|
+
height?: number | string | undefined | undefined;
|
|
19
|
+
srcSet?: string | undefined | undefined;
|
|
20
|
+
sizes?: string | undefined | undefined;
|
|
21
|
+
loading?: "eager" | "lazy" | undefined | undefined;
|
|
22
|
+
decoding?: "async" | "auto" | "sync" | undefined | undefined;
|
|
23
|
+
title?: string | undefined | undefined;
|
|
24
|
+
rel?: string | undefined | undefined;
|
|
25
|
+
content?: string | undefined | undefined;
|
|
26
|
+
dir?: string | undefined | undefined;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
className?: string | undefined | undefined;
|
|
29
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
30
|
+
fetchPriority?: "high" | "low" | "auto" | undefined | undefined;
|
|
31
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
32
|
+
useMap?: string | undefined | undefined;
|
|
33
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
34
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
35
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
36
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
37
|
+
accessKey?: string | undefined | undefined;
|
|
38
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
39
|
+
autoFocus?: boolean | undefined | undefined;
|
|
40
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
41
|
+
contextMenu?: string | undefined | undefined;
|
|
42
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
43
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
44
|
+
hidden?: boolean | undefined | undefined;
|
|
45
|
+
lang?: string | undefined | undefined;
|
|
46
|
+
nonce?: string | undefined | undefined;
|
|
47
|
+
slot?: string | undefined | undefined;
|
|
48
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
49
|
+
style?: import("react").CSSProperties | undefined;
|
|
50
|
+
tabIndex?: number | undefined | undefined;
|
|
51
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
52
|
+
radioGroup?: string | undefined | undefined;
|
|
53
|
+
role?: import("react").AriaRole | undefined;
|
|
54
|
+
about?: string | undefined | undefined;
|
|
55
|
+
datatype?: string | undefined | undefined;
|
|
56
|
+
inlist?: any;
|
|
57
|
+
property?: string | undefined | undefined;
|
|
58
|
+
resource?: string | undefined | undefined;
|
|
59
|
+
rev?: string | undefined | undefined;
|
|
60
|
+
typeof?: string | undefined | undefined;
|
|
61
|
+
vocab?: string | undefined | undefined;
|
|
62
|
+
autoCorrect?: string | undefined | undefined;
|
|
63
|
+
autoSave?: string | undefined | undefined;
|
|
64
|
+
color?: string | undefined | undefined;
|
|
65
|
+
itemProp?: string | undefined | undefined;
|
|
66
|
+
itemScope?: boolean | undefined | undefined;
|
|
67
|
+
itemType?: string | undefined | undefined;
|
|
68
|
+
itemID?: string | undefined | undefined;
|
|
69
|
+
itemRef?: string | undefined | undefined;
|
|
70
|
+
results?: number | undefined | undefined;
|
|
71
|
+
security?: string | undefined | undefined;
|
|
72
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
73
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
74
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
75
|
+
popoverTarget?: string | undefined | undefined;
|
|
76
|
+
inert?: boolean | undefined | undefined;
|
|
77
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
78
|
+
is?: string | undefined | undefined;
|
|
79
|
+
exportparts?: string | undefined | undefined;
|
|
80
|
+
part?: string | undefined | undefined;
|
|
81
|
+
tw?: string | undefined;
|
|
82
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
83
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
84
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
85
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
86
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
87
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
89
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
90
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
91
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
92
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
93
|
+
"aria-controls"?: string | undefined | undefined;
|
|
94
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
95
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
96
|
+
"aria-description"?: string | undefined | undefined;
|
|
97
|
+
"aria-details"?: string | undefined | undefined;
|
|
98
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
100
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
101
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
102
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
103
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
104
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
105
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
106
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
107
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
108
|
+
"aria-label"?: string | undefined | undefined;
|
|
109
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
110
|
+
"aria-level"?: number | undefined | undefined;
|
|
111
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
112
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
113
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
114
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
115
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
116
|
+
"aria-owns"?: string | undefined | undefined;
|
|
117
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
118
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
119
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
120
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
121
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
122
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
123
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
124
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
125
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
126
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
127
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
128
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
129
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
130
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
131
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
132
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
133
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
134
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
135
|
+
dangerouslySetInnerHTML?: {
|
|
136
|
+
__html: string | TrustedHTML;
|
|
137
|
+
} | undefined | undefined;
|
|
138
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLImageElement> | undefined;
|
|
139
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLImageElement> | undefined;
|
|
140
|
+
onCut?: import("react").ClipboardEventHandler<HTMLImageElement> | undefined;
|
|
141
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLImageElement> | undefined;
|
|
142
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLImageElement> | undefined;
|
|
143
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLImageElement> | undefined;
|
|
144
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLImageElement> | undefined;
|
|
145
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLImageElement> | undefined;
|
|
146
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLImageElement> | undefined;
|
|
147
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLImageElement> | undefined;
|
|
148
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLImageElement> | undefined;
|
|
149
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLImageElement> | undefined;
|
|
150
|
+
onFocus?: import("react").FocusEventHandler<HTMLImageElement> | undefined;
|
|
151
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLImageElement> | undefined;
|
|
152
|
+
onBlur?: import("react").FocusEventHandler<HTMLImageElement> | undefined;
|
|
153
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLImageElement> | undefined;
|
|
154
|
+
onChange?: import("react").ChangeEventHandler<HTMLImageElement, Element> | undefined;
|
|
155
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLImageElement, Element> | undefined;
|
|
156
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLImageElement> | undefined;
|
|
157
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLImageElement> | undefined;
|
|
158
|
+
onInput?: import("react").InputEventHandler<HTMLImageElement> | undefined;
|
|
159
|
+
onInputCapture?: import("react").InputEventHandler<HTMLImageElement> | undefined;
|
|
160
|
+
onReset?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
161
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
162
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLImageElement> | undefined;
|
|
163
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLImageElement> | undefined;
|
|
164
|
+
onInvalid?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
165
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
166
|
+
onLoad?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
167
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
168
|
+
onError?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
169
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
170
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLImageElement> | undefined;
|
|
171
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLImageElement> | undefined;
|
|
172
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLImageElement> | undefined;
|
|
173
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLImageElement> | undefined;
|
|
174
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLImageElement> | undefined;
|
|
175
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLImageElement> | undefined;
|
|
176
|
+
onAbort?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
177
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
178
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
179
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
180
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
181
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
182
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
183
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
184
|
+
onEmptied?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
185
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
186
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
187
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
188
|
+
onEnded?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
189
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
190
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
191
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
192
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
193
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
194
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
195
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
196
|
+
onPause?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
197
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
198
|
+
onPlay?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
199
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
200
|
+
onPlaying?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
201
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
202
|
+
onProgress?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
203
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
204
|
+
onRateChange?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
205
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
206
|
+
onSeeked?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
207
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
208
|
+
onSeeking?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
209
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
210
|
+
onStalled?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
211
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
212
|
+
onSuspend?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
213
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
214
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
215
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
216
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
217
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
218
|
+
onWaiting?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
219
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
220
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
221
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
222
|
+
onClick?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
223
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
224
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
225
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
226
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
227
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
228
|
+
onDrag?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
229
|
+
onDragCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
230
|
+
onDragEnd?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
231
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
232
|
+
onDragEnter?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
233
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
234
|
+
onDragExit?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
235
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
236
|
+
onDragLeave?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
237
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
238
|
+
onDragOver?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
239
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
240
|
+
onDragStart?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
241
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
242
|
+
onDrop?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
243
|
+
onDropCapture?: import("react").DragEventHandler<HTMLImageElement> | undefined;
|
|
244
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
245
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
246
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
247
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
248
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
249
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
250
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
251
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
252
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
253
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
254
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
255
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLImageElement> | undefined;
|
|
256
|
+
onSelect?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
257
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLImageElement> | undefined;
|
|
258
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
259
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
260
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
261
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
262
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
263
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
264
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
265
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLImageElement> | undefined;
|
|
266
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
267
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
268
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
269
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
270
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
271
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
272
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
273
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
274
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
275
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
276
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
277
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
278
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
279
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
280
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
281
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
282
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
283
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLImageElement> | undefined;
|
|
284
|
+
onScroll?: import("react").UIEventHandler<HTMLImageElement> | undefined;
|
|
285
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLImageElement> | undefined;
|
|
286
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLImageElement> | undefined;
|
|
287
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLImageElement> | undefined;
|
|
288
|
+
onWheel?: import("react").WheelEventHandler<HTMLImageElement> | undefined;
|
|
289
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLImageElement> | undefined;
|
|
290
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
291
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
292
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
293
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
294
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
295
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
296
|
+
onToggle?: import("react").ToggleEventHandler<HTMLImageElement> | undefined;
|
|
297
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLImageElement> | undefined;
|
|
298
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
299
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
300
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
301
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
302
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
303
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
304
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
305
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
306
|
+
src: string;
|
|
307
|
+
alt: string;
|
|
308
|
+
}, HTMLElement>;
|
|
309
|
+
export interface LinkProps {
|
|
310
|
+
link: LinkData;
|
|
311
|
+
resolveLink?: (link: LinkData) => string | Promise<string>;
|
|
312
|
+
children?: ReactNode;
|
|
313
|
+
}
|
|
314
|
+
export declare function Link({ link, resolveLink, children }: LinkProps): import("react").DetailedReactHTMLElement<{
|
|
315
|
+
href: string | Promise<string>;
|
|
316
|
+
target: import("../types/link.js").LinkTarget | undefined;
|
|
317
|
+
rel: string | undefined;
|
|
318
|
+
title: string | undefined;
|
|
319
|
+
}, HTMLElement>;
|
|
320
|
+
export interface HeadingProps {
|
|
321
|
+
heading?: HeadingData;
|
|
322
|
+
value?: HeadingData;
|
|
323
|
+
}
|
|
324
|
+
export declare function Heading({ heading, value }: HeadingProps): import("react").DetailedReactHTMLElement<import("react").HTMLAttributes<HTMLElement>, HTMLElement> | null;
|
|
325
|
+
export declare function headingPlainText(value: HeadingData): string;
|
|
326
|
+
export interface RichTextProps {
|
|
327
|
+
value: RichTextValue | string;
|
|
328
|
+
}
|
|
329
|
+
export declare function RichText({ value }: RichTextProps): import("react").DetailedReactHTMLElement<{
|
|
330
|
+
dangerouslySetInnerHTML: {
|
|
331
|
+
__html: string;
|
|
332
|
+
};
|
|
333
|
+
}, HTMLElement>;
|