Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 16, 2024
1 parent f1a164d commit bfba5d6
Show file tree
Hide file tree
Showing 6 changed files with 896 additions and 894 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "module",
"version": "0.50.0-beta.10",
"private": true,
"packageManager": "pnpm@9.14.4",
"packageManager": "pnpm@9.15.0",
"engines": {
"node": ">=18.0.0"
},
Expand Down
46 changes: 23 additions & 23 deletions packages/client/composables/useDragElements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,24 @@ export function useDragElementsUpdater(no: number) {
section = type === 'prop'
// eslint-disable-next-line regexp/no-super-linear-backtracking
? section.replace(/<(v-?drag-?\w*)(.*?)(\/)?>/gi, (full, tag, attrs, selfClose = '', index) => {
if (index === idx) {
replaced = true
const posMatch = attrs.match(/pos=".*?"/)
if (!posMatch)
return `<${tag}${ensureSuffix(' ', attrs)}pos="${posStr}"${selfClose}>`
const start = posMatch.index
const end = start + posMatch[0].length
return `<${tag}${attrs.slice(0, start)}pos="${posStr}"${attrs.slice(end)}${selfClose}>`
}
return full
})
if (index === idx) {
replaced = true
const posMatch = attrs.match(/pos=".*?"/)
if (!posMatch)
return `<${tag}${ensureSuffix(' ', attrs)}pos="${posStr}"${selfClose}>`
const start = posMatch.index
const end = start + posMatch[0].length
return `<${tag}${attrs.slice(0, start)}pos="${posStr}"${attrs.slice(end)}${selfClose}>`
}
return full
})
: section.replace(/(?<![</\w])v-drag(?:=".*?")?/gi, (full, index) => {
if (index === idx) {
replaced = true
return `v-drag="${posStr}"`
}
return full
})
if (index === idx) {
replaced = true
return `v-drag="${posStr}"`
}
return full
})

if (!replaced)
throw new Error(`[Slidev] VDrag Element ${id} is not found in the markdown source`)
Expand Down Expand Up @@ -180,16 +180,16 @@ export function useDragElement(directive: DirectiveBinding | null, posRaw?: stri
const configuredHeight = ref(pos[3] ?? 0)
const height = autoHeight
? computed({
get: () => (autoHeight ? actualHeight.value : configuredHeight.value) || 0,
set: v => !autoHeight && (configuredHeight.value = v),
})
get: () => (autoHeight ? actualHeight.value : configuredHeight.value) || 0,
set: v => !autoHeight && (configuredHeight.value = v),
})
: configuredHeight
const configuredY0 = autoHeight ? ref(pos[1]) : ref(pos[1] + pos[3] / 2)
const y0 = autoHeight
? computed({
get: () => configuredY0.value + height.value / 2,
set: v => configuredY0.value = v - height.value / 2,
})
get: () => configuredY0.value + height.value / 2,
set: v => configuredY0.value = v - height.value / 2,
})
: configuredY0

const containerStyle = computed(() => {
Expand Down
28 changes: 14 additions & 14 deletions packages/client/setup/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ const setup = createSingletonPromise(async () => {

const ata = configs.monacoTypesSource === 'cdn'
? setupTypeAcquisition({
projectName: 'TypeScript Playground',
typescript: ts as any, // Version mismatch. No problem found so far.
logger: console,
delegate: {
receivedFile: (code: string, path: string) => {
defaults.addExtraLib(code, `file://${path}`)
const uri = monaco.Uri.file(path)
if (monaco.editor.getModel(uri) === null)
monaco.editor.createModel(code, 'javascript', uri)
},
progress: (downloaded: number, total: number) => {
projectName: 'TypeScript Playground',
typescript: ts as any, // Version mismatch. No problem found so far.
logger: console,
delegate: {
receivedFile: (code: string, path: string) => {
defaults.addExtraLib(code, `file://${path}`)
const uri = monaco.Uri.file(path)
if (monaco.editor.getModel(uri) === null)
monaco.editor.createModel(code, 'javascript', uri)
},
progress: (downloaded: number, total: number) => {
// eslint-disable-next-line no-console
console.debug(`[Typescript ATA] ${downloaded} / ${total}`)
console.debug(`[Typescript ATA] ${downloaded} / ${total}`)
},
},
},
})
})
: () => { }

monaco.languages.register({ id: 'vue' })
Expand Down
6 changes: 3 additions & 3 deletions packages/slidev/node/integrations/drawings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import fs from 'fs-extra'
function resolveDrawingsDir(options: ResolvedSlidevOptions): string | undefined {
return options.data.config.drawings.persist
? resolve(
dirname(options.entry),
options.data.config.drawings.persist,
)
dirname(options.entry),
options.data.config.drawings.persist,
)
: undefined
}

Expand Down
Loading

0 comments on commit bfba5d6

Please sign in to comment.