Skip to content

Commit

Permalink
refactor: file structure; separate folder for compiler, tracks, api, …
Browse files Browse the repository at this point in the history
…and schema (gosling-lang#959)

* refactor: file structure; separate folder for compiler, tracks, api, and schema

* fix: fix build and test

* chore: more import adjust

* chore: more import clean up

* fix: fix import of schema

* chore: more refactor
  • Loading branch information
sehilyi authored Aug 16, 2023
1 parent bee6a47 commit 9b36b6c
Show file tree
Hide file tree
Showing 150 changed files with 350 additions and 326 deletions.
6 changes: 3 additions & 3 deletions editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import 'allotment/dist/style.css';
import { debounce, isEqual } from 'lodash-es';
import stripJsonComments from 'strip-json-comments';
import JSONCrush from 'jsoncrush';
import type { HiGlassSpec } from '@higlass.schema';
import type { Datum } from '@gosling.schema';
import type { HiGlassSpec } from '@gosling-lang/higlass-schema';
import type { Datum } from '@gosling-lang/gosling-schema';
import { Themes } from 'gosling-theme';

import { ICONS, type ICON_INFO } from './icon';
import { getHtmlTemplate } from './html-template';
import ErrorBoundary from './error-boundary';
import { traverseTracksAndViews } from '../src/core/utils/spec-preprocess';
import { traverseTracksAndViews } from '../src/compiler/spec-preprocess';
import { examples, type Example } from './example';
import EditorPanel, { type EditorLangauge } from './EditorPanel';
import EditorExamples from './EditorExamples';
Expand Down
2 changes: 1 addition & 1 deletion editor/EditorPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import MonacoEditor from 'react-monaco-editor';

import ReactResizeDetector from 'react-resize-detector';
import { GoslingSchema } from 'gosling.js';
import goslingSpec from '../src/core/gosling.schema?raw';
import goslingSpec from '../src/gosling-schema/gosling.schema?raw';

export * from './monaco_worker';
import * as Monaco from 'monaco-editor';
Expand Down
2 changes: 1 addition & 1 deletion editor/example/doc-examples/single-mark.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, Mark, DataDeep } from '@gosling.schema';
import type { GoslingSpec, Mark, DataDeep } from '@gosling-lang/gosling-schema';

export const data: DataDeep = {
url: 'https://resgen.io/api/v1/tileset_info/?d=UvVPeLHuRDiYA3qwFlm7xQ',
Expand Down
2 changes: 1 addition & 1 deletion editor/example/doc-examples/triangle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, SingleTrack } from '@gosling.schema';
import type { GoslingSpec, SingleTrack } from '@gosling-lang/gosling-schema';

import { HiGlass } from '../json-spec/gene-annotation';

Expand Down
4 changes: 2 additions & 2 deletions editor/example/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GoslingTrackModel } from '../../src/core/gosling-track-model';
import { GoslingTrackModel } from '../../src/tracks/gosling-track/gosling-track-model';
import { resolveSuperposedTracks } from '../../src/core/utils/overlay';
import { convertToFlatTracks } from '../../src/core/utils/spec-preprocess';
import { convertToFlatTracks } from '../../src/compiler/spec-preprocess';
import { getTheme } from '../../src/core/utils/theme';
import { EX_TRACK_SEMANTIC_ZOOM } from './json-spec/semantic-zoom';

Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/circos.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

export const EX_SPEC_CIRCULR_RANGE: GoslingSpec = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/gene-annotation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DataDeep, GoslingSpec, OverlaidTracks } from '@gosling.schema';
import type { DataDeep, GoslingSpec, OverlaidTracks } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

const width = 350;
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/glyph.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Mark } from '@gosling.schema';
import type { Mark } from '@gosling-lang/gosling-schema';

export const GLYPH_PRESETS: {
name: GLYPH_LOCAL_PRESET_TYPE;
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/ideograms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, OverlaidTracks, Track } from '@gosling.schema';
import type { GoslingSpec, OverlaidTracks, Track } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

export const CytoBands: OverlaidTracks = {
Expand Down
4 changes: 2 additions & 2 deletions editor/example/json-spec/layout-and-arrangement.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { GoslingSpec } from 'gosling.js';
import type { SingleView } from '@gosling.schema';
import { DEFAULT_VIEW_SPACING } from '../../../src/core/defaults';
import type { SingleView } from '@gosling-lang/gosling-schema';
import { DEFAULT_VIEW_SPACING } from '../../../src/compiler/defaults';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

const COLORS = ['#D45E00', '#029F73', '#0072B2', '#CB7AA7', '#E79F00'];
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/matrix.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PredefinedColors, SingleTrack } from '@gosling.schema';
import type { PredefinedColors, SingleTrack } from '@gosling-lang/gosling-schema';
import type { GoslingSpec } from 'gosling.js';
import { random } from 'lodash-es';
import { GOSLING_PUBLIC_DATA } from './gosling-data';
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/mouse-event.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, SingleTrack } from '@gosling.schema';
import type { GoslingSpec, SingleTrack } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';
import { CytoBands } from './ideograms';

Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/pileup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Domain, GoslingSpec, View } from '@gosling.schema';
import type { Domain, GoslingSpec, View } from '@gosling-lang/gosling-schema';

export function EX_SPEC_VIEW_PILEUP(
id: string,
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/responsive-alignment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OverlaidTracks, SingleTrack, SingleView } from '@gosling.schema';
import type { OverlaidTracks, SingleTrack, SingleView } from '@gosling-lang/gosling-schema';
import type { GoslingSpec } from 'gosling.js';
import { CHANNEL_DEFAULTS } from '../../../src/core/channel';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DomainChrInterval, GoslingSpec, OverlaidTracks, SingleTrack, TemplateTrack } from '@gosling.schema';
import type { DomainChrInterval, GoslingSpec, OverlaidTracks, SingleTrack, TemplateTrack } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

const trackColor = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/responsive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';

export const EX_SPEC_RESPONSIVE_SEGREGATED_AREA_CHART: GoslingSpec = {
// title: 'Responsive Visualization',
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/sars-cov-2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, MultivecData, OverlaidTracks } from '@gosling.schema';
import type { GoslingSpec, MultivecData, OverlaidTracks } from '@gosling-lang/gosling-schema';
import { EX_TRACK_SEMANTIC_ZOOM } from './semantic-zoom';

export const EX_TRACK_SARS_COV_2_GENES: OverlaidTracks = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/sashimi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';

export const EX_SPEC_SASHIMI: GoslingSpec = {
title: 'Sashimi Plot',
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/semantic-zoom.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, OverlaidTracks } from '@gosling.schema';
import type { GoslingSpec, OverlaidTracks } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';
import { EX_SPEC_PATHOGENIC } from './pathogenic';

Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

export const EX_SPEC_CUSTOM_THEME: GoslingSpec = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/visual-encoding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

export const EX_SPEC_VISUAL_ENCODING: GoslingSpec = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/json-spec/visual-linking.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';
import { GOSLING_PUBLIC_DATA } from './gosling-data';

export const EX_SPEC_LINKING: GoslingSpec = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/basic-semantic-zoom.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, VisibilityCondition, MultivecData } from '@gosling.schema';
import type { GoslingSpec, VisibilityCondition, MultivecData } from '@gosling-lang/gosling-schema';

const data: MultivecData = {
type: 'multivec',
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/corces.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, PartialTrack, View, BigWigData, BeddbData } from '@gosling.schema';
import type { GoslingSpec, PartialTrack, View, BigWigData, BeddbData } from '@gosling-lang/gosling-schema';

const width = 400;

Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/islandviewer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';

const circularRadius = 250;
const centerRadius = 0.5;
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/rule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PartialTrack, GoslingSpec, JsonData } from '@gosling.schema';
import type { PartialTrack, GoslingSpec, JsonData } from '@gosling-lang/gosling-schema';

const barTrack: PartialTrack = {
data: {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/sashimi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BamData, GoslingSpec } from '@gosling.schema';
import type { BamData, GoslingSpec } from '@gosling-lang/gosling-schema';

const bamData: BamData = {
type: 'bam',
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/vertical-band.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, CsvData, Track } from '@gosling.schema';
import type { GoslingSpec, CsvData, Track } from '@gosling-lang/gosling-schema';
const data: CsvData = {
type: 'csv',
url: 'https://raw.githubusercontent.com/sehilyi/gemini-datasets/master/data/circos-segdup-edited.txt',
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/visual-encoding-circular.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, View, MultivecData, Tooltip } from '@gosling.schema';
import type { GoslingSpec, View, MultivecData, Tooltip } from '@gosling-lang/gosling-schema';

const size = { width: 350, height: 130 };
const data: MultivecData = {
Expand Down
2 changes: 1 addition & 1 deletion editor/example/spec/visual-encoding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec, MultivecData, View, Tooltip } from '@gosling.schema';
import type { GoslingSpec, MultivecData, View, Tooltip } from '@gosling-lang/gosling-schema';

const size = { width: 600, height: 130 };

Expand Down
2 changes: 1 addition & 1 deletion embed/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { embed as goslingEmbed } from 'gosling.js';
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';
import 'higlass/dist/hglib.css';

// https://github.com/vega/vega-embed/blob/master/src/container.ts
Expand Down
12 changes: 6 additions & 6 deletions scripts/generate-schemas.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import stableStringify from "safe-stable-stringify";
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

const SCHEMAS = [
["GoslingSpec", "gosling.schema.json"],
["HiGlassSpec", "higlass.schema.json"],
["Theme", "theme.schema.json"],
["TemplateTrackDef", "template.schema.json"],
["GoslingSpec", "gosling.schema.json", "../src/gosling-schema/"],
["HiGlassSpec", "higlass.schema.json", "../src/higlass-schema/"],
["Theme", "theme.schema.json", "../src/gosling-schema/"],
["TemplateTrackDef", "template.schema.json", "../src/gosling-schema/"],
];

const generator = tsj.createGenerator({
Expand All @@ -25,10 +25,10 @@ const generator = tsj.createGenerator({
encodeRefs: false,
});

for (const [type, filename] of SCHEMAS) {
for (const [type, filename, dir] of SCHEMAS) {
const schema = generator.createSchema(type);
fs.promises.writeFile(
path.resolve(__dirname, `../schema/${filename}`),
path.resolve(__dirname, `${dir}/${filename}`),
stableStringify(schema, null, 2) + "\n",
);
}
3 changes: 3 additions & 0 deletions src/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @gosling-lang/gosling-api

Code related to JavaScript API.
4 changes: 2 additions & 2 deletions src/core/api-data.ts → src/api/api-data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GoslingSpec, PartialTrack, TrackApiData, View } from '@gosling.schema';
import { getInternalSpecById, getTrackIds, getViewIds } from './track-and-view-ids';
import type { GoslingSpec, PartialTrack, TrackApiData, View } from '@gosling-lang/gosling-schema';
import { getInternalSpecById, getTrackIds, getViewIds } from '../api/track-and-view-ids';

/**
* This collect information of views by referring to the track information.
Expand Down
10 changes: 5 additions & 5 deletions src/core/api.ts → src/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as PIXI from 'pixi.js';
import type { TrackApiData, VisUnitApiData, ViewApiData } from '@gosling.schema';
import type { HiGlassApi } from './higlass-component-wrapper';
import type { HiGlassSpec } from '@higlass.schema';
import type { TrackApiData, VisUnitApiData, ViewApiData } from '@gosling-lang/gosling-schema';
import type { HiGlassSpec } from '@gosling-lang/higlass-schema';
import type { HiGlassApi } from '../core/higlass-component-wrapper';
import { subscribe, unsubscribe } from './pubsub';
import { computeChromSizes, GenomicPositionHelper } from './utils/assembly';
import type { CompleteThemeDeep } from './utils/theme';
import { computeChromSizes, GenomicPositionHelper } from '../core/utils/assembly';
import type { CompleteThemeDeep } from '../core/utils/theme';
import type { IdTable } from './track-and-view-ids';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/core/pubsub.ts → src/api/pubsub.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { _EventMap } from './gosling.schema';
import type { _EventMap } from '@gosling-lang/gosling-schema';
import PubSub from 'pubsub-js';

type EventName = keyof _EventMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GoslingSpec } from '@gosling.schema';
import type { GoslingSpec } from '@gosling-lang/gosling-schema';
import { getInternalSpecById, getTrackIds, getViewIds } from './track-and-view-ids';

describe('Retrieve IDs and Sub-spec', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CommonTrackDef, CommonViewDef, GoslingSpec, PartialTrack, View } from '@gosling.schema';
import { traverseTracksAndViews } from './utils/spec-preprocess';
import type { CommonTrackDef, CommonViewDef, GoslingSpec, PartialTrack, View } from '@gosling-lang/gosling-schema';
import { traverseTracksAndViews } from '../compiler/spec-preprocess';

/**
* A table that maps Gosling track IDs to HiGlass view IDs.
Expand Down
3 changes: 3 additions & 0 deletions src/compiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @gosling-lang/compiler

Related to spec processing and converting a gosling spec into HiGlass spec.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { GoslingSpec, Track } from '../gosling.schema';
import { DEFAULT_CIRCULAR_VIEW_PADDING, DEFAULT_VIEW_SPACING } from '../defaults';
import type { GoslingSpec, Track } from '@gosling-lang/gosling-schema';
import { DEFAULT_CIRCULAR_VIEW_PADDING, DEFAULT_VIEW_SPACING } from './defaults';
import { getBoundingBox, getRelativeTrackInfo } from './bounding-box';
import { traverseToFixSpecDownstream } from './spec-preprocess';
import { getTheme } from './theme';
import { traverseToFixSpecDownstream } from '../compiler/spec-preprocess';
import { getTheme } from '../core/utils/theme';

describe('Arrangement', () => {
it('1 View, 1 Track', () => {
Expand Down
12 changes: 6 additions & 6 deletions src/core/utils/bounding-box.ts → src/compiler/bounding-box.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { MultipleViews, CommonViewDef, GoslingSpec, Track, SingleView } from '@gosling.schema';
import { Is2DTrack, IsDummyTrack, IsOverlaidTrack, IsXAxis, IsYAxis } from '../gosling.schema.guards';
import { HIGLASS_AXIS_SIZE } from '../higlass-model';
import type { MultipleViews, CommonViewDef, GoslingSpec, Track, SingleView } from '@gosling-lang/gosling-schema';
import { Is2DTrack, IsDummyTrack, IsOverlaidTrack, IsXAxis, IsYAxis } from '@gosling-lang/gosling-schema';
import { HIGLASS_AXIS_SIZE } from './higlass-model';
import {
DEFAULT_CIRCULAR_VIEW_PADDING,
DEFAULT_INNER_RADIUS_PROP,
DEFAULT_VIEW_SPACING,
DEWFAULT_TITLE_PADDING_ON_TOP_AND_BOTTOM
} from '../defaults';
import { resolveSuperposedTracks } from './overlay';
} from './defaults';
import { resolveSuperposedTracks } from '../core/utils/overlay';
import { traverseTracksAndViews, traverseViewArrangements } from './spec-preprocess';
import type { CompleteThemeDeep } from './theme';
import type { CompleteThemeDeep } from '../core/utils/theme';

export interface Size {
width: number;
Expand Down
2 changes: 1 addition & 1 deletion src/core/compile.test.ts → src/compiler/compile.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EX_SPEC_VISUAL_ENCODING } from '../../editor/example/json-spec/visual-encoding';
import { compile } from './compile';
import { getTheme } from './utils/theme';
import { getTheme } from '../core/utils/theme';
import type { GoslingSpec } from '../index';

describe('compile', () => {
Expand Down
14 changes: 7 additions & 7 deletions src/core/compile.ts → src/compiler/compile.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { GoslingSpec, TemplateTrackDef, VisUnitApiData } from './gosling.schema';
import type { HiGlassSpec } from './higlass.schema';
import { traverseToFixSpecDownstream, overrideDataTemplates } from './utils/spec-preprocess';
import { replaceTrackTemplates } from './utils/template';
import { getRelativeTrackInfo, type Size } from './utils/bounding-box';
import type { CompleteThemeDeep } from './utils/theme';
import type { GoslingSpec, TemplateTrackDef, VisUnitApiData } from '@gosling-lang/gosling-schema';
import type { HiGlassSpec } from '@gosling-lang/higlass-schema';
import { traverseToFixSpecDownstream, overrideDataTemplates } from './spec-preprocess';
import { replaceTrackTemplates } from '../core/utils/template';
import { getRelativeTrackInfo, type Size } from './bounding-box';
import type { CompleteThemeDeep } from '../core/utils/theme';
import { renderHiGlass as createHiGlassModels } from './create-higlass-models';
import { manageResponsiveSpecs } from './responsive';
import type { IdTable } from './track-and-view-ids';
import type { IdTable } from '../api/track-and-view-ids';

/** The callback function called everytime after the spec has been compiled */
export type CompileCallback = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { getBoundingBox, type TrackInfo } from './utils/bounding-box';
import { getBoundingBox, type TrackInfo } from './bounding-box';
import { goslingToHiGlass } from './gosling-to-higlass';
import { HiGlassModel } from './higlass-model';
import { getLinkingInfo } from './utils/linking';
import { getLinkingInfo } from '../core/utils/linking';
import type {
GoslingSpec,
OverlaidTrack,
SingleTrack,
TrackApiData,
VisUnitApiData,
ViewApiData
} from '@gosling.schema';
import type { CompleteThemeDeep } from './utils/theme';
} from '@gosling-lang/gosling-schema';
import type { CompleteThemeDeep } from '../core/utils/theme';
import type { CompileCallback } from './compile';
import { getViewApiData } from './api-data';
import { GoslingToHiGlassIdMapper } from './track-and-view-ids';
import { IsDummyTrack } from './gosling.schema.guards';
import { getViewApiData } from '../api/api-data';
import { GoslingToHiGlassIdMapper } from '../api/track-and-view-ids';
import { IsDummyTrack } from '@gosling-lang/gosling-schema';

export function renderHiGlass(
spec: GoslingSpec,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { goslingToHiGlass } from './gosling-to-higlass';
import { HiGlassModel } from './higlass-model';
import { EX_TRACK_SEMANTIC_ZOOM } from '../../editor/example/json-spec/semantic-zoom';
import { convertToFlatTracks } from './utils/spec-preprocess';
import { getTheme } from './utils/theme';
import { convertToFlatTracks } from './spec-preprocess';
import { getTheme } from '../core/utils/theme';

import type { SingleTrack } from './gosling.schema';
import { GoslingToHiGlassIdMapper } from './track-and-view-ids';
import type { SingleTrack } from '@gosling-lang/gosling-schema';
import { GoslingToHiGlassIdMapper } from '../api/track-and-view-ids';

describe('Should convert gosling spec to higlass view config.', () => {
it('Should return a generated higlass view config correctly', () => {
Expand Down
Loading

0 comments on commit 9b36b6c

Please sign in to comment.