@risinghq/folio 0.0.0-stage → 0.0.1

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.
@@ -0,0 +1,89 @@
1
+ .site-header {
2
+ position: sticky;
3
+ top: 0;
4
+ z-index: 10;
5
+ display: flex;
6
+ align-items: center;
7
+ gap: 12px;
8
+ height: var(--header);
9
+ padding: 0 var(--gutter);
10
+ background: var(--bg);
11
+ border-bottom: 1px solid var(--line-subtle);
12
+ }
13
+
14
+ .brand {
15
+ display: inline-flex;
16
+ align-items: center;
17
+ gap: 10px;
18
+ font-size: 16px;
19
+ font-weight: 600;
20
+ letter-spacing: -0.01em;
21
+ }
22
+ .brand-mark {
23
+ width: 18px;
24
+ height: 18px;
25
+ border-radius: 5px;
26
+ background: var(--accent);
27
+ }
28
+
29
+ .version {
30
+ padding: 1px 8px;
31
+ font: 12px/1.6 var(--mono);
32
+ color: var(--muted);
33
+ border: 1px solid var(--line);
34
+ border-radius: 999px;
35
+ }
36
+
37
+ .site-nav {
38
+ display: flex;
39
+ align-self: stretch;
40
+ gap: 28px;
41
+ margin-left: auto;
42
+ margin-right: 12px;
43
+ font-size: 14px;
44
+ }
45
+ .site-nav a {
46
+ display: flex;
47
+ align-items: center;
48
+ margin-bottom: -1px;
49
+ color: var(--muted);
50
+ border-bottom: 2px solid transparent;
51
+ }
52
+ .site-nav a:hover {
53
+ color: var(--text);
54
+ }
55
+ .site-nav a[aria-current] {
56
+ color: var(--text);
57
+ border-bottom-color: var(--accent);
58
+ }
59
+
60
+ .theme-toggle {
61
+ display: grid;
62
+ place-items: center;
63
+ width: 36px;
64
+ height: 36px;
65
+ padding: 0;
66
+ color: var(--text);
67
+ background: none;
68
+ border: 1px solid var(--line);
69
+ border-radius: var(--r-md);
70
+ cursor: pointer;
71
+ }
72
+ .theme-toggle::before {
73
+ content: "";
74
+ width: 14px;
75
+ height: 14px;
76
+ border-radius: 50%;
77
+ border: 1.5px solid currentColor;
78
+ background: linear-gradient(90deg, currentColor 50%, transparent 50%);
79
+ }
80
+
81
+ @media (max-width: 820px) {
82
+ .site-nav,
83
+ .version {
84
+ display: none;
85
+ }
86
+ .theme-toggle {
87
+ margin-left: auto;
88
+ }
89
+ }
@@ -0,0 +1,14 @@
1
+ /* The home page: the docs folder's `index.md`. */
2
+
3
+ .home {
4
+ max-width: 720px;
5
+ margin: 96px auto;
6
+ padding: 0 24px;
7
+ }
8
+ .home h1 {
9
+ margin: 0 0 16px;
10
+ font: 600 clamp(32px, 6vw, 48px) / 1.1 var(--font);
11
+ letter-spacing: -0.02em;
12
+ color: var(--text);
13
+ text-wrap: balance;
14
+ }
@@ -0,0 +1,13 @@
1
+ .not-found {
2
+ max-width: 640px;
3
+ margin: 80px auto;
4
+ padding: 0 24px;
5
+ }
6
+ .not-found ul {
7
+ padding-left: 20px;
8
+ }
9
+ .not-found a {
10
+ text-decoration: underline;
11
+ text-decoration-color: var(--accent);
12
+ text-underline-offset: 4px;
13
+ }
@@ -0,0 +1,39 @@
1
+ .pager {
2
+ display: grid;
3
+ grid-template-columns: 1fr 1fr;
4
+ gap: 16px;
5
+ margin-bottom: 24px;
6
+ padding-top: 32px;
7
+ border-top: 1px solid var(--line-subtle);
8
+ }
9
+ .pager a {
10
+ display: grid;
11
+ gap: 4px;
12
+ padding: 16px 20px;
13
+ font-size: 16px;
14
+ font-weight: 500;
15
+ color: var(--text);
16
+ border: 1px solid var(--line);
17
+ border-radius: var(--r-lg);
18
+ transition: border-color 0.15s;
19
+ }
20
+ .pager a:hover {
21
+ border-color: var(--faint);
22
+ }
23
+ .pager a[rel="next"] {
24
+ grid-column: 2;
25
+ text-align: right;
26
+ }
27
+ .pager span {
28
+ font: 12.5px var(--mono);
29
+ color: var(--faint);
30
+ }
31
+
32
+ @media (max-width: 820px) {
33
+ .pager {
34
+ grid-template-columns: 1fr;
35
+ }
36
+ .pager a[rel="next"] {
37
+ grid-column: 1;
38
+ }
39
+ }
@@ -0,0 +1,104 @@
1
+ /* The rendered markdown of a page. */
2
+
3
+ .prose {
4
+ color: var(--text-body);
5
+ font-size: 16px;
6
+ line-height: 1.75;
7
+ }
8
+ .prose > p:first-child {
9
+ font-size: 17.5px;
10
+ color: var(--text);
11
+ }
12
+ .prose h2 {
13
+ margin: 56px 0 14px;
14
+ font-size: 28px;
15
+ line-height: 1.2;
16
+ letter-spacing: -0.025em;
17
+ font-weight: 600;
18
+ color: var(--text);
19
+ }
20
+ .prose h3 {
21
+ margin: 32px 0 10px;
22
+ font-size: 18px;
23
+ line-height: 1.3;
24
+ letter-spacing: -0.01em;
25
+ font-weight: 600;
26
+ color: var(--text);
27
+ }
28
+ .prose p,
29
+ .prose li {
30
+ text-wrap: pretty;
31
+ }
32
+ .prose p {
33
+ margin: 0 0 18px;
34
+ }
35
+ .prose ul,
36
+ .prose ol {
37
+ margin: 0 0 18px;
38
+ padding-left: 22px;
39
+ }
40
+ .prose li {
41
+ margin-bottom: 6px;
42
+ }
43
+ .prose li::marker {
44
+ color: var(--faint);
45
+ }
46
+ .prose a:not(.btn) {
47
+ color: var(--text);
48
+ text-decoration: underline;
49
+ text-decoration-color: var(--accent);
50
+ text-decoration-thickness: 1.5px;
51
+ text-underline-offset: 4px;
52
+ }
53
+ .prose a:not(.btn):hover {
54
+ color: var(--accent);
55
+ }
56
+ .prose img {
57
+ display: block;
58
+ max-width: 100%;
59
+ height: auto;
60
+ margin: 0 0 24px;
61
+ border: 1px solid var(--line-subtle);
62
+ border-radius: var(--r-lg);
63
+ }
64
+ .prose .actions {
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ gap: 8px;
68
+ margin: 28px 0 48px;
69
+ }
70
+ .prose .anchor {
71
+ color: inherit;
72
+ text-decoration: none;
73
+ }
74
+
75
+ .prose .table {
76
+ margin: 0 0 24px;
77
+ overflow-x: auto;
78
+ border: 1px solid var(--line-subtle);
79
+ border-radius: var(--r-lg);
80
+ }
81
+ .prose table {
82
+ width: 100%;
83
+ border-collapse: collapse;
84
+ font-size: 15px;
85
+ line-height: 1.55;
86
+ }
87
+ .prose th {
88
+ padding: 10px 16px;
89
+ text-align: left;
90
+ background: var(--surface);
91
+ font: 500 12px var(--mono);
92
+ color: var(--faint);
93
+ }
94
+ .prose td {
95
+ padding: 12px 16px;
96
+ vertical-align: top;
97
+ border-top: 1px solid var(--line-subtle);
98
+ }
99
+ .prose td code {
100
+ padding: 0;
101
+ font-size: 13.5px;
102
+ background: none;
103
+ border: 0;
104
+ }
@@ -0,0 +1,173 @@
1
+ /* The manual's page list: a sticky column on wide screens, a drawer on narrow ones. */
2
+
3
+ .sidebar {
4
+ position: sticky;
5
+ top: var(--header);
6
+ align-self: start;
7
+ height: calc(100vh - var(--header));
8
+ overflow-y: auto;
9
+ padding: 32px 20px;
10
+ border-right: 1px solid var(--line-subtle);
11
+ font-size: 14.5px;
12
+ }
13
+ .sidebar-head {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ padding: 0 12px 12px;
18
+ font: 12.5px var(--mono);
19
+ color: var(--faint);
20
+ }
21
+ .sidebar ol {
22
+ list-style: none;
23
+ margin: 0;
24
+ padding: 0;
25
+ }
26
+ .sidebar a {
27
+ display: flex;
28
+ gap: 14px;
29
+ padding: 7px 12px;
30
+ border-radius: var(--r-md);
31
+ color: var(--muted);
32
+ line-height: 1.4;
33
+ }
34
+ .sidebar a:hover {
35
+ color: var(--text);
36
+ }
37
+ .sidebar .num {
38
+ flex: none;
39
+ width: 16px;
40
+ padding-top: 2px;
41
+ font: 11.5px/1.6 var(--mono);
42
+ color: var(--faint);
43
+ }
44
+ .sidebar a[aria-current="page"] {
45
+ color: var(--text);
46
+ font-weight: 500;
47
+ background: var(--raised);
48
+ }
49
+ .sidebar a[aria-current="page"] .num {
50
+ color: var(--accent);
51
+ }
52
+
53
+ .menu-bar,
54
+ .menu-close,
55
+ .scrim {
56
+ display: none;
57
+ }
58
+
59
+ @media (max-width: 820px) {
60
+ .menu-bar {
61
+ display: flex;
62
+ align-items: center;
63
+ gap: 8px;
64
+ height: 48px;
65
+ padding: 0 var(--gutter);
66
+ border-bottom: 1px solid var(--line-subtle);
67
+ font-size: 14.5px;
68
+ }
69
+ .menu-button {
70
+ display: inline-flex;
71
+ align-items: center;
72
+ gap: 10px;
73
+ padding: 0;
74
+ color: var(--text);
75
+ background: none;
76
+ border: 0;
77
+ cursor: pointer;
78
+ }
79
+ .menu-icon,
80
+ .menu-icon::before,
81
+ .menu-icon::after {
82
+ display: block;
83
+ width: 16px;
84
+ height: 1.5px;
85
+ background: currentColor;
86
+ }
87
+ .menu-icon {
88
+ position: relative;
89
+ }
90
+ .menu-icon::before,
91
+ .menu-icon::after {
92
+ content: "";
93
+ position: absolute;
94
+ }
95
+ .menu-icon::before {
96
+ top: -5px;
97
+ }
98
+ .menu-icon::after {
99
+ top: 5px;
100
+ }
101
+ .menu-crumb {
102
+ overflow: hidden;
103
+ font: 12.5px var(--mono);
104
+ color: var(--faint);
105
+ white-space: nowrap;
106
+ text-overflow: ellipsis;
107
+ }
108
+
109
+ .sidebar {
110
+ position: fixed;
111
+ inset: 0 auto 0 0;
112
+ z-index: 30;
113
+ width: min(316px, 85vw);
114
+ height: 100%;
115
+ padding: 20px 12px;
116
+ background: var(--bg-sunken);
117
+ transform: translateX(-100%);
118
+ visibility: hidden;
119
+ transition:
120
+ transform 0.3s var(--ease),
121
+ visibility 0.3s;
122
+ }
123
+ .sidebar a {
124
+ padding: 10px 12px;
125
+ }
126
+ .menu-close {
127
+ display: block;
128
+ position: relative;
129
+ width: 28px;
130
+ height: 28px;
131
+ margin-left: 8px;
132
+ color: var(--muted);
133
+ background: none;
134
+ border: 0;
135
+ cursor: pointer;
136
+ }
137
+ .menu-close::before,
138
+ .menu-close::after {
139
+ content: "";
140
+ position: absolute;
141
+ left: 6px;
142
+ top: 13px;
143
+ width: 16px;
144
+ height: 1.5px;
145
+ background: currentColor;
146
+ transform: rotate(45deg);
147
+ }
148
+ .menu-close::after {
149
+ transform: rotate(-45deg);
150
+ }
151
+ .scrim {
152
+ display: block;
153
+ position: fixed;
154
+ inset: 0;
155
+ z-index: 25;
156
+ background: var(--scrim);
157
+ opacity: 0;
158
+ pointer-events: none;
159
+ transition: opacity 0.3s;
160
+ }
161
+
162
+ .menu-open {
163
+ overflow: hidden;
164
+ }
165
+ .menu-open .sidebar {
166
+ transform: none;
167
+ visibility: visible;
168
+ }
169
+ .menu-open .scrim {
170
+ opacity: 1;
171
+ pointer-events: auto;
172
+ }
173
+ }
@@ -0,0 +1,102 @@
1
+ /* "On this page": the rail on wide screens, a disclosure above the title on narrow ones. */
2
+
3
+ .rail {
4
+ position: sticky;
5
+ top: var(--header);
6
+ align-self: start;
7
+ padding: 48px 32px 0 0;
8
+ font-size: 14px;
9
+ }
10
+ .toc p {
11
+ margin: 0 0 14px;
12
+ font: 12.5px var(--mono);
13
+ color: var(--faint);
14
+ }
15
+ .toc ul {
16
+ list-style: none;
17
+ margin: 0 0 24px;
18
+ padding: 0;
19
+ border-left: 1px solid var(--line-subtle);
20
+ }
21
+ .toc a {
22
+ display: block;
23
+ margin-left: -1px;
24
+ padding: 4px 0 4px 15px;
25
+ color: var(--faint);
26
+ border-left: 2px solid transparent;
27
+ }
28
+ .toc li[data-depth="3"] a {
29
+ padding-left: 27px;
30
+ }
31
+ .toc a:hover {
32
+ color: var(--text);
33
+ }
34
+ .toc a[aria-current="location"] {
35
+ color: var(--text);
36
+ border-left-color: var(--accent);
37
+ }
38
+ .to-top {
39
+ font-size: 13.5px;
40
+ color: var(--faint);
41
+ }
42
+ .to-top:hover {
43
+ color: var(--text);
44
+ }
45
+
46
+ .toc-inline {
47
+ display: none;
48
+ }
49
+
50
+ @media (max-width: 1180px) {
51
+ .rail {
52
+ display: none;
53
+ }
54
+ }
55
+
56
+ @media (max-width: 820px) {
57
+ .toc-inline {
58
+ display: block;
59
+ margin: 0 0 24px;
60
+ background: var(--surface);
61
+ border: 1px solid var(--line);
62
+ border-radius: var(--r-lg);
63
+ font-size: 15px;
64
+ }
65
+ .toc-inline summary {
66
+ display: flex;
67
+ justify-content: space-between;
68
+ align-items: center;
69
+ padding: 12px 16px;
70
+ cursor: pointer;
71
+ list-style: none;
72
+ }
73
+ .toc-inline summary::-webkit-details-marker {
74
+ display: none;
75
+ }
76
+ .toc-inline summary::after {
77
+ content: "";
78
+ width: 7px;
79
+ height: 7px;
80
+ margin-top: -4px;
81
+ border: solid var(--muted);
82
+ border-width: 0 1.5px 1.5px 0;
83
+ transform: rotate(45deg);
84
+ }
85
+ .toc-inline[open] summary::after {
86
+ margin-top: 4px;
87
+ transform: rotate(-135deg);
88
+ }
89
+ .toc-inline ul {
90
+ list-style: none;
91
+ margin: 0;
92
+ padding: 0 16px 12px;
93
+ }
94
+ .toc-inline a {
95
+ display: block;
96
+ padding: 6px 0;
97
+ color: var(--muted);
98
+ }
99
+ .toc-inline li[data-depth="3"] a {
100
+ padding-left: 12px;
101
+ }
102
+ }
@@ -0,0 +1,110 @@
1
+ /* Controls for an island or the home page. Their class names are public API. */
2
+
3
+ .btn {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: 8px;
7
+ height: 36px;
8
+ padding: 0 16px;
9
+ font: 500 14px/1 var(--font);
10
+ color: var(--text);
11
+ background: var(--raised);
12
+ border: 1px solid var(--line);
13
+ border-radius: var(--r-md);
14
+ cursor: pointer;
15
+ transition:
16
+ border-color 0.15s,
17
+ opacity 0.15s,
18
+ transform 0.12s var(--ease);
19
+ }
20
+ .btn:hover {
21
+ border-color: var(--faint);
22
+ }
23
+ .btn:active {
24
+ transform: scale(0.97);
25
+ }
26
+ .btn:disabled {
27
+ opacity: 0.45;
28
+ cursor: default;
29
+ }
30
+ .btn-primary {
31
+ color: var(--bg);
32
+ background: var(--text);
33
+ border-color: var(--text);
34
+ }
35
+ .btn-primary:hover {
36
+ border-color: var(--text);
37
+ opacity: 0.88;
38
+ }
39
+ .btn-ghost {
40
+ color: var(--muted);
41
+ background: none;
42
+ border-color: transparent;
43
+ }
44
+ .btn-ghost:hover {
45
+ color: var(--text);
46
+ border-color: transparent;
47
+ }
48
+ .btn-sm {
49
+ height: 28px;
50
+ padding: 0 10px;
51
+ font-size: 13px;
52
+ border-radius: var(--r-sm);
53
+ }
54
+
55
+ input[type="range"] {
56
+ width: 100%;
57
+ margin: 0;
58
+ accent-color: var(--accent);
59
+ }
60
+ input[type="checkbox"] {
61
+ width: 16px;
62
+ height: 16px;
63
+ margin: 0;
64
+ accent-color: var(--accent);
65
+ }
66
+ input:disabled {
67
+ opacity: 0.45;
68
+ }
69
+
70
+ .select {
71
+ position: relative;
72
+ display: block;
73
+ }
74
+ .select select {
75
+ appearance: none;
76
+ width: 100%;
77
+ height: 34px;
78
+ padding: 0 32px 0 12px;
79
+ font: 14px var(--font);
80
+ color: var(--text);
81
+ background: var(--bg-sunken);
82
+ border: 1px solid var(--line);
83
+ border-radius: var(--r-md);
84
+ }
85
+ .select::after {
86
+ content: "";
87
+ position: absolute;
88
+ right: 14px;
89
+ top: 11px;
90
+ width: 7px;
91
+ height: 7px;
92
+ pointer-events: none;
93
+ border: solid var(--muted);
94
+ border-width: 0 1.5px 1.5px 0;
95
+ transform: rotate(45deg);
96
+ }
97
+
98
+ .label {
99
+ font: 12.5px/1.4 var(--mono);
100
+ color: var(--faint);
101
+ }
102
+
103
+ :not(pre) > code {
104
+ font-size: 0.86em;
105
+ color: var(--text);
106
+ padding: 1px 6px;
107
+ border-radius: var(--r-sm);
108
+ background: var(--raised);
109
+ border: 1px solid var(--line);
110
+ }
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Local faces scaled to Figtree's and Geist Mono's metrics. Text set in them
3
+ * while the web fonts load takes the same space, so the swap does not move the
4
+ * page. The values come from @capsizecss/metrics: size-adjust is the ratio of
5
+ * average character widths, and each override is the web font's metric divided
6
+ * by it. Liberation Sans and Liberation Mono share Arial's and Courier New's
7
+ * metrics.
8
+ */
9
+ @font-face {
10
+ font-family: "Figtree Fallback";
11
+ src: local("Arial"), local("ArialMT"), local("Liberation Sans");
12
+ size-adjust: 100.72%;
13
+ ascent-override: 94.32%;
14
+ descent-override: 24.82%;
15
+ line-gap-override: 0%;
16
+ }
17
+ @font-face {
18
+ font-family: "Geist Mono Fallback";
19
+ src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono");
20
+ size-adjust: 99.98%;
21
+ ascent-override: 100.52%;
22
+ descent-override: 29.51%;
23
+ line-gap-override: 0%;
24
+ }
@@ -0,0 +1,14 @@
1
+ @import "./fonts.css";
2
+ @import "./tokens.css";
3
+ @import "./base.css";
4
+ @import "./controls.css";
5
+ @import "./components/header.css";
6
+ @import "./components/sidebar.css";
7
+ @import "./components/doc.css";
8
+ @import "./components/prose.css";
9
+ @import "./components/code-block.css";
10
+ @import "./components/toc.css";
11
+ @import "./components/pager.css";
12
+ @import "./components/footer.css";
13
+ @import "./components/not-found.css";
14
+ @import "./components/home.css";