* Comment model * Framework, model, policy, presenter, api endpoint etc * Iteration, first pass of UI * fixes, refactors * Comment commands * comment socket support * typing indicators * comment component, styling * wip * right sidebar resize * fix: CMD+Enter submit * Add usePersistedState fix: Main page scrolling on comment highlight * drafts * Typing indicator * refactor * policies * Click thread to highlight Improve comment timestamps * padding * Comment menu v1 * Change comments to use editor * Basic comment editing * fix: Hide commenting button when disabled at team level * Enable opening sidebar without mark * Move selected comment to location state * Add comment delete confirmation * Add comment count to document meta * fix: Comment sidebar togglable Add copy link to comment * stash * Restore History changes * Refactor right sidebar to allow for comment animation * Update to new router best practices * stash * Various improvements * stash * Handle click outside * Fix incorrect placeholder in input fix: Input box appearing on other sessions erroneously * stash * fix: Don't leave orphaned child comments * styling * stash * Enable comment toggling again * Edit styling, merge conflicts * fix: Cannot navigate from insights to comments * Remove draft comment mark on click outside * Fix: Empty comment sidebar, tsc * Remove public toggle * fix: All comments are recessed fix: Comments should not be printed * fix: Associated mark should be removed on comment delete * Revert unused changes * Empty state, basic RTL support * Create dont toggle comment mark * Make it feel more snappy * Highlight active comment in text * fix animation * RTL support * Add reply CTA * Translations
158 lines
3.8 KiB
TypeScript
158 lines
3.8 KiB
TypeScript
export type Role = "admin" | "viewer" | "member";
|
|
|
|
export type DateFilter = "day" | "week" | "month" | "year";
|
|
|
|
export enum Client {
|
|
Web = "web",
|
|
Desktop = "desktop",
|
|
}
|
|
|
|
export enum ExportContentType {
|
|
Markdown = "text/markdown",
|
|
Html = "text/html",
|
|
Pdf = "application/pdf",
|
|
}
|
|
|
|
export enum FileOperationFormat {
|
|
JSON = "json",
|
|
MarkdownZip = "outline-markdown",
|
|
HTMLZip = "html",
|
|
PDF = "pdf",
|
|
Notion = "notion",
|
|
}
|
|
|
|
export enum FileOperationType {
|
|
Import = "import",
|
|
Export = "export",
|
|
}
|
|
|
|
export enum FileOperationState {
|
|
Creating = "creating",
|
|
Uploading = "uploading",
|
|
Complete = "complete",
|
|
Error = "error",
|
|
Expired = "expired",
|
|
}
|
|
|
|
export type PublicEnv = {
|
|
URL: string;
|
|
CDN_URL: string;
|
|
COLLABORATION_URL: string;
|
|
AWS_S3_UPLOAD_BUCKET_URL: string;
|
|
AWS_S3_ACCELERATE_URL: string;
|
|
DEPLOYMENT: string | undefined;
|
|
ENVIRONMENT: string;
|
|
SENTRY_DSN: string | undefined;
|
|
SENTRY_TUNNEL: string | undefined;
|
|
SLACK_CLIENT_ID: string | undefined;
|
|
SLACK_APP_ID: string | undefined;
|
|
MAXIMUM_IMPORT_SIZE: number;
|
|
SUBDOMAINS_ENABLED: boolean;
|
|
EMAIL_ENABLED: boolean;
|
|
PDF_EXPORT_ENABLED: boolean;
|
|
DEFAULT_LANGUAGE: string;
|
|
GOOGLE_ANALYTICS_ID: string | undefined;
|
|
RELEASE: string | undefined;
|
|
APP_NAME: string;
|
|
analytics: {
|
|
service?: IntegrationService;
|
|
settings?: IntegrationSettings<IntegrationType.Analytics>;
|
|
};
|
|
};
|
|
|
|
export enum AttachmentPreset {
|
|
DocumentAttachment = "documentAttachment",
|
|
Import = "import",
|
|
Avatar = "avatar",
|
|
}
|
|
|
|
export enum IntegrationType {
|
|
Post = "post",
|
|
Command = "command",
|
|
Embed = "embed",
|
|
Analytics = "analytics",
|
|
}
|
|
|
|
export enum IntegrationService {
|
|
Diagrams = "diagrams",
|
|
Slack = "slack",
|
|
GoogleAnalytics = "google-analytics",
|
|
}
|
|
|
|
export enum CollectionPermission {
|
|
Read = "read",
|
|
ReadWrite = "read_write",
|
|
}
|
|
|
|
export type IntegrationSettings<T> = T extends IntegrationType.Embed
|
|
? { url: string }
|
|
: T extends IntegrationType.Analytics
|
|
? { measurementId: string }
|
|
: T extends IntegrationType.Post
|
|
? { url: string; channel: string; channelId: string }
|
|
: T extends IntegrationType.Post
|
|
? { serviceTeamId: string }
|
|
:
|
|
| { url: string }
|
|
| { url: string; channel: string; channelId: string }
|
|
| { serviceTeamId: string }
|
|
| { measurementId: string };
|
|
|
|
export enum UserPreference {
|
|
/** Whether reopening the app should redirect to the last viewed document. */
|
|
RememberLastPath = "rememberLastPath",
|
|
/** If web-style hand pointer should be used on interactive elements. */
|
|
UseCursorPointer = "useCursorPointer",
|
|
CodeBlockLineNumers = "codeBlockLineNumbers",
|
|
}
|
|
|
|
export type UserPreferences = { [key in UserPreference]?: boolean };
|
|
|
|
export type CustomTheme = {
|
|
accent: string;
|
|
accentText: string;
|
|
};
|
|
|
|
export enum TeamPreference {
|
|
/** Whether documents have a separate edit mode instead of seamless editing. */
|
|
SeamlessEdit = "seamlessEdit",
|
|
/** Whether to use team logo across the app for branding. */
|
|
PublicBranding = "publicBranding",
|
|
/** Whether viewers should see download options. */
|
|
ViewersCanExport = "viewersCanExport",
|
|
/** Whether users can comment on documents. */
|
|
Commenting = "commenting",
|
|
/** The custom theme for the team. */
|
|
CustomTheme = "customTheme",
|
|
}
|
|
|
|
export type TeamPreferences = {
|
|
[TeamPreference.SeamlessEdit]?: boolean;
|
|
[TeamPreference.PublicBranding]?: boolean;
|
|
[TeamPreference.ViewersCanExport]?: boolean;
|
|
[TeamPreference.Commenting]?: boolean;
|
|
[TeamPreference.CustomTheme]?: Partial<CustomTheme>;
|
|
};
|
|
|
|
export enum NavigationNodeType {
|
|
Collection = "collection",
|
|
Document = "document",
|
|
}
|
|
|
|
export type NavigationNode = {
|
|
id: string;
|
|
title: string;
|
|
url: string;
|
|
children: NavigationNode[];
|
|
isDraft?: boolean;
|
|
collectionId?: string;
|
|
type?: NavigationNodeType;
|
|
parent?: NavigationNode | null;
|
|
depth?: number;
|
|
};
|
|
|
|
export type CollectionSort = {
|
|
field: string;
|
|
direction: "asc" | "desc";
|
|
};
|