ducsvg 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<a href="https://www.npmjs.com/package/ducsvg"><img src="https://shields.io/badge/NPM-cc3534?logo=Npm&logoColor=white&style=round-square" alt="NPM" /></a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/ducsvg"><img src="https://img.shields.io/npm/v/ducsvg/latest?style=round-square&label=latest%20stable" alt="NPM ducsvg@latest release" /></a>
|
|
8
8
|
<a href="https://www.npmtrends.com/ducsvg"><img src="https://img.shields.io/npm/dm/ducsvg?style=round-square&color=salmon" alt="Downloads" /></a>
|
|
9
|
-
<img src="https://shields.io/badge/TypeScript-3178C6?logo=TypeScript&logoColor=fff&style=round-square" alt="TypeScript" />
|
|
10
9
|
</p>
|
|
11
10
|
</p>
|
|
12
11
|
|
package/dist/ducToSvg.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { SVG_NS, arrayToMap, convertShapeToLinearElement, getBoundTextElement, getBoundTextElementPosition, getContainerElement, getContainingFrame, getDefaultLocalState, getElementAbsoluteCoords, getElementsSortedByZIndex, getFontFamilyString, getFrameLikeElements, getFreeDrawSvgPath, getLineHeightInPx, getPrecisionValueFromRaw, isArrowElement, isEllipseElement, isEmbeddableElement, isFrameLikeElement, isFreeDrawElement, isLinearElement, isRTL, isTableElement, isTextElement, uint8ArrayToBase64 } from "ducjs";
|
|
11
11
|
import { TEXT_ALIGN } from "ducjs/flatbuffers/duc";
|
|
12
|
-
import { renderLinearElementToSvg } from "
|
|
12
|
+
import { renderLinearElementToSvg } from "./utils/linearElementToSvg";
|
|
13
13
|
const DUC_STANDARD_PRIMARY_COLOR = "#7878dd";
|
|
14
14
|
const BACKGROUND_OPACITY = 0.1;
|
|
15
15
|
const AUX_STROKE_WIDTH_FACTOR = 0.2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DucElement, DucLinearLikeElement, RestoredDataState, Scope } from "ducjs";
|
|
2
|
-
import { PartialDucState } from "
|
|
2
|
+
import { PartialDucState } from "../ducToSvg";
|
|
3
3
|
export declare const renderLinearElementToSvg: (element: DucLinearLikeElement, elementsMap: Map<string, DucElement>, ducState: PartialDucState, files: RestoredDataState["files"], defs: SVGDefsElement, currentScope: Scope, offsetX: number, offsetY: number) => {
|
|
4
4
|
element: SVGElement;
|
|
5
5
|
mask?: SVGElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArrowElement, SVG_NS, } from "ducjs";
|
|
2
2
|
import { LINE_HEAD, STROKE_PLACEMENT } from "ducjs/flatbuffers/duc";
|
|
3
|
-
import { applyStyles } from "
|
|
3
|
+
import { applyStyles } from "../ducToSvg";
|
|
4
4
|
/**
|
|
5
5
|
* Normalizes a 2D vector.
|
|
6
6
|
* @param v The vector to normalize.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ducsvg",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Adapter for converting duc CAD documents to SVG. Built on top of ducjs.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"author": "Ducflair",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"ducjs": "^
|
|
38
|
+
"ducjs": "^2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"semantic-release": "^24.1.2",
|