fix up imports from core, and remove circular deps that were breaking everything

This commit is contained in:
alex
2022-12-05 13:07:56 +00:00
parent 9dd4385bbf
commit 92bf43e3a6
23 changed files with 62 additions and 57 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import XMarkIcon from '@heroicons/react/20/solid/XMarkIcon';
import { logger } from '@strudel.cycles/core';
import core from '@strudel.cycles/core';
const { logger } = core;
import { cx } from '@strudel.cycles/react';
import { nanoid } from 'nanoid';
import React, { useContext, useCallback, useLayoutEffect, useRef, useState } from 'react';
+2 -2
View File
@@ -1,5 +1,5 @@
import { pattern, toMidi } from '@strudel.cycles/core';
const { Pattern } = pattern;
import core from '@strudel.cycles/core';
const { Pattern, toMidi } = core;
import { samples } from '@strudel.cycles/webaudio';
export async function prebake({ isMock = false, baseDir = '.' } = {}) {
+2 -4
View File
@@ -5,9 +5,8 @@
// import * as tunes from './tunes.mjs';
// import { evaluate } from '@strudel.cycles/eval';
import { evaluate } from '@strudel.cycles/transpiler';
import { evalScope } from '@strudel.cycles/core';
import * as strudel from '@strudel.cycles/core';
const { Pattern } = strudel.pattern;
import strudel from '@strudel.cycles/core';
const { Pattern, evalScope } = strudel;
import * as webaudio from '@strudel.cycles/webaudio';
import controls from '@strudel.cycles/core/controls.mjs';
// import gist from '@strudel.cycles/core/gist.js';
@@ -157,7 +156,6 @@ const loadSoundfont = () => {};
evalScope(
// Tone,
strudel,
strudel.pattern,
Pattern.prototype.bootstrap(),
toneHelpersMocked,
uiHelpersMocked,