@developer_tribe/react-builder 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/build-components/index.d.ts +1 -2
  2. package/dist/build-components/patterns.generated.d.ts +0 -383
  3. package/dist/components/BottomBar.d.ts +12 -0
  4. package/dist/components/LoadingComponent.d.ts +1 -0
  5. package/dist/index.cjs.js +3 -3
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.d.ts +2 -1
  8. package/dist/index.esm.js +3 -3
  9. package/dist/index.esm.js.map +1 -1
  10. package/dist/index.native.cjs.js +1 -1
  11. package/dist/index.native.cjs.js.map +1 -1
  12. package/dist/index.native.esm.js +4 -4
  13. package/dist/index.native.esm.js.map +1 -1
  14. package/dist/modals/ScreenColorsModal.d.ts +8 -0
  15. package/dist/modals/index.d.ts +1 -0
  16. package/dist/pages/ProjectPage.d.ts +3 -2
  17. package/dist/styles.css +1 -1
  18. package/dist/utils/nodeTree.d.ts +5 -0
  19. package/package.json +5 -2
  20. package/src/build-components/RenderNode.generated.tsx +0 -7
  21. package/src/build-components/index.ts +0 -5
  22. package/src/build-components/patterns.generated.ts +0 -399
  23. package/src/components/BottomBar.tsx +242 -0
  24. package/src/components/LoadingComponent.tsx +10 -0
  25. package/src/index.ts +2 -1
  26. package/src/modals/ScreenColorsModal.tsx +121 -0
  27. package/src/modals/index.ts +1 -0
  28. package/src/pages/ProjectPage.tsx +72 -163
  29. package/src/styles/base/_global.scss +25 -20
  30. package/src/styles/components/_attributes-editor.scss +26 -24
  31. package/src/styles/components/_bottom-bar.scss +101 -0
  32. package/src/styles/components/_editor-shell.scss +19 -18
  33. package/src/styles/components/_mockos-router.scss +16 -14
  34. package/src/styles/components/_ui-components.scss +14 -15
  35. package/src/styles/foundation/_colors.scss +28 -8
  36. package/src/styles/foundation/_mixins.scss +1 -1
  37. package/src/styles/foundation/_sizes.scss +4 -2
  38. package/src/styles/index.scss +1 -0
  39. package/src/styles/layout/_builder.scss +1 -1
  40. package/src/styles/modals/_add-component.scss +2 -2
  41. package/src/styles/modals/_color-modal.scss +2 -2
  42. package/src/styles/modals/_modal-shell.scss +1 -1
  43. package/src/utils/nodeTree.ts +99 -0
  44. package/dist/build-components/PaywallSubscriButton/PaywallSubscriButton.d.ts +0 -5
  45. package/dist/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.d.ts +0 -50
  46. package/src/build-components/PaywallSubscriButton/PaywallSubscriButton.tsx +0 -10
  47. package/src/build-components/PaywallSubscriButton/PaywallSubscriButtonProps.generated.ts +0 -77
  48. package/src/build-components/PaywallSubscriButton/pattern.json +0 -27
@@ -1,3 +1,4 @@
1
+ @use '../foundation/colors' as colors;
1
2
  @use '../foundation/sizes' as sizes;
2
3
 
3
4
  .attributes-editor {
@@ -5,8 +6,8 @@
5
6
  margin-bottom: sizes.$spaceRelaxed;
6
7
  padding: sizes.$spaceCozy sizes.$spaceComfy;
7
8
  border-radius: sizes.$radiusRounded;
8
- border: sizes.$borderWidthHairline solid #eee;
9
- background: #f8f8f8;
9
+ border: sizes.$borderWidthHairline solid colors.$borderColor;
10
+ background: colors.$canvasColor;
10
11
  }
11
12
 
12
13
  &__component-title,
@@ -23,7 +24,7 @@
23
24
  &__component-description {
24
25
  margin: sizes.$spaceSnug 0 0;
25
26
  font-size: sizes.$fontSizeBase;
26
- color: #555;
27
+ color: colors.$mutedTextColor;
27
28
  }
28
29
 
29
30
  &__tabs {
@@ -36,9 +37,9 @@
36
37
  &__tab-button {
37
38
  padding: sizes.$spaceSnug sizes.$spaceCozy;
38
39
  border-radius: sizes.$radiusMid;
39
- border: sizes.$borderWidthHairline solid #ddd;
40
- background: #fff;
41
- color: #222;
40
+ border: sizes.$borderWidthHairline solid colors.$borderColor;
41
+ background: colors.$surfaceColor;
42
+ color: colors.$textColor;
42
43
  cursor: pointer;
43
44
  font-weight: 600;
44
45
  transition:
@@ -51,8 +52,8 @@
51
52
  }
52
53
 
53
54
  &--active {
54
- background: #222;
55
- color: #fff;
55
+ background: colors.$textColor;
56
+ color: colors.$surfaceColor;
56
57
  }
57
58
  }
58
59
 
@@ -120,8 +121,8 @@
120
121
  margin-bottom: sizes.$spaceComfy;
121
122
  padding: sizes.$spaceCozy sizes.$spaceComfy;
122
123
  border-radius: sizes.$radiusRounded;
123
- border: sizes.$borderWidthHairline solid #eee;
124
- background: #fff;
124
+ border: sizes.$borderWidthHairline solid colors.$borderColor;
125
+ background: colors.$surfaceColor;
125
126
  }
126
127
 
127
128
  &__mockable-title {
@@ -135,7 +136,7 @@
135
136
  }
136
137
 
137
138
  &__mockable-row + &__mockable-row {
138
- border-top: sizes.$borderWidthHairline solid #eee;
139
+ border-top: sizes.$borderWidthHairline solid colors.$borderColor;
139
140
  }
140
141
 
141
142
  &__mockable-name {
@@ -159,7 +160,7 @@
159
160
  right: 0;
160
161
  font-size: sizes.$fontSizeXs;
161
162
  line-height: 1.2;
162
- color: #666;
163
+ color: colors.$mutedTextColor;
163
164
  cursor: pointer;
164
165
  font-weight: 600;
165
166
  white-space: nowrap;
@@ -175,7 +176,8 @@
175
176
  }
176
177
 
177
178
  &__trigger:focus-visible {
178
- outline: sizes.$outlineWidthFocus solid rgba(17, 24, 39, 0.4);
179
+ outline: sizes.$outlineWidthFocus solid
180
+ hsl(var(--foreground, 220.9 39.3% 11%) / 0.4);
179
181
  outline-offset: sizes.$outlineWidthFocus;
180
182
  }
181
183
 
@@ -184,8 +186,8 @@
184
186
  top: 50%;
185
187
  right: 100%;
186
188
  transform: translate(calc(-1 * sizes.$spaceCompact), -50%);
187
- background: #111;
188
- color: #fff;
189
+ background: colors.$textColor;
190
+ color: colors.$surfaceColor;
189
191
  padding: sizes.$spaceSnug sizes.$spaceInset;
190
192
  border-radius: sizes.$radiusSoft;
191
193
  font-size: sizes.$fontSizeSm;
@@ -208,11 +210,11 @@
208
210
  }
209
211
 
210
212
  .special-category-section {
211
- border: sizes.$borderWidthHairline solid #e0e0e0;
213
+ border: sizes.$borderWidthHairline solid colors.$borderColor;
212
214
  border-radius: sizes.$radiusRounded;
213
215
  padding: sizes.$spaceCozy;
214
216
  margin-bottom: sizes.$spaceComfy;
215
- background: #fdfdfd;
217
+ background: colors.$surfaceColor;
216
218
 
217
219
  &__header {
218
220
  display: flex;
@@ -227,9 +229,9 @@
227
229
  }
228
230
 
229
231
  &__toggle {
230
- border: sizes.$borderWidthHairline solid #ddd;
231
- background: #fff;
232
- color: #222;
232
+ border: sizes.$borderWidthHairline solid colors.$borderColor;
233
+ background: colors.$surfaceColor;
234
+ color: colors.$textColor;
233
235
  border-radius: sizes.$radiusSoft;
234
236
  padding: sizes.$spaceTight sizes.$spaceInset;
235
237
  cursor: pointer;
@@ -240,15 +242,15 @@
240
242
  border-color 0.15s ease;
241
243
 
242
244
  &[data-active='true'] {
243
- background: #222;
244
- color: #fff;
245
- border-color: #222;
245
+ background: colors.$textColor;
246
+ color: colors.$surfaceColor;
247
+ border-color: colors.$textColor;
246
248
  }
247
249
  }
248
250
 
249
251
  &__description {
250
252
  margin: sizes.$spaceCompact 0 0;
251
- color: #666;
253
+ color: colors.$mutedTextColor;
252
254
  font-size: sizes.$fontSizeSmPlus;
253
255
  padding-bottom: sizes.$spaceComfy;
254
256
  }
@@ -0,0 +1,101 @@
1
+ @use '../foundation/colors' as colors;
2
+
3
+ .rb-bottom-bar {
4
+ position: fixed;
5
+ left: 50%;
6
+ transform: translateX(-66%);
7
+ bottom: 10px;
8
+ z-index: 200;
9
+
10
+ height: 50px;
11
+ border-radius: 24px;
12
+
13
+ background-color: colors.$surfaceColor;
14
+ color: colors.$textColor;
15
+
16
+ display: flex;
17
+ flex-direction: row;
18
+ align-items: center;
19
+ justify-content: flex-start;
20
+
21
+ padding: 0 10px;
22
+ gap: 10px;
23
+
24
+ border: 1px solid colors.$borderColor;
25
+ box-shadow: 0 8px 20px hsl(var(--foreground, 220.9 39.3% 11%) / 0.08);
26
+ }
27
+
28
+ .rb-bottom-bar__button {
29
+ appearance: none;
30
+ border: none;
31
+ background: transparent;
32
+ padding: 8px;
33
+ /* lighter icon color */
34
+ color: colors.$mutedTextColor;
35
+ cursor: pointer;
36
+
37
+ display: inline-flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ }
41
+
42
+ .rb-bottom-bar__button.is-active {
43
+ color: colors.$accentColor;
44
+ background: colors.$accentColor; /* Fallback */
45
+ background: color-mix(in srgb, #{colors.$accentColor}, transparent 92%);
46
+ box-shadow: 0 0 10px hsl(var(--primary, 221.2 83.2% 53.3%) / 0.18);
47
+ }
48
+
49
+ /* border between each tool button */
50
+ .rb-bottom-bar__button + .rb-bottom-bar__button {
51
+ border-left: 1px solid colors.$borderColor;
52
+ padding-left: 14px;
53
+ margin-left: 4px;
54
+ }
55
+
56
+ .rb-bottom-bar__button--rtl {
57
+ gap: 6px;
58
+ padding-right: 10px;
59
+ }
60
+
61
+ .rb-bottom-bar__rtl-text {
62
+ font-size: 12px;
63
+ font-weight: 700;
64
+ letter-spacing: 0.3px;
65
+ color: colors.$textColor;
66
+ }
67
+
68
+ .rb-bottom-bar__spacer {
69
+ flex: 1 1 auto;
70
+ }
71
+
72
+ .rb-bottom-bar__langs {
73
+ display: inline-flex;
74
+ align-items: center;
75
+ gap: 0;
76
+ color: colors.$textColor;
77
+ }
78
+
79
+ .rb-bottom-bar__lang {
80
+ appearance: none;
81
+ border: none;
82
+ background: transparent;
83
+ padding: 6px 6px;
84
+ cursor: pointer;
85
+ font-size: 12px;
86
+ font-weight: 700;
87
+ text-transform: lowercase;
88
+ color: inherit;
89
+ }
90
+
91
+ .rb-bottom-bar__lang.is-active {
92
+ color: colors.$accentColor;
93
+ text-shadow: 0 0 12px hsl(var(--primary, 221.2 83.2% 53.3%) / 0.25);
94
+ }
95
+
96
+ /* border between each language button */
97
+ .rb-bottom-bar__lang + .rb-bottom-bar__lang {
98
+ border-left: 1px solid colors.$borderColor;
99
+ margin-left: 8px;
100
+ padding-left: 14px;
101
+ }
@@ -5,7 +5,7 @@
5
5
  .editor-tabs {
6
6
  display: flex;
7
7
  gap: 8px;
8
- border-bottom: 1px solid #e5e7eb;
8
+ border-bottom: 1px solid colors.$borderColor;
9
9
  }
10
10
 
11
11
  .editor-tab {
@@ -29,8 +29,9 @@
29
29
  }
30
30
 
31
31
  .editor-tab--active {
32
- background: #fff;
33
- border-color: #e5e7eb #e5e7eb #fff #e5e7eb;
32
+ background: colors.$surfaceColor;
33
+ border-color: colors.$borderColor colors.$borderColor colors.$surfaceColor
34
+ colors.$borderColor;
34
35
  }
35
36
 
36
37
  .editor-panels {
@@ -89,7 +90,7 @@
89
90
  cursor: pointer;
90
91
  font-size: 12px;
91
92
  &.editor-device-button--selected {
92
- border-color: #000;
93
+ border-color: colors.$textColor;
93
94
  }
94
95
  }
95
96
 
@@ -129,14 +130,14 @@
129
130
  font-size: 12px;
130
131
  line-height: 1.2;
131
132
  border-radius: 999px;
132
- background: rgba(255, 255, 255, 0.95);
133
- border-color: rgba(15, 23, 42, 0.15);
134
- box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
133
+ background: hsl(var(--card, 0 0% 100%) / 0.95);
134
+ border-color: hsl(var(--foreground, 220.9 39.3% 11%) / 0.15);
135
+ box-shadow: 0 2px 4px hsl(var(--foreground, 220.9 39.3% 11%) / 0.08);
135
136
  }
136
137
 
137
138
  .debug-button:hover {
138
- background: #fff;
139
- border-color: rgba(15, 23, 42, 0.3);
139
+ background: colors.$surfaceColor;
140
+ border-color: hsl(var(--foreground, 220.9 39.3% 11%) / 0.3);
140
141
  }
141
142
 
142
143
  .editor-button:disabled {
@@ -147,7 +148,7 @@
147
148
  /* Specific hooks for save buttons (kept empty for now) */
148
149
  .editor-save-button,
149
150
  .editor-save-previewconfig-button {
150
- color: #000;
151
+ color: colors.$textColor;
151
152
  font-weight: 600;
152
153
  font-size: 12px;
153
154
  }
@@ -158,9 +159,9 @@
158
159
  margin-top: 12px;
159
160
  min-height: 52px;
160
161
  border-style: dashed;
161
- border-color: #cbd5f5;
162
- background: #f8fafc;
163
- color: #0f172a;
162
+ border-color: colors.$borderColor;
163
+ background: colors.$canvasColor;
164
+ color: colors.$textColor;
164
165
  font-weight: 600;
165
166
  gap: 10px;
166
167
  transition:
@@ -176,16 +177,16 @@
176
177
  border-radius: 999px;
177
178
  align-items: center;
178
179
  justify-content: center;
179
- background: #2563eb;
180
- color: #fff;
180
+ background: colors.$accentColor;
181
+ color: colors.$surfaceColor;
181
182
  font-size: 18px;
182
183
  line-height: 1;
183
184
  }
184
185
 
185
186
  .builder__add-button:hover {
186
- border-color: #94a3b8;
187
- background: #eef2ff;
188
- color: #111827;
187
+ border-color: colors.$borderColor;
188
+ background: colors.$canvasColor;
189
+ color: colors.$textColor;
189
190
  }
190
191
 
191
192
  .side-tool-container {
@@ -1,3 +1,5 @@
1
+ @use '../foundation/colors' as colors;
2
+
1
3
  .mockos-router {
2
4
  width: 100%;
3
5
  height: 100%;
@@ -18,35 +20,35 @@
18
20
  }
19
21
 
20
22
  .mockos-screen--launchscreen {
21
- background-color: #000000;
23
+ background-color: colors.$textColor;
22
24
  }
23
25
 
24
26
  .mockos-screen--home {
25
27
  padding: 20px;
26
- background-color: #f5f5f5;
28
+ background-color: colors.$canvasColor;
27
29
  }
28
30
 
29
31
  .mockos-screen--onboard {
30
32
  padding: 20px;
31
- background-color: #ffffff;
33
+ background-color: colors.$surfaceColor;
32
34
  }
33
35
 
34
36
  .mockos-screen--subscription {
35
37
  padding: 20px;
36
- background-color: #ffffff;
38
+ background-color: colors.$surfaceColor;
37
39
  }
38
40
 
39
41
  // Screen Content
40
42
  .mockos-screen__title {
41
43
  font-size: 32px;
42
44
  font-weight: bold;
43
- color: #000;
45
+ color: colors.$textColor;
44
46
  margin-bottom: 16px;
45
47
  }
46
48
 
47
49
  .mockos-screen__subtitle {
48
50
  font-size: 16px;
49
- color: #666;
51
+ color: colors.$mutedTextColor;
50
52
  }
51
53
 
52
54
  .mockos-screen__heading {
@@ -57,7 +59,7 @@
57
59
 
58
60
  .mockos-screen__text {
59
61
  font-size: 16px;
60
- color: #333;
62
+ color: colors.$textColor;
61
63
  margin-bottom: 12px;
62
64
  }
63
65
 
@@ -68,13 +70,13 @@
68
70
  margin-bottom: 12px;
69
71
 
70
72
  &--premium {
71
- background-color: #007aff;
72
- color: #fff;
73
+ background-color: colors.$accentColor;
74
+ color: colors.$surfaceColor;
73
75
  }
74
76
 
75
77
  &--basic {
76
- background-color: #e5e5e5;
77
- color: #333;
78
+ background-color: colors.$canvasColor;
79
+ color: colors.$textColor;
78
80
  }
79
81
  }
80
82
 
@@ -107,7 +109,7 @@
107
109
  transition: background-color 0.2s;
108
110
 
109
111
  &:hover {
110
- background-color: rgba(255, 255, 255, 0.1);
112
+ background-color: hsl(var(--card, 0 0% 100%) / 0.1);
111
113
  }
112
114
 
113
115
  &:active {
@@ -120,7 +122,7 @@
120
122
  height: 60px;
121
123
  border-radius: 13px;
122
124
  overflow: hidden;
123
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
125
+ box-shadow: 0 2px 8px hsl(var(--foreground, 220.9 39.3% 11%) / 0.3);
124
126
 
125
127
  svg {
126
128
  width: 100%;
@@ -131,7 +133,7 @@
131
133
 
132
134
  .mockos-launcher__app-name {
133
135
  font-size: 12px;
134
- color: #ffffff;
136
+ color: colors.$surfaceColor;
135
137
  text-align: center;
136
138
  max-width: 70px;
137
139
  overflow: hidden;
@@ -1,7 +1,6 @@
1
1
  @use '../foundation/colors' as colors;
2
2
  @use '../foundation/sizes' as sizes;
3
3
  @use '../foundation/mixins' as *;
4
- @use 'sass:color';
5
4
 
6
5
  .editor-controls {
7
6
  display: grid;
@@ -11,7 +10,7 @@
11
10
  }
12
11
 
13
12
  .editor-section {
14
- background: #fff;
13
+ background: colors.$surfaceColor;
15
14
  border: 1px solid colors.$borderColor;
16
15
  border-radius: sizes.$radiusRounded;
17
16
  padding: sizes.$spaceComfy;
@@ -35,15 +34,15 @@
35
34
  padding: 8px 12px;
36
35
  border-radius: 8px;
37
36
  border: 1px solid colors.$borderColor;
38
- background: #fff;
37
+ background: colors.$surfaceColor;
39
38
  cursor: pointer;
40
39
  transition:
41
40
  background 0.2s ease,
42
41
  box-shadow 0.2s ease;
43
42
 
44
43
  &:hover {
45
- background: #f9fafb;
46
- box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
44
+ background: colors.$canvasColor;
45
+ box-shadow: 0 6px 16px hsl(var(--foreground, 220.9 39.3% 11%) / 0.06);
47
46
  }
48
47
  }
49
48
 
@@ -55,7 +54,7 @@
55
54
  padding: 0 8px;
56
55
  border: 1px solid colors.$borderColor;
57
56
  border-radius: sizes.$radiusRounded;
58
- background: #fff;
57
+ background: colors.$surfaceColor;
59
58
  color: colors.$textColor;
60
59
  font: inherit;
61
60
  outline: none;
@@ -64,8 +63,8 @@
64
63
  box-shadow 0.15s ease;
65
64
 
66
65
  &:focus {
67
- border-color: color.adjust(colors.$borderColor, $lightness: -8%);
68
- box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
66
+ border-color: colors.$borderColor;
67
+ box-shadow: 0 0 0 3px hsl(var(--foreground, 220.9 39.3% 11%) / 0.04);
69
68
  }
70
69
  }
71
70
 
@@ -120,7 +119,7 @@
120
119
  height: 20px;
121
120
  border-radius: 6px;
122
121
  border: 2px solid colors.$borderColor;
123
- background: #fff;
122
+ background: colors.$surfaceColor;
124
123
  display: inline-flex;
125
124
  align-items: center;
126
125
  justify-content: center;
@@ -129,7 +128,7 @@
129
128
  border-color 0.2s ease,
130
129
  box-shadow 0.2s ease,
131
130
  transform 0.2s ease;
132
- box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
131
+ box-shadow: 0 2px 6px hsl(var(--foreground, 220.9 39.3% 11%) / 0.12);
133
132
 
134
133
  &::after {
135
134
  content: '';
@@ -150,17 +149,17 @@
150
149
  }
151
150
 
152
151
  .builder-checkbox__native:focus-visible + .builder-checkbox__control {
153
- box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
152
+ box-shadow: 0 0 0 3px hsl(var(--primary, 221.2 83.2% 53.3%) / 0.3);
154
153
  }
155
154
 
156
155
  .builder-checkbox__native:checked + .builder-checkbox__control {
157
- background: linear-gradient(135deg, #1f2937, #4f46e5);
156
+ background: linear-gradient(135deg, colors.$textColor, colors.$accentColor);
158
157
  border-color: transparent;
159
- box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
158
+ box-shadow: 0 6px 14px hsl(var(--primary, 221.2 83.2% 53.3%) / 0.35);
160
159
  }
161
160
 
162
161
  .builder-checkbox__native:checked + .builder-checkbox__control::after {
163
- border-color: #fff;
162
+ border-color: colors.$surfaceColor;
164
163
  transform: rotate(45deg) scale(1);
165
164
  }
166
165
 
@@ -171,7 +170,7 @@
171
170
 
172
171
  .builder-checkbox__helper {
173
172
  font-size: 12px;
174
- color: #6b7280;
173
+ color: colors.$mutedTextColor;
175
174
  margin-left: 30px;
176
175
  }
177
176
 
@@ -1,8 +1,28 @@
1
- /* Library color tokens live in a single place for easy discovery. */
2
- $textColor: #111827;
3
- $mutedTextColor: #6b7280;
4
- $surfaceColor: #ffffff;
5
- $canvasColor: #f3f4f6;
6
- $borderColor: #e5e7eb;
7
- $accentColor: #2563eb;
8
- $dangerColor: #ef4444;
1
+ /* Library color tokens live in a single place for easy discovery.
2
+ *
3
+ * TribeHub theming (shadcn/ui style):
4
+ * - Host app defines HSL channels as CSS variables (without the `hsl()` wrapper).
5
+ * - Builder consumes them as `hsl(var(--token))`.
6
+ * - If the host doesn't define a token, we fall back to the builder defaults.
7
+ */
8
+
9
+ $background: hsl(var(--background, 220 14.3% 95.9%));
10
+ $foreground: hsl(var(--foreground, 220.9 39.3% 11%));
11
+ $card: hsl(var(--card, 0 0% 100%));
12
+ $cardForeground: hsl(var(--card-foreground, 220.9 39.3% 11%));
13
+ $muted: hsl(var(--muted, 220 14.3% 95.9%));
14
+ $mutedForeground: hsl(var(--muted-foreground, 220 8.9% 46.1%));
15
+ $primary: hsl(var(--primary, 221.2 83.2% 53.3%));
16
+ $primaryForeground: hsl(var(--primary-foreground, 0 0% 100%));
17
+ $destructive: hsl(var(--destructive, 0 84.2% 60.2%));
18
+ $destructiveForeground: hsl(var(--destructive-foreground, 0 0% 100%));
19
+ $border: hsl(var(--border, 220 13% 91%));
20
+
21
+ /* Back-compat aliases used by the existing SCSS. */
22
+ $textColor: $foreground;
23
+ $mutedTextColor: $mutedForeground;
24
+ $surfaceColor: $card;
25
+ $canvasColor: $background;
26
+ $borderColor: $border;
27
+ $accentColor: $primary;
28
+ $dangerColor: $destructive;
@@ -14,7 +14,7 @@
14
14
 
15
15
  @mixin thin-scrollbar {
16
16
  scrollbar-width: thin;
17
- scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
17
+ scrollbar-color: hsl(var(--foreground, 220.9 39.3% 11%) / 0.25) transparent;
18
18
  &::-webkit-scrollbar {
19
19
  width: 8px;
20
20
  height: 4px;
@@ -1,4 +1,6 @@
1
1
  /* Library sizing scale (spacing, radii, shadow) stays centralized. */
2
+ @use './colors' as colors;
3
+
2
4
  $spaceTight: 4px;
3
5
  $spaceSnug: 6px;
4
6
  $spaceCompact: 8px;
@@ -16,8 +18,8 @@ $radiusPill: 12px;
16
18
  $borderWidthHairline: 1px;
17
19
  $outlineWidthFocus: 2px;
18
20
 
19
- $cardShadow: 0 10px 30px rgba(0, 0, 0, 0.12);
20
- $shadowTooltip: 0 6px 16px rgba(0, 0, 0, 0.2);
21
+ $cardShadow: 0 10px 30px hsl(var(--foreground, 220.9 39.3% 11%) / 0.12);
22
+ $shadowTooltip: 0 6px 16px hsl(var(--foreground, 220.9 39.3% 11%) / 0.2);
21
23
 
22
24
  $fontSizeXs: 11px;
23
25
  $fontSizeSm: 12px;
@@ -13,6 +13,7 @@
13
13
  @use './components/editor-shell';
14
14
  @use './components/attributes-editor';
15
15
  @use './components/mockos-router';
16
+ @use './components/bottom-bar';
16
17
 
17
18
  @use './modals/modal-shell';
18
19
  @use './modals/add-component';
@@ -49,7 +49,7 @@
49
49
  padding: 0 sizes.$spaceTight;
50
50
  margin: 0;
51
51
  background: colors.$accentColor;
52
- color: #fff;
52
+ color: colors.$surfaceColor;
53
53
  font-size: clamp(sizes.$fontSizeXs, 1.3vw, sizes.$fontSizeSmPlus);
54
54
  white-space: nowrap;
55
55
  overflow: hidden;
@@ -49,7 +49,7 @@
49
49
  border-radius: 12px;
50
50
  padding: sizes.$spaceComfy;
51
51
  margin-bottom: sizes.$spaceCozy;
52
- box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
52
+ box-shadow: 0 10px 20px hsl(var(--foreground, 220.9 39.3% 11%) / 0.05);
53
53
  }
54
54
 
55
55
  .add-component-modal__group-title {
@@ -86,7 +86,7 @@
86
86
 
87
87
  .add-component-modal__card:hover {
88
88
  border-color: colors.$accentColor;
89
- box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
89
+ box-shadow: 0 10px 25px hsl(var(--primary, 221.2 83.2% 53.3%) / 0.15);
90
90
  transform: translateY(-2px);
91
91
  }
92
92
 
@@ -30,7 +30,7 @@
30
30
  width: 32px;
31
31
  height: 32px;
32
32
  border-radius: 6px;
33
- border: 1px solid rgba(0, 0, 0, 0.1);
33
+ border: 1px solid hsl(var(--foreground, 220.9 39.3% 11%) / 0.1);
34
34
  }
35
35
 
36
36
  .color-modal__selected-label {
@@ -158,7 +158,7 @@
158
158
  }
159
159
 
160
160
  .color-modal__swatch-preview--light {
161
- border: 1px solid rgba(0, 0, 0, 0.1);
161
+ border: 1px solid hsl(var(--foreground, 220.9 39.3% 11%) / 0.1);
162
162
  }
163
163
 
164
164
  .color-modal__swatch-label {
@@ -10,7 +10,7 @@
10
10
  .modal__overlay {
11
11
  position: absolute;
12
12
  inset: 0;
13
- background: rgba(0, 0, 0, 0.4);
13
+ background: hsl(var(--foreground, 220.9 39.3% 11%) / 0.4);
14
14
  z-index: 0;
15
15
  }
16
16