2022-01-16 06:05:35 +01:00
|
|
|
// Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Code that is shared among all entry points in /ts/editor
|
|
|
|
*/
|
|
|
|
import "./legacy.css";
|
|
|
|
import "./editor-base.css";
|
2022-02-03 05:52:11 +01:00
|
|
|
import "../lib/runtime-require";
|
2022-01-16 06:05:35 +01:00
|
|
|
import "../sveltelib/export-runtime";
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface Selection {
|
|
|
|
modify(s: string, t: string, u: string): void;
|
|
|
|
addRange(r: Range): void;
|
|
|
|
removeAllRanges(): void;
|
|
|
|
getRangeAt(n: number): Range;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
import { ModuleName } from "../lib/i18n";
|
|
|
|
|
|
|
|
export const editorModules = [
|
|
|
|
ModuleName.EDITING,
|
|
|
|
ModuleName.KEYBOARD,
|
|
|
|
ModuleName.ACTIONS,
|
|
|
|
ModuleName.BROWSING,
|
|
|
|
];
|
|
|
|
|
2022-02-04 09:36:34 +01:00
|
|
|
import * as contextKeys from "../components/context-keys";
|
2022-01-16 06:05:35 +01:00
|
|
|
import IconButton from "../components/IconButton.svelte";
|
|
|
|
import LabelButton from "../components/LabelButton.svelte";
|
|
|
|
import WithContext from "../components/WithContext.svelte";
|
|
|
|
import WithState from "../components/WithState.svelte";
|
|
|
|
import * as editorContextKeys from "./NoteEditor.svelte";
|
|
|
|
|
|
|
|
export const components = {
|
|
|
|
IconButton,
|
|
|
|
LabelButton,
|
|
|
|
WithContext,
|
|
|
|
WithState,
|
|
|
|
contextKeys: { ...contextKeys, ...editorContextKeys },
|
|
|
|
};
|
2022-01-24 02:43:09 +01:00
|
|
|
|
|
|
|
export { editorToolbar } from "./editor-toolbar";
|