@3cr/viewer-browser 0.0.110 → 0.0.112

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/index.ts CHANGED
@@ -7,10 +7,16 @@ import {
7
7
  LoadViewerOptions,
8
8
  } from "@/models/LoadViewerOptions";
9
9
  import { LoadViewerPayload } from "@/models/LoadViewerPayload";
10
+ import { disableTheme } from "@/plugins/vuetify";
10
11
 
11
12
  let mountedApp: ComponentPublicInstance | undefined = undefined;
12
13
 
13
- export async function registerViewer(version: string) {
14
+ export async function registerViewer(
15
+ version: string,
16
+ options = {
17
+ disableTheme: false,
18
+ }
19
+ ) {
14
20
  const newElement = document.createElement("div");
15
21
 
16
22
  newElement.style.width = "0";
@@ -20,6 +26,10 @@ export async function registerViewer(version: string) {
20
26
  document.body.appendChild(newElement);
21
27
 
22
28
  const app = createApp(BrowserViewer);
29
+ if (options.disableTheme) {
30
+ disableTheme.value = true;
31
+ }
32
+
23
33
  registerPlugins(app);
24
34
 
25
35
  mountedApp = app.mount(newElement);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3cr/viewer-browser",
3
- "version": "0.0.110",
3
+ "version": "0.0.112",
4
4
  "main": "./dist/Viewer3CR.umd.js",
5
5
  "module": "dist/Viewer3CR.umd.js",
6
6
  "homepage": "https://docs.3cr.singular.health",
@@ -12,42 +12,44 @@ import { createVuetify, IconProps } from "vuetify";
12
12
  import { aliases, md } from "vuetify/iconsets/md";
13
13
  import { mdi } from "vuetify/iconsets/mdi";
14
14
  import { fa } from "vuetify/iconsets/fa";
15
- import { h } from "vue";
15
+ import { h, ref } from "vue";
16
16
  import liver from "@/components/icons/liver.vue";
17
17
 
18
18
  const customComponents: any = {
19
19
  liver,
20
20
  };
21
-
21
+ export const disableTheme = ref<boolean>(false);
22
22
  // https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
23
23
  /* istanbul ignore next -- @preserve */
24
24
  export default createVuetify({
25
- theme: {
26
- defaultTheme: "__light",
27
- themes: {
28
- __light: {
29
- dark: false,
30
- colors: {
31
- background: "#FFFFFF",
32
- surface: "#FFFFFF",
33
- "surface-bright": "#FFFFFF",
34
- "surface-light": "#EEEEEE",
35
- "surface-variant": "#424242",
36
- "on-surface-variant": "#EEEEEE",
37
- primary: "#1867C0",
38
- "primary-darken-1": "#1F5592",
39
- secondary: "#48A9A6",
40
- "secondary-darken-1": "#018786",
41
- error: "#B00020",
42
- info: "#2196F3",
43
- success: "#4CAF50",
44
- warning: "#FB8C00",
25
+ theme: disableTheme.value
26
+ ? false
27
+ : {
28
+ defaultTheme: "__light",
29
+ themes: {
30
+ __light: {
31
+ dark: false,
32
+ colors: {
33
+ background: "#FFFFFF",
34
+ surface: "#FFFFFF",
35
+ "surface-bright": "#FFFFFF",
36
+ "surface-light": "#EEEEEE",
37
+ "surface-variant": "#424242",
38
+ "on-surface-variant": "#EEEEEE",
39
+ primary: "#1867C0",
40
+ "primary-darken-1": "#1F5592",
41
+ secondary: "#48A9A6",
42
+ "secondary-darken-1": "#018786",
43
+ error: "#B00020",
44
+ info: "#2196F3",
45
+ success: "#4CAF50",
46
+ warning: "#FB8C00",
47
+ },
48
+ },
49
+ light: {},
50
+ dark: {},
45
51
  },
46
52
  },
47
- light: {},
48
- dark: {},
49
- },
50
- },
51
53
  icons: {
52
54
  defaultSet: "md",
53
55
  aliases,