mirror of
https://github.com/docmost/docmost.git
synced 2026-08-26 00:07:04 +08:00
* lightbox media display init * revert uninteded changes * load page media more accurately * restrict lock file changes to installed packages * revert changes in lock file * update lockfile * - support diagrams - support readonly mode - use softer backdrop - other enhancments --------- Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
30 lines
952 B
TypeScript
30 lines
952 B
TypeScript
import { atom } from "jotai";
|
|
import { Editor } from "@tiptap/core";
|
|
import { PageEditMode } from "@/features/user/types/user.types.ts";
|
|
|
|
export const pageEditorAtom = atom<Editor | null>(null);
|
|
|
|
export const titleEditorAtom = atom<Editor | null>(null);
|
|
|
|
export const readOnlyEditorAtom = atom<Editor | null>(null);
|
|
|
|
export const yjsConnectionStatusAtom = atom<string>("");
|
|
|
|
export const yjsSyncedAtom = atom<boolean>(false);
|
|
|
|
export const showAiMenuAtom = atom(false);
|
|
|
|
export const showLinkMenuAtom = atom(false);
|
|
|
|
export type LightboxRequest = {
|
|
src: string;
|
|
type: "image" | "video";
|
|
} | null;
|
|
|
|
const initialLightboxRequest: LightboxRequest = null;
|
|
export const lightboxRequestAtom = atom(initialLightboxRequest);
|
|
|
|
// Current page's edit mode — initialized from the user's saved preference on
|
|
// first load, can be toggled locally without persisting to the server.
|
|
export const currentPageEditModeAtom = atom<PageEditMode>(PageEditMode.Edit);
|