UNPKG

2.29 kBJavaScriptView Raw
1import { Token } from '@lumino/coreutils';
2import '../style/index.css';
3export var TextKind;
4(function (TextKind) {
5 TextKind["code"] = "code";
6 TextKind["content"] = "content";
7})(TextKind || (TextKind = {}));
8export const KIND_LABELS = {
9 code: 'Code',
10 content: 'Content'
11};
12export var FontFormat;
13(function (FontFormat) {
14 FontFormat["woff2"] = "woff2";
15 FontFormat["woff"] = "woff";
16})(FontFormat || (FontFormat = {}));
17export const FONT_FORMATS = {
18 woff2: 'font/woff2',
19 woff: 'font/woff'
20};
21export const CMD = {
22 code: {
23 fontSize: 'code-font-size',
24 fontFamily: 'code-font-family',
25 lineHeight: 'code-line-height'
26 },
27 content: {
28 fontSize: 'content-font-size',
29 fontFamily: 'content-font-family',
30 lineHeight: 'content-line-height'
31 },
32 editFonts: 'font-editor:open',
33 customFonts: {
34 disable: 'custom-fonts:disable',
35 enable: 'custom-fonts:enable'
36 }
37};
38export const ROOT = ':root';
39export const CSS = {
40 code: {
41 'font-family': '--jp-code-font-family',
42 'font-size': '--jp-code-font-size',
43 'line-height': '--jp-code-line-height'
44 },
45 content: {
46 'font-family': '--jp-content-font-family',
47 'font-size': '--jp-content-font-size1',
48 'line-height': '--jp-content-line-height'
49 }
50};
51export const TEXT_OPTIONS = {
52 'font-size': _m => Array.from(Array(25).keys()).map(i => `${i + 8}px`),
53 'line-height': _m => Array.from(Array(8).keys()).map(i => `${i * 0.25 + 1}`),
54 'font-family': m => {
55 let names = Array.from(m.fonts.values()).reduce((memo, f) => {
56 return memo.concat(f.name);
57 }, []);
58 names.sort((a, b) => a.localeCompare(b));
59 return names;
60 }
61};
62export const TEXT_LABELS = {
63 'font-size': 'Size',
64 'line-height': 'Line Height',
65 'font-family': 'Font'
66};
67export const DEFAULT = {
68 code: {
69 fontSize: '13px',
70 lineHeight: '1',
71 fontFamily: '"Source Code Pro", monospace'
72 }
73};
74export const PACKAGE_NAME = '@deathbeds/jupyterlab-fonts';
75export const CONFIGURED_CLASS = 'jp-fonts-configured';
76// tslint:disable-next-line
77export const IFontManager = new Token('@deathbeds/jupyterlab-fonts:IFontManager');
78//# sourceMappingURL=index.js.map
\No newline at end of file