@refrakt-md/docs 0.7.2 → 0.8.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/dist/index.js +1 -1
- package/dist/tags/api.d.ts.map +1 -1
- package/dist/tags/api.js +20 -36
- package/dist/tags/api.js.map +1 -1
- package/dist/tags/changelog.d.ts.map +1 -1
- package/dist/tags/changelog.js +35 -57
- package/dist/tags/changelog.js.map +1 -1
- package/dist/tags/symbol.d.ts.map +1 -1
- package/dist/tags/symbol.js +93 -116
- package/dist/tags/symbol.js.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
package/dist/tags/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/tags/api.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/tags/api.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAQvC,eAAO,MAAM,GAAG,gBAoCd,CAAC"}
|
package/dist/tags/api.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
1
|
import Markdoc from '@markdoc/markdoc';
|
|
11
2
|
const { Tag } = Markdoc;
|
|
12
|
-
import {
|
|
3
|
+
import { createContentModelSchema, createComponentRenderable, asNodes, RenderableNodeCursor } from '@refrakt-md/runes';
|
|
13
4
|
import { schema } from '../types.js';
|
|
14
5
|
const methodType = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
export const api = createContentModelSchema({
|
|
7
|
+
attributes: {
|
|
8
|
+
method: { type: String, required: false, matches: methodType.slice() },
|
|
9
|
+
path: { type: String, required: true },
|
|
10
|
+
auth: { type: String, required: false },
|
|
11
|
+
},
|
|
12
|
+
contentModel: {
|
|
13
|
+
type: 'sequence',
|
|
14
|
+
fields: [
|
|
15
|
+
{ name: 'body', match: 'any', optional: true, greedy: true },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
transform(resolved, attrs, config) {
|
|
19
|
+
const children = new RenderableNodeCursor(Markdoc.transform(asNodes(resolved.body), config));
|
|
20
|
+
const methodMeta = new Tag('meta', { content: attrs.method ?? 'GET' });
|
|
21
|
+
const pathMeta = new Tag('meta', { content: attrs.path ?? '' });
|
|
22
|
+
const authMeta = new Tag('meta', { content: attrs.auth ?? '' });
|
|
26
23
|
const bodyDiv = children.wrap('div');
|
|
27
24
|
return createComponentRenderable(schema.Api, {
|
|
28
25
|
tag: 'article',
|
|
@@ -36,19 +33,6 @@ class ApiModel extends Model {
|
|
|
36
33
|
},
|
|
37
34
|
children: [methodMeta, pathMeta, authMeta, bodyDiv.next()],
|
|
38
35
|
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
__decorate([
|
|
42
|
-
attribute({ type: String, required: false, matches: methodType.slice() }),
|
|
43
|
-
__metadata("design:type", Object)
|
|
44
|
-
], ApiModel.prototype, "method", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
attribute({ type: String, required: true }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], ApiModel.prototype, "path", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
attribute({ type: String, required: false }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], ApiModel.prototype, "auth", void 0);
|
|
53
|
-
export const api = createSchema(ApiModel);
|
|
36
|
+
},
|
|
37
|
+
});
|
|
54
38
|
//# sourceMappingURL=api.js.map
|
package/dist/tags/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/tags/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/tags/api.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAEzF,MAAM,CAAC,MAAM,GAAG,GAAG,wBAAwB,CAAC;IAC3C,UAAU,EAAE;QACX,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE;QACtE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/tags/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/tags/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAmCvC,eAAO,MAAM,gBAAgB,gBAAsC,CAAC;AAEpE,eAAO,MAAM,SAAS,gBAiEpB,CAAC"}
|
package/dist/tags/changelog.js
CHANGED
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import Markdoc from '@markdoc/markdoc';
|
|
11
11
|
const { Ast, Tag } = Markdoc;
|
|
12
|
-
import { attribute,
|
|
12
|
+
import { attribute, Model, createComponentRenderable, createContentModelSchema, createSchema, asNodes, RenderableNodeCursor, pageSectionProperties } from '@refrakt-md/runes';
|
|
13
13
|
import { schema } from '../types.js';
|
|
14
14
|
// Parse "v2.1.0 - 2024-01-15" or "0.1.0 — January 2024"
|
|
15
15
|
const VERSION_DATE_PATTERN = /^v?([\d.]+(?:-[\w.]+)?)\s*[-–—]\s*(.+)$/;
|
|
@@ -44,78 +44,56 @@ __decorate([
|
|
|
44
44
|
attribute({ type: String, required: false }),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
46
|
], ChangelogReleaseModel.prototype, "date", void 0);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
export const changelogRelease = createSchema(ChangelogReleaseModel);
|
|
48
|
+
export const changelog = createContentModelSchema({
|
|
49
|
+
attributes: {
|
|
50
|
+
project: { type: String, required: false },
|
|
51
|
+
},
|
|
52
|
+
contentModel: () => ({
|
|
53
|
+
type: 'sections',
|
|
54
|
+
sectionHeading: 'heading',
|
|
55
|
+
fields: [
|
|
56
|
+
{ name: 'header', match: 'heading|paragraph', optional: true, greedy: true },
|
|
57
|
+
{ name: 'items', match: 'tag', optional: true, greedy: true },
|
|
58
|
+
],
|
|
59
|
+
sectionModel: {
|
|
60
|
+
type: 'sequence',
|
|
61
|
+
fields: [{ name: 'body', match: 'any', optional: true, greedy: true }],
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
transform(resolved, attrs, config) {
|
|
65
|
+
const headerNodes = new RenderableNodeCursor(Markdoc.transform(asNodes(resolved.header), config));
|
|
66
|
+
const projectMeta = new Tag('meta', { content: attrs.project ?? '' });
|
|
67
|
+
// Convert resolved sections to changelog-release tag nodes
|
|
68
|
+
const sections = resolved.sections;
|
|
69
|
+
const releaseTagNodes = sections.map((section) => {
|
|
70
|
+
const headingText = section.$heading;
|
|
68
71
|
const match = headingText.match(VERSION_DATE_PATTERN);
|
|
69
72
|
const version = match ? match[1].trim() : headingText;
|
|
70
73
|
const date = match ? match[2].trim() : '';
|
|
71
|
-
return new Ast.Node('tag', { version, date },
|
|
74
|
+
return new Ast.Node('tag', { version, date }, asNodes(section.body), 'changelog-release');
|
|
72
75
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return super.processChildren(this.convertHeadings(nodes));
|
|
78
|
-
}
|
|
79
|
-
transform() {
|
|
80
|
-
const header = this.header.transform();
|
|
81
|
-
const itemStream = this.itemgroup.transform();
|
|
82
|
-
const projectMeta = new Tag('meta', { content: this.project });
|
|
83
|
-
const releases = itemStream.tag('section').typeof('ChangelogRelease');
|
|
76
|
+
// Combine explicit child tags (preamble items) with heading-derived releases
|
|
77
|
+
const allReleases = [...asNodes(resolved.items), ...releaseTagNodes];
|
|
78
|
+
const sectionNodes = new RenderableNodeCursor(Markdoc.transform(allReleases, config));
|
|
79
|
+
const releases = sectionNodes.tag('section').typeof('ChangelogRelease');
|
|
84
80
|
const releasesDiv = new Tag('div', {}, releases.toArray());
|
|
85
81
|
const children = [projectMeta];
|
|
86
|
-
if (
|
|
87
|
-
children.push(
|
|
82
|
+
if (headerNodes.count() > 0) {
|
|
83
|
+
children.push(headerNodes.wrap('header').next());
|
|
88
84
|
}
|
|
89
85
|
children.push(releasesDiv);
|
|
90
86
|
return createComponentRenderable(schema.Changelog, {
|
|
91
87
|
tag: 'section',
|
|
92
88
|
property: 'contentSection',
|
|
93
89
|
properties: {
|
|
94
|
-
...pageSectionProperties(
|
|
90
|
+
...pageSectionProperties(headerNodes),
|
|
95
91
|
project: projectMeta,
|
|
96
92
|
release: releases,
|
|
97
93
|
},
|
|
98
94
|
refs: { releases: releasesDiv },
|
|
99
95
|
children,
|
|
100
96
|
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
__decorate([
|
|
104
|
-
attribute({ type: Number, required: false }),
|
|
105
|
-
__metadata("design:type", Object)
|
|
106
|
-
], ChangelogModel.prototype, "headingLevel", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
attribute({ type: String, required: false }),
|
|
109
|
-
__metadata("design:type", String)
|
|
110
|
-
], ChangelogModel.prototype, "project", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
group({ include: ['heading', 'paragraph'] }),
|
|
113
|
-
__metadata("design:type", NodeStream)
|
|
114
|
-
], ChangelogModel.prototype, "header", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
group({ include: ['tag'] }),
|
|
117
|
-
__metadata("design:type", NodeStream)
|
|
118
|
-
], ChangelogModel.prototype, "itemgroup", void 0);
|
|
119
|
-
export const changelogRelease = createSchema(ChangelogReleaseModel);
|
|
120
|
-
export const changelog = createSchema(ChangelogModel);
|
|
97
|
+
},
|
|
98
|
+
});
|
|
121
99
|
//# sourceMappingURL=changelog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/tags/changelog.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/tags/changelog.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,YAAY,EAAE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC9K,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,wDAAwD;AACxD,MAAM,oBAAoB,GAAG,yCAAyC,CAAC;AAEvE,MAAM,qBAAsB,SAAQ,KAAK;IAAzC;;QAEC,YAAO,GAAW,EAAE,CAAC;QAGrB,SAAI,GAAW,EAAE,CAAC;IAmBnB,CAAC;IAjBA,SAAS;QACR,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACrD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAElD,OAAO,yBAAyB,CAAC,MAAM,CAAC,gBAAgB,EAAE;YACzD,GAAG,EAAE,SAAS;Y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SAAS,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACxE,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QAE3D,MAAM,QAAQ,GAAU,CAAC,WAAW,CAAC,CAAC;QACtC,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAClD,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAE3B,OAAO,yBAAyB,CAAC,MAAM,CAAC,SAAS,EAAE;YAClD,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,gBAAgB;YAC1B,UAAU,EAAE;gBACX,GAAG,qBAAqB,CAAC,WAAW,CAAC;gBACrC,OAAO,EAAE,WAAW;gBACpB,OAAO,EAAE,QAAQ;aACjB;YACD,IAAI,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;YAC/B,QAAQ;SACR,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../src/tags/symbol.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../src/tags/symbol.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAWvC,eAAO,MAAM,YAAY,gBA4BvB,CAAC;AAIH,eAAO,MAAM,WAAW,gBAuCtB,CAAC;AASH,eAAO,MAAM,MAAM,gBAsFjB,CAAC"}
|
package/dist/tags/symbol.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
1
|
import Markdoc from '@markdoc/markdoc';
|
|
11
2
|
const { Ast, Tag } = Markdoc;
|
|
12
|
-
import {
|
|
3
|
+
import { createContentModelSchema, createComponentRenderable, asNodes, resolveSequence, RenderableNodeCursor, pageSectionProperties, headingsToList } from '@refrakt-md/runes';
|
|
13
4
|
import { schema } from '../types.js';
|
|
14
5
|
// Kinds that use group/member heading structure
|
|
15
6
|
const GROUP_KINDS = ['class', 'interface', 'module'];
|
|
16
7
|
// ─── SymbolMember ────────────────────────────────────────────────
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
export const symbolMember = createContentModelSchema({
|
|
9
|
+
attributes: {},
|
|
10
|
+
contentModel: {
|
|
11
|
+
type: 'sequence',
|
|
12
|
+
fields: [
|
|
13
|
+
{ name: 'body', match: 'any', greedy: true, optional: true },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
transform(resolved, _attrs, config) {
|
|
17
|
+
const children = new RenderableNodeCursor(Markdoc.transform(asNodes(resolved.body), config));
|
|
20
18
|
const nameHeading = children.headings().limit(1);
|
|
21
19
|
const hasName = nameHeading.count() > 0;
|
|
22
20
|
const nameTag = new Tag('h4', {}, hasName ? nameHeading.next().children : []);
|
|
@@ -31,32 +29,29 @@ class SymbolMemberModel extends Model {
|
|
|
31
29
|
},
|
|
32
30
|
children: [nameTag, body.next()],
|
|
33
31
|
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export const symbolMember = createSchema(SymbolMemberModel);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
37
34
|
// ─── SymbolGroup ─────────────────────────────────────────────────
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
transform() {
|
|
59
|
-
const children = this.transformChildren();
|
|
35
|
+
export const symbolGroup = createContentModelSchema({
|
|
36
|
+
attributes: {},
|
|
37
|
+
contentModel: {
|
|
38
|
+
type: 'custom',
|
|
39
|
+
description: 'Converts headings at h4 level to symbol-member tags',
|
|
40
|
+
processChildren(nodes) {
|
|
41
|
+
const level = 4;
|
|
42
|
+
const converted = headingsToList({ level })(nodes);
|
|
43
|
+
const n = converted.length - 1;
|
|
44
|
+
if (!converted[n] || converted[n].type !== 'list')
|
|
45
|
+
return nodes;
|
|
46
|
+
const tags = converted[n].children.map(item => {
|
|
47
|
+
return new Ast.Node('tag', {}, item.children, 'symbol-member');
|
|
48
|
+
});
|
|
49
|
+
converted.splice(n, 1, ...tags);
|
|
50
|
+
return converted;
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
transform(resolved, _attrs, config) {
|
|
54
|
+
const children = new RenderableNodeCursor(Markdoc.transform(resolved.children, config));
|
|
60
55
|
const labelHeading = children.headings().limit(1);
|
|
61
56
|
const hasLabel = labelHeading.count() > 0;
|
|
62
57
|
const labelTag = new Tag('h3', {}, hasLabel ? labelHeading.next().children : []);
|
|
@@ -71,50 +66,65 @@ class SymbolGroupModel extends Model {
|
|
|
71
66
|
},
|
|
72
67
|
children: [labelTag, body.next()],
|
|
73
68
|
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
__decorate([
|
|
77
|
-
attribute({ type: Number, required: false }),
|
|
78
|
-
__metadata("design:type", Number)
|
|
79
|
-
], SymbolGroupModel.prototype, "headingLevel", void 0);
|
|
80
|
-
export const symbolGroup = createSchema(SymbolGroupModel);
|
|
69
|
+
},
|
|
70
|
+
});
|
|
81
71
|
// ─── Symbol (main) ───────────────────────────────────────────────
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
72
|
+
const headerBodyFields = [
|
|
73
|
+
{ name: 'header', match: 'heading|paragraph|image', greedy: true, optional: true },
|
|
74
|
+
{ name: 'body', match: 'heading|paragraph|fence|list|blockquote|tag|hr|table', greedy: true, optional: true },
|
|
75
|
+
];
|
|
76
|
+
export const symbol = createContentModelSchema({
|
|
77
|
+
attributes: {
|
|
78
|
+
kind: { type: String, required: false, matches: ['function', 'class', 'interface', 'enum', 'type', 'module', 'hook', 'component'], default: 'function' },
|
|
79
|
+
lang: { type: String, required: false, default: 'typescript' },
|
|
80
|
+
since: { type: String, required: false, default: '' },
|
|
81
|
+
deprecated: { type: String, required: false, default: '' },
|
|
82
|
+
source: { type: String, required: false, default: '' },
|
|
83
|
+
},
|
|
84
|
+
contentModel: (attrs) => {
|
|
85
|
+
if (GROUP_KINDS.includes(attrs.kind)) {
|
|
86
|
+
return {
|
|
87
|
+
type: 'custom',
|
|
88
|
+
description: 'Converts headings to symbol-group tags for group-kind symbols',
|
|
89
|
+
processChildren(nodes) {
|
|
90
|
+
const converted = headingsToList({ level: 3 })(nodes);
|
|
91
|
+
const n = converted.length - 1;
|
|
92
|
+
if (!converted[n] || converted[n].type !== 'list')
|
|
93
|
+
return nodes;
|
|
94
|
+
const tags = converted[n].children.map(item => {
|
|
95
|
+
return new Ast.Node('tag', {}, item.children, 'symbol-group');
|
|
96
|
+
});
|
|
97
|
+
converted.splice(n, 1, ...tags);
|
|
98
|
+
// Resolve the header/body split from the converted children
|
|
99
|
+
return converted;
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
type: 'sequence',
|
|
105
|
+
fields: headerBodyFields,
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
transform(resolved, attrs, config) {
|
|
109
|
+
// When using custom model, resolved.children has the converted nodes — split manually
|
|
110
|
+
let headerAstNodes;
|
|
111
|
+
let bodyAstNodes;
|
|
112
|
+
if (resolved.children) {
|
|
113
|
+
const inner = resolveSequence(resolved.children, headerBodyFields);
|
|
114
|
+
headerAstNodes = asNodes(inner.header);
|
|
115
|
+
bodyAstNodes = asNodes(inner.body);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
headerAstNodes = asNodes(resolved.header);
|
|
119
|
+
bodyAstNodes = asNodes(resolved.body);
|
|
120
|
+
}
|
|
121
|
+
const header = new RenderableNodeCursor(Markdoc.transform(headerAstNodes, config));
|
|
122
|
+
const bodyStream = new RenderableNodeCursor(Markdoc.transform(bodyAstNodes, config));
|
|
123
|
+
const kindMeta = new Tag('meta', { content: attrs.kind });
|
|
124
|
+
const langMeta = new Tag('meta', { content: attrs.lang });
|
|
125
|
+
const sinceMeta = new Tag('meta', { content: attrs.since });
|
|
126
|
+
const deprecatedMeta = new Tag('meta', { content: attrs.deprecated });
|
|
127
|
+
const sourceMeta = new Tag('meta', { content: attrs.source });
|
|
118
128
|
const bodyDiv = bodyStream.wrap('div');
|
|
119
129
|
const children = [kindMeta, langMeta, sinceMeta, deprecatedMeta, sourceMeta];
|
|
120
130
|
if (header.count() > 0) {
|
|
@@ -137,39 +147,6 @@ class SymbolModel extends Model {
|
|
|
137
147
|
},
|
|
138
148
|
children,
|
|
139
149
|
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
__decorate([
|
|
143
|
-
attribute({ type: String, required: false, matches: ['function', 'class', 'interface', 'enum', 'type', 'module', 'hook', 'component'] }),
|
|
144
|
-
__metadata("design:type", String)
|
|
145
|
-
], SymbolModel.prototype, "kind", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
attribute({ type: String, required: false }),
|
|
148
|
-
__metadata("design:type", String)
|
|
149
|
-
], SymbolModel.prototype, "lang", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
attribute({ type: String, required: false }),
|
|
152
|
-
__metadata("design:type", String)
|
|
153
|
-
], SymbolModel.prototype, "since", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
attribute({ type: String, required: false }),
|
|
156
|
-
__metadata("design:type", String)
|
|
157
|
-
], SymbolModel.prototype, "deprecated", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
attribute({ type: String, required: false }),
|
|
160
|
-
__metadata("design:type", String)
|
|
161
|
-
], SymbolModel.prototype, "source", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
attribute({ type: Number, required: false }),
|
|
164
|
-
__metadata("design:type", Number)
|
|
165
|
-
], SymbolModel.prototype, "headingLevel", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
group({ include: ['heading', 'paragraph', 'image'] }),
|
|
168
|
-
__metadata("design:type", NodeStream)
|
|
169
|
-
], SymbolModel.prototype, "header", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
group({ include: ['heading', 'paragraph', 'fence', 'list', 'blockquote', 'tag', 'hr', 'table'] }),
|
|
172
|
-
__metadata("design:type", NodeStream)
|
|
173
|
-
], SymbolModel.prototype, "body", void 0);
|
|
174
|
-
export const symbol = createSchema(SymbolModel);
|
|
150
|
+
},
|
|
151
|
+
});
|
|
175
152
|
//# sourceMappingURL=symbol.js.map
|
package/dist/tags/symbol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol.js","sourceRoot":"","sources":["../../src/tags/symbol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol.js","sourceRoot":"","sources":["../../src/tags/symbol.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAC7B,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC/K,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,gDAAgD;AAChD,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAErD,oEAAoE;AAEpE,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAwB,CAAC;IACpD,UAAU,EAAE,EAAE;IACd,YAAY,EAAE;QACb,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5D;KACD;IACD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM;QACjC,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CACxC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAyB,CACzE,CAAC;Q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CAAC,IAAI,EAAE,CAAC,CAAC;QAE9B,OAAO,yBAAyB,CAAC,MAAM,CAAC,MAAM,EAAE;YAC/C,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,gBAAgB;YAC1B,UAAU,EAAE;gBACX,GAAG,qBAAqB,CAAC,MAAM,CAAC;gBAChC,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,SAAS;gBAChB,UAAU,EAAE,cAAc;gBAC1B,MAAM,EAAE,UAAU;aAClB;YACD,IAAI,EAAE;gBACL,IAAI,EAAE,OAAO;aACb;YACD,QAAQ;SACR,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -6,7 +6,7 @@ export const schema = {
|
|
|
6
6
|
Api: useSchema(Api).defineType('Api'),
|
|
7
7
|
Changelog: useSchema(Changelog).defineType('Changelog'),
|
|
8
8
|
ChangelogRelease: useSchema(ChangelogRelease).defineType('ChangelogRelease'),
|
|
9
|
-
Symbol: useSchema(Symbol).defineType('Symbol'),
|
|
9
|
+
Symbol: useSchema(Symbol).defineType('Symbol', {}, 'TechArticle'),
|
|
10
10
|
SymbolGroup: useSchema(SymbolGroup).defineType('SymbolGroup'),
|
|
11
11
|
SymbolMember: useSchema(SymbolMember).defineType('SymbolMember'),
|
|
12
12
|
};
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACpC,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAErE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC;IACvD,gBAAgB,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAC5E,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACpC,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAErE,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;IACrC,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC;IACvD,gBAAgB,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAC5E,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,EAAE,aAAa,CAAC;IACjE,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC;IAC7D,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC;CACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refrakt-md/docs",
|
|
3
3
|
"description": "Documentation runes for refrakt.md — API endpoints, symbols, and changelogs",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"build": "tsc"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@refrakt-md/types": "0.
|
|
25
|
-
"@refrakt-md/transform": "0.
|
|
26
|
-
"@refrakt-md/runes": "0.
|
|
24
|
+
"@refrakt-md/types": "0.8.1",
|
|
25
|
+
"@refrakt-md/transform": "0.8.1",
|
|
26
|
+
"@refrakt-md/runes": "0.8.1",
|
|
27
27
|
"@markdoc/markdoc": "0.4.0",
|
|
28
28
|
"reflect-metadata": "^0.2.0"
|
|
29
29
|
}
|