Skip to content

Commit

Permalink
Merge branch 'main' into feat/default-theme-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
arashsheyda authored Jun 21, 2024
2 parents 290f50f + d276b31 commit ff49f90
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 691 deletions.
1 change: 0 additions & 1 deletion packages/devtools-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"prepublishOnly": "pnpm build"
},
"peerDependencies": {
"nuxt": "^3.9.0",
"vite": "*"
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/devtools-ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@iconify-json/tabler": "^1.1.111",
"@nuxt/devtools-kit": "workspace:*",
"@nuxt/kit": "^3.11.2",
"@nuxtjs/color-mode": "^3.4.1",
"@unocss/core": "^0.60.0",
"@unocss/nuxt": "^0.60.0",
"@unocss/preset-attributify": "^0.60.0",
Expand Down
24 changes: 12 additions & 12 deletions packages/devtools-ui-kit/playground/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const radio = ref('a')
XL Purple
</NButton>
</div>
<ShowSource src="/playground/pages/index.vue#L44-L58" />
<ShowSource src="/playground/pages/index.vue#L44-L66" />
</NCard>

<NCard class="p4">
Expand All @@ -80,7 +80,7 @@ const radio = ref('a')
XL Disabled
</NCheckbox>
</div>
<ShowSource src="/playground/pages/index.vue#L68-L76" />
<ShowSource src="/playground/pages/index.vue#L68-L84" />
</NCard>

<NCard class="p4">
Expand All @@ -95,7 +95,7 @@ const radio = ref('a')
nuxt.com
</NLink>
</form>
<ShowSource src="/playground/pages/index.vue#L86-L91" />
<ShowSource src="/playground/pages/index.vue#L86-L99" />
</NCard>

<NCard class="p4">
Expand Down Expand Up @@ -123,7 +123,7 @@ const radio = ref('a')
Orange
</NRadio>
</form>
<ShowSource src="/playground/pages/index.vue#L101-L119" />
<ShowSource src="/playground/pages/index.vue#L101-L127" />
</NCard>

<NCard class="p4">
Expand All @@ -144,7 +144,7 @@ const radio = ref('a')
XL
</NSwitch>
</div>
<ShowSource src="/playground/pages/index.vue#L129-L140" />
<ShowSource src="/playground/pages/index.vue#L129-L148" />
</NCard>

<NCard class="p4">
Expand All @@ -162,7 +162,7 @@ const radio = ref('a')
Error!
</NTip>
</div>
<ShowSource src="/playground/pages/index.vue#L150-L158" />
<ShowSource src="/playground/pages/index.vue#L150-L166" />
</NCard>

<NCard class="p4">
Expand All @@ -184,7 +184,7 @@ const radio = ref('a')
</div>
</NDropdown>
</div>
<ShowSource src="/playground/pages/index.vue#L168-L180" />
<ShowSource src="/playground/pages/index.vue#L168-L188" />
</NCard>

<NCard class="p4">
Expand Down Expand Up @@ -223,7 +223,7 @@ const radio = ref('a')
</NButton>
</div>
</form>
<ShowSource src="/playground/pages/index.vue#L190-L205" />
<ShowSource src="/playground/pages/index.vue#L190-L227" />
</NCard>

<NCard class="p4">
Expand All @@ -249,7 +249,7 @@ const radio = ref('a')
</div>
</NDialog>
</div>
<ShowSource src="/playground/pages/index.vue#L215-L231" />
<ShowSource src="/playground/pages/index.vue#L215-L253" />
</NCard>

<NCard class="p4">
Expand All @@ -259,7 +259,7 @@ const radio = ref('a')
<div class="flex flex-col gap-2">
<NLoading />
</div>
<ShowSource src="/playground/pages/index.vue#L246" />
<ShowSource src="/playground/pages/index.vue#L255-263" />
</NCard>

<NCard class="p4">
Expand All @@ -279,7 +279,7 @@ const radio = ref('a')
</option>
</NSelect>
</div>
<ShowSource src="/playground/pages/index.vue#L263" />
<ShowSource src="/playground/pages/index.vue#L265-283" />
</NCard>

<NCard class="p4">
Expand All @@ -297,7 +297,7 @@ const radio = ref('a')
]"
/>
</div>
<ShowSource src="/playground/pages/index.vue#L263" />
<ShowSource src="/playground/pages/index.vue#L285-301" />
</NCard>
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions packages/devtools-ui-kit/src/components/NDarkToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { computed, nextTick } from 'vue'
import { useColorMode } from '@vueuse/core'
const mode = useColorMode({ storageKey: 'nuxt-devtools-color-mode' })
const mode = useColorMode({
storageKey: 'nuxt-devtools-color-mode',
})
const isDark = computed<boolean>({
get() {
return mode.value === 'dark'
Expand Down Expand Up @@ -69,7 +71,7 @@ const context = {
</script>

<template>
<ColorScheme tag="span">
<ClientOnly placeholder-tag="span">
<slot v-bind="context" />
</ColorScheme>
</ClientOnly>
</template>
1 change: 0 additions & 1 deletion packages/devtools-ui-kit/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default defineNuxtModule<ModuleOptions>({
const resolver = createResolver(import.meta.url)
await installModule(await resolver.resolvePath('@unocss/nuxt'))
await installModule(await resolver.resolvePath('@vueuse/nuxt'))
await installModule(await resolver.resolvePath('@nuxtjs/color-mode'))
await installModule(await resolver.resolvePath('v-lazy-show/nuxt'))
},
})
2 changes: 1 addition & 1 deletion packages/devtools/client/components/RoutePathItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function navigate() {
</template>
</div>
</template>
<NButton block n="primary">
<NButton type="submit" block n="primary">
Navigate
</NButton>
</form>
Expand Down
3 changes: 2 additions & 1 deletion packages/devtools/client/components/ServerRouteDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const emit = defineEmits<{
const [DefineDefaultInputs, UseDefaultInputs] = createReusableTemplate()
const colorMode = useColorMode()
const config = useServerConfig()
const client = useClient()
Expand Down Expand Up @@ -544,7 +545,7 @@ const copy = useCopy()
<JsonEditorVue
v-else-if="selectedTabInput === 'json'"
v-model="routeInputBodyJSON"
:class="[$colorMode.value === 'dark' ? 'jse-theme-dark' : 'light']"
:class="colorMode === 'dark' ? 'jse-theme-dark' : 'light'"
class="json-editor-vue of-auto text-sm outline-none"
v-bind="$attrs"
:mode="('text' as any)"
Expand Down
3 changes: 2 additions & 1 deletion packages/devtools/client/components/ServerTaskDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const routeInputBodyJSON = ref<any>({ payload: {} })
const { inputDefaults } = useDevToolsOptions('serverRoutes')
const [DefineDefaultInputs, UseDefaultInputs] = createReusableTemplate()
const colorMode = useColorMode()
const config = useServerConfig()
const response = reactive({
Expand Down Expand Up @@ -310,7 +311,7 @@ const copy = useCopy()
<JsonEditorVue
v-else-if="selectedTabInput === 'json'"
v-model="routeInputBodyJSON"
:class="[$colorMode.value === 'dark' ? 'jse-theme-dark' : 'light']"
:class="colorMode === 'dark' ? 'jse-theme-dark' : 'light'"
class="json-editor-vue of-auto text-sm outline-none"
v-bind="$attrs"
:mode="('text' as any)"
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/client/components/StateEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function refresh() {
v-bind="$attrs"
class="json-editor-vue"
:class="[
colorMode.value === 'dark' ? 'jse-theme-dark' : '',
colorMode === 'dark' ? 'jse-theme-dark' : '',
name ? '' : '',
]"
:main-menu-bar="false"
Expand Down
3 changes: 2 additions & 1 deletion packages/devtools/client/components/StorageDetails.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import JsonEditorVue from 'json-editor-vue'
const colorMode = useColorMode()
const nuxtApp = useNuxtApp()
const router = useRouter()
const searchString = ref('')
Expand Down Expand Up @@ -169,7 +170,7 @@ async function renameCurrentItem() {
<JsonEditorVue
v-if="typeof currentItem.content === 'object'"
v-model="currentItem.updatedContent"
:class="[$colorMode.value === 'dark' ? 'jse-theme-dark' : 'light']"
:class="[colorMode === 'dark' ? 'jse-theme-dark' : 'light']"
class="json-editor-vue h-full of-auto text-sm outline-none"
v-bind="$attrs"
:mode="('text' as any)"
Expand Down
3 changes: 2 additions & 1 deletion packages/devtools/client/components/TimelineArgumentView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const OnSetup = defineComponent({
},
})
const colorMode = useColorMode()
const copy = useCopy()
</script>

Expand Down Expand Up @@ -69,7 +70,7 @@ const copy = useCopy()
v-bind="$attrs"
class="json-editor-vue"
:class="[
$colorMode.value === 'dark' ? 'jse-theme-dark' : '',
colorMode === 'dark' ? 'jse-theme-dark' : '',
]"
:main-menu-bar="false"
:navigation-bar="false"
Expand Down
2 changes: 0 additions & 2 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"prepublishOnly": "pnpm build"
},
"peerDependencies": {
"nuxt": "^3.9.0",
"vite": "*"
},
"dependencies": {
Expand Down Expand Up @@ -92,7 +91,6 @@
"@nuxt/content": "^2.12.1",
"@nuxt/devtools": "workspace:*",
"@nuxt/test-utils": "3.9.0",
"@nuxtjs/color-mode": "^3.4.1",
"@parcel/watcher": "^2.4.1",
"@types/markdown-it-link-attributes": "^3.0.5",
"@types/ua-parser-js": "^0.7.39",
Expand Down
Loading

0 comments on commit ff49f90

Please sign in to comment.