@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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mdbase connect contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # `@mdbase-dev/ui`
2
+
3
+ The shared visual foundation of mdbase apps: Editor, Reader, Writer, and any
4
+ app that wants to look like part of the family. Nothing here is required to
5
+ build on mdbase Connect.
6
+
7
+ ```ts
8
+ import "@mdbase-dev/ui/fonts.css";
9
+ import "@mdbase-dev/ui/tokens.css";
10
+ import "@mdbase-dev/ui/brand.css";
11
+
12
+ import { Wordmark } from "@mdbase-dev/ui/brand";
13
+ import { loadThemePreference, applyThemePreference } from "@mdbase-dev/ui/theme";
14
+ import { mdbaseAppHref, withAppUrls } from "@mdbase-dev/ui/apps";
15
+
16
+ applyThemePreference(loadThemePreference());
17
+ ```
18
+
19
+ - `tokens.css` defines semantic roles (`--color-canvas`, `--color-text`,
20
+ `--color-text-soft`, `--color-accent`, ...) for light, dark and system
21
+ themes. Style components with roles, not palette values. Short aliases such
22
+ as `--ink` belong to each app.
23
+ - `theme` stores the System, Light or Dark choice as `mdbase:theme`.
24
+ - `brand` draws the Frontmatter mark, each app's inverted mark, and the
25
+ `mdbase <app>` wordmark. Add `motion.css` to animate the mark.
26
+ - `apps` lists the mdbase apps and builds links that open the current
27
+ collection in another app. Lab and local builds pass their own URLs to
28
+ `withAppUrls`.
package/css/brand.css ADDED
@@ -0,0 +1,93 @@
1
+ /* The platform mark. `motion.css` animates the same structure when a motion is set. */
2
+ .mdbase-mark {
3
+ overflow: visible;
4
+ }
5
+
6
+ .mdbase-mark .mdbase-mark-segment,
7
+ .mdbase-mark .mdbase-mark-row,
8
+ .mdbase-mark .mdbase-mark-fence,
9
+ .mdbase-mark .mdbase-mark-conveyor-track {
10
+ transform-box: fill-box;
11
+ transform-origin: center;
12
+ }
13
+
14
+ .mdbase-mark .mdbase-mark-ink,
15
+ .mdbase-mark .mdbase-mark-conveyor-track {
16
+ fill: currentColor;
17
+ }
18
+
19
+ .mdbase-mark .mdbase-mark-accent {
20
+ fill: var(--color-accent);
21
+ }
22
+
23
+ .mdbase-mark .mdbase-mark-conveyor-track {
24
+ opacity: 0;
25
+ transform-box: view-box;
26
+ transform-origin: 0 0;
27
+ }
28
+
29
+ /* An app mark takes its app's colour for the bars; the line stays ink. */
30
+ .mdbase-app-mark {
31
+ color: var(--color-text);
32
+ overflow: visible;
33
+ }
34
+
35
+ .mdbase-app-mark.is-editor { --app: var(--app-editor); }
36
+ .mdbase-app-mark.is-reader { --app: var(--app-reader); }
37
+ .mdbase-app-mark.is-writer { --app: var(--app-writer); }
38
+
39
+ .mdbase-app-mark-bars {
40
+ fill: var(--app);
41
+ }
42
+
43
+ .mdbase-app-mark-line {
44
+ fill: currentColor;
45
+ }
46
+
47
+ .wordmark {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 8px;
51
+ color: var(--color-text);
52
+ font-family: var(--mono);
53
+ font-size: 12px;
54
+ font-weight: 500;
55
+ line-height: 1;
56
+ letter-spacing: -0.02em;
57
+ }
58
+
59
+ .wordmark-mark {
60
+ width: 20px;
61
+ height: 20px;
62
+ flex: 0 0 auto;
63
+ }
64
+
65
+ .wordmark-label {
66
+ min-width: 0;
67
+ display: inline-flex;
68
+ align-items: baseline;
69
+ gap: 0.65ch;
70
+ white-space: nowrap;
71
+ transition:
72
+ opacity 140ms cubic-bezier(0.22, 1, 0.36, 1),
73
+ transform 140ms cubic-bezier(0.22, 1, 0.36, 1),
74
+ display 140ms allow-discrete;
75
+ }
76
+
77
+ .wordmark strong {
78
+ display: inline-block;
79
+ color: var(--color-text-muted);
80
+ font-weight: 500;
81
+ transition:
82
+ opacity 140ms cubic-bezier(0.22, 1, 0.36, 1),
83
+ transform 140ms cubic-bezier(0.22, 1, 0.36, 1),
84
+ display 140ms allow-discrete;
85
+ }
86
+
87
+ @starting-style {
88
+ .wordmark-label,
89
+ .wordmark-label strong {
90
+ opacity: 0;
91
+ transform: translateX(-3px);
92
+ }
93
+ }