dogsbay 0.2.0-beta.10 → 0.2.0-beta.12

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/dist/registry.js CHANGED
@@ -388,6 +388,14 @@ export const registry = {
388
388
  primitives: [],
389
389
  description: "Clickable card with link",
390
390
  },
391
+ icon: {
392
+ name: "icon",
393
+ files: ["Icon.astro", "index.ts"],
394
+ dependencies: ["@dogsbay/icons"],
395
+ registryDependencies: [],
396
+ primitives: [],
397
+ description: "Build-time-resolved icon (Lucide default; mdi:, simple-icons:, etc. via Iconify)",
398
+ },
391
399
  sidebar: {
392
400
  name: "sidebar",
393
401
  files: ["Sidebar.astro", "SidebarContent.astro", "SidebarGroup.astro", "SidebarGroupContent.astro", "SidebarGroupLabel.astro", "SidebarHeader.astro", "SidebarInset.astro", "SidebarMenu.astro", "SidebarMenuButton.astro", "SidebarMenuItem.astro", "SidebarNavTree.astro", "SidebarProvider.astro", "SidebarRail.astro", "SidebarSeparator.astro", "SidebarTrigger.astro", "sidebar.ts", "index.ts"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dogsbay",
3
- "version": "0.2.0-beta.10",
3
+ "version": "0.2.0-beta.12",
4
4
  "description": "CLI for Dogsbay — scaffold, build, and serve documentation sites with markdown / MkDocs / Obsidian / OpenAPI sources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,14 +32,14 @@
32
32
  "picocolors": "^1.1.0",
33
33
  "prompts": "^2.4.2",
34
34
  "yaml": "^2.8.3",
35
- "@dogsbay/format-mkdocs": "0.2.0-beta.10",
36
- "@dogsbay/format-astro": "0.2.0-beta.10",
37
- "@dogsbay/format-obsidian": "0.2.0-beta.10",
38
- "@dogsbay/format-mdx": "0.2.0-beta.10",
39
- "@dogsbay/format-starlight": "0.2.0-beta.10",
40
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.10",
41
- "@dogsbay/format-openapi": "0.2.0-beta.10",
42
- "@dogsbay/types": "0.2.0-beta.10"
35
+ "@dogsbay/format-astro": "0.2.0-beta.12",
36
+ "@dogsbay/format-obsidian": "0.2.0-beta.12",
37
+ "@dogsbay/format-mkdocs": "0.2.0-beta.12",
38
+ "@dogsbay/format-mdx": "0.2.0-beta.12",
39
+ "@dogsbay/format-starlight": "0.2.0-beta.12",
40
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.12",
41
+ "@dogsbay/format-openapi": "0.2.0-beta.12",
42
+ "@dogsbay/types": "0.2.0-beta.12"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^22.0.0",
@@ -110,25 +110,43 @@ a responsive grid.
110
110
 
111
111
  ```markdown
112
112
  :::cards
113
- - **[Getting started](./getting-started)**
113
+ - **[Getting started](./getting-started)** {icon="rocket"}
114
114
  Three-minute orientation to authoring.
115
115
 
116
- - **[API reference](./api/)**
116
+ - **[API reference](./api/)** {icon="book-open"}
117
117
  Endpoint browser, schemas, code samples.
118
118
 
119
- - **[GitHub](https://github.com/your-org/repo)**
119
+ - **[GitHub](https://github.com/your-org/repo)** {icon="github"}
120
120
  Star, browse, file an issue.
121
121
  :::
122
122
  ```
123
123
 
124
- Each item: `- **[Title](href)**` followed by the description on
125
- the next line, indented two spaces. Optional blank line between
124
+ Each item: `- **[Title](href)**` optionally followed by an
125
+ attribute block (`{icon="..."}`), then the description on the
126
+ next line, indented two spaces. Optional blank line between
126
127
  items improves readability.
127
128
 
128
- **Known limitation**: the `{icon="rocket"}` attribute syntax
129
- documented in some places does NOT currently survive the
130
- parser leaks into descriptions as literal text. Don't use icon
131
- attributes in cards yet. See `plans/openapi-builtin-followups.md`.
129
+ ### Icons on cards
130
+
131
+ `icon` accepts any name from the platform Icon component
132
+ (see `dogsbay:theme-tokens` for the Icon component reference):
133
+
134
+ - **Bare names** default to Lucide:
135
+ `{icon="rocket"}`, `{icon="book-open"}`, `{icon="github"}`.
136
+ Browse the catalog at <https://lucide.dev/icons/>.
137
+ - **`pack:name`** routes to other Iconify packs:
138
+ `{icon="mdi:home"}` (Material Design Icons),
139
+ `{icon="simple-icons:github"}` (brand glyphs),
140
+ `{icon="lucide:book-open"}` (explicit Lucide).
141
+ - **Emoji shortcodes** map to Unicode characters when no
142
+ Iconify pack is given: `{icon="rocket"}` → 🚀,
143
+ `{icon="tada"}` → 🎉. The emoji map wins for bare names that
144
+ match it.
145
+
146
+ When the name doesn't resolve in any pack, the icon slot
147
+ renders nothing (silent fallback) — better than a broken-image
148
+ placeholder, since the title and description still convey the
149
+ card's intent.
132
150
 
133
151
  ## Single card (with attrs or YAML body)
134
152
 
@@ -159,6 +177,54 @@ icon: rocket
159
177
 
160
178
  Both forms are accepted by the parser.
161
179
 
180
+ ## Link card (`:::link-card`)
181
+
182
+ A focused variant of `:::card` for "go here next" navigation
183
+ affordances. Renders a chevron arrow on the right and a
184
+ distinctive hover state — visually clearer that it's a link
185
+ rather than a content tile.
186
+
187
+ ```markdown
188
+ :::link-card{title="Configuration guide" href="/config/"}
189
+ Site name, theme, base path, and per-source settings live in
190
+ dogsbay.config.yml.
191
+ :::
192
+ ```
193
+
194
+ YAML body form when prop count or content grows:
195
+
196
+ ```markdown
197
+ :::link-card
198
+ ---
199
+ title: Configuration guide
200
+ description: |
201
+ Site name, theme, base path, and per-source settings live in
202
+ dogsbay.config.yml.
203
+ href: /config/
204
+ ---
205
+ :::
206
+ ```
207
+
208
+ Props: `title` (required), `href` (required), `description`
209
+ (optional — also accepted as the body paragraph for ergonomic
210
+ authoring). No `icon` slot — link-cards intentionally lean on
211
+ the chevron alone for the link affordance. When you need an
212
+ icon, use `:::card`.
213
+
214
+ ### When to pick which card directive
215
+
216
+ - **`:::cards`** (plural) — list of related links, displayed as
217
+ a responsive grid. Best for "browse next" clusters at the
218
+ end of a page or on a landing page. Items are bulleted-link
219
+ shorthand.
220
+ - **`:::card`** (singular) — one rich card with full prop
221
+ surface (`icon`, `variant`, custom classes, arbitrary body).
222
+ Use when you want a tile with deliberate visual weight.
223
+ - **`:::link-card`** — one card scoped to a single navigation
224
+ link, with chevron arrow. Use for callouts that lead the
225
+ reader somewhere specific ("Continue with Configuration
226
+ guide →").
227
+
162
228
  ## Grid
163
229
 
164
230
  Generic responsive grid container with `cols` and `gap` attrs:
@@ -220,8 +286,14 @@ For inline-level marks, use `:name[text]{attrs}`:
220
286
  ```markdown
221
287
  Press :kbd[Ctrl+C] to copy.
222
288
  This is :badge[New]{tone="success"} content.
289
+ Click :icon[rocket] to launch, or :icon[mdi:home] to go home.
223
290
  ```
224
291
 
292
+ `:icon[name]` accepts the same shorthand as the `{icon=...}`
293
+ attribute on cards — bare names default to Lucide,
294
+ `pack:name` routes to other Iconify packs, emoji shortcodes
295
+ render as Unicode. See "Icons on cards" above.
296
+
225
297
  ## Frontmatter
226
298
 
227
299
  Every page should start with YAML frontmatter delimited by `---`:
@@ -250,4 +322,8 @@ fields.
250
322
  — they're different syntactic structures.
251
323
  - ❌ Writing card descriptions on the same line as the title —
252
324
  must be on the next line, indented two spaces.
253
- - ❌ `{icon="..."}` on cards known parser gap, doesn't render.
325
+ - ❌ Using a non-existent icon name. The icon slot fails
326
+ silently when the name doesn't resolve, so a typo leaves the
327
+ card looking wrong without any error. Verify Lucide names
328
+ against <https://lucide.dev/icons/> or use the `pack:name`
329
+ form to be explicit.