You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer-ui/export

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer-ui/export - npm Package Compare versions

Comparing version
1.0.0-rc.21
to
1.0.0-rc.22
+4
-4
package.json
{
"name": "@leafer-ui/export",
"version": "1.0.0-rc.21",
"version": "1.0.0-rc.22",
"description": "@leafer-ui/export",

@@ -25,8 +25,8 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/core": "1.0.0-rc.21"
"@leafer/core": "1.0.0-rc.22"
},
"devDependencies": {
"@leafer/interface": "1.0.0-rc.21",
"@leafer-ui/interface": "1.0.0-rc.21"
"@leafer/interface": "1.0.0-rc.22",
"@leafer-ui/interface": "1.0.0-rc.22"
}
}
import { IExportFileType, IFunction, IRenderOptions, IBoundsData, IBounds, ILocationType, ILeaf } from '@leafer/interface'
import { Creator, Matrix, TaskProcessor, FileHelper, Bounds } from '@leafer/core'
import { Creator, Matrix, TaskProcessor, FileHelper, Bounds, Platform } from '@leafer/core'

@@ -23,2 +23,9 @@ import { IExportModule, IExportOptions, IExportResult, IExportResultFunction, IUI } from '@leafer-ui/interface'

if (filename === 'json') {
return over({ data: leaf.toJSON() })
} else if (FileHelper.fileType(filename) === 'json') {
Platform.origin.download('data:text/plain;charset=utf-8,' + encodeURIComponent(JSON.stringify(leaf.toJSON())), filename)
return over({ data: true })
}
const { leafer } = leaf

@@ -25,0 +32,0 @@ if (leafer) {