@tscircuit/schematic-viewer 0.0.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +27 -0
- package/CHANGELOG.md +8 -0
- package/package.json +7 -1
- package/release.config.js +10 -0
- package/src/Schematic.tsx +14 -1
- package/tsconfig.json +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -2104
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout code
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
|
|
15
|
+
- name: Setup Node.js
|
|
16
|
+
uses: actions/setup-node@v2
|
|
17
|
+
with:
|
|
18
|
+
node-version: 18
|
|
19
|
+
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: yarn install
|
|
22
|
+
|
|
23
|
+
- name: Semantic Release
|
|
24
|
+
env:
|
|
25
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
|
+
run: yarn semantic-release
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# 1.0.0 (2023-07-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add semantic release ([7ccf28b](https://github.com/tscircuit/schematic-viewer/commit/7ccf28b9d4f1e08d6f6a99995e115fe753c072dc))
|
|
7
|
+
* fix types and update react fiber ([f7efa31](https://github.com/tscircuit/schematic-viewer/commit/f7efa31eb48fc9886774356e38803de229eccd71))
|
|
8
|
+
* make easier to grab ([82d4c5f](https://github.com/tscircuit/schematic-viewer/commit/82d4c5fc0fa48281db13a7da5d8a92b6dd6a27b3))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/schematic-viewer",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"@chakra-ui/react": "^2.2.4",
|
|
19
19
|
"@emotion/react": "^11",
|
|
20
20
|
"@emotion/styled": "^11",
|
|
21
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
22
|
+
"@semantic-release/commit-analyzer": "^10.0.1",
|
|
23
|
+
"@semantic-release/github": "^9.0.3",
|
|
24
|
+
"@semantic-release/npm": "^10.0.4",
|
|
25
|
+
"@semantic-release/release-notes-generator": "^11.0.4",
|
|
21
26
|
"@storybook/addon-actions": "^6.5.9",
|
|
22
27
|
"@storybook/addon-essentials": "^6.5.9",
|
|
23
28
|
"@storybook/addon-interactions": "^6.5.9",
|
|
@@ -40,6 +45,7 @@
|
|
|
40
45
|
"react-no-ssr": "^1.1.0",
|
|
41
46
|
"react-use-measure": "^2.1.1",
|
|
42
47
|
"rectilinear-router": "^1.0.1",
|
|
48
|
+
"semantic-release": "^21.0.6",
|
|
43
49
|
"svg-path-bounds": "^1.0.2",
|
|
44
50
|
"svg-path-generator": "^1.1.0",
|
|
45
51
|
"transformation-matrix": "^2.12.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
branches: ["main"], // change this to your default branch if not `main`
|
|
3
|
+
plugins: [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
"@semantic-release/changelog",
|
|
7
|
+
"@semantic-release/npm",
|
|
8
|
+
"@semantic-release/github",
|
|
9
|
+
],
|
|
10
|
+
}
|
package/src/Schematic.tsx
CHANGED
|
@@ -26,9 +26,11 @@ const fallbackRender =
|
|
|
26
26
|
export const Schematic = ({
|
|
27
27
|
children,
|
|
28
28
|
elements: initialElements = [],
|
|
29
|
+
style,
|
|
29
30
|
}: {
|
|
30
31
|
children?: any
|
|
31
32
|
elements?: any
|
|
33
|
+
style?: any
|
|
32
34
|
}) => {
|
|
33
35
|
const [elements, setElements] = useState<any>(initialElements)
|
|
34
36
|
const [project, setProject] = useState<any>(null)
|
|
@@ -59,7 +61,18 @@ export const Schematic = ({
|
|
|
59
61
|
if (elements.length === 0) return null
|
|
60
62
|
|
|
61
63
|
return (
|
|
62
|
-
<div
|
|
64
|
+
<div
|
|
65
|
+
style={{
|
|
66
|
+
width: "100%",
|
|
67
|
+
backgroundColor: "rgba(255,255,255,0)",
|
|
68
|
+
minHeight: 200,
|
|
69
|
+
overflow: "hidden",
|
|
70
|
+
position: "relative",
|
|
71
|
+
cursor: "grab",
|
|
72
|
+
...style,
|
|
73
|
+
}}
|
|
74
|
+
ref={ref}
|
|
75
|
+
>
|
|
63
76
|
{elements.map((elm) => (
|
|
64
77
|
<ErrorBoundary fallbackRender={fallbackRender(elm)}>
|
|
65
78
|
<SchematicElement
|
package/tsconfig.json
CHANGED