docula 0.41.1 → 0.90.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/README.md +228 -4
- package/dist/docula.d.ts +240 -16
- package/dist/docula.js +1596 -222
- package/package.json +11 -9
- package/templates/classic/api.hbs +214 -0
- package/{template → templates/classic}/changelog-entry.hbs +2 -0
- package/{template → templates/classic}/changelog.hbs +2 -0
- package/templates/classic/css/api.css +753 -0
- package/{template → templates/classic}/css/base.css +10 -0
- package/{template → templates/classic}/css/multipage.css +7 -0
- package/{template → templates/classic}/docs.hbs +3 -1
- package/{template/index.hbs → templates/classic/home.hbs} +9 -1
- package/templates/classic/includes/api-try-it.hbs +61 -0
- package/templates/classic/includes/multipage/api-reference.hbs +1 -0
- package/templates/classic/includes/multipage/documentation.hbs +1 -0
- package/{template → templates/classic}/includes/multipage/hero.hbs +1 -2
- package/{template → templates/classic}/includes/multipage/home.hbs +3 -3
- package/{template → templates/classic}/includes/singlepage/content.hbs +3 -3
- package/templates/classic/js/api.js +282 -0
- package/templates/modern/api.hbs +215 -0
- package/templates/modern/changelog-entry.hbs +36 -0
- package/templates/modern/changelog.hbs +38 -0
- package/templates/modern/css/api.css +1051 -0
- package/templates/modern/css/highlight/highlight.min.js +1433 -0
- package/templates/modern/css/highlight/styles/base16/docula.css +123 -0
- package/templates/modern/css/home.css +96 -0
- package/templates/modern/css/styles.css +711 -0
- package/templates/modern/docs.hbs +30 -0
- package/templates/modern/home.hbs +53 -0
- package/templates/modern/includes/api-reference.hbs +1 -0
- package/templates/modern/includes/api-try-it.hbs +61 -0
- package/templates/modern/includes/doc.hbs +18 -0
- package/templates/modern/includes/documentation.hbs +1 -0
- package/templates/modern/includes/footer.hbs +6 -0
- package/templates/modern/includes/header-bar.hbs +57 -0
- package/templates/modern/includes/header.hbs +15 -0
- package/templates/modern/includes/hero.hbs +11 -0
- package/templates/modern/includes/home.hbs +46 -0
- package/templates/modern/includes/scripts.hbs +164 -0
- package/templates/modern/includes/sidebar.hbs +22 -0
- package/templates/modern/includes/theme-toggle.hbs +5 -0
- package/templates/modern/js/api.js +300 -0
- package/template/api.hbs +0 -28
- package/template/releases.hbs +0 -86
- /package/{template → templates/classic}/css/highlight/highlight.min.js +0 -0
- /package/{template → templates/classic}/css/highlight/styles/base16/dracula.min.css +0 -0
- /package/{template → templates/classic}/css/landing.css +0 -0
- /package/{template → templates/classic}/css/singlepage.css +0 -0
- /package/{template → templates/classic}/includes/footer.hbs +0 -0
- /package/{template → templates/classic}/includes/header.hbs +0 -0
- /package/{template → templates/classic}/includes/multipage/doc.hbs +0 -0
- /package/{template → templates/classic}/includes/multipage/header.hbs +0 -0
- /package/{template → templates/classic}/includes/multipage/scripts.hbs +0 -0
- /package/{template → templates/classic}/includes/multipage/sidebar.hbs +0 -0
- /package/{template → templates/classic}/includes/scripts.hbs +0 -0
- /package/{template → templates/classic}/includes/singlepage/hero.hbs +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<link rel="stylesheet" href="/css/api.css">
|
|
7
|
+
<title>API Reference - {{ siteTitle }}</title>
|
|
8
|
+
<meta name="description" content="API Reference for {{ siteTitle }}" />
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
{{> header-bar }}
|
|
13
|
+
|
|
14
|
+
{{#if apiSpec}}
|
|
15
|
+
<div class="api-mobile-toggle">
|
|
16
|
+
<button id="api-sidebar-toggle">
|
|
17
|
+
<span>API Navigation</span>
|
|
18
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/></svg>
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="api-reference">
|
|
23
|
+
<aside class="api-sidebar" id="api-sidebar">
|
|
24
|
+
<input type="text" class="api-search" id="api-search" placeholder="Search endpoints..." />
|
|
25
|
+
|
|
26
|
+
{{#each apiSpec.groups}}
|
|
27
|
+
<div class="api-sidebar__group" data-group="{{this.id}}">
|
|
28
|
+
<button class="api-sidebar__group-toggle">
|
|
29
|
+
<span>{{this.name}}</span>
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
|
31
|
+
</button>
|
|
32
|
+
<div class="api-sidebar__group-items">
|
|
33
|
+
{{#each this.operations}}
|
|
34
|
+
<a href="#{{this.id}}" class="api-sidebar__item" data-method="{{this.method}}" data-path="{{this.path}}">
|
|
35
|
+
<span class="method-badge method-badge--{{this.method}}">{{this.methodUpper}}</span>
|
|
36
|
+
<span class="api-sidebar__item-path">{{this.path}}</span>
|
|
37
|
+
</a>
|
|
38
|
+
{{/each}}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
{{/each}}
|
|
42
|
+
</aside>
|
|
43
|
+
|
|
44
|
+
<main class="api-content">
|
|
45
|
+
<section class="api-info">
|
|
46
|
+
<h1 class="api-info__title">{{apiSpec.info.title}}</h1>
|
|
47
|
+
{{#if apiSpec.info.version}}
|
|
48
|
+
<span class="api-info__version">v{{apiSpec.info.version}}</span>
|
|
49
|
+
{{/if}}
|
|
50
|
+
{{#if apiSpec.info.description}}
|
|
51
|
+
<div class="api-info__description">{{{apiSpec.info.description}}}</div>
|
|
52
|
+
{{/if}}
|
|
53
|
+
{{#if apiSpec.servers}}
|
|
54
|
+
<div class="api-info__servers">
|
|
55
|
+
<div class="api-info__server-label">Server</div>
|
|
56
|
+
{{#each apiSpec.servers}}
|
|
57
|
+
<code class="api-info__server-url">{{this.url}}</code>
|
|
58
|
+
{{/each}}
|
|
59
|
+
</div>
|
|
60
|
+
{{/if}}
|
|
61
|
+
<div class="api-auth">
|
|
62
|
+
<div class="api-auth__label">Authorization</div>
|
|
63
|
+
<div class="api-auth__controls">
|
|
64
|
+
<select class="api-auth__type" id="api-auth-type">
|
|
65
|
+
<option value="none">None</option>
|
|
66
|
+
<option value="apikey">API Key (x-api-key)</option>
|
|
67
|
+
<option value="bearer">Bearer Token</option>
|
|
68
|
+
</select>
|
|
69
|
+
<input type="password" class="api-auth__value api-auth__value--hidden" id="api-auth-value" placeholder="Enter value..." />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</section>
|
|
73
|
+
|
|
74
|
+
{{#each apiSpec.groups}}
|
|
75
|
+
<div class="api-group" id="group-{{this.id}}">
|
|
76
|
+
<div class="api-group__header">
|
|
77
|
+
<h2 class="api-group__title">{{this.name}}</h2>
|
|
78
|
+
{{#if this.description}}
|
|
79
|
+
<div class="api-group__description">{{{this.description}}}</div>
|
|
80
|
+
{{/if}}
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
{{#each this.operations}}
|
|
84
|
+
<div class="api-operation api-operation--collapsed" id="{{this.id}}">
|
|
85
|
+
<div class="api-operation__header" data-toggle="operation">
|
|
86
|
+
<span class="method-badge method-badge--{{this.method}}">{{this.methodUpper}}</span>
|
|
87
|
+
<span class="api-operation__path">{{this.path}}</span>
|
|
88
|
+
{{#if this.summary}}
|
|
89
|
+
<span class="api-operation__summary">{{this.summary}}</span>
|
|
90
|
+
{{/if}}
|
|
91
|
+
<svg class="api-operation__toggle-icon" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="api-operation__body">
|
|
94
|
+
<div class="api-operation__docs">
|
|
95
|
+
{{#if this.description}}
|
|
96
|
+
<div class="api-operation__description">{{{this.description}}}</div>
|
|
97
|
+
{{/if}}
|
|
98
|
+
|
|
99
|
+
{{#if this.parameters.length}}
|
|
100
|
+
<div class="api-section-title">Parameters</div>
|
|
101
|
+
<table class="api-params-table">
|
|
102
|
+
<thead>
|
|
103
|
+
<tr>
|
|
104
|
+
<th>Name</th>
|
|
105
|
+
<th>Type</th>
|
|
106
|
+
<th>In</th>
|
|
107
|
+
<th>Description</th>
|
|
108
|
+
</tr>
|
|
109
|
+
</thead>
|
|
110
|
+
<tbody>
|
|
111
|
+
{{#each this.parameters}}
|
|
112
|
+
<tr>
|
|
113
|
+
<td>
|
|
114
|
+
<span class="api-param-name">{{this.name}}</span>
|
|
115
|
+
{{#if this.required}}<span class="api-param-required">*</span>{{/if}}
|
|
116
|
+
</td>
|
|
117
|
+
<td><span class="api-param-type">{{this.type}}</span></td>
|
|
118
|
+
<td><span class="api-param-in">{{this.in}}</span></td>
|
|
119
|
+
<td><span class="api-param-desc">{{this.description}}</span></td>
|
|
120
|
+
</tr>
|
|
121
|
+
{{/each}}
|
|
122
|
+
</tbody>
|
|
123
|
+
</table>
|
|
124
|
+
{{/if}}
|
|
125
|
+
|
|
126
|
+
{{#if this.requestBody}}
|
|
127
|
+
<div class="api-section-title">Request Body <span class="api-param-type">{{this.requestBody.contentType}}</span></div>
|
|
128
|
+
{{#if this.requestBody.schemaProperties.length}}
|
|
129
|
+
<div class="api-schema">
|
|
130
|
+
<div class="api-schema-props">
|
|
131
|
+
{{#each this.requestBody.schemaProperties}}
|
|
132
|
+
<div class="api-schema-prop">
|
|
133
|
+
<span class="api-schema-prop-name">{{this.name}}{{#if this.required}}<span class="api-param-required">*</span>{{/if}}</span>
|
|
134
|
+
<span class="api-schema-prop-type">{{this.type}}</span>
|
|
135
|
+
<span class="api-schema-prop-desc">{{this.description}}</span>
|
|
136
|
+
</div>
|
|
137
|
+
{{/each}}
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
{{/if}}
|
|
141
|
+
{{#if this.requestBody.example}}
|
|
142
|
+
<div class="api-response__example">
|
|
143
|
+
<pre><code>{{this.requestBody.example}}</code></pre>
|
|
144
|
+
</div>
|
|
145
|
+
{{/if}}
|
|
146
|
+
{{/if}}
|
|
147
|
+
|
|
148
|
+
{{#if this.responses.length}}
|
|
149
|
+
<div class="api-section-title">Responses</div>
|
|
150
|
+
{{#each this.responses}}
|
|
151
|
+
<div class="api-response">
|
|
152
|
+
<div class="api-response__status">
|
|
153
|
+
<span class="api-status-code api-status-code--{{this.statusClass}}">{{this.statusCode}}</span>
|
|
154
|
+
<span class="api-response__desc">{{this.description}}</span>
|
|
155
|
+
</div>
|
|
156
|
+
{{#if this.schemaProperties.length}}
|
|
157
|
+
<div class="api-schema">
|
|
158
|
+
<div class="api-schema-props">
|
|
159
|
+
{{#each this.schemaProperties}}
|
|
160
|
+
<div class="api-schema-prop">
|
|
161
|
+
<span class="api-schema-prop-name">{{this.name}}</span>
|
|
162
|
+
<span class="api-schema-prop-type">{{this.type}}</span>
|
|
163
|
+
<span class="api-schema-prop-desc">{{this.description}}</span>
|
|
164
|
+
</div>
|
|
165
|
+
{{/each}}
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
{{/if}}
|
|
169
|
+
{{#if this.example}}
|
|
170
|
+
<div class="api-response__example">
|
|
171
|
+
<pre><code>{{this.example}}</code></pre>
|
|
172
|
+
</div>
|
|
173
|
+
{{/if}}
|
|
174
|
+
</div>
|
|
175
|
+
{{/each}}
|
|
176
|
+
{{/if}}
|
|
177
|
+
|
|
178
|
+
<div class="api-code-examples">
|
|
179
|
+
<div class="api-code-tabs">
|
|
180
|
+
<button class="api-code-tab api-code-tab--active" data-tab="curl">cURL</button>
|
|
181
|
+
<button class="api-code-tab" data-tab="javascript">JavaScript</button>
|
|
182
|
+
<button class="api-code-tab" data-tab="python">Python</button>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="api-code-panel api-code-panel--active" data-panel="curl">
|
|
185
|
+
<button class="api-copy-btn" data-copy>Copy</button>
|
|
186
|
+
<pre><code>{{this.codeExamples.curl}}</code></pre>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="api-code-panel" data-panel="javascript">
|
|
189
|
+
<button class="api-copy-btn" data-copy>Copy</button>
|
|
190
|
+
<pre><code>{{this.codeExamples.javascript}}</code></pre>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="api-code-panel" data-panel="python">
|
|
193
|
+
<button class="api-copy-btn" data-copy>Copy</button>
|
|
194
|
+
<pre><code>{{this.codeExamples.python}}</code></pre>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
{{> api-try-it }}
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
{{/each}}
|
|
203
|
+
</div>
|
|
204
|
+
{{/each}}
|
|
205
|
+
</main>
|
|
206
|
+
</div>
|
|
207
|
+
{{/if}}
|
|
208
|
+
|
|
209
|
+
{{> footer }}
|
|
210
|
+
{{> scripts }}
|
|
211
|
+
|
|
212
|
+
<script src="/js/api.js"></script>
|
|
213
|
+
</body>
|
|
214
|
+
|
|
215
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<title>{{siteTitle}} - {{title}}</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
{{> header-bar }}
|
|
11
|
+
<div class="content">
|
|
12
|
+
<main class="versions-container">
|
|
13
|
+
<div class="versions-content">
|
|
14
|
+
<div class="changelog-entry-nav">
|
|
15
|
+
<a href="/changelog/">← Back to Changelog</a>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="changelog-entry changelog-entry-single">
|
|
18
|
+
<div class="changelog-entry-header">
|
|
19
|
+
<h1 class="changelog-entry-title">{{title}}</h1>
|
|
20
|
+
{{#if tag}}
|
|
21
|
+
<span class="changelog-tag changelog-tag-{{tagClass}}">{{tag}}</span>
|
|
22
|
+
{{/if}}
|
|
23
|
+
</div>
|
|
24
|
+
<span class="changelog-entry-date">{{formattedDate}}</span>
|
|
25
|
+
<div class="changelog-entry-body">
|
|
26
|
+
{{{generatedHtml}}}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</main>
|
|
31
|
+
</div>
|
|
32
|
+
{{> footer }}
|
|
33
|
+
{{> scripts }}
|
|
34
|
+
</body>
|
|
35
|
+
|
|
36
|
+
</html>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
{{> header }}
|
|
6
|
+
<title>{{siteTitle}} Changelog</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
{{> header-bar }}
|
|
11
|
+
<div class="content">
|
|
12
|
+
<main class="versions-container">
|
|
13
|
+
<div class="versions-content">
|
|
14
|
+
<h2 class="home-title">Changelog</h2>
|
|
15
|
+
{{#if entries}}
|
|
16
|
+
{{#each entries as |entry|}}
|
|
17
|
+
<div class="changelog-entry">
|
|
18
|
+
<div class="changelog-entry-header">
|
|
19
|
+
<a class="changelog-entry-title" href="/changelog/{{entry.slug}}/">{{entry.title}}</a>
|
|
20
|
+
{{#if entry.tag}}
|
|
21
|
+
<span class="changelog-tag changelog-tag-{{entry.tagClass}}">{{entry.tag}}</span>
|
|
22
|
+
{{/if}}
|
|
23
|
+
</div>
|
|
24
|
+
<span class="changelog-entry-date">{{entry.formattedDate}}</span>
|
|
25
|
+
<div class="changelog-entry-body">
|
|
26
|
+
{{{entry.generatedHtml}}}
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
{{/each}}
|
|
30
|
+
{{/if}}
|
|
31
|
+
</div>
|
|
32
|
+
</main>
|
|
33
|
+
</div>
|
|
34
|
+
{{> footer }}
|
|
35
|
+
{{> scripts }}
|
|
36
|
+
</body>
|
|
37
|
+
|
|
38
|
+
</html>
|