@scalar/fastify-api-reference 0.7.0 → 0.7.2

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.
@@ -1,107 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title><%= options.apiReference.pageTitle || 'API Reference' %></title>
5
- <meta charset="utf-8" />
6
- <meta
7
- name="viewport"
8
- content="width=device-width, initial-scale=1" />
9
- <style>
10
- body {
11
- margin: 0;
12
- }
13
- </style>
14
-
15
- <% if (typeof options.apiReference?.theme === 'undefined') { %>
16
- <style>
17
- /* Fastify Theme */
18
- .light-mode {
19
- color-scheme: light;
20
- --theme-color-1: #1c1e21;
21
- --theme-color-2: #757575;
22
- --theme-color-3: #8e8e8e;
23
- --theme-color-disabled: #b4b1b1;
24
- --theme-color-ghost: #a7a7a7;
25
- --theme-color-accent: #2f8555;
26
- --theme-background-1: #fff;
27
- --theme-background-2: #f5f5f5;
28
- --theme-background-3: #ededed;
29
- --theme-background-4: rgba(0, 0, 0, 0.06);
30
- --theme-background-accent: #2f85551f;
31
-
32
- --theme-border-color: rgba(0, 0, 0, 0.1);
33
- --theme-scrollbar-color: rgba(0, 0, 0, 0.18);
34
- --theme-scrollbar-color-active: rgba(0, 0, 0, 0.36);
35
- --theme-lifted-brightness: 1;
36
- --theme-backdrop-brightness: 1;
37
-
38
- --theme-shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.11);
39
- --theme-shadow-2: rgba(0, 0, 0, 0.08) 0px 13px 20px 0px,
40
- rgba(0, 0, 0, 0.08) 0px 3px 8px 0px, #eeeeed 0px 0 0 1px;
41
-
42
- --theme-button-1: rgb(49 53 56);
43
- --theme-button-1-color: #fff;
44
- --theme-button-1-hover: rgb(28 31 33);
45
-
46
- --theme-color-green: #007300;
47
- --theme-color-red: #af272b;
48
- --theme-color-yellow: #b38200;
49
- --theme-color-blue: #3b8ba5;
50
- --theme-color-orange: #fb892c;
51
- --theme-color-purple: #5203d1;
52
- }
53
-
54
- .dark-mode {
55
- color-scheme: dark;
56
- --theme-color-1: rgba(255, 255, 255, 0.9);
57
- --theme-color-2: rgba(255, 255, 255, 0.62);
58
- --theme-color-3: rgba(255, 255, 255, 0.44);
59
- --theme-color-disabled: rgba(255, 255, 255, 0.34);
60
- --theme-color-ghost: rgba(255, 255, 255, 0.26);
61
- --theme-color-accent: #27c2a0;
62
- --theme-background-1: #1b1b1d;
63
- --theme-background-2: #242526;
64
- --theme-background-3: #3b3b3b;
65
- --theme-background-4: rgba(255, 255, 255, 0.06);
66
- --theme-background-accent: #27c2a01f;
67
-
68
- --theme-border-color: rgba(255, 255, 255, 0.1);
69
- --theme-scrollbar-color: rgba(255, 255, 255, 0.24);
70
- --theme-scrollbar-color-active: rgba(255, 255, 255, 0.48);
71
- --theme-lifted-brightness: 1.45;
72
- --theme-backdrop-brightness: 0.5;
73
-
74
- --theme-shadow-1: 0 1px 3px 0 rgb(0, 0, 0, 0.1);
75
- --theme-shadow-2: rgba(15, 15, 15, 0.2) 0px 3px 6px,
76
- rgba(15, 15, 15, 0.4) 0px 9px 24px, 0 0 0 1px rgba(255, 255, 255, 0.1);
77
-
78
- --theme-button-1: #f6f6f6;
79
- --theme-button-1-color: #000;
80
- --theme-button-1-hover: #e7e7e7;
81
-
82
- --theme-color-green: #26b226;
83
- --theme-color-red: #fb565b;
84
- --theme-color-yellow: #ffc426;
85
- --theme-color-blue: #6ecfef;
86
- --theme-color-orange: #ff8d4d;
87
- --theme-color-purple: #b191f9;
88
- }
89
- </style>
90
- <% } %>
91
- </head>
92
- <body>
93
- <% if (options.apiReference?.spec?.url) { %>
94
- <script id="api-reference" data-configuration='<%- JSON.stringify(options.apiReference ?? {}) %>' data-url="<%= options.apiReference?.spec?.url %>"></script>
95
- <% } else if (typeof options.apiReference?.spec?.content === 'object') { %>
96
- <script id="api-reference" data-configuration='<%- JSON.stringify(options.apiReference ?? {}) %>' type="application/json">
97
- <%- JSON.stringify(options.apiReference?.spec?.content) %>
98
- </script>
99
- <% } else if (options.apiReference?.spec?.content) { %>
100
- <script id="api-reference" data-configuration='<%- JSON.stringify(options.apiReference ?? {}) %>' type="application/json">
101
- <%- JSON.stringify(options.apiReference?.spec.content()) %>
102
- </script>
103
- <% } %>
104
-
105
- <script type="module" src="<%= options.routePrefix %>/fastify-api-reference.js"></script>
106
- </body>
107
- </html>