Skip to content

Commit

Permalink
Replace @scratch/paper with @turbowarp/paper
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jul 16, 2024
1 parent 449ca96 commit 614f334
Show file tree
Hide file tree
Showing 58 changed files with 66 additions and 66 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"url": "https://github.com/LLK/scratch-paint.git"
},
"dependencies": {
"@scratch/paper": "0.11.20221201200345",
"@turbowarp/nanolog": "^0.2.0",
"@turbowarp/paper": "^0.12.202407161743",
"classnames": "2.2.5",
"keymirror": "0.1.1",
"lodash.bindall": "4.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/paint-editor/paint-editor.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import classNames from 'classnames';
import {defineMessages, injectIntl, intlShape} from 'react-intl';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/bit-oval-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/bit-rect-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/bit-select-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/color-picker.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import bindAll from 'lodash.bindall';
import {connect} from 'react-redux';
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import parseColor from 'parse-color';
import PropTypes from 'prop-types';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/font-dropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {connect} from 'react-redux';
import bindAll from 'lodash.bindall';
import PropTypes from 'prop-types';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/line-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/mode-tools.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/oval-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/paint-editor.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import log from '../log/log';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/paper-canvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import bindAll from 'lodash.bindall';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Formats from '../lib/format';
import log from '../log/log';

Expand Down
2 changes: 1 addition & 1 deletion src/containers/rect-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/scrollable-canvas.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';

import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/select-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/text-mode.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/bit-tools/brush-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getRaster, getGuideLayer, createCanvas} from '../layer';
import {doesColorRequireMask, forEachLinePoint, getBrushMark} from '../bitmap';

Expand Down
2 changes: 1 addition & 1 deletion src/helper/bit-tools/fill-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {floodFill, floodFillAll, getHitBounds} from '../bitmap';
import {createGradientObject} from '../style-path';
import {createCanvas, getRaster} from '../layer';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/bit-tools/line-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getRaster, createCanvas, getGuideLayer} from '../layer';
import {createMaskingCanvas, forEachLinePoint, getBrushMark} from '../bitmap';
import {ART_BOARD_WIDTH, ART_BOARD_HEIGHT} from '../view';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/bit-tools/oval-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../../lib/modes';
import {styleShape} from '../style-path';
import {commitOvalToBitmap} from '../bitmap';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/bit-tools/rect-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../../lib/modes';
import {styleShape} from '../../helper/style-path';
import {commitRectToBitmap} from '../bitmap';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/bit-tools/select-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../../lib/modes';

import {getRaster} from '../layer';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/bitmap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {createCanvas, clearRaster, getRaster, hideGuideLayers, showGuideLayers} from './layer';
import {getGuideColor} from './guides';
import {clearSelection} from './selection';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/blob-tools/blob.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import log from '../../log/log';
import BroadBrushHelper from './broad-brush-helper';
import SegmentBrushHelper from './segment-brush-helper';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/blob-tools/broad-brush-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Broadbrush based on http://paperjs.org/tutorials/interaction/working-with-mouse-vectors/
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {styleBlob} from '../../helper/style-path';
import log from '../../log/log';

Expand Down
2 changes: 1 addition & 1 deletion src/helper/blob-tools/segment-brush-helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {styleBlob} from '../../helper/style-path';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/helper/group.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getRootItem, isGroupItem} from './item';
import {clearSelection, getSelectedRootItems, setItemSelection} from './selection';

Expand Down
2 changes: 1 addition & 1 deletion src/helper/guides.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getGuideLayer} from './layer';
import {getAllRootItems} from './selection';

Expand Down
2 changes: 1 addition & 1 deletion src/helper/hover.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {isBoundsItem, getRootItem} from './item';
import {hoverBounds, hoverItem} from './guides';
import {isGroupChild} from './group';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/item.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';

const getRootItem = function (item) {
if (item.parent.className === 'Layer') {
Expand Down
2 changes: 1 addition & 1 deletion src/helper/layer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import log from '../log/log';
import {ART_BOARD_BOUNDS, ART_BOARD_WIDTH, ART_BOARD_HEIGHT, CENTER, MAX_WORKSPACE_BOUNDS} from './view';
import {isGroupItem} from './item';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/math.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';

/** The ratio of the curve length to use for the handle length to convert squares into approximately circles. */
const HANDLE_RATIO = 0.3902628565;
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/bounding-box-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import keyMirror from 'keymirror';

import {getSelectedRootItems} from '../selection';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/move-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes, {BitmapModes} from '../../lib/modes';
import {isGroup} from '../group';
import {isCompoundPathItem, getRootItem} from '../item';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/nudge-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getSelectedRootItems} from '../selection';
import {getActionBounds} from '../view';
import {BitmapModes} from '../../lib/modes';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/reshape-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import log from '../../log/log';
import keyMirror from 'keymirror';

Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/rotate-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';

/**
* Tool to handle rotation when dragging the rotation handle in the bounding box tool.
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/scale-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getItems} from '../selection';
import {getActionBounds} from '../view';
import {BitmapModes} from '../../lib/modes';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/select-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {selectRootItem} from '../selection';
import BoundingBoxTool from './bounding-box-tool';
import NudgeTool from './nudge-tool';
import SelectionBoxTool from './selection-box-tool';
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';

/**
* paper.Tool that handles select mode. This is made up of 2 subtools.
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection-tools/selection-box-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {rectSelect} from '../guides';
import {clearSelection, processRectangularSelection} from '../selection';
import {getRaster} from '../layer';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/selection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../lib/modes';

import {getItemsGroup, isGroup} from './group';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/snapping.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getItems} from './selection';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/helper/style-path.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getSelectedLeafItems, getItems} from './selection';
import {isPointTextItem} from './item';
import {isGroup} from './group';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/tools/eye-dropper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {createCanvas, getRaster, getBackgroundGuideLayer} from '../layer';

const LOUPE_RADIUS = 20;
Expand Down
2 changes: 1 addition & 1 deletion src/helper/tools/fill-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {getHoveredItem} from '../hover';
import {expandBy} from '../math';
import {createGradientObject} from '../style-path';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/tools/oval-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../../lib/modes';
import {styleShape} from '../style-path';
import {clearSelection} from '../selection';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/tools/rect-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../../lib/modes';
import {styleShape} from '../style-path';
import {clearSelection} from '../selection';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/tools/rounded-rect-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import log from '../../log/log';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/helper/tools/text-tool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import Modes from '../../lib/modes';
import {clearSelection, getSelectedLeafItems} from '../selection';
import BoundingBoxTool from '../selection-tools/bounding-box-tool';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/undo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// undo functionality
// modifed from https://github.com/memononen/stylii
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {hideGuideLayers, showGuideLayers, getRaster} from '../helper/layer';
import {getSelectedLeafItems} from '../helper/selection';
import Formats, {isVector, isBitmap} from '../lib/format';
Expand Down
2 changes: 1 addition & 1 deletion src/helper/view.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {CROSSHAIR_SIZE, getBackgroundGuideLayer, getDragCrosshairLayer, getRaster} from './layer';
import {getAllRootItems, getSelectedRootItems} from './selection';
import {getHitBounds} from './bitmap';
Expand Down
2 changes: 1 addition & 1 deletion src/hocs/copy-paste-hoc.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import bindAll from 'lodash.bindall';
import PropTypes from 'prop-types';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/hocs/selection-hoc.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';

import PropTypes from 'prop-types';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion src/hocs/update-image-hoc.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import PropTypes from 'prop-types';
import log from '../log/log';
import bindAll from 'lodash.bindall';
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/fill-bitmap-shapes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import {CHANGE_SELECTED_ITEMS} from './selected-items';

const SET_FILLED = 'scratch-paint/fill-bitmap-shapes/SET_FILLED';
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/view-bounds.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import log from '../log/log';

const UPDATE_VIEW_BOUNDS = 'scratch-paint/view/UPDATE_VIEW_BOUNDS';
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/zoom-levels.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import paper from '@scratch/paper';
import paper from '@turbowarp/paper';
import log from '../log/log';

const SAVE_ZOOM_LEVEL = 'scratch-paint/zoom-levels/SAVE_ZOOM_LEVEL';
Expand Down

0 comments on commit 614f334

Please sign in to comment.