@zvndev/darkmown 1.5.0 → 2.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.
- package/AGENTS.md +18 -4
- package/CHANGELOG.md +40 -0
- package/README.md +49 -19
- package/SECURITY.md +21 -18
- package/docs/cli.md +5 -1
- package/docs/spec-alignment.md +21 -7
- package/package.json +3 -2
- package/site/_/base.skin +8 -0
- package/site/_/base.wd +4 -0
- package/site/_/feature-card.wd +4 -0
- package/site/_/footer.wd +5 -1
- package/site/_/nav.wd +4 -0
- package/site/_/scoped-promo.wd +4 -0
- package/site/_/scoped-stat.wd +4 -0
- package/site/pages/404.wd +1 -0
- package/site/pages/app.wd +2 -1
- package/site/pages/blog/collections-and-pagination.skin +127 -0
- package/site/pages/blog/drafts-that-never-leak.skin +127 -0
- package/site/pages/blog/index.wd +1 -0
- package/site/pages/blog/shipping-feeds.skin +127 -0
- package/site/pages/blog/typed-frontmatter.skin +127 -0
- package/site/pages/blog/unfinished-thoughts.skin +127 -0
- package/site/pages/blog/zero-js-by-default.md +1 -1
- package/site/pages/blog/zero-js-by-default.skin +127 -0
- package/site/pages/carousel/index.wd +1 -0
- package/site/pages/compass/index.wd +1 -0
- package/site/pages/data.wd +3 -0
- package/site/pages/docs/-relative-note.wd +4 -0
- package/site/pages/docs/index.skin +27 -0
- package/site/pages/docs/index.wd +85 -14
- package/site/pages/folio/-style.wd +4 -0
- package/site/pages/folio/cart.wd +1 -0
- package/site/pages/folio/index.wd +1 -0
- package/site/pages/forge/index.wd +1 -0
- package/site/pages/highlight/index.wd +1 -0
- package/site/pages/index.js +19 -0
- package/site/pages/index.skin +46 -1
- package/site/pages/index.wd +6 -3
- package/site/pages/interactions/index.wd +1 -0
- package/site/pages/ledger/index.wd +1 -0
- package/site/pages/loops.wd +1 -0
- package/site/pages/media/index.wd +1 -0
- package/site/pages/pulse/index.wd +1 -0
- package/site/pages/reactive.wd +1 -0
- package/site/pages/scoped/index.wd +1 -0
- package/site/pages/showcase/index.wd +2 -1
- package/site/pages/store.wd +1 -0
- package/site/pages/theme.wd +1 -0
- package/src/builder.js +444 -65
- package/src/cli.js +96 -18
- package/src/compiler/actions.js +303 -0
- package/src/compiler/body.js +36 -24
- package/src/compiler/context.js +65 -6
- package/src/compiler/directives.js +31 -1470
- package/src/compiler/fetch.js +159 -0
- package/src/compiler/format.js +17 -4
- package/src/compiler/forms.js +456 -0
- package/src/compiler/frontmatter.js +10 -5
- package/src/compiler/includes.js +75 -4
- package/src/compiler/index.js +15 -3
- package/src/compiler/loops.js +85 -23
- package/src/compiler/markdown.js +65 -15
- package/src/compiler/media.js +133 -0
- package/src/compiler/page.js +88 -77
- package/src/compiler/state.js +168 -0
- package/src/compiler/structure.js +399 -0
- package/src/dev.js +76 -0
- package/src/headers.js +56 -17
- package/src/router.js +12 -1
- package/src/runtime.js +5 -3
- package/src/statics.js +63 -12
- package/src/templates/blog/README.md +13 -4
- package/src/templates/blog/site/_/nav.wd +7 -6
- package/src/templates/blog/site/pages/index.skin +10 -4
- package/src/templates/blog/site/pages/index.wd +11 -6
- package/src/templates/blog/site/pages/posts/_schema.wd +16 -0
- package/src/templates/blog/site/pages/posts/hello-darkmown.md +2 -0
- package/src/templates/blog/site/pages/posts/hello-darkmown.skin +59 -0
- package/src/templates/blog/site/pages/posts/markdown-native.md +9 -4
- package/src/templates/blog/site/pages/posts/markdown-native.skin +59 -0
- package/src/templates/dashboard/site/_/nav.wd +7 -6
- package/src/templates/dashboard/site/pages/index.skin +7 -4
- package/src/templates/dashboard/site/pages/index.wd +2 -2
- package/src/templates/landing/site/_/nav.wd +7 -6
- package/src/templates/landing/site/pages/index.skin +13 -4
- package/src/templates/landing/site/pages/index.wd +22 -8
- package/src/templates/starter/site/_/nav.wd +8 -7
- package/src/templates/starter/site/pages/about.md +8 -2
- package/src/templates/starter/site/pages/about.skin +44 -0
- package/src/templates/starter/site/pages/index.skin +10 -6
- package/src/templates/starter/site/pages/index.wd +2 -2
- package/src/templates/store/site/_/nav.wd +7 -6
- package/src/templates/store/site/pages/index.skin +7 -4
- package/src/templates/store/site/pages/index.wd +2 -2
- package/src/templates/blog/site/_/posts.json +0 -16
package/site/pages/index.skin
CHANGED
|
@@ -29,7 +29,52 @@
|
|
|
29
29
|
.hero-cta
|
|
30
30
|
display flex
|
|
31
31
|
flex-wrap wrap
|
|
32
|
-
margin-bottom
|
|
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
|
|
41
|
+
border 1px solid $line
|
|
42
|
+
radius 10px
|
|
43
|
+
bg $sunk
|
|
44
|
+
font-family ui-monospace, SFMono-Regular, Menlo, monospace
|
|
45
|
+
overflow-x auto
|
|
46
|
+
|
|
47
|
+
.hero-install::before
|
|
48
|
+
content "$"
|
|
49
|
+
color $accent
|
|
50
|
+
font-weight 700
|
|
51
|
+
flex-shrink 0
|
|
52
|
+
|
|
53
|
+
.hero-install code
|
|
54
|
+
font-family inherit
|
|
55
|
+
font-size .95rem
|
|
56
|
+
color $ink
|
|
57
|
+
white-space nowrap
|
|
58
|
+
|
|
59
|
+
.hero-install .copy-cmd
|
|
60
|
+
flex-shrink 0
|
|
61
|
+
margin-left .35rem
|
|
62
|
+
padding .25rem .65rem
|
|
63
|
+
border 1px solid $line
|
|
64
|
+
radius 7px
|
|
65
|
+
bg transparent
|
|
66
|
+
color $ink-soft
|
|
67
|
+
font-family inherit
|
|
68
|
+
font-size .8rem
|
|
69
|
+
cursor pointer
|
|
70
|
+
|
|
71
|
+
.hero-install .copy-cmd:hover
|
|
72
|
+
color $ink
|
|
73
|
+
border-color $accent
|
|
74
|
+
|
|
75
|
+
.hero-install .copy-cmd.is-copied
|
|
76
|
+
color $accent
|
|
77
|
+
border-color $accent
|
|
33
78
|
|
|
34
79
|
.hero-stats
|
|
35
80
|
display grid
|
package/site/pages/index.wd
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Darkmown — Markdown that runs, not Markdown that needs React
|
|
3
4
|
description: A live store widget — search filter, add-to-cart, running total — written as one Markdown file that runs. The same outcome in Markdoc needs a React component, hydration, and a build step. Compare them side by side.
|
|
4
5
|
image: https://darkmown.com/__wd/media/og.png
|
|
@@ -23,9 +24,11 @@ The left file is Markdown. It is also a running app — a live search filter, ad
|
|
|
23
24
|
<a class="btn" href="/docs/">Read the docs</a>
|
|
24
25
|
</div>
|
|
25
26
|
|
|
27
|
+
<div class="hero-install"><code>npx @zvndev/darkmown init my-site</code><button type="button" class="copy-cmd" data-copy-cmd aria-label="Copy install command">Copy</button></div>
|
|
28
|
+
|
|
26
29
|
<ul class="hero-stats">
|
|
27
30
|
<li><strong>0 KB</strong><span>framework JS on static pages</span></li>
|
|
28
|
-
<li><strong>~7.
|
|
31
|
+
<li><strong>~7.5 KB</strong><span>one runtime, CI-enforced < 8 KB</span></li>
|
|
29
32
|
<li><strong>1</strong><span>loop and one binding to learn</span></li>
|
|
30
33
|
<li><strong>MIT</strong><span>zero runtime dependencies</span></li>
|
|
31
34
|
</ul>
|
|
@@ -109,14 +112,14 @@ Markdoc.renderers.react(content, React, {
|
|
|
109
112
|
|
|
110
113
|
</section>
|
|
111
114
|
|
|
112
|
-
:note "Static pages ship zero JavaScript. The moment a page asks for reactivity — like this very homepage — one ~7.
|
|
115
|
+
:note "Static pages ship zero JavaScript. The moment a page asks for reactivity — like this very homepage — one ~7.5 KB gzipped runtime loads (CI-enforced under 8 KB), never before. JS optional, CSS optional, always."
|
|
113
116
|
|
|
114
117
|
<section class="props">
|
|
115
118
|
|
|
116
119
|
## Three rules, no escape hatch
|
|
117
120
|
|
|
118
121
|
- **Zero-JS static.** A page with no state ships no framework JavaScript. `/markdown/` and `/docs/` prove it — open them and check the network tab.
|
|
119
|
-
- **One runtime.** Every reactive page shares the same ~7.
|
|
122
|
+
- **One runtime.** Every reactive page shares the same ~7.5 KB gzipped runtime, CI-enforced under 8 KB. No per-component bundles, no hydration tax that scales with your UI.
|
|
120
123
|
- **One loop, one binding.** `@loop … into …` is the only loop; `{ name }` is the only interpolation. Nothing else to learn, nothing else to misuse.
|
|
121
124
|
|
|
122
125
|
</section>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Interactions — sliders, drag & carousels in Markdown
|
|
3
4
|
description: :slider, :sortable, and :carousel — rich interactions that compile to tiny pay-for-what-you-use modules, declared in plain Markdown. Sliders ship zero JS; sortable and carousel each load one small module, only on the pages that use them.
|
|
4
5
|
image: https://darkmown.com/__wd/media/og-showcase.png
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Ledger — a sortable expense table in Markdown
|
|
3
4
|
description: A real data table written as one Markdown file — clickable-header sorting, a live filter, running totals, and a light/dark toggle. Format pipes (| money, | date), aggregates (sum, avg, max), reactive sort, and :theme — all declarative, no hand-written JavaScript.
|
|
4
5
|
image: https://darkmown.com/__wd/media/og-showcase.png
|
package/site/pages/loops.wd
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Media — video, audio, and embeds in Markdown
|
|
3
4
|
description: Three one-line directives — :video, :audio, :embed — compile to hardened, accessible, privacy-friendly players. No framework JavaScript ships: a media page stays zero-JS, just like static Markdown.
|
|
4
5
|
image: https://darkmown.com/__wd/media/og-showcase.png
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Pulse — service status
|
|
3
4
|
description: A calm, dark observability panel built in one Markdown file — a live :fetch board, build-time rollups, and a keyed services table, all with zero hand-written JavaScript.
|
|
4
5
|
image: https://darkmown.com/__wd/media/og-pulse.png
|
package/site/pages/reactive.wd
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Scoped styles — same class name, zero collision
|
|
3
4
|
description: Two components reuse the class name .card and never clash. Compile-time scoped styles stamp each component's subtree with a path-derived id and rewrite its skin's selectors to match only there. Zero runtime JS — a static page stays static.
|
|
4
5
|
transitions: true
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
html: true
|
|
2
3
|
title: Showcase — real apps built in Markdown
|
|
3
4
|
description: Five complete, beautiful apps — a storefront, a live dashboard, a pricing configurator, a product-finder quiz, and a sortable expense ledger — each one a readable Markdown file. See the app, then view its source.
|
|
4
5
|
image: https://darkmown.com/__wd/media/og-showcase.png
|
|
@@ -95,7 +96,7 @@ Darkmown's whole pitch is weight. A static page ships **zero** framework JavaScr
|
|
|
95
96
|
|
|
96
97
|
::: card .sc-scale
|
|
97
98
|
- **Static Darkmown page** — `0 KB` framework JS. Forever.
|
|
98
|
-
- **Reactive Darkmown page** — one shared `~7.
|
|
99
|
+
- **Reactive Darkmown page** — one shared `~7.5 KB` gzipped runtime, no per-component bundles.
|
|
99
100
|
- **A typical SPA** — ships a framework runtime in the **~15–60 KB** gzipped range *before* your app code, on every page (Alpine ~15 KB, Vue ~18 KB runtime, React 19 ~59 KB).
|
|
100
101
|
:::
|
|
101
102
|
|
package/site/pages/store.wd
CHANGED