@refrakt-md/docs 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/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +49 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -0
- package/dist/index.js.map +1 -0
- package/dist/schema/api.d.ts +18 -0
- package/dist/schema/api.d.ts.map +1 -0
- package/dist/schema/api.js +8 -0
- package/dist/schema/api.js.map +1 -0
- package/dist/schema/changelog.d.ts +32 -0
- package/dist/schema/changelog.d.ts.map +1 -0
- package/dist/schema/changelog.js +15 -0
- package/dist/schema/changelog.js.map +1 -0
- package/dist/schema/symbol.d.ts +46 -0
- package/dist/schema/symbol.d.ts.map +1 -0
- package/dist/schema/symbol.js +20 -0
- package/dist/schema/symbol.js.map +1 -0
- package/dist/tags/api.d.ts +3 -0
- package/dist/tags/api.d.ts.map +1 -0
- package/dist/tags/api.js +54 -0
- package/dist/tags/api.js.map +1 -0
- package/dist/tags/changelog.d.ts +4 -0
- package/dist/tags/changelog.d.ts.map +1 -0
- package/dist/tags/changelog.js +121 -0
- package/dist/tags/changelog.js.map +1 -0
- package/dist/tags/symbol.d.ts +5 -0
- package/dist/tags/symbol.d.ts.map +1 -0
- package/dist/tags/symbol.js +175 -0
- package/dist/tags/symbol.js.map +1 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/package.json +30 -0
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA+C7C,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export const config = {
|
|
2
|
+
Api: {
|
|
3
|
+
block: 'api',
|
|
4
|
+
contentWrapper: { tag: 'div', ref: 'body' },
|
|
5
|
+
modifiers: {
|
|
6
|
+
method: { source: 'meta', default: 'GET' },
|
|
7
|
+
path: { source: 'meta' },
|
|
8
|
+
auth: { source: 'meta' },
|
|
9
|
+
},
|
|
10
|
+
structure: {
|
|
11
|
+
header: {
|
|
12
|
+
tag: 'div', before: true,
|
|
13
|
+
children: [
|
|
14
|
+
{ tag: 'span', ref: 'method', metaText: 'method' },
|
|
15
|
+
{ tag: 'code', ref: 'path', metaText: 'path' },
|
|
16
|
+
{ tag: 'span', ref: 'auth', metaText: 'auth', condition: 'auth' },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
Symbol: {
|
|
22
|
+
block: 'symbol',
|
|
23
|
+
contentWrapper: { tag: 'div', ref: 'body' },
|
|
24
|
+
modifiers: {
|
|
25
|
+
kind: { source: 'meta', default: 'function' },
|
|
26
|
+
lang: { source: 'meta', default: 'typescript' },
|
|
27
|
+
since: { source: 'meta' },
|
|
28
|
+
deprecated: { source: 'meta' },
|
|
29
|
+
source: { source: 'meta' },
|
|
30
|
+
},
|
|
31
|
+
structure: {
|
|
32
|
+
header: {
|
|
33
|
+
tag: 'div', before: true,
|
|
34
|
+
children: [
|
|
35
|
+
{ tag: 'span', ref: 'kind-badge', metaText: 'kind' },
|
|
36
|
+
{ tag: 'span', ref: 'lang-badge', metaText: 'lang' },
|
|
37
|
+
{ tag: 'span', ref: 'since-badge', metaText: 'since', textPrefix: 'Since ', condition: 'since' },
|
|
38
|
+
{ tag: 'span', ref: 'deprecated-badge', metaText: 'deprecated', textPrefix: 'Deprecated ', condition: 'deprecated' },
|
|
39
|
+
{ tag: 'a', ref: 'source-link', condition: 'source', attrs: { href: { fromModifier: 'source' } }, children: ['Source'] },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
SymbolGroup: { block: 'symbol-group', parent: 'Symbol' },
|
|
45
|
+
SymbolMember: { block: 'symbol-member', parent: 'Symbol' },
|
|
46
|
+
Changelog: { block: 'changelog' },
|
|
47
|
+
ChangelogRelease: { block: 'changelog-release', parent: 'Changelog' },
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAA+B;IACjD,GAAG,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,cAAc,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE;QAC3C,SAAS,EAAE;YACV,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE;YAC1C,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YACxB,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;SACxB;QACD,SAAS,EAAE;YACV,MAAM,EAAE;gBACP,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI;gBACxB,QAAQ,EAAE;oBACT,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE;oBAClD,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;oBAC9C,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE;iBACjE;aACD;SACD;KACD;IACD,MAAM,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,cAAc,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE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AAM,EAAE,QAAQ,EAAE;IAC1D,SAAS,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;IACjC,gBAAgB,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE;CACrE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,eAAO,MAAM,IAAI,EAAE,WA2ElB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { api } from './tags/api.js';
|
|
2
|
+
import { symbol, symbolGroup, symbolMember } from './tags/symbol.js';
|
|
3
|
+
import { changelog, changelogRelease } from './tags/changelog.js';
|
|
4
|
+
import { config } from './config.js';
|
|
5
|
+
export const docs = {
|
|
6
|
+
name: 'docs',
|
|
7
|
+
displayName: 'Documentation',
|
|
8
|
+
version: '0.6.0',
|
|
9
|
+
runes: {
|
|
10
|
+
'api': {
|
|
11
|
+
transform: api,
|
|
12
|
+
aliases: ['endpoint'],
|
|
13
|
+
description: 'API endpoint documentation with method, path, parameters, and request/response examples',
|
|
14
|
+
reinterprets: { heading: 'endpoint title', fence: 'request/response examples', table: 'parameter list', blockquote: 'notes/warnings' },
|
|
15
|
+
fixture: `{% api method="GET" path="/api/users/:id" auth="Bearer" %}
|
|
16
|
+
Retrieve a single user by their unique identifier.
|
|
17
|
+
|
|
18
|
+
| Parameter | Type | Description |
|
|
19
|
+
|-----------|------|-------------|
|
|
20
|
+
| id | string | The user's unique ID |
|
|
21
|
+
|
|
22
|
+
\`\`\`json
|
|
23
|
+
{
|
|
24
|
+
"id": "usr_123",
|
|
25
|
+
"name": "Alice",
|
|
26
|
+
"email": "alice@example.com"
|
|
27
|
+
}
|
|
28
|
+
\`\`\`
|
|
29
|
+
{% /api %}`,
|
|
30
|
+
},
|
|
31
|
+
'symbol': {
|
|
32
|
+
transform: symbol,
|
|
33
|
+
description: 'Code construct documentation for functions, classes, interfaces, enums, and type aliases',
|
|
34
|
+
seoType: 'TechArticle',
|
|
35
|
+
reinterprets: { heading: 'construct name or member group', fence: 'type signature', list: 'parameter definitions', blockquote: 'returns/throws/deprecation' },
|
|
36
|
+
fixture: `{% symbol kind="function" lang="typescript" since="1.2.0" %}
|
|
37
|
+
# createTransform
|
|
38
|
+
|
|
39
|
+
\`\`\`typescript
|
|
40
|
+
function createTransform(config: ThemeConfig): (tree: RendererNode) => RendererNode
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
- config — The theme configuration object defining BEM mappings and structural rules
|
|
44
|
+
- Returns a pure transform function that enhances serialized tag trees
|
|
45
|
+
|
|
46
|
+
> Returns a function that walks the serialized tag tree and applies BEM classes, reads meta tags, injects structural elements, and recurses into children.
|
|
47
|
+
{% /symbol %}`,
|
|
48
|
+
},
|
|
49
|
+
'symbol-group': {
|
|
50
|
+
transform: symbolGroup,
|
|
51
|
+
description: 'Member group within a class/interface symbol',
|
|
52
|
+
},
|
|
53
|
+
'symbol-member': {
|
|
54
|
+
transform: symbolMember,
|
|
55
|
+
description: 'Individual member within a symbol group',
|
|
56
|
+
},
|
|
57
|
+
'changelog': {
|
|
58
|
+
transform: changelog,
|
|
59
|
+
description: 'Version history where headings become releases with categorized changes',
|
|
60
|
+
reinterprets: { heading: 'version number and date', list: 'categorized changes', strong: 'change category' },
|
|
61
|
+
fixture: `{% changelog %}
|
|
62
|
+
## 1.2.0 — 2026-02-15
|
|
63
|
+
- **Added** Inspect command for theme developers
|
|
64
|
+
- **Added** Selector extraction from transformed trees
|
|
65
|
+
- **Fixed** BEM class ordering for nested runes
|
|
66
|
+
|
|
67
|
+
## 1.1.0 — 2026-01-20
|
|
68
|
+
- **Added** Context-aware modifiers
|
|
69
|
+
- **Changed** Improved meta tag consumption logic
|
|
70
|
+
{% /changelog %}`,
|
|
71
|
+
},
|
|
72
|
+
'changelog-release': {
|
|
73
|
+
transform: changelogRelease,
|
|
74
|
+
description: 'Individual changelog release with version and date',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
theme: {
|
|
78
|
+
runes: config,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
export default docs;
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,IAAI,GAAgB;IAC/B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACL,KAAK,EAAE;YACL,SAAS,EAAE,GAAG;YACd,OAAO,EAAE,CAAC,UAAU,CAAC;YACrB,WAAW,EAAE,yFAAyF;YACtG,YAAY,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,2BAA2B,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE;YACtI,OAAO,EAAE;;;;;;;;;;;;;;WAcJ;SACN;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,MAAM;YACjB,WAAW,EAAE,0FAA0F;YACvG,OAAO,EAAE,aAAa;YACtB,YAAY,EAAE,EAAE,OAAO,EAAE,gCAAgC,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,uBAAuB,EAAE,UAAU,EAAE,4BAA4B,EAAE;YAC7J,OAAO,EAAE;;;;;;;;;;;cAWD;SACT;QACD,cAAc,EAAE;YACd,SAAS,EAAE,WAAW;YACtB,WAAW,EAAE,8CAA8C;SAC5D;QACD,eAAe,EAAE;YACf,SAAS,EAAE,YAAY;YACvB,WAAW,EAAE,yCAAyC;SACvD;QACD,WAAW,EAAE;YACX,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,yEAAyE;YACtF,YAAY,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,iBAAiB,EAAE;YAC5G,OAAO,EAAE;;;;;;;;;iBASE;SACZ;QACD,mBAAmB,EAAE;YACnB,SAAS,EAAE,gBAAgB;YAC3B,WAAW,EAAE,oDAAoD;SAClE;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAA4D;KACpE;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentType } from "@refrakt-md/types";
|
|
2
|
+
export declare class Api {
|
|
3
|
+
method: string;
|
|
4
|
+
path: string;
|
|
5
|
+
auth: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ApiComponent extends ComponentType<Api> {
|
|
8
|
+
tag: 'article';
|
|
9
|
+
properties: {
|
|
10
|
+
method: 'meta';
|
|
11
|
+
path: 'meta';
|
|
12
|
+
auth: 'meta';
|
|
13
|
+
};
|
|
14
|
+
refs: {
|
|
15
|
+
body: 'div';
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/schema/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,qBAAa,GAAG;IACf,MAAM,EAAE,MAAM,CAAS;IACvB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,MAAM,CAAM;CAClB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa,CAAC,GAAG,CAAC;IACvD,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE;QACX,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE;QACL,IAAI,EAAE,KAAK,CAAC;KACZ,CAAA;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/schema/api.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAG;IAAhB;QACC,WAAM,GAAW,KAAK,CAAC;QACvB,SAAI,GAAW,EAAE,CAAC;QAClB,SAAI,GAAW,EAAE,CAAC;IACnB,CAAC;CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentType, PageSection, PageSectionProperties } from "@refrakt-md/types";
|
|
2
|
+
export declare class ChangelogRelease {
|
|
3
|
+
version: string;
|
|
4
|
+
date: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ChangelogReleaseComponent extends ComponentType<ChangelogRelease> {
|
|
7
|
+
tag: 'section';
|
|
8
|
+
properties: {
|
|
9
|
+
version: 'h3';
|
|
10
|
+
date: 'time';
|
|
11
|
+
};
|
|
12
|
+
refs: {
|
|
13
|
+
body: 'div';
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare class Changelog extends PageSection {
|
|
17
|
+
release: ChangelogRelease[];
|
|
18
|
+
project: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ChangelogProperties extends PageSectionProperties {
|
|
21
|
+
release: 'section';
|
|
22
|
+
}
|
|
23
|
+
export interface ChangelogComponent extends ComponentType<Changelog> {
|
|
24
|
+
tag: 'section';
|
|
25
|
+
properties: ChangelogProperties & {
|
|
26
|
+
project: 'meta';
|
|
27
|
+
};
|
|
28
|
+
refs: {
|
|
29
|
+
releases: 'div';
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=changelog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/schema/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEtF,qBAAa,gBAAgB;IAC5B,OAAO,EAAE,MAAM,CAAM;IACrB,IAAI,EAAE,MAAM,CAAM;CAClB;AAED,MAAM,WAAW,yBAA0B,SAAQ,aAAa,CAAC,gBAAgB,CAAC;IACjF,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE;QACX,OAAO,EAAE,IAAI,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE;QACL,IAAI,EAAE,KAAK,CAAC;KACZ,CAAA;CACD;AAED,qBAAa,SAAU,SAAQ,WAAW;IACzC,OAAO,EAAE,gBAAgB,EAAE,CAAM;IACjC,OAAO,EAAE,MAAM,CAAM;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IACjE,OAAO,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa,CAAC,SAAS,CAAC;IACnE,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE,mBAAmB,GAAG;QACjC,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,EAAE;QACL,QAAQ,EAAE,KAAK,CAAC;KAChB,CAAA;CACD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PageSection } from "@refrakt-md/types";
|
|
2
|
+
export class ChangelogRelease {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.version = '';
|
|
5
|
+
this.date = '';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export class Changelog extends PageSection {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.release = [];
|
|
12
|
+
this.project = '';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=changelog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/schema/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAyB,MAAM,mBAAmB,CAAC;AAEtF,MAAM,OAAO,gBAAgB;IAA7B;QACC,YAAO,GAAW,EAAE,CAAC;QACrB,SAAI,GAAW,EAAE,CAAC;IACnB,CAAC;CAAA;AAaD,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACC,YAAO,GAAuB,EAAE,CAAC;QACjC,YAAO,GAAW,EAAE,CAAC;IACtB,CAAC;CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentType } from "@refrakt-md/types";
|
|
2
|
+
export declare class SymbolMember {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SymbolMemberComponent extends ComponentType<SymbolMember> {
|
|
6
|
+
tag: 'section';
|
|
7
|
+
properties: {
|
|
8
|
+
name: 'h4';
|
|
9
|
+
};
|
|
10
|
+
refs: {
|
|
11
|
+
body: 'div';
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare class SymbolGroup {
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SymbolGroupComponent extends ComponentType<SymbolGroup> {
|
|
18
|
+
tag: 'section';
|
|
19
|
+
properties: {
|
|
20
|
+
label: 'h3';
|
|
21
|
+
};
|
|
22
|
+
refs: {
|
|
23
|
+
body: 'div';
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare class Symbol {
|
|
27
|
+
kind: string;
|
|
28
|
+
lang: string;
|
|
29
|
+
since: string;
|
|
30
|
+
deprecated: string;
|
|
31
|
+
source: string;
|
|
32
|
+
}
|
|
33
|
+
export interface SymbolComponent extends ComponentType<Symbol> {
|
|
34
|
+
tag: 'article';
|
|
35
|
+
properties: {
|
|
36
|
+
kind: 'meta';
|
|
37
|
+
lang: 'meta';
|
|
38
|
+
since: 'meta';
|
|
39
|
+
deprecated: 'meta';
|
|
40
|
+
source: 'meta';
|
|
41
|
+
};
|
|
42
|
+
refs: {
|
|
43
|
+
body: 'div';
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=symbol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../src/schema/symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,qBAAa,YAAY;IACxB,IAAI,EAAE,MAAM,CAAM;CAClB;AAED,MAAM,WAAW,qBAAsB,SAAQ,aAAa,CAAC,YAAY,CAAC;IACzE,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE;QACX,IAAI,EAAE,IAAI,CAAC;KACX,CAAC;IACF,IAAI,EAAE;QACL,IAAI,EAAE,KAAK,CAAC;KACZ,CAAA;CACD;AAED,qBAAa,WAAW;IACvB,KAAK,EAAE,MAAM,CAAM;CACnB;AAED,MAAM,WAAW,oBAAqB,SAAQ,aAAa,CAAC,WAAW,CAAC;IACvE,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE;QACX,KAAK,EAAE,IAAI,CAAC;KACZ,CAAC;IACF,IAAI,EAAE;QACL,IAAI,EAAE,KAAK,CAAC;KACZ,CAAA;CACD;AAED,qBAAa,MAAM;IAClB,IAAI,EAAE,MAAM,CAAc;IAC1B,IAAI,EAAE,MAAM,CAAgB;IAC5B,KAAK,EAAE,MAAM,CAAM;IACnB,UAAU,EAAE,MAAM,CAAM;IACxB,MAAM,EAAE,MAAM,CAAM;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,MAAM,CAAC;IAC7D,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE;QACL,IAAI,EAAE,KAAK,CAAC;KACZ,CAAA;CACD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class SymbolMember {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.name = '';
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export class SymbolGroup {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.label = '';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export class Symbol {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.kind = 'function';
|
|
14
|
+
this.lang = 'typescript';
|
|
15
|
+
this.since = '';
|
|
16
|
+
this.deprecated = '';
|
|
17
|
+
this.source = '';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=symbol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol.js","sourceRoot":"","sources":["../../src/schema/symbol.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,YAAY;IAAzB;QACC,SAAI,GAAW,EAAE,CAAC;IACnB,CAAC;CAAA;AAYD,MAAM,OAAO,WAAW;IAAxB;QACC,UAAK,GAAW,EAAE,CAAC;IACpB,CAAC;CAAA;AAYD,MAAM,OAAO,MAAM;IAAnB;QACC,SAAI,GAAW,UAAU,CAAC;QAC1B,SAAI,GAAW,YAAY,CAAC;QAC5B,UAAK,GAAW,EAAE,CAAC;QACnB,eAAU,GAAW,EAAE,CAAC;QACxB,WAAM,GAAW,EAAE,CAAC;IACrB,CAAC;CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/tags/api.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AA0CvC,eAAO,MAAM,GAAG,gBAAyB,CAAC"}
|
package/dist/tags/api.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
import Markdoc from '@markdoc/markdoc';
|
|
11
|
+
const { Tag } = Markdoc;
|
|
12
|
+
import { attribute, Model, createComponentRenderable, createSchema } from '@refrakt-md/runes';
|
|
13
|
+
import { schema } from '../types.js';
|
|
14
|
+
const methodType = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'];
|
|
15
|
+
class ApiModel extends Model {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.method = 'GET';
|
|
19
|
+
this.auth = '';
|
|
20
|
+
}
|
|
21
|
+
transform() {
|
|
22
|
+
const children = this.transformChildren();
|
|
23
|
+
const methodMeta = new Tag('meta', { content: this.method });
|
|
24
|
+
const pathMeta = new Tag('meta', { content: this.path });
|
|
25
|
+
const authMeta = new Tag('meta', { content: this.auth });
|
|
26
|
+
const bodyDiv = children.wrap('div');
|
|
27
|
+
return createComponentRenderable(schema.Api, {
|
|
28
|
+
tag: 'article',
|
|
29
|
+
properties: {
|
|
30
|
+
method: methodMeta,
|
|
31
|
+
path: pathMeta,
|
|
32
|
+
auth: authMeta,
|
|
33
|
+
},
|
|
34
|
+
refs: {
|
|
35
|
+
body: bodyDiv,
|
|
36
|
+
},
|
|
37
|
+
children: [methodMeta, pathMeta, authMeta, bodyDiv.next()],
|
|
38
|
+
});
|
|
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);
|
|
54
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,SAAS,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9F,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,QAAS,SAAQ,KAAK;IAA5B;;QAEC,WAAM,GAA8B,KAAK,CAAC;QAM1C,SAAI,GAAW,EAAE,CAAC;IAwBnB,CAAC;IAtBA,SAAS;Q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+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/tags/changelog.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AA2GvC,eAAO,MAAM,gBAAgB,gBAAsC,CAAC;AAEpE,eAAO,MAAM,SAAS,gBAA+B,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
import Markdoc from '@markdoc/markdoc';
|
|
11
|
+
const { Ast, Tag } = Markdoc;
|
|
12
|
+
import { attribute, group, Model, createComponentRenderable, createSchema, NodeStream, pageSectionProperties, headingsToList } from '@refrakt-md/runes';
|
|
13
|
+
import { schema } from '../types.js';
|
|
14
|
+
// Parse "v2.1.0 - 2024-01-15" or "0.1.0 — January 2024"
|
|
15
|
+
const VERSION_DATE_PATTERN = /^v?([\d.]+(?:-[\w.]+)?)\s*[-–—]\s*(.+)$/;
|
|
16
|
+
class ChangelogReleaseModel extends Model {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.version = '';
|
|
20
|
+
this.date = '';
|
|
21
|
+
}
|
|
22
|
+
transform() {
|
|
23
|
+
const versionTag = new Tag('h3', {}, [this.version]);
|
|
24
|
+
const dateTag = new Tag('time', {}, [this.date]);
|
|
25
|
+
const body = this.transformChildren().wrap('div');
|
|
26
|
+
return createComponentRenderable(schema.ChangelogRelease, {
|
|
27
|
+
tag: 'section',
|
|
28
|
+
properties: {
|
|
29
|
+
version: versionTag,
|
|
30
|
+
date: dateTag,
|
|
31
|
+
},
|
|
32
|
+
refs: {
|
|
33
|
+
body: body.tag('div'),
|
|
34
|
+
},
|
|
35
|
+
children: [versionTag, dateTag, body.next()],
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
attribute({ type: String, required: false }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ChangelogReleaseModel.prototype, "version", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
attribute({ type: String, required: false }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ChangelogReleaseModel.prototype, "date", void 0);
|
|
47
|
+
class ChangelogModel extends Model {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments);
|
|
50
|
+
this.headingLevel = undefined;
|
|
51
|
+
this.project = '';
|
|
52
|
+
}
|
|
53
|
+
convertHeadings(nodes) {
|
|
54
|
+
// Auto-detect heading level from first heading if not specified
|
|
55
|
+
const level = this.headingLevel ?? nodes.find(n => n.type === 'heading')?.attributes.level;
|
|
56
|
+
if (!level)
|
|
57
|
+
return nodes;
|
|
58
|
+
const converted = headingsToList({ level })(nodes);
|
|
59
|
+
const n = converted.length - 1;
|
|
60
|
+
if (!converted[n] || converted[n].type !== 'list')
|
|
61
|
+
return nodes;
|
|
62
|
+
const tags = converted[n].children.map(item => {
|
|
63
|
+
const heading = item.children[0];
|
|
64
|
+
const headingText = Array.from(heading.walk())
|
|
65
|
+
.filter(n => n.type === 'text')
|
|
66
|
+
.map(t => t.attributes.content)
|
|
67
|
+
.join(' ');
|
|
68
|
+
const match = headingText.match(VERSION_DATE_PATTERN);
|
|
69
|
+
const version = match ? match[1].trim() : headingText;
|
|
70
|
+
const date = match ? match[2].trim() : '';
|
|
71
|
+
return new Ast.Node('tag', { version, date }, item.children.slice(1), 'changelog-release');
|
|
72
|
+
});
|
|
73
|
+
converted.splice(n, 1, ...tags);
|
|
74
|
+
return converted;
|
|
75
|
+
}
|
|
76
|
+
processChildren(nodes) {
|
|
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');
|
|
84
|
+
const releasesDiv = new Tag('div', {}, releases.toArray());
|
|
85
|
+
const children = [projectMeta];
|
|
86
|
+
if (header.count() > 0) {
|
|
87
|
+
children.push(header.wrap('header').next());
|
|
88
|
+
}
|
|
89
|
+
children.push(releasesDiv);
|
|
90
|
+
return createComponentRenderable(schema.Changelog, {
|
|
91
|
+
tag: 'section',
|
|
92
|
+
property: 'contentSection',
|
|
93
|
+
properties: {
|
|
94
|
+
...pageSectionProperties(header),
|
|
95
|
+
project: projectMeta,
|
|
96
|
+
release: releases,
|
|
97
|
+
},
|
|
98
|
+
refs: { releases: releasesDiv },
|
|
99
|
+
children,
|
|
100
|
+
});
|
|
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);
|
|
121
|
+
//# sourceMappingURL=changelog.js.map
|
|
@@ -0,0 +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,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxJ,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;YACd,UAAU,EAAE;gBACX,OAAO,EAAE,UAAU;gBACnB,IAAI,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,qBAAqB,CAAC,CAAC;AAEpE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../src/tags/symbol.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAgCvC,eAAO,MAAM,YAAY,gBAAkC,CAAC;AA8C5D,eAAO,MAAM,WAAW,gBAAiC,CAAC;AAwF1D,eAAO,MAAM,MAAM,gBAA4B,CAAC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
import Markdoc from '@markdoc/markdoc';
|
|
11
|
+
const { Ast, Tag } = Markdoc;
|
|
12
|
+
import { attribute, group, Model, createComponentRenderable, createSchema, NodeStream, pageSectionProperties, headingsToList } from '@refrakt-md/runes';
|
|
13
|
+
import { schema } from '../types.js';
|
|
14
|
+
// Kinds that use group/member heading structure
|
|
15
|
+
const GROUP_KINDS = ['class', 'interface', 'module'];
|
|
16
|
+
// ─── SymbolMember ────────────────────────────────────────────────
|
|
17
|
+
class SymbolMemberModel extends Model {
|
|
18
|
+
transform() {
|
|
19
|
+
const children = this.transformChildren();
|
|
20
|
+
const nameHeading = children.headings().limit(1);
|
|
21
|
+
const hasName = nameHeading.count() > 0;
|
|
22
|
+
const nameTag = new Tag('h4', {}, hasName ? nameHeading.next().children : []);
|
|
23
|
+
const body = children.slice(hasName ? 1 : 0).wrap('div');
|
|
24
|
+
return createComponentRenderable(schema.SymbolMember, {
|
|
25
|
+
tag: 'section',
|
|
26
|
+
properties: {
|
|
27
|
+
name: nameTag,
|
|
28
|
+
},
|
|
29
|
+
refs: {
|
|
30
|
+
body: body.tag('div'),
|
|
31
|
+
},
|
|
32
|
+
children: [nameTag, body.next()],
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export const symbolMember = createSchema(SymbolMemberModel);
|
|
37
|
+
// ─── SymbolGroup ─────────────────────────────────────────────────
|
|
38
|
+
class SymbolGroupModel extends Model {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this.headingLevel = 4;
|
|
42
|
+
}
|
|
43
|
+
convertMemberHeadings(nodes) {
|
|
44
|
+
const level = this.headingLevel;
|
|
45
|
+
const converted = headingsToList({ level })(nodes);
|
|
46
|
+
const n = converted.length - 1;
|
|
47
|
+
if (!converted[n] || converted[n].type !== 'list')
|
|
48
|
+
return nodes;
|
|
49
|
+
const tags = converted[n].children.map(item => {
|
|
50
|
+
return new Ast.Node('tag', {}, item.children, 'symbol-member');
|
|
51
|
+
});
|
|
52
|
+
converted.splice(n, 1, ...tags);
|
|
53
|
+
return converted;
|
|
54
|
+
}
|
|
55
|
+
processChildren(nodes) {
|
|
56
|
+
return super.processChildren(this.convertMemberHeadings(nodes));
|
|
57
|
+
}
|
|
58
|
+
transform() {
|
|
59
|
+
const children = this.transformChildren();
|
|
60
|
+
const labelHeading = children.headings().limit(1);
|
|
61
|
+
const hasLabel = labelHeading.count() > 0;
|
|
62
|
+
const labelTag = new Tag('h3', {}, hasLabel ? labelHeading.next().children : []);
|
|
63
|
+
const body = children.slice(hasLabel ? 1 : 0).wrap('div');
|
|
64
|
+
return createComponentRenderable(schema.SymbolGroup, {
|
|
65
|
+
tag: 'section',
|
|
66
|
+
properties: {
|
|
67
|
+
label: labelTag,
|
|
68
|
+
},
|
|
69
|
+
refs: {
|
|
70
|
+
body: body.tag('div'),
|
|
71
|
+
},
|
|
72
|
+
children: [labelTag, body.next()],
|
|
73
|
+
});
|
|
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);
|
|
81
|
+
// ─── Symbol (main) ───────────────────────────────────────────────
|
|
82
|
+
class SymbolModel extends Model {
|
|
83
|
+
constructor() {
|
|
84
|
+
super(...arguments);
|
|
85
|
+
this.kind = 'function';
|
|
86
|
+
this.lang = 'typescript';
|
|
87
|
+
this.since = '';
|
|
88
|
+
this.deprecated = '';
|
|
89
|
+
this.source = '';
|
|
90
|
+
this.headingLevel = 2;
|
|
91
|
+
}
|
|
92
|
+
convertGroupHeadings(nodes) {
|
|
93
|
+
if (!GROUP_KINDS.includes(this.kind))
|
|
94
|
+
return nodes;
|
|
95
|
+
const groupLevel = this.headingLevel + 1;
|
|
96
|
+
const memberLevel = this.headingLevel + 2;
|
|
97
|
+
const converted = headingsToList({ level: groupLevel })(nodes);
|
|
98
|
+
const n = converted.length - 1;
|
|
99
|
+
if (!converted[n] || converted[n].type !== 'list')
|
|
100
|
+
return nodes;
|
|
101
|
+
const tags = converted[n].children.map(item => {
|
|
102
|
+
return new Ast.Node('tag', { headingLevel: memberLevel }, item.children, 'symbol-group');
|
|
103
|
+
});
|
|
104
|
+
converted.splice(n, 1, ...tags);
|
|
105
|
+
return converted;
|
|
106
|
+
}
|
|
107
|
+
processChildren(nodes) {
|
|
108
|
+
return super.processChildren(this.convertGroupHeadings(nodes));
|
|
109
|
+
}
|
|
110
|
+
transform() {
|
|
111
|
+
const header = this.header.transform();
|
|
112
|
+
const bodyStream = this.body.transform();
|
|
113
|
+
const kindMeta = new Tag('meta', { content: this.kind });
|
|
114
|
+
const langMeta = new Tag('meta', { content: this.lang });
|
|
115
|
+
const sinceMeta = new Tag('meta', { content: this.since });
|
|
116
|
+
const deprecatedMeta = new Tag('meta', { content: this.deprecated });
|
|
117
|
+
const sourceMeta = new Tag('meta', { content: this.source });
|
|
118
|
+
const bodyDiv = bodyStream.wrap('div');
|
|
119
|
+
const children = [kindMeta, langMeta, sinceMeta, deprecatedMeta, sourceMeta];
|
|
120
|
+
if (header.count() > 0) {
|
|
121
|
+
children.push(header.wrap('header').next());
|
|
122
|
+
}
|
|
123
|
+
children.push(bodyDiv.next());
|
|
124
|
+
return createComponentRenderable(schema.Symbol, {
|
|
125
|
+
tag: 'article',
|
|
126
|
+
property: 'contentSection',
|
|
127
|
+
properties: {
|
|
128
|
+
...pageSectionProperties(header),
|
|
129
|
+
kind: kindMeta,
|
|
130
|
+
lang: langMeta,
|
|
131
|
+
since: sinceMeta,
|
|
132
|
+
deprecated: deprecatedMeta,
|
|
133
|
+
source: sourceMeta,
|
|
134
|
+
},
|
|
135
|
+
refs: {
|
|
136
|
+
body: bodyDiv,
|
|
137
|
+
},
|
|
138
|
+
children,
|
|
139
|
+
});
|
|
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);
|
|
175
|
+
//# sourceMappingURL=symbol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxJ,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,gDAAgD;AAChD,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAErD,oEAA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EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;2CACzB;AAGpB;IADC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;iDACpB;AAGzB;IADC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC;8BAC9C,UAAU;2CAAC;AAGnB;IADC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;8BAC5F,UAAU;yCAAC;AA6DlB,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApiComponent } from './schema/api.js';
|
|
2
|
+
import { ChangelogComponent, ChangelogReleaseComponent } from './schema/changelog.js';
|
|
3
|
+
import { SymbolComponent, SymbolGroupComponent, SymbolMemberComponent } from './schema/symbol.js';
|
|
4
|
+
export declare const schema: {
|
|
5
|
+
Api: import("@refrakt-md/types").Type<ApiComponent>;
|
|
6
|
+
Changelog: import("@refrakt-md/types").Type<ChangelogComponent>;
|
|
7
|
+
ChangelogRelease: import("@refrakt-md/types").Type<ChangelogReleaseComponent>;
|
|
8
|
+
Symbol: import("@refrakt-md/types").Type<SymbolComponent>;
|
|
9
|
+
SymbolGroup: import("@refrakt-md/types").Type<SymbolGroupComponent>;
|
|
10
|
+
SymbolMember: import("@refrakt-md/types").Type<SymbolMemberComponent>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAa,kBAAkB,EAAoB,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACnH,OAAO,EAAU,eAAe,EAAe,oBAAoB,EAAgB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAErI,eAAO,MAAM,MAAM;;;;;;;CAOlB,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useSchema } from '@refrakt-md/types';
|
|
2
|
+
import { Api } from './schema/api.js';
|
|
3
|
+
import { Changelog, ChangelogRelease } from './schema/changelog.js';
|
|
4
|
+
import { Symbol, SymbolGroup, SymbolMember } from './schema/symbol.js';
|
|
5
|
+
export const schema = {
|
|
6
|
+
Api: useSchema(Api).defineType('Api'),
|
|
7
|
+
Changelog: useSchema(Changelog).defineType('Changelog'),
|
|
8
|
+
ChangelogRelease: useSchema(ChangelogRelease).defineType('ChangelogRelease'),
|
|
9
|
+
Symbol: useSchema(Symbol).defineType('Symbol'),
|
|
10
|
+
SymbolGroup: useSchema(SymbolGroup).defineType('SymbolGroup'),
|
|
11
|
+
SymbolMember: useSchema(SymbolMember).defineType('SymbolMember'),
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAgB,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAsB,gBAAgB,EAA6B,MAAM,uBAAuB,CAAC;AACnH,OAAO,EAAE,MAAM,EAAmB,WAAW,EAAwB,YAAY,EAAyB,MAAM,oBAAoB,CAAC;AAErI,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU,CAAe,KAAK,CAAC;IACnD,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAqB,WAAW,CAAC;IAC3E,gBAAgB,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAA4B,kBAAkB,CAAC;IACvG,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,UAAU,CAAkB,QAAQ,CAAC;IAC/D,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC,UAAU,CAAuB,aAAa,CAAC;IACnF,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,UAAU,CAAwB,cAAc,CAAC;CACxF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@refrakt-md/docs",
|
|
3
|
+
"description": "Documentation runes for refrakt.md — API endpoints, symbols, and changelogs",
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/refrakt-md/refrakt.git",
|
|
10
|
+
"directory": "runes/docs"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@refrakt-md/types": "0.7.0",
|
|
25
|
+
"@refrakt-md/transform": "0.7.0",
|
|
26
|
+
"@refrakt-md/runes": "0.7.0",
|
|
27
|
+
"@markdoc/markdoc": "0.4.0",
|
|
28
|
+
"reflect-metadata": "^0.2.0"
|
|
29
|
+
}
|
|
30
|
+
}
|