-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: converting trace types into v3 traces and adding markup type
- Loading branch information
Showing
9 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type MarkupNode = string | { attributes: Record<string, unknown>; text: Markup }; | ||
|
||
export type Markup = Array<MarkupNode>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/base-types/src/node/image.ts → packages/base-types/src/trace/v3/image.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { TraceFrame as ImageTrace } from './image'; | ||
export { TraceFrame as JSONTrace } from './json'; | ||
export { TraceFrame as TextTrace } from './text'; | ||
export { TraceFrame as VideoTrace } from './video'; |
2 changes: 1 addition & 1 deletion
2
packages/base-types/src/node/json.ts → packages/base-types/src/trace/v3/json.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Markup } from '@base-types/markup'; | ||
|
||
import { BaseTraceFrame, TraceType } from '../../node/utils'; | ||
|
||
interface StepData { | ||
content: Markup; | ||
} | ||
|
||
export interface TraceFrame extends BaseTraceFrame<StepData> { | ||
type: TraceType.TEXT; | ||
} |
2 changes: 1 addition & 1 deletion
2
packages/base-types/src/node/video.ts → packages/base-types/src/trace/v3/video.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters