@refrakt-md/runes 0.21.0 → 0.22.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/dist/examples.d.ts +7 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +56 -212
- package/dist/examples.js.map +1 -1
- package/dist/fixtures.d.ts +69 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +109 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/icon-resolve.d.ts +31 -0
- package/dist/lib/icon-resolve.d.ts.map +1 -0
- package/dist/lib/icon-resolve.js +45 -0
- package/dist/lib/icon-resolve.js.map +1 -0
- package/dist/lib/image-schemes.d.ts +29 -0
- package/dist/lib/image-schemes.d.ts.map +1 -0
- package/dist/lib/image-schemes.js +56 -0
- package/dist/lib/image-schemes.js.map +1 -0
- package/dist/lib/placeholder.d.ts +19 -0
- package/dist/lib/placeholder.d.ts.map +1 -0
- package/dist/lib/placeholder.js +99 -0
- package/dist/lib/placeholder.js.map +1 -0
- package/dist/nodes.d.ts.map +1 -1
- package/dist/nodes.js +17 -0
- package/dist/nodes.js.map +1 -1
- package/dist/plugins.d.ts +14 -4
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +35 -15
- package/dist/plugins.js.map +1 -1
- package/dist/tags/budget.d.ts.map +1 -1
- package/dist/tags/budget.js +11 -5
- package/dist/tags/budget.js.map +1 -1
- package/dist/tags/common.d.ts +10 -0
- package/dist/tags/common.d.ts.map +1 -1
- package/dist/tags/common.js +22 -5
- package/dist/tags/common.js.map +1 -1
- package/dist/tags/figure.d.ts.map +1 -1
- package/dist/tags/figure.js +6 -3
- package/dist/tags/figure.js.map +1 -1
- package/dist/tags/gallery.d.ts.map +1 -1
- package/dist/tags/gallery.js +5 -2
- package/dist/tags/gallery.js.map +1 -1
- package/dist/tags/icon.d.ts.map +1 -1
- package/dist/tags/icon.js +4 -28
- package/dist/tags/icon.js.map +1 -1
- package/package.json +7 -5
package/dist/examples.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Generated example Markdoc snippets, keyed by rune name. Source: fixtures/*.md. */
|
|
2
2
|
export declare const RUNE_EXAMPLES: Record<string, string>;
|
|
3
|
+
/** Curation metadata (`role` / `notes`) for fixtures that declare it. Source: fixtures/*.md. */
|
|
4
|
+
export interface RuneFixtureMeta {
|
|
5
|
+
role?: string;
|
|
6
|
+
notes?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const RUNE_FIXTURE_META: Record<string, RuneFixtureMeta>;
|
|
3
9
|
//# sourceMappingURL=examples.d.ts.map
|
package/dist/examples.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../src/examples.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../src/examples.ts"],"names":[],"mappings":"AAGA,qFAAqF;AACrF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyChD,CAAC;AAEF,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAY7D,CAAC"}
|
package/dist/examples.js
CHANGED
|
@@ -1,215 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
// GENERATED from fixtures/*.md by scripts/generate-examples.mjs — do not edit by hand.
|
|
2
|
+
// Edit the fixture .md files and rebuild; a drift test guards this file.
|
|
3
|
+
/** Generated example Markdoc snippets, keyed by rune name. Source: fixtures/*.md. */
|
|
2
4
|
export const RUNE_EXAMPLES = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
{% /
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{% /
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{% /
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{% /
|
|
39
|
-
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
- runes
|
|
57
|
-
{% /nav %}
|
|
58
|
-
{% /region %}
|
|
59
|
-
{% /layout %}`,
|
|
60
|
-
region: `{% region name="nav" %}
|
|
61
|
-
{% nav %}
|
|
62
|
-
- page-one
|
|
63
|
-
- page-two
|
|
64
|
-
{% /nav %}
|
|
65
|
-
{% /region %}`,
|
|
66
|
-
details: `{% details summary="How does billing work?" %}
|
|
67
|
-
We bill monthly on the date you signed up. You can cancel anytime
|
|
68
|
-
from your account settings.
|
|
69
|
-
{% /details %}`,
|
|
70
|
-
figure: `{% figure size="large" align="center" caption="Dashboard overview" %}
|
|
71
|
-

|
|
72
|
-
{% /figure %}`,
|
|
73
|
-
accordion: `{% accordion %}
|
|
74
|
-
## What is refrakt.md?
|
|
75
|
-
|
|
76
|
-
A content framework that extends Markdown with semantic runes.
|
|
77
|
-
|
|
78
|
-
## How do I install it?
|
|
79
|
-
|
|
80
|
-
Run \`npm install @refrakt-md/runes\` to get started.
|
|
81
|
-
|
|
82
|
-
## Is it free?
|
|
83
|
-
|
|
84
|
-
Yes, refrakt.md is open source and free to use.
|
|
85
|
-
{% /accordion %}`,
|
|
86
|
-
toc: `{% toc depth=3 %}{% /toc %}`,
|
|
87
|
-
breadcrumb: `{% breadcrumb %}
|
|
88
|
-
- [Home](/)
|
|
89
|
-
- [Docs](/docs)
|
|
90
|
-
- [Runes](/docs/runes)
|
|
91
|
-
- Hero
|
|
92
|
-
{% /breadcrumb %}`,
|
|
93
|
-
compare: `{% compare %}
|
|
94
|
-
\`\`\`javascript
|
|
95
|
-
// Before
|
|
96
|
-
const x = 1;
|
|
97
|
-
const y = 2;
|
|
98
|
-
\`\`\`
|
|
99
|
-
|
|
100
|
-
\`\`\`javascript
|
|
101
|
-
// After
|
|
102
|
-
const [x, y] = [1, 2];
|
|
103
|
-
\`\`\`
|
|
104
|
-
{% /compare %}`,
|
|
105
|
-
embed: `{% embed url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" %}
|
|
106
|
-
Watch the video for a full walkthrough.
|
|
107
|
-
{% /embed %}`,
|
|
108
|
-
datatable: `{% datatable sortable="Name,Price" searchable=true pageSize=10 %}
|
|
109
|
-
| Name | Price | Category | Stock |
|
|
110
|
-
|------|-------|----------|-------|
|
|
111
|
-
| Widget A | $9.99 | Tools | 150 |
|
|
112
|
-
| Widget B | $14.99 | Tools | 85 |
|
|
113
|
-
| Gadget X | $24.99 | Electronics | 42 |
|
|
114
|
-
{% /datatable %}`,
|
|
115
|
-
diff: `{% diff mode="unified" language="javascript" %}
|
|
116
|
-
\`\`\`javascript
|
|
117
|
-
function getData() {
|
|
118
|
-
return fetch('/api')
|
|
119
|
-
.then(res => res.json())
|
|
120
|
-
.then(data => data);
|
|
121
|
-
}
|
|
122
|
-
\`\`\`
|
|
123
|
-
|
|
124
|
-
\`\`\`javascript
|
|
125
|
-
async function getData() {
|
|
126
|
-
const res = await fetch('/api');
|
|
127
|
-
return res.json();
|
|
128
|
-
}
|
|
129
|
-
\`\`\`
|
|
130
|
-
{% /diff %}`,
|
|
131
|
-
chart: `{% chart type="bar" title="Monthly Revenue" %}
|
|
132
|
-
| Month | Revenue | Expenses |
|
|
133
|
-
|-------|---------|----------|
|
|
134
|
-
| Jan | 4200 | 3100 |
|
|
135
|
-
| Feb | 5100 | 3400 |
|
|
136
|
-
| Mar | 4800 | 3200 |
|
|
137
|
-
| Apr | 6200 | 3800 |
|
|
138
|
-
{% /chart %}`,
|
|
139
|
-
diagram: `{% diagram language="mermaid" title="User Flow" %}
|
|
140
|
-
\`\`\`mermaid
|
|
141
|
-
graph TD
|
|
142
|
-
A[Visit Site] --> B{Logged In?}
|
|
143
|
-
B -->|Yes| C[Dashboard]
|
|
144
|
-
B -->|No| D[Login Page]
|
|
145
|
-
D --> E[Sign Up]
|
|
146
|
-
D --> F[Sign In]
|
|
147
|
-
F --> C
|
|
148
|
-
E --> C
|
|
149
|
-
\`\`\`
|
|
150
|
-
{% /diagram %}`,
|
|
151
|
-
sidenote: `{% sidenote %}
|
|
152
|
-
This is a margin note that provides additional context
|
|
153
|
-
without interrupting the main flow of the text.
|
|
154
|
-
{% /sidenote %}`,
|
|
155
|
-
sandbox: `{% sandbox framework="tailwind" %}
|
|
156
|
-
<div class="flex items-center gap-4 p-6 bg-white rounded-xl shadow-lg max-w-sm">
|
|
157
|
-
<img src="https://i.pravatar.cc/80" alt="Avatar" class="w-16 h-16 rounded-full" />
|
|
158
|
-
<div>
|
|
159
|
-
<h3 class="text-lg font-semibold text-gray-900">Jane Doe</h3>
|
|
160
|
-
<p class="text-sm text-gray-500">Product Designer</p>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
{% /sandbox %}`,
|
|
164
|
-
form: `{% form action="/api/contact" method="POST" success="Thanks! We'll be in touch." %}
|
|
165
|
-
# Contact Us
|
|
166
|
-
|
|
167
|
-
- Name (required)
|
|
168
|
-
- Email (required, placeholder: "you@example.com")
|
|
169
|
-
- Company (optional)
|
|
170
|
-
|
|
171
|
-
> What are you interested in?
|
|
172
|
-
- Product demo
|
|
173
|
-
- Partnership
|
|
174
|
-
- Support
|
|
175
|
-
- Other
|
|
176
|
-
|
|
177
|
-
- Message (required)
|
|
178
|
-
|
|
179
|
-
**Send Message**
|
|
180
|
-
{% /form %}`,
|
|
181
|
-
budget: `{% budget title="Tokyo Trip" currency="JPY" duration="5 days" %}
|
|
182
|
-
## Accommodation
|
|
183
|
-
|
|
184
|
-
- Hotel in Shinjuku: ¥15000
|
|
185
|
-
- Ryokan in Hakone: ¥25000
|
|
186
|
-
|
|
187
|
-
## Transportation
|
|
188
|
-
|
|
189
|
-
- Japan Rail Pass (7-day): ¥29650
|
|
190
|
-
- Airport transfer: ¥3000
|
|
191
|
-
|
|
192
|
-
## Food & Dining
|
|
193
|
-
|
|
194
|
-
- Daily meals: ¥5000
|
|
195
|
-
- Sushi experience: ¥8000
|
|
196
|
-
{% /budget %}`,
|
|
197
|
-
pullquote: `{% pullquote align="center" variant="accent" %}
|
|
198
|
-
> Design is not just what it looks like and feels like. Design is how it works.
|
|
199
|
-
{% /pullquote %}`,
|
|
200
|
-
textblock: `{% textblock dropcap=true columns=2 %}
|
|
201
|
-
The invention of the printing press in the 15th century revolutionized the spread of information across Europe. Before Gutenberg, books were painstakingly copied by hand, making them rare and expensive.
|
|
202
|
-
|
|
203
|
-
With movable type, ideas could be reproduced quickly and cheaply. This democratization of knowledge helped fuel the Renaissance, the Reformation, and the Scientific Revolution.
|
|
204
|
-
{% /textblock %}`,
|
|
205
|
-
mediatext: `{% mediatext align="left" ratio="1:1" %}
|
|
206
|
-

|
|
207
|
-
|
|
208
|
-
The valley stretches out below, carved by millennia of glacial movement. In spring, wildflowers carpet the meadows in brilliant color, attracting hikers and photographers from around the world.
|
|
209
|
-
{% /mediatext %}`,
|
|
210
|
-
showcase: `{% showcase shadow="soft" %}
|
|
211
|
-

|
|
212
|
-
{% /showcase %}`,
|
|
213
|
-
icon: `{% icon name="check" /%}`,
|
|
5
|
+
"accordion": "{% accordion %}\n## What is refrakt.md?\n\nA content framework that extends Markdown with semantic runes.\n\n## How do I install it?\n\nRun `npm install @refrakt-md/runes` to get started.\n\n## Is it free?\n\nYes, refrakt.md is open source and free to use.\n{% /accordion %}",
|
|
6
|
+
"annotate": "{% annotate %}\nThe refrakt.md framework builds on Markdoc to provide a semantic content transformation pipeline.\n\n{% note %}\nMarkdoc is a Markdown-based authoring system that extends Markdown with a custom tag syntax for structured content.\n{% /note %}\n\nRunes wrap ordinary Markdown and reinterpret it based on context — a heading inside a nav becomes a group title.\n{% /annotate %}",
|
|
7
|
+
"badge": "This release is {% badge sentiment=\"positive\" %}New{% /badge %}, the API is {% badge sentiment=\"caution\" %}Beta{% /badge %}, and the old endpoint is {% badge sentiment=\"negative\" %}Deprecated{% /badge %}.",
|
|
8
|
+
"bar": "{% bar %}\nWORK-051\n---\n{% badge sentiment=\"positive\" %}done{% /badge %}\n{% /bar %}",
|
|
9
|
+
"breadcrumb": "{% breadcrumb %}\n- [Home](/)\n- [Docs](/docs)\n- [Runes](/docs/runes)\n- Hero\n{% /breadcrumb %}",
|
|
10
|
+
"budget": "{% budget currency=\"JPY\" duration=\"5 days\" %}\n# Tokyo Trip\n\n## Accommodation\n\n- Hotel in Shinjuku: ¥15000\n- Ryokan in Hakone: ¥25000\n\n## Transportation\n\n- Japan Rail Pass (7-day): ¥29650\n- Airport transfer: ¥3000\n\n## Food & Dining\n\n- Daily meals: ¥5000\n- Sushi experience: ¥8000\n{% /budget %}",
|
|
11
|
+
"card": "{% card %}\n\n\n---\n\n## Generic content card\nA bordered surface with a media zone, a body, and an optional footer — a plain presentational component you can drop into prose or feed from a collection template.\n{% /card %}",
|
|
12
|
+
"chart": "{% chart type=\"bar\" title=\"Monthly Revenue\" %}\n| Month | Revenue | Expenses |\n|-------|---------|----------|\n| Jan | 4200 | 3100 |\n| Feb | 5100 | 3400 |\n| Mar | 4800 | 3200 |\n| Apr | 6200 | 3800 |\n{% /chart %}",
|
|
13
|
+
"codegroup": "{% codegroup %}\n```js\nconsole.log('Hello');\n```\n\n```python\nprint('Hello')\n```\n{% /codegroup %}",
|
|
14
|
+
"compare": "{% compare %}\n```javascript\n// Before\nconst x = 1;\nconst y = 2;\n```\n\n```javascript\n// After\nconst [x, y] = [1, 2];\n```\n{% /compare %}",
|
|
15
|
+
"conversation": "{% conversation %}\n> **Alice** — Have you tried the new inspect command?\n\n> **Bob** — Yes! It shows exactly what HTML the identity transform produces. No more guessing which selectors to target.\n\n> **Alice** — The variant expansion is my favorite part. You can see every modifier value at once.\n{% /conversation %}",
|
|
16
|
+
"datatable": "{% datatable sortable=\"Name,Price\" searchable=true pageSize=10 %}\n| Name | Price | Category | Stock |\n|------|-------|----------|-------|\n| Widget A | $9.99 | Tools | 150 |\n| Widget B | $14.99 | Tools | 85 |\n| Gadget X | $24.99 | Electronics | 42 |\n{% /datatable %}",
|
|
17
|
+
"deflist": "{% deflist %}\n- **Priority:** {% badge sentiment=\"caution\" %}high{% /badge %}\n- **Complexity:** moderate\n- **Assignee:** @alice\n- **Milestone:** v0.18\n{% /deflist %}",
|
|
18
|
+
"details": "{% details summary=\"How does billing work?\" %}\nWe bill monthly on the date you signed up. You can cancel anytime\nfrom your account settings.\n{% /details %}",
|
|
19
|
+
"diagram": "{% diagram language=\"mermaid\" title=\"User Flow\" %}\n```mermaid\ngraph TD\n A[Visit Site] --> B{Logged In?}\n B -->|Yes| C[Dashboard]\n B -->|No| D[Login Page]\n D --> E[Sign Up]\n D --> F[Sign In]\n F --> C\n E --> C\n```\n{% /diagram %}",
|
|
20
|
+
"diff": "{% diff mode=\"unified\" language=\"javascript\" %}\n```javascript\nfunction getData() {\n return fetch('/api')\n .then(res => res.json())\n .then(data => data);\n}\n```\n\n```javascript\nasync function getData() {\n const res = await fetch('/api');\n return res.json();\n}\n```\n{% /diff %}",
|
|
21
|
+
"drawer": "{% drawer id=\"auth-system\" title=\"Auth system\" %}\nA short explainer that lives next to wherever it's mentioned, without forcing the reader to navigate away. Code blocks, embedded runes, and rich Markdown all fit naturally in the body.\n{% /drawer %}",
|
|
22
|
+
"embed": "{% embed url=\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" %}\nWatch the video for a full walkthrough.\n{% /embed %}",
|
|
23
|
+
"figure": "{% figure size=\"large\" align=\"center\" caption=\"Dashboard overview\" %}\n\n{% /figure %}",
|
|
24
|
+
"form": "{% form action=\"/api/contact\" method=\"POST\" success=\"Thanks! We'll be in touch.\" %}\n# Contact Us\n\n- Name (required)\n- Email (required, placeholder: \"you@example.com\")\n- Company (optional)\n\n> What are you interested in?\n- Product demo\n- Partnership\n- Support\n- Other\n\n- Message (required)\n\n**Send Message**\n{% /form %}",
|
|
25
|
+
"gallery": "{% gallery %}\n\n\n\n\n\n\n{% /gallery %}",
|
|
26
|
+
"grid": "{% grid %}\n{% card %}\n## Fast\nShips static HTML with zero client runtime.\n{% /card %}\n\n---\n\n{% card %}\n## Flexible\nSwap themes instantly — the same content renders differently.\n{% /card %}\n\n---\n\n{% card %}\n## Portable\nYour content stays plain, portable Markdown.\n{% /card %}\n{% /grid %}",
|
|
27
|
+
"hint": "{% hint type=\"note\" %}\nThis is a helpful note for your readers.\n{% /hint %}",
|
|
28
|
+
"icon": "{% icon name=\"check\" /%}",
|
|
29
|
+
"juxtapose": "{% juxtapose %}\n\n---\n\n{% /juxtapose %}",
|
|
30
|
+
"layout": "{% layout %}\n{% region name=\"header\" %}\n# Site Title\n{% /region %}\n\n{% region name=\"nav\" %}\n{% nav %}\n- getting-started\n- runes\n{% /nav %}\n{% /region %}\n{% /layout %}",
|
|
31
|
+
"mediatext": "{% mediatext align=\"left\" ratio=\"1:1\" %}\n\n\nThe valley stretches out below, carved by millennia of glacial movement. In spring, wildflowers carpet the meadows in brilliant color, attracting hikers and photographers from around the world.\n{% /mediatext %}",
|
|
32
|
+
"nav": "{% nav %}\n## Getting Started\n- getting-started\n- installation\n\n## Guides\n- theming\n- deployment\n{% /nav %}",
|
|
33
|
+
"pagination": "{% pagination prev=\"install\" next=\"configuration\" /%}",
|
|
34
|
+
"progress": "{% progress value=3 max=4 %}Acceptance criteria{% /progress %}",
|
|
35
|
+
"pullquote": "{% pullquote align=\"center\" variant=\"accent\" %}\n> Design is not just what it looks like and feels like. Design is how it works.\n{% /pullquote %}",
|
|
36
|
+
"region": "{% region name=\"nav\" %}\n{% nav %}\n- page-one\n- page-two\n{% /nav %}\n{% /region %}",
|
|
37
|
+
"reveal": "{% reveal %}\n### Step 1: Install the package\nRun the install command to add refrakt.md to your project.\n\n### Step 2: Configure your theme\nSet up the lumina theme in your config file.\n\n### Step 3: Write content\nCreate Markdown files with runes and watch them transform.\n{% /reveal %}",
|
|
38
|
+
"sandbox": "{% sandbox framework=\"tailwind\" %}\n<div class=\"flex items-center gap-4 p-6 bg-white rounded-xl shadow-lg max-w-sm\">\n <img src=\"https://i.pravatar.cc/80\" alt=\"Avatar\" class=\"w-16 h-16 rounded-full\" />\n <div>\n <h3 class=\"text-lg font-semibold text-gray-900\">Jane Doe</h3>\n <p class=\"text-sm text-gray-500\">Product Designer</p>\n </div>\n</div>\n{% /sandbox %}",
|
|
39
|
+
"section": "{% section %}\nComposability\n\n## Runes that work together\nEvery block is a rune — combine them freely to build a page.\n{% /section %}",
|
|
40
|
+
"showcase": "{% showcase shadow=\"soft\" %}\n\n{% /showcase %}",
|
|
41
|
+
"sidenote": "{% sidenote %}\nThis is a margin note that provides additional context\nwithout interrupting the main flow of the text.\n{% /sidenote %}",
|
|
42
|
+
"tabs": "{% tabs %}\n## npm\n\n```shell\nnpm install @refrakt-md/runes\n```\n\n## yarn\n\n```shell\nyarn add @refrakt-md/runes\n```\n{% /tabs %}",
|
|
43
|
+
"textblock": "{% textblock dropcap=true columns=2 %}\nThe invention of the printing press in the 15th century revolutionized the spread of information across Europe. Before Gutenberg, books were painstakingly copied by hand, making them rare and expensive.\n\nWith movable type, ideas could be reproduced quickly and cheaply. This democratization of knowledge helped fuel the Renaissance, the Reformation, and the Scientific Revolution.\n{% /textblock %}",
|
|
44
|
+
"toc": "{% toc depth=3 %}{% /toc %}",
|
|
45
|
+
};
|
|
46
|
+
export const RUNE_FIXTURE_META = {
|
|
47
|
+
"annotate": { "role": "canonical" },
|
|
48
|
+
"badge": { "role": "canonical", "notes": "Inline rune — embed within prose, never as a standalone block (a block paragraph inside the inline span renders invalid)." },
|
|
49
|
+
"bar": { "role": "canonical" },
|
|
50
|
+
"card": { "role": "canonical" },
|
|
51
|
+
"deflist": { "role": "canonical" },
|
|
52
|
+
"drawer": { "role": "canonical" },
|
|
53
|
+
"gallery": { "role": "canonical" },
|
|
54
|
+
"juxtapose": { "role": "canonical" },
|
|
55
|
+
"progress": { "role": "canonical" },
|
|
56
|
+
"reveal": { "role": "canonical" },
|
|
57
|
+
"section": { "role": "canonical" },
|
|
214
58
|
};
|
|
215
59
|
//# sourceMappingURL=examples.js.map
|
package/dist/examples.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examples.js","sourceRoot":"","sources":["../src/examples.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"examples.js","sourceRoot":"","sources":["../src/examples.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,yEAAyE;AAEzE,qFAAqF;AACrF,MAAM,CAAC,MAAM,aAAa,GAA2B;IACpD,WAAW,EAAE,oRAAoR;IACjS,UAAU,EAAE,wYAAwY;IACpZ,OAAO,EAAE,oNAAoN;IAC7N,KAAK,EAAE,0FAA0F;IACjG,YAAY,EAAE,mGAAmG;IACjH,QAAQ,EAAE,2TAA2T;IACrU,MAAM,EAAE,oQAAoQ;IAC5Q,OAAO,EAAE,kQAAkQ;IAC3Q,WAAW,EAAE,wGAAwG;IACrH,SAAS,EAAE,kJAAkJ;IAC7J,cAAc,EAAE,kUAAkU;IAClV,WAAW,EAAE,mRAAmR;IAChS,SAAS,EAAE,8KAA8K;IACzL,SAAS,EA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C,WAAW,EAAC;IAChC,QAAQ,EAAE,EAAC,MAAM,EAAC,WAAW,EAAC;IAC9B,SAAS,EAAE,EAAC,MAAM,EAAC,WAAW,EAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standardised rune-fixture format (SPEC-102). A fixture is the rune's actual
|
|
3
|
+
* Markdoc, with optional YAML frontmatter carrying metadata. This module owns
|
|
4
|
+
* the field schema, the parser, and a validator — shared by the example
|
|
5
|
+
* generator, the loader (`discoverPluginFixtures`), the CI corpus check, and
|
|
6
|
+
* `plugin-validate`.
|
|
7
|
+
*/
|
|
8
|
+
/** The `role` taxonomy (SPEC-102 §3). */
|
|
9
|
+
export declare const FIXTURE_ROLES: readonly ["canonical", "minimal", "rich", "edge-case"];
|
|
10
|
+
export type FixtureRole = (typeof FIXTURE_ROLES)[number];
|
|
11
|
+
/** Known frontmatter fields (SPEC-102 §2). Unknown keys are rejected. */
|
|
12
|
+
export interface FixtureFrontmatter {
|
|
13
|
+
/** The rune this fixture exercises (defaults to the filename's rune segment). */
|
|
14
|
+
rune?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
role?: FixtureRole;
|
|
18
|
+
/** Modifier values this scenario sets — consumed by the gallery variant matrix. */
|
|
19
|
+
attributes?: Record<string, unknown>;
|
|
20
|
+
/** Concepts/features shown, as tags — for docs + AI retrieval. */
|
|
21
|
+
demonstrates?: string[];
|
|
22
|
+
/** Authoring guidance — why this fixture is good (AI few-shot, docs). */
|
|
23
|
+
notes?: string;
|
|
24
|
+
}
|
|
25
|
+
/** A parsed fixture file. */
|
|
26
|
+
export interface ParsedFixture {
|
|
27
|
+
/** Rune key (from `rune` field, else the filename's rune segment). */
|
|
28
|
+
rune: string;
|
|
29
|
+
/** Scenario name from `<rune>.<scenario>.md`, or `'canonical'` for `<rune>.md`. */
|
|
30
|
+
scenario: string;
|
|
31
|
+
/** Validated frontmatter fields. */
|
|
32
|
+
frontmatter: FixtureFrontmatter;
|
|
33
|
+
/** Markdoc body with the frontmatter block stripped. */
|
|
34
|
+
body: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Split a fixture's raw text into its (raw) frontmatter block and body.
|
|
38
|
+
* Returns `frontmatter: null` for bare fixtures (no block) — these stay valid.
|
|
39
|
+
*/
|
|
40
|
+
export declare function splitFixture(raw: string): {
|
|
41
|
+
frontmatter: string | null;
|
|
42
|
+
body: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Derive `{ rune, scenario }` from a fixture filename. `card.md` →
|
|
46
|
+
* `{ rune: 'card', scenario: 'canonical' }`; `card.cover.md` →
|
|
47
|
+
* `{ rune: 'card', scenario: 'cover' }`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function parseFixtureFilename(filename: string): {
|
|
50
|
+
rune: string;
|
|
51
|
+
scenario: string;
|
|
52
|
+
};
|
|
53
|
+
/** A single validation problem (path + message). */
|
|
54
|
+
export interface FixtureIssue {
|
|
55
|
+
path: string;
|
|
56
|
+
message: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Validate a parsed frontmatter object against the field schema. Returns the
|
|
60
|
+
* list of issues (empty when valid): unknown keys and wrong types are rejected.
|
|
61
|
+
*/
|
|
62
|
+
export declare function validateFixtureFrontmatter(fm: Record<string, unknown>): FixtureIssue[];
|
|
63
|
+
/**
|
|
64
|
+
* Parse a fixture file's raw text + filename into a {@link ParsedFixture},
|
|
65
|
+
* throwing on malformed YAML or schema violations. Bare fixtures (no
|
|
66
|
+
* frontmatter) parse with all fields defaulted.
|
|
67
|
+
*/
|
|
68
|
+
export declare function parseFixture(raw: string, filename: string): ParsedFixture;
|
|
69
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG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AAG,YAAY,EAAE,CAsCtF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CA4BzE"}
|
package/dist/fixtures.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import yaml from 'yaml';
|
|
2
|
+
/**
|
|
3
|
+
* Standardised rune-fixture format (SPEC-102). A fixture is the rune's actual
|
|
4
|
+
* Markdoc, with optional YAML frontmatter carrying metadata. This module owns
|
|
5
|
+
* the field schema, the parser, and a validator — shared by the example
|
|
6
|
+
* generator, the loader (`discoverPluginFixtures`), the CI corpus check, and
|
|
7
|
+
* `plugin-validate`.
|
|
8
|
+
*/
|
|
9
|
+
/** The `role` taxonomy (SPEC-102 §3). */
|
|
10
|
+
export const FIXTURE_ROLES = ['canonical', 'minimal', 'rich', 'edge-case'];
|
|
11
|
+
const KNOWN_KEYS = new Set([
|
|
12
|
+
'rune',
|
|
13
|
+
'title',
|
|
14
|
+
'description',
|
|
15
|
+
'role',
|
|
16
|
+
'attributes',
|
|
17
|
+
'demonstrates',
|
|
18
|
+
'notes',
|
|
19
|
+
]);
|
|
20
|
+
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?\r?\n)?---\r?\n?([\s\S]*)$/;
|
|
21
|
+
/**
|
|
22
|
+
* Split a fixture's raw text into its (raw) frontmatter block and body.
|
|
23
|
+
* Returns `frontmatter: null` for bare fixtures (no block) — these stay valid.
|
|
24
|
+
*/
|
|
25
|
+
export function splitFixture(raw) {
|
|
26
|
+
const match = raw.match(FRONTMATTER_RE);
|
|
27
|
+
if (!match)
|
|
28
|
+
return { frontmatter: null, body: raw };
|
|
29
|
+
return { frontmatter: match[1] ?? '', body: match[2] ?? '' };
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Derive `{ rune, scenario }` from a fixture filename. `card.md` →
|
|
33
|
+
* `{ rune: 'card', scenario: 'canonical' }`; `card.cover.md` →
|
|
34
|
+
* `{ rune: 'card', scenario: 'cover' }`.
|
|
35
|
+
*/
|
|
36
|
+
export function parseFixtureFilename(filename) {
|
|
37
|
+
const base = filename.replace(/\.md$/, '');
|
|
38
|
+
const dot = base.indexOf('.');
|
|
39
|
+
if (dot === -1)
|
|
40
|
+
return { rune: base, scenario: 'canonical' };
|
|
41
|
+
return { rune: base.slice(0, dot), scenario: base.slice(dot + 1) };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Validate a parsed frontmatter object against the field schema. Returns the
|
|
45
|
+
* list of issues (empty when valid): unknown keys and wrong types are rejected.
|
|
46
|
+
*/
|
|
47
|
+
export function validateFixtureFrontmatter(fm) {
|
|
48
|
+
const issues = [];
|
|
49
|
+
for (const key of Object.keys(fm)) {
|
|
50
|
+
if (!KNOWN_KEYS.has(key)) {
|
|
51
|
+
issues.push({ path: key, message: `Unknown frontmatter key "${key}"` });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const str = (key) => {
|
|
55
|
+
if (fm[key] !== undefined && typeof fm[key] !== 'string') {
|
|
56
|
+
issues.push({ path: key, message: `Expected a string` });
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
str('rune');
|
|
60
|
+
str('title');
|
|
61
|
+
str('description');
|
|
62
|
+
str('notes');
|
|
63
|
+
if (fm.role !== undefined && !FIXTURE_ROLES.includes(fm.role)) {
|
|
64
|
+
issues.push({ path: 'role', message: `Expected one of ${FIXTURE_ROLES.join(', ')}` });
|
|
65
|
+
}
|
|
66
|
+
if (fm.attributes !== undefined) {
|
|
67
|
+
const a = fm.attributes;
|
|
68
|
+
if (typeof a !== 'object' || a === null || Array.isArray(a)) {
|
|
69
|
+
issues.push({ path: 'attributes', message: 'Expected a mapping of modifier values' });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (fm.demonstrates !== undefined) {
|
|
73
|
+
const d = fm.demonstrates;
|
|
74
|
+
if (!Array.isArray(d) || d.some(item => typeof item !== 'string')) {
|
|
75
|
+
issues.push({ path: 'demonstrates', message: 'Expected an array of strings' });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return issues;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Parse a fixture file's raw text + filename into a {@link ParsedFixture},
|
|
82
|
+
* throwing on malformed YAML or schema violations. Bare fixtures (no
|
|
83
|
+
* frontmatter) parse with all fields defaulted.
|
|
84
|
+
*/
|
|
85
|
+
export function parseFixture(raw, filename) {
|
|
86
|
+
const { rune: fileRune, scenario } = parseFixtureFilename(filename);
|
|
87
|
+
const { frontmatter: rawFm, body } = splitFixture(raw);
|
|
88
|
+
let fm = {};
|
|
89
|
+
if (rawFm !== null && rawFm.trim()) {
|
|
90
|
+
const parsed = yaml.parse(rawFm);
|
|
91
|
+
if (parsed !== null && parsed !== undefined) {
|
|
92
|
+
if (typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
93
|
+
throw new Error(`${filename}: frontmatter must be a YAML mapping`);
|
|
94
|
+
}
|
|
95
|
+
fm = parsed;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const issues = validateFixtureFrontmatter(fm);
|
|
99
|
+
if (issues.length > 0) {
|
|
100
|
+
throw new Error(`${filename}: invalid frontmatter — ${issues.map(i => `${i.path}: ${i.message}`).join('; ')}`);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
rune: typeof fm.rune === 'string' ? fm.rune : fileRune,
|
|
104
|
+
scenario,
|
|
105
|
+
frontmatter: fm,
|
|
106
|
+
body: body.trim(),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;GAMG;AAEH,yCAAyC;AACzC,MAAM,CAAC,MAAM,aAAa,GAAG,CAA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AAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACd,GAAG,QAAQ,2BAA2B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC7F,CAAC;IACH,CAAC;IAED,OAAO;QACN,IAAI,EAAE,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ;QACtD,QAAQ;QACR,WAAW,EAAE,EAAwB;QACrC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;KACjB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,14 @@ export { RenderableNodeCursor } from './lib/renderable.js';
|
|
|
9
9
|
export { createContentModelSchema, createComponentRenderable, asNodes, schemaContentModels, sanitizeSandboxContent } from './lib/index.js';
|
|
10
10
|
export type { DeprecationRule, ContentModelSchemaOptions } from './lib/index.js';
|
|
11
11
|
export { resolve, resolveSequence, resolveDelimited, resolveContentModel, resolveListItems, evaluateCondition, matchesType } from './lib/resolver.js';
|
|
12
|
+
export { registerImageScheme, resolveImageScheme, hasImageScheme } from './lib/image-schemes.js';
|
|
13
|
+
export type { ImageSchemeResolver, ImageSchemeContext } from './lib/image-schemes.js';
|
|
14
|
+
export { resolveIcon, splitIconName } from './lib/icon-resolve.js';
|
|
15
|
+
export type { IconResolveOptions, ResolvedIcon } from './lib/icon-resolve.js';
|
|
16
|
+
export { placeholderSvg, PLACEHOLDER_SHAPES, DEFAULT_PLACEHOLDER_SHAPE } from './lib/placeholder.js';
|
|
17
|
+
export type { PlaceholderOptions } from './lib/placeholder.js';
|
|
18
|
+
export { FIXTURE_ROLES, splitFixture, parseFixtureFilename, validateFixtureFrontmatter, parseFixture, } from './fixtures.js';
|
|
19
|
+
export type { FixtureRole, FixtureFrontmatter, ParsedFixture, FixtureIssue } from './fixtures.js';
|
|
12
20
|
export { parseFieldMatch, matchesFieldMatch, matchesFilterExpr, resolveEntityField } from './field-match.js';
|
|
13
21
|
export type { MatchableEntity, FieldMatchClause, ParsedFieldMatch } from './field-match.js';
|
|
14
22
|
export { DEFERRED_BODY_ATTR, captureDeferredBodies, readDeferredBody, transformDeferredTemplate } from './deferred-body.js';
|
|
@@ -27,7 +35,7 @@ export { Ordering, buildOrdering, sortEntities, groupEntities, groupBy, entityUr
|
|
|
27
35
|
export type { CollectionEmbedConfig } from './collection-helpers.js';
|
|
28
36
|
export { COLLECTION_SENTINEL } from './tags/collection.js';
|
|
29
37
|
export { functions, currency, date, number, join, concat, humanize } from './functions.js';
|
|
30
|
-
export { linkItem, pageSectionProperties, buildLayoutMetas, splitMediaBodyFooter, extractMediaImage, unwrapParagraphImages, name as nameHelper, description as descriptionHelper, SplitablePageSectionModel, SplitLayoutModel, splitLayoutAttributes } from './tags/common.js';
|
|
38
|
+
export { linkItem, pageSectionProperties, buildLayoutMetas, splitMediaBodyFooter, extractMediaImage, unwrapParagraphImages, isMediaNode, isSchemeMediaNode, name as nameHelper, description as descriptionHelper, SplitablePageSectionModel, SplitLayoutModel, splitLayoutAttributes } from './tags/common.js';
|
|
31
39
|
export type { LayoutMetas } from './tags/common.js';
|
|
32
40
|
export { extractHeadings, firstH1, headingsToList } from './util.js';
|
|
33
41
|
export { LANG_MAP, FALLBACK_LANG, inferLanguage } from './lang-map.js';
|
|
@@ -35,12 +43,13 @@ export type { HeadingInfo } from './util.js';
|
|
|
35
43
|
export { extractSeo, collectJsonLd, textContent } from './seo.js';
|
|
36
44
|
export type { PageSeo, OgMeta } from './seo.js';
|
|
37
45
|
export { serialize, serializeTree } from './serialize.js';
|
|
38
|
-
export { RUNE_EXAMPLES } from './examples.js';
|
|
46
|
+
export { RUNE_EXAMPLES, RUNE_FIXTURE_META } from './examples.js';
|
|
47
|
+
export type { RuneFixtureMeta } from './examples.js';
|
|
39
48
|
export { describeRune, renderContentModel, serializeContentModel, stripContentModel, hydrateRuneInfo, hydrateAllRuneInfos, hydrateRuneByName, serializeRune, groupReferenceInfos, renderReferenceMarkdown, EXCLUDED_RUNES, HIDDEN_ATTRIBUTES, } from './reference.js';
|
|
40
49
|
export type { RuneInfo, RuneBasePresetInfo, RuneLike, HydrateOptions, ReferenceContext, ReferenceGroup, RenderReferenceOptions, SerializedAttribute, SerializedRune, SerializedContentModel, SerializedSequenceModel, SerializedSectionsModel, SerializedDelimitedModel, SerializedCustomModel, SerializedContentField, SerializedDelimitedZone, SerializedHeadingExtractField, SerializedKnownSection, } from './reference.js';
|
|
41
50
|
export { registerAttributePreset, lookupAttributePreset, schemaBasePresets, UNIVERSAL_ATTRIBUTE_NAMES, } from './attribute-presets.js';
|
|
42
51
|
export type { AttributePresetMetadata } from './attribute-presets.js';
|
|
43
|
-
export { loadPlugin, mergePlugins, applyAliases, loadLocalRunes, discoverPluginFixtures, assertFileRootNamespaceAllowed } from './plugins.js';
|
|
52
|
+
export { loadPlugin, mergePlugins, applyAliases, loadLocalRunes, discoverPluginFixtures, discoverPluginFixtureManifest, assertFileRootNamespaceAllowed } from './plugins.js';
|
|
44
53
|
export type { LoadedPlugin, MergedPluginResult } from './plugins.js';
|
|
45
54
|
export { coreConfig, baseConfig, corePipelineHooks, createCorePipelineHooks, resolveCoreSentinels, type PageTreeNode, type CorePipelineHooksOptions } from './config.js';
|
|
46
55
|
export { BREADCRUMB_AUTO_SENTINEL } from './tags/breadcrumb.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAiD7C,OAAO,uBAAuB,CAAC;AAE/B,OAAO,2BAA2B,CAAC;AAMn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AE,QAAQ,EACrC,cAAc,EACd,eAAe,EAAE,WAAW,EAC5B,YAAY,EACZ,aAAa,EACb,aAAa,EACb,QAAQ,EAAE,aAAa,EAAE,aAAa,EACtC,cAAc,EACd,oBAAoB,GACpB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,SAAS;;CAErB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkdjB,CAAC;AAEF;;;;;;2BAM2B;AAC3B,eAAO,MAAM,IAAI;;;;;;;kBAxqBkB,CAAC;mBACrB,CAAC;6BAET,CAAA;uBACG,CAAC;;;;;;;;;kBAUF,CAAA;mBAAuB,CAAC;6BAExB,CAAC;uBACO,CAAC;;;;;;;;;kBAUjB,CAAC;mBAAuB,CAAC;6BAEjB,CAAA;uBACF,CAAA;;;;;;;;;kBAWA,CAAC;mBAAuB,CAAC;6BACN,CAAC;uBACc,CAAC;;;;;;;;;kBAaP,CAAC;mBACpC,CAAA;6BAAuE,CAAA;uBAA8C,CAAC;;;;CAmnBrH,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;CAkBjB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -63,6 +63,10 @@ export { Rune, defineRune, runeTagMap } from './rune.js';
|
|
|
63
63
|
export { RenderableNodeCursor } from './lib/renderable.js';
|
|
64
64
|
export { createContentModelSchema, createComponentRenderable, asNodes, schemaContentModels, sanitizeSandboxContent } from './lib/index.js';
|
|
65
65
|
export { resolve, resolveSequence, resolveDelimited, resolveContentModel, resolveListItems, evaluateCondition, matchesType } from './lib/resolver.js';
|
|
66
|
+
export { registerImageScheme, resolveImageScheme, hasImageScheme } from './lib/image-schemes.js';
|
|
67
|
+
export { resolveIcon, splitIconName } from './lib/icon-resolve.js';
|
|
68
|
+
export { placeholderSvg, PLACEHOLDER_SHAPES, DEFAULT_PLACEHOLDER_SHAPE } from './lib/placeholder.js';
|
|
69
|
+
export { FIXTURE_ROLES, splitFixture, parseFixtureFilename, validateFixtureFrontmatter, parseFixture, } from './fixtures.js';
|
|
66
70
|
export { parseFieldMatch, matchesFieldMatch, matchesFilterExpr, resolveEntityField } from './field-match.js';
|
|
67
71
|
export { DEFERRED_BODY_ATTR, captureDeferredBodies, readDeferredBody, transformDeferredTemplate } from './deferred-body.js';
|
|
68
72
|
export { resolveCollections } from './collection-resolve.js';
|
|
@@ -78,15 +82,15 @@ export { hoistPreviewDrawers, registerHoistBuilder, getHoistBuilder, pathToSlug,
|
|
|
78
82
|
export { Ordering, buildOrdering, sortEntities, groupEntities, groupBy, entityUrl, entityTitle, fieldValue, titleLink, projectItem, renderItemTemplate, } from './collection-helpers.js';
|
|
79
83
|
export { COLLECTION_SENTINEL } from './tags/collection.js';
|
|
80
84
|
export { functions, currency, date, number, join, concat, humanize } from './functions.js';
|
|
81
|
-
export { linkItem, pageSectionProperties, buildLayoutMetas, splitMediaBodyFooter, extractMediaImage, unwrapParagraphImages, name as nameHelper, description as descriptionHelper, SplitablePageSectionModel, SplitLayoutModel, splitLayoutAttributes } from './tags/common.js';
|
|
85
|
+
export { linkItem, pageSectionProperties, buildLayoutMetas, splitMediaBodyFooter, extractMediaImage, unwrapParagraphImages, isMediaNode, isSchemeMediaNode, name as nameHelper, description as descriptionHelper, SplitablePageSectionModel, SplitLayoutModel, splitLayoutAttributes } from './tags/common.js';
|
|
82
86
|
export { extractHeadings, firstH1, headingsToList } from './util.js';
|
|
83
87
|
export { LANG_MAP, FALLBACK_LANG, inferLanguage } from './lang-map.js';
|
|
84
88
|
export { extractSeo, collectJsonLd, textContent } from './seo.js';
|
|
85
89
|
export { serialize, serializeTree } from './serialize.js';
|
|
86
|
-
export { RUNE_EXAMPLES } from './examples.js';
|
|
90
|
+
export { RUNE_EXAMPLES, RUNE_FIXTURE_META } from './examples.js';
|
|
87
91
|
export { describeRune, renderContentModel, serializeContentModel, stripContentModel, hydrateRuneInfo, hydrateAllRuneInfos, hydrateRuneByName, serializeRune, groupReferenceInfos, renderReferenceMarkdown, EXCLUDED_RUNES, HIDDEN_ATTRIBUTES, } from './reference.js';
|
|
88
92
|
export { registerAttributePreset, lookupAttributePreset, schemaBasePresets, UNIVERSAL_ATTRIBUTE_NAMES, } from './attribute-presets.js';
|
|
89
|
-
export { loadPlugin, mergePlugins, applyAliases, loadLocalRunes, discoverPluginFixtures, assertFileRootNamespaceAllowed } from './plugins.js';
|
|
93
|
+
export { loadPlugin, mergePlugins, applyAliases, loadLocalRunes, discoverPluginFixtures, discoverPluginFixtureManifest, assertFileRootNamespaceAllowed } from './plugins.js';
|
|
90
94
|
export { coreConfig, baseConfig, corePipelineHooks, createCorePipelineHooks, resolveCoreSentinels } from './config.js';
|
|
91
95
|
export { BREADCRUMB_AUTO_SENTINEL } from './tags/breadcrumb.js';
|
|
92
96
|
export { NAV_AUTO_SENTINEL } from './tags/nav.js';
|