mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
chore: 依赖更新svg-pathdata
This commit is contained in:
parent
b4a24ea5b0
commit
b5b9e1d5ec
35
package-lock.json
generated
35
package-lock.json
generated
@ -36,7 +36,7 @@
|
||||
"prosemirror-state": "^1.4.3",
|
||||
"prosemirror-view": "^1.33.9",
|
||||
"svg-arc-to-cubic-bezier": "^3.2.0",
|
||||
"svg-pathdata": "^6.0.3",
|
||||
"svg-pathdata": "^7.1.0",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"tippy.js": "^6.3.7",
|
||||
"vue": "^3.4.34",
|
||||
@ -4842,11 +4842,14 @@
|
||||
"integrity": "sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g=="
|
||||
},
|
||||
"node_modules/svg-pathdata": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
|
||||
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/svg-pathdata/-/svg-pathdata-7.1.0.tgz",
|
||||
"integrity": "sha512-wrvKHXZSYZyODOj5E1l1bMTIo8sR7YCH0E4SA8IgLgMsZq4RypslpYvNSsrdg4ThD6du2KWPyVeKinkqUelGhg==",
|
||||
"dependencies": {
|
||||
"yerror": "^8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
"node": ">=20.11.1"
|
||||
}
|
||||
},
|
||||
"node_modules/text-extensions": {
|
||||
@ -5231,6 +5234,14 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/yerror": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/yerror/-/yerror-8.0.0.tgz",
|
||||
"integrity": "sha512-FemWD5/UqNm8ffj8oZIbjWXIF2KE0mZssggYpdaQkWDDgXBQ/35PNIxEuz6/YLn9o0kOxDBNJe8x8k9ljD7k/g==",
|
||||
"engines": {
|
||||
"node": ">=18.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
@ -8844,9 +8855,12 @@
|
||||
"integrity": "sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g=="
|
||||
},
|
||||
"svg-pathdata": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
|
||||
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw=="
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/svg-pathdata/-/svg-pathdata-7.1.0.tgz",
|
||||
"integrity": "sha512-wrvKHXZSYZyODOj5E1l1bMTIo8sR7YCH0E4SA8IgLgMsZq4RypslpYvNSsrdg4ThD6du2KWPyVeKinkqUelGhg==",
|
||||
"requires": {
|
||||
"yerror": "^8.0.0"
|
||||
}
|
||||
},
|
||||
"text-extensions": {
|
||||
"version": "2.4.0",
|
||||
@ -9113,6 +9127,11 @@
|
||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
||||
"dev": true
|
||||
},
|
||||
"yerror": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/yerror/-/yerror-8.0.0.tgz",
|
||||
"integrity": "sha512-FemWD5/UqNm8ffj8oZIbjWXIF2KE0mZssggYpdaQkWDDgXBQ/35PNIxEuz6/YLn9o0kOxDBNJe8x8k9ljD7k/g=="
|
||||
},
|
||||
"yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
|
@ -41,7 +41,7 @@
|
||||
"prosemirror-state": "^1.4.3",
|
||||
"prosemirror-view": "^1.33.9",
|
||||
"svg-arc-to-cubic-bezier": "^3.2.0",
|
||||
"svg-pathdata": "^6.0.3",
|
||||
"svg-pathdata": "^7.1.0",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"tippy.js": "^6.3.7",
|
||||
"vue": "^3.4.34",
|
||||
|
@ -1,98 +1,6 @@
|
||||
// @ts-ignore
|
||||
import { SVGPathData } from 'svg-pathdata'
|
||||
import arcToBezier from 'svg-arc-to-cubic-bezier'
|
||||
|
||||
type CommandM = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.MOVE_TO
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
type CommandL = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.LINE_TO
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
type CommandH = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.HORIZ_LINE_TO
|
||||
x: number
|
||||
}
|
||||
type CommandV = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.VERT_LINE_TO
|
||||
y: number
|
||||
}
|
||||
type CommandZ = {
|
||||
type: typeof SVGPathData.CLOSE_PATH
|
||||
}
|
||||
type CommandQ = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.QUAD_TO
|
||||
x1: number
|
||||
y1: number
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
type CommandT = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.SMOOTH_QUAD_TO
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
type CommandC = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.CURVE_TO
|
||||
x1: number
|
||||
y1: number
|
||||
x2: number
|
||||
y2: number
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
type CommandS = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.SMOOTH_CURVE_TO
|
||||
x2: number
|
||||
y2: number
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
type CommandA = {
|
||||
relative: boolean
|
||||
type: typeof SVGPathData.ARC
|
||||
rX: number
|
||||
rY: number
|
||||
xRot: number
|
||||
sweepFlag: 0 | 1
|
||||
lArcFlag: 0 | 1
|
||||
x: number
|
||||
y: number
|
||||
cX?: number
|
||||
cY?: number
|
||||
phi1?: number
|
||||
phi2?: number
|
||||
}
|
||||
type SVGCommand = CommandM | CommandL | CommandH | CommandV | CommandZ | CommandQ | CommandT | CommandC | CommandS | CommandA
|
||||
|
||||
declare class SVGPathData {
|
||||
commands: SVGCommand[]
|
||||
constructor(content: string | SVGCommand[])
|
||||
static readonly CLOSE_PATH: 1
|
||||
static readonly MOVE_TO: 2
|
||||
static readonly HORIZ_LINE_TO: 4
|
||||
static readonly VERT_LINE_TO: 8
|
||||
static readonly LINE_TO: 16
|
||||
static readonly CURVE_TO: 32
|
||||
static readonly SMOOTH_CURVE_TO: 64
|
||||
static readonly QUAD_TO: 128
|
||||
static readonly SMOOTH_QUAD_TO: 256
|
||||
static readonly ARC: 512
|
||||
static readonly LINE_COMMANDS: number
|
||||
static readonly DRAWING_COMMANDS: number
|
||||
}
|
||||
|
||||
const typeMap = {
|
||||
1: 'Z',
|
||||
2: 'M',
|
||||
|
Loading…
x
Reference in New Issue
Block a user