@mdbase-dev/ui 0.1.0-beta.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +28 -0
- package/css/brand.css +93 -0
- package/css/controls.css +611 -0
- package/css/fonts.css +6 -0
- package/css/motion.css +198 -0
- package/css/palette.css +196 -0
- package/css/screens.css +155 -0
- package/css/tokens.css +141 -0
- package/dist/AppSwitcher.d.ts +13 -0
- package/dist/AppSwitcher.js +38 -0
- package/dist/CommandPalette.d.ts +37 -0
- package/dist/CommandPalette.js +130 -0
- package/dist/Dialog.d.ts +12 -0
- package/dist/Dialog.js +23 -0
- package/dist/SaveNotice.d.ts +17 -0
- package/dist/SaveNotice.js +15 -0
- package/dist/Select.d.ts +20 -0
- package/dist/Select.js +158 -0
- package/dist/SelectList.d.ts +19 -0
- package/dist/SelectList.js +21 -0
- package/dist/ThemeSelect.d.ts +12 -0
- package/dist/ThemeSelect.js +12 -0
- package/dist/apps.d.ts +20 -0
- package/dist/apps.js +47 -0
- package/dist/brand.d.ts +99 -0
- package/dist/brand.js +61 -0
- package/dist/codemirror.d.ts +9 -0
- package/dist/codemirror.js +98 -0
- package/dist/popover.d.ts +50 -0
- package/dist/popover.js +162 -0
- package/dist/screens.d.ts +29 -0
- package/dist/screens.js +18 -0
- package/dist/select-model.d.ts +34 -0
- package/dist/select-model.js +53 -0
- package/dist/theme.d.ts +18 -0
- package/dist/theme.js +59 -0
- package/package.json +105 -0
package/css/motion.css
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/* Animations for the platform mark. Base mark styling lives in brand.css. */
|
|
2
|
+
|
|
3
|
+
/* Bootstrap: trace once in reading order, then continue as bounded I/O. */
|
|
4
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment {
|
|
5
|
+
--mdbase-trace-delay: 0ms;
|
|
6
|
+
stroke: currentColor;
|
|
7
|
+
stroke-width: 3;
|
|
8
|
+
stroke-dasharray: 1;
|
|
9
|
+
stroke-dashoffset: 1;
|
|
10
|
+
vector-effect: non-scaling-stroke;
|
|
11
|
+
animation: mdbase-trace-ink 720ms cubic-bezier(0.16, 1, 0.3, 1) var(--mdbase-trace-delay) 1 both;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mdbase-motion-bootstrap .mdbase-mark-accent {
|
|
15
|
+
stroke: var(--color-accent);
|
|
16
|
+
animation-name: mdbase-trace-accent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-2 { --mdbase-trace-delay: 35ms; }
|
|
20
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-3 { --mdbase-trace-delay: 70ms; }
|
|
21
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-4 { --mdbase-trace-delay: 125ms; }
|
|
22
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-5 { --mdbase-trace-delay: 165ms; }
|
|
23
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-6 { --mdbase-trace-delay: 220ms; }
|
|
24
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-7 { --mdbase-trace-delay: 260ms; }
|
|
25
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-8 { --mdbase-trace-delay: 315ms; }
|
|
26
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-9 { --mdbase-trace-delay: 350ms; }
|
|
27
|
+
.mdbase-motion-bootstrap .mdbase-mark-segment-10 { --mdbase-trace-delay: 385ms; }
|
|
28
|
+
|
|
29
|
+
.mdbase-motion-bootstrap .mdbase-mark-fence {
|
|
30
|
+
animation: mdbase-hide-original-fence 1ms linear 1.12s 1 forwards;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mdbase-motion-bootstrap .mdbase-mark-conveyor-track {
|
|
34
|
+
animation:
|
|
35
|
+
mdbase-show-conveyor 1ms linear 1.12s 1 forwards,
|
|
36
|
+
mdbase-gap-conveyor 900ms linear 1.12s infinite;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes mdbase-trace-ink {
|
|
40
|
+
0% {
|
|
41
|
+
fill: transparent;
|
|
42
|
+
opacity: 0;
|
|
43
|
+
stroke-dashoffset: 1;
|
|
44
|
+
stroke-opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
10% { opacity: 1; }
|
|
47
|
+
54% {
|
|
48
|
+
fill: transparent;
|
|
49
|
+
opacity: 1;
|
|
50
|
+
stroke-dashoffset: 0;
|
|
51
|
+
stroke-opacity: 1;
|
|
52
|
+
}
|
|
53
|
+
72%,
|
|
54
|
+
100% {
|
|
55
|
+
fill: currentColor;
|
|
56
|
+
opacity: 1;
|
|
57
|
+
stroke-dashoffset: 0;
|
|
58
|
+
stroke-opacity: 0;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes mdbase-trace-accent {
|
|
63
|
+
0% {
|
|
64
|
+
fill: transparent;
|
|
65
|
+
opacity: 0;
|
|
66
|
+
stroke-dashoffset: 1;
|
|
67
|
+
stroke-opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
10% { opacity: 1; }
|
|
70
|
+
54% {
|
|
71
|
+
fill: transparent;
|
|
72
|
+
opacity: 1;
|
|
73
|
+
stroke-dashoffset: 0;
|
|
74
|
+
stroke-opacity: 1;
|
|
75
|
+
}
|
|
76
|
+
72%,
|
|
77
|
+
100% {
|
|
78
|
+
fill: var(--color-accent);
|
|
79
|
+
opacity: 1;
|
|
80
|
+
stroke-dashoffset: 0;
|
|
81
|
+
stroke-opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes mdbase-hide-original-fence {
|
|
86
|
+
to { opacity: 0; }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes mdbase-show-conveyor {
|
|
90
|
+
to { opacity: 1; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Unfold: the frontmatter boundary opens once to reveal its fields. */
|
|
94
|
+
.mdbase-motion-unfold .mdbase-mark-fence-top {
|
|
95
|
+
animation: mdbase-unfold-top 760ms cubic-bezier(0.16, 1, 0.3, 1) 1 both;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mdbase-motion-unfold .mdbase-mark-fence-bottom {
|
|
99
|
+
animation: mdbase-unfold-bottom 760ms cubic-bezier(0.16, 1, 0.3, 1) 1 both;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mdbase-motion-unfold .mdbase-mark-row {
|
|
103
|
+
animation: mdbase-unfold-row 760ms cubic-bezier(0.16, 1, 0.3, 1) 70ms 1 both;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@keyframes mdbase-unfold-top {
|
|
107
|
+
from { transform: translateY(27px) scaleX(0.62); }
|
|
108
|
+
to { transform: translateY(0) scaleX(1); }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@keyframes mdbase-unfold-bottom {
|
|
112
|
+
from { transform: translateY(-27px) scaleX(0.62); }
|
|
113
|
+
to { transform: translateY(0) scaleX(1); }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@keyframes mdbase-unfold-row {
|
|
117
|
+
from { opacity: 0; transform: scaleX(0.45); }
|
|
118
|
+
to { opacity: 1; transform: scaleX(1); }
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Rebalance: two fixed-width rows change structure in opposite directions. */
|
|
122
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-4,
|
|
123
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-6 {
|
|
124
|
+
transform-origin: left center;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-5,
|
|
128
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-7 {
|
|
129
|
+
transform-origin: right center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-4 {
|
|
133
|
+
animation: mdbase-rebalance-top-key 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-5 {
|
|
137
|
+
animation: mdbase-rebalance-top-value 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-6 {
|
|
141
|
+
animation: mdbase-rebalance-bottom-key 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mdbase-motion-rebalance .mdbase-mark-segment-7 {
|
|
145
|
+
animation: mdbase-rebalance-bottom-value 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@keyframes mdbase-rebalance-top-key {
|
|
149
|
+
0%, 15%, 100% { transform: scaleX(1); }
|
|
150
|
+
42%, 72% { transform: scaleX(2.666667); }
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@keyframes mdbase-rebalance-top-value {
|
|
154
|
+
0%, 15%, 100% { transform: scaleX(1); }
|
|
155
|
+
42%, 72% { transform: scaleX(0.642857); }
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@keyframes mdbase-rebalance-bottom-key {
|
|
159
|
+
0%, 15%, 100% { transform: scaleX(1); }
|
|
160
|
+
42%, 72% { transform: scaleX(0.428571); }
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@keyframes mdbase-rebalance-bottom-value {
|
|
164
|
+
0%, 15%, 100% { transform: scaleX(1); }
|
|
165
|
+
42%, 72% { transform: scaleX(1.4); }
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Conveyor: repeated fence segments travel left inside exact fence clips. */
|
|
169
|
+
.mdbase-motion-conveyor .mdbase-mark-fence {
|
|
170
|
+
opacity: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.mdbase-motion-conveyor .mdbase-mark-conveyor-track {
|
|
174
|
+
opacity: 1;
|
|
175
|
+
animation: mdbase-gap-conveyor 900ms linear infinite;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@keyframes mdbase-gap-conveyor {
|
|
179
|
+
from { transform: translateX(0); }
|
|
180
|
+
to { transform: translateX(-28px); }
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media (prefers-reduced-motion: reduce) {
|
|
184
|
+
.mdbase-mark .mdbase-mark-segment,
|
|
185
|
+
.mdbase-mark .mdbase-mark-row,
|
|
186
|
+
.mdbase-mark .mdbase-mark-fence,
|
|
187
|
+
.mdbase-mark .mdbase-mark-conveyor-track {
|
|
188
|
+
animation: none !important;
|
|
189
|
+
filter: none !important;
|
|
190
|
+
opacity: 1;
|
|
191
|
+
stroke: none;
|
|
192
|
+
transform: none !important;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.mdbase-mark .mdbase-mark-conveyor-track {
|
|
196
|
+
opacity: 0;
|
|
197
|
+
}
|
|
198
|
+
}
|
package/css/palette.css
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/* The command palette (./command-palette). Reader's layout in Editor's quiet frame. */
|
|
2
|
+
.mdbase-command-backdrop {
|
|
3
|
+
position: fixed;
|
|
4
|
+
inset: 0;
|
|
5
|
+
z-index: 100;
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: none;
|
|
8
|
+
height: 100%;
|
|
9
|
+
max-height: none;
|
|
10
|
+
display: grid;
|
|
11
|
+
justify-items: center;
|
|
12
|
+
align-items: start;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: min(14vh, 120px) 16px 16px;
|
|
15
|
+
border: 0;
|
|
16
|
+
background: color-mix(in oklch, var(--color-scrim) 40%, transparent);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mdbase-command-dismiss {
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
border: 0;
|
|
25
|
+
background: transparent;
|
|
26
|
+
cursor: default;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mdbase-command-palette {
|
|
30
|
+
position: relative;
|
|
31
|
+
z-index: 1;
|
|
32
|
+
width: min(600px, 100%);
|
|
33
|
+
max-height: calc(100dvh - min(28vh, 240px) - 32px);
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
border: 1px solid var(--color-border-strong);
|
|
38
|
+
border-radius: var(--control-radius);
|
|
39
|
+
background: var(--color-surface);
|
|
40
|
+
animation: mdbase-popover-in var(--motion-base) var(--ease-out);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mdbase-command-search {
|
|
44
|
+
height: 52px;
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-template-columns: 18px minmax(0, 1fr);
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 10px;
|
|
49
|
+
padding: 0 16px;
|
|
50
|
+
border-bottom: 1px solid var(--color-border);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mdbase-command-search svg {
|
|
54
|
+
width: 17px;
|
|
55
|
+
height: 17px;
|
|
56
|
+
color: var(--color-text-muted);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mdbase-command-search input {
|
|
60
|
+
min-width: 0;
|
|
61
|
+
padding: 0;
|
|
62
|
+
border: 0;
|
|
63
|
+
outline: 0;
|
|
64
|
+
color: var(--color-text);
|
|
65
|
+
background: transparent;
|
|
66
|
+
font: inherit;
|
|
67
|
+
font-size: 15px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mdbase-command-search input::placeholder {
|
|
71
|
+
color: var(--color-text-muted);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mdbase-command-results {
|
|
75
|
+
min-height: 0;
|
|
76
|
+
overflow: auto;
|
|
77
|
+
padding: 4px 6px 8px;
|
|
78
|
+
scroll-padding: 28px 0 8px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mdbase-command-group {
|
|
82
|
+
padding: 10px 10px 4px;
|
|
83
|
+
color: var(--color-text-muted);
|
|
84
|
+
font-size: 11px;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mdbase-command-results > button {
|
|
89
|
+
width: 100%;
|
|
90
|
+
min-height: 38px;
|
|
91
|
+
display: grid;
|
|
92
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: 12px;
|
|
95
|
+
padding: 5px 10px;
|
|
96
|
+
border: 0;
|
|
97
|
+
border-radius: var(--control-radius);
|
|
98
|
+
color: var(--color-text-soft);
|
|
99
|
+
background: transparent;
|
|
100
|
+
font: inherit;
|
|
101
|
+
text-align: left;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mdbase-command-results > button[aria-selected="true"],
|
|
106
|
+
.mdbase-command-results > button:hover {
|
|
107
|
+
color: var(--color-text);
|
|
108
|
+
background: var(--color-selected);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.mdbase-command-results button > span:first-child {
|
|
112
|
+
min-width: 0;
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: baseline;
|
|
115
|
+
gap: 10px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mdbase-command-results strong,
|
|
119
|
+
.mdbase-command-results small {
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
text-overflow: ellipsis;
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.mdbase-command-results strong {
|
|
126
|
+
flex: 0 1 auto;
|
|
127
|
+
font-size: 13px;
|
|
128
|
+
font-weight: 500;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mdbase-command-results small {
|
|
132
|
+
flex: 1 1 auto;
|
|
133
|
+
color: var(--color-text-muted);
|
|
134
|
+
font-size: 12px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.mdbase-command-results kbd,
|
|
138
|
+
.mdbase-command-footer kbd {
|
|
139
|
+
padding: 1px 5px;
|
|
140
|
+
border: 1px solid var(--color-border);
|
|
141
|
+
border-radius: var(--control-radius);
|
|
142
|
+
color: var(--color-text-muted);
|
|
143
|
+
font: 10px/1.2 var(--mono);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.mdbase-command-footer kbd {
|
|
147
|
+
margin-right: 2px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.mdbase-command-alternate {
|
|
151
|
+
color: var(--color-text-muted);
|
|
152
|
+
font-size: 11px;
|
|
153
|
+
white-space: nowrap;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mdbase-command-footer {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-wrap: wrap;
|
|
159
|
+
gap: 4px 16px;
|
|
160
|
+
padding: 8px 14px;
|
|
161
|
+
border-top: 1px solid var(--color-border);
|
|
162
|
+
color: var(--color-text-muted);
|
|
163
|
+
font-size: 11px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.mdbase-command-empty {
|
|
167
|
+
padding: 28px;
|
|
168
|
+
color: var(--color-text-muted);
|
|
169
|
+
font-size: 13px;
|
|
170
|
+
text-align: center;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@media (max-width: 680px) {
|
|
174
|
+
.mdbase-command-backdrop {
|
|
175
|
+
padding: 56px 8px 8px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mdbase-command-palette {
|
|
179
|
+
max-height: calc(100dvh - 64px);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mdbase-command-results button > span:first-child {
|
|
183
|
+
display: grid;
|
|
184
|
+
gap: 1px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.mdbase-command-footer {
|
|
188
|
+
display: none;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@media (prefers-reduced-motion: reduce) {
|
|
193
|
+
.mdbase-command-palette {
|
|
194
|
+
animation: none;
|
|
195
|
+
}
|
|
196
|
+
}
|
package/css/screens.css
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/* Opening a collection: the wordmark, held still, over one quiet line. */
|
|
2
|
+
.mdbase-opening {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
min-height: 100%;
|
|
6
|
+
display: grid;
|
|
7
|
+
place-items: center;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
background: var(--color-canvas);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mdbase-opening-message {
|
|
13
|
+
display: grid;
|
|
14
|
+
justify-items: center;
|
|
15
|
+
gap: 14px;
|
|
16
|
+
color: var(--color-text-soft);
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mdbase-opening-message p,
|
|
21
|
+
.mdbase-opening-message small {
|
|
22
|
+
display: block;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mdbase-opening-message p {
|
|
27
|
+
max-width: 44ch;
|
|
28
|
+
font-size: 13px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mdbase-opening-message small {
|
|
32
|
+
margin-top: 4px;
|
|
33
|
+
color: var(--color-text-muted);
|
|
34
|
+
font-size: 11px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mdbase-opening[data-loading-state="failed"] .mdbase-opening-message p {
|
|
38
|
+
color: var(--color-danger);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Before a collection is open. */
|
|
42
|
+
.mdbase-connect-screen {
|
|
43
|
+
min-height: 100%;
|
|
44
|
+
display: grid;
|
|
45
|
+
place-items: center;
|
|
46
|
+
padding: 32px;
|
|
47
|
+
background: var(--color-canvas);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mdbase-connect-screen section {
|
|
51
|
+
width: min(100%, 520px);
|
|
52
|
+
margin-top: -4vh;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mdbase-connect-screen h1 {
|
|
56
|
+
margin: 44px 0 22px;
|
|
57
|
+
color: var(--color-text);
|
|
58
|
+
font-size: 48px;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
line-height: 0.98;
|
|
61
|
+
letter-spacing: -0.045em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mdbase-connect-lead {
|
|
65
|
+
max-width: 34ch;
|
|
66
|
+
margin: 0;
|
|
67
|
+
color: var(--color-text-soft);
|
|
68
|
+
font-size: 17px;
|
|
69
|
+
line-height: 1.55;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mdbase-connect-status {
|
|
73
|
+
margin: 14px 0 0;
|
|
74
|
+
color: var(--color-text-muted);
|
|
75
|
+
font-size: 13px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* The one strong action on the screen. */
|
|
79
|
+
.mdbase-connect-action {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 18px;
|
|
83
|
+
height: 42px;
|
|
84
|
+
margin-top: 24px;
|
|
85
|
+
padding: 0 14px 0 16px;
|
|
86
|
+
border: 1px solid var(--color-border-strong);
|
|
87
|
+
border-radius: var(--control-radius);
|
|
88
|
+
color: var(--color-text);
|
|
89
|
+
background: var(--color-surface);
|
|
90
|
+
font: inherit;
|
|
91
|
+
font-size: 14px;
|
|
92
|
+
font-weight: 700;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
transition: border-color var(--motion-quick) ease, background var(--motion-quick) ease;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mdbase-connect-action:hover:not(:disabled) {
|
|
98
|
+
border-color: var(--color-accent);
|
|
99
|
+
background: var(--color-surface-subtle);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mdbase-connect-action:disabled {
|
|
103
|
+
cursor: default;
|
|
104
|
+
opacity: 0.55;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.mdbase-connect-action svg {
|
|
108
|
+
width: 15px;
|
|
109
|
+
height: 15px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.mdbase-connect-footnote {
|
|
113
|
+
max-width: 47ch;
|
|
114
|
+
margin: 18px 0 0;
|
|
115
|
+
color: var(--color-text-muted);
|
|
116
|
+
font-size: 12px;
|
|
117
|
+
line-height: 1.55;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.mdbase-connect-error {
|
|
121
|
+
margin: 18px 0 0;
|
|
122
|
+
color: var(--color-danger);
|
|
123
|
+
font-size: 13px;
|
|
124
|
+
line-height: 1.45;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.mdbase-connect-detail {
|
|
128
|
+
margin-top: 10px;
|
|
129
|
+
color: var(--color-text-muted);
|
|
130
|
+
font-size: 12px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.mdbase-connect-detail code {
|
|
134
|
+
display: block;
|
|
135
|
+
margin-top: 6px;
|
|
136
|
+
font-family: var(--mono);
|
|
137
|
+
font-size: 11px;
|
|
138
|
+
overflow-wrap: anywhere;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media (max-width: 760px) {
|
|
142
|
+
.mdbase-connect-screen {
|
|
143
|
+
place-items: start;
|
|
144
|
+
padding: max(34px, env(safe-area-inset-top)) 24px 32px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mdbase-connect-screen section {
|
|
148
|
+
margin-top: 8vh;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mdbase-connect-screen h1 {
|
|
152
|
+
margin-top: 48px;
|
|
153
|
+
font-size: 43px;
|
|
154
|
+
}
|
|
155
|
+
}
|
package/css/tokens.css
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* mdbase semantic roles. Components consume roles rather than palette values so
|
|
3
|
+
* both themes keep the same hierarchy. Short aliases (`--ink`, `--muted`, ...) are
|
|
4
|
+
* app-local and must map onto these roles.
|
|
5
|
+
*/
|
|
6
|
+
:root {
|
|
7
|
+
color-scheme: light;
|
|
8
|
+
--color-canvas: oklch(99.5% 0.002 255);
|
|
9
|
+
--color-surface: oklch(99.5% 0.002 255);
|
|
10
|
+
--color-surface-subtle: oklch(97.8% 0.003 255);
|
|
11
|
+
--color-text: oklch(21% 0.018 255);
|
|
12
|
+
--color-text-soft: oklch(50% 0.014 255);
|
|
13
|
+
--color-text-muted: oklch(54% 0.01 255);
|
|
14
|
+
--color-text-faint: oklch(70% 0.009 255);
|
|
15
|
+
--color-border: oklch(92% 0.006 255);
|
|
16
|
+
--color-border-strong: oklch(82% 0.008 255);
|
|
17
|
+
--color-selected: oklch(96.8% 0.004 255);
|
|
18
|
+
--color-accent: oklch(47% 0.1 238);
|
|
19
|
+
--color-accent-strong: oklch(41% 0.1 238);
|
|
20
|
+
--color-accent-soft: oklch(93.5% 0.035 238);
|
|
21
|
+
--color-on-accent: oklch(98% 0.004 245);
|
|
22
|
+
--color-success: oklch(44% 0.085 153);
|
|
23
|
+
--color-danger: oklch(50% 0.11 28);
|
|
24
|
+
--color-danger-soft: oklch(97% 0.018 28);
|
|
25
|
+
--color-warning: oklch(60% 0.09 75);
|
|
26
|
+
--color-warning-border: oklch(83% 0.055 82);
|
|
27
|
+
--color-warning-surface: oklch(98% 0.018 86);
|
|
28
|
+
--color-warning-text: oklch(43% 0.055 69);
|
|
29
|
+
--color-warning-strong: oklch(36% 0.052 67);
|
|
30
|
+
--color-editor-text: oklch(28% 0.014 255);
|
|
31
|
+
--color-placeholder: oklch(78% 0.007 255);
|
|
32
|
+
--color-skeleton: var(--color-border);
|
|
33
|
+
--color-shadow: oklch(20% 0.02 255 / 0.06);
|
|
34
|
+
--color-scrim: oklch(21% 0.018 255 / 0.14);
|
|
35
|
+
--scrollbar-thumb-rest: oklch(51% 0.014 255 / 0.07);
|
|
36
|
+
--scrollbar-thumb: oklch(51% 0.014 255 / 0.22);
|
|
37
|
+
--scrollbar-thumb-hover: oklch(42% 0.016 255 / 0.4);
|
|
38
|
+
--syntax-comment: oklch(58% 0.012 255);
|
|
39
|
+
--syntax-keyword: oklch(42% 0.09 294);
|
|
40
|
+
--syntax-string: oklch(39% 0.075 153);
|
|
41
|
+
--syntax-number: oklch(43% 0.1 45);
|
|
42
|
+
--syntax-link: oklch(43% 0.1 238);
|
|
43
|
+
--syntax-heading: var(--color-text);
|
|
44
|
+
--app-editor: #005c88;
|
|
45
|
+
--app-reader: #a4467f;
|
|
46
|
+
--app-writer: #d55e00;
|
|
47
|
+
--sans: "Atkinson Hyperlegible", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
48
|
+
--mono: "Azeret Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
49
|
+
/* Motion: popovers and small entrances are quick and ease out; a settled
|
|
50
|
+
confirmation holds, then fades away (see controls.css). */
|
|
51
|
+
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
|
52
|
+
--motion-quick: 150ms;
|
|
53
|
+
--motion-base: 180ms;
|
|
54
|
+
--motion-settle: 2.4s;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:root[data-theme="dark"] {
|
|
58
|
+
color-scheme: dark;
|
|
59
|
+
--color-canvas: oklch(17.5% 0.012 255);
|
|
60
|
+
--color-surface: oklch(19.5% 0.012 255);
|
|
61
|
+
--color-surface-subtle: oklch(22.5% 0.012 255);
|
|
62
|
+
--color-text: oklch(92% 0.008 255);
|
|
63
|
+
--color-text-soft: oklch(70% 0.012 255);
|
|
64
|
+
--color-text-muted: oklch(62% 0.011 255);
|
|
65
|
+
--color-text-faint: oklch(56% 0.011 255);
|
|
66
|
+
--color-border: oklch(29% 0.012 255);
|
|
67
|
+
--color-border-strong: oklch(39% 0.012 255);
|
|
68
|
+
--color-selected: oklch(23.5% 0.012 255);
|
|
69
|
+
--color-accent: oklch(73% 0.105 238);
|
|
70
|
+
--color-accent-strong: oklch(65% 0.105 238);
|
|
71
|
+
--color-accent-soft: oklch(31% 0.045 238);
|
|
72
|
+
--color-on-accent: oklch(17% 0.012 255);
|
|
73
|
+
--color-success: oklch(72% 0.09 153);
|
|
74
|
+
--color-danger: oklch(72% 0.115 28);
|
|
75
|
+
--color-danger-soft: oklch(25% 0.03 28);
|
|
76
|
+
--color-warning: oklch(78% 0.09 75);
|
|
77
|
+
--color-warning-border: oklch(48% 0.06 82);
|
|
78
|
+
--color-warning-surface: oklch(25% 0.026 82);
|
|
79
|
+
--color-warning-text: oklch(78% 0.07 82);
|
|
80
|
+
--color-warning-strong: oklch(86% 0.065 82);
|
|
81
|
+
--color-editor-text: oklch(88% 0.009 255);
|
|
82
|
+
--color-placeholder: oklch(56% 0.01 255);
|
|
83
|
+
--color-skeleton: oklch(25% 0.012 255);
|
|
84
|
+
--color-shadow: oklch(5% 0.01 255 / 0.22);
|
|
85
|
+
--color-scrim: oklch(5% 0.01 255 / 0.46);
|
|
86
|
+
--scrollbar-thumb-rest: oklch(72% 0.012 255 / 0.06);
|
|
87
|
+
--scrollbar-thumb: oklch(72% 0.012 255 / 0.2);
|
|
88
|
+
--scrollbar-thumb-hover: oklch(78% 0.012 255 / 0.38);
|
|
89
|
+
--syntax-comment: oklch(62% 0.012 255);
|
|
90
|
+
--syntax-keyword: oklch(76% 0.09 294);
|
|
91
|
+
--syntax-string: oklch(75% 0.08 153);
|
|
92
|
+
--syntax-number: oklch(78% 0.1 65);
|
|
93
|
+
--syntax-link: oklch(77% 0.1 238);
|
|
94
|
+
--app-editor: #63b1e2;
|
|
95
|
+
--app-reader: #e08cc0;
|
|
96
|
+
--app-writer: #f58d4a;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (prefers-color-scheme: dark) {
|
|
100
|
+
:root:not([data-theme]) {
|
|
101
|
+
color-scheme: dark;
|
|
102
|
+
--color-canvas: oklch(17.5% 0.012 255);
|
|
103
|
+
--color-surface: oklch(19.5% 0.012 255);
|
|
104
|
+
--color-surface-subtle: oklch(22.5% 0.012 255);
|
|
105
|
+
--color-text: oklch(92% 0.008 255);
|
|
106
|
+
--color-text-soft: oklch(70% 0.012 255);
|
|
107
|
+
--color-text-muted: oklch(62% 0.011 255);
|
|
108
|
+
--color-text-faint: oklch(56% 0.011 255);
|
|
109
|
+
--color-border: oklch(29% 0.012 255);
|
|
110
|
+
--color-border-strong: oklch(39% 0.012 255);
|
|
111
|
+
--color-selected: oklch(23.5% 0.012 255);
|
|
112
|
+
--color-accent: oklch(73% 0.105 238);
|
|
113
|
+
--color-accent-strong: oklch(65% 0.105 238);
|
|
114
|
+
--color-accent-soft: oklch(31% 0.045 238);
|
|
115
|
+
--color-on-accent: oklch(17% 0.012 255);
|
|
116
|
+
--color-success: oklch(72% 0.09 153);
|
|
117
|
+
--color-danger: oklch(72% 0.115 28);
|
|
118
|
+
--color-danger-soft: oklch(25% 0.03 28);
|
|
119
|
+
--color-warning: oklch(78% 0.09 75);
|
|
120
|
+
--color-warning-border: oklch(48% 0.06 82);
|
|
121
|
+
--color-warning-surface: oklch(25% 0.026 82);
|
|
122
|
+
--color-warning-text: oklch(78% 0.07 82);
|
|
123
|
+
--color-warning-strong: oklch(86% 0.065 82);
|
|
124
|
+
--color-editor-text: oklch(88% 0.009 255);
|
|
125
|
+
--color-placeholder: oklch(56% 0.01 255);
|
|
126
|
+
--color-skeleton: oklch(25% 0.012 255);
|
|
127
|
+
--color-shadow: oklch(5% 0.01 255 / 0.22);
|
|
128
|
+
--color-scrim: oklch(5% 0.01 255 / 0.46);
|
|
129
|
+
--scrollbar-thumb-rest: oklch(72% 0.012 255 / 0.06);
|
|
130
|
+
--scrollbar-thumb: oklch(72% 0.012 255 / 0.2);
|
|
131
|
+
--scrollbar-thumb-hover: oklch(78% 0.012 255 / 0.38);
|
|
132
|
+
--syntax-comment: oklch(62% 0.012 255);
|
|
133
|
+
--syntax-keyword: oklch(76% 0.09 294);
|
|
134
|
+
--syntax-string: oklch(75% 0.08 153);
|
|
135
|
+
--syntax-number: oklch(78% 0.1 65);
|
|
136
|
+
--syntax-link: oklch(77% 0.1 238);
|
|
137
|
+
--app-editor: #63b1e2;
|
|
138
|
+
--app-reader: #e08cc0;
|
|
139
|
+
--app-writer: #f58d4a;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
import { type MdbaseAppId } from "./apps.js";
|
|
3
|
+
import { type MdbaseMarkMotion } from "./brand.js";
|
|
4
|
+
/**
|
|
5
|
+
* The product wordmark as a menu for opening the current collection in the other mdbase apps.
|
|
6
|
+
* Each opens in a new tab so the current app stays where it is.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AppSwitcher({ current, urls, motion }: {
|
|
9
|
+
readonly current: MdbaseAppId;
|
|
10
|
+
/** Lab and local builds, for example `{ writer: import.meta.env.VITE_MDBASE_WRITER_URL }`. */
|
|
11
|
+
readonly urls?: Partial<Record<MdbaseAppId, string | undefined>>;
|
|
12
|
+
readonly motion?: MdbaseMarkMotion | undefined;
|
|
13
|
+
}): JSX.Element;
|