@finema/core 1.4.123 → 1.4.125

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/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.123",
3
+ "version": "1.4.125",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
2
 
3
3
  const name = "@finema/core";
4
- const version = "1.4.123";
4
+ const version = "1.4.125";
5
5
 
6
6
  const colors = {
7
7
  black: "#20243E",
@@ -6,7 +6,7 @@
6
6
  <div class="flex flex-col items-end justify-end">
7
7
  <div
8
8
  v-show="isShowDevTools"
9
- class="mb-4 size-[600px] overflow-auto rounded-lg border shadow-2xl"
9
+ class="max-w-screen mb-4 h-[750px] max-h-screen w-[600px] overflow-auto rounded-lg border opacity-80 shadow-2xl"
10
10
  >
11
11
  <p class="p-3 text-lg font-semibold">Debug Tools</p>
12
12
  <hr />
@@ -1,38 +1,17 @@
1
1
  <template>
2
2
  <TeleportSafe v-if="isDevEnv" to="#dev-logs">
3
- <VCodeBlock
4
- v-if="data"
5
- :code="JSON.stringify(data)"
6
- max-height="400"
7
- :browser-window="true"
8
- :indent="2"
9
- lang="json"
10
- highlightjs
11
- >
12
- <template #label>
13
- <span v-if="title" class="font-semibold">{{ title }}</span>
14
- </template>
15
- </VCodeBlock>
16
-
17
- <VCodeBlock
3
+ <LogItem v-if="typeof data !== 'undefined'" :data="data" :title="title" />
4
+ <LogItem
18
5
  v-for="(item, index) in dataItems"
19
6
  :key="index"
20
- :code="JSON.stringify(item)"
21
- max-height="400"
22
- :browser-window="true"
23
- :indent="2"
24
- lang="json"
25
- highlightjs
26
- >
27
- <template #label>
28
- <span v-if="title" class="font-semibold">{{ title }} #{{ index + 1 }} </span>
29
- </template>
30
- </VCodeBlock>
7
+ :data="item"
8
+ :title="`${title} #${index + 1}`"
9
+ />
31
10
  </TeleportSafe>
32
11
  </template>
33
12
  <script lang="ts" setup>
34
13
  import { defineProps } from 'vue'
35
- import { VCodeBlock } from '@wdns/vue-code-block'
14
+ import LogItem from './LogItem.vue'
36
15
 
37
16
  defineProps<{
38
17
  data?: any
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <div>
3
+ <div class="mb-2 flex items-center justify-between">
4
+ <p v-if="title" class="font-semibold">{{ title }}</p>
5
+ <Icon
6
+ class="cursor-pointer"
7
+ :name="isShow ? 'heroicons:minus' : 'heroicons:plus'"
8
+ @click="isShow = !isShow"
9
+ />
10
+ </div>
11
+ <VCodeBlock
12
+ v-show="isShow"
13
+ :code="getCode"
14
+ max-height="500"
15
+ :browser-window="true"
16
+ :indent="2"
17
+ lang="json"
18
+ highlightjs
19
+ />
20
+ </div>
21
+ </template>
22
+ <script lang="ts" setup>
23
+ import { defineProps, computed, ref } from 'vue'
24
+ import { VCodeBlock } from '@wdns/vue-code-block'
25
+
26
+ const props = defineProps<{
27
+ data?: any
28
+ title?: string
29
+ }>()
30
+
31
+ const isShow = ref(true)
32
+
33
+ const getCode = computed(() => {
34
+ try {
35
+ return JSON.stringify(props.data)
36
+ } catch (e) {
37
+ return JSON.stringify('{}')
38
+ }
39
+ })
40
+ </script>
41
+ <style>
42
+ .hljs-string{white-space:break-spaces}
43
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.123",
3
+ "version": "1.4.125",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",