@ynput/ayon-frontend-shared 0.6.7 → 0.6.9

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.
Files changed (41) hide show
  1. package/dist/DetailsPanel.es.js +3 -3
  2. package/dist/Feed.es.js +64 -58
  3. package/dist/ListTable.es.js +5 -5
  4. package/dist/NewEntity.es.js +38 -38
  5. package/dist/ProjectTreeTable.es.js +1314 -1314
  6. package/dist/Slicer.es.js +21 -21
  7. package/dist/Views.es.js +1 -1
  8. package/dist/api.es.js +362 -360
  9. package/dist/chunks/Actions.es.js +21 -21
  10. package/dist/chunks/ColumnDropIndicator.es.js +7 -7
  11. package/dist/chunks/DeleteEntitiesContextInstance.es.js +22 -22
  12. package/dist/chunks/EmptyPlaceholder.es.js +9 -9
  13. package/dist/chunks/EntityPath.es.js +1 -1
  14. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  15. package/dist/chunks/Feed.es.js +1843 -1830
  16. package/dist/chunks/MetaWidget.es.js +816 -827
  17. package/dist/chunks/PlayableIcon.es.js +124 -85
  18. package/dist/chunks/ProjectContext.es.js +11 -11
  19. package/dist/chunks/ReviewablesSelector.es.js +572 -484
  20. package/dist/chunks/SimpleForm.es.js +6 -5
  21. package/dist/chunks/SimpleTable.es.js +1 -1
  22. package/dist/chunks/Slicer.es.js +75 -75
  23. package/dist/chunks/ThumbnailSimple.es.js +15 -15
  24. package/dist/chunks/Watchers.es.js +35 -35
  25. package/dist/chunks/getBundleMode.es.js +33 -25
  26. package/dist/chunks/getUris.es.js +236 -229
  27. package/dist/chunks/searchTerms.es.js +352 -333
  28. package/dist/chunks/useAttributeEnums.es.js +16 -16
  29. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  30. package/dist/chunks/viewUpdateHelper.es.js +36 -36
  31. package/dist/components.es.js +793 -754
  32. package/dist/context.es.js +121 -120
  33. package/dist/hooks.es.js +15 -15
  34. package/dist/index.es.js +2 -2
  35. package/dist/types/Feed.d.ts +54 -0
  36. package/dist/types/ProjectTreeTable.d.ts +5 -2
  37. package/dist/types/api.d.ts +372 -0
  38. package/dist/types/components.d.ts +516 -0
  39. package/dist/types/util.d.ts +4 -0
  40. package/dist/util.es.js +68 -66
  41. package/package.json +1 -1
@@ -12,11 +12,18 @@ import { Component } from 'react';
12
12
  import { Context } from 'react';
13
13
  import { coreModuleName } from '@reduxjs/toolkit/query';
14
14
  import { CSSProperties } from 'react';
15
+ import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
15
16
  import { default as default_2 } from 'react';
16
17
  import { DetailedHTMLProps } from 'react';
17
18
  import { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES } from 'react';
18
19
  import { DocumentNode } from 'graphql';
20
+ import { DOMConversionMap } from 'lexical';
21
+ import { DOMExportOutput } from 'lexical';
19
22
  import { DropdownRef } from '@ynput/ayon-react-components';
23
+ import { EditorConfig } from 'lexical';
24
+ import { ElementFormatType } from 'lexical';
25
+ import { ElementNode } from 'lexical';
26
+ import { ExecutionProps } from 'styled-components';
20
27
  import { FastOmit } from 'styled-components';
21
28
  import { FC } from 'react';
22
29
  import { FetchArgs } from '@reduxjs/toolkit/query';
@@ -32,10 +39,16 @@ import { ImgHTMLAttributes } from 'react';
32
39
  import { InputHTMLAttributes } from 'react';
33
40
  import { IStyledComponentBase } from 'styled-components/dist/types';
34
41
  import { JSX as JSX_2 } from 'react/jsx-runtime';
42
+ import { JSX as JSX_3 } from 'react';
35
43
  import { LabelHTMLAttributes } from 'react';
44
+ import { LexicalCommand } from 'lexical';
45
+ import { LexicalEditor } from 'lexical';
46
+ import { LexicalNode } from 'lexical';
36
47
  import { MouseEvent as MouseEvent_2 } from 'react';
37
48
  import { MutationActionCreatorResult } from '@reduxjs/toolkit/query';
38
49
  import { MutationDefinition } from '@reduxjs/toolkit/query';
50
+ import { NamedExoticComponent } from 'react';
51
+ import { NodeKey } from 'lexical';
39
52
  import { Option as Option_2 } from '@ynput/ayon-react-components';
40
53
  import { OverrideResultType } from '@reduxjs/toolkit/query';
41
54
  import { QueryDefinition } from '@reduxjs/toolkit/query';
@@ -46,9 +59,15 @@ import { RefAttributes } from 'react';
46
59
  import { RefObject } from 'react';
47
60
  import { SearchFilterGroupOption } from '@ynput/ayon-react-components';
48
61
  import { SearchFilterRef } from '@ynput/ayon-react-components';
62
+ import { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode';
49
63
  import { SerializedError } from '@reduxjs/toolkit';
64
+ import { SerializedTextNode } from 'lexical';
50
65
  import { SortingState } from '@tanstack/react-table';
66
+ import { Spread } from 'lexical';
67
+ import { TextMatchTransformer } from '@lexical/markdown';
68
+ import { TextNode } from 'lexical';
51
69
  import { ThunkDispatch } from '@reduxjs/toolkit';
70
+ import { Transformer as Transformer_2 } from '@lexical/markdown';
52
71
  import { TSHelpersNoInfer } from '@reduxjs/toolkit/query';
53
72
  import { UnknownAction } from '@reduxjs/toolkit';
54
73
  import { UpdateDefinitions } from '@reduxjs/toolkit/query';
@@ -60,6 +79,22 @@ import { VisibilityState } from '@tanstack/react-table';
60
79
  import { WatcherSelectProps } from '@ynput/ayon-react-components';
61
80
  import { WebTarget } from 'styled-components';
62
81
 
82
+ export declare const $createMediaNode: (payload: MediaPayload) => MediaNode;
83
+
84
+ export declare const $createMentionNode: (type: string, id: string, label: string) => MentionNode;
85
+
86
+ export declare const $createYouTubeNode: (url: string) => YouTubeNode;
87
+
88
+ export declare const $getMarkdown: (node?: ElementNode) => string;
89
+
90
+ export declare const $isMediaNode: (node: LexicalNode | null | undefined) => node is MediaNode;
91
+
92
+ export declare const $isMentionNode: (node: LexicalNode | null | undefined) => node is MentionNode;
93
+
94
+ export declare const $isYouTubeNode: (node: LexicalNode | null | undefined) => node is YouTubeNode;
95
+
96
+ export declare const $setMarkdown: (markdown: string) => void;
97
+
63
98
  export declare const ACCESS_LEVEL_LABELS: {
64
99
  0: string;
65
100
  10: string;
@@ -112,6 +147,8 @@ declare interface Action extends ButtonProps {
112
147
 
113
148
  declare const ActionWrapper: IStyledComponentBase<"web", FastOmit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
114
149
 
150
+ export declare const ACTIVITY_LINK_LABEL = "Comment";
151
+
115
152
  export declare const AddColumnButton: FC<AddColumnButtonProps>;
116
153
 
117
154
  declare interface AddColumnButtonProps {
@@ -283,6 +320,10 @@ declare type BaseProps = React.HTMLAttributes<HTMLDivElement> & {
283
320
 
284
321
  export declare const BLOCK_DIALOG_CLOSE_CLASS = "block-dialog-close";
285
322
 
323
+ export declare type BlockFormat = Exclude<BlockType, 'paragraph' | 'heading'>;
324
+
325
+ declare type BlockType = 'paragraph' | 'h1' | 'h2' | 'h3' | 'heading' | 'quote' | 'code' | 'bullet' | 'number' | 'check';
326
+
286
327
  declare type BooleanCalc = 'checked' | 'notChecked';
287
328
 
288
329
  export declare const buildChildrenDetails: (topLevelFolders: DeletableEntity[], folderInfo: FolderDeleteInfo[]) => string[];
@@ -501,6 +542,12 @@ declare interface ContextMenuItemType extends Omit<ContextMenuItemProps, 'contex
501
542
  [key: string]: any;
502
543
  }
503
544
 
545
+ /**
546
+ * Mention source backed by the activity feed's mention suggestions (`useGetEntityMentionsQuery`),
547
+ * using the same option builders and sorting as the legacy comment input.
548
+ */
549
+ export declare const createFeedMentionSource: ({ suggestions, project, taskTypes, entityType, }: FeedMentionSourceOptions) => MentionSource;
550
+
504
551
  declare type CreateViewApiArg = {
505
552
  viewType: string;
506
553
  projectName?: string;
@@ -606,6 +653,8 @@ export declare interface DateRangePickerProps {
606
653
 
607
654
  export declare const DEFAULT_FEATURED_ORDER: string[];
608
655
 
656
+ export declare const DEFAULT_TOOLBAR: ToolbarLayout;
657
+
609
658
  declare type DefaultProductBaseType_2 = {
610
659
  color?: string;
611
660
  icon?: string;
@@ -667,6 +716,8 @@ declare type DeliveryTemplate = {
667
716
  file: string;
668
717
  };
669
718
 
719
+ export declare const DESCRIPTION_TOOLBAR: ToolbarLayout;
720
+
670
721
  declare interface DescriptionMentionsContext {
671
722
  projectName: string;
672
723
  entityType: string;
@@ -945,6 +996,15 @@ declare interface EarlyPreviewProps extends React.HTMLAttributes<HTMLDivElement>
945
996
 
946
997
  declare type EditingViewState = string | true | null;
947
998
 
999
+ export declare interface EditorCommand {
1000
+ id: string;
1001
+ label: string;
1002
+ icon: string;
1003
+ keywords?: string[];
1004
+ hint?: string;
1005
+ run: () => void;
1006
+ }
1007
+
948
1008
  export declare const EmptyPlaceholder: FC<EmptyPlaceholderProps>;
949
1009
 
950
1010
  export declare const EmptyPlaceholderFlex: IStyledComponentBase<"web", FastOmit<EmptyPlaceholderProps, never> & Partial<Pick< EmptyPlaceholderProps, never>>> & string & Omit< FC<EmptyPlaceholderProps>, keyof Component<any, {}, any>>;
@@ -1243,6 +1303,13 @@ declare type FeedFrameLinkPreview = {
1243
1303
  link: CommentFrameLink | null;
1244
1304
  };
1245
1305
 
1306
+ declare interface FeedMentionSourceOptions {
1307
+ suggestions?: SuggestResponse;
1308
+ project?: Pick<ProjectContextValue, 'productTypes'>;
1309
+ taskTypes?: TaskType_3[];
1310
+ entityType?: string;
1311
+ }
1312
+
1246
1313
  export declare const FieldLabel: default_2.FC<FieldLabelProps>;
1247
1314
 
1248
1315
  declare interface FieldLabelProps extends default_2.HTMLAttributes<HTMLDivElement> {
@@ -1332,6 +1399,8 @@ export declare interface FilterErrorActionsProps {
1332
1399
 
1333
1400
  export declare type FilterFieldType = 'folderType' | 'taskType' | 'productType' | 'productBaseType' | ('users' | 'assignees' | 'author') | 'attributes' | 'status' | 'tags' | 'version' | 'hasReviewables' | 'productName' | 'name' | 'createdAt' | 'updatedAt';
1334
1401
 
1402
+ export declare const FLOATING_TOOLBAR: ToolbarLayout;
1403
+
1335
1404
  declare type FolderDeleteInfo = {
1336
1405
  id: string;
1337
1406
  name: string;
@@ -1358,6 +1427,18 @@ declare interface FolderProduct {
1358
1427
  } | null;
1359
1428
  }
1360
1429
 
1430
+ declare type FolderSuggestionItem = {
1431
+ /** The date and time when the suggested entity was created */
1432
+ createdAt?: string;
1433
+ /** The relevance score of the suggestion */
1434
+ relevance?: number;
1435
+ id: string;
1436
+ folderType: string;
1437
+ name: string;
1438
+ label?: string;
1439
+ thumbnailId?: string;
1440
+ };
1441
+
1361
1442
  declare type FolderType = {
1362
1443
  name: string;
1363
1444
  original_name?: string;
@@ -1550,6 +1631,39 @@ export declare const getGroupedReviewables: (reviewables: ReviewableResponse[],
1550
1631
  queued: ReviewableResponse[];
1551
1632
  };
1552
1633
 
1634
+ /**
1635
+ * Ids of the project files shown as image / video blocks in the markdown. Only standalone media
1636
+ * images count, not file urls in prose, links or code blocks.
1637
+ */
1638
+ export declare const getInlineMediaFileIds: (markdown?: string | null) => Set<string>;
1639
+
1640
+ /**
1641
+ * A short label for a link to a well known site, made only from the url (nothing is fetched),
1642
+ * e.g. `https://github.com/ynput/ayon-frontend/issues/2342` → `ayon-frontend #2342`.
1643
+ * Returns null for urls without a known structure, which keep the url as their text.
1644
+ */
1645
+ export declare const getLinkLabel: (href: string) => string | null;
1646
+
1647
+ /**
1648
+ * Image or video, from the mime type (written as the markdown image title by the editor) or else
1649
+ * the file extension of the url / name. Defaults to image, markdown images are images.
1650
+ */
1651
+ export declare const getMediaKind: (mime?: string | null, ...names: (string | null | undefined)[]) => "video" | "image";
1652
+
1653
+ export declare const getMentionTrigger: (type: string) => MentionTrigger;
1654
+
1655
+ export declare const getProjectFileId: (src?: string | null) => string | null;
1656
+
1657
+ /**
1658
+ * The link a duplicated comment keeps to the comment it was copied from:
1659
+ * `source:{activityId}?type={entityType}&id={entityId}`. The entity is the one the source comment
1660
+ * belongs to, which can differ from the entity the copy is posted on.
1661
+ */
1662
+ export declare const getSourceLink: (activityId: string, entity?: {
1663
+ id: string;
1664
+ type: string;
1665
+ }) => string;
1666
+
1553
1667
  export declare const getUiTypeLabel: (type: AttributeData_2["type"] | undefined, enumValues?: AttributeData_2["enum"], enumResolver?: AttributeData_2["enumResolver"]) => string;
1554
1668
 
1555
1669
  declare type GetViewApiArg = {
@@ -1597,6 +1711,28 @@ export declare const groupLinksByEntity: (links: LinkEntity[]) => GroupedLink[];
1597
1711
 
1598
1712
  export declare const GUEST_KEY_PREFIX = "guest:";
1599
1713
 
1714
+ declare interface HastNode {
1715
+ type: string;
1716
+ tagName?: string;
1717
+ value?: string;
1718
+ properties?: {
1719
+ href?: string;
1720
+ };
1721
+ children?: HastNode[];
1722
+ }
1723
+
1724
+ declare interface HastNode_2 {
1725
+ type: string;
1726
+ tagName?: string;
1727
+ value?: string;
1728
+ properties?: {
1729
+ src?: string;
1730
+ alt?: string;
1731
+ title?: string;
1732
+ };
1733
+ children?: HastNode_2[];
1734
+ }
1735
+
1600
1736
  export declare interface HeightSliderProps {
1601
1737
  value: number;
1602
1738
  onChange: (value: number) => void;
@@ -1666,6 +1802,10 @@ declare const InputText: IStyledComponentBase<"web", FastOmit<Omit< InputHTMLAtt
1666
1802
  ref?: ((instance: HTMLInputElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLInputElement> | null | undefined;
1667
1803
  }, never>>> & string & Omit< ForwardRefExoticComponent< InputHTMLAttributes<HTMLInputElement> & RefAttributes<HTMLInputElement>>, keyof Component<any, {}, any>>;
1668
1804
 
1805
+ export declare const INSERT_MENTION_TRIGGER_COMMAND: LexicalCommand<MentionTrigger>;
1806
+
1807
+ export declare const isMediaFile: (file: File) => boolean;
1808
+
1669
1809
  export declare const JsonViewer: FC<JsonViewerProps>;
1670
1810
 
1671
1811
  export declare interface JsonViewerProps {
@@ -1836,8 +1976,204 @@ declare type ListViewsApiArg = {
1836
1976
 
1837
1977
  declare type MainCalc = 'count' | 'breakdown';
1838
1978
 
1979
+ export declare const MARKDOWN_TRANSFORMERS: Transformer_2[];
1980
+
1981
+ /**
1982
+ * Rich text editor that reads and writes markdown.
1983
+ * Supports text formats, links, lists, check lists, quotes, inline code and code blocks and
1984
+ * mentions (`@user`, `@@version`, `@@@task`) stored as `[label](type:id)`.
1985
+ */
1986
+ export declare const MarkdownEditor: ForwardRefExoticComponent<MarkdownEditorProps & RefAttributes<MarkdownEditorHandle>>;
1987
+
1988
+ export declare interface MarkdownEditorHandle {
1989
+ getEditor: () => LexicalEditor;
1990
+ focus: () => void;
1991
+ blur: () => void;
1992
+ getMarkdown: () => string;
1993
+ setMarkdown: (markdown: string) => void;
1994
+ clear: () => void;
1995
+ isEmpty: () => boolean;
1996
+ insertMentionTrigger: (trigger: MentionTrigger) => void;
1997
+ }
1998
+
1999
+ export declare interface MarkdownEditorProps extends MentionEventHandlers {
2000
+ variant?: MarkdownEditorVariant;
2001
+ value?: string;
2002
+ onChange?: (markdown: string) => void;
2003
+ placeholder?: string;
2004
+ onSubmit?: () => void;
2005
+ submitOnEnter?: boolean;
2006
+ onEscape?: () => void;
2007
+ onFiles?: (files: File[]) => void;
2008
+ onUploadMedia?: UploadMedia;
2009
+ mentions?: MentionSource;
2010
+ mentionMenuParent?: HTMLElement;
2011
+ mentionPlacement?: MentionPlacement;
2012
+ emoji?: boolean;
2013
+ slashCommands?: boolean;
2014
+ commands?: EditorCommand[];
2015
+ toolbar?: boolean | ToolbarLayout;
2016
+ floatingToolbar?: boolean | ToolbarLayout;
2017
+ toolbarStart?: ReactNode;
2018
+ toolbarEnd?: ReactNode;
2019
+ footer?: ReactNode;
2020
+ actions?: ReactNode;
2021
+ autoFocus?: boolean;
2022
+ readOnly?: boolean;
2023
+ bordered?: boolean;
2024
+ minHeight?: number;
2025
+ maxHeight?: number;
2026
+ namespace?: string;
2027
+ className?: string;
2028
+ style?: CSSProperties;
2029
+ contentClassName?: string;
2030
+ children?: ReactNode;
2031
+ }
2032
+
2033
+ export declare type MarkdownEditorVariant = 'document' | 'message';
2034
+
2035
+ /**
2036
+ * Markdown as one line of plain text, e.g. for a summary of a description change. Mentions and
2037
+ * links become their label, images their name, and formatting, block markers and line breaks go.
2038
+ */
2039
+ export declare const markdownToPlainText: (markdown: string) => string;
2040
+
1839
2041
  declare type Maybe<T> = T | null;
1840
2042
 
2043
+ export declare const MediaBlock: ({ src, alt, mime, uploading, onOpen, className }: MediaBlockProps) => JSX_2.Element;
2044
+
2045
+ declare interface MediaBlockProps {
2046
+ src: string;
2047
+ alt?: string;
2048
+ mime?: string | null;
2049
+ uploading?: boolean;
2050
+ onOpen?: () => void;
2051
+ className?: string;
2052
+ }
2053
+
2054
+ /**
2055
+ * An image or video block. Stored in markdown as an image on its own line with the mime type as
2056
+ * its title: `![clip.mp4](/api/projects/p/files/id "video/mp4")`.
2057
+ */
2058
+ export declare class MediaNode extends DecoratorBlockNode {
2059
+ __src: string;
2060
+ __alt: string;
2061
+ __mime: string | null;
2062
+ __uploading: boolean;
2063
+ static getType(): string;
2064
+ static clone(node: MediaNode): MediaNode;
2065
+ static importJSON(serializedNode: SerializedMediaNode): MediaNode;
2066
+ constructor(payload: MediaPayload, format?: ElementFormatType, key?: NodeKey);
2067
+ exportJSON(): SerializedMediaNode;
2068
+ exportDOM(): DOMExportOutput;
2069
+ static importDOM(): DOMConversionMap | null;
2070
+ updateDOM(): false;
2071
+ getSrc(): string;
2072
+ getAlt(): string;
2073
+ getMime(): string | null;
2074
+ isUploading(): boolean;
2075
+ setUploaded(src: string, { alt, mime }?: {
2076
+ alt?: string;
2077
+ mime?: string | null;
2078
+ }): this;
2079
+ getTextContent(): string;
2080
+ decorate(_editor: LexicalEditor, config: EditorConfig): JSX_3.Element;
2081
+ }
2082
+
2083
+ declare interface MediaPayload {
2084
+ src: string;
2085
+ alt?: string;
2086
+ mime?: string | null;
2087
+ uploading?: boolean;
2088
+ }
2089
+
2090
+ export declare const MENTION: TextMatchTransformer;
2091
+
2092
+ export declare const MENTION_REF_TYPES: readonly ["user", "team", "task", "version", "folder", "representation", "workfile", "product"];
2093
+
2094
+ export declare const MENTION_TRIGGER_BY_TYPE: Record<string, MentionTrigger>;
2095
+
2096
+ export declare interface MentionEventHandlers {
2097
+ onMentionClick?: (mention: {
2098
+ type: string;
2099
+ id: string;
2100
+ label: string;
2101
+ }, e: MouseEvent) => void;
2102
+ onMentionHover?: (mention: {
2103
+ type: string;
2104
+ id: string;
2105
+ label: string;
2106
+ }, target: HTMLElement) => void;
2107
+ }
2108
+
2109
+ export declare interface MentionFilter {
2110
+ id: string;
2111
+ icon: string;
2112
+ tooltip: string;
2113
+ }
2114
+
2115
+ export declare interface MentionItem {
2116
+ type: string;
2117
+ id: string;
2118
+ label: string;
2119
+ icon?: string;
2120
+ color?: string;
2121
+ context?: string;
2122
+ suffix?: string;
2123
+ }
2124
+
2125
+ /**
2126
+ * An inline reference to a user, team, task, version... rendered as `@label` and stored in
2127
+ * markdown as `[label](type:id)`. It is a token so it can only be selected and deleted as a whole.
2128
+ */
2129
+ export declare class MentionNode extends TextNode {
2130
+ __mentionType: string;
2131
+ __mentionId: string;
2132
+ static getType(): string;
2133
+ static clone(node: MentionNode): MentionNode;
2134
+ static importJSON(serializedNode: SerializedMentionNode): MentionNode;
2135
+ constructor(mentionType: string, mentionId: string, text: string, key?: NodeKey);
2136
+ exportJSON(): SerializedMentionNode;
2137
+ getMentionType(): string;
2138
+ getMentionId(): string;
2139
+ getLabel(): string;
2140
+ getMentionValue(): string;
2141
+ createDOM(config: EditorConfig): HTMLElement;
2142
+ exportDOM(): DOMExportOutput;
2143
+ static importDOM(): DOMConversionMap | null;
2144
+ isTextEntity(): true;
2145
+ canInsertTextBefore(): boolean;
2146
+ canInsertTextAfter(): boolean;
2147
+ }
2148
+
2149
+ export declare type MentionPlacement = 'inline' | 'top';
2150
+
2151
+ export declare interface MentionQuery {
2152
+ trigger: MentionTrigger;
2153
+ search: string;
2154
+ filter: string | null;
2155
+ }
2156
+
2157
+ export declare type MentionRefType = (typeof MENTION_REF_TYPES)[number];
2158
+
2159
+ export declare interface MentionSource {
2160
+ triggers?: MentionTrigger[];
2161
+ config?: Partial<Record<MentionTrigger, Partial<MentionTriggerConfig>>>;
2162
+ getOptions: (query: MentionQuery) => MentionItem[];
2163
+ getError?: (trigger: MentionTrigger) => string | null | undefined;
2164
+ limit?: number;
2165
+ renderOptionImage?: (option: MentionItem) => ReactNode;
2166
+ }
2167
+
2168
+ export declare type MentionTrigger = '@' | '@@' | '@@@';
2169
+
2170
+ export declare interface MentionTriggerConfig {
2171
+ title: string;
2172
+ noun: string;
2173
+ isCircle?: boolean;
2174
+ filters?: MentionFilter[];
2175
+ }
2176
+
1841
2177
  export declare const Menu: default_2.FC<MenuProps>;
1842
2178
 
1843
2179
  export declare const MENU_PORTAL_CONTENT_ID = "ayon-menu-content";
@@ -1929,6 +2265,15 @@ export declare type NormalizedData = {
1929
2265
  icon?: string;
1930
2266
  };
1931
2267
 
2268
+ /**
2269
+ * Clean up markdown written by the legacy quill editor:
2270
+ * - quill wrote every line as its own paragraph and blank lines as `&nbsp;` spacer paragraphs.
2271
+ * When spacers are found, paragraphs next to each other become lines of one paragraph and the
2272
+ * spacers become paragraph breaks.
2273
+ * - `<u>` tags are dropped (markdown has no underline)
2274
+ */
2275
+ export declare const normalizeLegacyMarkdown: (markdown: string) => string;
2276
+
1932
2277
  declare type NullableString = string | null | undefined;
1933
2278
 
1934
2279
  declare type NumberCalc = 'sum' | 'avg' | 'min' | 'max' | 'none';
@@ -2023,8 +2368,36 @@ declare type ParentColumnDefinition = {
2023
2368
 
2024
2369
  declare type ParentColumnOptionKey = 'status' | 'folderStatus' | 'folderType' | 'taskType' | 'taskStatus' | 'productType' | 'assignee' | 'tag';
2025
2370
 
2371
+ export declare const parseActivityLink: (href?: string | null) => ParsedActivityLink | null;
2372
+
2373
+ /**
2374
+ * A link to a comment (any activity) on this server: `/projects/{project}/...?activity={id}`, as
2375
+ * made by a comment's "Copy link", or a source link (`getSourceLink`).
2376
+ * Links to other servers stay links.
2377
+ */
2378
+ declare type ParsedActivityLink = {
2379
+ activityId: string;
2380
+ entity: {
2381
+ id: string;
2382
+ type: string;
2383
+ } | null;
2384
+ isSource: true;
2385
+ } | {
2386
+ projectName: string;
2387
+ activityId: string;
2388
+ entityId: string | null;
2389
+ isSource: false;
2390
+ url: string;
2391
+ };
2392
+
2026
2393
  export declare const parseFilename: (filename: string) => string;
2027
2394
 
2395
+ /**
2396
+ * The video of a YouTube url, e.g. youtube.com/watch?v=ID, youtu.be/ID, youtube.com/shorts/ID,
2397
+ * youtube.com/embed/ID or youtube.com/live/ID. Null for anything else.
2398
+ */
2399
+ export declare const parseYouTubeUrl: (value: string) => YouTubeVideo | null;
2400
+
2028
2401
  declare type PartialBy<T, K extends keyof T> = Omit_2<T, K> & Partial<Pick<T, K>>;
2029
2402
 
2030
2403
  export declare type PathSegment = {
@@ -2086,6 +2459,17 @@ declare type ProductBaseTypes = {
2086
2459
  definitions?: ProductBaseType[];
2087
2460
  };
2088
2461
 
2462
+ declare type ProductSuggestionItem = {
2463
+ /** The date and time when the suggested entity was created */
2464
+ createdAt?: string;
2465
+ /** The relevance score of the suggestion */
2466
+ relevance?: number;
2467
+ id: string;
2468
+ name: string;
2469
+ productType: string;
2470
+ parent?: FolderSuggestionItem;
2471
+ };
2472
+
2089
2473
  declare type ProductType = {
2090
2474
  __typename?: 'ProductType';
2091
2475
  color?: Maybe<Scalars['String']['output']>;
@@ -2340,6 +2724,24 @@ declare type RemoveLinks = (links: {
2340
2724
  };
2341
2725
  }[], addToHistory?: boolean) => Promise<void>;
2342
2726
 
2727
+ /**
2728
+ * For react-markdown `p` components: a paragraph that is only an image (how the editor stores
2729
+ * image and video blocks) renders as the block. Returns null for any other paragraph.
2730
+ */
2731
+ export declare const renderMediaParagraph: (props: {
2732
+ node?: HastNode_2;
2733
+ }, { onOpen }?: {
2734
+ onOpen?: (src: string) => void;
2735
+ }) => ReactNode | null;
2736
+
2737
+ /**
2738
+ * For react-markdown `p` components: a paragraph that is only a YouTube link (how the editor
2739
+ * stores videos) renders as the player. Returns null for any other paragraph.
2740
+ */
2741
+ export declare const renderYouTubeParagraph: (props: {
2742
+ node?: HastNode;
2743
+ }) => ReactNode | null;
2744
+
2343
2745
  export declare interface ReportsLoadingScreenProps extends HTMLAttributes<HTMLDivElement> {
2344
2746
  showSidebar?: boolean;
2345
2747
  sidebarConfig?: SidebarConfig;
@@ -2624,6 +3026,21 @@ export declare type ScopeWithFilterTypes = {
2624
3026
 
2625
3027
  declare type SelectedViewState = ViewData | undefined;
2626
3028
 
3029
+ declare type SerializedMediaNode = Spread<{
3030
+ src: string;
3031
+ alt: string;
3032
+ mime: string | null;
3033
+ }, SerializedDecoratorBlockNode>;
3034
+
3035
+ declare type SerializedMentionNode = Spread<{
3036
+ mentionType: string;
3037
+ mentionId: string;
3038
+ }, SerializedTextNode>;
3039
+
3040
+ declare type SerializedYouTubeNode = Spread<{
3041
+ url: string;
3042
+ }, SerializedDecoratorBlockNode>;
3043
+
2627
3044
  declare type SetDefaultViewApiArg = {
2628
3045
  viewType: string;
2629
3046
  projectName?: string;
@@ -2832,6 +3249,8 @@ export declare const splitClientFiltersByScope: (filters: (Filter | SliceFilter)
2832
3249
  */
2833
3250
  export declare const splitFiltersByScope: (combinedFilter: Record<string, any> | null, scopes: ScopeType[], config?: FilterConfig, filterIdToScopeMap?: Record<string, ScopeType>) => Record<ScopeType | "unscoped", Record<string, any>>;
2834
3251
 
3252
+ export declare const SplitterStyles: NamedExoticComponent< ExecutionProps & object>;
3253
+
2835
3254
  export declare const StackedThumbnails: ({ thumbnails, isLoading, className, style, ...props }: StackedThumbnailsProps) => JSX_2.Element | null;
2836
3255
 
2837
3256
  export declare interface StackedThumbnailsProps extends Omit<ThumbnailProps, 'entityType' | 'entityId' | 'projectName' | 'thumbnailHash'> {
@@ -2941,6 +3360,13 @@ export declare type SubtasksManagerWrapperProps = Omit<SubtasksManagerProps, 'up
2941
3360
  SubtasksManager: React.ComponentType<SubtasksManagerProps>;
2942
3361
  };
2943
3362
 
3363
+ declare type SuggestResponse = {
3364
+ users?: UserSuggestionItem[];
3365
+ teams?: TeamSuggestionItem[];
3366
+ tasks?: TaskSuggestionItem[];
3367
+ versions?: VersionSuggestionItem[];
3368
+ };
3369
+
2944
3370
  export declare const sumExpectedCounts: (counts: ExpectedDeleteCounts) => number;
2945
3371
 
2946
3372
  declare type SummaryCalc = NumberCalc | BooleanCalc | TextCalc | EnumCalc | MainCalc;
@@ -3052,6 +3478,19 @@ declare type TaskProgressViewPostModel = {
3052
3478
  viewType?: 'taskProgress';
3053
3479
  };
3054
3480
 
3481
+ declare type TaskSuggestionItem = {
3482
+ /** The date and time when the suggested entity was created */
3483
+ createdAt?: string;
3484
+ /** The relevance score of the suggestion */
3485
+ relevance?: number;
3486
+ id: string;
3487
+ taskType: string;
3488
+ name: string;
3489
+ label?: string;
3490
+ thumbnailId?: string;
3491
+ parent?: FolderSuggestionItem;
3492
+ };
3493
+
3055
3494
  declare type TaskType = {
3056
3495
  name: string;
3057
3496
  original_name?: string;
@@ -3078,6 +3517,14 @@ declare type TaskType_3 = {
3078
3517
 
3079
3518
  export declare const TEAM_KEY_PREFIX = "team:";
3080
3519
 
3520
+ declare type TeamSuggestionItem = {
3521
+ /** The date and time when the suggested entity was created */
3522
+ createdAt?: string;
3523
+ /** The relevance score of the suggestion */
3524
+ relevance?: number;
3525
+ name: string;
3526
+ };
3527
+
3081
3528
  declare type Templates = {
3082
3529
  version_padding?: number;
3083
3530
  version?: string;
@@ -3131,6 +3578,16 @@ export declare interface ThumbnailSimpleProps extends default_2.HTMLAttributes<H
3131
3578
  iconOnly?: boolean;
3132
3579
  }
3133
3580
 
3581
+ /**
3582
+ * Turn the selected blocks into `format`, or back into paragraphs when they already are.
3583
+ * Used by the toolbar and keyboard shortcuts. `set` only turns them into `format` (slash menu).
3584
+ */
3585
+ export declare const toggleBlockFormat: (editor: LexicalEditor, format: BlockFormat, mode?: "toggle" | "set") => void;
3586
+
3587
+ export declare type ToolbarItem = 'h1' | 'h2' | 'h3' | 'bold' | 'italic' | 'strikethrough' | 'code' | 'link' | 'codeBlock' | 'quote' | 'numberList' | 'bulletList' | 'checkList';
3588
+
3589
+ export declare type ToolbarLayout = (ToolbarItem | '|')[];
3590
+
3134
3591
  declare type TopicUpdateType = 'created' | 'label_changed' | 'renamed' | 'type_changed' | 'status_changed' | 'tags_changed' | 'attrib_changed' | 'deleted';
3135
3592
 
3136
3593
  declare type UpdateEntitiesArgs = {
@@ -3169,6 +3626,12 @@ declare type UpdateViewApiArg = {
3169
3626
 
3170
3627
  declare type UpdateViewSettingsFn = (updatedSettings: any, localStateSetter: (value: any) => void, newLocalValue: any, options: UpdateOptions) => Promise<void>;
3171
3628
 
3629
+ export declare interface UploadedMedia {
3630
+ src: string;
3631
+ name?: string;
3632
+ mime?: string;
3633
+ }
3634
+
3172
3635
  export declare interface UploadHandlers {
3173
3636
  handleFileUpload: (files: FileList | File[], versionId?: string) => Promise<void>;
3174
3637
  handleRemoveUpload: (name: string) => void;
@@ -3177,6 +3640,8 @@ export declare interface UploadHandlers {
3177
3640
  };
3178
3641
  }
3179
3642
 
3643
+ export declare type UploadMedia = (file: File) => Promise<UploadedMedia>;
3644
+
3180
3645
  export declare const UploadVersionDialog: FC<UploadVersionDialogProps>;
3181
3646
 
3182
3647
  declare interface UploadVersionDialogProps {
@@ -3272,6 +3737,15 @@ declare type UserModel = {
3272
3737
  updatedAt?: string;
3273
3738
  };
3274
3739
 
3740
+ declare type UserSuggestionItem = {
3741
+ /** The date and time when the suggested entity was created */
3742
+ createdAt?: string;
3743
+ /** The relevance score of the suggestion */
3744
+ relevance?: number;
3745
+ name: string;
3746
+ fullName?: string;
3747
+ };
3748
+
3275
3749
  export declare const useUpdateLinks: ({ projectName, direction, entityId, entityType, targetEntityType, linkType, }: Props) => {
3276
3750
  remove: RemoveLinks;
3277
3751
  add: AddLinks;
@@ -3486,6 +3960,17 @@ declare type VersionsSettings = {
3486
3960
  columns?: ColumnItemModel[];
3487
3961
  };
3488
3962
 
3963
+ declare type VersionSuggestionItem = {
3964
+ /** The date and time when the suggested entity was created */
3965
+ createdAt?: string;
3966
+ /** The relevance score of the suggestion */
3967
+ relevance?: number;
3968
+ id: string;
3969
+ version: number;
3970
+ parent?: ProductSuggestionItem;
3971
+ name?: string;
3972
+ };
3973
+
3489
3974
  declare type VersionsViewModel = {
3490
3975
  /** Unique identifier for the view within the given scope. */
3491
3976
  id?: string;
@@ -3794,6 +4279,37 @@ declare type WorkTemplate = {
3794
4279
  file: string;
3795
4280
  };
3796
4281
 
4282
+ export declare const YouTubeEmbed: ({ video, className }: YouTubeEmbedProps) => JSX_2.Element;
4283
+
4284
+ declare interface YouTubeEmbedProps {
4285
+ video: YouTubeVideo;
4286
+ className?: string;
4287
+ }
4288
+
4289
+ /**
4290
+ * An embedded YouTube video. Stored in markdown as the video url on its own line, which the
4291
+ * comment renderer shows as the player (and anything else as a link).
4292
+ */
4293
+ export declare class YouTubeNode extends DecoratorBlockNode {
4294
+ __url: string;
4295
+ static getType(): string;
4296
+ static clone(node: YouTubeNode): YouTubeNode;
4297
+ static importJSON(serializedNode: SerializedYouTubeNode): YouTubeNode;
4298
+ constructor(url: string, format?: ElementFormatType, key?: NodeKey);
4299
+ exportJSON(): SerializedYouTubeNode;
4300
+ exportDOM(): DOMExportOutput;
4301
+ static importDOM(): DOMConversionMap | null;
4302
+ updateDOM(): false;
4303
+ getUrl(): string;
4304
+ getTextContent(): string;
4305
+ decorate(_editor: LexicalEditor, config: EditorConfig): JSX_3.Element;
4306
+ }
4307
+
4308
+ declare interface YouTubeVideo {
4309
+ id: string;
4310
+ start?: number;
4311
+ }
4312
+
3797
4313
 
3798
4314
  export * from "primereact/confirmdialog";
3799
4315