@redocly/theme 0.34.0 → 0.35.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.
@@ -1,6 +1,7 @@
1
+ export { REDOCLY_TEAMS_RBAC } from '@redocly/config';
2
+
1
3
  export const DEFAULT_THEME_NAME = '@redocly/theme';
2
4
  export const USER_THEME_ALIAS = '@theme';
3
- export const REDOCLY_TEAMS_RBAC = 'redocly::teams-rbac';
4
5
  export const DEFAULT_LOCALE_PLACEHOLDER = 'default_locale'
5
6
  export type REQUIRED_OIDC_SCOPES = string[];
6
7
  export type DEFAULT_COOKIE_EXPIRATION = number;
@@ -1,191 +1,23 @@
1
- import type { REDOCLY_TEAMS_RBAC } from '../constants';
2
- type Rbac = Record<string, string> | undefined;
3
-
4
- export type ResolvedNavLinkItem = {
5
- type: 'link';
6
- metadata?: Record<string, unknown>;
7
- link: string;
8
- label: string;
9
- labelTranslationKey?: string;
10
- items?: ResolvedNavItem[];
11
- sidebar?: ResolvedNavItem[]; // for API catalog it contains the corresponding sidebar first item
12
- external?: boolean;
13
- target?: '_self' | '_blank';
14
- languageInsensitive?: boolean;
15
-
16
- version?: string;
17
- isDefault?: boolean;
18
- versionFolderId?: string;
19
-
20
- httpVerb?: string;
21
- separatorLine?: boolean;
22
- routeSlug?: string;
23
- fsPath?: string
24
- active?: boolean;
25
- icon?: string;
26
- srcSet?: string;
27
- [REDOCLY_TEAMS_RBAC]?: Rbac;
28
- };
29
-
30
- export type ResolvedNavGroupItem = {
31
- type: 'group';
32
- metadata?: Record<string, unknown>;
33
- link?: string;
34
- label?: string;
35
- labelTranslationKey?: string;
36
- items?: ResolvedNavItem[];
37
- sidebar?: ResolvedNavItem[]; // for API catalog it contains the corresponding sidebar first item
38
- external?: boolean;
39
- target?: '_self' | '_blank';
40
- expanded?: string;
41
- selectFirstItemOnExpand?: boolean;
42
- languageInsensitive?: boolean;
43
-
44
- version?: string;
45
- isDefault?: boolean;
46
- versionFolderId?: string;
47
-
48
- menuStyle?: MenuStyle;
49
- separatorLine?: boolean;
50
- routeSlug?: string;
51
- fsPath?: string
52
- active?: boolean;
53
- icon?: string;
54
- srcSet?: string;
55
- [REDOCLY_TEAMS_RBAC]?: Rbac;
56
- };
57
-
58
- export type ResolvedNavItem =
59
- | ResolvedNavLinkItem
60
- | ResolvedNavGroupItem
61
- | {
62
- type: 'separator';
63
- metadata?: Record<string, unknown>;
64
- label?: string;
65
- labelTranslationKey?: string;
66
- routeSlug?: never;
67
- fsPath?: never
68
-
69
- version?: string;
70
- isDefault?: boolean;
71
- versionFolderId?: string;
72
-
73
- separatorLine?: boolean;
74
- link?: undefined;
75
- items?: ResolvedNavItem[]; // for typescript
76
- sidebar?: ResolvedNavItem[]; // for typescript
77
- icon?: string;
78
- srcSet?: string;
79
- languageInsensitive?: boolean;
80
- [REDOCLY_TEAMS_RBAC]?: Rbac;
81
- }
82
- | {
83
- type: 'error';
84
-
85
- version?: string;
86
- isDefault?: boolean;
87
- versionFolderId?: string;
88
- metadata?: Record<string, unknown>;
89
- routeSlug?: never;
90
- fsPath?: never
91
-
92
- label: string;
93
- labelTranslationKey?: string;
94
- link?: undefined;
95
- items?: ResolvedNavItem[]; // for typescript
96
- sidebar?: ResolvedNavItem[]; // for typescript
97
- icon?: string; // for typescript
98
- srcSet?: string;
99
- languageInsensitive?: boolean; // for typescript
100
- [REDOCLY_TEAMS_RBAC]?: Rbac;
101
- };
102
-
103
-
104
- export type ResolvedNavItemWithLink = (ResolvedNavLinkItem | ResolvedNavGroupItem) & {
105
- link: string;
106
- };
107
-
108
- export interface PageProps {
109
- seo?: {
110
- title?: string;
111
- };
112
- frontmatter?: Omit<PageProps, 'frontmatter'> & {
113
- settings?: any;
114
- };
115
- disableAutoScroll?: boolean;
116
- lastModified?: string | null;
117
- [k: string]: any;
118
- }
119
- export interface PageStaticData {
120
- props?: PageProps;
121
- [k: string]: unknown;
122
- }
123
- export type UserData = {
124
- isAuthenticated: boolean;
125
- name: string;
126
- picture: string;
127
- };
128
- export interface PageData {
129
- templateId: string;
130
- sharedDataIds: Record<string, string>;
131
- props: PageProps;
132
- versions?: Version[];
133
- userData: UserData;
134
- }
135
- export enum MenuStyle {
136
- Drilldown = 'drilldown',
137
- }
138
-
139
- export type NavItem = {
140
- page?: string;
141
- directory?: string;
142
- group?: string;
143
- groupTranslationKey?: string;
144
- label?: string;
145
- labelTranslationKey?: string;
146
- href?: never;
147
- items?: NavItem[];
148
- separator?: string;
149
- separatorTranslationKey?: string;
150
- separatorLine?: boolean;
151
- version?: string;
152
- menuStyle?: MenuStyle;
153
- external?: boolean;
154
- target?: '_self' | '_blank';
155
- expanded?: boolean | 'always';
156
- selectFirstItemOnExpand?: boolean;
157
- flatten?: boolean; // for API catalog only
158
- };
159
- export interface LogoConfig {
160
- image?: string;
161
- srcSet?: string;
162
- altText?: string;
163
- link?: string;
164
- favicon?: string;
165
- }
166
- export type Version = {
167
- version: string;
168
- label: string;
169
- link: string;
170
- default: boolean;
171
- active: boolean;
172
- notExists?: boolean;
173
- folderId: string;
174
- };
175
- export type VersionConfigItem = {
176
- version: string;
177
- name?: string;
178
- };
179
- export type VersionsConfigType = {
180
- versions: VersionConfigItem[];
181
- default?: string;
182
- };
183
- export type VersionedFolderConfig = {
184
- versionedFiles: Map<string, Set<string>>;
185
- defaultVersion?: string;
186
- versions: VersionConfigItem[];
187
- hasVersionsConfig?: boolean;
1
+ import type {
2
+ ResolvedNavItem,
3
+ ResolvedNavItemWithLink,
4
+ ResolvedNavLinkItem,
5
+ ResolvedNavGroupItem,
6
+ ResolvedConfigLinks,
7
+ NavGroupRecord,
8
+ LogoConfig,
9
+ Version,
10
+ PageStaticData
11
+ } from '@redocly/config';
12
+
13
+ export type {
14
+ ResolvedNavItem,
15
+ ResolvedNavItemWithLink,
16
+ ResolvedNavLinkItem,
17
+ ResolvedNavGroupItem,
18
+ ResolvedConfigLinks,
19
+ NavGroupRecord,
20
+ LogoConfig,
21
+ Version,
22
+ PageStaticData
188
23
  };
189
- export type NavGroup = ResolvedNavItem[] | undefined | string | boolean | number;
190
- export type NavGroupRecord = Record<string, NavGroup>;
191
- export type ResolvedConfigLinks = NavGroup | NavGroupRecord;