Migrate from a prerelease to 1.0
Goal: a project written for a 0.x prerelease of Récit compiles, validates and builds with
Récit 1.0, without a key, an option or an import that 1.0 refuses.
It follows the Stability page, which says what 1.0 keeps. It
lists every change a 0.x project may have to make, taken from the « Migration » sections of the
release notes. recit migrate performs some of them; each other step says it is manual.
Before you start
- Commit your project, or copy it:
recit migraterewrites files in place. - Install the 1.0 packages (
recit,@recit/cliand the others your project lists) and Node.js 22.22 or later. - List your story files: the Markdown stories (
.md,.mdx), their JSON twins (kind:) and their sidecars ("story" kind:)."sidecar" recit migrateandrecit validatetake files, not a folder.
1. See what recit migrate would change
Bash
Nothing is written. For each file, the report says nothing to migrate, or lists every change it
would make, one line each (pdf.). A file written for a newer schema
than your Récit reads, or one that cannot be read, is an error: the command goes on with the other
files and exits with 1. Add --json for a machine-readable report.
2. Run recit migrate
Bash
The same report, and the files are written. A file that needs no change is left untouched. These are
all the rewrites recit migrate performs, in the front matter of a Markdown story and in a JSON
twin or sidecar (its settings, and its format and $schema when they name the former toon
id):
| Before (front matter) | After (front matter) | Before (JSON) | After (JSON) |
|---|---|---|---|
pdf.theme | pdf. | /settings/ | /settings/ |
theme. | colorMode | /settings/ | /settings/ |
format: toon | format: | /format: "toon" | /format: "webtoon" |
$schema …/ | $schema …/ | /$schema …/ | /$schema …/ |
A value already written under the new name wins over the old one, and the old key is removed. The
schema version stays v1: every 0.x story is a v1 story, and recit migrate would chain the
steps to a later version once one exists.
Manual: in a story, a mode written in place of a theme is not rewritten. In front matter,
theme: dark still works in 0.x and warns; 1.0.0-rc.0 removes it: write colorMode:. In a
JSON twin, "theme": in settings is refused: write "colorMode":.
3. Validate the stories
Bash
It reads the recit. of the project (or the one -c, --config names): a config that still
writes a 0.x key fails with Invalid recit config, one line per refused key with its new name. Fix
them in step 4, then run recit validate again until it prints no error.
4. Fix recit.config.ts (manual)
recit migrate does not touch the configuration: a recit. is code. Each key below is
refused by 1.0 with a message that names its replacement.
| 0.x key | In 1.0 |
|---|---|
theme: | colorMode:, beside theme: |
pdf: (any section) | pdf: |
slides: | merged into deck: (slides. → deck.) |
publish. | publish. |
publish. | publish. |
stories.dir and the other site keys | publish.dir, publish.* |
stories. and the other format keys | webstory., webstory.* |
deck.files | removed: it chose no file, delete it (0.x ignores it with a warning, 1.0.0-rc.0 refuses it) |
5. Rename the CLI options in your scripts (manual)
| 0.x | In 1.0 |
|---|---|
recit export -- | recit export -- |
--out <dir> (render, prompts build, skills export, form schema) | -o, --; in 0.x the last three still read --out, with a warning, and 1.0.0-rc.0 removes it |
recit render --, engine: | removed: drop it; the frames engine draws the same pixels with Chromium and an ffmpeg with libx264 (RECIT_FFMPEG) |
A tool that parsed the output of recit validate, recit convert -- or the MCP tool
validate_ reads the one diagnostic format now: ✖ <file>:.
6. Use the words of 1.0
The vocabulary settled during 0.x (glossary). Where a name
was in a file you write, it changed with the word:
- webstory: the format of full-screen
9:16cards wasstories. Writeformat:,webstory --to webstory,recit init --, theformat webstory webstory:section of the config, and the package@recit/(waswebstory @recit/). Manual.stories - webtoon: the format of vertical strips was
toon. Writeformat:(front matter, twin andwebtoon series.json),recit init --andformat webtoon recit schema webtoon, thewebtoon:section of the config, the MCP guiderecit://and the packageguide/ webtoon @recit/(webtoon @recit/toonwas never released). Every old spelling is still read aswebtoonwith adeprecated-warning until 1.0.format- id recit migraterewritesformat: toonin the stories (and a twin's$schemathat namesschema/, a file 1.0 no longer publishes); thev1/ toon.json toon:section of the config, the CLI option and the MCP address are renamed by hand. The public namesToonSourceSchema,TOON_,SHAPE_ PATHS TOON_and theTAIL_ PATH Toon…types of@recit/corekeep a@deprecatedalias of the same name inWebtoon…. - film: what the motion format renders,
film.json,--to film, and the MCP toolsbuild_filmandvalidate_. A deck is the slide format and nothing else.film - scene: the unit of every format. The types say so (step 8):
SceneConfig, notSlideMetadata. - colorMode:
light,darkorsystem, never a theme. A theme is a named set of tokens (warm-). This is the renameeditorial recit migrateperforms in step 2 and you perform in the config in step 4.
7. Update your styles (manual)
- Dark mode is one attribute,
data-onmantine- color- scheme= "dark" <html>. Atheme., a site'scustomCss styles.cssor a component module that wrote.dark …or:global(.writesdark) … [data-ormantine- color- scheme= "dark"] … light-dark()instead. - A deck carries no Tailwind utilities. A utility class (
flex,gap-4…) in a component or a slide, or@applyintheme., becomes CSS incustomCss customCssor in a*.module.cssnext to the component, whichrecit buildbundles.@recit/is removed;theme/ tailwind.css @recit/is the reset every deck is drawn on.theme/ reset.css
8. Update your imports (manual)
Only code that imports Récit's packages needs this step. TypeScript names each missing import.
Renamed
| 0.x name | In 1.0 |
|---|---|
SlideMetadata (@recit/core) | SceneConfig |
SlideDensityReport | SceneDensityReport |
DeckDensitySummary | StoryDensitySummary |
GlobalDeckMetadata | StoryFrontmatter |
ParsedDeckDocument | ParsedStoryDocument |
SlidesConfigSchema, SlidesConfig | DeckConfigSchema, DeckConfig |
resolveDeckConfig | resolveStoryConfig |
getLoadedDecks (@recit/) | getLoadedStories |
getLocaleDecks | getLocaleStories |
findDeck | findStory |
LoadedDeck | LoadedStory |
DeckSummary | StorySummaryEntry |
DeckThumbnail | StoryThumbnail |
StorySource | StoryEntry |
toHslTriplet (@recit/core) | toHslTriplet of @recit/theme |
recit/config exports the names of @recit/ and defineConfig. The names of the site
plugin it used to export (companionViteConfig, LANGUAGE_,
RECIT_, RecitSiteConfig, recitSitePlugin, RecitSitePlugin,
siteIntegration, toVitePluginOptions and withLanguageSwitcher) come from
@recit/.
Removed from the public entries
Internal functions left the package entries before 1.0. None has a public replacement: copy the
function into your project, or ask for it back in an issue. Types, zod schemas and data constants
stay public, and so do the commands that used them (recit build, dev, convert, validate,
i18n, schema…).
@recit/core:accessibilityToDiagnostics,applyStrings,atlasCodec,atlasSettingsFields,backgroundLayer(buildThemeCsswrites the layer),bookCodec,bookSettingsFields,calendarCodec,calendarSettingsFields,checkAtlasSource,checkBookSource,checkDirectorySource,checkEntries,checkGlossarySource,checkSlideLayoutImage,commonEntryFields,commonEntryPairs,createUiStrings,ctaLines,deprecatedDiagnostic,directoryCodec,directorySettingsFields,entryFields,entryLineDiagnostics,entrySceneAttributes,entrySceneFields,estimateSpeechDuration,extractEsmLines,firstDifference,formatAtlasDuration,formatCta,formatPackage,frontmatterProblems,glossaryCodec,glossarySettingsFields,hashString,hasUiPack,hoistMdxPreamble,isRRuleGrammar,isSlideAspectRatio,isValidIsbn13,isValidLocalDateTime,isValidPlainDate,isValidQuarter,joinList,jsonSchemaStability,letteringToMarkdown,matchSlideSeparator,parseAtlasCamera,parseAtlasCenter,parseAtlasDuration,parseAtlasLayer,parseDirectorySection,parseGeo,parseGlossarySection,parseInlineConfig,parseInlineConfigWithDiagnostics,parseRoadmapLane,parseSceneDirectiveComment,pixelRecipeSize(the mask rowsPIXEL_andMASK_ PRESETS pixelMaskRowsstay),reportCodec,reportSettingsFields,resolveAspectRatioDimensions,resolveDensityLimits,resolveStoryPdfOptions,resolveUiLocale,roadmapSettingsFields,sceneAttributes,splitAtlasBody,splitCta,splitEventTitle,splitList,spriteCell,spriteFrameAt,spriteProblems,toonCodec,toonSceneDiagnostics,trimEmptyLines,unknownFormatMessage,unknownKindMessage,unknownSourceIssue,unknownTokens,webstoryCodec,webstorySettingsFields. To read or validate a story,compileStory,validateStoryText,safeValidateStorySourceand the schemas of@recit/stay public.core/ schema @recit/:components createPixelRandom,fitFontSize,glossaryListToHast,normalizeGridCols,pixelCellScale,pixelTokenVariable,plainSummary,readTermDirective,referencedTerms,spriteDirective,spritePicture,spriteToHast,syntheticSpriteSheet,termIdOf,termToHast,tokenToColor,unknownTermMessage,waitForFonts.@recit/deck:applyStepVisibility,aspectOf,asSyncMessage,computeFitScale,computeStageScale,deckChannelName,isFooterVisible,nextPosition,parseDeckMode,parseProps,parseSlideIndex,parseStepIndex,parseSyncMessage,prevPosition,resolveSlideComponent,selectCodeTab,updateSlideUrl,variantsFor,wrapSlideIndex. ThePresentationcomponent and its props stay the entry of a deck.@recit/:motion attrPropValue,buildSprite,buildTextCard,Checkbox,Chip,composeStyle,cubicBezier,lintFilmGlyphs,ListRow,Sparkle,stateAt,statesDuration,stepEnd,stepSpec,stepStyleAt,suspiciousGlyphs,transcriptTimestamp,uiSceneDuration,vttTimestamp.@recit/:motion- blocks blockAnimationEnd,chapterTimeline,clampTime,clockAfterToggle,clockAtEnd,clockAtStart,compareBarsTimeline,filmBlockTypes,layoutFor,listTimeline,panelTimelineFor,panelTravel,pixelFrameAt,pixelRowsAt,pixelTimelineFor,sceneStartTime,spriteMsAt,spriteTimeline,statementTimeline,statTimeline,textcardTimelineFor,titleTimeline,uiMockTimeline,uiSceneTimeline,uiSceneTimelineFor,watchReducedMotion.@recit/cli:buildApp,checkLink,checkLinks,checkTranslations,convertFile,devApp,extractDeck,extractTranslations,findStories,iconApp,jsonSchemaFor,loadAppSite,loadI18n,loadPreviewFormat,mobileApp,motionDuration,previewApp,renderDeckPage,startMotionDevServer,storyDataSources,translationStatus,validateLinks,validateStoryFile. Two have a replacement:calendarIncludedEventsandcalendarPlaces, the joins of a calendar, areincludedRoadmapsandcalendarPlacesof@recit/, which take the reading of the roadmap and of the directory as options. The CLI's own roadmap reader is not exported: Joins in Node shows the one to write, with public names only.calendar/ node create-recit:defaultIo,detectPackageManager,isFreeFolder,isTemplateName,nextSteps,ownVersion,projectManifest,readCatalog,restoredName,runCommand,templateManifest,templateTsconfig.create-recitstays the entry.
Removed by the releases still to come
Book, calendar, report, roadmap, glossary, directory, :::form, webtoon and web stories have joined
the contract (see Stability). The packages still outside 1.0
(atlas, the maps of @recit/geo…) are reworked one at a time before they join it. A name one of
them removes from a public entry is listed here, with its replacement, in the release that removes
it.
@recit/atlas(preview):compileAtlas(input, options)isstoryToAtlas(input, options), which returns{ atlas, diagnostics }(the atlas no longer carries itsdiagnostics);AtlasModelisAtlasandCompileAtlasOptionsisStoryToAtlasOptions.buildAtlas,BuildAtlasOptionsandAtlasSceneTextare removed with no public replacement: go throughstoryToAtlas.@recit/:atlas/ components atlasStringsisatlasMessagesandAtlasStringsisAtlasMessages. There is no alias.@recit/: the player (webstory StoryPlayer,StoryCard,ProgressBars,TapZones,StoryCTA,PauseButton,MuteToggle,ShareButton,StoryCover,StoryRail,useStoryPlayer,usePrefersReducedMotion,useDocumentHidden,HOLD_DELAYand the…Props) moves to@recit/;webstory/ components @recit/is removed (import fromwebstory/ model @recit/), andwebstory @recit/is removed (importwebstory/ motion webstoryToFilmandmotionToWebstoryfrom@recit/).webstory/ bridge compileWebstory(input, options)isstoryToWebstory(input, options), which returns{ webstory, story, diagnostics }(the view no longer carries itsdiagnostics);CompiledWebstoryisWebstoryResult,CompileWebstoryOptionsisStoryToWebstoryOptionsandWebstoryViewisWebstory. There is no alias.@recit/: the reader (webtoon WebtoonReader,Panel,Bubble,Caption,Sfx,PlaceholderPanel,EpisodeNav) is in@recit/,webtoon/ components webtoonToFilmin@recit/, and the model inwebtoon/ bridge @recit/, wherewebtoon storyToWebtoon(story, options)returns{ webtoon, diagnostics }.WebtoonView,WebtoonPanelView,WebtoonLetteringViewandWebtoonSeriesVieware@deprecatedaliases ofWebtoon,WebtoonPanel,WebtoonPanelLetteringandWebtoonSeriesuntil 1.0.
Changed return shapes
storyToFilm(story, options) of @recit/ (and @recit/) returns
{ film?, the shape of every …ToFilm, instead of { ok, film, warnings } or
{ ok, message, issues }. Each diagnostic is the Diagnostic of @recit/core (severity, code,
message, line or path) with its file, sceneIndex, sceneId and blockType; the film
comes back only when no diagnostic is an error. parseFilmSource, parseMarkdownFilm and
readFilmFile keep { ok, … }, and toFilmSourceResult turns the new result into it:
TypeScript
The bridges of the formats return the same shape. webtoonToFilm(webtoon, options) of
@recit/ and webstoryToFilm(result, options) of @recit/ return
{ film? instead of { ok, film } or { ok, message }, and
motionToWebstory(source) returns { webstory? (a 16:9 film — cards are 9:16,
4:5 or 1:1 — is a webstory- diagnostic instead of an exception):
TypeScript
Check
recit migrate --on every story file saysdry- run nothing to migratefor each.recit validateon every story file prints no error.recit build(orrecit-for a site) succeeds, and your typecheck passes.site build
When all three pass, the project is on 1.0. The Stability page says what 1.0 promises from here on.