@scm-manager/ui-extensions 2.36.1 → 2.36.2-20220522-120507

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.
@@ -0,0 +1,809 @@
1
+ import * as React from 'react';
2
+ import React__default, { PropsWithChildren, ReactNode, ComponentType } from 'react';
3
+ import { NamespaceStrategies, RepositoryTypeCollection, IndexResources, Repository, Branch, File, Links, Changeset, Group, Me, Plugin, RepositoryRole, HalRepresentation, RepositoryRoleBase, User, Person, Namespace, Tag, Hit, ContentType, RepositoryCreation } from '@scm-manager/ui-types';
4
+
5
+ declare type Predicate<P extends Record<any, any> = Record<any, any>> = (props: P) => unknown;
6
+ declare type ExtensionRegistration<P, T> = {
7
+ predicate: Predicate<P>;
8
+ extension: T;
9
+ extensionName: string;
10
+ priority: number;
11
+ };
12
+ declare type ExtensionPointDefinition<N extends string, T, P = undefined> = {
13
+ name: N;
14
+ type: T;
15
+ props: P;
16
+ };
17
+ declare type BindOptions<Props> = {
18
+ predicate?: Predicate<Props>;
19
+ /**
20
+ * Extensions are ordered by name (ASC).
21
+ */
22
+ extensionName?: string;
23
+ /**
24
+ * Extensions are ordered by priority (DESC).
25
+ */
26
+ priority?: number;
27
+ };
28
+ /**
29
+ * Binder is responsible for binding plugin extensions to their corresponding extension points.
30
+ * The Binder class is mainly exported for testing, plugins should only use the default export.
31
+ */
32
+ declare class Binder {
33
+ name: string;
34
+ extensionPoints: {
35
+ [key: string]: Array<ExtensionRegistration<unknown, unknown>>;
36
+ };
37
+ constructor(name: string);
38
+ /**
39
+ * Binds an extension to the extension point.
40
+ *
41
+ * @param extensionPoint name of extension point
42
+ * @param extension provided extension
43
+ */
44
+ bind<E extends ExtensionPointDefinition<string, unknown>>(extensionPoint: E["name"], extension: E["type"]): void;
45
+ /**
46
+ * Binds an extension to the extension point.
47
+ *
48
+ * @param extensionPoint name of extension point
49
+ * @param extension provided extension
50
+ * @param predicate to decide if the extension gets rendered for the given props
51
+ * @param extensionName name used for sorting alphabetically on retrieval (ASC)
52
+ */
53
+ bind<E extends ExtensionPointDefinition<string, unknown, any>>(extensionPoint: E["name"], extension: E["type"], predicate?: Predicate<E["props"]>, extensionName?: string): void;
54
+ /**
55
+ * Binds an extension to the extension point.
56
+ *
57
+ * @param extensionPoint name of extension point
58
+ * @param extension provided extension
59
+ * @param options object with additional settings
60
+ */
61
+ bind<E extends ExtensionPointDefinition<string, unknown, any>>(extensionPoint: E["name"], extension: E["type"], options?: BindOptions<E["props"]>): void;
62
+ /**
63
+ * Returns the first extension or null for the given extension point and its props.
64
+ *
65
+ * @param extensionPoint name of extension point
66
+ */
67
+ getExtension<E extends ExtensionPointDefinition<string, any>>(extensionPoint: E["name"]): E["type"] | null;
68
+ /**
69
+ * Returns the first extension or null for the given extension point and its props.
70
+ *
71
+ * @param extensionPoint name of extension point
72
+ * @param props of the extension point
73
+ */
74
+ getExtension<E extends ExtensionPointDefinition<string, any, any>>(extensionPoint: E["name"], props: E["props"]): E["type"] | null;
75
+ /**
76
+ * Returns all registered extensions for the given extension point and its props.
77
+ *
78
+ * @param extensionPoint name of extension point
79
+ */
80
+ getExtensions<E extends ExtensionPointDefinition<string, unknown>>(extensionPoint: E["name"]): Array<E["type"]>;
81
+ /**
82
+ * Returns all registered extensions for the given extension point and its props.
83
+ *
84
+ * @param extensionPoint name of extension point
85
+ * @param props of the extension point
86
+ */
87
+ getExtensions<E extends ExtensionPointDefinition<string, unknown, any>>(extensionPoint: E["name"], props: E["props"]): Array<E["type"]>;
88
+ /**
89
+ * Returns true if at least one extension is bound to the extension point and its props.
90
+ */
91
+ hasExtension<E extends ExtensionPointDefinition<string, unknown>>(extensionPoint: E["name"]): boolean;
92
+ /**
93
+ * Returns true if at least one extension is bound to the extension point and its props.
94
+ */
95
+ hasExtension<E extends ExtensionPointDefinition<string, unknown, any>>(extensionPoint: E["name"], props: E["props"]): boolean;
96
+ /**
97
+ * Sort extensions in ascending order, starting with entries with specified extensionName.
98
+ */
99
+ sortExtensions: (a: ExtensionRegistration<unknown, unknown>, b: ExtensionRegistration<unknown, unknown>) => 0 | 1 | -1;
100
+ }
101
+ declare const binder: Binder;
102
+
103
+ /**
104
+ * The BinderContext should only be used to override the default binder for testing purposes.
105
+ */
106
+ declare const BinderContext: React.Context<Binder>;
107
+ /**
108
+ * Hook to get the binder from context.
109
+ */
110
+ declare const useBinder: () => Binder;
111
+
112
+ declare type Renderable<P> = React__default.ReactElement | React__default.ComponentType<P>;
113
+ declare type RenderableExtensionPointDefinition<Name extends string = string, P = undefined> = ExtensionPointDefinition<Name, Renderable<P>, P>;
114
+ declare type SimpleRenderableDynamicExtensionPointDefinition<Prefix extends string, Suffix extends string | undefined, Properties> = RenderableExtensionPointDefinition<Suffix extends string ? `${Prefix}${Suffix}` : `${Prefix}${string}`, Properties>;
115
+ /**
116
+ * @deprecated Obsolete type
117
+ */
118
+ declare type PropTransformer = (props: object) => object;
119
+ declare type BaseProps<E extends RenderableExtensionPointDefinition> = {
120
+ name: E["name"];
121
+ renderAll?: boolean;
122
+ /**
123
+ * @deprecated Obsolete property, do not use
124
+ */
125
+ propTransformer?: PropTransformer;
126
+ wrapper?: boolean;
127
+ };
128
+ declare type Props<E extends RenderableExtensionPointDefinition> = BaseProps<E> & (E["props"] extends undefined ? {
129
+ props?: E["props"];
130
+ } : {
131
+ props: E["props"];
132
+ });
133
+ /**
134
+ * ExtensionPoint renders components which are bound to an extension point.
135
+ */
136
+ declare function ExtensionPoint<E extends RenderableExtensionPointDefinition<string, any> = RenderableExtensionPointDefinition<string, any>>({ name, propTransformer, props, renderAll, wrapper, children }: PropsWithChildren<Props<E>>): JSX.Element | null;
137
+
138
+ declare type ExtractProps<T> = T extends React__default.ComponentType<infer U> ? U : never;
139
+
140
+ declare type RepositoryCreatorSubFormProps = {
141
+ repository: RepositoryCreation;
142
+ onChange: (repository: RepositoryCreation) => void;
143
+ setValid: (valid: boolean) => void;
144
+ disabled?: boolean;
145
+ };
146
+ declare type RepositoryCreatorComponentProps = ExtractProps<RepositoryCreator["type"]["component"]>;
147
+ /**
148
+ * @deprecated use {@link RepositoryCreator}`["type"]` instead
149
+ */
150
+ declare type RepositoryCreatorExtension = RepositoryCreator["type"];
151
+ declare type RepositoryCreator = ExtensionPointDefinition<"repos.creator", {
152
+ subtitle: string;
153
+ path: string;
154
+ icon: string;
155
+ label: string;
156
+ component: React__default.ComponentType<{
157
+ namespaceStrategies: NamespaceStrategies;
158
+ repositoryTypes: RepositoryTypeCollection;
159
+ index: IndexResources;
160
+ nameForm: React__default.ComponentType<RepositoryCreatorSubFormProps>;
161
+ informationForm: React__default.ComponentType<RepositoryCreatorSubFormProps>;
162
+ }>;
163
+ }>;
164
+ declare type RepositoryFlags = RenderableExtensionPointDefinition<"repository.flags", {
165
+ repository: Repository;
166
+ tooltipLocation?: "bottom" | "right" | "top" | "left";
167
+ }>;
168
+ /**
169
+ * @deprecated use {@link ReposSourcesActionbar}`["props"]` instead
170
+ */
171
+ declare type ReposSourcesActionbarExtensionProps = ReposSourcesActionbar["props"];
172
+ /**
173
+ * @deprecated use {@link ReposSourcesActionbar} instead
174
+ */
175
+ declare type ReposSourcesActionbarExtension = ReposSourcesActionbar;
176
+ declare type ReposSourcesActionbar = RenderableExtensionPointDefinition<"repos.sources.actionbar", {
177
+ baseUrl: string;
178
+ revision: string;
179
+ branch: Branch | undefined;
180
+ path: string;
181
+ sources: File;
182
+ repository: Repository;
183
+ }>;
184
+ /**
185
+ * @deprecated use {@link ReposSourcesEmptyActionbar}`["props"]` instead
186
+ */
187
+ declare type ReposSourcesEmptyActionbarExtensionProps = ReposSourcesEmptyActionbar["props"];
188
+ /**
189
+ * @deprecated use {@link ReposSourcesEmptyActionbar} instead
190
+ */
191
+ declare type ReposSourcesEmptyActionbarExtension = ReposSourcesEmptyActionbar;
192
+ declare type ReposSourcesEmptyActionbar = RenderableExtensionPointDefinition<"repos.sources.empty.actionbar", {
193
+ sources: File;
194
+ repository: Repository;
195
+ }>;
196
+ /**
197
+ * @deprecated use {@link ReposSourcesTreeWrapper}`["props"]` instead
198
+ */
199
+ declare type ReposSourcesTreeWrapperProps = ReposSourcesTreeWrapper["props"];
200
+ /**
201
+ * @deprecated use {@link ReposSourcesTreeWrapper} instead
202
+ */
203
+ declare type ReposSourcesTreeWrapperExtension = ReposSourcesTreeWrapper;
204
+ declare type ReposSourcesTreeWrapper = RenderableExtensionPointDefinition<"repos.source.tree.wrapper", {
205
+ repository: Repository;
206
+ directory: File;
207
+ baseUrl: string;
208
+ revision: string;
209
+ }>;
210
+ declare type ReposSourcesTreeRowProps = {
211
+ repository: Repository;
212
+ file: File;
213
+ };
214
+ /**
215
+ * @deprecated use {@link ReposSourcesTreeRowRight} instead
216
+ */
217
+ declare type ReposSourcesTreeRowRightExtension = ReposSourcesTreeRowRight;
218
+ declare type ReposSourcesTreeRowRight = RenderableExtensionPointDefinition<"repos.sources.tree.row.right", ReposSourcesTreeRowProps>;
219
+ /**
220
+ * @deprecated use {@link ReposSourcesTreeRowAfter} instead
221
+ */
222
+ declare type ReposSourcesTreeRowAfterExtension = ReposSourcesTreeRowAfter;
223
+ declare type ReposSourcesTreeRowAfter = RenderableExtensionPointDefinition<"repos.sources.tree.row.after", ReposSourcesTreeRowProps>;
224
+ /**
225
+ * @deprecated use {@link PrimaryNavigationLoginButton}`["props"]` instead
226
+ */
227
+ declare type PrimaryNavigationLoginButtonProps = PrimaryNavigationLoginButton["props"];
228
+ /**
229
+ * use {@link PrimaryNavigationLoginButton} instead
230
+ */
231
+ declare type PrimaryNavigationLoginButtonExtension = PrimaryNavigationLoginButton;
232
+ declare type PrimaryNavigationLoginButton = RenderableExtensionPointDefinition<"primary-navigation.login", {
233
+ links: Links;
234
+ label: string;
235
+ loginUrl: string;
236
+ from: string;
237
+ to: string;
238
+ className: string;
239
+ content: React__default.ReactNode;
240
+ }>;
241
+ /**
242
+ * @deprecated use {@link PrimaryNavigationLogoutButtonExtension}`["props"]` instead
243
+ */
244
+ declare type PrimaryNavigationLogoutButtonProps = PrimaryNavigationLogoutButton["props"];
245
+ /**
246
+ * @deprecated use {@link PrimaryNavigationLogoutButton} instead
247
+ */
248
+ declare type PrimaryNavigationLogoutButtonExtension = PrimaryNavigationLogoutButton;
249
+ declare type PrimaryNavigationLogoutButton = RenderableExtensionPointDefinition<"primary-navigation.logout", {
250
+ links: Links;
251
+ label: string;
252
+ className: string;
253
+ content: React__default.ReactNode;
254
+ }>;
255
+ /**
256
+ * @deprecated use {@link SourceExtension}`["props"]` instead
257
+ */
258
+ declare type SourceExtensionProps = SourceExtension["props"];
259
+ declare type SourceExtension = RenderableExtensionPointDefinition<"repos.sources.extensions", {
260
+ repository: Repository;
261
+ baseUrl: string;
262
+ revision: string;
263
+ extension: string;
264
+ sources: File | undefined;
265
+ path: string;
266
+ }>;
267
+ /**
268
+ * @deprecated use {@link RepositoryOverviewTop}`["props"]` instead
269
+ */
270
+ declare type RepositoryOverviewTopExtensionProps = RepositoryOverviewTop["props"];
271
+ /**
272
+ * @deprecated use {@link RepositoryOverviewTop} instead
273
+ */
274
+ declare type RepositoryOverviewTopExtension = RepositoryOverviewTop;
275
+ declare type RepositoryOverviewTop = RenderableExtensionPointDefinition<"repository.overview.top", {
276
+ page: number;
277
+ search: string;
278
+ namespace?: string;
279
+ }>;
280
+ /**
281
+ * @deprecated use {@link RepositoryOverviewLeft} instead
282
+ */
283
+ declare type RepositoryOverviewLeftExtension = RepositoryOverviewLeft;
284
+ declare type RepositoryOverviewLeft = ExtensionPointDefinition<"repository.overview.left", React__default.ComponentType>;
285
+ /**
286
+ * @deprecated use {@link RepositoryOverviewTitle} instead
287
+ */
288
+ declare type RepositoryOverviewTitleExtension = RepositoryOverviewTitle;
289
+ declare type RepositoryOverviewTitle = RenderableExtensionPointDefinition<"repository.overview.title">;
290
+ /**
291
+ * @deprecated use {@link RepositoryOverviewSubtitle} instead
292
+ */
293
+ declare type RepositoryOverviewSubtitleExtension = RepositoryOverviewSubtitle;
294
+ declare type RepositoryOverviewSubtitle = RenderableExtensionPointDefinition<"repository.overview.subtitle">;
295
+ declare type AdminNavigation = RenderableExtensionPointDefinition<"admin.navigation", {
296
+ links: Links;
297
+ url: string;
298
+ }>;
299
+ declare type AdminRoute = RenderableExtensionPointDefinition<"admin.route", {
300
+ links: Links;
301
+ url: string;
302
+ }>;
303
+ declare type AdminSetting = RenderableExtensionPointDefinition<"admin.setting", {
304
+ links: Links;
305
+ url: string;
306
+ }>;
307
+ /**
308
+ * - can be used to replace the whole description of a changeset
309
+ *
310
+ * @deprecated Use `changeset.description.tokens` instead
311
+ */
312
+ declare type ChangesetDescription = RenderableExtensionPointDefinition<"changeset.description", {
313
+ changeset: Changeset;
314
+ value: string;
315
+ }>;
316
+ /**
317
+ * - Can be used to replace parts of a changeset description with components
318
+ * - Has to be bound with a funktion taking the changeset and the (partial) description and returning `Replacement` objects with the following attributes:
319
+ * - textToReplace: The text part of the description that should be replaced by a component
320
+ * - replacement: The component to take instead of the text to replace
321
+ * - replaceAll: Optional boolean; if set to `true`, all occurances of the text will be replaced (default: `false`)
322
+ */
323
+ declare type ChangesetDescriptionTokens = ExtensionPointDefinition<"changeset.description.tokens", (changeset: Changeset, value: string) => Array<{
324
+ textToReplace: string;
325
+ replacement: ReactNode;
326
+ replaceAll?: boolean;
327
+ }>, {
328
+ changeset: Changeset;
329
+ value: string;
330
+ }>;
331
+ declare type ChangesetRight = RenderableExtensionPointDefinition<"changeset.right", {
332
+ repository: Repository;
333
+ changeset: Changeset;
334
+ }>;
335
+ declare type ChangesetsAuthorSuffix = RenderableExtensionPointDefinition<"changesets.author.suffix", {
336
+ changeset: Changeset;
337
+ }>;
338
+ declare type GroupNavigation = RenderableExtensionPointDefinition<"group.navigation", {
339
+ group: Group;
340
+ url: string;
341
+ }>;
342
+ declare type GroupRoute = RenderableExtensionPointDefinition<"group.route", {
343
+ group: Group;
344
+ url: string;
345
+ }>;
346
+ declare type GroupSetting = RenderableExtensionPointDefinition<"group.setting", {
347
+ group: Group;
348
+ url: string;
349
+ }>;
350
+ /**
351
+ * - Add a new Route to the main Route (scm/)
352
+ * - Props: authenticated?: boolean, links: Links
353
+ */
354
+ declare type MainRoute = RenderableExtensionPointDefinition<"main.route", {
355
+ me: Me;
356
+ authenticated?: boolean;
357
+ }>;
358
+ declare type PluginAvatar = RenderableExtensionPointDefinition<"plugins.plugin-avatar", {
359
+ plugin: Plugin;
360
+ }>;
361
+ declare type PrimaryNavigation = RenderableExtensionPointDefinition<"primary-navigation", {
362
+ links: Links;
363
+ }>;
364
+ /**
365
+ * - A placeholder for the first navigation menu.
366
+ * - A PrimaryNavigationLink Component can be used here
367
+ * - Actually this Extension Point is used from the Activity Plugin to display the activities at the first Main Navigation menu.
368
+ */
369
+ declare type PrimaryNavigationFirstMenu = RenderableExtensionPointDefinition<"primary-navigation.first-menu", {
370
+ links: Links;
371
+ label: string;
372
+ }>;
373
+ declare type ProfileRoute = RenderableExtensionPointDefinition<"profile.route", {
374
+ me: Me;
375
+ url: string;
376
+ }>;
377
+ declare type ProfileSetting = RenderableExtensionPointDefinition<"profile.setting", {
378
+ me?: Me;
379
+ url: string;
380
+ links: Links;
381
+ }>;
382
+ declare type RepoConfigRoute = RenderableExtensionPointDefinition<"repo-config.route", {
383
+ repository: Repository;
384
+ url: string;
385
+ }>;
386
+ declare type RepoConfigDetails = RenderableExtensionPointDefinition<"repo-config.details", {
387
+ repository: Repository;
388
+ url: string;
389
+ }>;
390
+ declare type ReposBranchDetailsInformation = RenderableExtensionPointDefinition<"repos.branch-details.information", {
391
+ repository: Repository;
392
+ branch: Branch;
393
+ }>;
394
+ /**
395
+ * - Location: At meta data view for file
396
+ * - can be used to render additional meta data line
397
+ * - Props: file: string, repository: Repository, revision: string
398
+ */
399
+ declare type ReposContentMetaData = RenderableExtensionPointDefinition<"repos.content.metadata", {
400
+ file: File;
401
+ repository: Repository;
402
+ revision: string;
403
+ }>;
404
+ declare type ReposCreateNamespace = RenderableExtensionPointDefinition<"repos.create.namespace", {
405
+ label: string;
406
+ helpText: string;
407
+ value: string;
408
+ onChange: (namespace: string) => void;
409
+ errorMessage: string;
410
+ validationError?: boolean;
411
+ }>;
412
+ declare type ReposSourcesContentActionBar = RenderableExtensionPointDefinition<"repos.sources.content.actionbar", {
413
+ repository: Repository;
414
+ file: File;
415
+ revision: string;
416
+ handleExtensionError: React__default.Dispatch<React__default.SetStateAction<Error | undefined>>;
417
+ }>;
418
+ declare type RepositoryNavigation = RenderableExtensionPointDefinition<"repository.navigation", {
419
+ repository: Repository;
420
+ url: string;
421
+ indexLinks: Links;
422
+ }>;
423
+ declare type RepositoryNavigationTopLevel = RenderableExtensionPointDefinition<"repository.navigation.topLevel", {
424
+ repository: Repository;
425
+ url: string;
426
+ indexLinks: Links;
427
+ }>;
428
+ declare type RepositoryRoleDetailsInformation = RenderableExtensionPointDefinition<"repositoryRole.role-details.information", {
429
+ role: RepositoryRole;
430
+ }>;
431
+ declare type RepositorySetting = RenderableExtensionPointDefinition<"repository.setting", {
432
+ repository: Repository;
433
+ url: string;
434
+ indexLinks: Links;
435
+ }>;
436
+ declare type RepositoryAvatar = RenderableExtensionPointDefinition<"repos.repository-avatar", {
437
+ repository: Repository;
438
+ }>;
439
+ /**
440
+ * - Location: At each repository in repository overview
441
+ * - can be used to add avatar for each repository (e.g., to mark repository type)
442
+ */
443
+ declare type PrimaryRepositoryAvatar = RenderableExtensionPointDefinition<"repos.repository-avatar.primary", {
444
+ repository: Repository;
445
+ }>;
446
+ /**
447
+ * - Location: At bottom of a single repository view
448
+ * - can be used to show detailed information about the repository (how to clone, e.g.)
449
+ */
450
+ declare type RepositoryDetailsInformation = RenderableExtensionPointDefinition<"repos.repository-details.information", {
451
+ repository: Repository;
452
+ }>;
453
+ /**
454
+ * - Location: At sources viewer
455
+ * - can be used to render a special source that is not an image or a source code
456
+ */
457
+ declare type RepositorySourcesView = RenderableExtensionPointDefinition<"repos.sources.view", {
458
+ file: File;
459
+ contentType: string;
460
+ revision: string;
461
+ basePath: string;
462
+ }>;
463
+ declare type RolesRoute = RenderableExtensionPointDefinition<"roles.route", {
464
+ role: HalRepresentation & RepositoryRoleBase & {
465
+ creationDate?: string;
466
+ lastModified?: string;
467
+ };
468
+ url: string;
469
+ }>;
470
+ declare type UserRoute = RenderableExtensionPointDefinition<"user.route", {
471
+ user: User;
472
+ url: string;
473
+ }>;
474
+ declare type UserSetting = RenderableExtensionPointDefinition<"user.setting", {
475
+ user: User;
476
+ url: string;
477
+ }>;
478
+ /**
479
+ * - Dynamic extension point for custom language-specific renderers
480
+ * - Overrides the default Syntax Highlighter for the given language
481
+ * - Used by the Markdown Plantuml Plugin
482
+ */
483
+ declare type MarkdownCodeRenderer<Language extends string | undefined = undefined> = SimpleRenderableDynamicExtensionPointDefinition<"markdown-renderer.code.", Language, {
484
+ language?: Language extends string ? Language : string;
485
+ value: string;
486
+ indexLinks: Links;
487
+ }>;
488
+ /**
489
+ * - Define custom protocols and their renderers for links in markdown
490
+ *
491
+ * Example:
492
+ * ```markdown
493
+ * [description](myprotocol:somelink)
494
+ * ```
495
+ *
496
+ * ```typescript
497
+ * binder.bind<extensionPoints.MarkdownLinkProtocolRenderer<"myprotocol">>("markdown-renderer.link.protocol", { protocol: "myprotocol", renderer: MyProtocolRenderer })
498
+ * ```
499
+ */
500
+ declare type MarkdownLinkProtocolRenderer<Protocol extends string | undefined = undefined> = ExtensionPointDefinition<"markdown-renderer.link.protocol", {
501
+ protocol: Protocol extends string ? Protocol : string;
502
+ renderer: React__default.ComponentType<{
503
+ protocol: Protocol extends string ? Protocol : string;
504
+ href: string;
505
+ }>;
506
+ }>;
507
+ /**
508
+ * Used to determine an avatar image url from a given {@link Person}.
509
+ *
510
+ * @see https://github.com/scm-manager/scm-gravatar-plugin
511
+ */
512
+ declare type AvatarFactory = ExtensionPointDefinition<"avatar.factory", (person: Person) => string | undefined>;
513
+ /**
514
+ * - Location: At every changeset (detailed view as well as changeset overview)
515
+ * - can be used to add avatar (such as gravatar) for each changeset
516
+ *
517
+ * @deprecated Has no effect, use {@link AvatarFactory} instead
518
+ */
519
+ declare type ChangesetAvatarFactory = ExtensionPointDefinition<"changeset.avatar-factory", (changeset: Changeset) => void>;
520
+ declare type MainRedirectProps = {
521
+ me: Me;
522
+ authenticated?: boolean;
523
+ };
524
+ /**
525
+ * - Extension Point for a link factory that provide the Redirect Link
526
+ * - Actually used from the activity plugin: binder.bind("main.redirect", () => "/activity");
527
+ */
528
+ declare type MainRedirect = ExtensionPointDefinition<"main.redirect", (props: MainRedirectProps) => string, MainRedirectProps>;
529
+ /**
530
+ * - A Factory function to create markdown [renderer](https://github.com/rexxars/react-markdown#node-types)
531
+ * - The factory function will be called with a renderContext parameter of type Object. this parameter is given as a prop for the {@link MarkdownView} component.
532
+ *
533
+ * @deprecated Use {@link MarkdownCodeRenderer} or {@link MarkdownLinkProtocolRenderer} instead
534
+ */
535
+ declare type MarkdownRendererFactory = ExtensionPointDefinition<"markdown-renderer-factory", (renderContext: unknown) => Record<string, React__default.ComponentType<any>>>;
536
+ declare type RepositoryCardBeforeTitle = RenderableExtensionPointDefinition<"repository.card.beforeTitle", {
537
+ repository: Repository;
538
+ }>;
539
+ declare type RepositoryCreationInitialization = RenderableExtensionPointDefinition<"repos.create.initialize", {
540
+ repository: Repository;
541
+ setCreationContextEntry: (key: string, value: any) => void;
542
+ indexResources: Partial<HalRepresentation> & {
543
+ links?: Links;
544
+ version?: string;
545
+ initialization?: string;
546
+ };
547
+ }>;
548
+ declare type NamespaceTopLevelNavigation = RenderableExtensionPointDefinition<"namespace.navigation.topLevel", {
549
+ namespace: Namespace;
550
+ url: string;
551
+ }>;
552
+ declare type NamespaceRoute = RenderableExtensionPointDefinition<"namespace.route", {
553
+ namespace: Namespace;
554
+ url: string;
555
+ }>;
556
+ declare type NamespaceSetting = RenderableExtensionPointDefinition<"namespace.setting", {
557
+ namespace: Namespace;
558
+ url: string;
559
+ }>;
560
+ declare type RepositoryTagDetailsInformation = RenderableExtensionPointDefinition<"repos.tag-details.information", {
561
+ repository: Repository;
562
+ tag: Tag;
563
+ }>;
564
+ declare type SearchHitRenderer<Type extends string | undefined = undefined> = RenderableExtensionPointDefinition<Type extends string ? `search.hit.${Type}.renderer` : `search.hit.${string}.renderer`, {
565
+ hit: Hit;
566
+ }>;
567
+ declare type RepositorySourcesContentDownloadButton = RenderableExtensionPointDefinition<"repos.sources.content.downloadButton", {
568
+ repository: Repository;
569
+ file: File;
570
+ }>;
571
+ declare type RepositoryRoute = RenderableExtensionPointDefinition<"repository.route", {
572
+ repository: Repository;
573
+ url: string;
574
+ indexLinks: Links;
575
+ }>;
576
+ declare type RepositoryRedirectProps = {
577
+ namespace: string;
578
+ name: string;
579
+ repository: Repository;
580
+ loading: false;
581
+ error: null;
582
+ repoLink: string;
583
+ indexLinks: Links;
584
+ match: {
585
+ params: {
586
+ namespace: string;
587
+ name: string;
588
+ };
589
+ isExact: boolean;
590
+ path: string;
591
+ url: string;
592
+ };
593
+ };
594
+ declare type RepositoryRedirect = ExtensionPointDefinition<"repository.redirect", (props: RepositoryRedirectProps) => string, RepositoryRedirectProps>;
595
+ declare type InitializationStep<Step extends string | undefined = undefined> = SimpleRenderableDynamicExtensionPointDefinition<"initialization.step.", Step, {
596
+ data: HalRepresentation;
597
+ }>;
598
+ declare type ContentActionExtensionProps = {
599
+ repository: Repository;
600
+ file: File;
601
+ revision: string;
602
+ handleExtensionError: React__default.Dispatch<React__default.SetStateAction<Error | undefined>>;
603
+ contentType?: ContentType;
604
+ };
605
+ declare type BaseActionBarOverflowMenuProps = {
606
+ category: string;
607
+ label: string;
608
+ icon: string;
609
+ props?: unknown;
610
+ };
611
+ declare type ActionMenuProps = BaseActionBarOverflowMenuProps & {
612
+ action: (props: ContentActionExtensionProps) => void;
613
+ };
614
+ declare type ModalMenuProps = BaseActionBarOverflowMenuProps & {
615
+ modalElement: ComponentType<ContentActionExtensionProps & {
616
+ close: () => void;
617
+ }>;
618
+ };
619
+ declare type LinkMenuProps = BaseActionBarOverflowMenuProps & {
620
+ link: (props: ContentActionExtensionProps) => string;
621
+ };
622
+ declare type FileViewActionBarOverflowMenu = ExtensionPointDefinition<"repos.sources.content.actionbar.menu", ActionMenuProps | ModalMenuProps | LinkMenuProps, ContentActionExtensionProps>;
623
+
624
+ type extensionPoints_RepositoryCreatorComponentProps = RepositoryCreatorComponentProps;
625
+ type extensionPoints_RepositoryCreatorExtension = RepositoryCreatorExtension;
626
+ type extensionPoints_RepositoryCreator = RepositoryCreator;
627
+ type extensionPoints_RepositoryFlags = RepositoryFlags;
628
+ type extensionPoints_ReposSourcesActionbarExtensionProps = ReposSourcesActionbarExtensionProps;
629
+ type extensionPoints_ReposSourcesActionbarExtension = ReposSourcesActionbarExtension;
630
+ type extensionPoints_ReposSourcesActionbar = ReposSourcesActionbar;
631
+ type extensionPoints_ReposSourcesEmptyActionbarExtensionProps = ReposSourcesEmptyActionbarExtensionProps;
632
+ type extensionPoints_ReposSourcesEmptyActionbarExtension = ReposSourcesEmptyActionbarExtension;
633
+ type extensionPoints_ReposSourcesEmptyActionbar = ReposSourcesEmptyActionbar;
634
+ type extensionPoints_ReposSourcesTreeWrapperProps = ReposSourcesTreeWrapperProps;
635
+ type extensionPoints_ReposSourcesTreeWrapperExtension = ReposSourcesTreeWrapperExtension;
636
+ type extensionPoints_ReposSourcesTreeWrapper = ReposSourcesTreeWrapper;
637
+ type extensionPoints_ReposSourcesTreeRowProps = ReposSourcesTreeRowProps;
638
+ type extensionPoints_ReposSourcesTreeRowRightExtension = ReposSourcesTreeRowRightExtension;
639
+ type extensionPoints_ReposSourcesTreeRowRight = ReposSourcesTreeRowRight;
640
+ type extensionPoints_ReposSourcesTreeRowAfterExtension = ReposSourcesTreeRowAfterExtension;
641
+ type extensionPoints_ReposSourcesTreeRowAfter = ReposSourcesTreeRowAfter;
642
+ type extensionPoints_PrimaryNavigationLoginButtonProps = PrimaryNavigationLoginButtonProps;
643
+ type extensionPoints_PrimaryNavigationLoginButtonExtension = PrimaryNavigationLoginButtonExtension;
644
+ type extensionPoints_PrimaryNavigationLoginButton = PrimaryNavigationLoginButton;
645
+ type extensionPoints_PrimaryNavigationLogoutButtonProps = PrimaryNavigationLogoutButtonProps;
646
+ type extensionPoints_PrimaryNavigationLogoutButtonExtension = PrimaryNavigationLogoutButtonExtension;
647
+ type extensionPoints_PrimaryNavigationLogoutButton = PrimaryNavigationLogoutButton;
648
+ type extensionPoints_SourceExtensionProps = SourceExtensionProps;
649
+ type extensionPoints_SourceExtension = SourceExtension;
650
+ type extensionPoints_RepositoryOverviewTopExtensionProps = RepositoryOverviewTopExtensionProps;
651
+ type extensionPoints_RepositoryOverviewTopExtension = RepositoryOverviewTopExtension;
652
+ type extensionPoints_RepositoryOverviewTop = RepositoryOverviewTop;
653
+ type extensionPoints_RepositoryOverviewLeftExtension = RepositoryOverviewLeftExtension;
654
+ type extensionPoints_RepositoryOverviewLeft = RepositoryOverviewLeft;
655
+ type extensionPoints_RepositoryOverviewTitleExtension = RepositoryOverviewTitleExtension;
656
+ type extensionPoints_RepositoryOverviewTitle = RepositoryOverviewTitle;
657
+ type extensionPoints_RepositoryOverviewSubtitleExtension = RepositoryOverviewSubtitleExtension;
658
+ type extensionPoints_RepositoryOverviewSubtitle = RepositoryOverviewSubtitle;
659
+ type extensionPoints_AdminNavigation = AdminNavigation;
660
+ type extensionPoints_AdminRoute = AdminRoute;
661
+ type extensionPoints_AdminSetting = AdminSetting;
662
+ type extensionPoints_ChangesetDescription = ChangesetDescription;
663
+ type extensionPoints_ChangesetDescriptionTokens = ChangesetDescriptionTokens;
664
+ type extensionPoints_ChangesetRight = ChangesetRight;
665
+ type extensionPoints_ChangesetsAuthorSuffix = ChangesetsAuthorSuffix;
666
+ type extensionPoints_GroupNavigation = GroupNavigation;
667
+ type extensionPoints_GroupRoute = GroupRoute;
668
+ type extensionPoints_GroupSetting = GroupSetting;
669
+ type extensionPoints_MainRoute = MainRoute;
670
+ type extensionPoints_PluginAvatar = PluginAvatar;
671
+ type extensionPoints_PrimaryNavigation = PrimaryNavigation;
672
+ type extensionPoints_PrimaryNavigationFirstMenu = PrimaryNavigationFirstMenu;
673
+ type extensionPoints_ProfileRoute = ProfileRoute;
674
+ type extensionPoints_ProfileSetting = ProfileSetting;
675
+ type extensionPoints_RepoConfigRoute = RepoConfigRoute;
676
+ type extensionPoints_RepoConfigDetails = RepoConfigDetails;
677
+ type extensionPoints_ReposBranchDetailsInformation = ReposBranchDetailsInformation;
678
+ type extensionPoints_ReposContentMetaData = ReposContentMetaData;
679
+ type extensionPoints_ReposCreateNamespace = ReposCreateNamespace;
680
+ type extensionPoints_ReposSourcesContentActionBar = ReposSourcesContentActionBar;
681
+ type extensionPoints_RepositoryNavigation = RepositoryNavigation;
682
+ type extensionPoints_RepositoryNavigationTopLevel = RepositoryNavigationTopLevel;
683
+ type extensionPoints_RepositoryRoleDetailsInformation = RepositoryRoleDetailsInformation;
684
+ type extensionPoints_RepositorySetting = RepositorySetting;
685
+ type extensionPoints_RepositoryAvatar = RepositoryAvatar;
686
+ type extensionPoints_PrimaryRepositoryAvatar = PrimaryRepositoryAvatar;
687
+ type extensionPoints_RepositoryDetailsInformation = RepositoryDetailsInformation;
688
+ type extensionPoints_RepositorySourcesView = RepositorySourcesView;
689
+ type extensionPoints_RolesRoute = RolesRoute;
690
+ type extensionPoints_UserRoute = UserRoute;
691
+ type extensionPoints_UserSetting = UserSetting;
692
+ type extensionPoints_MarkdownCodeRenderer<Language extends string | undefined = undefined> = MarkdownCodeRenderer<Language>;
693
+ type extensionPoints_MarkdownLinkProtocolRenderer<Protocol extends string | undefined = undefined> = MarkdownLinkProtocolRenderer<Protocol>;
694
+ type extensionPoints_AvatarFactory = AvatarFactory;
695
+ type extensionPoints_ChangesetAvatarFactory = ChangesetAvatarFactory;
696
+ type extensionPoints_MainRedirect = MainRedirect;
697
+ type extensionPoints_MarkdownRendererFactory = MarkdownRendererFactory;
698
+ type extensionPoints_RepositoryCardBeforeTitle = RepositoryCardBeforeTitle;
699
+ type extensionPoints_RepositoryCreationInitialization = RepositoryCreationInitialization;
700
+ type extensionPoints_NamespaceTopLevelNavigation = NamespaceTopLevelNavigation;
701
+ type extensionPoints_NamespaceRoute = NamespaceRoute;
702
+ type extensionPoints_NamespaceSetting = NamespaceSetting;
703
+ type extensionPoints_RepositoryTagDetailsInformation = RepositoryTagDetailsInformation;
704
+ type extensionPoints_SearchHitRenderer<Type extends string | undefined = undefined> = SearchHitRenderer<Type>;
705
+ type extensionPoints_RepositorySourcesContentDownloadButton = RepositorySourcesContentDownloadButton;
706
+ type extensionPoints_RepositoryRoute = RepositoryRoute;
707
+ type extensionPoints_RepositoryRedirect = RepositoryRedirect;
708
+ type extensionPoints_InitializationStep<Step extends string | undefined = undefined> = InitializationStep<Step>;
709
+ type extensionPoints_ContentActionExtensionProps = ContentActionExtensionProps;
710
+ type extensionPoints_ActionMenuProps = ActionMenuProps;
711
+ type extensionPoints_ModalMenuProps = ModalMenuProps;
712
+ type extensionPoints_LinkMenuProps = LinkMenuProps;
713
+ type extensionPoints_FileViewActionBarOverflowMenu = FileViewActionBarOverflowMenu;
714
+ declare namespace extensionPoints {
715
+ export {
716
+ extensionPoints_RepositoryCreatorComponentProps as RepositoryCreatorComponentProps,
717
+ extensionPoints_RepositoryCreatorExtension as RepositoryCreatorExtension,
718
+ extensionPoints_RepositoryCreator as RepositoryCreator,
719
+ extensionPoints_RepositoryFlags as RepositoryFlags,
720
+ extensionPoints_ReposSourcesActionbarExtensionProps as ReposSourcesActionbarExtensionProps,
721
+ extensionPoints_ReposSourcesActionbarExtension as ReposSourcesActionbarExtension,
722
+ extensionPoints_ReposSourcesActionbar as ReposSourcesActionbar,
723
+ extensionPoints_ReposSourcesEmptyActionbarExtensionProps as ReposSourcesEmptyActionbarExtensionProps,
724
+ extensionPoints_ReposSourcesEmptyActionbarExtension as ReposSourcesEmptyActionbarExtension,
725
+ extensionPoints_ReposSourcesEmptyActionbar as ReposSourcesEmptyActionbar,
726
+ extensionPoints_ReposSourcesTreeWrapperProps as ReposSourcesTreeWrapperProps,
727
+ extensionPoints_ReposSourcesTreeWrapperExtension as ReposSourcesTreeWrapperExtension,
728
+ extensionPoints_ReposSourcesTreeWrapper as ReposSourcesTreeWrapper,
729
+ extensionPoints_ReposSourcesTreeRowProps as ReposSourcesTreeRowProps,
730
+ extensionPoints_ReposSourcesTreeRowRightExtension as ReposSourcesTreeRowRightExtension,
731
+ extensionPoints_ReposSourcesTreeRowRight as ReposSourcesTreeRowRight,
732
+ extensionPoints_ReposSourcesTreeRowAfterExtension as ReposSourcesTreeRowAfterExtension,
733
+ extensionPoints_ReposSourcesTreeRowAfter as ReposSourcesTreeRowAfter,
734
+ extensionPoints_PrimaryNavigationLoginButtonProps as PrimaryNavigationLoginButtonProps,
735
+ extensionPoints_PrimaryNavigationLoginButtonExtension as PrimaryNavigationLoginButtonExtension,
736
+ extensionPoints_PrimaryNavigationLoginButton as PrimaryNavigationLoginButton,
737
+ extensionPoints_PrimaryNavigationLogoutButtonProps as PrimaryNavigationLogoutButtonProps,
738
+ extensionPoints_PrimaryNavigationLogoutButtonExtension as PrimaryNavigationLogoutButtonExtension,
739
+ extensionPoints_PrimaryNavigationLogoutButton as PrimaryNavigationLogoutButton,
740
+ extensionPoints_SourceExtensionProps as SourceExtensionProps,
741
+ extensionPoints_SourceExtension as SourceExtension,
742
+ extensionPoints_RepositoryOverviewTopExtensionProps as RepositoryOverviewTopExtensionProps,
743
+ extensionPoints_RepositoryOverviewTopExtension as RepositoryOverviewTopExtension,
744
+ extensionPoints_RepositoryOverviewTop as RepositoryOverviewTop,
745
+ extensionPoints_RepositoryOverviewLeftExtension as RepositoryOverviewLeftExtension,
746
+ extensionPoints_RepositoryOverviewLeft as RepositoryOverviewLeft,
747
+ extensionPoints_RepositoryOverviewTitleExtension as RepositoryOverviewTitleExtension,
748
+ extensionPoints_RepositoryOverviewTitle as RepositoryOverviewTitle,
749
+ extensionPoints_RepositoryOverviewSubtitleExtension as RepositoryOverviewSubtitleExtension,
750
+ extensionPoints_RepositoryOverviewSubtitle as RepositoryOverviewSubtitle,
751
+ extensionPoints_AdminNavigation as AdminNavigation,
752
+ extensionPoints_AdminRoute as AdminRoute,
753
+ extensionPoints_AdminSetting as AdminSetting,
754
+ extensionPoints_ChangesetDescription as ChangesetDescription,
755
+ extensionPoints_ChangesetDescriptionTokens as ChangesetDescriptionTokens,
756
+ extensionPoints_ChangesetRight as ChangesetRight,
757
+ extensionPoints_ChangesetsAuthorSuffix as ChangesetsAuthorSuffix,
758
+ extensionPoints_GroupNavigation as GroupNavigation,
759
+ extensionPoints_GroupRoute as GroupRoute,
760
+ extensionPoints_GroupSetting as GroupSetting,
761
+ extensionPoints_MainRoute as MainRoute,
762
+ extensionPoints_PluginAvatar as PluginAvatar,
763
+ extensionPoints_PrimaryNavigation as PrimaryNavigation,
764
+ extensionPoints_PrimaryNavigationFirstMenu as PrimaryNavigationFirstMenu,
765
+ extensionPoints_ProfileRoute as ProfileRoute,
766
+ extensionPoints_ProfileSetting as ProfileSetting,
767
+ extensionPoints_RepoConfigRoute as RepoConfigRoute,
768
+ extensionPoints_RepoConfigDetails as RepoConfigDetails,
769
+ extensionPoints_ReposBranchDetailsInformation as ReposBranchDetailsInformation,
770
+ extensionPoints_ReposContentMetaData as ReposContentMetaData,
771
+ extensionPoints_ReposCreateNamespace as ReposCreateNamespace,
772
+ extensionPoints_ReposSourcesContentActionBar as ReposSourcesContentActionBar,
773
+ extensionPoints_RepositoryNavigation as RepositoryNavigation,
774
+ extensionPoints_RepositoryNavigationTopLevel as RepositoryNavigationTopLevel,
775
+ extensionPoints_RepositoryRoleDetailsInformation as RepositoryRoleDetailsInformation,
776
+ extensionPoints_RepositorySetting as RepositorySetting,
777
+ extensionPoints_RepositoryAvatar as RepositoryAvatar,
778
+ extensionPoints_PrimaryRepositoryAvatar as PrimaryRepositoryAvatar,
779
+ extensionPoints_RepositoryDetailsInformation as RepositoryDetailsInformation,
780
+ extensionPoints_RepositorySourcesView as RepositorySourcesView,
781
+ extensionPoints_RolesRoute as RolesRoute,
782
+ extensionPoints_UserRoute as UserRoute,
783
+ extensionPoints_UserSetting as UserSetting,
784
+ extensionPoints_MarkdownCodeRenderer as MarkdownCodeRenderer,
785
+ extensionPoints_MarkdownLinkProtocolRenderer as MarkdownLinkProtocolRenderer,
786
+ extensionPoints_AvatarFactory as AvatarFactory,
787
+ extensionPoints_ChangesetAvatarFactory as ChangesetAvatarFactory,
788
+ extensionPoints_MainRedirect as MainRedirect,
789
+ extensionPoints_MarkdownRendererFactory as MarkdownRendererFactory,
790
+ extensionPoints_RepositoryCardBeforeTitle as RepositoryCardBeforeTitle,
791
+ extensionPoints_RepositoryCreationInitialization as RepositoryCreationInitialization,
792
+ extensionPoints_NamespaceTopLevelNavigation as NamespaceTopLevelNavigation,
793
+ extensionPoints_NamespaceRoute as NamespaceRoute,
794
+ extensionPoints_NamespaceSetting as NamespaceSetting,
795
+ extensionPoints_RepositoryTagDetailsInformation as RepositoryTagDetailsInformation,
796
+ extensionPoints_SearchHitRenderer as SearchHitRenderer,
797
+ extensionPoints_RepositorySourcesContentDownloadButton as RepositorySourcesContentDownloadButton,
798
+ extensionPoints_RepositoryRoute as RepositoryRoute,
799
+ extensionPoints_RepositoryRedirect as RepositoryRedirect,
800
+ extensionPoints_InitializationStep as InitializationStep,
801
+ extensionPoints_ContentActionExtensionProps as ContentActionExtensionProps,
802
+ extensionPoints_ActionMenuProps as ActionMenuProps,
803
+ extensionPoints_ModalMenuProps as ModalMenuProps,
804
+ extensionPoints_LinkMenuProps as LinkMenuProps,
805
+ extensionPoints_FileViewActionBarOverflowMenu as FileViewActionBarOverflowMenu,
806
+ };
807
+ }
808
+
809
+ export { Binder, BinderContext, ExtensionPoint, ExtensionPointDefinition, ExtractProps, binder, extensionPoints, useBinder };