mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-28 16:06:47 +01:00
theme: migrate to custom fork of rebass for latest changes
This commit is contained in:
94
packages/core/package-lock.json
generated
94
packages/core/package-lock.json
generated
@@ -11,7 +11,6 @@
|
||||
"dependencies": {
|
||||
"@microsoft/signalr": "^6.0.7",
|
||||
"@microsoft/signalr-protocol-msgpack": "^6.0.7",
|
||||
"@streetwriters/logger": "^1.0.3",
|
||||
"async-mutex": "^0.3.2",
|
||||
"base64-arraybuffer": "^1.0.2",
|
||||
"dayjs": "^1.11.3",
|
||||
@@ -28,7 +27,6 @@
|
||||
"@babel/plugin-transform-runtime": "^7.18.9",
|
||||
"@babel/preset-env": "^7.18.9",
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@notesnook/crypto": "^1.0.1",
|
||||
"@types/jest": "^28.1.6",
|
||||
"@types/showdown": "^2.0.0",
|
||||
"abortcontroller-polyfill": "^1.7.3",
|
||||
@@ -2941,15 +2939,6 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@notesnook/crypto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@notesnook/crypto/-/crypto-1.0.1.tgz",
|
||||
"integrity": "sha512-DYwrkpX1Zo3imJD7rUCmhB7cnNYLs1mW1H8p2OPpjrXDYcBw7yGVRGiM3IwXmK0+PRpbQ2vf/PIbYYy/3f8aBQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"libsodium-wrappers": "0.7.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@sinclair/typebox": {
|
||||
"version": "0.24.20",
|
||||
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.20.tgz",
|
||||
@@ -2974,12 +2963,6 @@
|
||||
"@sinonjs/commons": "^1.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@streetwriters/logger": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://npm.pkg.github.com/download/@streetwriters/logger/1.0.3/eefc6ed7520d2fe32b8c6b27a0fbc7a3c4f33d01db19d1125f35bd203db2b36c",
|
||||
"integrity": "sha512-3Wcyv2XhX+DSIefx/cjjyJBQETYNuZ08FzejZLDAuLziQBjH6e58pzCSLv//DKRQfnL3nmSOtgGi/VgZ7Szb1A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tootallnate/once": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
|
||||
@@ -8324,21 +8307,6 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/libsodium": {
|
||||
"version": "0.7.10",
|
||||
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.10.tgz",
|
||||
"integrity": "sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/libsodium-wrappers": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz",
|
||||
"integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"libsodium": "^0.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lines-and-columns": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||
@@ -9690,20 +9658,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uhyphen": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uhyphen/-/uhyphen-0.1.0.tgz",
|
||||
@@ -12226,15 +12180,6 @@
|
||||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@notesnook/crypto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@notesnook/crypto/-/crypto-1.0.1.tgz",
|
||||
"integrity": "sha512-DYwrkpX1Zo3imJD7rUCmhB7cnNYLs1mW1H8p2OPpjrXDYcBw7yGVRGiM3IwXmK0+PRpbQ2vf/PIbYYy/3f8aBQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"libsodium-wrappers": "0.7.9"
|
||||
}
|
||||
},
|
||||
"@sinclair/typebox": {
|
||||
"version": "0.24.20",
|
||||
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.20.tgz",
|
||||
@@ -12259,11 +12204,6 @@
|
||||
"@sinonjs/commons": "^1.7.0"
|
||||
}
|
||||
},
|
||||
"@streetwriters/logger": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://npm.pkg.github.com/download/@streetwriters/logger/1.0.3/eefc6ed7520d2fe32b8c6b27a0fbc7a3c4f33d01db19d1125f35bd203db2b36c",
|
||||
"integrity": "sha512-3Wcyv2XhX+DSIefx/cjjyJBQETYNuZ08FzejZLDAuLziQBjH6e58pzCSLv//DKRQfnL3nmSOtgGi/VgZ7Szb1A=="
|
||||
},
|
||||
"@tootallnate/once": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
|
||||
@@ -12546,8 +12486,7 @@
|
||||
"version": "5.3.2",
|
||||
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
|
||||
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
"dev": true
|
||||
},
|
||||
"acorn-walk": {
|
||||
"version": "7.2.0",
|
||||
@@ -15738,8 +15677,7 @@
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz",
|
||||
"integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
"dev": true
|
||||
},
|
||||
"jest-regex-util": {
|
||||
"version": "28.0.2",
|
||||
@@ -16388,8 +16326,7 @@
|
||||
"version": "8.8.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz",
|
||||
"integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -16445,21 +16382,6 @@
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"libsodium": {
|
||||
"version": "0.7.10",
|
||||
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.10.tgz",
|
||||
"integrity": "sha512-eY+z7hDrDKxkAK+QKZVNv92A5KYkxfvIshtBJkmg5TSiCnYqZP3i9OO9whE79Pwgm4jGaoHgkM4ao/b9Cyu4zQ==",
|
||||
"dev": true
|
||||
},
|
||||
"libsodium-wrappers": {
|
||||
"version": "0.7.9",
|
||||
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz",
|
||||
"integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"libsodium": "^0.7.0"
|
||||
}
|
||||
},
|
||||
"lines-and-columns": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
||||
@@ -17475,13 +17397,6 @@
|
||||
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"uhyphen": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uhyphen/-/uhyphen-0.1.0.tgz",
|
||||
@@ -17663,8 +17578,7 @@
|
||||
"ws": {
|
||||
"version": "7.4.5",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz",
|
||||
"integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g=="
|
||||
},
|
||||
"xml-name-validator": {
|
||||
"version": "4.0.0",
|
||||
|
||||
4890
packages/editor/package-lock.json
generated
4890
packages/editor/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@
|
||||
"@_ueberdosis/prosemirror-tables": "^1.1.3",
|
||||
"@mdi/js": "^6.9.96",
|
||||
"@mdi/react": "^1.6.0",
|
||||
"@rebass/forms": "^4.0.6",
|
||||
"@streetwriters/rebass-forms": "^5.0.0",
|
||||
"@social-embed/lib": "^0.0.1-next.12",
|
||||
"@tiptap/core": "^2.0.0-beta.181",
|
||||
"@tiptap/extension-character-count": "^2.0.0-beta.31",
|
||||
@@ -34,7 +34,7 @@
|
||||
"@tiptap/extension-underline": "^2.0.0-beta.25",
|
||||
"@tiptap/starter-kit": "^2.0.0-beta.190",
|
||||
"detect-indent": "^7.0.0",
|
||||
"emotion-theming": "^10.0.19",
|
||||
"@emotion/react": "^11.10.0",
|
||||
"katex": "^0.16.0",
|
||||
"prism-themes": "^1.9.0",
|
||||
"prosemirror-codemark": "^0.4.0",
|
||||
@@ -42,16 +42,16 @@
|
||||
"re-resizable": "^6.9.9",
|
||||
"react-colorful": "^5.5.1",
|
||||
"react-modal": "^3.15.1",
|
||||
"rebass": "^4.0.7",
|
||||
"@streetwriters/rebass": "^5.0.0",
|
||||
"redent": "^4.0.0",
|
||||
"refractor": "^4.7.0",
|
||||
"strip-indent": "^4.0.0",
|
||||
"tinycolor2": "^1.4.2",
|
||||
"unfurl.js": "^5.7.0",
|
||||
"zustand": "^3.7.2"
|
||||
"zustand": "^3.7.2",
|
||||
"@notesnook/theme": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@streetwriters/theme": "1.0.0",
|
||||
"@types/katex": "^0.14.0",
|
||||
"@types/prismjs": "^1.26.0",
|
||||
"@types/react": "^17.0.37",
|
||||
|
||||
@@ -6,7 +6,7 @@ import React, {
|
||||
useEffect
|
||||
} from "react";
|
||||
import { MenuItem } from "../menu/types";
|
||||
import { Box, Button, Flex, Text, FlexProps } from "rebass";
|
||||
import { Box, Button, Flex, Text, FlexProps } from "@streetwriters/rebass";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
import { Icons } from "../../toolbar/icons";
|
||||
import { MenuButton } from "../menu/menu-button";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { forwardRef, useCallback, useRef, ForwardedRef } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { Button as RebassButton, ButtonProps } from "rebass";
|
||||
import { Button as RebassButton, ButtonProps } from "@streetwriters/rebass";
|
||||
|
||||
const _Button = (
|
||||
props: ButtonProps,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Input, InputProps } from "@rebass/forms";
|
||||
import { Flex, FlexProps, Text } from "rebass";
|
||||
import { Input, InputProps } from "@streetwriters/rebass-forms";
|
||||
import { Flex, FlexProps, Text } from "@streetwriters/rebass";
|
||||
|
||||
type LabelInputProps = InputProps & {
|
||||
label: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useRef, useEffect, PropsWithChildren } from "react";
|
||||
import { Box, Flex, FlexProps, Text } from "rebass";
|
||||
import { Box, Flex, FlexProps, Text } from "@streetwriters/rebass";
|
||||
import { getPosition } from "../../utils/position";
|
||||
import {
|
||||
MenuButton as MenuButtonType,
|
||||
@@ -99,7 +99,7 @@ export function Menu(props: MenuProps) {
|
||||
if (item.menu) {
|
||||
hoverTimeout.current = setTimeout(() => {
|
||||
setIsSubmenuOpen(true);
|
||||
}, 500);
|
||||
}, 500) as unknown as number;
|
||||
}
|
||||
}}
|
||||
onMouseLeave={() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRef } from "react";
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
import { Icons } from "../../toolbar/icons";
|
||||
import { useToolbarLocation } from "../../toolbar/stores/toolbar-store";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box } from "rebass";
|
||||
import { Box } from "@streetwriters/rebass";
|
||||
|
||||
export function MenuSeparator() {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SxStyleProp } from "rebass";
|
||||
import { SxStyleProp } from "@streetwriters/rebass";
|
||||
import { IconNames } from "../../toolbar/icons";
|
||||
|
||||
export type MenuItemComponentProps = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, useRef, useEffect, PropsWithChildren } from "react";
|
||||
import { Box } from "rebass";
|
||||
import { Box } from "@streetwriters/rebass";
|
||||
import { getPosition, PositionOptions } from "../../utils/position";
|
||||
import Modal from "react-modal";
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SchemeColors } from "@streetwriters/theme/dist/theme/colorscheme";
|
||||
import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";
|
||||
import { Resizable } from "re-resizable";
|
||||
import { PropsWithChildren } from "react";
|
||||
import { Icon, Icons } from "../../toolbar";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { Children, PropsWithChildren, useMemo, useState } from "react";
|
||||
import { Button, Flex, FlexProps } from "rebass";
|
||||
import { Button, Flex, FlexProps } from "@streetwriters/rebass";
|
||||
|
||||
export type TabProps = { title: string | React.ReactElement };
|
||||
export function Tab(props: PropsWithChildren<TabProps>) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ThemeProvider as EmotionThemeProvider } from "emotion-theming";
|
||||
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
||||
import { PropsWithChildren } from "react";
|
||||
import { useTheme } from "../../toolbar/stores/toolbar-store";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Text } from "rebass";
|
||||
import { Box, Text } from "@streetwriters/rebass";
|
||||
import { AttachmentWithProgress } from "./attachment";
|
||||
import { useRef } from "react";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { isLanguageLoaded, loadLanguage } from "./loader";
|
||||
import { refractor } from "refractor/lib/core";
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import Languages from "./languages.json";
|
||||
import { Input } from "@rebass/forms";
|
||||
import { Input } from "@streetwriters/rebass-forms";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
import { Icons } from "../../toolbar/icons";
|
||||
import { CodeBlockAttributes } from "./code-block";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Flex } from "rebass";
|
||||
import { Box, Flex } from "@streetwriters/rebass";
|
||||
import { useRef, useState } from "react";
|
||||
import { EmbedAlignmentOptions, EmbedAttributes } from "./embed";
|
||||
import { SelectionBasedReactNodeViewProps } from "../react";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Button, Flex, Image, Text } from "rebass";
|
||||
import { Box, Button, Flex, Image, Text } from "@streetwriters/rebass";
|
||||
import { ImageAlignmentOptions, ImageAttributes } from "./image";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { SelectionBasedReactNodeViewProps } from "../react";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Flex, Text } from "rebass";
|
||||
import { Box, Flex, Text } from "@streetwriters/rebass";
|
||||
import { ReactNodeViewProps } from "../react";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
import { Icons } from "../../toolbar/icons";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Text } from "rebass";
|
||||
import { Text } from "@streetwriters/rebass";
|
||||
import { ReactNodeViewProps } from "../react";
|
||||
import { useMemo } from "react";
|
||||
import { OutlineListAttributes } from "./outline-list";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Flex } from "rebass";
|
||||
import { Flex } from "@streetwriters/rebass";
|
||||
import {
|
||||
SelectionBasedNodeView,
|
||||
SelectionBasedReactNodeViewProps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { ReactNodeViewProps } from "../react";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
import { Icons } from "../../toolbar/icons";
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { Box, Flex, Text } from "rebass";
|
||||
import { Box, Flex, Text } from "@streetwriters/rebass";
|
||||
import { ReactNodeViewProps } from "../react";
|
||||
import { Node } from "prosemirror-model";
|
||||
import {
|
||||
findChildren,
|
||||
getNodeType
|
||||
} from "@tiptap/core";
|
||||
import { findChildren, getNodeType } from "@tiptap/core";
|
||||
import { Icon } from "../../toolbar/components/icon";
|
||||
import { Icons } from "../../toolbar/icons";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { Input } from "@rebass/forms";
|
||||
import { Input } from "@streetwriters/rebass-forms";
|
||||
import { TaskItemNode } from "../task-item";
|
||||
import { TaskListAttributes } from "./task-list";
|
||||
import { findParentNodeOfTypeClosestToPos } from "prosemirror-utils";
|
||||
|
||||
@@ -19,7 +19,7 @@ import TableRow from "@tiptap/extension-table-row";
|
||||
import TableCell from "./extensions/table-cell";
|
||||
import TableHeader from "@tiptap/extension-table-header";
|
||||
import { ImageNode } from "./extensions/image";
|
||||
import { Theme } from "@streetwriters/theme";
|
||||
import { Theme } from "@notesnook/theme";
|
||||
import { AttachmentNode, AttachmentOptions } from "./extensions/attachment";
|
||||
import { TaskListNode } from "./extensions/task-list";
|
||||
import { TaskItemNode } from "./extensions/task-item";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Flex } from "rebass";
|
||||
import { Flex } from "@streetwriters/rebass";
|
||||
import { Button } from "../../components/button";
|
||||
import { ToolButton } from "./tool-button";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRef, useState } from "react";
|
||||
import { Text } from "rebass";
|
||||
import { Text } from "@streetwriters/rebass";
|
||||
import { Icon } from "./icon";
|
||||
import { Icons } from "../icons";
|
||||
// import { MenuPresenter, MenuPresenterProps } from "../../components/menu/menu";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import MDIIcon from "@mdi/react";
|
||||
import { Theme } from "@streetwriters/theme";
|
||||
import { SchemeColors } from "@streetwriters/theme/dist/theme/colorscheme";
|
||||
import { Flex, FlexProps } from "rebass";
|
||||
import { useTheme } from "emotion-theming";
|
||||
import { Theme } from "@notesnook/theme";
|
||||
import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";
|
||||
import { Flex, FlexProps } from "@streetwriters/rebass";
|
||||
import { useTheme } from "@emotion/react";
|
||||
|
||||
type IconProps = {
|
||||
title?: string;
|
||||
@@ -20,7 +20,7 @@ function MDIIconWrapper({
|
||||
stroke,
|
||||
rotate
|
||||
}: IconProps) {
|
||||
const theme: Theme = useTheme();
|
||||
const theme = useTheme() as Theme;
|
||||
|
||||
const themedColor: string = theme?.colors
|
||||
? (theme.colors[color] as string)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Flex, Text } from "rebass";
|
||||
import { Button, Flex, Text } from "@streetwriters/rebass";
|
||||
import { Icon } from "./icon";
|
||||
import { Icons } from "../icons";
|
||||
import { PropsWithChildren } from "react";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PropsWithChildren, useRef } from "react";
|
||||
import { Flex } from "rebass";
|
||||
import { Flex } from "@streetwriters/rebass";
|
||||
import { Icons } from "../icons";
|
||||
import { Icon } from "./icon";
|
||||
import { ToolButton, ToolButtonProps } from "./tool-button";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Theme } from "@streetwriters/theme";
|
||||
import { SchemeColors } from "@streetwriters/theme/dist/theme/colorscheme";
|
||||
import { Theme } from "@notesnook/theme";
|
||||
import { SchemeColors } from "@notesnook/theme/dist/theme/colorscheme";
|
||||
import React from "react";
|
||||
import { ButtonProps } from "rebass";
|
||||
import { ButtonProps } from "@streetwriters/rebass";
|
||||
import { IconNames, Icons } from "../icons";
|
||||
import { ToolButtonVariant } from "../types";
|
||||
import { Button } from "../../components/button";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ToolbarGroupDefinition, ToolButtonVariant } from "../types";
|
||||
import { findTool } from "../tools";
|
||||
import { Flex, FlexProps } from "rebass";
|
||||
import { Flex, FlexProps } from "@streetwriters/rebass";
|
||||
import { Editor } from "../../types";
|
||||
import { MoreTools } from "./more-tools";
|
||||
import { getToolDefinition } from "../tool-definitions";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Editor } from "../../types";
|
||||
import { Box } from "rebass";
|
||||
import { Box } from "@streetwriters/rebass";
|
||||
import { Tab, Tabs } from "../../components/tabs";
|
||||
import { Icon } from "../components/icon";
|
||||
// import { MenuPresenter } from "../../components/menu/menu";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Box, Flex, Text } from "rebass";
|
||||
import { Input } from "@rebass/forms";
|
||||
import { Box, Flex, Text } from "@streetwriters/rebass";
|
||||
import { Input } from "@streetwriters/rebass-forms";
|
||||
import { Icon } from "../components/icon";
|
||||
import { Icons } from "../icons";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { useCallback, useState } from "react";
|
||||
import { Popup } from "../components/popup";
|
||||
import { Input, Textarea } from "@rebass/forms";
|
||||
import {
|
||||
Embed,
|
||||
EmbedSizeOptions
|
||||
} from "../../extensions/embed";
|
||||
import { Input, Textarea } from "@streetwriters/rebass-forms";
|
||||
import { Embed, EmbedSizeOptions } from "../../extensions/embed";
|
||||
import { convertUrlToEmbedUrl } from "@social-embed/lib";
|
||||
import { InlineInput } from "../../components/inline-input";
|
||||
import { Tabs, Tab } from "../../components/tabs";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Flex } from "rebass";
|
||||
import { Flex } from "@streetwriters/rebass";
|
||||
import { useCallback } from "react";
|
||||
import { Popup } from "../components/popup";
|
||||
import { Checkbox, Label } from "@rebass/forms";
|
||||
import { Checkbox, Label } from "@streetwriters/rebass-forms";
|
||||
import {
|
||||
ImageAlignmentOptions,
|
||||
ImageSizeOptions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Input } from "@rebass/forms";
|
||||
import { Input } from "@streetwriters/rebass-forms";
|
||||
import { useState } from "react";
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { ImageAttributes } from "../../extensions/image";
|
||||
import { Popup } from "../components/popup";
|
||||
import { downloadImage, toDataURL } from "../../utils/downloader";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Input } from "@rebass/forms";
|
||||
import { Flex } from "rebass";
|
||||
import { Input } from "@streetwriters/rebass-forms";
|
||||
import { Flex } from "@streetwriters/rebass";
|
||||
import { useRefValue } from "../../hooks/use-ref-value";
|
||||
import { Popup } from "../components/popup";
|
||||
import { LinkDefinition } from "../tools/link";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Input } from "@rebass/forms";
|
||||
import { Input } from "@streetwriters/rebass-forms";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { SearchStorage } from "../../extensions/search-replace";
|
||||
import { ToolButton } from "../components/tool-button";
|
||||
import { Editor } from "../../types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Flex, Text } from "rebass";
|
||||
import { Box, Flex, Text } from "@streetwriters/rebass";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Popup } from "../components/popup";
|
||||
import { useIsMobile } from "../stores/toolbar-store";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Theme } from "@streetwriters/theme";
|
||||
import { Theme } from "@notesnook/theme";
|
||||
import create from "zustand";
|
||||
|
||||
export type ToolbarLocation = "top" | "bottom";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Theme } from "@streetwriters/theme";
|
||||
import { Theme } from "@notesnook/theme";
|
||||
import { Editor } from "../types";
|
||||
import { Flex, FlexProps } from "rebass";
|
||||
import { ThemeProvider } from "emotion-theming";
|
||||
import { Flex, FlexProps } from "@streetwriters/rebass";
|
||||
import { ThemeProvider } from "@emotion/react";
|
||||
import { EditorFloatingMenus } from "./floating-menus";
|
||||
import { getDefaultPresets, STATIC_TOOLBAR_GROUPS } from "./tool-definitions";
|
||||
import { useEffect, useMemo } from "react";
|
||||
|
||||
@@ -8,7 +8,7 @@ import { MoreTools } from "../components/more-tools";
|
||||
import { useRefValue } from "../../hooks/use-ref-value";
|
||||
import { findMark, selectionToOffset } from "../utils/prosemirror";
|
||||
import { TextSelection } from "prosemirror-state";
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { ImageNode } from "../../extensions/image";
|
||||
|
||||
export function LinkSettings(props: ToolProps) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ToolProps } from "../types";
|
||||
import { Box, Button, Flex } from "rebass";
|
||||
import { Box, Button, Flex } from "@streetwriters/rebass";
|
||||
import { IconNames } from "../icons";
|
||||
import { useCallback, useRef, useState } from "react";
|
||||
import { SplitButton } from "../components/split-button";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ToolProps } from "../types";
|
||||
import { Editor } from "../../types";
|
||||
import { ToolButton } from "../components/tool-button";
|
||||
import { useCallback, useMemo, useRef, useState } from "react";
|
||||
import { Flex, Text } from "rebass";
|
||||
import { Flex, Text } from "@streetwriters/rebass";
|
||||
import { ResponsivePresenter } from "../../components/responsive";
|
||||
import { MenuButton, MenuItem } from "../../components/menu/types";
|
||||
import {
|
||||
|
||||
@@ -6,7 +6,7 @@ export function debounce<F extends (...args: never[]) => void>(
|
||||
|
||||
const debounced = (...args: Parameters<F>) => {
|
||||
if (timeout) clearTimeout(timeout);
|
||||
timeout = setTimeout(() => func(...args), waitFor);
|
||||
timeout = setTimeout(() => func(...args), waitFor) as unknown as number;
|
||||
};
|
||||
|
||||
return debounced;
|
||||
|
||||
39497
packages/theme/package-lock.json
generated
39497
packages/theme/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@streetwriters/theme",
|
||||
"name": "@notesnook/theme",
|
||||
"version": "1.0.1",
|
||||
"main": "./dist/index.js",
|
||||
"license": "GPL-3.0",
|
||||
@@ -8,25 +8,14 @@
|
||||
"url": "git://github.com/streetwriters/themeprovider.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rebass/forms": "^4.0.6",
|
||||
"@types/rebass": "^4.0.10",
|
||||
"@types/rebass__forms": "^4.0.6",
|
||||
"emotion-theming": "^10.0.19",
|
||||
"rebass": "^4.0.7",
|
||||
"@streetwriters/rebass": "^5.0.0",
|
||||
"@streetwriters/rebass-forms": "^5.0.0",
|
||||
"tinycolor2": "^1.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.11",
|
||||
"@types/react": "^17.0.37",
|
||||
"@types/react-color": "^3.0.6",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@types/react-modal": "^3.13.1",
|
||||
"@types/styled-components": "^5.1.26",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-scripts": "4.0.3",
|
||||
"typescript": "^4.5.2",
|
||||
"web-vitals": "^1.1.2"
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SxStyleProp } from "rebass";
|
||||
import { SxStyleProp } from "@streetwriters/rebass";
|
||||
|
||||
const defaultVariant: SxStyleProp = {
|
||||
bg: "transparent",
|
||||
@@ -11,26 +11,26 @@ const defaultVariant: SxStyleProp = {
|
||||
py: "7.5px",
|
||||
transition: "filter 200ms ease-in, box-shadow 200ms ease-out",
|
||||
":hover:not(:disabled)": {
|
||||
filter: "brightness(90%)",
|
||||
filter: "brightness(90%)"
|
||||
},
|
||||
":active": {
|
||||
filter: "brightness(98%)",
|
||||
filter: "brightness(98%)"
|
||||
},
|
||||
outline: "none",
|
||||
":focus-visible:not(:active)": {
|
||||
filter: "brightness(90%)",
|
||||
bg: "bgSecondary",
|
||||
bg: "bgSecondary"
|
||||
},
|
||||
":disabled": {
|
||||
opacity: 0.5,
|
||||
cursor: "not-allowed",
|
||||
},
|
||||
cursor: "not-allowed"
|
||||
}
|
||||
};
|
||||
|
||||
const primary: SxStyleProp = {
|
||||
variant: "buttons.default",
|
||||
color: "static",
|
||||
bg: "primary",
|
||||
bg: "primary"
|
||||
};
|
||||
|
||||
const dialog: SxStyleProp = {
|
||||
@@ -42,18 +42,18 @@ const dialog: SxStyleProp = {
|
||||
":focus:not(:active), :focus-within:not(:active), :focus-visible:not(:active)":
|
||||
{
|
||||
bg: "hover",
|
||||
filter: "brightness(90%)",
|
||||
filter: "brightness(90%)"
|
||||
},
|
||||
":disabled": {
|
||||
opacity: 0.7,
|
||||
cursor: "not-allowed",
|
||||
},
|
||||
cursor: "not-allowed"
|
||||
}
|
||||
};
|
||||
|
||||
const secondary: SxStyleProp = {
|
||||
variant: "buttons.default",
|
||||
color: "text",
|
||||
bg: "border",
|
||||
bg: "border"
|
||||
};
|
||||
|
||||
const tertiary: SxStyleProp = {
|
||||
@@ -63,8 +63,8 @@ const tertiary: SxStyleProp = {
|
||||
border: "2px solid",
|
||||
borderColor: "border",
|
||||
":hover": {
|
||||
borderColor: "primary",
|
||||
},
|
||||
borderColor: "primary"
|
||||
}
|
||||
};
|
||||
|
||||
const list: SxStyleProp = {
|
||||
@@ -78,8 +78,8 @@ const list: SxStyleProp = {
|
||||
px: 0,
|
||||
cursor: "pointer",
|
||||
":hover": {
|
||||
borderBottomColor: "primary",
|
||||
},
|
||||
borderBottomColor: "primary"
|
||||
}
|
||||
};
|
||||
|
||||
const anchor: SxStyleProp = {
|
||||
@@ -91,8 +91,8 @@ const anchor: SxStyleProp = {
|
||||
px: 0,
|
||||
py: 0,
|
||||
":hover": {
|
||||
textDecoration: "underline",
|
||||
},
|
||||
textDecoration: "underline"
|
||||
}
|
||||
};
|
||||
|
||||
const icon: SxStyleProp = {
|
||||
@@ -101,8 +101,8 @@ const icon: SxStyleProp = {
|
||||
borderRadius: "none",
|
||||
":hover": {
|
||||
backgroundColor: "hover",
|
||||
filter: "brightness(90%)",
|
||||
},
|
||||
filter: "brightness(90%)"
|
||||
}
|
||||
};
|
||||
|
||||
const tool: SxStyleProp = {
|
||||
@@ -111,15 +111,15 @@ const tool: SxStyleProp = {
|
||||
backgroundColor: "bgSecondary",
|
||||
borderRadius: "default",
|
||||
":hover": {
|
||||
backgroundColor: "hover",
|
||||
},
|
||||
backgroundColor: "hover"
|
||||
}
|
||||
};
|
||||
|
||||
const statusItem: SxStyleProp = {
|
||||
variant: "buttons.icon",
|
||||
p: 0,
|
||||
py: 1,
|
||||
px: 1,
|
||||
px: 1
|
||||
};
|
||||
|
||||
const menuItem: SxStyleProp = {
|
||||
@@ -132,11 +132,11 @@ const menuItem: SxStyleProp = {
|
||||
cursor: "pointer",
|
||||
":hover:not(:disabled),:focus:not(:disabled)": {
|
||||
backgroundColor: "hover",
|
||||
boxShadow: "none",
|
||||
boxShadow: "none"
|
||||
},
|
||||
":active:not(:disabled)": {
|
||||
backgroundColor: "border",
|
||||
},
|
||||
backgroundColor: "border"
|
||||
}
|
||||
};
|
||||
|
||||
export const buttonVariants = {
|
||||
@@ -150,5 +150,5 @@ export const buttonVariants = {
|
||||
icon,
|
||||
dialog,
|
||||
statusitem: statusItem,
|
||||
menuitem: menuItem,
|
||||
menuitem: menuItem
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SxStyleProp } from "rebass";
|
||||
import { SxStyleProp } from "@streetwriters/rebass";
|
||||
|
||||
type FlexDirection = "row" | "column";
|
||||
export type FlexVariants<T extends FlexDirection> = T extends "row"
|
||||
@@ -19,7 +19,7 @@ export function createFlexVariants<T extends FlexDirection>(
|
||||
const variants = {
|
||||
Center: createCenterVariant(direction),
|
||||
Fill: createFillVariant(direction),
|
||||
CenterFill: createCenterFillVariant(direction),
|
||||
CenterFill: createCenterFillVariant(direction)
|
||||
};
|
||||
return Object.fromEntries(
|
||||
Object.entries(variants).map(([key, value]) => {
|
||||
@@ -32,14 +32,14 @@ function createCenterVariant(direction: FlexDirection): SxStyleProp {
|
||||
return {
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
flexDirection: direction,
|
||||
flexDirection: direction
|
||||
};
|
||||
}
|
||||
|
||||
function createFillVariant(direction: FlexDirection): SxStyleProp {
|
||||
return {
|
||||
flex: "1 1 auto",
|
||||
flexDirection: direction,
|
||||
flexDirection: direction
|
||||
};
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ function createCenterFillVariant(direction: FlexDirection): SxStyleProp {
|
||||
return {
|
||||
variant: `variants.${direction}Center`,
|
||||
flex: "1 1 auto",
|
||||
flexDirection: direction,
|
||||
flexDirection: direction
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SxStyleProp } from "rebass";
|
||||
import { SxStyleProp } from "@streetwriters/rebass";
|
||||
|
||||
const defaultVariant: SxStyleProp = {
|
||||
borderRadius: "default",
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { SxStyleProp } from "rebass";
|
||||
import { SxStyleProp } from "@streetwriters/rebass";
|
||||
|
||||
const defaultVariant: SxStyleProp = {
|
||||
color: "text",
|
||||
fontFamily: "body",
|
||||
fontFamily: "body"
|
||||
};
|
||||
|
||||
const heading: SxStyleProp = {
|
||||
variant: "text.default",
|
||||
fontFamily: "heading",
|
||||
fontWeight: "bold",
|
||||
fontSize: "heading",
|
||||
fontSize: "heading"
|
||||
};
|
||||
|
||||
const title: SxStyleProp = {
|
||||
variant: "text.heading",
|
||||
fontSize: "title",
|
||||
fontWeight: "bold",
|
||||
fontWeight: "bold"
|
||||
};
|
||||
|
||||
const subtitle: SxStyleProp = {
|
||||
variant: "text.heading",
|
||||
fontSize: "subtitle",
|
||||
fontWeight: "bold",
|
||||
fontWeight: "bold"
|
||||
};
|
||||
|
||||
const body: SxStyleProp = { variant: "text.default", fontSize: "body" };
|
||||
@@ -29,13 +29,13 @@ const body: SxStyleProp = { variant: "text.default", fontSize: "body" };
|
||||
const subBody: SxStyleProp = {
|
||||
variant: "text.default",
|
||||
fontSize: "subBody",
|
||||
color: "fontTertiary",
|
||||
color: "fontTertiary"
|
||||
};
|
||||
|
||||
const error: SxStyleProp = {
|
||||
variant: "text.default",
|
||||
fontSize: "subBody",
|
||||
color: "error",
|
||||
color: "error"
|
||||
};
|
||||
|
||||
export const textVariants = {
|
||||
@@ -45,5 +45,5 @@ export const textVariants = {
|
||||
subtitle,
|
||||
body,
|
||||
subBody,
|
||||
error,
|
||||
error
|
||||
};
|
||||
|
||||
@@ -4,13 +4,13 @@ import { injectCss } from "./css";
|
||||
|
||||
const factory = new ThemeFactory();
|
||||
|
||||
export function useTheme(config: ThemeConfig, inject: boolean = true) {
|
||||
export function useTheme(config: ThemeConfig, inject = true) {
|
||||
const { theme, accent, scale = 1 } = config;
|
||||
|
||||
const themeProperties = factory.construct({
|
||||
theme,
|
||||
accent,
|
||||
scale,
|
||||
scale
|
||||
});
|
||||
if (inject) injectCss(factory.transform("css", themeProperties));
|
||||
|
||||
@@ -1,106 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "ES5" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
"lib": [
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ESNext"
|
||||
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
||||
"jsx": "react-jsx" /* Specify what JSX code is generated. */,
|
||||
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
||||
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
|
||||
/* Modules */
|
||||
"module": "CommonJS" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
||||
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
"resolveJsonModule": true /* Enable importing .json files */,
|
||||
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
|
||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
|
||||
/* Emit */
|
||||
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
||||
"downlevelIteration": true /* Emit more compliant, but verbose and less performant JavaScript for iteration. */,
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||
|
||||
/* Interop Constraints */
|
||||
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
||||
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
||||
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
||||
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
||||
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
||||
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
||||
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
||||
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
||||
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
"noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
|
||||
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
||||
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["src/"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user