@monolith-forensics/monolith-ui 1.2.33 → 1.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FileViewer/viewers/PdfViewer.js +2 -7
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +2 -2
- package/dist/MonolithUIProvider/MonolithUIProvider.js +2 -2
- package/dist/MonolithUIProvider/index.d.ts +2 -2
- package/dist/MonolithUIProvider/index.js +2 -2
- package/dist/MonolithUIProvider/useTheme.d.ts +2 -0
- package/dist/MonolithUIProvider/{useMonolithUITheme.js → useTheme.js} +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/theme/getTheme.d.ts +1 -1
- package/package.json +2 -3
- package/dist/MonolithUIProvider/useMonolithUITheme.d.ts +0 -3
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { Document, Page,
|
|
4
|
-
//pdfjs
|
|
5
|
-
} from "react-pdf";
|
|
3
|
+
import { Document, Page, pdfjs } from "react-pdf";
|
|
6
4
|
import "react-pdf/dist/esm/Page/AnnotationLayer.css";
|
|
7
5
|
import "react-pdf/dist/esm/Page/TextLayer.css";
|
|
8
6
|
import styled from "styled-components";
|
|
9
7
|
import Loader from "../../Loader";
|
|
10
|
-
|
|
11
|
-
// "pdfjs-dist/build/pdf.worker.min.mjs",
|
|
12
|
-
// import.meta.url
|
|
13
|
-
// ).toString();
|
|
8
|
+
pdfjs.GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/build/pdf.worker.min.mjs", import.meta.url).toString();
|
|
14
9
|
const StyledContainer = styled.div `
|
|
15
10
|
display: flex;
|
|
16
11
|
justify-content: center;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DefaultTheme } from "styled-components";
|
|
2
|
+
export { styled } from "styled-components";
|
|
2
3
|
import { Themes } from "../theme";
|
|
3
4
|
import React from "react";
|
|
4
5
|
import typography from "../theme/typography";
|
|
@@ -140,5 +141,4 @@ interface MonolithUIProviderProps {
|
|
|
140
141
|
defaultColorScheme?: Themes;
|
|
141
142
|
colorScheme?: Themes;
|
|
142
143
|
}
|
|
143
|
-
declare const MonolithUIProvider: ({ children, theme, defaultColorScheme, colorScheme, }: MonolithUIProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
144
|
-
export default MonolithUIProvider;
|
|
144
|
+
export declare const MonolithUIProvider: ({ children, theme, defaultColorScheme, colorScheme, }: MonolithUIProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import merge from "deepmerge";
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
+
export { styled } from "styled-components";
|
|
4
5
|
import { Themes, getTheme } from "../theme";
|
|
5
6
|
import { createContext, useState } from "react";
|
|
6
7
|
import GlobalStyle from "./GlobalStyle";
|
|
7
8
|
export const MonolithUIContext = createContext(undefined);
|
|
8
|
-
const MonolithUIProvider = ({ children, theme, defaultColorScheme = Themes.DARK, colorScheme, }) => {
|
|
9
|
+
export const MonolithUIProvider = ({ children, theme, defaultColorScheme = Themes.DARK, colorScheme, }) => {
|
|
9
10
|
const [colorSchemeState, setColorSchemeState] = useState(defaultColorScheme);
|
|
10
11
|
const toggleColorScheme = () => {
|
|
11
12
|
setColorSchemeState((prev) => prev === Themes.LIGHT ? Themes.DARK : Themes.LIGHT);
|
|
@@ -22,4 +23,3 @@ const MonolithUIProvider = ({ children, theme, defaultColorScheme = Themes.DARK,
|
|
|
22
23
|
setColorScheme: setColorSchemeState,
|
|
23
24
|
}, children: _jsxs(ThemeProvider, { theme: _theme, children: [_jsx(GlobalStyle, { theme: _theme }), children] }) }));
|
|
24
25
|
};
|
|
25
|
-
export default MonolithUIProvider;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./MonolithUIProvider";
|
|
2
|
+
export * from "./useTheme";
|
|
3
3
|
export { getTheme } from "../theme";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./MonolithUIProvider";
|
|
2
|
+
export * from "./useTheme";
|
|
3
3
|
export { getTheme } from "../theme";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
2
|
import { MonolithUIContext } from "./MonolithUIProvider";
|
|
3
|
-
const
|
|
3
|
+
export const useTheme = () => {
|
|
4
4
|
const context = useContext(MonolithUIContext);
|
|
5
5
|
if (context === undefined) {
|
|
6
6
|
throw new Error("hook must be used within a MonolithUIProvider");
|
|
7
7
|
}
|
|
8
8
|
return context;
|
|
9
9
|
};
|
|
10
|
-
export default useMonolithUITheme;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,8 +25,7 @@ export { default as Tooltip } from "./Tooltip";
|
|
|
25
25
|
export { default as Pill } from "./Pill";
|
|
26
26
|
export { default as Calendar } from "./Calendar";
|
|
27
27
|
export { default as Typography } from "./Typography";
|
|
28
|
-
export
|
|
29
|
-
export { useMonolithUITheme } from "./MonolithUIProvider";
|
|
28
|
+
export * from "./MonolithUIProvider";
|
|
30
29
|
export { default as RichTextEditor, Extensions, SlashCommands, Controls, } from "./RichTextEditor";
|
|
31
30
|
export type { CustomItem, ToolbarOptions } from "./RichTextEditor";
|
|
32
31
|
export { default as Loader } from "./Loader";
|
package/dist/index.js
CHANGED
|
@@ -21,8 +21,7 @@ export { default as Tooltip } from "./Tooltip";
|
|
|
21
21
|
export { default as Pill } from "./Pill";
|
|
22
22
|
export { default as Calendar } from "./Calendar";
|
|
23
23
|
export { default as Typography } from "./Typography";
|
|
24
|
-
export
|
|
25
|
-
export { useMonolithUITheme } from "./MonolithUIProvider";
|
|
24
|
+
export * from "./MonolithUIProvider";
|
|
26
25
|
export { default as RichTextEditor, Extensions, SlashCommands, Controls, } from "./RichTextEditor";
|
|
27
26
|
export { default as Loader } from "./Loader";
|
|
28
27
|
export * from "./hooks";
|
package/dist/theme/getTheme.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monolith-forensics/monolith-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.34",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Matt Danner (Monolith Forensics LLC)",
|
|
@@ -76,6 +76,5 @@
|
|
|
76
76
|
"@types/react-window": "^1.8.8",
|
|
77
77
|
"@types/spark-md5": "^3.0.4",
|
|
78
78
|
"typescript": "^5.5.4"
|
|
79
|
-
}
|
|
80
|
-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
79
|
+
}
|
|
81
80
|
}
|