@prosefly/astro-components 0.2.1 → 0.4.0
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/README.md +22 -22
- package/dist/client/accordions.js +7 -7
- package/dist/client/image-gallery.js +12 -12
- package/dist/client/tabs.js +17 -17
- package/dist/markdown/callout-directives.d.ts +3 -0
- package/dist/markdown/callout-directives.d.ts.map +1 -0
- package/dist/markdown/callout-directives.js +130 -0
- package/dist/markdown/callout-directives.js.map +1 -0
- package/dist/markdown/image-gallery-plugin.js +9 -9
- package/dist/markdown/image-gallery.css +31 -29
- package/dist/markdown/index.d.ts +2 -0
- package/dist/markdown/index.d.ts.map +1 -1
- package/dist/markdown/index.js +2 -0
- package/dist/markdown/index.js.map +1 -1
- package/dist/markdown/package-manager-tabs.js +1 -1
- package/dist/mdx/AccordionItem.astro +7 -7
- package/dist/mdx/Accordions.astro +30 -28
- package/dist/mdx/Badge.astro +70 -68
- package/dist/mdx/Callout.astro +49 -48
- package/dist/mdx/Card.astro +43 -42
- package/dist/mdx/CardGrid.astro +9 -5
- package/dist/mdx/FileTree.astro +70 -69
- package/dist/mdx/FileTreeItem.astro +25 -25
- package/dist/mdx/Icon.astro +2 -2
- package/dist/mdx/Steps.astro +36 -35
- package/dist/mdx/Tabs.astro +64 -63
- package/dist/mdx/rehype-steps.js +2 -2
- package/dist/mdx/rehype-tabs.js +1 -1
- package/dist/theme-tokens.css +96 -0
- package/package.json +5 -3
package/dist/mdx/Steps.astro
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
import '../theme-tokens.css';
|
|
2
3
|
import { processSteps } from './rehype-steps';
|
|
3
4
|
|
|
4
5
|
const content = await Astro.slots.render('default');
|
|
@@ -8,81 +9,81 @@ const { html } = processSteps(content);
|
|
|
8
9
|
<Fragment set:html={html} />
|
|
9
10
|
|
|
10
11
|
<style is:global>
|
|
11
|
-
.
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
counter-reset:
|
|
12
|
+
.pf-steps {
|
|
13
|
+
--pf-steps-bullet-size: 1.75rem;
|
|
14
|
+
--pf-steps-bullet-margin: 0.375rem;
|
|
15
|
+
--pf-steps-line: var(--pf-border-subtle, #e5e7eb);
|
|
16
|
+
--pf-steps-marker-background: var(--pf-surface, #f4f6f8);
|
|
17
|
+
--pf-steps-marker-foreground: var(--pf-text, #344054);
|
|
18
|
+
counter-reset: pf-steps-counter var(--pf-steps-start, 0);
|
|
18
19
|
list-style: none;
|
|
19
20
|
margin-block: 1.5rem;
|
|
20
21
|
padding-inline-start: 0;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
.
|
|
24
|
-
counter-increment:
|
|
24
|
+
.pf-steps > li {
|
|
25
|
+
counter-increment: pf-steps-counter;
|
|
25
26
|
min-height: calc(
|
|
26
|
-
var(--
|
|
27
|
+
var(--pf-steps-bullet-size) + var(--pf-steps-bullet-margin)
|
|
27
28
|
);
|
|
28
29
|
padding-block-end: 1px;
|
|
29
|
-
padding-inline-start: calc(var(--
|
|
30
|
+
padding-inline-start: calc(var(--pf-steps-bullet-size) + 1rem);
|
|
30
31
|
position: relative;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
.
|
|
34
|
+
.pf-steps > li + li {
|
|
34
35
|
margin-block-start: 0;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.
|
|
38
|
-
background: var(--
|
|
38
|
+
.pf-steps > li::before {
|
|
39
|
+
background: var(--pf-steps-marker-background);
|
|
39
40
|
border-radius: 999px;
|
|
40
|
-
color: var(--
|
|
41
|
-
content: counter(
|
|
41
|
+
color: var(--pf-steps-marker-foreground);
|
|
42
|
+
content: counter(pf-steps-counter);
|
|
42
43
|
font-size: 0.8125rem;
|
|
43
44
|
font-weight: 600;
|
|
44
|
-
height: var(--
|
|
45
|
+
height: var(--pf-steps-bullet-size);
|
|
45
46
|
inset-block-start: 0;
|
|
46
47
|
inset-inline-start: 0;
|
|
47
|
-
line-height: var(--
|
|
48
|
+
line-height: var(--pf-steps-bullet-size);
|
|
48
49
|
position: absolute;
|
|
49
50
|
text-align: center;
|
|
50
|
-
width: var(--
|
|
51
|
+
width: var(--pf-steps-bullet-size);
|
|
51
52
|
z-index: 1;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
.
|
|
55
|
-
background: var(--
|
|
56
|
-
bottom: var(--
|
|
55
|
+
.pf-steps > li::after {
|
|
56
|
+
background: var(--pf-steps-line);
|
|
57
|
+
bottom: var(--pf-steps-bullet-margin);
|
|
57
58
|
content: "";
|
|
58
|
-
inset-inline-start: calc((var(--
|
|
59
|
+
inset-inline-start: calc((var(--pf-steps-bullet-size) - 1px) / 2);
|
|
59
60
|
position: absolute;
|
|
60
|
-
top: calc(var(--
|
|
61
|
+
top: calc(var(--pf-steps-bullet-size) + var(--pf-steps-bullet-margin));
|
|
61
62
|
width: 1px;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
.
|
|
65
|
+
.pf-steps > li:last-child::after {
|
|
65
66
|
display: none;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
.
|
|
69
|
-
--
|
|
70
|
-
--
|
|
69
|
+
.pf-steps > li > :first-child {
|
|
70
|
+
--pf-steps-first-line-height: 1.75em;
|
|
71
|
+
--pf-steps-shift-y: calc(
|
|
71
72
|
0.5 *
|
|
72
|
-
(var(--
|
|
73
|
+
(var(--pf-steps-bullet-size) - var(--pf-steps-first-line-height))
|
|
73
74
|
);
|
|
74
75
|
margin-block-start: 0;
|
|
75
|
-
margin-bottom: var(--
|
|
76
|
-
transform: translateY(var(--
|
|
76
|
+
margin-bottom: var(--pf-steps-shift-y);
|
|
77
|
+
transform: translateY(var(--pf-steps-shift-y));
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
.
|
|
80
|
-
--
|
|
80
|
+
.pf-steps > li > :first-child:where(h1, h2, h3, h4, h5, h6) {
|
|
81
|
+
--pf-steps-first-line-height: 1.25em;
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
@supports (--prop: 1lh) {
|
|
84
|
-
.
|
|
85
|
-
--
|
|
85
|
+
.pf-steps > li > :first-child {
|
|
86
|
+
--pf-steps-first-line-height: 1lh;
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
</style>
|
package/dist/mdx/Tabs.astro
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
import '../theme-tokens.css';
|
|
2
3
|
import Icon from './Icon.astro';
|
|
3
4
|
import { processPanels } from './rehype-tabs';
|
|
4
5
|
|
|
@@ -10,7 +11,7 @@ interface Props {
|
|
|
10
11
|
|
|
11
12
|
const { copy, defaultValue, syncKey } = Astro.props;
|
|
12
13
|
const hasCopy = copy === true || copy === 'true' || copy === '';
|
|
13
|
-
const tabsId = `
|
|
14
|
+
const tabsId = `pf-tabs-${globalThis.crypto.randomUUID()}`;
|
|
14
15
|
const panelHtml = await Astro.slots.render('default');
|
|
15
16
|
const { activeIndex, html, panels } = processPanels(panelHtml, {
|
|
16
17
|
defaultValue,
|
|
@@ -20,20 +21,20 @@ const hasIcons = panels.some((panel) => panel.icon);
|
|
|
20
21
|
const activePanel = panels[activeIndex] ?? panels[0];
|
|
21
22
|
---
|
|
22
23
|
|
|
23
|
-
<section class="
|
|
24
|
-
<div class="
|
|
24
|
+
<section class="pf-tabs" data-pf-tabs data-sync-key={syncKey}>
|
|
25
|
+
<div class="pf-tabs__header">
|
|
25
26
|
{
|
|
26
27
|
hasIcons && (
|
|
27
28
|
<div
|
|
28
29
|
aria-hidden="true"
|
|
29
|
-
class="
|
|
30
|
+
class="pf-tabs__active-icons"
|
|
30
31
|
hidden={!activePanel?.icon}
|
|
31
32
|
>
|
|
32
33
|
{panels.map((panel, index) => (
|
|
33
34
|
panel.icon && (
|
|
34
35
|
<span
|
|
35
|
-
class="
|
|
36
|
-
data-
|
|
36
|
+
class="pf-tabs__active-icon"
|
|
37
|
+
data-pf-tabs-icon-for={panel.panelId}
|
|
37
38
|
hidden={index !== activeIndex}
|
|
38
39
|
>
|
|
39
40
|
<Icon name={panel.icon} />
|
|
@@ -43,14 +44,14 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
43
44
|
</div>
|
|
44
45
|
)
|
|
45
46
|
}
|
|
46
|
-
<div aria-label="Tabs" class="
|
|
47
|
+
<div aria-label="Tabs" class="pf-tabs__list" role="tablist">
|
|
47
48
|
{
|
|
48
49
|
panels.map((panel, index) => (
|
|
49
50
|
<button
|
|
50
51
|
aria-controls={panel.panelId}
|
|
51
52
|
aria-selected={index === activeIndex ? 'true' : 'false'}
|
|
52
|
-
class="
|
|
53
|
-
data-
|
|
53
|
+
class="pf-tabs__trigger"
|
|
54
|
+
data-pf-tabs-trigger
|
|
54
55
|
data-tab-label={panel.label}
|
|
55
56
|
data-tab-panel={panel.panelId}
|
|
56
57
|
data-tab-value={panel.value}
|
|
@@ -68,22 +69,22 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
68
69
|
hasCopy && (
|
|
69
70
|
<button
|
|
70
71
|
aria-label="Copy code"
|
|
71
|
-
class="
|
|
72
|
-
data-
|
|
72
|
+
class="pf-tabs__copy"
|
|
73
|
+
data-pf-tabs-copy
|
|
73
74
|
title="Copy code"
|
|
74
75
|
type="button"
|
|
75
76
|
>
|
|
76
|
-
<span class="
|
|
77
|
+
<span class="pf-tabs__copy-icon" data-pf-tabs-copy-icon="copy">
|
|
77
78
|
<Icon name="lucide:copy" />
|
|
78
79
|
</span>
|
|
79
|
-
<span class="
|
|
80
|
+
<span class="pf-tabs__copy-icon" data-pf-tabs-copy-icon="check" hidden>
|
|
80
81
|
<Icon name="lucide:check" />
|
|
81
82
|
</span>
|
|
82
83
|
</button>
|
|
83
84
|
)
|
|
84
85
|
}
|
|
85
86
|
</div>
|
|
86
|
-
<div class="
|
|
87
|
+
<div class="pf-tabs__panels" set:html={html} />
|
|
87
88
|
</section>
|
|
88
89
|
|
|
89
90
|
<script>
|
|
@@ -91,40 +92,40 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
91
92
|
</script>
|
|
92
93
|
|
|
93
94
|
<style is:global>
|
|
94
|
-
.
|
|
95
|
-
background: var(--
|
|
96
|
-
border: 1px solid var(--
|
|
97
|
-
border-radius: min(var(--
|
|
95
|
+
.pf-tabs {
|
|
96
|
+
background: var(--pf-surface, #f4f6f8);
|
|
97
|
+
border: 1px solid var(--pf-border-subtle, #e5e7eb);
|
|
98
|
+
border-radius: min(var(--pf-radius-lg, 0.75rem), 1rem);
|
|
98
99
|
margin-block: 1.25rem;
|
|
99
100
|
overflow: hidden;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
.
|
|
103
|
+
.pf-tabs__header {
|
|
103
104
|
align-items: center;
|
|
104
|
-
background: var(--
|
|
105
|
-
border-bottom: 1px solid var(--
|
|
105
|
+
background: var(--pf-surface, #f4f6f8);
|
|
106
|
+
border-bottom: 1px solid var(--pf-border-subtle, #e5e7eb);
|
|
106
107
|
display: flex;
|
|
107
108
|
gap: 0.625rem;
|
|
108
109
|
padding: 0.5rem 1rem;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
.
|
|
112
|
+
.pf-tabs__active-icons {
|
|
112
113
|
align-items: center;
|
|
113
|
-
color: var(--
|
|
114
|
+
color: var(--pf-text, #344054);
|
|
114
115
|
display: inline-grid;
|
|
115
116
|
flex: 0 0 auto;
|
|
116
117
|
justify-content: center;
|
|
117
118
|
line-height: 0;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
.
|
|
121
|
-
.
|
|
122
|
-
.
|
|
123
|
-
.
|
|
121
|
+
.pf-tabs__active-icons[hidden],
|
|
122
|
+
.pf-tabs__active-icon[hidden],
|
|
123
|
+
.pf-tabs__copy-icon[hidden],
|
|
124
|
+
.pf-tabs__panel[hidden] {
|
|
124
125
|
display: none;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
.
|
|
128
|
+
.pf-tabs__active-icon {
|
|
128
129
|
align-items: center;
|
|
129
130
|
display: inline-flex;
|
|
130
131
|
height: 1rem;
|
|
@@ -133,13 +134,13 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
133
134
|
width: 1rem;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
.
|
|
137
|
+
.pf-tabs__active-icon > .pf-icon {
|
|
137
138
|
display: block;
|
|
138
139
|
height: 1rem;
|
|
139
140
|
width: 1rem;
|
|
140
141
|
}
|
|
141
142
|
|
|
142
|
-
.
|
|
143
|
+
.pf-tabs__list {
|
|
143
144
|
align-items: center;
|
|
144
145
|
background: transparent;
|
|
145
146
|
display: inline-flex;
|
|
@@ -152,16 +153,16 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
152
153
|
scrollbar-width: none;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
.
|
|
156
|
+
.pf-tabs__list::-webkit-scrollbar {
|
|
156
157
|
display: none;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
.
|
|
160
|
+
.pf-tabs__trigger {
|
|
160
161
|
appearance: none;
|
|
161
162
|
background: transparent;
|
|
162
163
|
border: 1px solid transparent;
|
|
163
|
-
border-radius: var(--
|
|
164
|
-
color: var(--
|
|
164
|
+
border-radius: var(--pf-radius-md, 0.5rem);
|
|
165
|
+
color: var(--pf-text-muted, #667085);
|
|
165
166
|
cursor: pointer;
|
|
166
167
|
flex: 0 0 auto;
|
|
167
168
|
font: inherit;
|
|
@@ -176,29 +177,29 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
176
177
|
color 160ms ease;
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
.
|
|
180
|
-
color: var(--
|
|
180
|
+
.pf-tabs__trigger:hover {
|
|
181
|
+
color: var(--pf-text-strong, var(--pf-text, #182230));
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
.
|
|
184
|
-
outline: 2px solid var(--
|
|
184
|
+
.pf-tabs__trigger:focus-visible {
|
|
185
|
+
outline: 2px solid var(--pf-accent, #3e7e55);
|
|
185
186
|
outline-offset: 2px;
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
.
|
|
189
|
-
background: var(--
|
|
190
|
-
border-color: var(--
|
|
189
|
+
.pf-tabs__trigger[aria-selected='true'] {
|
|
190
|
+
background: var(--pf-background, #ffffff);
|
|
191
|
+
border-color: var(--pf-border-muted, #d0d5dd);
|
|
191
192
|
box-shadow: none;
|
|
192
|
-
color: var(--
|
|
193
|
+
color: var(--pf-text-strong, var(--pf-text, #182230));
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
.
|
|
196
|
+
.pf-tabs__copy {
|
|
196
197
|
align-items: center;
|
|
197
198
|
appearance: none;
|
|
198
199
|
background: transparent;
|
|
199
200
|
border: 1px solid transparent;
|
|
200
|
-
border-radius: var(--
|
|
201
|
-
color: var(--
|
|
201
|
+
border-radius: var(--pf-radius-md, 0.5rem);
|
|
202
|
+
color: var(--pf-text-muted, #667085);
|
|
202
203
|
cursor: pointer;
|
|
203
204
|
display: inline-flex;
|
|
204
205
|
flex: 0 0 auto;
|
|
@@ -213,18 +214,18 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
213
214
|
width: 1.875rem;
|
|
214
215
|
}
|
|
215
216
|
|
|
216
|
-
.
|
|
217
|
-
background: var(--
|
|
218
|
-
border-color: var(--
|
|
219
|
-
color: var(--
|
|
217
|
+
.pf-tabs__copy:hover {
|
|
218
|
+
background: var(--pf-background, #ffffff);
|
|
219
|
+
border-color: var(--pf-border-muted, #d0d5dd);
|
|
220
|
+
color: var(--pf-text-strong, var(--pf-text, #182230));
|
|
220
221
|
}
|
|
221
222
|
|
|
222
|
-
.
|
|
223
|
-
outline: 2px solid var(--
|
|
223
|
+
.pf-tabs__copy:focus-visible {
|
|
224
|
+
outline: 2px solid var(--pf-accent, #3e7e55);
|
|
224
225
|
outline-offset: 2px;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
|
-
.
|
|
228
|
+
.pf-tabs__copy-icon {
|
|
228
229
|
align-items: center;
|
|
229
230
|
display: inline-flex;
|
|
230
231
|
height: 1rem;
|
|
@@ -233,36 +234,36 @@ const activePanel = panels[activeIndex] ?? panels[0];
|
|
|
233
234
|
width: 1rem;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
|
-
.
|
|
237
|
+
.pf-tabs__copy-icon > .pf-icon {
|
|
237
238
|
display: block;
|
|
238
239
|
height: 1rem;
|
|
239
240
|
width: 1rem;
|
|
240
241
|
}
|
|
241
242
|
|
|
242
|
-
.
|
|
243
|
-
background: var(--
|
|
243
|
+
.pf-tabs__panels {
|
|
244
|
+
background: var(--pf-background, #fff);
|
|
244
245
|
padding: 1rem;
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
.
|
|
248
|
-
color: var(--
|
|
248
|
+
.pf-tabs__panel {
|
|
249
|
+
color: var(--pf-text, #344054);
|
|
249
250
|
}
|
|
250
251
|
|
|
251
|
-
.
|
|
252
|
-
border-radius: var(--
|
|
253
|
-
outline: 2px solid var(--
|
|
252
|
+
.pf-tabs__panel:focus-visible {
|
|
253
|
+
border-radius: var(--pf-radius-md, 0.5rem);
|
|
254
|
+
outline: 2px solid var(--pf-accent, #3e7e55);
|
|
254
255
|
outline-offset: 2px;
|
|
255
256
|
}
|
|
256
257
|
|
|
257
|
-
.
|
|
258
|
+
.pf-tabs__panel > :first-child {
|
|
258
259
|
margin-block-start: 0;
|
|
259
260
|
}
|
|
260
261
|
|
|
261
|
-
.
|
|
262
|
+
.pf-tabs__panel > :last-child {
|
|
262
263
|
margin-block-end: 0;
|
|
263
264
|
}
|
|
264
265
|
|
|
265
|
-
.
|
|
266
|
+
.pf-tabs__panel pre {
|
|
266
267
|
margin: 0;
|
|
267
268
|
padding: 0;
|
|
268
269
|
background: transparent;
|
package/dist/mdx/rehype-steps.js
CHANGED
|
@@ -30,10 +30,10 @@ function processStepsTree() {
|
|
|
30
30
|
throw new StepsError(`The \`<Steps>\` component expects its content to be a single ordered list (\`<ol>\`) but found the following element: \`<${rootElement.tagName}>\`.`, vfile.value.toString());
|
|
31
31
|
}
|
|
32
32
|
rootElement.properties.role = 'list';
|
|
33
|
-
rootElement.properties.className = appendClassName(rootElement.properties.className, '
|
|
33
|
+
rootElement.properties.className = appendClassName(rootElement.properties.className, 'pf-steps');
|
|
34
34
|
const start = getNumericStart(rootElement.properties.start);
|
|
35
35
|
if (Number.isFinite(start)) {
|
|
36
|
-
const styles = [`--
|
|
36
|
+
const styles = [`--pf-steps-start: ${start - 1}`];
|
|
37
37
|
if (rootElement.properties.style) {
|
|
38
38
|
styles.push(String(rootElement.properties.style));
|
|
39
39
|
}
|
package/dist/mdx/rehype-tabs.js
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@layer prosefly.components {
|
|
2
|
+
:where(:root) {
|
|
3
|
+
--pf-text-strong: #182230;
|
|
4
|
+
--pf-text: #344054;
|
|
5
|
+
--pf-text-muted: #667085;
|
|
6
|
+
--pf-background: #ffffff;
|
|
7
|
+
--pf-surface: #f4f6f8;
|
|
8
|
+
--pf-accent: #3e7e55;
|
|
9
|
+
--pf-accent-soft: color-mix(in oklab, var(--pf-accent) 12%, var(--pf-background));
|
|
10
|
+
--pf-accent-contrast: #ffffff;
|
|
11
|
+
--pf-info: oklch(0.62 0.16 255);
|
|
12
|
+
--pf-info-soft: color-mix(in oklab, var(--pf-info) 12%, var(--pf-background));
|
|
13
|
+
--pf-info-ink: oklch(0.46 0.14 255);
|
|
14
|
+
--pf-info-contrast: #ffffff;
|
|
15
|
+
--pf-success: oklch(0.64 0.16 155);
|
|
16
|
+
--pf-success-soft: color-mix(in oklab, var(--pf-success) 12%, var(--pf-background));
|
|
17
|
+
--pf-success-ink: oklch(0.45 0.13 155);
|
|
18
|
+
--pf-success-contrast: #ffffff;
|
|
19
|
+
--pf-warning: oklch(0.74 0.16 80);
|
|
20
|
+
--pf-warning-soft: color-mix(in oklab, var(--pf-warning) 14%, var(--pf-background));
|
|
21
|
+
--pf-warning-ink: oklch(0.5 0.12 80);
|
|
22
|
+
--pf-warning-contrast: oklch(0.18 0.04 80);
|
|
23
|
+
--pf-danger: oklch(0.62 0.2 25);
|
|
24
|
+
--pf-danger-soft: color-mix(in oklab, var(--pf-danger) 12%, var(--pf-background));
|
|
25
|
+
--pf-danger-ink: oklch(0.52 0.16 25);
|
|
26
|
+
--pf-danger-contrast: #ffffff;
|
|
27
|
+
--pf-border-subtle: #e5e7eb;
|
|
28
|
+
--pf-border-muted: #d0d5dd;
|
|
29
|
+
--pf-font-sans: ui-sans-serif, system-ui, sans-serif;
|
|
30
|
+
--pf-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
31
|
+
--pf-radius-sm: 0.25rem;
|
|
32
|
+
--pf-radius-md: 0.5rem;
|
|
33
|
+
--pf-radius-lg: 0.75rem;
|
|
34
|
+
--pf-radius-full: 999px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(:root[data-theme='dark']) {
|
|
38
|
+
--pf-text-strong: #f8fafc;
|
|
39
|
+
--pf-text: #d0d5dd;
|
|
40
|
+
--pf-text-muted: #98a2b3;
|
|
41
|
+
--pf-background: #0b1220;
|
|
42
|
+
--pf-surface: #111827;
|
|
43
|
+
--pf-accent: #8bd79a;
|
|
44
|
+
--pf-accent-soft: color-mix(in oklab, var(--pf-accent) 22%, var(--pf-background));
|
|
45
|
+
--pf-accent-contrast: #0b1220;
|
|
46
|
+
--pf-info: oklch(0.68 0.15 255);
|
|
47
|
+
--pf-info-soft: color-mix(in oklab, var(--pf-info) 20%, var(--pf-background));
|
|
48
|
+
--pf-info-ink: oklch(0.82 0.1 255);
|
|
49
|
+
--pf-info-contrast: #0b1220;
|
|
50
|
+
--pf-success: oklch(0.7 0.15 155);
|
|
51
|
+
--pf-success-soft: color-mix(in oklab, var(--pf-success) 20%, var(--pf-background));
|
|
52
|
+
--pf-success-ink: oklch(0.82 0.11 155);
|
|
53
|
+
--pf-success-contrast: #0b1220;
|
|
54
|
+
--pf-warning: oklch(0.78 0.16 80);
|
|
55
|
+
--pf-warning-soft: color-mix(in oklab, var(--pf-warning) 22%, var(--pf-background));
|
|
56
|
+
--pf-warning-ink: oklch(0.86 0.12 80);
|
|
57
|
+
--pf-warning-contrast: #1c1917;
|
|
58
|
+
--pf-danger: oklch(0.68 0.2 25);
|
|
59
|
+
--pf-danger-soft: color-mix(in oklab, var(--pf-danger) 20%, var(--pf-background));
|
|
60
|
+
--pf-danger-ink: oklch(0.82 0.11 25);
|
|
61
|
+
--pf-danger-contrast: #ffffff;
|
|
62
|
+
--pf-border-subtle: #243044;
|
|
63
|
+
--pf-border-muted: #344054;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (prefers-color-scheme: dark) {
|
|
67
|
+
:where(:root:is([data-theme='system'], :not([data-theme]))) {
|
|
68
|
+
--pf-text-strong: #f8fafc;
|
|
69
|
+
--pf-text: #d0d5dd;
|
|
70
|
+
--pf-text-muted: #98a2b3;
|
|
71
|
+
--pf-background: #0b1220;
|
|
72
|
+
--pf-surface: #111827;
|
|
73
|
+
--pf-accent: #8bd79a;
|
|
74
|
+
--pf-accent-soft: color-mix(in oklab, var(--pf-accent) 22%, var(--pf-background));
|
|
75
|
+
--pf-accent-contrast: #0b1220;
|
|
76
|
+
--pf-info: oklch(0.68 0.15 255);
|
|
77
|
+
--pf-info-soft: color-mix(in oklab, var(--pf-info) 20%, var(--pf-background));
|
|
78
|
+
--pf-info-ink: oklch(0.82 0.1 255);
|
|
79
|
+
--pf-info-contrast: #0b1220;
|
|
80
|
+
--pf-success: oklch(0.7 0.15 155);
|
|
81
|
+
--pf-success-soft: color-mix(in oklab, var(--pf-success) 20%, var(--pf-background));
|
|
82
|
+
--pf-success-ink: oklch(0.82 0.11 155);
|
|
83
|
+
--pf-success-contrast: #0b1220;
|
|
84
|
+
--pf-warning: oklch(0.78 0.16 80);
|
|
85
|
+
--pf-warning-soft: color-mix(in oklab, var(--pf-warning) 22%, var(--pf-background));
|
|
86
|
+
--pf-warning-ink: oklch(0.86 0.12 80);
|
|
87
|
+
--pf-warning-contrast: #1c1917;
|
|
88
|
+
--pf-danger: oklch(0.68 0.2 25);
|
|
89
|
+
--pf-danger-soft: color-mix(in oklab, var(--pf-danger) 20%, var(--pf-background));
|
|
90
|
+
--pf-danger-ink: oklch(0.82 0.11 25);
|
|
91
|
+
--pf-danger-contrast: #ffffff;
|
|
92
|
+
--pf-border-subtle: #243044;
|
|
93
|
+
--pf-border-muted: #344054;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosefly/astro-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"build": "node ./scripts/build.mjs",
|
|
9
9
|
"check": "tsc -p ./tsconfig.build.json --noEmit",
|
|
10
10
|
"prepack": "npm run build",
|
|
11
|
-
"prepublishOnly": "npm run check && npm run build"
|
|
11
|
+
"prepublishOnly": "npm run check && npm run build",
|
|
12
|
+
"test": "pnpm run build && node --test test/*.test.mjs"
|
|
12
13
|
},
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
@@ -46,7 +47,8 @@
|
|
|
46
47
|
"@astrojs/markdown-remark": "^7.2.1",
|
|
47
48
|
"@iconify/utils": "^3.1.4",
|
|
48
49
|
"rehype": "^13.0.2",
|
|
49
|
-
"rehype-format": "^5.0.1"
|
|
50
|
+
"rehype-format": "^5.0.1",
|
|
51
|
+
"remark-directive": "^4.0.0"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
54
|
"astro": "7.1.0",
|