chore(docs): lint
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,9 @@ export default defineComponent({
|
|||||||
props: ['example'],
|
props: ['example'],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
return () => {
|
return () => {
|
||||||
if (!isClient) return null
|
if (!isClient) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return h(Suspense, h(DocsRepl, props))
|
return h(Suspense, h(DocsRepl, props))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ watch([() => props.targetY, () => props.targetX], (_, __, onCleanup) => {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!closestNode.node) return
|
if (!closestNode.node) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
canSnap.value = closestNode.distance < SNAP_DISTANCE
|
canSnap.value = closestNode.distance < SNAP_DISTANCE
|
||||||
|
|
||||||
@@ -92,8 +94,9 @@ watch([() => props.targetY, () => props.targetX], (_, __, onCleanup) => {
|
|||||||
},
|
},
|
||||||
edges.value,
|
edges.value,
|
||||||
)
|
)
|
||||||
)
|
) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (closestHandle) {
|
if (closestHandle) {
|
||||||
const el = document.querySelector(`[data-handleid='${closestHandle.id}']`)
|
const el = document.querySelector(`[data-handleid='${closestHandle.id}']`)
|
||||||
|
|||||||
@@ -19,14 +19,22 @@ const connectionLineStyle = { stroke: '#fff' }
|
|||||||
|
|
||||||
// minimap stroke color functions
|
// minimap stroke color functions
|
||||||
function nodeStroke(n) {
|
function nodeStroke(n) {
|
||||||
if (n.type === 'input') return '#0041d0'
|
if (n.type === 'input') {
|
||||||
if (n.type === 'custom') return presets.sumi
|
return '#0041d0'
|
||||||
if (n.type === 'output') return '#ff0072'
|
}
|
||||||
|
if (n.type === 'custom') {
|
||||||
|
return presets.sumi
|
||||||
|
}
|
||||||
|
if (n.type === 'output') {
|
||||||
|
return '#ff0072'
|
||||||
|
}
|
||||||
return '#eee'
|
return '#eee'
|
||||||
}
|
}
|
||||||
|
|
||||||
function nodeColor(n) {
|
function nodeColor(n) {
|
||||||
if (n.type === 'custom') return bgColor.value
|
if (n.type === 'custom') {
|
||||||
|
return bgColor.value
|
||||||
|
}
|
||||||
return '#fff'
|
return '#fff'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ export function getElements(xElements = 10, yElements = 10) {
|
|||||||
source: recentNodeId.toString(),
|
source: recentNodeId.toString(),
|
||||||
target: nodeId.toString(),
|
target: nodeId.toString(),
|
||||||
style: (edge) => {
|
style: (edge) => {
|
||||||
if (!edge.sourceNode.selected && !edge.targetNode.selected) return
|
if (!edge.sourceNode.selected && !edge.targetNode.selected) {
|
||||||
|
return
|
||||||
|
}
|
||||||
return { stroke: '#10b981', strokeWidth: 3 }
|
return { stroke: '#10b981', strokeWidth: 3 }
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -118,7 +118,9 @@ onNodeDoubleClick(({ node }) => {
|
|||||||
stopHandle = watchDebounced(
|
stopHandle = watchDebounced(
|
||||||
output,
|
output,
|
||||||
(next) => {
|
(next) => {
|
||||||
if (!showDot.value) return
|
if (!showDot.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const nextLength = curve.value.getTotalLength()
|
const nextLength = curve.value.getTotalLength()
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,11 @@ const emit = defineEmits(['pane'])
|
|||||||
|
|
||||||
const getNodeClass: ClassFunc<GraphNode> = (el) => {
|
const getNodeClass: ClassFunc<GraphNode> = (el) => {
|
||||||
const classes = ['font-semibold', '!border-2', 'transition-colors', 'duration-300', 'ease-in-out']
|
const classes = ['font-semibold', '!border-2', 'transition-colors', 'duration-300', 'ease-in-out']
|
||||||
if (el.selected)
|
if (el.selected) {
|
||||||
classes.push(
|
classes.push(
|
||||||
...['!border-green-500/80', '!shadow-md', '!shadow-green-500/50', '!bg-green-100/80 dark:(!bg-white)', '!text-gray-700'],
|
...['!border-green-500/80', '!shadow-md', '!shadow-green-500/50', '!bg-green-100/80 dark:(!bg-white)', '!text-gray-700'],
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return classes.join(' ')
|
return classes.join(' ')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,13 +75,18 @@ const clicks = ref(0)
|
|||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
|
|
||||||
const confettiColors = Object.values(colors).flatMap((color) => {
|
const confettiColors = Object.values(colors).flatMap((color) => {
|
||||||
if (typeof color === 'string') return color
|
if (typeof color === 'string') {
|
||||||
else return Object.values(color).flatMap((c) => c)
|
return color
|
||||||
|
} else {
|
||||||
|
return Object.values(color).flatMap((c) => c)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
onNodeClick(async ({ node }) => {
|
onNodeClick(async ({ node }) => {
|
||||||
if (node.id === 'intro') {
|
if (node.id === 'intro') {
|
||||||
if (disabled.value) return
|
if (disabled.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
animatedBackground.value = !animatedBackground.value
|
animatedBackground.value = !animatedBackground.value
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ const skip = ['node_modules', 'dist', 'turbo']
|
|||||||
|
|
||||||
const getAllFiles = function (dirPath: string, needle?: string, arrayOfFiles: ChangelogFile[] = [], pkgName?: string) {
|
const getAllFiles = function (dirPath: string, needle?: string, arrayOfFiles: ChangelogFile[] = [], pkgName?: string) {
|
||||||
readdirSync(dirPath).forEach((file) => {
|
readdirSync(dirPath).forEach((file) => {
|
||||||
if (skip.includes(file)) return
|
if (skip.includes(file)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (statSync(`${dirPath}/${file}`).isDirectory()) {
|
if (statSync(`${dirPath}/${file}`).isDirectory()) {
|
||||||
getAllFiles(`${dirPath}/${file}`, needle, arrayOfFiles, file)
|
getAllFiles(`${dirPath}/${file}`, needle, arrayOfFiles, file)
|
||||||
|
|||||||
@@ -31,13 +31,14 @@ function sendToAnalytics(metric, options) {
|
|||||||
})
|
})
|
||||||
if (navigator.sendBeacon) {
|
if (navigator.sendBeacon) {
|
||||||
navigator.sendBeacon(vitalsUrl, blob)
|
navigator.sendBeacon(vitalsUrl, blob)
|
||||||
} else
|
} else {
|
||||||
fetch(vitalsUrl, {
|
fetch(vitalsUrl, {
|
||||||
body: blob,
|
body: blob,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
credentials: 'omit',
|
credentials: 'omit',
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function webVitals(options) {
|
export function webVitals(options) {
|
||||||
|
|||||||
Reference in New Issue
Block a user