Skip to content

Commit cff1e67

Browse files
fix: formatting all files expect md files
1 parent 1837900 commit cff1e67

File tree

9 files changed

+227
-205
lines changed

9 files changed

+227
-205
lines changed

docs/.vitepress/theme/components/ApiParam.vue

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
<script setup>
2-
import { ref } from 'vue'
2+
import { ref } from "vue";
33
44
defineProps({
55
name: String,
66
type: String,
7-
required: Boolean
8-
})
7+
required: Boolean,
8+
});
99
10-
const isExpanded = ref(true)
10+
const isExpanded = ref(true);
1111
</script>
1212

1313
<template>
1414
<div class="api-param">
1515
<div class="param-row" @click="isExpanded = !isExpanded">
1616
<span class="expand-icon" :class="{ expanded: isExpanded }">
1717
<svg width="8" height="8" viewBox="0 0 8 8">
18-
<path d="M2 1L6 4L2 7" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
18+
<path
19+
d="M2 1L6 4L2 7"
20+
fill="none"
21+
stroke="currentColor"
22+
stroke-width="1.5"
23+
stroke-linecap="round"
24+
stroke-linejoin="round"
25+
/>
1926
</svg>
2027
</span>
2128
<code class="param-name">{{ name }}</code>

docs/.vitepress/theme/components/Card.vue

Lines changed: 16 additions & 19 deletions
Large diffs are not rendered by default.

docs/.vitepress/theme/components/CardGroup.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
defineProps({
33
cols: {
44
type: [Number, String],
5-
default: 2
6-
}
7-
})
5+
default: 2,
6+
},
7+
});
88
</script>
99

1010
<template>
@@ -13,7 +13,7 @@ defineProps({
1313
:class="{
1414
'card-group-2': cols == 2,
1515
'card-group-3': cols == 3,
16-
'card-group-4': cols == 4
16+
'card-group-4': cols == 4,
1717
}"
1818
>
1919
<slot />

docs/.vitepress/theme/components/CodePanel.vue

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<script setup>
2-
import { ref } from 'vue'
2+
import { ref } from "vue";
33
44
const props = defineProps({
55
title: {
66
type: String,
7-
default: ''
7+
default: "",
88
},
99
languages: {
1010
type: Array,
11-
default: () => ['cURL', 'Python', 'JavaScript']
12-
}
13-
})
11+
default: () => ["cURL", "Python", "JavaScript"],
12+
},
13+
});
1414
15-
const activeTab = ref(props.languages[0])
16-
const copied = ref(false)
15+
const activeTab = ref(props.languages[0]);
16+
const copied = ref(false);
1717
1818
const copyCode = async () => {
19-
const activeContent = document.querySelector('.code-content:not(.is-hidden) pre code')
19+
const activeContent = document.querySelector(".code-content:not(.is-hidden) pre code");
2020
if (activeContent) {
21-
await navigator.clipboard.writeText(activeContent.textContent)
22-
copied.value = true
23-
setTimeout(() => copied.value = false, 2000)
21+
await navigator.clipboard.writeText(activeContent.textContent);
22+
copied.value = true;
23+
setTimeout(() => (copied.value = false), 2000);
2424
}
25-
}
25+
};
2626
</script>
2727

2828
<template>
@@ -43,22 +43,25 @@ const copyCode = async () => {
4343
</div>
4444
</div>
4545
<button class="copy-btn" @click="copyCode" title="Copy code">
46-
<svg v-if="!copied" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
47-
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
48-
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
46+
<svg
47+
v-if="!copied"
48+
width="16"
49+
height="16"
50+
viewBox="0 0 24 24"
51+
fill="none"
52+
stroke="currentColor"
53+
stroke-width="2"
54+
>
55+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
56+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
4957
</svg>
5058
<svg v-else width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2">
51-
<polyline points="20 6 9 17 4 12"/>
59+
<polyline points="20 6 9 17 4 12" />
5260
</svg>
5361
</button>
5462
</div>
5563
<div class="code-body">
56-
<div
57-
v-for="lang in languages"
58-
:key="lang"
59-
class="code-content"
60-
:class="{ 'is-hidden': activeTab !== lang }"
61-
>
64+
<div v-for="lang in languages" :key="lang" class="code-content" :class="{ 'is-hidden': activeTab !== lang }">
6265
<slot :name="lang.toLowerCase().replace(/\s+/g, '')" />
6366
</div>
6467
</div>
@@ -179,7 +182,7 @@ const copyCode = async () => {
179182
display: none;
180183
}
181184
182-
.code-content :deep(div[class*='language-']) {
185+
.code-content :deep(div[class*="language-"]) {
183186
margin: 0 !important;
184187
border-radius: 0 !important;
185188
border: none !important;

docs/.vitepress/theme/components/CookieConsent.vue

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
<script setup lang="ts">
2-
import { ref, onMounted } from 'vue'
2+
import { ref, onMounted } from "vue";
33
4-
const STORAGE_KEY = 'plane-docs-cookie-consent'
5-
const showBanner = ref(false)
4+
const STORAGE_KEY = "plane-docs-cookie-consent";
5+
const showBanner = ref(false);
66
77
function getConsent(): string | null {
88
try {
9-
return localStorage.getItem(STORAGE_KEY)
9+
return localStorage.getItem(STORAGE_KEY);
1010
} catch {
11-
return null
11+
return null;
1212
}
1313
}
1414
1515
function grantConsent() {
16-
if (typeof window === 'undefined') return
16+
if (typeof window === "undefined") return;
1717
1818
// Google Analytics
19-
if (typeof window.gtag === 'function') {
20-
window.gtag('consent', 'update', {
21-
analytics_storage: 'granted'
22-
})
19+
if (typeof window.gtag === "function") {
20+
window.gtag("consent", "update", {
21+
analytics_storage: "granted",
22+
});
2323
}
2424
2525
// PostHog (may not be loaded if VITE_POSTHOG_KEY is unset)
2626
if (window.posthog?.opt_in_capturing) {
27-
window.posthog.opt_in_capturing()
27+
window.posthog.opt_in_capturing();
2828
}
2929
}
3030
3131
function denyConsent() {
32-
if (typeof window === 'undefined') return
32+
if (typeof window === "undefined") return;
3333
3434
// Google Analytics — consent stays denied by default, no update needed
3535
3636
// PostHog (may not be loaded if VITE_POSTHOG_KEY is unset)
3737
if (window.posthog?.opt_out_capturing) {
38-
window.posthog.opt_out_capturing()
38+
window.posthog.opt_out_capturing();
3939
}
4040
}
4141
4242
function accept() {
4343
try {
44-
localStorage.setItem(STORAGE_KEY, 'granted')
44+
localStorage.setItem(STORAGE_KEY, "granted");
4545
} catch {}
46-
grantConsent()
47-
showBanner.value = false
46+
grantConsent();
47+
showBanner.value = false;
4848
}
4949
5050
function decline() {
5151
try {
52-
localStorage.setItem(STORAGE_KEY, 'denied')
52+
localStorage.setItem(STORAGE_KEY, "denied");
5353
} catch {}
54-
denyConsent()
55-
showBanner.value = false
54+
denyConsent();
55+
showBanner.value = false;
5656
}
5757
5858
onMounted(() => {
59-
const consent = getConsent()
60-
if (consent === 'granted') {
61-
grantConsent()
62-
} else if (consent === 'denied') {
63-
denyConsent()
59+
const consent = getConsent();
60+
if (consent === "granted") {
61+
grantConsent();
62+
} else if (consent === "denied") {
63+
denyConsent();
6464
} else {
65-
showBanner.value = true
65+
showBanner.value = true;
6666
}
67-
})
67+
});
6868
</script>
6969

7070
<template>
@@ -157,10 +157,14 @@ onMounted(() => {
157157
158158
/* Transition */
159159
.consent-enter-active {
160-
transition: opacity 0.3s ease, transform 0.3s ease;
160+
transition:
161+
opacity 0.3s ease,
162+
transform 0.3s ease;
161163
}
162164
.consent-leave-active {
163-
transition: opacity 0.2s ease, transform 0.2s ease;
165+
transition:
166+
opacity 0.2s ease,
167+
transform 0.2s ease;
164168
}
165169
.consent-enter-from {
166170
opacity: 0;

docs/.vitepress/theme/components/ResponsePanel.vue

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
<script setup>
2-
import { ref } from 'vue'
2+
import { ref } from "vue";
33
44
const props = defineProps({
55
status: {
66
type: [String, Number],
7-
default: '200'
8-
}
9-
})
7+
default: "200",
8+
},
9+
});
1010
11-
const copied = ref(false)
11+
const copied = ref(false);
1212
1313
const copyCode = async (event) => {
14-
const panel = event.target.closest('.response-panel')
15-
const codeBlock = panel?.querySelector('pre code')
14+
const panel = event.target.closest(".response-panel");
15+
const codeBlock = panel?.querySelector("pre code");
1616
if (codeBlock) {
17-
await navigator.clipboard.writeText(codeBlock.textContent)
18-
copied.value = true
19-
setTimeout(() => copied.value = false, 2000)
17+
await navigator.clipboard.writeText(codeBlock.textContent);
18+
copied.value = true;
19+
setTimeout(() => (copied.value = false), 2000);
2020
}
21-
}
21+
};
2222
2323
const statusClass = () => {
24-
const code = parseInt(props.status)
25-
if (code >= 200 && code < 300) return 'status-success'
26-
if (code >= 400 && code < 500) return 'status-warning'
27-
if (code >= 500) return 'status-error'
28-
return ''
29-
}
24+
const code = parseInt(props.status);
25+
if (code >= 200 && code < 300) return "status-success";
26+
if (code >= 400 && code < 500) return "status-warning";
27+
if (code >= 500) return "status-error";
28+
return "";
29+
};
3030
</script>
3131
3232
<template>
@@ -37,12 +37,20 @@ const statusClass = () => {
3737
<span class="status-code" :class="statusClass()">{{ status }}</span>
3838
</div>
3939
<button class="copy-btn" @click="copyCode" title="Copy response">
40-
<svg v-if="!copied" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
41-
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
42-
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
40+
<svg
41+
v-if="!copied"
42+
width="16"
43+
height="16"
44+
viewBox="0 0 24 24"
45+
fill="none"
46+
stroke="currentColor"
47+
stroke-width="2"
48+
>
49+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
50+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
4351
</svg>
4452
<svg v-else width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2">
45-
<polyline points="20 6 9 17 4 12"/>
53+
<polyline points="20 6 9 17 4 12" />
4654
</svg>
4755
</button>
4856
</div>
@@ -135,7 +143,7 @@ const statusClass = () => {
135143
background: #374151;
136144
}
137145
138-
.response-body :deep(div[class*='language-']) {
146+
.response-body :deep(div[class*="language-"]) {
139147
margin: 0 !important;
140148
border-radius: 0 !important;
141149
border: none !important;

0 commit comments

Comments
 (0)