Skip to content

Commit cc7724d

Browse files
committedAug 5, 2022
chore: apply lerna
1 parent bedca34 commit cc7724d

18 files changed

+34792
-34542
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ outjs/
109109
declaration/
110110
css/
111111
TODO.md
112+
*.lerna-backup
112113
*.pem

‎demo/docusaurus.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ const config = {
3535
},
3636
theme: {
3737
customCss: [
38-
require.resolve("./src/css/custom.css"),
39-
require.resolve("./src/css/global.css"),
38+
require.resolve("./src/styles/custom.css"),
39+
require.resolve("./src/styles/global.css"),
4040
require.resolve("../packages/view3d/sass/view3d-bundle.sass"),
41-
require.resolve("./src/css/bulma-override.sass"),
41+
require.resolve("./src/styles/bulma-override.sass"),
4242
require.resolve("rc-slider/assets/index.css")
4343
]
4444
},

‎demo/src/styles/bulma-override.sass

+214
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
$primary: #3D642D
2+
$info: #3e8ed0
3+
$success: #48c78e
4+
$warning: #ffe08a
5+
$danger: #f14668
6+
$dark: rgba(0,0,0,.7)
7+
8+
@import "../../node_modules/bulma/sass/base/animations.sass"
9+
@import "../../node_modules/bulma/sass/utilities/_all.sass"
10+
@import "../../node_modules/bulma/sass/helpers/_all.sass"
11+
@import "../../node_modules/bulma/sass/form/_all.sass"
12+
@import "../../node_modules/bulma/sass/layout/hero.sass"
13+
@import "../../node_modules/bulma/sass/layout/section.sass"
14+
@import "../../node_modules/bulma/sass/grid/tiles.sass"
15+
@import "../../node_modules/bulma/sass/grid/columns.sass"
16+
@import "../../node_modules/bulma/sass/elements/box.sass"
17+
@import "../../node_modules/bulma/sass/elements/button.sass"
18+
@import "../../node_modules/bulma/sass/elements/content.sass"
19+
@import "../../node_modules/bulma/sass/elements/icon.sass"
20+
@import "../../node_modules/bulma/sass/elements/image.sass"
21+
@import "../../node_modules/bulma/sass/elements/title.sass"
22+
@import "../../node_modules/bulma/sass/components/card.sass"
23+
@import "../../node_modules/bulma/sass/components/message.sass"
24+
@import "../../node_modules/bulma/sass/components/level.sass"
25+
@import "../../node_modules/bulma/sass/components/menu.sass"
26+
27+
$body-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !default
28+
$code-family: monospace !default
29+
30+
body,
31+
button,
32+
input,
33+
optgroup,
34+
select,
35+
textarea
36+
font-family: $body-family
37+
38+
code,
39+
pre
40+
-moz-osx-font-smoothing: auto
41+
-webkit-font-smoothing: auto
42+
font-family: $code-family
43+
44+
body
45+
font-size: 1em
46+
47+
h1,
48+
h2,
49+
h3,
50+
h4,
51+
h5,
52+
h6
53+
font-weight: normal
54+
55+
h1
56+
font-size: 3rem
57+
h2
58+
font-size: 2rem
59+
h3
60+
font-size: 1.5rem
61+
62+
.title,
63+
.subtitle
64+
color: var(--ifm-font-color-base)
65+
66+
$tag-background-color: $background !default
67+
$tag-color: $text !default
68+
$tag-radius: $radius !default
69+
$tag-delete-margin: 1px !default
70+
71+
$tag-colors: $colors !default
72+
73+
.bulma-tags
74+
align-items: center
75+
display: flex
76+
flex-wrap: wrap
77+
justify-content: flex-start
78+
.bulma-tag
79+
margin-bottom: 0.5rem
80+
&:not(:last-child)
81+
+ltr-property("margin", 0.5rem)
82+
&:last-child
83+
margin-bottom: -0.5rem
84+
&:not(:last-child)
85+
margin-bottom: 1rem
86+
// Sizes
87+
&.are-medium
88+
.bulma-tag:not(.is-normal):not(.is-large)
89+
font-size: $size-normal
90+
&.are-large
91+
.bulma-tag:not(.is-normal):not(.is-medium)
92+
font-size: $size-medium
93+
&.is-centered
94+
justify-content: center
95+
.bulma-tag
96+
margin-right: 0.25rem
97+
margin-left: 0.25rem
98+
&.is-right
99+
justify-content: flex-end
100+
.bulma-tag
101+
&:not(:first-child)
102+
margin-left: 0.5rem
103+
&:not(:last-child)
104+
margin-right: 0
105+
&.has-addons
106+
.bulma-tag
107+
+ltr-property("margin", 0)
108+
&:not(:first-child)
109+
+ltr-property("margin", 0, false)
110+
+ltr
111+
border-top-left-radius: 0
112+
border-bottom-left-radius: 0
113+
+rtl
114+
border-top-right-radius: 0
115+
border-bottom-right-radius: 0
116+
&:not(:last-child)
117+
+ltr
118+
border-top-right-radius: 0
119+
border-bottom-right-radius: 0
120+
+rtl
121+
border-top-left-radius: 0
122+
border-bottom-left-radius: 0
123+
124+
.bulma-tag:not(body)
125+
align-items: center
126+
background-color: $tag-background-color
127+
border-radius: $tag-radius
128+
color: $tag-color
129+
display: inline-flex
130+
font-size: $size-small
131+
height: 2em
132+
justify-content: center
133+
line-height: 1.5
134+
padding-left: 0.75em
135+
padding-right: 0.75em
136+
white-space: nowrap
137+
.delete
138+
+ltr-property("margin", 0.25rem, false)
139+
+ltr-property("margin", -0.375rem)
140+
// Colors
141+
@each $name, $pair in $tag-colors
142+
$color: nth($pair, 1)
143+
$color-invert: nth($pair, 2)
144+
&.is-#{$name}
145+
background-color: $color
146+
color: $color-invert
147+
// If a light and dark colors are provided
148+
@if length($pair) > 3
149+
$color-light: nth($pair, 3)
150+
$color-dark: nth($pair, 4)
151+
&.is-light
152+
background-color: $color-light
153+
color: $color-dark
154+
// Sizes
155+
&.is-normal
156+
font-size: $size-small
157+
&.is-medium
158+
font-size: $size-normal
159+
&.is-large
160+
font-size: $size-medium
161+
.icon
162+
&:first-child:not(:last-child)
163+
+ltr-property("margin", -0.375em, false)
164+
+ltr-property("margin", 0.1875em)
165+
&:last-child:not(:first-child)
166+
+ltr-property("margin", 0.1875em, false)
167+
+ltr-property("margin", -0.375em)
168+
&:first-child:last-child
169+
+ltr-property("margin", -0.375em, false)
170+
+ltr-property("margin", -0.375em)
171+
// Modifiers
172+
&.is-delete
173+
+ltr-property("margin", $tag-delete-margin, false)
174+
padding: 0
175+
position: relative
176+
width: 2em
177+
&::before,
178+
&::after
179+
background-color: currentColor
180+
content: ""
181+
display: block
182+
left: 50%
183+
position: absolute
184+
top: 50%
185+
transform: translateX(-50%) translateY(-50%) rotate(45deg)
186+
transform-origin: center center
187+
&::before
188+
height: 1px
189+
width: 50%
190+
&::after
191+
height: 50%
192+
width: 1px
193+
&:hover,
194+
&:focus
195+
background-color: darken($tag-background-color, 5%)
196+
&:active
197+
background-color: darken($tag-background-color, 10%)
198+
&.is-rounded
199+
border-radius: $radius-rounded
200+
201+
a.bulma-tag
202+
&:hover
203+
text-decoration: underline
204+
205+
.block:not(:last-child)
206+
margin-bottom: 1.5rem
207+
208+
html[data-theme='dark'] .button
209+
background-color: rgba(0, 0, 0, 0.3)
210+
color: white
211+
212+
html[data-theme='dark'] .input
213+
background-color: rgba(0, 0, 0, 0.3)
214+
color: white

‎demo/src/styles/custom.css

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Any CSS included here will be global. The classic template
3+
* bundles Infima by default. Infima is a CSS framework designed to
4+
* work well for content-centric websites.
5+
*/
6+
7+
/* You can override the default Infima variables here. */
8+
:root {
9+
--ifm-color-primary: #62a048;
10+
--ifm-color-primary-dark: #53883d;
11+
--ifm-color-primary-darker: #457032;
12+
--ifm-color-primary-darkest: #27401d;
13+
--ifm-color-primary-light: #73b457;
14+
--ifm-color-primary-lighter: #87be6f;
15+
--ifm-color-primary-lightest: #afd49f;
16+
--ifm-code-font-size: 95%;
17+
}
18+
19+
.docusaurus-highlight-code-line {
20+
background-color: rgba(0, 0, 0, 0.1);
21+
display: block;
22+
margin: 0 calc(-1 * var(--ifm-pre-padding));
23+
padding: 0 var(--ifm-pre-padding);
24+
}
25+
26+
html[data-theme='dark'] .docusaurus-highlight-code-line {
27+
background-color: rgba(0, 0, 0, 0.3);
28+
}
29+
30+
html[data-theme='dark'] {
31+
--ifm-background-color: rgb(36, 37, 38);
32+
}
33+
34+
html[data-theme='dark'] .navbar {
35+
--ifm-navbar-shadow: 0 1px 2px 0 rgba(255, 255, 255, 0.1);
36+
}
37+
38+
.icon {
39+
fill: #000000;
40+
}
41+
42+
html[data-theme='dark'] .icon {
43+
fill: #ffffff;
44+
}

‎demo/src/styles/global.css

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
.header-github-link:hover,
2+
.header-npm-link:hover {
3+
opacity: 0.6;
4+
}
5+
6+
.header-github-link::before,
7+
.header-npm-link::before {
8+
content: '';
9+
width: 24px;
10+
height: 24px;
11+
display: flex;
12+
}
13+
14+
.header-github-link {
15+
margin-right: 0.5rem;
16+
}
17+
18+
.header-github-link::before {
19+
background: url("../../static/icon/github.svg") no-repeat;
20+
}
21+
22+
html[data-theme='dark'] .header-github-link::before {
23+
background: url("../../static/icon/github_white.svg") no-repeat;
24+
}
25+
26+
.header-npm-link::before {
27+
background: url("../../static/icon/npm.svg") no-repeat;
28+
}
29+
30+
.ar-model-swapper {
31+
display: flex;
32+
position: absolute;
33+
bottom: 0;
34+
left: 0;
35+
width: 100%;
36+
overflow-x: auto;
37+
}
38+
39+
.view3d-overlay {
40+
position: absolute;
41+
bottom: 0;
42+
left: 0;
43+
width: 100%;
44+
height: 100%;
45+
display: flex;
46+
justify-content: center;
47+
align-items: center;
48+
z-index: 1;
49+
pointer-events: none;
50+
}
51+
52+
.view3d-overlay > * {
53+
pointer-events: all;
54+
}
55+
56+
.view3d-overlay.hidden {
57+
display: none;
58+
}
59+
60+
.view3d-demo-controls {
61+
position: absolute;
62+
display: flex;
63+
top: 0;
64+
right: 0;
65+
flex-direction: column;
66+
}
67+
68+
/* rc-slider override */
69+
.rc-slider-track {
70+
background-color: var(--ifm-color-primary) !important;
71+
}
72+
73+
.rc-slider-handle {
74+
border: solid 2px var(--ifm-color-primary) !important;
75+
opacity: 1 !important;
76+
}
77+
78+
.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
79+
box-shadow: 0 0 0 5px var(--ifm-color-primary) !important;
80+
}

‎lerna.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
2-
"npmClient": "yarn",
3-
"useWorkspaces": true,
42
"packages": [
5-
"packages/*",
3+
"packages/view3d",
4+
"packages/react-view3d",
5+
"packages/vue-view3d",
6+
"packages/vue3-view3d",
7+
"packages/svelte-view3d",
68
"packages/ngx-view3d/projects/ngx-view3d"
79
],
810
"version": "independent",
911
"lernaHelperOptions": {
1012
"beforeReleaseScripts": [
11-
"npm run packages:build",
1213
"npm run demo:build",
1314
"npm run demo:deploy"
1415
]

0 commit comments

Comments
 (0)