[chore] Bump browser-fs-access. (#3277)
This PR bumps browser-fs-access to the latest version. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [x] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [ ] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [x] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know
This commit is contained in:
parent
41b5fffa2e
commit
1fe74ecaa4
3 changed files with 28 additions and 27 deletions
|
@ -26,7 +26,7 @@
|
||||||
"@tldraw/tlsync": "workspace:*",
|
"@tldraw/tlsync": "workspace:*",
|
||||||
"@tldraw/utils": "workspace:*",
|
"@tldraw/utils": "workspace:*",
|
||||||
"@vercel/analytics": "^1.1.1",
|
"@vercel/analytics": "^1.1.1",
|
||||||
"browser-fs-access": "^0.33.0",
|
"browser-fs-access": "^0.35.0",
|
||||||
"idb": "^7.1.1",
|
"idb": "^7.1.1",
|
||||||
"nanoid": "4.0.2",
|
"nanoid": "4.0.2",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
|
|
|
@ -108,6 +108,7 @@ export function getSaveFileCopyAction(
|
||||||
readonlyOk: true,
|
readonlyOk: true,
|
||||||
kbd: '$s',
|
kbd: '$s',
|
||||||
async onSelect(source) {
|
async onSelect(source) {
|
||||||
|
try {
|
||||||
handleUiEvent('save-project-to-file', { source })
|
handleUiEvent('save-project-to-file', { source })
|
||||||
const documentName =
|
const documentName =
|
||||||
editor.getDocumentSettings().name === ''
|
editor.getDocumentSettings().name === ''
|
||||||
|
@ -117,17 +118,12 @@ export function getSaveFileCopyAction(
|
||||||
saveFileNames.get(editor.store) || `${documentName}${TLDRAW_FILE_EXTENSION}`
|
saveFileNames.get(editor.store) || `${documentName}${TLDRAW_FILE_EXTENSION}`
|
||||||
|
|
||||||
const blobToSave = serializeTldrawJsonBlob(editor.store)
|
const blobToSave = serializeTldrawJsonBlob(editor.store)
|
||||||
let handle
|
|
||||||
try {
|
const handle = await fileSave(blobToSave, {
|
||||||
handle = await fileSave(blobToSave, {
|
|
||||||
fileName: defaultName,
|
fileName: defaultName,
|
||||||
extensions: [TLDRAW_FILE_EXTENSION],
|
extensions: [TLDRAW_FILE_EXTENSION],
|
||||||
description: 'tldraw project',
|
description: 'tldraw project',
|
||||||
})
|
})
|
||||||
} catch (e) {
|
|
||||||
// user cancelled
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (handle) {
|
if (handle) {
|
||||||
// we deliberately don't store the handle for re-use
|
// we deliberately don't store the handle for re-use
|
||||||
|
@ -135,6 +131,11 @@ export function getSaveFileCopyAction(
|
||||||
// help the user out we'll remember the last name
|
// help the user out we'll remember the last name
|
||||||
// they used
|
// they used
|
||||||
saveFileNames.set(editor.store, handle.name)
|
saveFileNames.set(editor.store, handle.name)
|
||||||
|
} else {
|
||||||
|
throw Error('Could not save file.')
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -10043,10 +10043,10 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"browser-fs-access@npm:^0.33.0":
|
"browser-fs-access@npm:^0.35.0":
|
||||||
version: 0.33.1
|
version: 0.35.0
|
||||||
resolution: "browser-fs-access@npm:0.33.1"
|
resolution: "browser-fs-access@npm:0.35.0"
|
||||||
checksum: 1843c6d1190ed448d3f17e767cd6508ef408b0e40530ceb2de37088f0a1bdbd503e05d4d949934d7c9491d550e255c4a214b25781625b57a6724a35a7cdd8b4c
|
checksum: 5fa9876cc10499bfc8e1a3d83261f8966c5687c2d31c1abefed35ecc5a8e1ab8b12a51aed638b48ee4e2109ec48c2cba3bfcd162b9de270a5b5ca08740024eda
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -11688,7 +11688,7 @@ __metadata:
|
||||||
"@typescript-eslint/utils": "npm:^5.59.0"
|
"@typescript-eslint/utils": "npm:^5.59.0"
|
||||||
"@vercel/analytics": "npm:^1.1.1"
|
"@vercel/analytics": "npm:^1.1.1"
|
||||||
"@vitejs/plugin-react-swc": "npm:^3.5.0"
|
"@vitejs/plugin-react-swc": "npm:^3.5.0"
|
||||||
browser-fs-access: "npm:^0.33.0"
|
browser-fs-access: "npm:^0.35.0"
|
||||||
dotenv: "npm:^16.3.1"
|
dotenv: "npm:^16.3.1"
|
||||||
eslint: "npm:^8.37.0"
|
eslint: "npm:^8.37.0"
|
||||||
fast-glob: "npm:^3.3.1"
|
fast-glob: "npm:^3.3.1"
|
||||||
|
|
Loading…
Reference in a new issue