rename: canvas -> draw

This commit is contained in:
Felix Roos 2024-03-07 13:24:52 +01:00
parent 75098adbdb
commit 0f07bfc9d7
26 changed files with 43 additions and 43 deletions

View File

@ -13,7 +13,7 @@ import {
drawSelection, drawSelection,
} from '@codemirror/view'; } from '@codemirror/view';
import { Pattern, repl } from '@strudel/core'; import { Pattern, repl } from '@strudel/core';
import { Drawer, cleanupDraw } from '@strudel/canvas'; import { Drawer, cleanupDraw } from '@strudel/draw';
import { isAutoCompletionEnabled } from './autocomplete.mjs'; import { isAutoCompletionEnabled } from './autocomplete.mjs';
import { isTooltipEnabled } from './tooltip.mjs'; import { isTooltipEnabled } from './tooltip.mjs';
import { flash, isFlashEnabled } from './flash.mjs'; import { flash, isFlashEnabled } from './flash.mjs';

View File

@ -45,7 +45,7 @@
"@replit/codemirror-vim": "^6.1.0", "@replit/codemirror-vim": "^6.1.0",
"@replit/codemirror-vscode-keymap": "^6.0.2", "@replit/codemirror-vscode-keymap": "^6.0.2",
"@strudel/core": "workspace:*", "@strudel/core": "workspace:*",
"@strudel/canvas": "workspace:*", "@strudel/draw": "workspace:*",
"@uiw/codemirror-themes": "^4.21.21", "@uiw/codemirror-themes": "^4.21.21",
"@uiw/codemirror-themes-all": "^4.21.21", "@uiw/codemirror-themes-all": "^4.21.21",
"nanostores": "^0.9.5" "nanostores": "^0.9.5"

View File

@ -1,7 +1,7 @@
{ {
"name": "@strudel/canvas", "name": "@strudel/draw",
"version": "1.0.1", "version": "1.0.1",
"description": "Helpers for drawing with the Canvas API and Strudel", "description": "Helpers for drawing with Strudel",
"main": "index.mjs", "main": "index.mjs",
"type": "module", "type": "module",
"publishConfig": { "publishConfig": {

View File

@ -1,4 +1,4 @@
import { getDrawContext } from '@strudel/canvas'; import { getDrawContext } from '@strudel/draw';
let latestOptions; let latestOptions;

View File

@ -34,7 +34,7 @@
"homepage": "https://github.com/tidalcycles/strudel#readme", "homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": { "dependencies": {
"@strudel/core": "workspace:*", "@strudel/core": "workspace:*",
"@strudel/canvas": "workspace:*", "@strudel/draw": "workspace:*",
"hydra-synth": "^1.3.29" "hydra-synth": "^1.3.29"
}, },
"devDependencies": { "devDependencies": {

View File

@ -35,7 +35,7 @@
"dependencies": { "dependencies": {
"@strudel/codemirror": "workspace:*", "@strudel/codemirror": "workspace:*",
"@strudel/core": "workspace:*", "@strudel/core": "workspace:*",
"@strudel/canvas": "workspace:*", "@strudel/draw": "workspace:*",
"@strudel/hydra": "workspace:*", "@strudel/hydra": "workspace:*",
"@strudel/midi": "workspace:*", "@strudel/midi": "workspace:*",
"@strudel/mini": "workspace:*", "@strudel/mini": "workspace:*",

View File

@ -6,7 +6,7 @@ export async function prebake() {
const modulesLoading = evalScope( const modulesLoading = evalScope(
// import('@strudel/core'), // import('@strudel/core'),
core, core,
import('@strudel/canvas'), import('@strudel/draw'),
import('@strudel/mini'), import('@strudel/mini'),
import('@strudel/tonal'), import('@strudel/tonal'),
import('@strudel/webaudio'), import('@strudel/webaudio'),

View File

@ -1,5 +1,5 @@
import { silence } from '@strudel/core'; import { silence } from '@strudel/core';
import { getDrawContext } from '@strudel/canvas'; import { getDrawContext } from '@strudel/draw';
import { transpiler } from '@strudel/transpiler'; import { transpiler } from '@strudel/transpiler';
import { getAudioContext, webaudioOutput } from '@strudel/webaudio'; import { getAudioContext, webaudioOutput } from '@strudel/webaudio';
import { StrudelMirror, codemirrorSettings } from '@strudel/codemirror'; import { StrudelMirror, codemirrorSettings } from '@strudel/codemirror';

View File

@ -34,7 +34,7 @@
"homepage": "https://github.com/tidalcycles/strudel#readme", "homepage": "https://github.com/tidalcycles/strudel#readme",
"dependencies": { "dependencies": {
"@strudel/core": "workspace:*", "@strudel/core": "workspace:*",
"@strudel/canvas": "workspace:*", "@strudel/draw": "workspace:*",
"superdough": "workspace:*" "superdough": "workspace:*"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,5 +1,5 @@
import { Pattern, clamp } from '@strudel/core'; import { Pattern, clamp } from '@strudel/core';
import { getDrawContext } from '@strudel/canvas'; import { getDrawContext } from '../draw/index.mjs';
import { analyser, getAnalyzerData } from 'superdough'; import { analyser, getAnalyzerData } from 'superdough';
export function drawTimeScope( export function drawTimeScope(

50
pnpm-lock.yaml generated
View File

@ -140,16 +140,6 @@ importers:
specifier: ^5.0.10 specifier: ^5.0.10
version: 5.0.10 version: 5.0.10
packages/canvas:
dependencies:
'@strudel/core':
specifier: workspace:*
version: link:../core
devDependencies:
vite:
specifier: ^5.0.10
version: 5.0.11(@types/node@20.10.6)
packages/codemirror: packages/codemirror:
dependencies: dependencies:
'@codemirror/autocomplete': '@codemirror/autocomplete':
@ -188,12 +178,12 @@ importers:
'@replit/codemirror-vscode-keymap': '@replit/codemirror-vscode-keymap':
specifier: ^6.0.2 specifier: ^6.0.2
version: 6.0.2(@codemirror/autocomplete@6.11.1)(@codemirror/commands@6.3.3)(@codemirror/language@6.10.0)(@codemirror/lint@6.4.2)(@codemirror/search@6.5.5)(@codemirror/state@6.4.0)(@codemirror/view@6.23.0) version: 6.0.2(@codemirror/autocomplete@6.11.1)(@codemirror/commands@6.3.3)(@codemirror/language@6.10.0)(@codemirror/lint@6.4.2)(@codemirror/search@6.5.5)(@codemirror/state@6.4.0)(@codemirror/view@6.23.0)
'@strudel/canvas':
specifier: workspace:*
version: link:../canvas
'@strudel/core': '@strudel/core':
specifier: workspace:* specifier: workspace:*
version: link:../core version: link:../core
'@strudel/draw':
specifier: workspace:*
version: link:../draw
'@uiw/codemirror-themes': '@uiw/codemirror-themes':
specifier: ^4.21.21 specifier: ^4.21.21
version: 4.21.21(@codemirror/language@6.10.0)(@codemirror/state@6.4.0)(@codemirror/view@6.23.0) version: 4.21.21(@codemirror/language@6.10.0)(@codemirror/state@6.4.0)(@codemirror/view@6.23.0)
@ -246,16 +236,26 @@ importers:
specifier: ^1.5.3 specifier: ^1.5.3
version: 1.5.3 version: 1.5.3
packages/draw:
dependencies:
'@strudel/core':
specifier: workspace:*
version: link:../core
devDependencies:
vite:
specifier: ^5.0.10
version: 5.0.11(@types/node@20.10.6)
packages/embed: {} packages/embed: {}
packages/hydra: packages/hydra:
dependencies: dependencies:
'@strudel/canvas':
specifier: workspace:*
version: link:../canvas
'@strudel/core': '@strudel/core':
specifier: workspace:* specifier: workspace:*
version: link:../core version: link:../core
'@strudel/draw':
specifier: workspace:*
version: link:../draw
hydra-synth: hydra-synth:
specifier: ^1.3.29 specifier: ^1.3.29
version: 1.3.29 version: 1.3.29
@ -317,15 +317,15 @@ importers:
packages/repl: packages/repl:
dependencies: dependencies:
'@strudel/canvas':
specifier: workspace:*
version: link:../canvas
'@strudel/codemirror': '@strudel/codemirror':
specifier: workspace:* specifier: workspace:*
version: link:../codemirror version: link:../codemirror
'@strudel/core': '@strudel/core':
specifier: workspace:* specifier: workspace:*
version: link:../core version: link:../core
'@strudel/draw':
specifier: workspace:*
version: link:../draw
'@strudel/hydra': '@strudel/hydra':
specifier: workspace:* specifier: workspace:*
version: link:../hydra version: link:../hydra
@ -474,12 +474,12 @@ importers:
packages/webaudio: packages/webaudio:
dependencies: dependencies:
'@strudel/canvas':
specifier: workspace:*
version: link:../canvas
'@strudel/core': '@strudel/core':
specifier: workspace:* specifier: workspace:*
version: link:../core version: link:../core
'@strudel/draw':
specifier: workspace:*
version: link:../draw
superdough: superdough:
specifier: workspace:* specifier: workspace:*
version: link:../superdough version: link:../superdough
@ -545,9 +545,6 @@ importers:
'@nanostores/react': '@nanostores/react':
specifier: ^0.7.1 specifier: ^0.7.1
version: 0.7.1(nanostores@0.9.5)(react@18.2.0) version: 0.7.1(nanostores@0.9.5)(react@18.2.0)
'@strudel/canvas':
specifier: workspace:*
version: link:../packages/canvas
'@strudel/codemirror': '@strudel/codemirror':
specifier: workspace:* specifier: workspace:*
version: link:../packages/codemirror version: link:../packages/codemirror
@ -560,6 +557,9 @@ importers:
'@strudel/desktopbridge': '@strudel/desktopbridge':
specifier: workspace:* specifier: workspace:*
version: link:../packages/desktopbridge version: link:../packages/desktopbridge
'@strudel/draw':
specifier: workspace:*
version: link:../packages/draw
'@strudel/hydra': '@strudel/hydra':
specifier: workspace:* specifier: workspace:*
version: link:../packages/hydra version: link:../packages/hydra

View File

@ -26,7 +26,7 @@
"@nanostores/react": "^0.7.1", "@nanostores/react": "^0.7.1",
"@strudel/codemirror": "workspace:*", "@strudel/codemirror": "workspace:*",
"@strudel/core": "workspace:*", "@strudel/core": "workspace:*",
"@strudel/canvas": "workspace:*", "@strudel/draw": "workspace:*",
"@strudel/csound": "workspace:*", "@strudel/csound": "workspace:*",
"@strudel/desktopbridge": "workspace:*", "@strudel/desktopbridge": "workspace:*",
"@strudel/hydra": "workspace:*", "@strudel/hydra": "workspace:*",

View File

@ -1,4 +1,4 @@
import { colorMap } from '@strudel/canvas'; import { colorMap } from '@strudel/draw';
const Colors = () => { const Colors = () => {
return ( return (

View File

@ -1,7 +1,7 @@
import { useState, useRef, useCallback, useMemo, useEffect } from 'react'; import { useState, useRef, useCallback, useMemo, useEffect } from 'react';
import { Icon } from './Icon'; import { Icon } from './Icon';
import { silence, noteToMidi, _mod } from '@strudel/core'; import { silence, noteToMidi, _mod } from '@strudel/core';
import { getPunchcardPainter } from '@strudel/canvas'; import { getPunchcardPainter } from '@strudel/draw';
import { transpiler } from '@strudel/transpiler'; import { transpiler } from '@strudel/transpiler';
import { getAudioContext, webaudioOutput, initAudioOnFirstClick } from '@strudel/webaudio'; import { getAudioContext, webaudioOutput, initAudioOnFirstClick } from '@strudel/webaudio';
import { StrudelMirror } from '@strudel/codemirror'; import { StrudelMirror } from '@strudel/codemirror';

View File

@ -1,5 +1,5 @@
import { createCanvas } from 'canvas'; import { createCanvas } from 'canvas';
import { pianoroll } from '@strudel/canvas'; import { pianoroll } from '@strudel/draw';
import { evaluate } from '@strudel/transpiler'; import { evaluate } from '@strudel/transpiler';
import '../../../../test/runtime.mjs'; import '../../../../test/runtime.mjs';
import * as tunes from '../../repl/tunes.mjs'; import * as tunes from '../../repl/tunes.mjs';

View File

@ -1,5 +1,5 @@
import { createCanvas } from 'canvas'; import { createCanvas } from 'canvas';
import { pianoroll } from '@strudel/canvas'; import { pianoroll } from '@strudel/draw';
import { evaluate } from '@strudel/transpiler'; import { evaluate } from '@strudel/transpiler';
import '../../../../test/runtime.mjs'; import '../../../../test/runtime.mjs';
import { getMyPatterns } from '../../my_patterns'; import { getMyPatterns } from '../../my_patterns';

View File

@ -5,7 +5,7 @@ This program is free software: you can redistribute it and/or modify it under th
*/ */
import { code2hash, logger, silence } from '@strudel/core'; import { code2hash, logger, silence } from '@strudel/core';
import { getDrawContext } from '@strudel/canvas'; import { getDrawContext } from '@strudel/draw';
import cx from '@src/cx.mjs'; import cx from '@src/cx.mjs';
import { transpiler } from '@strudel/transpiler'; import { transpiler } from '@strudel/transpiler';
import { import {

View File

@ -72,7 +72,7 @@ export async function getRandomTune() {
export function loadModules() { export function loadModules() {
let modules = [ let modules = [
import('@strudel/core'), import('@strudel/core'),
import('@strudel/canvas'), import('@strudel/draw'),
import('@strudel/tonal'), import('@strudel/tonal'),
import('@strudel/mini'), import('@strudel/mini'),
import('@strudel/xen'), import('@strudel/xen'),