@opencor/opencor 0.20250813.0 → 0.20250814.0

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.
@@ -1,4 +1,4 @@
1
- import { c as ce, g as gl } from "./index-BxzyBYAw.js";
1
+ import { c as ce, g as gl } from "./index-DnnuRqyP.js";
2
2
  var pl = typeof global == "object" && global && global.Object === Object && global, yo = typeof self == "object" && self && self.Object === Object && self, Zt = pl || yo || Function("return this")(), de = Zt.Symbol, ml = Object.prototype, vo = ml.hasOwnProperty, Eo = ml.toString, yr = de ? de.toStringTag : void 0;
3
3
  function Ao(n) {
4
4
  var t = vo.call(n, yr), e = n[yr];
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "./style.css": "./dist/opencor.css"
44
44
  },
45
- "version": "0.20250813.0",
45
+ "version": "0.20250814.0",
46
46
  "peerDependencies": {
47
47
  "vue": "^3.0.0"
48
48
  },
@@ -57,6 +57,8 @@ import primeVueToastService from 'primevue/toastservice'
57
57
  import { useToast } from 'primevue/usetoast'
58
58
  import * as vue from 'vue'
59
59
 
60
+ import type { IOpenCORProps } from '../../index'
61
+
60
62
  import '../assets/app.css'
61
63
  import * as common from '../common/common'
62
64
  import { SHORT_DELAY, TOAST_LIFE } from '../common/constants'
@@ -66,9 +68,7 @@ import * as vueCommon from '../common/vueCommon'
66
68
  import IContentsComponent from '../components/ContentsComponent.vue'
67
69
  import * as locApi from '../libopencor/locApi'
68
70
 
69
- const props = defineProps<{
70
- omex?: string
71
- }>()
71
+ const props = defineProps<IOpenCORProps>()
72
72
 
73
73
  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
74
74
  const contents = vue.ref<InstanceType<typeof IContentsComponent> | null>(null)
@@ -80,10 +80,25 @@ const getCurrentInstance = vue.getCurrentInstance()
80
80
 
81
81
  if (getCurrentInstance !== null) {
82
82
  const app = getCurrentInstance.appContext.app
83
+ let options = {}
84
+
85
+ if (props.theme === 'light') {
86
+ options = {
87
+ darkModeSelector: false
88
+ }
89
+ } else if (props.theme === 'dark') {
90
+ document.documentElement.classList.add('opencor-dark-mode')
91
+ document.body.classList.add('opencor-dark-mode')
92
+
93
+ options = {
94
+ darkModeSelector: '.opencor-dark-mode'
95
+ }
96
+ }
83
97
 
84
98
  app.use(primeVueConfig as unknown as vue.Plugin, {
85
99
  theme: {
86
- preset: primeVueAuraTheme
100
+ preset: primeVueAuraTheme,
101
+ options: options
87
102
  }
88
103
  })
89
104
  app.use(primeVueConfirmationService as unknown as vue.Plugin)