@refrakt-md/cli 0.5.1 → 0.7.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/bin.js +138 -5
- package/dist/bin.js.map +1 -1
- package/dist/commands/contracts.js +1 -1
- package/dist/commands/contracts.js.map +1 -1
- package/dist/commands/edit.d.ts.map +1 -1
- package/dist/commands/edit.js +96 -6
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/extract.d.ts.map +1 -1
- package/dist/commands/extract.js +7 -4
- package/dist/commands/extract.js.map +1 -1
- package/dist/commands/inspect.d.ts +2 -0
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +1 -1
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/package-validate.d.ts +20 -0
- package/dist/commands/package-validate.d.ts.map +1 -0
- package/dist/commands/package-validate.js +307 -0
- package/dist/commands/package-validate.js.map +1 -0
- package/dist/commands/scaffold-css.js +1 -1
- package/dist/commands/scaffold-css.js.map +1 -1
- package/dist/commands/validate.js +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/write.d.ts +3 -1
- package/dist/commands/write.d.ts.map +1 -1
- package/dist/commands/write.js +3 -2
- package/dist/commands/write.js.map +1 -1
- package/dist/extractors/index.d.ts.map +1 -1
- package/dist/extractors/index.js +3 -1
- package/dist/extractors/index.js.map +1 -1
- package/dist/extractors/python-docstring.d.ts +26 -0
- package/dist/extractors/python-docstring.d.ts.map +1 -0
- package/dist/extractors/python-docstring.js +396 -0
- package/dist/extractors/python-docstring.js.map +1 -0
- package/dist/extractors/python.d.ts +17 -2
- package/dist/extractors/python.d.ts.map +1 -1
- package/dist/extractors/python.js +556 -4
- package/dist/extractors/python.js.map +1 -1
- package/dist/lib/fixtures.d.ts.map +1 -1
- package/dist/lib/fixtures.js +0 -210
- package/dist/lib/fixtures.js.map +1 -1
- package/dist/lib/symbol-generator.d.ts +2 -0
- package/dist/lib/symbol-generator.d.ts.map +1 -1
- package/dist/lib/symbol-generator.js +7 -6
- package/dist/lib/symbol-generator.js.map +1 -1
- package/package.json +8 -7
package/dist/lib/fixtures.js
CHANGED
|
@@ -22,90 +22,6 @@ Once your theme is ready, publish it to npm and register it in the theme marketp
|
|
|
22
22
|
## Implementation Notes
|
|
23
23
|
This section contains additional technical details about how the transform pipeline processes rune content. The identity transform reads meta tags, applies BEM classes, and injects structural elements before the content reaches the renderer.
|
|
24
24
|
{% /details %}`,
|
|
25
|
-
api: `{% api method="GET" path="/api/users/:id" auth="Bearer" %}
|
|
26
|
-
Retrieve a single user by their unique identifier.
|
|
27
|
-
|
|
28
|
-
| Parameter | Type | Description |
|
|
29
|
-
|-----------|------|-------------|
|
|
30
|
-
| id | string | The user's unique ID |
|
|
31
|
-
|
|
32
|
-
\`\`\`json
|
|
33
|
-
{
|
|
34
|
-
"id": "usr_123",
|
|
35
|
-
"name": "Alice",
|
|
36
|
-
"email": "alice@example.com"
|
|
37
|
-
}
|
|
38
|
-
\`\`\`
|
|
39
|
-
{% /api %}`,
|
|
40
|
-
recipe: `{% recipe prepTime="PT15M" cookTime="PT30M" servings="4" difficulty="medium" %}
|
|
41
|
-
# Classic Margherita Pizza
|
|
42
|
-
|
|
43
|
-
- 500g bread flour
|
|
44
|
-
- 7g dried yeast
|
|
45
|
-
- 1 tsp salt
|
|
46
|
-
- 300ml warm water
|
|
47
|
-
- San Marzano tomatoes
|
|
48
|
-
- Fresh mozzarella
|
|
49
|
-
- Fresh basil leaves
|
|
50
|
-
|
|
51
|
-
1. Mix flour, yeast, and salt in a large bowl
|
|
52
|
-
2. Add warm water and knead for 10 minutes until smooth
|
|
53
|
-
3. Let the dough rise for 1 hour at room temperature
|
|
54
|
-
4. Shape into rounds and add toppings
|
|
55
|
-
5. Bake at 250°C for 8-10 minutes
|
|
56
|
-
|
|
57
|
-
> For the best crust, preheat your oven with a pizza stone for at least 30 minutes before baking.
|
|
58
|
-
{% /recipe %}`,
|
|
59
|
-
symbol: `{% symbol kind="function" lang="typescript" since="1.2.0" %}
|
|
60
|
-
# createTransform
|
|
61
|
-
|
|
62
|
-
\`\`\`typescript
|
|
63
|
-
function createTransform(config: ThemeConfig): (tree: RendererNode) => RendererNode
|
|
64
|
-
\`\`\`
|
|
65
|
-
|
|
66
|
-
- config — The theme configuration object defining BEM mappings and structural rules
|
|
67
|
-
- Returns a pure transform function that enhances serialized tag trees
|
|
68
|
-
|
|
69
|
-
> Returns a function that walks the serialized tag tree and applies BEM classes, reads meta tags, injects structural elements, and recurses into children.
|
|
70
|
-
{% /symbol %}`,
|
|
71
|
-
event: `{% event date="2026-03-15" endDate="2026-03-17" location="Stockholm, Sweden" url="https://example.com/register" %}
|
|
72
|
-
# Nordic Developer Summit
|
|
73
|
-
|
|
74
|
-
A three-day conference bringing together developers, designers, and product engineers from across the Nordics.
|
|
75
|
-
|
|
76
|
-
- Keynote: The Future of Web Components
|
|
77
|
-
- Workshop: Building Design Systems at Scale
|
|
78
|
-
- Panel: Open Source in Enterprise
|
|
79
|
-
{% /event %}`,
|
|
80
|
-
howto: `{% howto estimatedTime="PT45M" difficulty="easy" %}
|
|
81
|
-
# Set Up a Refrakt Theme
|
|
82
|
-
|
|
83
|
-
- Node.js 20+
|
|
84
|
-
- A code editor
|
|
85
|
-
- Basic CSS knowledge
|
|
86
|
-
|
|
87
|
-
1. Create a new directory for your theme
|
|
88
|
-
2. Run \`npm init\` and add the theme-base dependency
|
|
89
|
-
3. Create your \`theme.config.ts\` extending baseConfig
|
|
90
|
-
4. Write CSS targeting the BEM selectors from \`refrakt inspect\`
|
|
91
|
-
5. Test with \`refrakt inspect --serve\`
|
|
92
|
-
{% /howto %}`,
|
|
93
|
-
hero: `{% hero align="center" %}
|
|
94
|
-
# Build Beautiful Documentation
|
|
95
|
-
From Markdown to pixel-perfect pages in minutes.
|
|
96
|
-
|
|
97
|
-
- [Get Started](/docs)
|
|
98
|
-
- [View on GitHub](https://github.com)
|
|
99
|
-
{% /hero %}`,
|
|
100
|
-
feature: `{% feature %}
|
|
101
|
-
# Why Refrakt
|
|
102
|
-
|
|
103
|
-
Runes reinterpret standard Markdown — same syntax, richer meaning.
|
|
104
|
-
|
|
105
|
-
- **Fast** — Static generation, zero runtime JavaScript
|
|
106
|
-
- **Flexible** — 43+ runes, infinite combinations
|
|
107
|
-
- **Themeable** — Full control over every element
|
|
108
|
-
{% /feature %}`,
|
|
109
25
|
grid: `{% grid %}
|
|
110
26
|
First column content with enough text to demonstrate layout behavior.
|
|
111
27
|
|
|
@@ -122,16 +38,6 @@ Third column content completing the three-column grid layout example.
|
|
|
122
38
|
|
|
123
39
|
A panoramic view of the Norwegian fjords at sunset, captured from the summit of Trolltunga.
|
|
124
40
|
{% /figure %}`,
|
|
125
|
-
steps: `{% steps %}
|
|
126
|
-
# Install dependencies
|
|
127
|
-
Run \`npm install @refrakt-md/cli\` to add the CLI to your project.
|
|
128
|
-
|
|
129
|
-
# Create content
|
|
130
|
-
Write your first Markdown file using rune tags for rich components.
|
|
131
|
-
|
|
132
|
-
# Build and preview
|
|
133
|
-
Run \`npm run dev\` to start the development server and see your content rendered.
|
|
134
|
-
{% /steps %}`,
|
|
135
41
|
tabs: `{% tabs %}
|
|
136
42
|
# JavaScript
|
|
137
43
|
\`\`\`js
|
|
@@ -151,57 +57,6 @@ greeting = "Hello, world!"
|
|
|
151
57
|
print(greeting)
|
|
152
58
|
\`\`\`
|
|
153
59
|
{% /tabs %}`,
|
|
154
|
-
pricing: `{% pricing %}
|
|
155
|
-
# Choose Your Plan
|
|
156
|
-
Select the plan that best fits your needs.
|
|
157
|
-
|
|
158
|
-
{% tier name="Starter" price="Free" %}
|
|
159
|
-
- Up to 3 projects
|
|
160
|
-
- Community support
|
|
161
|
-
- Basic themes
|
|
162
|
-
{% /tier %}
|
|
163
|
-
|
|
164
|
-
{% tier name="Pro" price="$29/mo" featured="true" %}
|
|
165
|
-
- Unlimited projects
|
|
166
|
-
- Priority support
|
|
167
|
-
- All themes
|
|
168
|
-
- Custom domains
|
|
169
|
-
{% /tier %}
|
|
170
|
-
|
|
171
|
-
{% tier name="Enterprise" price="Custom" %}
|
|
172
|
-
- Everything in Pro
|
|
173
|
-
- SSO & SAML
|
|
174
|
-
- Dedicated support
|
|
175
|
-
- SLA guarantee
|
|
176
|
-
{% /tier %}
|
|
177
|
-
{% /pricing %}`,
|
|
178
|
-
changelog: `{% changelog %}
|
|
179
|
-
## 1.2.0 — 2026-02-15
|
|
180
|
-
- **Added** Inspect command for theme developers
|
|
181
|
-
- **Added** Selector extraction from transformed trees
|
|
182
|
-
- **Fixed** BEM class ordering for nested runes
|
|
183
|
-
|
|
184
|
-
## 1.1.0 — 2026-01-20
|
|
185
|
-
- **Added** Context-aware modifiers
|
|
186
|
-
- **Changed** Improved meta tag consumption logic
|
|
187
|
-
{% /changelog %}`,
|
|
188
|
-
testimonial: `{% testimonial %}
|
|
189
|
-
> Refrakt transformed how we write documentation. The rune system means our content authors write Markdown while our designers have full control over the output.
|
|
190
|
-
|
|
191
|
-
**Sarah Chen** — Head of Developer Experience at Acme Corp
|
|
192
|
-
|
|
193
|
-

|
|
194
|
-
{% /testimonial %}`,
|
|
195
|
-
timeline: `{% timeline %}
|
|
196
|
-
## 2024 — Project Inception
|
|
197
|
-
Initial prototype exploring Markdoc extensions for component-rich content.
|
|
198
|
-
|
|
199
|
-
## 2025 — Open Source Launch
|
|
200
|
-
First public release with 20 runes and the Lumina theme.
|
|
201
|
-
|
|
202
|
-
## 2026 — Theme Ecosystem
|
|
203
|
-
Launch of the theme marketplace and inspect tooling for developers.
|
|
204
|
-
{% /timeline %}`,
|
|
205
60
|
conversation: `{% conversation %}
|
|
206
61
|
> **Alice** — Have you tried the new inspect command?
|
|
207
62
|
|
|
@@ -209,29 +64,6 @@ Launch of the theme marketplace and inspect tooling for developers.
|
|
|
209
64
|
|
|
210
65
|
> **Alice** — The variant expansion is my favorite part. You can see every modifier value at once.
|
|
211
66
|
{% /conversation %}`,
|
|
212
|
-
comparison: `{% comparison %}
|
|
213
|
-
# React
|
|
214
|
-
- **Learning Curve** — Moderate
|
|
215
|
-
- **Bundle Size** — ~40kb
|
|
216
|
-
- **Reactivity** — Virtual DOM
|
|
217
|
-
- ~~Server Components~~ — Experimental
|
|
218
|
-
|
|
219
|
-
# Svelte
|
|
220
|
-
- **Learning Curve** — Easy
|
|
221
|
-
- **Bundle Size** — ~5kb
|
|
222
|
-
- **Reactivity** — Compile-time
|
|
223
|
-
- **Server Components** — Native
|
|
224
|
-
{% /comparison %}`,
|
|
225
|
-
storyboard: `{% storyboard style="clean" columns="3" %}
|
|
226
|
-

|
|
227
|
-
The hero surveys the landscape from atop the hill.
|
|
228
|
-
|
|
229
|
-

|
|
230
|
-
A distant rumble echoes across the valley.
|
|
231
|
-
|
|
232
|
-

|
|
233
|
-
The journey begins.
|
|
234
|
-
{% /storyboard %}`,
|
|
235
67
|
sidenote: `{% sidenote style="sidenote" %}
|
|
236
68
|
This is a margin note that appears alongside the main content, providing additional context without interrupting the reading flow.
|
|
237
69
|
{% /sidenote %}`,
|
|
@@ -272,48 +104,6 @@ const config = {
|
|
|
272
104
|
|
|
273
105
|
**Submit**
|
|
274
106
|
{% /form %}`,
|
|
275
|
-
cast: `{% cast %}
|
|
276
|
-
- **Alice Chen** — Lead Engineer
|
|
277
|
-
- **Bob Martinez** — Product Designer
|
|
278
|
-
- **Carol Kim** — Engineering Manager
|
|
279
|
-
{% /cast %}`,
|
|
280
|
-
bento: `{% bento %}
|
|
281
|
-
# Main Feature
|
|
282
|
-
The primary showcase area with plenty of room for a detailed description.
|
|
283
|
-
|
|
284
|
-
## Secondary Feature
|
|
285
|
-
A supporting feature with moderate space.
|
|
286
|
-
|
|
287
|
-
## Another Feature
|
|
288
|
-
More supporting content.
|
|
289
|
-
|
|
290
|
-
### Small Detail
|
|
291
|
-
A compact cell.
|
|
292
|
-
|
|
293
|
-
### Small Detail
|
|
294
|
-
Another compact cell.
|
|
295
|
-
{% /bento %}`,
|
|
296
|
-
palette: `{% palette title="Brand Colors" %}
|
|
297
|
-
- Primary: #2563EB
|
|
298
|
-
- Secondary: #7C3AED
|
|
299
|
-
- Accent: #F59E0B
|
|
300
|
-
- Success: #10B981
|
|
301
|
-
- Error: #EF4444
|
|
302
|
-
{% /palette %}`,
|
|
303
|
-
typography: `{% typography title="Type Scale" %}
|
|
304
|
-
- Display: Inter (400, 600, 700)
|
|
305
|
-
- Body: Inter (400, 500)
|
|
306
|
-
- Mono: JetBrains Mono (400, 500)
|
|
307
|
-
{% /typography %}`,
|
|
308
|
-
spacing: `{% spacing title="Spacing Scale" %}
|
|
309
|
-
# Spacing
|
|
310
|
-
- xs: 4px
|
|
311
|
-
- sm: 8px
|
|
312
|
-
- md: 16px
|
|
313
|
-
- lg: 24px
|
|
314
|
-
- xl: 32px
|
|
315
|
-
- 2xl: 48px
|
|
316
|
-
{% /spacing %}`,
|
|
317
107
|
};
|
|
318
108
|
/** Get a fixture for a rune, with optional attribute overrides applied to the source */
|
|
319
109
|
export function getFixture(runeName, attrOverrides) {
|
package/dist/lib/fixtures.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../src/lib/fixtures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC/C,IAAI,EAAE;;YAEK;IAEX,SAAS,EAAE;;;;;;;;;iBASK;IAEhB,OAAO,EAAE;;;eAGK;IAEd,
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../src/lib/fixtures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA2B;IAC/C,IAAI,EAAE;;YAEK;IAEX,SAAS,EAAE;;;;;;;;;iBASK;IAEhB,OAAO,EAAE;;;eAGK;IAEd,IAAI,EAAE;;;;;;;;;;YAUK;IAEX,MAAM,EAAE;;;;cAIK;IAEb,IAAI,EAAE;;;;;;;;;;;;;;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AU,CAAC,CAAC;QAC9D,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAClC,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACP,oBAAoB;YACpB,UAAU,GAAG,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,KAAK,KAAK,IAAI,CAAC;QAC3D,CAAC;IACF,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -4,6 +4,8 @@ export interface GeneratorOptions {
|
|
|
4
4
|
headingLevel?: number;
|
|
5
5
|
/** Whether to include frontmatter (default: true) */
|
|
6
6
|
frontmatter?: boolean;
|
|
7
|
+
/** Language for code fences and symbol tag (default: 'typescript') */
|
|
8
|
+
lang?: string;
|
|
7
9
|
}
|
|
8
10
|
/** Convert camelCase/PascalCase to kebab-case for file slugs */
|
|
9
11
|
export declare function toSlug(name: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-generator.d.ts","sourceRoot":"","sources":["../../src/lib/symbol-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAgD,MAAM,wBAAwB,CAAC;AAEtG,MAAM,WAAW,gBAAgB;IAChC,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"symbol-generator.d.ts","sourceRoot":"","sources":["../../src/lib/symbol-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAgD,MAAM,wBAAwB,CAAC;AAEtG,MAAM,WAAW,gBAAgB;IAChC,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAQD,gEAAgE;AAChE,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK3C;AAoED,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAoIzF;AAED,mFAAmF;AACnF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAcvF"}
|
|
@@ -30,14 +30,14 @@ function formatChildParameter(param) {
|
|
|
30
30
|
const desc = param.description ? ` -- ${param.description}` : '';
|
|
31
31
|
return ` - **${param.name}** \`${param.type}\`${optionalMark}${desc}${defaultMark}`;
|
|
32
32
|
}
|
|
33
|
-
function writeMember(lines, member, memberLevel) {
|
|
33
|
+
function writeMember(lines, member, memberLevel, lang = 'typescript') {
|
|
34
34
|
lines.push(heading(memberLevel, member.name));
|
|
35
35
|
lines.push('');
|
|
36
36
|
if (member.description) {
|
|
37
37
|
lines.push(member.description);
|
|
38
38
|
lines.push('');
|
|
39
39
|
}
|
|
40
|
-
lines.push(
|
|
40
|
+
lines.push(`\`\`\`${lang}`);
|
|
41
41
|
lines.push(member.signature);
|
|
42
42
|
lines.push('```');
|
|
43
43
|
lines.push('');
|
|
@@ -81,8 +81,9 @@ export function generateSymbolMarkdown(doc, options) {
|
|
|
81
81
|
lines.push('');
|
|
82
82
|
}
|
|
83
83
|
// Opening tag
|
|
84
|
+
const lang = options?.lang ?? 'typescript';
|
|
84
85
|
const attrs = [`kind="${doc.kind}"`];
|
|
85
|
-
attrs.push(`lang="
|
|
86
|
+
attrs.push(`lang="${lang}"`);
|
|
86
87
|
if (doc.since)
|
|
87
88
|
attrs.push(`since="${doc.since}"`);
|
|
88
89
|
if (doc.deprecated)
|
|
@@ -105,7 +106,7 @@ export function generateSymbolMarkdown(doc, options) {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
// Type signature
|
|
108
|
-
lines.push(
|
|
109
|
+
lines.push(`\`\`\`${lang}`);
|
|
109
110
|
lines.push(doc.signature);
|
|
110
111
|
lines.push('```');
|
|
111
112
|
lines.push('');
|
|
@@ -158,7 +159,7 @@ export function generateSymbolMarkdown(doc, options) {
|
|
|
158
159
|
lines.push(member.description);
|
|
159
160
|
lines.push('');
|
|
160
161
|
}
|
|
161
|
-
lines.push(
|
|
162
|
+
lines.push(`\`\`\`${lang}`);
|
|
162
163
|
lines.push(member.signature);
|
|
163
164
|
lines.push('```');
|
|
164
165
|
lines.push('');
|
|
@@ -176,7 +177,7 @@ export function generateSymbolMarkdown(doc, options) {
|
|
|
176
177
|
}
|
|
177
178
|
else {
|
|
178
179
|
for (const member of group.members) {
|
|
179
|
-
writeMember(lines, member, memberLevel);
|
|
180
|
+
writeMember(lines, member, memberLevel, lang);
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-generator.js","sourceRoot":"","sources":["../../src/lib/symbol-generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol-generator.js","sourceRoot":"","sources":["../../src/lib/symbol-generator.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,GAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEnE,SAAS,WAAW,CAAC,IAAgB;IACpC,OAAO,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,MAAM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AC,CAAC;gBAC/C,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAED,cAAc;IACd,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC5B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,2BAA2B,CAAC,IAAiB,EAAE,QAAgB;IAC9E,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,UAAU,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7C,KAAK,CAAC,IAAI,CAAC,gBAAgB,UAAU,CAAC,qBAAqB,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1E,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/cli",
|
|
3
3
|
"description": "CLI tools for refrakt.md",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -25,12 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@markdoc/markdoc": "0.4.0",
|
|
28
|
-
"@refrakt-md/ai": "0.
|
|
29
|
-
"@refrakt-md/editor": "0.
|
|
30
|
-
"@refrakt-md/runes": "0.
|
|
31
|
-
"@refrakt-md/
|
|
32
|
-
"@refrakt-md/transform": "0.5.1",
|
|
28
|
+
"@refrakt-md/ai": "0.7.0",
|
|
29
|
+
"@refrakt-md/editor": "0.7.0",
|
|
30
|
+
"@refrakt-md/runes": "0.7.0",
|
|
31
|
+
"@refrakt-md/transform": "0.7.0",
|
|
33
32
|
"postcss": "^8.4.0",
|
|
34
|
-
"
|
|
33
|
+
"tree-sitter-wasms": "^0.1.13",
|
|
34
|
+
"typescript": "^5.4.0",
|
|
35
|
+
"web-tree-sitter": "^0.24.7"
|
|
35
36
|
}
|
|
36
37
|
}
|