Skip to content

Commit 76f73e3

Browse files
guenpGuen Prawiroatmodjo
authored andcommitted
chore: Move crumpy package to separate folder (#1)
1 parent 677e650 commit 76f73e3

21 files changed

+2876
-843
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ build.ninja
4444
node_modules
4545
MODULE.bazel.lock
4646
.ninja_lock
47-
glue/crumble/node_modules
48-
glue/crumble/crumpy/bundle.js
47+
crumble_js
48+
bundle.js
49+
.ipynb_checkpoints

glue/crumble/draw/config.js

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,7 @@
1-
/**
2-
* Copyright 2023 Craig Gidney
3-
* Copyright 2025 Riverlane
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
16-
*
17-
* Modifications:
18-
* - Refactored for CrumPy
19-
*/
20-
211
const pitch = 50;
222
const rad = 10;
233
const OFFSET_X = -pitch + Math.floor(pitch / 4) + 0.5;
244
const OFFSET_Y = -pitch + Math.floor(pitch / 4) + 0.5;
25-
let indentCircuitLines = true;
265
let curveConnectors = true;
27-
let showAnnotationRegions = true;
28-
29-
const setIndentCircuitLines = (newBool) => {
30-
if (typeof newBool !== "boolean") {
31-
throw new TypeError(`Expected a boolean, but got ${typeof newBool}`);
32-
}
33-
indentCircuitLines = newBool;
34-
};
35-
36-
const setCurveConnectors = (newBool) => {
37-
if (typeof newBool !== "boolean") {
38-
throw new TypeError(`Expected a boolean, but got ${typeof newBool}`);
39-
}
40-
curveConnectors = newBool;
41-
};
42-
43-
const setShowAnnotationRegions = (newBool) => {
44-
if (typeof newBool !== "boolean") {
45-
throw new TypeError(`Expected a boolean, but got ${typeof newBool}`);
46-
}
47-
showAnnotationRegions = newBool;
48-
};
496

50-
export {
51-
pitch,
52-
rad,
53-
OFFSET_X,
54-
OFFSET_Y,
55-
indentCircuitLines,
56-
curveConnectors,
57-
showAnnotationRegions,
58-
setIndentCircuitLines,
59-
setCurveConnectors,
60-
setShowAnnotationRegions,
61-
};
7+
export {pitch, rad, OFFSET_X, OFFSET_Y, curveConnectors};

0 commit comments

Comments
 (0)