@zvndev/darkmown 2.3.1-next.1.g3a4a8dc → 2.3.1-next.3.g33fa7dd
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/package.json +1 -1
- package/site/_/footer.wd +1 -1
- package/site/pages/index.js +26 -21
- package/site/pages/index.skin +111 -205
- package/site/pages/index.wd +115 -103
- package/site/pages/vs/markdoc.skin +53 -0
- package/site/pages/vs/markdoc.wd +96 -0
- package/types/compiler/context.d.ts +74 -60
- package/types/compiler/reader.d.ts +10 -2
- package/types/src/api-runner.d.ts +0 -94
- package/types/src/builder.d.ts +0 -170
- package/types/src/catalog.d.ts +0 -97
- package/types/src/compiler/actions.d.ts +0 -41
- package/types/src/compiler/body.d.ts +0 -11
- package/types/src/compiler/collections.d.ts +0 -76
- package/types/src/compiler/context.d.ts +0 -647
- package/types/src/compiler/directives.d.ts +0 -6
- package/types/src/compiler/expr-ast.d.ts +0 -20
- package/types/src/compiler/fetch.d.ts +0 -29
- package/types/src/compiler/format.d.ts +0 -49
- package/types/src/compiler/forms.d.ts +0 -94
- package/types/src/compiler/frontmatter.d.ts +0 -33
- package/types/src/compiler/fs-reader.d.ts +0 -7
- package/types/src/compiler/image-size.d.ts +0 -14
- package/types/src/compiler/includes.d.ts +0 -100
- package/types/src/compiler/index.d.ts +0 -5
- package/types/src/compiler/interpolation.d.ts +0 -115
- package/types/src/compiler/loops.d.ts +0 -36
- package/types/src/compiler/markdown.d.ts +0 -34
- package/types/src/compiler/media.d.ts +0 -32
- package/types/src/compiler/page.d.ts +0 -109
- package/types/src/compiler/predicates.d.ts +0 -50
- package/types/src/compiler/reader.d.ts +0 -48
- package/types/src/compiler/state.d.ts +0 -68
- package/types/src/compiler/structure.d.ts +0 -56
- package/types/src/compiler.d.ts +0 -48
- package/types/src/config.d.ts +0 -45
- package/types/src/dev.d.ts +0 -58
- package/types/src/errors.d.ts +0 -100
- package/types/src/feeds.d.ts +0 -150
- package/types/src/headers.d.ts +0 -44
- package/types/src/highlight.d.ts +0 -24
- package/types/src/router.d.ts +0 -78
- package/types/src/scaffold.d.ts +0 -20
- package/types/src/skin.d.ts +0 -48
- package/types/src/statics.d.ts +0 -24
package/package.json
CHANGED
package/site/_/footer.wd
CHANGED
|
@@ -5,7 +5,7 @@ html: true
|
|
|
5
5
|
<footer class="sitefooter">
|
|
6
6
|
<div class="foot-inner">
|
|
7
7
|
<div>
|
|
8
|
-
<strong>Darkmown</strong
|
|
8
|
+
<strong>Darkmown</strong>. Markdown that runs.
|
|
9
9
|
<div class="small">Zero JS on static pages · one ~7.7 KB runtime when reactive.</div>
|
|
10
10
|
</div>
|
|
11
11
|
<nav class="foot-links">
|
package/site/pages/index.js
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
// Colocated behavior for the landing page, discovered by basename
|
|
2
|
+
// (site/pages/index.wd -> site/pages/index.js). It is the only hand-written
|
|
3
|
+
// JavaScript on this page; everything else is directives.
|
|
4
|
+
//
|
|
5
|
+
// The page authors its install command as a plain ```sh fence so the source
|
|
6
|
+
// stays free of raw HTML. The copy button is added here instead: progressive
|
|
7
|
+
// enhancement, so the command is still readable and selectable with JS off.
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
const installBlock = document.querySelector(".hero pre > code");
|
|
10
|
+
|
|
11
|
+
if (installBlock && navigator.clipboard) {
|
|
12
|
+
const pre = installBlock.parentElement;
|
|
13
|
+
const button = document.createElement("button");
|
|
14
|
+
button.type = "button";
|
|
15
|
+
button.className = "copy-cmd";
|
|
16
|
+
button.textContent = "Copy";
|
|
17
|
+
button.setAttribute("aria-label", "Copy install command");
|
|
18
|
+
pre.classList.add("has-copy");
|
|
19
|
+
pre.append(button);
|
|
20
|
+
|
|
21
|
+
button.addEventListener("click", async () => {
|
|
6
22
|
try {
|
|
7
|
-
await navigator.clipboard.writeText(
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
await navigator.clipboard.writeText(installBlock.textContent.trim());
|
|
24
|
+
button.textContent = "Copied";
|
|
25
|
+
button.classList.add("is-copied");
|
|
10
26
|
setTimeout(() => {
|
|
11
|
-
|
|
12
|
-
|
|
27
|
+
button.textContent = "Copy";
|
|
28
|
+
button.classList.remove("is-copied");
|
|
13
29
|
}, 1600);
|
|
14
30
|
} catch {
|
|
15
|
-
|
|
31
|
+
button.textContent = "Select + ⌘C";
|
|
16
32
|
}
|
|
17
33
|
});
|
|
18
34
|
}
|
|
19
|
-
|
|
20
|
-
const button = document.querySelector("[data-wd-demo]");
|
|
21
|
-
|
|
22
|
-
if (button) {
|
|
23
|
-
button.addEventListener("click", () => {
|
|
24
|
-
button.classList.toggle("is-on");
|
|
25
|
-
button.textContent = button.classList.contains("is-on")
|
|
26
|
-
? "Colocated index.js is active"
|
|
27
|
-
: "Script is waiting";
|
|
28
|
-
});
|
|
29
|
-
}
|
package/site/pages/index.skin
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/* Landing page
|
|
2
|
-
Only landing-specific layout lives here.
|
|
1
|
+
/* Landing page. Layers on /base.wd (tokens, type, components, dark mode).
|
|
2
|
+
Only landing-specific layout lives here.
|
|
3
|
+
|
|
4
|
+
The page itself contains no raw HTML: every block below is produced by a
|
|
5
|
+
`::: name` container, a markdown element, or a directive. Class names match
|
|
6
|
+
the container names in site/pages/index.wd. */
|
|
3
7
|
|
|
4
8
|
/* ── Hero ───────────────────────────────────────────────────────── */
|
|
5
9
|
|
|
@@ -9,173 +13,105 @@
|
|
|
9
13
|
margin-bottom 2.5rem
|
|
10
14
|
|
|
11
15
|
.hero h1
|
|
12
|
-
max-width
|
|
16
|
+
max-width 15ch
|
|
17
|
+
font-size clamp(2.4rem, 6vw, 3.6rem)
|
|
13
18
|
|
|
14
19
|
.hero h1 em
|
|
15
20
|
font-style italic
|
|
16
21
|
color $accent
|
|
17
22
|
|
|
18
23
|
.hero > p
|
|
19
|
-
max-width
|
|
24
|
+
max-width 60ch
|
|
20
25
|
font-size 1.18rem
|
|
21
26
|
color $ink-soft
|
|
22
27
|
margin 1rem 0 1.75rem
|
|
23
28
|
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
flex-wrap wrap
|
|
32
|
-
margin-bottom 1.5rem
|
|
33
|
-
|
|
34
|
-
.hero-install
|
|
35
|
-
display inline-flex
|
|
36
|
-
align-items center
|
|
37
|
-
gap .55rem
|
|
38
|
-
max-width 100%
|
|
39
|
-
margin 0 0 2rem
|
|
40
|
-
padding .7rem 1rem
|
|
29
|
+
/* The install command is a plain ```sh fence; index.js appends the copy
|
|
30
|
+
button, so the markup stays directive-only and works with JS off. */
|
|
31
|
+
.hero pre
|
|
32
|
+
position relative
|
|
33
|
+
max-width 34rem
|
|
34
|
+
margin 0 0 1.75rem
|
|
35
|
+
padding .85rem 1rem
|
|
41
36
|
border 1px solid $line
|
|
42
37
|
radius 10px
|
|
43
38
|
bg $sunk
|
|
44
|
-
font-family ui-monospace, SFMono-Regular, Menlo, monospace
|
|
45
|
-
overflow-x auto
|
|
46
39
|
|
|
47
|
-
.hero
|
|
48
|
-
content "$"
|
|
49
|
-
color $accent
|
|
50
|
-
font-weight 700
|
|
51
|
-
flex-shrink 0
|
|
52
|
-
|
|
53
|
-
.hero-install code
|
|
54
|
-
font-family inherit
|
|
40
|
+
.hero pre code
|
|
55
41
|
font-size .95rem
|
|
56
42
|
color $ink
|
|
57
43
|
white-space nowrap
|
|
58
44
|
|
|
59
|
-
.hero
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
.hero pre.has-copy
|
|
46
|
+
padding-right 5.5rem
|
|
47
|
+
|
|
48
|
+
.hero pre .copy-cmd
|
|
49
|
+
position absolute
|
|
50
|
+
top 50%
|
|
51
|
+
right .6rem
|
|
52
|
+
transform translateY(-50%)
|
|
53
|
+
padding .3rem .7rem
|
|
63
54
|
border 1px solid $line
|
|
64
55
|
radius 7px
|
|
65
|
-
bg
|
|
56
|
+
bg $panel
|
|
66
57
|
color $ink-soft
|
|
67
58
|
font-family inherit
|
|
68
59
|
font-size .8rem
|
|
69
60
|
cursor pointer
|
|
70
61
|
|
|
71
|
-
.hero
|
|
62
|
+
.hero pre .copy-cmd:hover
|
|
72
63
|
color $ink
|
|
73
64
|
border-color $accent
|
|
74
65
|
|
|
75
|
-
.hero
|
|
66
|
+
.hero pre .copy-cmd.is-copied
|
|
76
67
|
color $accent
|
|
77
68
|
border-color $accent
|
|
78
69
|
|
|
79
|
-
.hero-
|
|
80
|
-
display grid
|
|
81
|
-
grid-template-columns repeat(4, auto)
|
|
82
|
-
gap 1.25rem 2.5rem
|
|
83
|
-
list-style none
|
|
84
|
-
padding 0
|
|
85
|
-
margin 0
|
|
86
|
-
border-top 1px solid $line-soft
|
|
87
|
-
padding-top 1.5rem
|
|
88
|
-
|
|
89
|
-
.hero-stats li
|
|
70
|
+
.hero-cta
|
|
90
71
|
display flex
|
|
91
|
-
flex-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
font-size 1.6rem
|
|
95
|
-
color $accent
|
|
96
|
-
letter-spacing -.02em
|
|
97
|
-
|
|
98
|
-
.hero-stats span
|
|
99
|
-
font-size .82rem
|
|
100
|
-
color $muted
|
|
101
|
-
max-width 18ch
|
|
102
|
-
|
|
103
|
-
@media (max-width: 720px)
|
|
104
|
-
.hero-stats
|
|
105
|
-
grid-template-columns 1fr 1fr
|
|
106
|
-
|
|
107
|
-
/* ── vs-Markdoc comparison ──────────────────────────────────────── */
|
|
72
|
+
flex-wrap wrap
|
|
73
|
+
gap .6rem
|
|
74
|
+
margin 0
|
|
108
75
|
|
|
109
|
-
|
|
110
|
-
display grid
|
|
111
|
-
grid-template-columns 1fr 1fr
|
|
112
|
-
gap 1.25rem
|
|
113
|
-
align-items start
|
|
114
|
-
margin 2.5rem 0 1rem
|
|
76
|
+
/* ── Source + the same file running, as one paired module ───────── */
|
|
115
77
|
|
|
116
|
-
|
|
78
|
+
/* The source block and the live demo are deliberately the same width and sit
|
|
79
|
+
inside one bordered card, so the "this text produced that UI" claim reads as
|
|
80
|
+
a single before/after unit rather than two unrelated page chunks. */
|
|
81
|
+
.pair
|
|
82
|
+
max-width 46rem
|
|
83
|
+
margin 1.25rem 0 2.5rem
|
|
84
|
+
padding 1.25rem
|
|
117
85
|
border 1px solid $line
|
|
118
86
|
radius $radius
|
|
119
87
|
bg $panel
|
|
120
|
-
padding 1.35rem
|
|
121
|
-
display flex
|
|
122
|
-
flex-direction column
|
|
123
|
-
min-width 0
|
|
124
|
-
box-shadow 0 1px 2px rgba(28,24,20,.04)
|
|
125
|
-
|
|
126
|
-
.vs-card.vs-dark
|
|
127
|
-
background linear-gradient(180deg, $accent-soft, $panel)
|
|
128
|
-
border 1px solid $accent
|
|
129
88
|
|
|
130
|
-
.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
justify-content space-between
|
|
134
|
-
gap .75rem
|
|
135
|
-
margin-bottom .85rem
|
|
136
|
-
|
|
137
|
-
.vs-tag
|
|
138
|
-
font-family ui-monospace, SFMono-Regular, Menlo, monospace
|
|
139
|
-
font-size .72rem
|
|
140
|
-
font-weight 700
|
|
89
|
+
.pairlabel
|
|
90
|
+
margin 0 0 .5rem
|
|
91
|
+
font-size .78rem
|
|
141
92
|
text-transform uppercase
|
|
142
|
-
letter-spacing .
|
|
143
|
-
padding .25rem .55rem
|
|
144
|
-
radius 999px
|
|
145
|
-
|
|
146
|
-
.vs-tag-wd
|
|
147
|
-
color white
|
|
148
|
-
bg $accent
|
|
149
|
-
|
|
150
|
-
.vs-tag-md
|
|
93
|
+
letter-spacing .07em
|
|
151
94
|
color $muted
|
|
152
|
-
bg $sunk
|
|
153
|
-
border 1px solid $line
|
|
154
95
|
|
|
155
|
-
.
|
|
156
|
-
font-
|
|
157
|
-
|
|
158
|
-
|
|
96
|
+
.pairlabel code
|
|
97
|
+
font-size .78rem
|
|
98
|
+
text-transform none
|
|
99
|
+
letter-spacing 0
|
|
100
|
+
color $ink
|
|
159
101
|
|
|
160
|
-
.
|
|
161
|
-
margin
|
|
162
|
-
font-size .8rem
|
|
163
|
-
line-height 1.55
|
|
102
|
+
.pair > pre
|
|
103
|
+
margin 0 0 1.5rem
|
|
164
104
|
|
|
165
|
-
.
|
|
166
|
-
margin
|
|
167
|
-
font-size .88rem
|
|
168
|
-
color $muted
|
|
169
|
-
font-style italic
|
|
105
|
+
.pair .pairlabel + .demo
|
|
106
|
+
margin 0
|
|
170
107
|
|
|
171
|
-
.
|
|
172
|
-
border 1px
|
|
108
|
+
.demo
|
|
109
|
+
border 1px solid $accent
|
|
173
110
|
radius $radius-sm
|
|
174
|
-
background color-mix(in srgb, $accent-soft
|
|
175
|
-
padding
|
|
176
|
-
margin .15rem 0 0
|
|
111
|
+
background color-mix(in srgb, $accent-soft 45%, $panel)
|
|
112
|
+
padding 1.15rem 1.25rem 1rem
|
|
177
113
|
|
|
178
|
-
.
|
|
114
|
+
.demo input[data-wd-bind-input]
|
|
179
115
|
width 100%
|
|
180
116
|
box-sizing border-box
|
|
181
117
|
font-family inherit
|
|
@@ -187,7 +123,7 @@
|
|
|
187
123
|
color $ink
|
|
188
124
|
margin 0 0 .75rem
|
|
189
125
|
|
|
190
|
-
.
|
|
126
|
+
.demo .product
|
|
191
127
|
display flex
|
|
192
128
|
align-items center
|
|
193
129
|
justify-content space-between
|
|
@@ -199,10 +135,10 @@
|
|
|
199
135
|
radius 8px
|
|
200
136
|
font-size .95rem
|
|
201
137
|
|
|
202
|
-
.
|
|
138
|
+
.demo .product p
|
|
203
139
|
margin 0
|
|
204
140
|
|
|
205
|
-
.
|
|
141
|
+
.demo .product button
|
|
206
142
|
border 0
|
|
207
143
|
bg $accent
|
|
208
144
|
color white
|
|
@@ -213,57 +149,68 @@
|
|
|
213
149
|
cursor pointer
|
|
214
150
|
flex-shrink 0
|
|
215
151
|
|
|
216
|
-
.
|
|
152
|
+
.demo .product button:hover
|
|
217
153
|
bg $accent-deep
|
|
218
154
|
|
|
219
|
-
.
|
|
155
|
+
.demo > p:last-of-type
|
|
220
156
|
margin .85rem 0 0
|
|
221
157
|
font-size .95rem
|
|
222
158
|
|
|
223
|
-
|
|
224
|
-
margin 1rem 0 0
|
|
225
|
-
padding 1rem 1.1rem
|
|
226
|
-
border-left 3px solid $warm
|
|
227
|
-
bg $warm-soft
|
|
228
|
-
radius 8px
|
|
159
|
+
/* ── Live data strip (:fetch stars + visits) ────────────────────── */
|
|
229
160
|
|
|
230
|
-
.
|
|
231
|
-
|
|
232
|
-
|
|
161
|
+
.livestrip
|
|
162
|
+
display grid
|
|
163
|
+
grid-template-columns repeat(4, 1fr)
|
|
164
|
+
gap 1rem
|
|
165
|
+
margin 1.5rem 0 2rem
|
|
166
|
+
padding 1.35rem 0
|
|
167
|
+
border-top 1px solid $line-soft
|
|
168
|
+
border-bottom 1px solid $line-soft
|
|
169
|
+
|
|
170
|
+
/* Every stat is structurally identical: the value is a bare <p> (either plain
|
|
171
|
+
prose or the body of an `:if` region), the label is its own `.statlabel`
|
|
172
|
+
container. Keeping the label in a container is what stops markdown from
|
|
173
|
+
folding value and label into one paragraph, which is exactly what happened
|
|
174
|
+
when they were two adjacent lines. */
|
|
175
|
+
.stat
|
|
176
|
+
display flex
|
|
177
|
+
flex-direction column
|
|
178
|
+
gap .2rem
|
|
179
|
+
min-width 0
|
|
233
180
|
|
|
234
|
-
.
|
|
235
|
-
margin
|
|
236
|
-
font-size .
|
|
181
|
+
.stat > p
|
|
182
|
+
margin 0
|
|
183
|
+
font-size 1.85rem
|
|
184
|
+
line-height 1.05
|
|
185
|
+
color $accent
|
|
186
|
+
letter-spacing -.02em
|
|
187
|
+
font-variant-numeric tabular-nums
|
|
237
188
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
189
|
+
/* The `:if` lifecycle regions wrap the value; unwrap them for layout so the
|
|
190
|
+
value sits on the same baseline whether it is static or fetched. */
|
|
191
|
+
.stat > div[data-wd-if] p
|
|
192
|
+
margin 0
|
|
193
|
+
font-size 1.85rem
|
|
194
|
+
line-height 1.05
|
|
195
|
+
color $accent
|
|
196
|
+
letter-spacing -.02em
|
|
197
|
+
font-variant-numeric tabular-nums
|
|
242
198
|
|
|
243
|
-
.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
font-size .95rem
|
|
199
|
+
.statlabel
|
|
200
|
+
font-size .88rem
|
|
201
|
+
line-height 1.35
|
|
202
|
+
color $ink-soft
|
|
203
|
+
max-width 20ch
|
|
249
204
|
|
|
250
|
-
.
|
|
251
|
-
|
|
205
|
+
.statlabel p
|
|
206
|
+
margin 0
|
|
252
207
|
|
|
253
208
|
@media (max-width: 720px)
|
|
254
|
-
.
|
|
255
|
-
grid-template-columns 1fr
|
|
256
|
-
gap
|
|
257
|
-
|
|
258
|
-
/* ── Secondary value props ──────────────────────────────────────── */
|
|
259
|
-
|
|
260
|
-
.props
|
|
261
|
-
margin 1.5rem 0 0
|
|
262
|
-
|
|
263
|
-
.props h2
|
|
264
|
-
margin-top 1.5rem
|
|
209
|
+
.livestrip
|
|
210
|
+
grid-template-columns 1fr 1fr
|
|
211
|
+
gap 1.25rem
|
|
265
212
|
|
|
266
|
-
/* ── Demo-directive widgets (`:try
|
|
213
|
+
/* ── Demo-directive widgets (`:try`) ────────────────────────────── */
|
|
267
214
|
|
|
268
215
|
.try-card
|
|
269
216
|
display inline-flex
|
|
@@ -286,44 +233,3 @@
|
|
|
286
233
|
padding .1rem .5rem
|
|
287
234
|
radius 999px
|
|
288
235
|
font-size .8rem
|
|
289
|
-
|
|
290
|
-
.feature-card
|
|
291
|
-
display grid
|
|
292
|
-
gap .35rem
|
|
293
|
-
margin 1rem 0
|
|
294
|
-
padding 1.1rem 1.25rem
|
|
295
|
-
bg $panel
|
|
296
|
-
border 1px solid $line
|
|
297
|
-
radius $radius
|
|
298
|
-
|
|
299
|
-
.feature-card strong
|
|
300
|
-
color $warm
|
|
301
|
-
|
|
302
|
-
.pulse-button
|
|
303
|
-
border 0
|
|
304
|
-
bg $ink
|
|
305
|
-
color $paper
|
|
306
|
-
padding .85rem 1.15rem
|
|
307
|
-
radius 999px
|
|
308
|
-
font-family inherit
|
|
309
|
-
cursor pointer
|
|
310
|
-
|
|
311
|
-
.pulse-button.is-on
|
|
312
|
-
bg $warm
|
|
313
|
-
|
|
314
|
-
.sprint-board
|
|
315
|
-
display grid
|
|
316
|
-
grid-template-columns repeat(auto-fit, minmax(130px, 1fr))
|
|
317
|
-
gap 1rem
|
|
318
|
-
margin 1rem 0
|
|
319
|
-
|
|
320
|
-
.sprint-board article
|
|
321
|
-
bg $panel
|
|
322
|
-
border 1px solid $line
|
|
323
|
-
padding 1rem
|
|
324
|
-
radius $radius
|
|
325
|
-
|
|
326
|
-
.sprint-board span
|
|
327
|
-
display block
|
|
328
|
-
color $accent
|
|
329
|
-
font-size .9rem
|