Skip to content

Commit 797b5de

Browse files
CryogenicPlanetpatheticGeek
authored andcommitted
WIP Styling
1 parent f8196d9 commit 797b5de

File tree

6 files changed

+86
-20
lines changed

6 files changed

+86
-20
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.turbo/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{"teamId":"team_gPGmSMaFuy3jJl6E00x2coyr","apiUrl":"https://api.vercel.com"}

packages/tldraw/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
"zustand": "^3.6.9"
6161
},
6262
"devDependencies": {
63-
"@tldraw/core": "*",
64-
"@tldraw/intersect": "*",
65-
"@tldraw/vec": "*",
6663
"@swc-node/jest": "^1.4.3",
6764
"@testing-library/jest-dom": "^5.16.2",
6865
"@testing-library/react": "^12.1.2",
66+
"@tldraw/core": "*",
67+
"@tldraw/intersect": "*",
68+
"@tldraw/vec": "*",
6969
"@types/node": "^17.0.14",
7070
"@types/react": "^17.0.38",
7171
"@typescript-eslint/eslint-plugin": "^5.10.2",
@@ -74,7 +74,8 @@
7474
"lask": "^0.0.29",
7575
"mobx": "^6.3.8",
7676
"react": ">=16.8",
77-
"react-dom": "^16.8 || ^17.0"
77+
"react-dom": "^16.8 || ^17.0",
78+
"twind": "^0.16.16"
7879
},
7980
"jest": {
8081
"setupFilesAfterEnv": [
@@ -103,4 +104,4 @@
103104
}
104105
},
105106
"gitHead": "4b1137849ad07da36fc8f0f19cb64e7535a79296"
106-
}
107+
}

packages/tldraw/src/components/TopPanel/StyleMenu/StyleMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export const StyleMenu = React.memo(function ColorMenu(): JSX.Element {
206206
size={18}
207207
strokeWidth={2.5}
208208
fill={
209-
displayedStyle.isFilled ? fills.light[style as ColorStyle] : 'transparent'
209+
'transparent'
210210
}
211211
stroke={strokes.light[style as ColorStyle]}
212212
/>

packages/tldraw/src/styles/stitches.config.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { createStitches, defaultThemeMap } from '@stitches/react'
22

3+
import * as colors from 'twind/colors'
4+
35
const { styled, createTheme } = createStitches({
46
themeMap: {
57
...defaultThemeMap,
@@ -8,18 +10,18 @@ const { styled, createTheme } = createStitches({
810
colors: {
911
bounds: 'rgba(65, 132, 244, 1.000)',
1012
boundsBg: 'rgba(65, 132, 244, 0.05)',
11-
hover: '#ececec',
12-
overlay: 'rgba(0, 0, 0, 0.15)',
13+
hover: colors.blueGray[800],
14+
overlay: colors.blueGray[800],
1315
overlayContrast: 'rgba(255, 255, 255, 0.15)',
14-
panel: '#fefefe',
16+
panel: colors.blueGray[900],
1517
panelContrast: '#ffffff',
1618
selected: 'rgba(66, 133, 244, 1.000)',
1719
selectedContrast: '#fefefe',
1820
sponsor: '#ec6cb9',
1921
sponsorContrast: '#ec6cb944',
20-
text: '#333333',
21-
tooltip: '#1d1d1d',
22-
tooltipContrast: '#ffffff',
22+
text: colors.gray['300'],
23+
tooltip: colors.black,
24+
tooltipContrast: colors.gray[300],
2325
warn: 'rgba(255, 100, 100, 1)',
2426
},
2527
shadows: {
@@ -51,8 +53,8 @@ const { styled, createTheme } = createStitches({
5153
4: '18px',
5254
},
5355
fonts: {
54-
ui: '"Recursive", system-ui, sans-serif',
55-
body: '"Recursive", system-ui, sans-serif',
56+
ui: '"Inter", system-ui, sans-serif',
57+
body: '"Inter ", system-ui, sans-serif',
5658
mono: '"Recursive Mono", monospace',
5759
},
5860
fontWeights: {},
@@ -98,15 +100,15 @@ export const dark = createTheme({
98100
colors: {
99101
bounds: 'rgba(38, 150, 255, 1.000)',
100102
boundsBg: 'rgba(38, 150, 255, 0.05)',
101-
hover: '#444A50',
103+
hover: colors.blueGray[800],
102104
overlay: 'rgba(0, 0, 0, 0.15)',
103105
overlayContrast: 'rgba(255, 255, 255, 0.15)',
104-
panel: '#363D44',
106+
panel: colors.blueGray[900],
105107
panelContrast: '#49555f',
106108
selected: 'rgba(38, 150, 255, 1.000)',
107109
selectedContrast: '#fefefe',
108-
text: '#f8f9fa',
109-
tooltip: '#1d1d1d',
110+
text: colors.gray[100],
111+
tooltip: colors.black,
110112
tooltipContrast: '#ffffff',
111113
},
112114
shadows: {

yarn.lock

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4636,6 +4636,11 @@ csstype@^3.0.2, csstype@^3.0.4:
46364636
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.10.tgz#2ad3a7bed70f35b965707c092e5f30b327c290e5"
46374637
integrity sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==
46384638

4639+
csstype@^3.0.5:
4640+
version "3.0.11"
4641+
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33"
4642+
integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==
4643+
46394644
csv-generate@^3.4.3:
46404645
version "3.4.3"
46414646
resolved "https://registry.yarnpkg.com/csv-generate/-/csv-generate-3.4.3.tgz#bc42d943b45aea52afa896874291da4b9108ffff"
@@ -4987,6 +4992,20 @@ dom-accessibility-api@^0.5.6, dom-accessibility-api@^0.5.9:
49874992
resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.11.tgz#79d5846c4f90eba3e617d9031e921de9324f84ed"
49884993
integrity sha512-7X6GvzjYf4yTdRKuCVScV+aA9Fvh5r8WzWrXBH9w82ZWB/eYDMGCnazoC/YAqAzUJWHzLOnZqr46K3iEyUhUvw==
49894994

4995+
dom-serializer@^1.0.1:
4996+
version "1.3.2"
4997+
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91"
4998+
integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==
4999+
dependencies:
5000+
domelementtype "^2.0.1"
5001+
domhandler "^4.2.0"
5002+
entities "^2.0.0"
5003+
5004+
domelementtype@^2.0.1, domelementtype@^2.2.0:
5005+
version "2.2.0"
5006+
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
5007+
integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==
5008+
49905009
domexception@^1.0.1:
49915010
version "1.0.1"
49925011
resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
@@ -5001,6 +5020,22 @@ domexception@^2.0.1:
50015020
dependencies:
50025021
webidl-conversions "^5.0.0"
50035022

5023+
domhandler@^4.0.0, domhandler@^4.2.0:
5024+
version "4.3.0"
5025+
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.0.tgz#16c658c626cf966967e306f966b431f77d4a5626"
5026+
integrity sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==
5027+
dependencies:
5028+
domelementtype "^2.2.0"
5029+
5030+
domutils@^2.5.2:
5031+
version "2.8.0"
5032+
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
5033+
integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==
5034+
dependencies:
5035+
dom-serializer "^1.0.1"
5036+
domelementtype "^2.2.0"
5037+
domhandler "^4.2.0"
5038+
50045039
dot-prop@^5.2.0:
50055040
version "5.3.0"
50065041
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88"
@@ -5181,6 +5216,11 @@ enquirer@^2.3.0:
51815216
dependencies:
51825217
ansi-colors "^4.1.1"
51835218

5219+
entities@^2.0.0:
5220+
version "2.2.0"
5221+
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
5222+
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
5223+
51845224
env-paths@^2.2.0:
51855225
version "2.2.1"
51865226
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
@@ -6376,6 +6416,16 @@ html-escaper@^2.0.0:
63766416
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
63776417
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
63786418

6419+
htmlparser2@^6.0.0:
6420+
version "6.1.0"
6421+
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7"
6422+
integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==
6423+
dependencies:
6424+
domelementtype "^2.0.1"
6425+
domhandler "^4.0.0"
6426+
domutils "^2.5.2"
6427+
entities "^2.0.0"
6428+
63796429
http-cache-semantics@^4.0.0:
63806430
version "4.1.0"
63816431
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
@@ -9934,6 +9984,11 @@ strip-json-comments@~2.0.1:
99349984
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
99359985
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
99369986

9987+
style-vendorizer@^2.0.0:
9988+
version "2.1.1"
9989+
resolved "https://registry.yarnpkg.com/style-vendorizer/-/style-vendorizer-2.1.1.tgz#5f06601c1724cfb314fe1153e7e442c58dde771c"
9990+
integrity sha512-gVO6Cwxtg8iX0X1W4xMhSc5WbQpiIBQDkhq3JkwebMRRgyhCfuvMrnPlTAGTRjfQPGRmzgjCOZ4drehTnLahHA==
9991+
99379992
styled-jsx@5.0.0:
99389993
version "5.0.0"
99399994
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0.tgz#816b4b92e07b1786c6b7111821750e0ba4d26e77"
@@ -10328,6 +10383,15 @@ turbo@^1.1.2:
1032810383
turbo-windows-32 "1.1.2"
1032910384
turbo-windows-64 "1.1.2"
1033010385

10386+
twind@^0.16.16:
10387+
version "0.16.16"
10388+
resolved "https://registry.yarnpkg.com/twind/-/twind-0.16.16.tgz#76959cd21897528f9a2631a293e3381b668332ad"
10389+
integrity sha512-UlAYjkGCdgjg4xU1SIwRW0PpG0anZrY32+kS2jYsi32yb4RuW0ttzaI1OglgwAUk/rZwzoINilnIFORzOSFZag==
10390+
dependencies:
10391+
csstype "^3.0.5"
10392+
htmlparser2 "^6.0.0"
10393+
style-vendorizer "^2.0.0"
10394+
1033110395
type-check@^0.4.0, type-check@~0.4.0:
1033210396
version "0.4.0"
1033310397
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"

0 commit comments

Comments
 (0)