markawesome-skill 0.1.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.
@@ -0,0 +1,240 @@
1
+ # Interactive components
2
+
3
+ Details · Accordion · Tabs · Dialog · Popover · Tooltip · Random content · Tree
4
+
5
+ Most of these split a trigger from its body with a `>>>` line (see the shared
6
+ `>>>` separator in `authoring.md`). Attributes are optional and order-independent.
7
+
8
+ ## Details
9
+
10
+ One collapsible section. For a *group* of them, use an Accordion instead.
11
+
12
+ - **Primary:** `^^^appearance? icon-placement? disabled? open? name:value? icon:expand:name? icon:collapse:name?`
13
+ - **Alt:** `:::wa-details appearance? icon-placement? …`
14
+ - Separate the summary from the content with `>>>`. Close with `^^^`.
15
+
16
+ **Appearances:** `outlined` (default), `filled`, `filled-outlined`, `plain`.
17
+ **Icon placement:** `end` (default), `start`.
18
+ **Flags:** `disabled` (can't toggle), `open` (starts expanded).
19
+ **Accordion grouping:** `name:value` gives several details the same group name so
20
+ only one stays open (e.g. `name:faq`).
21
+ **Custom toggle icons:** `icon:expand:name` and `icon:collapse:name`.
22
+
23
+ ```
24
+ ^^^icon:expand:plus icon:collapse:minus
25
+ Show advanced options
26
+ >>>
27
+ These settings are optional. Most projects never change them.
28
+ ^^^
29
+ ```
30
+
31
+ ## Accordion
32
+
33
+ A multi-section collapsible container — the grouped sibling of Details. Ideal for
34
+ FAQs and doc sections.
35
+
36
+ - **Primary:** `//////appearance? mode? icon-placement? heading:N?`
37
+ - **Alt:** `:::wa-accordion appearance? mode? icon-placement? heading:N?`
38
+ - The container fence is `//////` (**6 slashes**). Each item is a `///` block
39
+ (**3 slashes**) with an explicit `///` close. Item bodies are full Markdown and
40
+ may contain other components.
41
+
42
+ **Container tokens** (bare, order-independent, rightmost wins):
43
+
44
+ - **appearance:** `outlined` (default), `filled`, `filled-outlined`, `plain`.
45
+ - **mode:** `multiple` (default — several open at once), `single` (one open at a
46
+ time, one always stays open), `single-collapsible` (one at a time, all can
47
+ close).
48
+ - **icon-placement:** `end` (default), `start`.
49
+ - **heading:N** — semantic heading level for item headers: `1`–`6` or `none`.
50
+
51
+ **Item tokens** (leading, on the `///` header line): `expanded` (starts open),
52
+ `disabled` (renders but can't toggle), `icon:name` (custom expand icon). The rest
53
+ of the header line is the item's label.
54
+
55
+ ```
56
+ //////filled single heading:3
57
+ /// What is Web Awesome?
58
+ A library of web components you can use anywhere.
59
+ ///
60
+ /// expanded Is it free?
61
+ The core library is free and open source.
62
+ ///
63
+ //////
64
+ ```
65
+
66
+ `wa-accordion` is experimental in Web Awesome, but everything here is declarative
67
+ and static-site-safe.
68
+
69
+ ## Tabs
70
+
71
+ Switchable panels for parallel alternatives — per-OS steps, multi-language code, A/B.
72
+
73
+ - **Primary:** `++++++placement? activation? active? no-scroll-controls?`
74
+ - **Alt:** `:::wa-tabs placement? activation? active? no-scroll-controls?`
75
+ - The container fence is `++++++` (**6 pluses**). Each tab is `+++ Title` … `+++`.
76
+
77
+ **Placements:** `top` (default), `bottom`, `start`, `end`.
78
+ **Activation:** `auto` (default — switch on hover), `manual` (switch on click).
79
+ **Active panel:** name it with `active` (e.g. `tab-1`, `tab-2`).
80
+ **Flags:** `no-scroll-controls` (disable scroll arrows for overflowing tabs).
81
+ **Per-tab flag:** `disabled` as a leading token on the `+++ ` header line.
82
+
83
+ ```
84
+ ++++++top manual
85
+ +++ macOS
86
+ `brew install example`
87
+ +++
88
+ +++ Windows
89
+ `winget install example`
90
+ +++
91
+ +++ disabled Linux (coming soon)
92
+ Not yet available.
93
+ +++
94
+ ++++++
95
+ ```
96
+
97
+ ## Dialog
98
+
99
+ Long supplementary content behind a trigger button — a modal.
100
+
101
+ - **Primary:** `???params?`
102
+ - **Alt:** `:::wa-dialog params?`
103
+ - Separate the trigger button text from the dialog content with `>>>`. Close with
104
+ `???`.
105
+
106
+ **Parameters:** `light-dismiss` (close on outside click), and a **bare CSS width
107
+ value** to set the dialog width — `600px`, `50vw`, `40rem`, etc. (a bare
108
+ number-with-unit token, not `width:…`).
109
+
110
+ ```
111
+ ???light-dismiss 600px
112
+ Read the full changelog
113
+ >>>
114
+ ## Changelog
115
+
116
+ Every release, in detail. Supports full **Markdown** inside the dialog.
117
+ ???
118
+ ```
119
+
120
+ ## Popover
121
+
122
+ Floating content attached to a trigger — richer than a tooltip (full Markdown,
123
+ links). Works as a **block** or **inline**.
124
+
125
+ - **Block primary:** `&&&placement? link? without-arrow? distance:N? skidding:N?`
126
+ - **Inline:** `&&&trigger text >>> popover content&&&`
127
+ - **Alt:** `:::wa-popover placement? …`
128
+ - Block form separates trigger from content with `>>>`; close with `&&&`.
129
+
130
+ **Placements:** `top` (default), `bottom`, `left`, `right`, plus the eight aligned
131
+ variants (`top-start`, `top-end`, `right-start`, `right-end`, `bottom-start`,
132
+ `bottom-end`, `left-start`, `left-end`).
133
+ **Parameters:** `link` (render the trigger as a link instead of a button),
134
+ `without-arrow` (hide the arrow), `distance:N` (offset away from the trigger, px),
135
+ `skidding:N` (offset along the trigger, px; may be negative).
136
+
137
+ ```
138
+ &&&bottom-start
139
+ More info
140
+ >>>
141
+ Popover content with **Markdown**, [links](https://example.com), and lists.
142
+ &&&
143
+ ```
144
+
145
+ ```
146
+ Click &&&here >>> This is an inline popover!&&& to learn more.
147
+ ```
148
+
149
+ Inline extras: inline code in the trigger (`` &&&`code` trigger >>> content&&& ``)
150
+ and `\n` line breaks in the content.
151
+
152
+ ## Tooltip
153
+
154
+ An inline glossary term / short definition on hover or focus. Declarative and
155
+ zero-JavaScript: the anchor renders as a focusable, dotted-underlined span wired
156
+ to the tip automatically.
157
+
158
+ - **Inline primary:** `(((placement? distance:N? skidding:N? anchor >>> tip)))`
159
+ - **Block alt:** `:::wa-tooltip placement? distance:N? skidding:N?` (anchor,
160
+ `>>>`, tip, `:::`).
161
+
162
+ **Placements:** `top` (default), `bottom`, `left`, `right`, plus the eight aligned
163
+ variants. **Parameters:** `distance:N`, `skidding:N` (leading tokens, before the
164
+ anchor term).
165
+
166
+ **Tip content** is plain text (HTML-escaped). Use `\n` for line breaks (rendered
167
+ as `<br>`). Unlike a popover, a tooltip has no `link` or `without-arrow`.
168
+
169
+ ```
170
+ Styling is handled by (((CSS >>> Cascading Style Sheets))) on the web.
171
+ ```
172
+
173
+ ```
174
+ (((bottom-start Org number >>> NO: 9 digits\nSE: 10 digits)))
175
+ ```
176
+
177
+ ## Random content
178
+
179
+ A container that shows one (or more) of its options at random and hides the rest,
180
+ optionally rotating them — a rotating tips / testimonials / featured-content block
181
+ with **zero JavaScript of your own** (Web Awesome's own runtime does the work).
182
+
183
+ - **Primary:** `......params?` (**6 dots**)
184
+ - **Alt:** `:::wa-random-content params?`
185
+ - Separate each option with a `>>>` line. Close with `......`.
186
+
187
+ **Parameters** (order-independent, on the opening fence):
188
+
189
+ - **mode:** `unique` (WA default), `random`, or `sequence` — as a bare word or
190
+ `mode:random`.
191
+ - **animation:** `none`, `fade`, `fade-up`, `fade-down`, `fade-left`,
192
+ `fade-right` — as a bare word or `animation:fade`.
193
+ - **items:n** — how many children to show at once (a bare integer like `2` works).
194
+ - **autoplay** — rotate the shown children automatically.
195
+ - **autoplay-interval:value** — milliseconds between rotations (e.g.
196
+ `autoplay-interval:3000`).
197
+
198
+ ```
199
+ ......mode:random animation:fade
200
+ > "This tool saved us days of work." — A happy user
201
+ >>>
202
+ > "Setup took five minutes." — Another happy user
203
+ ......
204
+ ```
205
+
206
+ ## Tree
207
+
208
+ A `<wa-tree>` hierarchy rendered from a **nested Markdown bullet list** — file/
209
+ directory layouts, taxonomies, nested navigation.
210
+
211
+ - **Primary:** `||||||open?` (**6 pipes**)
212
+ - **Alt:** `:::wa-tree open?`
213
+ - Wrap a normal nested bullet list; close with `||||||`. Children are more-indented
214
+ list items (2- or 4-space indentation both work).
215
+
216
+ **Fence token:** `open` (alias `expanded`) marks every branch (any node with
217
+ children) expanded.
218
+ **Per-node leading tokens** (on each list item, stripped from the label):
219
+ `expanded` (force this branch open), `icon:name` (a leading folder/file icon).
220
+ Colon-bearing labels like `cbc:ID` are kept verbatim — only a *leading* `icon:`
221
+ token is treated as an icon.
222
+
223
+ ```
224
+ ||||||open
225
+ - icon:folder src
226
+ - icon:file index.ts
227
+ - icon:file utils.ts
228
+ - icon:file README.md
229
+ ||||||
230
+ ```
231
+
232
+ **Display/navigation only:** Web Awesome's interactive tree selection
233
+ (`selection`, `lazy`, `selected`) needs JavaScript and is deliberately omitted —
234
+ this emits a static-safe tree (nesting, initial expand state, leading icons).
235
+
236
+ > **WA runtime caveat (3.9.0):** `<wa-tree-item>` only honors a static `expanded`
237
+ > on items visible at load, so `open` expands the **top-level** branches; deeper
238
+ > branches stay collapsed until their parent is opened. The attribute is still
239
+ > emitted on every branch (harmless and forward-compatible); full deep-expand-on-
240
+ > load would need JavaScript.
@@ -0,0 +1,175 @@
1
+ # Media & date components
2
+
3
+ Carousel · Comparison · Video · Video playlist · Format date · Relative time
4
+
5
+ ## Carousel
6
+
7
+ An image slider or content rotator with navigation — a gallery or step-by-step
8
+ visual slides.
9
+
10
+ - **Primary:** `~~~~~~params?` (**6 tildes**)
11
+ - **Alt:** `:::wa-carousel params?`
12
+ - Separate slides with `~~~` (**3 tildes**). Close with `~~~~~~`.
13
+
14
+ **Parameters** (order-independent):
15
+
16
+ - `navigation` — prev/next arrows.
17
+ - `pagination` — dot indicators.
18
+ - `loop` — infinite loop.
19
+ - `autoplay` — auto-advance; `autoplay-interval:value` sets the ms between
20
+ advances (e.g. `5000`; default `3000`).
21
+ - `mouse-dragging` — drag to slide.
22
+ - `vertical` — vertical orientation.
23
+ - `scroll-hint:value` — peek of the next slide.
24
+ - `aspect-ratio:value` — e.g. `16/9`, `4/3`.
25
+ - `slide-gap:value` — gap between slides.
26
+ - `slides-per-page:n` — slides visible at once.
27
+ - `slides-per-move:n` — slides advanced per move.
28
+
29
+ ```
30
+ ~~~~~~navigation pagination loop autoplay autoplay-interval:5000
31
+ ~~~
32
+ ![Dashboard](/img/slide-1.png)
33
+ ~~~
34
+ ~~~
35
+ ![Reports](/img/slide-2.png)
36
+ ~~~
37
+ ~~~~~~
38
+ ```
39
+
40
+ ## Comparison
41
+
42
+ A before/after image comparison with a draggable slider. Requires **exactly two
43
+ images**.
44
+
45
+ - **Primary:** `|||position?`
46
+ - **Alt:** `:::wa-comparison position?`
47
+ - Close with `|||`. First image → `before` slot; second image → `after` slot.
48
+ - Optional `position` (0–100) sets the initial slider position.
49
+
50
+ ```
51
+ |||40
52
+ ![Before](/img/before.jpg)
53
+ ![After](/img/after.jpg)
54
+ |||
55
+ ```
56
+
57
+ ## Video (Web Awesome Pro)
58
+
59
+ Embed a single video as `<wa-video>`. **Requires a Web Awesome Pro kit** and is
60
+ experimental.
61
+
62
+ - **Primary:** `;;;controls:? preload:? flags?`
63
+ - **Alt:** `:::wa-video controls:? preload:? flags?`
64
+ - Close with `;;;`.
65
+
66
+ **Body:** the first Markdown link `[Title](src)` supplies the video `title` and
67
+ `src`; the first Markdown image `![alt](poster)` supplies the `poster`. A block
68
+ with **no link (no `src`) is left untransformed**.
69
+
70
+ **Parameters** (order-independent; invalid enum values dropped):
71
+
72
+ - `controls:none|standard|full` — controls preset (default `standard`).
73
+ - `preload:auto|metadata|none` — how the browser preloads (default `metadata`).
74
+ - `autoplay`, `autoplay-muted`, `autoplay-on-visible`, `loop`, `muted`.
75
+
76
+ ```
77
+ ;;;controls:full
78
+ [Product tour](/media/tour.mp4)
79
+ ![Poster](/media/tour-poster.jpg)
80
+ ;;;
81
+ ```
82
+
83
+ v1 emits a single `src` (no `<source>`/`<track>` children yet). For a navigable
84
+ set of videos, use a Video playlist.
85
+
86
+ ## Video playlist (Web Awesome Pro)
87
+
88
+ Group multiple videos into `<wa-video-playlist>` with navigation. **Pro**,
89
+ experimental.
90
+
91
+ - **Primary:** `;;;;;;controls:?` (**6 semicolons**)
92
+ - **Alt:** `:::wa-video-playlist controls:?`
93
+ - Wrap each video in a bare `;;;` … `;;;` item between the `;;;;;;` fences (mirrors
94
+ the carousel `~~~`/`~~~~~~` structure). Each item follows the same body rules as
95
+ a single Video.
96
+
97
+ **`controls:none|standard|full`** sets the preset for the whole playlist (default
98
+ `full`); it is forwarded to every child, so the children omit their own
99
+ `controls`.
100
+
101
+ ```
102
+ ;;;;;;controls:standard
103
+ ;;;
104
+ [Part 1 — Intro](/media/part1.mp4)
105
+ ![Poster](/media/part1.jpg)
106
+ ;;;
107
+ ;;;
108
+ [Part 2 — Setup](/media/part2.mp4)
109
+ ;;;
110
+ ;;;;;;
111
+ ```
112
+
113
+ ## Format date
114
+
115
+ An absolute, locale-formatted date baked in at build time (`<wa-format-date>`).
116
+ The browser formats it via `Intl.DateTimeFormat`. Works **inline** or as a block.
117
+
118
+ - **Inline primary:** `[[[date style:preset? time:preset? granular? lang:locale?]]]`
119
+ - **Block alt:** `:::wa-format-date date style:preset? …` (empty body, close `:::`).
120
+
121
+ **The date** is an ISO 8601 date (`2026-06-26`) or datetime with a `T`
122
+ (`2026-06-26T14:30:00Z`). Omit it to show the viewer's current time.
123
+
124
+ **Presets:** `style:short|medium|long|full` and `time:short|medium|long|full`
125
+ expand to granular attributes. A bare date defaults to `style:long`; `time:`
126
+ without a date style emits time-only.
127
+
128
+ **Granular overrides** (win over presets, rightmost wins): `weekday`, `era`,
129
+ `year`, `month`, `day`, `hour`, `minute`, `second` (each an `Intl` value), plus
130
+ `hour-format:auto|12|24`, `time-zone-name:short|long`, `time-zone:IANA`, and
131
+ `lang:` / `locale:` for the locale. Unknown tokens and invalid enum values are
132
+ silently dropped.
133
+
134
+ ```
135
+ Published [[[2026-06-26 style:long]]].
136
+ ```
137
+
138
+ ```
139
+ :::wa-format-date 2026-06-26 style:full lang:fr
140
+ :::
141
+ ```
142
+
143
+ ## Relative time
144
+
145
+ A relative "3 days ago"-style phrase, optionally live-ticking
146
+ (`<wa-relative-time>`, via `Intl.RelativeTimeFormat`). Works **inline** or as a
147
+ block.
148
+
149
+ - **Inline primary:** prefix the date with `relative` —
150
+ `[[[relative date format:? numeric:? sync? lang:?]]]`.
151
+ - **Block alt:** `:::wa-relative-time date format:? numeric:? sync?` (close `:::`).
152
+
153
+ **Parameters:**
154
+
155
+ - `format:long|short|narrow` — phrasing width (default `long`).
156
+ - `numeric:auto|always` — `auto` allows "yesterday"/"tomorrow"; `always` forces
157
+ "1 day ago" (default `auto`).
158
+ - `sync` — keep the phrase ticking live as time passes.
159
+ - `lang:` / `locale:` — the locale.
160
+
161
+ Date-formatting tokens (`style:`, `time:`, `month:`, …) are ignored in relative
162
+ mode.
163
+
164
+ ```
165
+ Updated [[[relative 2026-06-20]]].
166
+ ```
167
+
168
+ ```
169
+ :::wa-relative-time 2026-06-20 sync
170
+ :::
171
+ ```
172
+
173
+ > **Static-site caveat (Format date & Relative time):** like `<wa-icon>`, both
174
+ > render generated text into shadow DOM with **no light-DOM fallback** — with Web
175
+ > Awesome's JavaScript disabled they show nothing. See `authoring.md`.
@@ -0,0 +1,177 @@
1
+ # Worked examples
2
+
3
+ Three complete, generic pages showing how components compose. All content is a
4
+ stand-in — swap in the real thing. These use only the primary shorthand syntax.
5
+
6
+ ## 1. Product landing page
7
+
8
+ A hero call to action, a feature grid, a copy-me install command, and a
9
+ before/after.
10
+
11
+ ````markdown
12
+ # Acme Build
13
+
14
+ Ship static sites faster.
15
+
16
+ ::::split
17
+ @@@brand pill New — v2.0 @@@
18
+
19
+ %%%brand icon:rocket
20
+ [Get started](https://example.com/start)
21
+ %%%
22
+ ::::
23
+
24
+ :::success
25
+ **Now 3× faster.** The v2 engine builds a 10,000-page site in under a minute.
26
+ :::
27
+
28
+ ## Why Acme Build
29
+
30
+ ::::grid gap:l min:16rem
31
+ ===
32
+ **Zero config**
33
+ Sensible defaults out of the box — no setup file required.
34
+ [Learn more](/docs/config)
35
+ ===
36
+
37
+ ===
38
+ **Framework-agnostic**
39
+ Works with any static site generator you already use.
40
+ [See integrations](/docs/integrations)
41
+ ===
42
+
43
+ ===
44
+ **Themeable**
45
+ Restyle everything with design tokens, no CSS overrides.
46
+ [Theming guide](/docs/theming)
47
+ ===
48
+ ::::
49
+
50
+ ## Install in one line
51
+
52
+ <<<top copy-label="Copy install command"
53
+ npm install acme-build
54
+ <<<
55
+
56
+ ## See the difference
57
+
58
+ The v2 redesign, side by side:
59
+
60
+ |||50
61
+ ![Before](/img/v1.png)
62
+ ![After](/img/v2.png)
63
+ |||
64
+ ````
65
+
66
+ ## 2. Docs — Getting started
67
+
68
+ A prerequisites callout, per-OS install tabs, an optional advanced-config Details
69
+ block, and inline tooltips for jargon.
70
+
71
+ ````markdown
72
+ # Getting started
73
+
74
+ Get a project running in about five minutes.
75
+
76
+ :::warning
77
+ You need (((Node.js >>> A JavaScript runtime built on V8))) 18 or newer. Check
78
+ with `node --version` before you begin.
79
+ :::
80
+
81
+ ## 1. Install
82
+
83
+ ++++++manual
84
+ +++ macOS
85
+ <<<
86
+ brew install acme-build
87
+ <<<
88
+ +++
89
+ +++ Windows
90
+ <<<
91
+ winget install Acme.Build
92
+ <<<
93
+ +++
94
+ +++ Linux
95
+ <<<
96
+ curl -fsSL https://example.com/install.sh | sh
97
+ <<<
98
+ +++
99
+ ++++++
100
+
101
+ ## 2. Create a project
102
+
103
+ <<<
104
+ acme new my-site
105
+ <<<
106
+
107
+ ## 3. Configure (optional)
108
+
109
+ ^^^
110
+ Show advanced configuration
111
+ >>>
112
+ Most projects never touch these. Set them in `acme.config.js`:
113
+
114
+ ```js
115
+ export default {
116
+ incremental: true,
117
+ concurrency: 8,
118
+ };
119
+ ```
120
+ ^^^
121
+
122
+ :::success
123
+ That's it — run `acme dev` and open the local URL. You're building with
124
+ (((SSG >>> Static Site Generator))) speed.
125
+ :::
126
+ ````
127
+
128
+ ## 3. Changelog + FAQ
129
+
130
+ A release with a relative-time stamp, tags for the kinds of change, and an FAQ
131
+ accordion.
132
+
133
+ ````markdown
134
+ # Release notes
135
+
136
+ ## v2.0.0 — [[[2026-06-26 style:long]]] ([[[relative 2026-06-26]]])
137
+
138
+ ::::cluster gap:xs
139
+ @@@success Added @@@ @@@warning Changed @@@ @@@danger Removed @@@
140
+ ::::
141
+
142
+ :::danger
143
+ **Breaking:** the `legacy` build mode is removed. Migrate to the default engine
144
+ before upgrading — see the migration guide.
145
+ :::
146
+
147
+ - @@@success Added @@@ incremental builds, on by default.
148
+ - @@@warning Changed @@@ the config file format to ESM.
149
+ - @@@danger Removed @@@ the deprecated `legacy` mode.
150
+
151
+ ## FAQ
152
+
153
+ //////single heading:3
154
+ /// Is v2 a drop-in upgrade?
155
+ For most projects, yes — except the removed `legacy` mode noted above.
156
+ ///
157
+ /// Do I need to change my config?
158
+ The config file is now ESM (`export default { … }`). Rename it to
159
+ `acme.config.js` and convert `module.exports` to `export default`.
160
+ ///
161
+ /// expanded Where do I report bugs?
162
+ On the issue tracker. Include your Acme Build version and a minimal repro.
163
+ ///
164
+ //////
165
+ ````
166
+
167
+ ## What these demonstrate
168
+
169
+ - **Layouts wrap components** — `::::grid` of cards, `::::cluster` of tags,
170
+ `::::split` for a header row.
171
+ - **Callouts carry severity** — `:::success` for wins, `:::warning` for
172
+ prerequisites, `:::danger` for breaking changes.
173
+ - **Tabs for parallel alternatives** — per-OS install steps the reader picks one
174
+ of.
175
+ - **Copy buttons on every command** — nothing to hand-select.
176
+ - **Accordion for the FAQ, Details for one optional aside** — group vs. single.
177
+ - **Inline tooltips and dates** stay in the flow of prose.