mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
Ref https://github.com/webstudio-is/webstudio/issues/3632 Remix client routing should still work even if we go full html. Here added tag overrides to component generator so sdk could pass component replacements for some tags like - body -> Body - a -> Link - form -> RemixForm See example here https://github.com/webstudio-is/webstudio/pull/5210/files#diff-f2df0aea6543a33e57d770ff1791da886ab3dfd6dec37da4a41a611b9b13a19aR6
20 lines
676 B
TypeScript
20 lines
676 B
TypeScript
import type { WsComponentMeta } from "@webstudio-is/sdk";
|
|
|
|
type FrameworkTemplateEntry = {
|
|
file: string;
|
|
template: string;
|
|
};
|
|
|
|
export type Framework = {
|
|
// instance.component: WsComponentMeta
|
|
metas: Record<string, WsComponentMeta>;
|
|
// instance.component: "importSource:importSpecifier"
|
|
components: Record<string, string>;
|
|
// instance.tag: "importSource:importSpecifier"
|
|
tags: Record<string, string>;
|
|
html: (params: { pagePath: string }) => FrameworkTemplateEntry[];
|
|
xml: (params: { pagePath: string }) => FrameworkTemplateEntry[];
|
|
redirect: (params: { pagePath: string }) => FrameworkTemplateEntry[];
|
|
defaultSitemap: () => FrameworkTemplateEntry[];
|
|
};
|