/** * Post-clone renaming of the canonical template (#301): the steps the * template README ("Inicio RĂ¡pido") asks for after cloning, applied with the * project name as the single identifier: * * - `name` and `version` in package.json, widget.manifest.json and the root * of package-lock.json (`template` in the manifest is kept: it records the * template the widget came from and picks the validator profile); * - the mount name: `WIDGET_NAME` in src/app/main.tsx, `id`/`data-widget` in * index.html, and the `data-widget` the template's own mount test uses; * - the CSS class prefix in index.html, src/styles/base.scss and the * `selector-class-pattern` of .stylelintrc; * - `MODYO_WIDGET_NAME` in .modyo.example and .env.example. * * Every replacement is exact and bounded to a known key or literal of the * pinned template. A missing literal means the template changed: the * rename fails instead of leaving a half-renamed widget. Pure functions over * file contents, so they are tested against the real files of the tag. */ export declare const TEMPLATE_PACKAGE_NAME = "@dynamic-framework/dynamic-react-vite-base-template"; /** Version every new widget starts at. */ export declare const INITIAL_WIDGET_VERSION = "0.1.0"; /** Template identifiers that must not survive the rename. */ export declare const TEMPLATE_IDENTIFIERS: readonly ["widgetName", "widget-name", "my-widget-name", "@dynamic-framework/dynamic-react-vite-base-template"]; /** A literal (or JSON key) of the pinned template that was not found. */ export declare class TemplateMismatchError extends Error { readonly file: string; readonly literal: string; constructor(file: string, literal: string, detail: string); } type Rename = (content: string, name: string) => string; /** * Files the scaffold renames, in the order they are reported in * `renamedFiles`, with the replacement for each. */ export declare const RENAME_STEPS: ReadonlyArray<{ file: string; rename: Rename; }>; /** * Post-condition: template identifiers left in a renamed file. The * manifest's `template` field is exempt by design. * * An occurrence that lies entirely inside an occurrence of the requested * `name` is part of the renamed value, not a leftover: a valid name may * contain a placeholder (`widget-name-editor`, `my-widget-name`, even * `widget-name` itself). A placeholder that only overlaps the name, like * `my-widget-name` left untouched for `my-widget`, still counts. */ export declare function leftoverIdentifiers(file: string, content: string, name: string): string[]; export {}; //# sourceMappingURL=_scaffoldRename.d.ts.map