mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
🐛 fix(build): fix build errors and add troubleshooting docs
Fixes multiple build errors discovered after removing recursive turbo calls: 1. Documentation: - Add comprehensive TROUBLESHOOTING.md covering recursive turbo issues - Includes prevention checklist and validation scripts - Documents both build and linting recursive problems 2. Storage app fixes: - Fix nested button HTML validation in FileCard, FolderCard, FileRow, FolderRow - Fix theme constant imports (DEFAULT_VARIANT, THEME_VARIANTS) - Fix auth component imports (StorageLogo → ManaIcon) 3. Presi app fixes: - Fix authStore import mismatch (authStore → auth) Build time improved from infinite loop to 36.3s (39/39 tasks successful). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e32e4b1b3a
commit
aca6cdbaa5
14 changed files with 2604 additions and 22 deletions
|
|
@ -3142,5 +3142,761 @@
|
|||
"cpuLoad": 0.22049967447916666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173119
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809127501,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34208628736,
|
||||
"memoryFree": 151109632,
|
||||
"memoryUsagePercent": 99.56021308898926,
|
||||
"memoryEfficiency": 0.4397869110107422,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2044677734375,
|
||||
"platform": "darwin",
|
||||
"uptime": 173149
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809157502,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34289860608,
|
||||
"memoryFree": 69877760,
|
||||
"memoryUsagePercent": 99.79662895202637,
|
||||
"memoryEfficiency": 0.2033710479736328,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.16019694010416666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173179
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809187503,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 30170988544,
|
||||
"memoryFree": 4188749824,
|
||||
"memoryUsagePercent": 87.80913352966309,
|
||||
"memoryEfficiency": 12.190866470336914,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.19368489583333334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173209
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809217504,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34275246080,
|
||||
"memoryFree": 84492288,
|
||||
"memoryUsagePercent": 99.75409507751465,
|
||||
"memoryEfficiency": 0.24590492248535156,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.17683919270833334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173239
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809247506,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34272296960,
|
||||
"memoryFree": 87441408,
|
||||
"memoryUsagePercent": 99.74551200866699,
|
||||
"memoryEfficiency": 0.2544879913330078,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.18575032552083334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173269
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809277508,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34293972992,
|
||||
"memoryFree": 65765376,
|
||||
"memoryUsagePercent": 99.80859756469727,
|
||||
"memoryEfficiency": 0.19140243530273438,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.20796712239583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173299
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809307508,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 33382416384,
|
||||
"memoryFree": 977321984,
|
||||
"memoryUsagePercent": 97.15561866760254,
|
||||
"memoryEfficiency": 2.844381332397461,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2376708984375,
|
||||
"platform": "darwin",
|
||||
"uptime": 173329
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809337509,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34154315776,
|
||||
"memoryFree": 205422592,
|
||||
"memoryUsagePercent": 99.40214157104492,
|
||||
"memoryEfficiency": 0.5978584289550781,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.19722493489583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173359
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809367510,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34279882752,
|
||||
"memoryFree": 79855616,
|
||||
"memoryUsagePercent": 99.7675895690918,
|
||||
"memoryEfficiency": 0.23241043090820312,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.1632080078125,
|
||||
"platform": "darwin",
|
||||
"uptime": 173389
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809397511,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34249375744,
|
||||
"memoryFree": 110362624,
|
||||
"memoryUsagePercent": 99.67880249023438,
|
||||
"memoryEfficiency": 0.321197509765625,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.19038899739583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173419
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809427513,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34186051584,
|
||||
"memoryFree": 173686784,
|
||||
"memoryUsagePercent": 99.49450492858887,
|
||||
"memoryEfficiency": 0.5054950714111328,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.14278157552083334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173449
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809457514,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34264547328,
|
||||
"memoryFree": 95191040,
|
||||
"memoryUsagePercent": 99.72295761108398,
|
||||
"memoryEfficiency": 0.2770423889160156,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.13936360677083334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173479
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809487515,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34263465984,
|
||||
"memoryFree": 96272384,
|
||||
"memoryUsagePercent": 99.71981048583984,
|
||||
"memoryEfficiency": 0.28018951416015625,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.18424479166666666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173509
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809517516,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34284077056,
|
||||
"memoryFree": 75661312,
|
||||
"memoryUsagePercent": 99.7797966003418,
|
||||
"memoryEfficiency": 0.22020339965820312,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.16434733072916666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173539
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809547519,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 33267187712,
|
||||
"memoryFree": 1092550656,
|
||||
"memoryUsagePercent": 96.82025909423828,
|
||||
"memoryEfficiency": 3.1797409057617188,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2657470703125,
|
||||
"platform": "darwin",
|
||||
"uptime": 173569
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809577520,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34130411520,
|
||||
"memoryFree": 229326848,
|
||||
"memoryUsagePercent": 99.33257102966309,
|
||||
"memoryEfficiency": 0.6674289703369141,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.22843424479166666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173599
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809607521,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 30222106624,
|
||||
"memoryFree": 4137631744,
|
||||
"memoryUsagePercent": 87.95790672302246,
|
||||
"memoryEfficiency": 12.042093276977539,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.18294270833333334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173629
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809637522,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 30275469312,
|
||||
"memoryFree": 4084269056,
|
||||
"memoryUsagePercent": 88.11321258544922,
|
||||
"memoryEfficiency": 11.886787414550781,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.1856689453125,
|
||||
"platform": "darwin",
|
||||
"uptime": 173659
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809667524,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34274656256,
|
||||
"memoryFree": 85082112,
|
||||
"memoryUsagePercent": 99.75237846374512,
|
||||
"memoryEfficiency": 0.2476215362548828,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.21061197916666666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173689
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809697525,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34285617152,
|
||||
"memoryFree": 74121216,
|
||||
"memoryUsagePercent": 99.7842788696289,
|
||||
"memoryEfficiency": 0.21572113037109375,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.16385904947916666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173719
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809727527,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34255060992,
|
||||
"memoryFree": 104677376,
|
||||
"memoryUsagePercent": 99.69534873962402,
|
||||
"memoryEfficiency": 0.30465126037597656,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.15669759114583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173749
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809757528,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34288353280,
|
||||
"memoryFree": 71385088,
|
||||
"memoryUsagePercent": 99.7922420501709,
|
||||
"memoryEfficiency": 0.20775794982910156,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.13932291666666666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173779
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809787530,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34292154368,
|
||||
"memoryFree": 67584000,
|
||||
"memoryUsagePercent": 99.80330467224121,
|
||||
"memoryEfficiency": 0.19669532775878906,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.13667805989583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173809
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809817532,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34265333760,
|
||||
"memoryFree": 94404608,
|
||||
"memoryUsagePercent": 99.72524642944336,
|
||||
"memoryEfficiency": 0.2747535705566406,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2581787109375,
|
||||
"platform": "darwin",
|
||||
"uptime": 173839
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809847533,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34290679808,
|
||||
"memoryFree": 69058560,
|
||||
"memoryUsagePercent": 99.79901313781738,
|
||||
"memoryEfficiency": 0.2009868621826172,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2714436848958333,
|
||||
"platform": "darwin",
|
||||
"uptime": 173869
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809877534,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34266169344,
|
||||
"memoryFree": 93569024,
|
||||
"memoryUsagePercent": 99.7276782989502,
|
||||
"memoryEfficiency": 0.2723217010498047,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.23604329427083334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173899
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809907535,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34282881024,
|
||||
"memoryFree": 76857344,
|
||||
"memoryUsagePercent": 99.77631568908691,
|
||||
"memoryEfficiency": 0.22368431091308594,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.21272786458333334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173929
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809937537,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34292678656,
|
||||
"memoryFree": 67059712,
|
||||
"memoryUsagePercent": 99.80483055114746,
|
||||
"memoryEfficiency": 0.19516944885253906,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.22306315104166666,
|
||||
"platform": "darwin",
|
||||
"uptime": 173959
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809967538,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34225209344,
|
||||
"memoryFree": 134529024,
|
||||
"memoryUsagePercent": 99.60846900939941,
|
||||
"memoryEfficiency": 0.39153099060058594,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.19868977864583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 173989
|
||||
},
|
||||
{
|
||||
"timestamp": 1764809997540,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34241200128,
|
||||
"memoryFree": 118538240,
|
||||
"memoryUsagePercent": 99.65500831604004,
|
||||
"memoryEfficiency": 0.34499168395996094,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.16890462239583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174019
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810027542,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34273034240,
|
||||
"memoryFree": 86704128,
|
||||
"memoryUsagePercent": 99.7476577758789,
|
||||
"memoryEfficiency": 0.25234222412109375,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.1854248046875,
|
||||
"platform": "darwin",
|
||||
"uptime": 174049
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810057543,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34195931136,
|
||||
"memoryFree": 163807232,
|
||||
"memoryUsagePercent": 99.52325820922852,
|
||||
"memoryEfficiency": 0.4767417907714844,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.4327799479166667,
|
||||
"platform": "darwin",
|
||||
"uptime": 174079
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810087545,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 30106075136,
|
||||
"memoryFree": 4253663232,
|
||||
"memoryUsagePercent": 87.62021064758301,
|
||||
"memoryEfficiency": 12.379789352416992,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.6828206380208334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174109
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810117546,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 33722908672,
|
||||
"memoryFree": 636829696,
|
||||
"memoryUsagePercent": 98.14658164978027,
|
||||
"memoryEfficiency": 1.8534183502197266,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.5090738932291666,
|
||||
"platform": "darwin",
|
||||
"uptime": 174139
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810147547,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34103132160,
|
||||
"memoryFree": 256606208,
|
||||
"memoryUsagePercent": 99.25317764282227,
|
||||
"memoryEfficiency": 0.7468223571777344,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.3933919270833333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174169
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810177549,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 28910272512,
|
||||
"memoryFree": 5449465856,
|
||||
"memoryUsagePercent": 84.13996696472168,
|
||||
"memoryEfficiency": 15.86003303527832,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 1.1097819010416667,
|
||||
"platform": "darwin",
|
||||
"uptime": 174199
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810207551,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 31305318400,
|
||||
"memoryFree": 3054419968,
|
||||
"memoryUsagePercent": 91.1104679107666,
|
||||
"memoryEfficiency": 8.889532089233398,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.765380859375,
|
||||
"platform": "darwin",
|
||||
"uptime": 174229
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810237551,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 27889696768,
|
||||
"memoryFree": 6470041600,
|
||||
"memoryUsagePercent": 81.1697006225586,
|
||||
"memoryEfficiency": 18.830299377441406,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.558837890625,
|
||||
"platform": "darwin",
|
||||
"uptime": 174259
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810267552,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 32701169664,
|
||||
"memoryFree": 1658568704,
|
||||
"memoryUsagePercent": 95.17292976379395,
|
||||
"memoryEfficiency": 4.827070236206055,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.4071044921875,
|
||||
"platform": "darwin",
|
||||
"uptime": 174289
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810297552,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 32922189824,
|
||||
"memoryFree": 1437548544,
|
||||
"memoryUsagePercent": 95.81618309020996,
|
||||
"memoryEfficiency": 4.183816909790039,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.3748372395833333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174319
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810327553,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 33121845248,
|
||||
"memoryFree": 1237893120,
|
||||
"memoryUsagePercent": 96.39725685119629,
|
||||
"memoryEfficiency": 3.602743148803711,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2720947265625,
|
||||
"platform": "darwin",
|
||||
"uptime": 174349
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810357555,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 33280344064,
|
||||
"memoryFree": 1079394304,
|
||||
"memoryUsagePercent": 96.85854911804199,
|
||||
"memoryEfficiency": 3.141450881958008,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.22041829427083334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174379
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810387556,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 25947226112,
|
||||
"memoryFree": 8412512256,
|
||||
"memoryUsagePercent": 75.51636695861816,
|
||||
"memoryEfficiency": 24.483633041381836,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.4248860677083333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174409
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810417557,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 26600914944,
|
||||
"memoryFree": 7758823424,
|
||||
"memoryUsagePercent": 77.41885185241699,
|
||||
"memoryEfficiency": 22.581148147583008,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2937825520833333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174439
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810447558,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 29076701184,
|
||||
"memoryFree": 5283037184,
|
||||
"memoryUsagePercent": 84.62433815002441,
|
||||
"memoryEfficiency": 15.375661849975586,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.5496419270833334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174469
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810477561,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 29329965056,
|
||||
"memoryFree": 5029773312,
|
||||
"memoryUsagePercent": 85.3614330291748,
|
||||
"memoryEfficiency": 14.638566970825195,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.4759114583333333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174499
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810507560,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 28347236352,
|
||||
"memoryFree": 6012502016,
|
||||
"memoryUsagePercent": 82.50131607055664,
|
||||
"memoryEfficiency": 17.49868392944336,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.523681640625,
|
||||
"platform": "darwin",
|
||||
"uptime": 174529
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810537561,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 29475389440,
|
||||
"memoryFree": 4884348928,
|
||||
"memoryUsagePercent": 85.7846736907959,
|
||||
"memoryEfficiency": 14.215326309204102,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.3527425130208333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174559
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810567563,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 28188655616,
|
||||
"memoryFree": 6171082752,
|
||||
"memoryUsagePercent": 82.03978538513184,
|
||||
"memoryEfficiency": 17.960214614868164,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.5089925130208334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174589
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810597565,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 28482764800,
|
||||
"memoryFree": 5876973568,
|
||||
"memoryUsagePercent": 82.89575576782227,
|
||||
"memoryEfficiency": 17.104244232177734,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.35595703125,
|
||||
"platform": "darwin",
|
||||
"uptime": 174619
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810627565,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34113224704,
|
||||
"memoryFree": 246513664,
|
||||
"memoryUsagePercent": 99.28255081176758,
|
||||
"memoryEfficiency": 0.7174491882324219,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.4571126302083333,
|
||||
"platform": "darwin",
|
||||
"uptime": 174649
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810657567,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 27917352960,
|
||||
"memoryFree": 6442385408,
|
||||
"memoryUsagePercent": 81.25019073486328,
|
||||
"memoryEfficiency": 18.74980926513672,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.7456868489583334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174679
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810687568,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 34270150656,
|
||||
"memoryFree": 89587712,
|
||||
"memoryUsagePercent": 99.73926544189453,
|
||||
"memoryEfficiency": 0.26073455810546875,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.8447265625,
|
||||
"platform": "darwin",
|
||||
"uptime": 174709
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810717570,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 26351828992,
|
||||
"memoryFree": 8007909376,
|
||||
"memoryUsagePercent": 76.69391632080078,
|
||||
"memoryEfficiency": 23.30608367919922,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.8650309244791666,
|
||||
"platform": "darwin",
|
||||
"uptime": 174739
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810747573,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 27803418624,
|
||||
"memoryFree": 6556319744,
|
||||
"memoryUsagePercent": 80.91859817504883,
|
||||
"memoryEfficiency": 19.081401824951172,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.5467936197916666,
|
||||
"platform": "darwin",
|
||||
"uptime": 174769
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810777574,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 27426144256,
|
||||
"memoryFree": 6933594112,
|
||||
"memoryUsagePercent": 79.82058525085449,
|
||||
"memoryEfficiency": 20.179414749145508,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.3612060546875,
|
||||
"platform": "darwin",
|
||||
"uptime": 174799
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810807575,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 27739504640,
|
||||
"memoryFree": 6620233728,
|
||||
"memoryUsagePercent": 80.73258399963379,
|
||||
"memoryEfficiency": 19.26741600036621,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2709147135416667,
|
||||
"platform": "darwin",
|
||||
"uptime": 174829
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810837577,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 27795685376,
|
||||
"memoryFree": 6564052992,
|
||||
"memoryUsagePercent": 80.89609146118164,
|
||||
"memoryEfficiency": 19.10390853881836,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.20760091145833334,
|
||||
"platform": "darwin",
|
||||
"uptime": 174859
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810867578,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 28141436928,
|
||||
"memoryFree": 6218301440,
|
||||
"memoryUsagePercent": 81.9023609161377,
|
||||
"memoryEfficiency": 18.097639083862305,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.293212890625,
|
||||
"platform": "darwin",
|
||||
"uptime": 174889
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810897578,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 28248915968,
|
||||
"memoryFree": 6110822400,
|
||||
"memoryUsagePercent": 82.21516609191895,
|
||||
"memoryEfficiency": 17.784833908081055,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.19864908854166666,
|
||||
"platform": "darwin",
|
||||
"uptime": 174919
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810927580,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 29144449024,
|
||||
"memoryFree": 5215289344,
|
||||
"memoryUsagePercent": 84.8215103149414,
|
||||
"memoryEfficiency": 15.178489685058594,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.150634765625,
|
||||
"platform": "darwin",
|
||||
"uptime": 174949
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810957582,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 29376266240,
|
||||
"memoryFree": 4983472128,
|
||||
"memoryUsagePercent": 85.49618721008301,
|
||||
"memoryEfficiency": 14.503812789916992,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.2247314453125,
|
||||
"platform": "darwin",
|
||||
"uptime": 174979
|
||||
},
|
||||
{
|
||||
"timestamp": 1764810987581,
|
||||
"memoryTotal": 34359738368,
|
||||
"memoryUsed": 30422728704,
|
||||
"memoryFree": 3937009664,
|
||||
"memoryUsagePercent": 88.54179382324219,
|
||||
"memoryEfficiency": 11.458206176757812,
|
||||
"cpuCount": 12,
|
||||
"cpuLoad": 0.16337076822916666,
|
||||
"platform": "darwin",
|
||||
"uptime": 175009
|
||||
}
|
||||
]
|
||||
285
TROUBLESHOOTING.md
Normal file
285
TROUBLESHOOTING.md
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
# Troubleshooting Guide
|
||||
|
||||
Common issues and solutions for the manacore-monorepo.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Recursive Turbo Calls](#recursive-turbo-calls)
|
||||
- [Build Issues](#build-issues)
|
||||
- [Linting Issues](#linting-issues)
|
||||
|
||||
---
|
||||
|
||||
## Recursive Turbo Calls
|
||||
|
||||
### Problem: Infinite Loop / Tasks Running Forever
|
||||
|
||||
**Symptoms:**
|
||||
|
||||
- `pnpm run build` runs for 10+ minutes without completing
|
||||
- `pnpm run lint` hangs indefinitely
|
||||
- `pnpm run type-check` shows thousands of duplicate task entries
|
||||
- CI/CD pipelines timeout after 10+ minutes
|
||||
|
||||
**Root Cause:**
|
||||
|
||||
Parent workspace packages (e.g., `apps/zitare/package.json`, `apps/presi/package.json`) have scripts that call `turbo run <task>`, creating an **infinite recursion loop**.
|
||||
|
||||
### How It Happens
|
||||
|
||||
```
|
||||
Root turbo → finds "build" script in apps/zitare/package.json
|
||||
→ runs "turbo run build" in zitare
|
||||
→ finds "build" script again
|
||||
→ runs "turbo run build" again
|
||||
→ (infinite loop!)
|
||||
```
|
||||
|
||||
### ❌ WRONG - Causes Infinite Recursion
|
||||
|
||||
```json
|
||||
// apps/zitare/package.json - DON'T DO THIS!
|
||||
{
|
||||
"scripts": {
|
||||
"build": "turbo run build", // ❌ WRONG
|
||||
"lint": "turbo run lint", // ❌ WRONG
|
||||
"type-check": "turbo run type-check", // ❌ WRONG
|
||||
"clean": "turbo run clean" // ❌ WRONG
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
// apps/picture/package.json - DON'T DO THIS!
|
||||
{
|
||||
"scripts": {
|
||||
"build": "pnpm run --recursive build", // ❌ WRONG
|
||||
"lint": "pnpm --filter '@picture/*' run lint" // ❌ WRONG
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### ✅ CORRECT - Let Root Turbo Handle Orchestration
|
||||
|
||||
```json
|
||||
// apps/zitare/package.json - CORRECT
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "turbo run dev", // ✅ OK for dev (persistent task, scoped)
|
||||
// No build, lint, type-check scripts - handled by root turbo
|
||||
"db:push": "pnpm --filter @zitare/backend db:push", // ✅ OK
|
||||
"db:studio": "pnpm --filter @zitare/backend db:studio" // ✅ OK
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Why `dev` is the Exception
|
||||
|
||||
Using `turbo run dev` in parent packages is acceptable because:
|
||||
|
||||
1. It's typically run directly on that package (scoped: `pnpm zitare:dev`)
|
||||
2. Dev tasks are persistent (long-running) and turbo handles them differently
|
||||
3. Root never orchestrates `dev` across all packages simultaneously
|
||||
|
||||
### The Rule
|
||||
|
||||
> **Parent workspace packages must NEVER have scripts that call `turbo run <task>` for tasks that turbo orchestrates from the root.**
|
||||
|
||||
Tasks orchestrated from root (defined in `turbo.json`):
|
||||
|
||||
- ✅ `build` - Root handles this
|
||||
- ✅ `lint` - Root handles this
|
||||
- ✅ `type-check` - Root handles this
|
||||
- ✅ `test` - Root handles this
|
||||
- ✅ `clean` - Root handles this
|
||||
- ❌ `dev` - Exception (scoped usage is fine)
|
||||
|
||||
### How to Fix
|
||||
|
||||
**If you added a recursive script:**
|
||||
|
||||
1. Open the parent package.json (e.g., `apps/myapp/package.json`)
|
||||
2. Remove the problematic script entirely:
|
||||
|
||||
```diff
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "turbo run dev",
|
||||
- "build": "turbo run build",
|
||||
- "lint": "turbo run lint",
|
||||
- "type-check": "turbo run type-check",
|
||||
"db:push": "pnpm --filter @myapp/backend db:push"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. The root `turbo.json` already handles orchestration for these tasks
|
||||
|
||||
### Affected Locations
|
||||
|
||||
Parent packages are located at:
|
||||
|
||||
- `apps/*/package.json` (e.g., `apps/zitare/package.json`)
|
||||
- `games/*/package.json` (e.g., `games/mana-games/package.json`)
|
||||
|
||||
**Do NOT add turbo scripts here!**
|
||||
|
||||
Child packages (these are fine):
|
||||
|
||||
- `apps/*/apps/*/package.json` (e.g., `apps/zitare/apps/backend/package.json`)
|
||||
- `packages/*/package.json` (e.g., `packages/shared-theme/package.json`)
|
||||
|
||||
---
|
||||
|
||||
## Build Issues
|
||||
|
||||
### Build Fails with "ELIFECYCLE Command failed"
|
||||
|
||||
**Check for:**
|
||||
|
||||
1. **Recursive turbo calls** (see above)
|
||||
2. **Missing dependencies** in a package
|
||||
3. **TypeScript errors** in source code
|
||||
4. **Import/export mismatches**
|
||||
|
||||
**Debugging:**
|
||||
|
||||
```bash
|
||||
# Run build and capture full output
|
||||
pnpm run build 2>&1 | tee build.log
|
||||
|
||||
# Search for actual error (not just ELIFECYCLE)
|
||||
grep -A10 "error during build" build.log
|
||||
|
||||
# Build specific package to isolate issue
|
||||
pnpm --filter @zitare/backend build
|
||||
```
|
||||
|
||||
### Build Times Out in CI
|
||||
|
||||
**Symptoms:**
|
||||
|
||||
- CI runs for 10+ minutes
|
||||
- Timeout before completion
|
||||
- "No output has been received in the last 10m0s"
|
||||
|
||||
**Solution:**
|
||||
|
||||
This is almost always caused by **recursive turbo calls**. See the [Recursive Turbo Calls](#recursive-turbo-calls) section above.
|
||||
|
||||
**Quick fix:**
|
||||
|
||||
```bash
|
||||
# Locally, check if build completes in reasonable time
|
||||
time pnpm run build
|
||||
|
||||
# Should complete in < 2 minutes for clean build
|
||||
# Should complete in < 30 seconds for cached build
|
||||
```
|
||||
|
||||
If it takes longer than 2-3 minutes, you have recursive scripts.
|
||||
|
||||
---
|
||||
|
||||
## Linting Issues
|
||||
|
||||
### Lint Hangs or Runs Forever
|
||||
|
||||
**Same issue as build** - recursive turbo calls!
|
||||
|
||||
**❌ WRONG:**
|
||||
|
||||
```json
|
||||
// apps/presi/package.json - DON'T DO THIS!
|
||||
{
|
||||
"scripts": {
|
||||
"lint": "pnpm --filter '@presi/*' run lint" // ❌ Recursive
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**✅ CORRECT:**
|
||||
|
||||
```json
|
||||
// apps/presi/package.json - Remove the lint script
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "pnpm --filter '@presi/*' run dev"
|
||||
// No lint script - root turbo handles it
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Run lint from root:**
|
||||
|
||||
```bash
|
||||
# Lint all packages
|
||||
pnpm run lint
|
||||
|
||||
# Lint specific package
|
||||
pnpm --filter @presi/backend lint
|
||||
|
||||
# Lint specific project
|
||||
pnpm turbo run lint --filter=presi
|
||||
```
|
||||
|
||||
### ESLint Errors
|
||||
|
||||
**Common issues:**
|
||||
|
||||
1. **Missing eslint config**
|
||||
|
||||
```bash
|
||||
# Add shared config
|
||||
pnpm add -D @manacore/eslint-config --filter @myapp/backend
|
||||
```
|
||||
|
||||
2. **Incompatible ESLint versions**
|
||||
|
||||
```bash
|
||||
# Check versions
|
||||
pnpm ls eslint
|
||||
|
||||
# Update to match root version
|
||||
pnpm add -D eslint@latest --filter @myapp/backend
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Prevention Checklist
|
||||
|
||||
When creating a new app or package:
|
||||
|
||||
- [ ] **DO NOT** add `build`, `lint`, `type-check`, or `test` scripts to parent packages
|
||||
- [ ] **DO** add these scripts to child packages (apps/myapp/apps/backend/package.json)
|
||||
- [ ] **DO** use project-specific scripts (e.g., `db:push`, `db:studio`)
|
||||
- [ ] **DO** test locally: `pnpm run build` should complete in < 2 minutes
|
||||
- [ ] **DO** refer to `CLAUDE.md` for patterns
|
||||
|
||||
### Quick Validation
|
||||
|
||||
```bash
|
||||
# Check for problematic patterns in parent packages
|
||||
for pkg in apps/*/package.json games/*/package.json; do
|
||||
if grep -q '"build".*turbo run build' "$pkg" 2>/dev/null; then
|
||||
echo "❌ RECURSIVE SCRIPT FOUND: $pkg"
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- [CLAUDE.md - Turborepo Configuration](./CLAUDE.md#turborepo-configuration)
|
||||
- [turbo.json](./turbo.json) - Root task orchestration
|
||||
- [Turborepo Docs](https://turbo.build/repo/docs)
|
||||
|
||||
## Getting Help
|
||||
|
||||
If you encounter an issue not covered here:
|
||||
|
||||
1. Check the [GitHub Issues](https://github.com/Memo-2023/manacore-monorepo/issues)
|
||||
2. Review recent commits that may have introduced the issue
|
||||
3. Run `pnpm clean` and `pnpm install` to reset
|
||||
4. Create a new issue with full error logs
|
||||
961
apps/picture/packages/design-tokens/native/theme.d.ts
vendored
Normal file
961
apps/picture/packages/design-tokens/native/theme.d.ts
vendored
Normal file
|
|
@ -0,0 +1,961 @@
|
|||
/**
|
||||
* Semantic color definitions
|
||||
* Maps intent/purpose to actual colors
|
||||
*/
|
||||
declare const semanticColors: {
|
||||
/**
|
||||
* Dark mode colors
|
||||
*/
|
||||
readonly dark: {
|
||||
readonly background: '#000000';
|
||||
readonly surface: '#1a1a1a';
|
||||
readonly elevated: '#242424';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
readonly border: '#383838';
|
||||
readonly divider: '#2a2a2a';
|
||||
readonly input: {
|
||||
readonly background: '#1f1f1f';
|
||||
readonly border: '#383838';
|
||||
readonly text: '#f3f4f6';
|
||||
readonly placeholder: '#6b7280';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#f3f4f6';
|
||||
readonly secondary: '#d1d5db';
|
||||
readonly tertiary: '#9ca3af';
|
||||
readonly disabled: '#6b7280';
|
||||
readonly inverse: '#000000';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#818cf8';
|
||||
readonly hover: '#a5b4fc';
|
||||
readonly active: '#6366f1';
|
||||
readonly light: '#c7d2fe';
|
||||
readonly dark: '#4f46e5';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#a78bfa';
|
||||
readonly light: '#c4b5fd';
|
||||
readonly dark: '#8b5cf6';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#818cf8';
|
||||
readonly skeleton: '#2a2a2a';
|
||||
readonly shimmer: '#383838';
|
||||
};
|
||||
/**
|
||||
* Light mode colors
|
||||
*/
|
||||
readonly light: {
|
||||
readonly background: '#ffffff';
|
||||
readonly surface: '#f9fafb';
|
||||
readonly elevated: '#ffffff';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.5)';
|
||||
readonly border: '#e5e7eb';
|
||||
readonly divider: '#f3f4f6';
|
||||
readonly input: {
|
||||
readonly background: '#ffffff';
|
||||
readonly border: '#d1d5db';
|
||||
readonly text: '#111827';
|
||||
readonly placeholder: '#9ca3af';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#111827';
|
||||
readonly secondary: '#374151';
|
||||
readonly tertiary: '#6b7280';
|
||||
readonly disabled: '#9ca3af';
|
||||
readonly inverse: '#ffffff';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#6366f1';
|
||||
readonly hover: '#4f46e5';
|
||||
readonly active: '#4338ca';
|
||||
readonly light: '#818cf8';
|
||||
readonly dark: '#3730a3';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#8b5cf6';
|
||||
readonly light: '#a78bfa';
|
||||
readonly dark: '#7c3aed';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#6366f1';
|
||||
readonly skeleton: '#e5e7eb';
|
||||
readonly shimmer: '#f3f4f6';
|
||||
};
|
||||
};
|
||||
type SemanticColors = typeof semanticColors.dark;
|
||||
type ColorMode = 'light' | 'dark';
|
||||
|
||||
/**
|
||||
* @memoro/design-tokens - Themes
|
||||
*
|
||||
* Theme variants with different color palettes.
|
||||
* All themes support both light and dark modes.
|
||||
*/
|
||||
|
||||
/**
|
||||
* All available themes
|
||||
*/
|
||||
declare const themes: {
|
||||
readonly default: {
|
||||
readonly name: 'default';
|
||||
readonly displayName: 'Indigo';
|
||||
readonly colors: {
|
||||
readonly light: {
|
||||
readonly background: '#ffffff';
|
||||
readonly surface: '#f9fafb';
|
||||
readonly elevated: '#ffffff';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.5)';
|
||||
readonly border: '#e5e7eb';
|
||||
readonly divider: '#f3f4f6';
|
||||
readonly input: {
|
||||
readonly background: '#ffffff';
|
||||
readonly border: '#d1d5db';
|
||||
readonly text: '#111827';
|
||||
readonly placeholder: '#9ca3af';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#111827';
|
||||
readonly secondary: '#374151';
|
||||
readonly tertiary: '#6b7280';
|
||||
readonly disabled: '#9ca3af';
|
||||
readonly inverse: '#ffffff';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#6366f1';
|
||||
readonly hover: '#4f46e5';
|
||||
readonly active: '#4338ca';
|
||||
readonly light: '#818cf8';
|
||||
readonly dark: '#3730a3';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#8b5cf6';
|
||||
readonly light: '#a78bfa';
|
||||
readonly dark: '#7c3aed';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#6366f1';
|
||||
readonly skeleton: '#e5e7eb';
|
||||
readonly shimmer: '#f3f4f6';
|
||||
};
|
||||
readonly dark: {
|
||||
readonly background: '#000000';
|
||||
readonly surface: '#1a1a1a';
|
||||
readonly elevated: '#242424';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
readonly border: '#383838';
|
||||
readonly divider: '#2a2a2a';
|
||||
readonly input: {
|
||||
readonly background: '#1f1f1f';
|
||||
readonly border: '#383838';
|
||||
readonly text: '#f3f4f6';
|
||||
readonly placeholder: '#6b7280';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#f3f4f6';
|
||||
readonly secondary: '#d1d5db';
|
||||
readonly tertiary: '#9ca3af';
|
||||
readonly disabled: '#6b7280';
|
||||
readonly inverse: '#000000';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#818cf8';
|
||||
readonly hover: '#a5b4fc';
|
||||
readonly active: '#6366f1';
|
||||
readonly light: '#c7d2fe';
|
||||
readonly dark: '#4f46e5';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#a78bfa';
|
||||
readonly light: '#c4b5fd';
|
||||
readonly dark: '#8b5cf6';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#818cf8';
|
||||
readonly skeleton: '#2a2a2a';
|
||||
readonly shimmer: '#383838';
|
||||
};
|
||||
};
|
||||
readonly shadows: {
|
||||
readonly dark: {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.3;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.4;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
readonly light: {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.1;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.15;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
};
|
||||
readonly opacity: {
|
||||
readonly disabled: 0.5;
|
||||
readonly overlay: 0.8;
|
||||
readonly hover: 0.9;
|
||||
readonly pressed: 0.7;
|
||||
};
|
||||
};
|
||||
readonly sunset: {
|
||||
readonly name: 'sunset';
|
||||
readonly displayName: 'Sunset';
|
||||
readonly colors: {
|
||||
readonly light: {
|
||||
readonly background: '#ffffff';
|
||||
readonly surface: '#f9fafb';
|
||||
readonly elevated: '#ffffff';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.5)';
|
||||
readonly border: '#e5e7eb';
|
||||
readonly divider: '#f3f4f6';
|
||||
readonly input: {
|
||||
readonly background: '#ffffff';
|
||||
readonly border: '#d1d5db';
|
||||
readonly text: '#111827';
|
||||
readonly placeholder: '#9ca3af';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#111827';
|
||||
readonly secondary: '#374151';
|
||||
readonly tertiary: '#6b7280';
|
||||
readonly disabled: '#9ca3af';
|
||||
readonly inverse: '#ffffff';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#6366f1';
|
||||
readonly hover: '#4f46e5';
|
||||
readonly active: '#4338ca';
|
||||
readonly light: '#818cf8';
|
||||
readonly dark: '#3730a3';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#8b5cf6';
|
||||
readonly light: '#a78bfa';
|
||||
readonly dark: '#7c3aed';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#6366f1';
|
||||
readonly skeleton: '#e5e7eb';
|
||||
readonly shimmer: '#f3f4f6';
|
||||
};
|
||||
readonly dark: {
|
||||
readonly background: '#0a0a0a';
|
||||
readonly surface: '#1f1410';
|
||||
readonly elevated: '#2a1f1a';
|
||||
readonly border: '#3d2f28';
|
||||
readonly divider: '#2a1f1a';
|
||||
readonly input: {
|
||||
readonly background: '#1a1410';
|
||||
readonly border: '#3d2f28';
|
||||
readonly text: '#fef3c7';
|
||||
readonly placeholder: '#92400e';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#fef3c7';
|
||||
readonly secondary: '#fcd34d';
|
||||
readonly tertiary: '#f59e0b';
|
||||
readonly disabled: '#92400e';
|
||||
readonly inverse: '#0a0a0a';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#fb923c';
|
||||
readonly hover: '#fdba74';
|
||||
readonly active: '#f97316';
|
||||
readonly light: '#fed7aa';
|
||||
readonly dark: '#ea580c';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#f472b6';
|
||||
readonly light: '#f9a8d4';
|
||||
readonly dark: '#ec4899';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#fbbf24';
|
||||
readonly error: '#f43f5e';
|
||||
readonly info: '#60a5fa';
|
||||
readonly favorite: '#f43f5e';
|
||||
readonly like: '#f43f5e';
|
||||
readonly tag: '#fb923c';
|
||||
readonly skeleton: '#2a1f1a';
|
||||
readonly shimmer: '#3d2f28';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
};
|
||||
};
|
||||
readonly shadows: {
|
||||
readonly dark: {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.3;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.4;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
readonly light: {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.1;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.15;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
};
|
||||
readonly opacity: {
|
||||
readonly disabled: 0.5;
|
||||
readonly overlay: 0.8;
|
||||
readonly hover: 0.9;
|
||||
readonly pressed: 0.7;
|
||||
};
|
||||
};
|
||||
readonly ocean: {
|
||||
readonly name: 'ocean';
|
||||
readonly displayName: 'Ocean';
|
||||
readonly colors: {
|
||||
readonly light: {
|
||||
readonly background: '#ffffff';
|
||||
readonly surface: '#f9fafb';
|
||||
readonly elevated: '#ffffff';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.5)';
|
||||
readonly border: '#e5e7eb';
|
||||
readonly divider: '#f3f4f6';
|
||||
readonly input: {
|
||||
readonly background: '#ffffff';
|
||||
readonly border: '#d1d5db';
|
||||
readonly text: '#111827';
|
||||
readonly placeholder: '#9ca3af';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#111827';
|
||||
readonly secondary: '#374151';
|
||||
readonly tertiary: '#6b7280';
|
||||
readonly disabled: '#9ca3af';
|
||||
readonly inverse: '#ffffff';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#6366f1';
|
||||
readonly hover: '#4f46e5';
|
||||
readonly active: '#4338ca';
|
||||
readonly light: '#818cf8';
|
||||
readonly dark: '#3730a3';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#8b5cf6';
|
||||
readonly light: '#a78bfa';
|
||||
readonly dark: '#7c3aed';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#6366f1';
|
||||
readonly skeleton: '#e5e7eb';
|
||||
readonly shimmer: '#f3f4f6';
|
||||
};
|
||||
readonly dark: {
|
||||
readonly background: string;
|
||||
readonly surface: string;
|
||||
readonly elevated: string;
|
||||
readonly border: string;
|
||||
readonly divider: string;
|
||||
readonly input: {
|
||||
readonly background: string;
|
||||
readonly border: string;
|
||||
readonly text: '#e0f2fe';
|
||||
readonly placeholder: '#0c4a6e';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#e0f2fe';
|
||||
readonly secondary: '#7dd3fc';
|
||||
readonly tertiary: '#38bdf8';
|
||||
readonly disabled: '#0c4a6e';
|
||||
readonly inverse: string;
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: string;
|
||||
readonly hover: string;
|
||||
readonly active: string;
|
||||
readonly light: string;
|
||||
readonly dark: string;
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: string;
|
||||
readonly light: string;
|
||||
readonly dark: string;
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#fbbf24';
|
||||
readonly error: '#f43f5e';
|
||||
readonly info: '#0ea5e9';
|
||||
readonly favorite: '#f43f5e';
|
||||
readonly like: '#f43f5e';
|
||||
readonly tag: string;
|
||||
readonly skeleton: string;
|
||||
readonly shimmer: string;
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
};
|
||||
};
|
||||
readonly shadows: {
|
||||
readonly dark: {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.3;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.4;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
readonly light: {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.1;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.15;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
};
|
||||
readonly opacity: {
|
||||
readonly disabled: 0.5;
|
||||
readonly overlay: 0.8;
|
||||
readonly hover: 0.9;
|
||||
readonly pressed: 0.7;
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Type exports
|
||||
*/
|
||||
type ThemeVariant = keyof typeof themes;
|
||||
|
||||
/**
|
||||
* @memoro/design-tokens - React Native Helpers
|
||||
*
|
||||
* Helper functions to use design tokens in React Native.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get theme colors for a specific variant and mode
|
||||
*/
|
||||
declare function getThemeColors(variant?: ThemeVariant, mode?: ColorMode): SemanticColors;
|
||||
/**
|
||||
* Create a complete React Native theme object
|
||||
*/
|
||||
declare function createNativeTheme(
|
||||
variant?: ThemeVariant,
|
||||
mode?: ColorMode
|
||||
): {
|
||||
readonly variant: 'default' | 'sunset' | 'ocean';
|
||||
readonly mode: ColorMode;
|
||||
readonly colors:
|
||||
| {
|
||||
readonly background: '#000000';
|
||||
readonly surface: '#1a1a1a';
|
||||
readonly elevated: '#242424';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
readonly border: '#383838';
|
||||
readonly divider: '#2a2a2a';
|
||||
readonly input: {
|
||||
readonly background: '#1f1f1f';
|
||||
readonly border: '#383838';
|
||||
readonly text: '#f3f4f6';
|
||||
readonly placeholder: '#6b7280';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#f3f4f6';
|
||||
readonly secondary: '#d1d5db';
|
||||
readonly tertiary: '#9ca3af';
|
||||
readonly disabled: '#6b7280';
|
||||
readonly inverse: '#000000';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#818cf8';
|
||||
readonly hover: '#a5b4fc';
|
||||
readonly active: '#6366f1';
|
||||
readonly light: '#c7d2fe';
|
||||
readonly dark: '#4f46e5';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#a78bfa';
|
||||
readonly light: '#c4b5fd';
|
||||
readonly dark: '#8b5cf6';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#818cf8';
|
||||
readonly skeleton: '#2a2a2a';
|
||||
readonly shimmer: '#383838';
|
||||
}
|
||||
| {
|
||||
readonly background: '#ffffff';
|
||||
readonly surface: '#f9fafb';
|
||||
readonly elevated: '#ffffff';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.5)';
|
||||
readonly border: '#e5e7eb';
|
||||
readonly divider: '#f3f4f6';
|
||||
readonly input: {
|
||||
readonly background: '#ffffff';
|
||||
readonly border: '#d1d5db';
|
||||
readonly text: '#111827';
|
||||
readonly placeholder: '#9ca3af';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#111827';
|
||||
readonly secondary: '#374151';
|
||||
readonly tertiary: '#6b7280';
|
||||
readonly disabled: '#9ca3af';
|
||||
readonly inverse: '#ffffff';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#6366f1';
|
||||
readonly hover: '#4f46e5';
|
||||
readonly active: '#4338ca';
|
||||
readonly light: '#818cf8';
|
||||
readonly dark: '#3730a3';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#8b5cf6';
|
||||
readonly light: '#a78bfa';
|
||||
readonly dark: '#7c3aed';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#f59e0b';
|
||||
readonly error: '#ef4444';
|
||||
readonly info: '#3b82f6';
|
||||
readonly favorite: '#ef4444';
|
||||
readonly like: '#ef4444';
|
||||
readonly tag: '#6366f1';
|
||||
readonly skeleton: '#e5e7eb';
|
||||
readonly shimmer: '#f3f4f6';
|
||||
}
|
||||
| {
|
||||
readonly background: '#0a0a0a';
|
||||
readonly surface: '#1f1410';
|
||||
readonly elevated: '#2a1f1a';
|
||||
readonly border: '#3d2f28';
|
||||
readonly divider: '#2a1f1a';
|
||||
readonly input: {
|
||||
readonly background: '#1a1410';
|
||||
readonly border: '#3d2f28';
|
||||
readonly text: '#fef3c7';
|
||||
readonly placeholder: '#92400e';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#fef3c7';
|
||||
readonly secondary: '#fcd34d';
|
||||
readonly tertiary: '#f59e0b';
|
||||
readonly disabled: '#92400e';
|
||||
readonly inverse: '#0a0a0a';
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: '#fb923c';
|
||||
readonly hover: '#fdba74';
|
||||
readonly active: '#f97316';
|
||||
readonly light: '#fed7aa';
|
||||
readonly dark: '#ea580c';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: '#f472b6';
|
||||
readonly light: '#f9a8d4';
|
||||
readonly dark: '#ec4899';
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#fbbf24';
|
||||
readonly error: '#f43f5e';
|
||||
readonly info: '#60a5fa';
|
||||
readonly favorite: '#f43f5e';
|
||||
readonly like: '#f43f5e';
|
||||
readonly tag: '#fb923c';
|
||||
readonly skeleton: '#2a1f1a';
|
||||
readonly shimmer: '#3d2f28';
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
}
|
||||
| {
|
||||
readonly background: string;
|
||||
readonly surface: string;
|
||||
readonly elevated: string;
|
||||
readonly border: string;
|
||||
readonly divider: string;
|
||||
readonly input: {
|
||||
readonly background: string;
|
||||
readonly border: string;
|
||||
readonly text: '#e0f2fe';
|
||||
readonly placeholder: '#0c4a6e';
|
||||
};
|
||||
readonly text: {
|
||||
readonly primary: '#e0f2fe';
|
||||
readonly secondary: '#7dd3fc';
|
||||
readonly tertiary: '#38bdf8';
|
||||
readonly disabled: '#0c4a6e';
|
||||
readonly inverse: string;
|
||||
};
|
||||
readonly primary: {
|
||||
readonly default: string;
|
||||
readonly hover: string;
|
||||
readonly active: string;
|
||||
readonly light: string;
|
||||
readonly dark: string;
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly secondary: {
|
||||
readonly default: string;
|
||||
readonly light: string;
|
||||
readonly dark: string;
|
||||
readonly contrast: '#ffffff';
|
||||
};
|
||||
readonly success: '#10b981';
|
||||
readonly warning: '#fbbf24';
|
||||
readonly error: '#f43f5e';
|
||||
readonly info: '#0ea5e9';
|
||||
readonly favorite: '#f43f5e';
|
||||
readonly like: '#f43f5e';
|
||||
readonly tag: string;
|
||||
readonly skeleton: string;
|
||||
readonly shimmer: string;
|
||||
readonly overlay: 'rgba(0, 0, 0, 0.8)';
|
||||
};
|
||||
readonly spacing: {
|
||||
readonly 0: 0;
|
||||
readonly 1: 4;
|
||||
readonly 2: 8;
|
||||
readonly 3: 12;
|
||||
readonly 4: 16;
|
||||
readonly 5: 20;
|
||||
readonly 6: 24;
|
||||
readonly 7: 28;
|
||||
readonly 8: 32;
|
||||
readonly 9: 36;
|
||||
readonly 10: 40;
|
||||
readonly 11: 44;
|
||||
readonly 12: 48;
|
||||
readonly 14: 56;
|
||||
readonly 16: 64;
|
||||
readonly 20: 80;
|
||||
readonly 24: 96;
|
||||
readonly 28: 112;
|
||||
readonly 32: 128;
|
||||
};
|
||||
readonly borderRadius: {
|
||||
readonly none: 0;
|
||||
readonly sm: 4;
|
||||
readonly DEFAULT: 8;
|
||||
readonly md: 8;
|
||||
readonly lg: 12;
|
||||
readonly xl: 16;
|
||||
readonly '2xl': 24;
|
||||
readonly '3xl': 32;
|
||||
readonly full: 9999;
|
||||
};
|
||||
readonly fontSize: {
|
||||
readonly xs: 12;
|
||||
readonly sm: 14;
|
||||
readonly base: 16;
|
||||
readonly lg: 18;
|
||||
readonly xl: 20;
|
||||
readonly '2xl': 24;
|
||||
readonly '3xl': 30;
|
||||
readonly '4xl': 36;
|
||||
readonly '5xl': 48;
|
||||
readonly '6xl': 60;
|
||||
readonly '7xl': 72;
|
||||
readonly '8xl': 96;
|
||||
};
|
||||
readonly fontWeight: {
|
||||
readonly regular: '400';
|
||||
readonly medium: '500';
|
||||
readonly semibold: '600';
|
||||
readonly bold: '700';
|
||||
};
|
||||
readonly shadows:
|
||||
| {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.3;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.4;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
}
|
||||
| {
|
||||
readonly sm: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 1;
|
||||
};
|
||||
readonly shadowOpacity: 0.1;
|
||||
readonly shadowRadius: 2;
|
||||
readonly elevation: 2;
|
||||
};
|
||||
readonly md: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 4;
|
||||
};
|
||||
readonly shadowOpacity: 0.15;
|
||||
readonly shadowRadius: 6;
|
||||
readonly elevation: 4;
|
||||
};
|
||||
readonly lg: {
|
||||
readonly shadowColor: '#000';
|
||||
readonly shadowOffset: {
|
||||
readonly width: 0;
|
||||
readonly height: 10;
|
||||
};
|
||||
readonly shadowOpacity: 0.2;
|
||||
readonly shadowRadius: 15;
|
||||
readonly elevation: 8;
|
||||
};
|
||||
};
|
||||
readonly opacity: {
|
||||
readonly disabled: 0.5;
|
||||
readonly overlay: 0.8;
|
||||
readonly hover: 0.9;
|
||||
readonly pressed: 0.7;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Get all available theme variants
|
||||
*/
|
||||
declare function getThemeVariants(): ThemeVariant[];
|
||||
/**
|
||||
* Check if a theme variant exists
|
||||
*/
|
||||
declare function isValidThemeVariant(variant: string): variant is ThemeVariant;
|
||||
/**
|
||||
* Type exports
|
||||
*/
|
||||
type NativeTheme = ReturnType<typeof createNativeTheme>;
|
||||
|
||||
export {
|
||||
type ColorMode,
|
||||
type NativeTheme,
|
||||
type SemanticColors,
|
||||
type ThemeVariant,
|
||||
createNativeTheme,
|
||||
getThemeColors,
|
||||
getThemeVariants,
|
||||
isValidThemeVariant,
|
||||
};
|
||||
580
apps/picture/packages/design-tokens/native/theme.js
Normal file
580
apps/picture/packages/design-tokens/native/theme.js
Normal file
|
|
@ -0,0 +1,580 @@
|
|||
'use strict';
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all) __defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if ((from && typeof from === 'object') || typeof from === 'function') {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, {
|
||||
get: () => from[key],
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
||||
});
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
||||
|
||||
// native/theme.ts
|
||||
var theme_exports = {};
|
||||
__export(theme_exports, {
|
||||
createNativeTheme: () => createNativeTheme,
|
||||
getThemeColors: () => getThemeColors,
|
||||
getThemeVariants: () => getThemeVariants,
|
||||
isValidThemeVariant: () => isValidThemeVariant,
|
||||
});
|
||||
module.exports = __toCommonJS(theme_exports);
|
||||
|
||||
// src/colors.ts
|
||||
var baseColors = {
|
||||
// Pure colors
|
||||
black: '#000000',
|
||||
white: '#ffffff',
|
||||
// Grays
|
||||
gray: {
|
||||
50: '#f9fafb',
|
||||
100: '#f3f4f6',
|
||||
200: '#e5e7eb',
|
||||
300: '#d1d5db',
|
||||
400: '#9ca3af',
|
||||
500: '#6b7280',
|
||||
600: '#4b5563',
|
||||
700: '#374151',
|
||||
800: '#1f2937',
|
||||
900: '#111827',
|
||||
950: '#0a0a0a',
|
||||
},
|
||||
// Indigo (Default primary)
|
||||
indigo: {
|
||||
200: '#c7d2fe',
|
||||
300: '#a5b4fc',
|
||||
400: '#818cf8',
|
||||
500: '#6366f1',
|
||||
600: '#4f46e5',
|
||||
700: '#4338ca',
|
||||
800: '#3730a3',
|
||||
},
|
||||
// Violet (Default secondary)
|
||||
violet: {
|
||||
300: '#c4b5fd',
|
||||
400: '#a78bfa',
|
||||
500: '#8b5cf6',
|
||||
600: '#7c3aed',
|
||||
},
|
||||
// Orange (Sunset theme)
|
||||
orange: {
|
||||
300: '#fdba74',
|
||||
400: '#fb923c',
|
||||
500: '#f97316',
|
||||
600: '#ea580c',
|
||||
},
|
||||
// Pink (Sunset theme)
|
||||
pink: {
|
||||
300: '#f9a8d4',
|
||||
400: '#f472b6',
|
||||
500: '#ec4899',
|
||||
600: '#db2777',
|
||||
},
|
||||
// Sky (Ocean theme)
|
||||
sky: {
|
||||
300: '#7dd3fc',
|
||||
400: '#38bdf8',
|
||||
500: '#0ea5e9',
|
||||
600: '#0284c7',
|
||||
},
|
||||
// Emerald (Ocean theme + status)
|
||||
emerald: {
|
||||
300: '#6ee7b7',
|
||||
400: '#34d399',
|
||||
500: '#10b981',
|
||||
600: '#059669',
|
||||
},
|
||||
// Status colors
|
||||
red: {
|
||||
500: '#ef4444',
|
||||
600: '#dc2626',
|
||||
},
|
||||
amber: {
|
||||
500: '#f59e0b',
|
||||
},
|
||||
blue: {
|
||||
500: '#3b82f6',
|
||||
},
|
||||
};
|
||||
var semanticColors = {
|
||||
/**
|
||||
* Dark mode colors
|
||||
*/
|
||||
dark: {
|
||||
// Backgrounds
|
||||
background: baseColors.black,
|
||||
surface: '#1a1a1a',
|
||||
elevated: '#242424',
|
||||
overlay: 'rgba(0, 0, 0, 0.8)',
|
||||
// Borders & Dividers
|
||||
border: '#383838',
|
||||
divider: '#2a2a2a',
|
||||
// Input fields
|
||||
input: {
|
||||
background: '#1f1f1f',
|
||||
border: '#383838',
|
||||
text: baseColors.gray[100],
|
||||
placeholder: baseColors.gray[500],
|
||||
},
|
||||
// Text colors
|
||||
text: {
|
||||
primary: baseColors.gray[100],
|
||||
secondary: baseColors.gray[300],
|
||||
tertiary: baseColors.gray[400],
|
||||
disabled: baseColors.gray[500],
|
||||
inverse: baseColors.black,
|
||||
},
|
||||
// Primary brand color (Indigo)
|
||||
primary: {
|
||||
default: baseColors.indigo[400],
|
||||
hover: baseColors.indigo[300],
|
||||
active: baseColors.indigo[500],
|
||||
light: baseColors.indigo[200],
|
||||
dark: baseColors.indigo[600],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Secondary accent color (Violet)
|
||||
secondary: {
|
||||
default: baseColors.violet[400],
|
||||
light: baseColors.violet[300],
|
||||
dark: baseColors.violet[500],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Status colors
|
||||
success: baseColors.emerald[500],
|
||||
warning: baseColors.amber[500],
|
||||
error: baseColors.red[500],
|
||||
info: baseColors.blue[500],
|
||||
// Semantic colors
|
||||
favorite: baseColors.red[500],
|
||||
like: baseColors.red[500],
|
||||
tag: baseColors.indigo[400],
|
||||
// Special UI elements
|
||||
skeleton: '#2a2a2a',
|
||||
shimmer: '#383838',
|
||||
},
|
||||
/**
|
||||
* Light mode colors
|
||||
*/
|
||||
light: {
|
||||
// Backgrounds
|
||||
background: baseColors.white,
|
||||
surface: baseColors.gray[50],
|
||||
elevated: baseColors.white,
|
||||
overlay: 'rgba(0, 0, 0, 0.5)',
|
||||
// Borders & Dividers
|
||||
border: baseColors.gray[200],
|
||||
divider: baseColors.gray[100],
|
||||
// Input fields
|
||||
input: {
|
||||
background: baseColors.white,
|
||||
border: baseColors.gray[300],
|
||||
text: baseColors.gray[900],
|
||||
placeholder: baseColors.gray[400],
|
||||
},
|
||||
// Text colors
|
||||
text: {
|
||||
primary: baseColors.gray[900],
|
||||
secondary: baseColors.gray[700],
|
||||
tertiary: baseColors.gray[500],
|
||||
disabled: baseColors.gray[400],
|
||||
inverse: baseColors.white,
|
||||
},
|
||||
// Primary brand color (Indigo)
|
||||
primary: {
|
||||
default: baseColors.indigo[500],
|
||||
hover: baseColors.indigo[600],
|
||||
active: baseColors.indigo[700],
|
||||
light: baseColors.indigo[400],
|
||||
dark: baseColors.indigo[800],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Secondary accent color (Violet)
|
||||
secondary: {
|
||||
default: baseColors.violet[500],
|
||||
light: baseColors.violet[400],
|
||||
dark: baseColors.violet[600],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Status colors
|
||||
success: baseColors.emerald[500],
|
||||
warning: baseColors.amber[500],
|
||||
error: baseColors.red[500],
|
||||
info: baseColors.blue[500],
|
||||
// Semantic colors
|
||||
favorite: baseColors.red[500],
|
||||
like: baseColors.red[500],
|
||||
tag: baseColors.indigo[500],
|
||||
// Special UI elements
|
||||
skeleton: baseColors.gray[200],
|
||||
shimmer: baseColors.gray[100],
|
||||
},
|
||||
};
|
||||
|
||||
// src/shadows.ts
|
||||
var shadows = {
|
||||
dark: {
|
||||
sm: {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 1 },
|
||||
shadowOpacity: 0.2,
|
||||
shadowRadius: 2,
|
||||
elevation: 2,
|
||||
// Android
|
||||
},
|
||||
md: {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 6,
|
||||
elevation: 4,
|
||||
},
|
||||
lg: {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 10 },
|
||||
shadowOpacity: 0.4,
|
||||
shadowRadius: 15,
|
||||
elevation: 8,
|
||||
},
|
||||
},
|
||||
light: {
|
||||
sm: {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 1 },
|
||||
shadowOpacity: 0.1,
|
||||
shadowRadius: 2,
|
||||
elevation: 2,
|
||||
},
|
||||
md: {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
shadowOpacity: 0.15,
|
||||
shadowRadius: 6,
|
||||
elevation: 4,
|
||||
},
|
||||
lg: {
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 10 },
|
||||
shadowOpacity: 0.2,
|
||||
shadowRadius: 15,
|
||||
elevation: 8,
|
||||
},
|
||||
},
|
||||
};
|
||||
var opacity = {
|
||||
disabled: 0.5,
|
||||
overlay: 0.8,
|
||||
hover: 0.9,
|
||||
pressed: 0.7,
|
||||
};
|
||||
|
||||
// src/themes/default.ts
|
||||
var defaultTheme = {
|
||||
name: 'default',
|
||||
displayName: 'Indigo',
|
||||
colors: {
|
||||
light: semanticColors.light,
|
||||
dark: semanticColors.dark,
|
||||
},
|
||||
shadows,
|
||||
opacity,
|
||||
};
|
||||
|
||||
// src/themes/sunset.ts
|
||||
var sunsetTheme = {
|
||||
name: 'sunset',
|
||||
displayName: 'Sunset',
|
||||
colors: {
|
||||
light: semanticColors.light,
|
||||
// Uses default light mode
|
||||
dark: {
|
||||
...semanticColors.dark,
|
||||
// Override backgrounds for warmer tone
|
||||
background: '#0a0a0a',
|
||||
surface: '#1f1410',
|
||||
elevated: '#2a1f1a',
|
||||
// Override borders
|
||||
border: '#3d2f28',
|
||||
divider: '#2a1f1a',
|
||||
// Override input
|
||||
input: {
|
||||
background: '#1a1410',
|
||||
border: '#3d2f28',
|
||||
text: '#fef3c7',
|
||||
// amber-100
|
||||
placeholder: '#92400e',
|
||||
// amber-800
|
||||
},
|
||||
// Override text colors (warmer)
|
||||
text: {
|
||||
primary: '#fef3c7',
|
||||
// amber-100
|
||||
secondary: '#fcd34d',
|
||||
// amber-300
|
||||
tertiary: '#f59e0b',
|
||||
// amber-500
|
||||
disabled: '#92400e',
|
||||
// amber-800
|
||||
inverse: '#0a0a0a',
|
||||
},
|
||||
// Primary: Orange
|
||||
primary: {
|
||||
default: baseColors.orange[400],
|
||||
hover: baseColors.orange[300],
|
||||
active: baseColors.orange[500],
|
||||
light: '#fed7aa',
|
||||
// orange-200
|
||||
dark: baseColors.orange[600],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Secondary: Pink
|
||||
secondary: {
|
||||
default: baseColors.pink[400],
|
||||
light: baseColors.pink[300],
|
||||
dark: baseColors.pink[500],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Status
|
||||
success: baseColors.emerald[500],
|
||||
warning: '#fbbf24',
|
||||
// amber-400
|
||||
error: '#f43f5e',
|
||||
// rose-500
|
||||
info: '#60a5fa',
|
||||
// blue-400
|
||||
// Semantic
|
||||
favorite: '#f43f5e',
|
||||
// rose-500
|
||||
like: '#f43f5e',
|
||||
// rose-500
|
||||
tag: baseColors.orange[400],
|
||||
// Special
|
||||
skeleton: '#2a1f1a',
|
||||
shimmer: '#3d2f28',
|
||||
},
|
||||
},
|
||||
shadows,
|
||||
opacity,
|
||||
};
|
||||
|
||||
// src/themes/ocean.ts
|
||||
var oceanColors = {
|
||||
teal: {
|
||||
200: '#99f6e4',
|
||||
300: '#5eead4',
|
||||
400: '#2dd4bf',
|
||||
500: '#14b8a6',
|
||||
600: '#0d9488',
|
||||
},
|
||||
cyan: {
|
||||
300: '#67e8f9',
|
||||
400: '#22d3ee',
|
||||
500: '#06b6d4',
|
||||
},
|
||||
slate: {
|
||||
700: '#334155',
|
||||
800: '#1e293b',
|
||||
900: '#0f172a',
|
||||
950: '#020617',
|
||||
},
|
||||
};
|
||||
var oceanTheme = {
|
||||
name: 'ocean',
|
||||
displayName: 'Ocean',
|
||||
colors: {
|
||||
light: semanticColors.light,
|
||||
// Uses default light mode
|
||||
dark: {
|
||||
...semanticColors.dark,
|
||||
// Override backgrounds for cooler tone
|
||||
background: oceanColors.slate[950],
|
||||
surface: oceanColors.slate[900],
|
||||
elevated: oceanColors.slate[800],
|
||||
// Override borders
|
||||
border: oceanColors.slate[700],
|
||||
divider: oceanColors.slate[800],
|
||||
// Override input
|
||||
input: {
|
||||
background: oceanColors.slate[900],
|
||||
border: oceanColors.slate[700],
|
||||
text: '#e0f2fe',
|
||||
// sky-100
|
||||
placeholder: '#0c4a6e',
|
||||
// sky-900
|
||||
},
|
||||
// Override text colors (cooler)
|
||||
text: {
|
||||
primary: '#e0f2fe',
|
||||
// sky-100
|
||||
secondary: '#7dd3fc',
|
||||
// sky-300
|
||||
tertiary: '#38bdf8',
|
||||
// sky-400
|
||||
disabled: '#0c4a6e',
|
||||
// sky-900
|
||||
inverse: oceanColors.slate[950],
|
||||
},
|
||||
// Primary: Teal
|
||||
primary: {
|
||||
default: oceanColors.teal[400],
|
||||
hover: oceanColors.teal[300],
|
||||
active: oceanColors.teal[500],
|
||||
light: oceanColors.teal[200],
|
||||
dark: oceanColors.teal[600],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Secondary: Cyan
|
||||
secondary: {
|
||||
default: oceanColors.cyan[400],
|
||||
light: oceanColors.cyan[300],
|
||||
dark: oceanColors.cyan[500],
|
||||
contrast: baseColors.white,
|
||||
},
|
||||
// Status
|
||||
success: baseColors.emerald[500],
|
||||
warning: '#fbbf24',
|
||||
// amber-400
|
||||
error: '#f43f5e',
|
||||
// rose-500
|
||||
info: '#0ea5e9',
|
||||
// sky-500
|
||||
// Semantic
|
||||
favorite: '#f43f5e',
|
||||
// rose-500
|
||||
like: '#f43f5e',
|
||||
// rose-500
|
||||
tag: oceanColors.teal[400],
|
||||
// Special
|
||||
skeleton: oceanColors.slate[800],
|
||||
shimmer: oceanColors.slate[700],
|
||||
},
|
||||
},
|
||||
shadows,
|
||||
opacity,
|
||||
};
|
||||
|
||||
// src/themes/index.ts
|
||||
var themes = {
|
||||
default: defaultTheme,
|
||||
sunset: sunsetTheme,
|
||||
ocean: oceanTheme,
|
||||
};
|
||||
|
||||
// src/spacing.ts
|
||||
var spacing = {
|
||||
0: 0,
|
||||
1: 4,
|
||||
// 0.25rem
|
||||
2: 8,
|
||||
// 0.5rem
|
||||
3: 12,
|
||||
// 0.75rem
|
||||
4: 16,
|
||||
// 1rem
|
||||
5: 20,
|
||||
// 1.25rem
|
||||
6: 24,
|
||||
// 1.5rem
|
||||
7: 28,
|
||||
// 1.75rem
|
||||
8: 32,
|
||||
// 2rem
|
||||
9: 36,
|
||||
// 2.25rem
|
||||
10: 40,
|
||||
// 2.5rem
|
||||
11: 44,
|
||||
// 2.75rem
|
||||
12: 48,
|
||||
// 3rem
|
||||
14: 56,
|
||||
// 3.5rem
|
||||
16: 64,
|
||||
// 4rem
|
||||
20: 80,
|
||||
// 5rem
|
||||
24: 96,
|
||||
// 6rem
|
||||
28: 112,
|
||||
// 7rem
|
||||
32: 128,
|
||||
// 8rem
|
||||
};
|
||||
var borderRadius = {
|
||||
none: 0,
|
||||
sm: 4,
|
||||
DEFAULT: 8,
|
||||
md: 8,
|
||||
lg: 12,
|
||||
xl: 16,
|
||||
'2xl': 24,
|
||||
'3xl': 32,
|
||||
full: 9999,
|
||||
};
|
||||
|
||||
// src/typography.ts
|
||||
var fontSize = {
|
||||
xs: 12,
|
||||
sm: 14,
|
||||
base: 16,
|
||||
lg: 18,
|
||||
xl: 20,
|
||||
'2xl': 24,
|
||||
'3xl': 30,
|
||||
'4xl': 36,
|
||||
'5xl': 48,
|
||||
'6xl': 60,
|
||||
'7xl': 72,
|
||||
'8xl': 96,
|
||||
};
|
||||
var fontWeight = {
|
||||
regular: '400',
|
||||
medium: '500',
|
||||
semibold: '600',
|
||||
bold: '700',
|
||||
};
|
||||
|
||||
// native/theme.ts
|
||||
function getThemeColors(variant = 'default', mode = 'dark') {
|
||||
const theme = themes[variant];
|
||||
return theme.colors[mode];
|
||||
}
|
||||
function createNativeTheme(variant = 'default', mode = 'dark') {
|
||||
const theme = themes[variant];
|
||||
const colors = theme.colors[mode];
|
||||
const shadows2 = theme.shadows[mode];
|
||||
return {
|
||||
variant,
|
||||
mode,
|
||||
colors,
|
||||
spacing,
|
||||
borderRadius,
|
||||
fontSize,
|
||||
fontWeight,
|
||||
shadows: shadows2,
|
||||
opacity: theme.opacity,
|
||||
};
|
||||
}
|
||||
function getThemeVariants() {
|
||||
return Object.keys(themes);
|
||||
}
|
||||
function isValidThemeVariant(variant) {
|
||||
return variant in themes;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 &&
|
||||
(module.exports = {
|
||||
createNativeTheme,
|
||||
getThemeColors,
|
||||
getThemeVariants,
|
||||
isValidThemeVariant,
|
||||
});
|
||||
|
|
@ -8,12 +8,12 @@
|
|||
*/
|
||||
|
||||
import { createUserSettingsStore } from '@manacore/shared-theme';
|
||||
import { authStore } from './auth.svelte';
|
||||
import { auth } from './auth.svelte';
|
||||
|
||||
const MANA_AUTH_URL = 'http://localhost:3001';
|
||||
|
||||
export const userSettings = createUserSettingsStore({
|
||||
appId: 'presi',
|
||||
authUrl: MANA_AUTH_URL,
|
||||
getAccessToken: () => authStore.getAccessToken(),
|
||||
getAccessToken: () => auth.getAccessToken(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
const Icon = getFileIcon(file.mimeType);
|
||||
</script>
|
||||
|
||||
<button class="file-card" onclick={onClick} type="button">
|
||||
<div class="file-card" onclick={onClick} role="button" tabindex="0">
|
||||
<div class="file-icon">
|
||||
<Icon size={40} strokeWidth={1.5} />
|
||||
{#if file.isFavorite}
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<button class="danger" onclick={() => handleAction('delete')}>Löschen</button>
|
||||
</div>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.file-card {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
const Icon = getFileIcon(file.mimeType);
|
||||
</script>
|
||||
|
||||
<button class="file-row" onclick={onClick} type="button">
|
||||
<div class="file-row" onclick={onClick} role="button" tabindex="0">
|
||||
<span class="col-name">
|
||||
<span class="icon">
|
||||
<Icon size={20} strokeWidth={1.5} />
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.file-row {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
let folderColor = $derived(folder.color ? colorMap[folder.color] || folder.color : undefined);
|
||||
</script>
|
||||
|
||||
<button class="folder-card" onclick={onClick} type="button">
|
||||
<div class="folder-card" onclick={onClick} role="button" tabindex="0">
|
||||
<div class="folder-icon" style:color={folderColor}>
|
||||
<Folder size={40} strokeWidth={1.5} fill="currentColor" />
|
||||
{#if folder.isFavorite}
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<button class="danger" onclick={() => handleAction('delete')}>Löschen</button>
|
||||
</div>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.folder-card {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<button class="folder-row" onclick={onClick} type="button">
|
||||
<div class="folder-row" onclick={onClick} role="button" tabindex="0">
|
||||
<span class="col-name">
|
||||
<span class="icon" style:color={folderColor}>
|
||||
<Folder size={20} strokeWidth={1.5} fill="currentColor" />
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.folder-row {
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
import { browser } from '$app/environment';
|
||||
import {
|
||||
THEME_DEFINITIONS,
|
||||
THEME_VARIANTS,
|
||||
type ThemeMode,
|
||||
type ThemeVariant,
|
||||
DEFAULT_THEME_VARIANT,
|
||||
FREE_THEME_VARIANTS,
|
||||
DEFAULT_VARIANT,
|
||||
} from '@manacore/shared-theme';
|
||||
|
||||
const STORAGE_KEY_MODE = 'storage-theme-mode';
|
||||
|
|
@ -16,7 +16,7 @@ const STORAGE_KEY_VARIANT = 'storage-theme-variant';
|
|||
|
||||
function createThemeStore() {
|
||||
let mode = $state<ThemeMode>('system');
|
||||
let variant = $state<ThemeVariant>(DEFAULT_THEME_VARIANT);
|
||||
let variant = $state<ThemeVariant>(DEFAULT_VARIANT);
|
||||
let systemPrefersDark = $state(false);
|
||||
|
||||
function getSystemPreference(): boolean {
|
||||
|
|
@ -46,7 +46,7 @@ function createThemeStore() {
|
|||
return mode === 'dark' || (mode === 'system' && systemPrefersDark);
|
||||
},
|
||||
get variants() {
|
||||
return FREE_THEME_VARIANTS;
|
||||
return THEME_VARIANTS;
|
||||
},
|
||||
|
||||
initialize() {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import { locale } from 'svelte-i18n';
|
||||
import { ForgotPasswordPage } from '@manacore/shared-auth-ui';
|
||||
import { StorageLogo } from '@manacore/shared-branding';
|
||||
import { ManaIcon } from '@manacore/shared-branding';
|
||||
import { getForgotPasswordTranslations } from '@manacore/shared-i18n';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
import LanguageSelector from '$lib/components/LanguageSelector.svelte';
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<ForgotPasswordPage
|
||||
appName="Storage"
|
||||
logo={StorageLogo}
|
||||
logo={ManaIcon}
|
||||
primaryColor="#3b82f6"
|
||||
onResetPassword={handleResetPassword}
|
||||
{goto}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import { locale } from 'svelte-i18n';
|
||||
import { LoginPage } from '@manacore/shared-auth-ui';
|
||||
import { StorageLogo } from '@manacore/shared-branding';
|
||||
import { ManaIcon } from '@manacore/shared-branding';
|
||||
import { getLoginTranslations } from '@manacore/shared-i18n';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
import LanguageSelector from '$lib/components/LanguageSelector.svelte';
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<LoginPage
|
||||
appName="Storage"
|
||||
logo={StorageLogo}
|
||||
logo={ManaIcon}
|
||||
primaryColor="#3b82f6"
|
||||
onSignIn={handleSignIn}
|
||||
{goto}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import { locale } from 'svelte-i18n';
|
||||
import { RegisterPage } from '@manacore/shared-auth-ui';
|
||||
import { StorageLogo } from '@manacore/shared-branding';
|
||||
import { ManaIcon } from '@manacore/shared-branding';
|
||||
import { getRegisterTranslations } from '@manacore/shared-i18n';
|
||||
import { authStore } from '$lib/stores/auth.svelte';
|
||||
import LanguageSelector from '$lib/components/LanguageSelector.svelte';
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<RegisterPage
|
||||
appName="Storage"
|
||||
logo={StorageLogo}
|
||||
logo={ManaIcon}
|
||||
primaryColor="#3b82f6"
|
||||
onSignUp={handleSignUp}
|
||||
{goto}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { Palette, Check } from 'lucide-svelte';
|
||||
import { theme } from '$lib/stores/theme.svelte';
|
||||
import { THEME_DEFINITIONS, ALL_THEME_VARIANTS, type ThemeVariant } from '@manacore/shared-theme';
|
||||
import { THEME_DEFINITIONS, THEME_VARIANTS, type ThemeVariant } from '@manacore/shared-theme';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
|
||||
<div class="themes-grid">
|
||||
{#each ALL_THEME_VARIANTS as variant}
|
||||
{#each THEME_VARIANTS as variant}
|
||||
{@const def = THEME_DEFINITIONS[variant]}
|
||||
<button
|
||||
class="theme-card"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue