1- import {
2- CodeTween ,
3- CodeConfig ,
4- CodeStep ,
5- } from "../smooth-code"
1+ import { CodeTween , CodeStep } from "../smooth-code"
62import React from "react"
73import { codeToText } from "utils"
4+ import { CodeSettings } from "../core/types"
85
96export type CodeFile = CodeStep & {
107 name : string
@@ -56,7 +53,7 @@ type Snapshot = {
5653 southTabs : TabsSnapshot | null
5754}
5855
59- function northConfig ( codeConfig : CodeConfig ) {
56+ function northConfig ( codeConfig : CodeSettings ) {
6057 if ( Array . isArray ( codeConfig . rows ) ) {
6158 return {
6259 ...codeConfig ,
@@ -66,7 +63,7 @@ function northConfig(codeConfig: CodeConfig) {
6663 return codeConfig
6764}
6865
69- function southConfig ( codeConfig : CodeConfig ) {
66+ function southConfig ( codeConfig : CodeSettings ) {
7067 if ( Array . isArray ( codeConfig . rows ) ) {
7168 return {
7269 ...codeConfig ,
@@ -82,7 +79,7 @@ export function useTransition(
8279 next : EditorStep ,
8380 t : number ,
8481 backward : boolean ,
85- codeConfig : CodeConfig
82+ codeConfig : CodeSettings
8683) : Transition {
8784 // prevSnapshot has the dimensions of the editor for t=0
8885 // nextSnapshot has the dimensions of the editor for t=1
@@ -174,7 +171,7 @@ export function useTransition(
174171function startingPosition (
175172 prev : EditorStep ,
176173 next : EditorStep ,
177- codeConfig : CodeConfig
174+ codeConfig : CodeSettings
178175) : Transition {
179176 const inputNorthPanel = prev . northPanel
180177 const inputSouthPanel = prev . southPanel
@@ -235,7 +232,7 @@ function startingPosition(
235232function endingPosition (
236233 prev : EditorStep ,
237234 next : EditorStep ,
238- codeConfig : CodeConfig
235+ codeConfig : CodeSettings
239236) : Transition {
240237 const inputNorthPanel = next . northPanel
241238 const inputSouthPanel = next . southPanel
@@ -312,7 +309,7 @@ function CodeTransition({
312309 nextFile : CodeFile
313310 t : number
314311 parentHeight : string
315- codeConfig : CodeConfig & { htmlProps ?: any }
312+ codeConfig : CodeSettings & { htmlProps ?: any }
316313} ) {
317314 const htmlProps = {
318315 ...codeConfig ?. htmlProps ,
0 commit comments