ducjs 2.0.0 → 2.1.0
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 +1 -1
- package/dist/flatbuffers/duc/duc-feature-control-frame-style.d.ts +0 -3
- package/dist/flatbuffers/duc/duc-feature-control-frame-style.js +0 -8
- package/dist/flatbuffers/duc/duc-leader-style.d.ts +0 -3
- package/dist/flatbuffers/duc/duc-leader-style.js +0 -8
- package/dist/flatbuffers/duc/duc-plot-style.d.ts +1 -4
- package/dist/flatbuffers/duc/duc-plot-style.js +1 -10
- package/dist/flatbuffers/duc/duc-table-style.d.ts +0 -3
- package/dist/flatbuffers/duc/duc-table-style.js +0 -8
- package/dist/flatbuffers/duc/duc-text-style.d.ts +0 -3
- package/dist/flatbuffers/duc/duc-text-style.js +0 -8
- package/dist/flatbuffers/duc/duc-viewport-style.d.ts +1 -4
- package/dist/flatbuffers/duc/duc-viewport-style.js +1 -10
- package/dist/flatbuffers/duc/duc-xray-style.d.ts +1 -4
- package/dist/flatbuffers/duc/duc-xray-style.js +1 -10
- package/dist/flatbuffers/duc/exported-data-state.d.ts +3 -0
- package/dist/flatbuffers/duc/exported-data-state.js +8 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/parse.d.ts +5 -5
- package/dist/parse.js +57 -20
- package/dist/restore/restoreDataState.d.ts +14 -10
- package/dist/restore/restoreDataState.js +29 -22
- package/dist/restore/restoreElements.d.ts +2 -2
- package/dist/restore/restoreElements.js +21 -14
- package/dist/restore/restoreStandards.d.ts +2 -2
- package/dist/restore/restoreStandards.js +4 -4
- package/dist/serialize.d.ts +3 -2
- package/dist/serialize.js +14 -27
- package/dist/technical/measurements.d.ts +2 -2
- package/dist/technical/measurements.js +1 -1
- package/dist/technical/scopes.d.ts +4 -4
- package/dist/technical/scopes.js +1 -1
- package/dist/technical/standards.d.ts +4 -4
- package/dist/types/elements/index.d.ts +13 -13
- package/dist/types/elements/typeChecks.d.ts +5 -4
- package/dist/types/elements/typeChecks.js +5 -2
- package/dist/types/geometryTypes.d.ts +2 -2
- package/dist/types/index.d.ts +11 -8
- package/dist/types/index.js +1 -0
- package/dist/types/typeChecks.d.ts +5 -0
- package/dist/types/typeChecks.js +10 -0
- package/dist/utils/bounds.d.ts +3 -3
- package/dist/utils/bounds.js +3 -3
- package/dist/utils/constants.d.ts +5 -3
- package/dist/utils/constants.js +3 -5
- package/dist/utils/elements/frameElement.d.ts +2 -1
- package/dist/utils/elements/frameElement.js +13 -1
- package/dist/utils/elements/freedrawElement.d.ts +1 -1
- package/dist/utils/elements/freedrawElement.js +1 -1
- package/dist/utils/elements/index.d.ts +4 -4
- package/dist/utils/elements/index.js +17 -21
- package/dist/utils/elements/linearElement.d.ts +6 -6
- package/dist/utils/elements/linearElement.js +4 -4
- package/dist/utils/elements/newElement.d.ts +3 -3
- package/dist/utils/elements/newElement.js +26 -26
- package/dist/utils/elements/textElement.d.ts +7 -7
- package/dist/utils/elements/textElement.js +11 -9
- package/dist/utils/elements/viewportElement.d.ts +1 -1
- package/dist/utils/functionCodec.js +2 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/math/algebra/gadirections.d.ts +1 -1
- package/dist/utils/math/algebra/gadirections.js +1 -1
- package/dist/utils/math/algebra/galines.d.ts +1 -1
- package/dist/utils/math/algebra/galines.js +1 -1
- package/dist/utils/math/algebra/gapoints.d.ts +1 -1
- package/dist/utils/math/algebra/gapoints.js +3 -3
- package/dist/utils/math/algebra/gatransforms.d.ts +1 -1
- package/dist/utils/math/algebra/gatransforms.js +2 -2
- package/dist/utils/math/bbox.d.ts +2 -2
- package/dist/utils/math/geometry.d.ts +3 -3
- package/dist/utils/math/geometry.js +2 -2
- package/dist/utils/math/index.d.ts +6 -6
- package/dist/utils/math/index.js +3 -3
- package/dist/utils/normalize.d.ts +2 -2
- package/dist/utils/normalize.js +2 -2
- package/dist/utils/shape.d.ts +2 -2
- package/dist/utils/shape.js +8 -8
- package/dist/utils/state/grid.d.ts +1 -1
- package/dist/utils/state/grid.js +3 -3
- package/dist/utils/state/index.d.ts +1 -1
- package/dist/utils/state/index.js +7 -7
- package/dist/utils/traverse.d.ts +22 -0
- package/dist/utils/traverse.js +87 -0
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +4 -2
- package/dist/legacy/index.d.ts +0 -1
- package/dist/legacy/index.js +0 -1
- package/dist/legacy/v1/duc/app-state.d.ts +0 -124
- package/dist/legacy/v1/duc/app-state.js +0 -388
- package/dist/legacy/v1/duc/binary-file-data.d.ts +0 -27
- package/dist/legacy/v1/duc/binary-file-data.js +0 -90
- package/dist/legacy/v1/duc/binary-files-entry.d.ts +0 -16
- package/dist/legacy/v1/duc/binary-files-entry.js +0 -43
- package/dist/legacy/v1/duc/binary-files.d.ts +0 -17
- package/dist/legacy/v1/duc/binary-files.js +0 -55
- package/dist/legacy/v1/duc/binding-point.d.ts +0 -15
- package/dist/legacy/v1/duc/binding-point.js +0 -48
- package/dist/legacy/v1/duc/bound-element.d.ts +0 -17
- package/dist/legacy/v1/duc/bound-element.js +0 -48
- package/dist/legacy/v1/duc/duc-block-attribute-details.d.ts +0 -22
- package/dist/legacy/v1/duc/duc-block-attribute-details.js +0 -57
- package/dist/legacy/v1/duc/duc-block-attribute.d.ts +0 -16
- package/dist/legacy/v1/duc/duc-block-attribute.js +0 -43
- package/dist/legacy/v1/duc/duc-block-instance-element-override.d.ts +0 -17
- package/dist/legacy/v1/duc/duc-block-instance-element-override.js +0 -48
- package/dist/legacy/v1/duc/duc-block.d.ts +0 -34
- package/dist/legacy/v1/duc/duc-block.js +0 -110
- package/dist/legacy/v1/duc/duc-element.d.ts +0 -273
- package/dist/legacy/v1/duc/duc-element.js +0 -865
- package/dist/legacy/v1/duc/duc-group.d.ts +0 -40
- package/dist/legacy/v1/duc/duc-group.js +0 -114
- package/dist/legacy/v1/duc/duc-line-reference.d.ts +0 -15
- package/dist/legacy/v1/duc/duc-line-reference.js +0 -43
- package/dist/legacy/v1/duc/duc-line.d.ts +0 -15
- package/dist/legacy/v1/duc/duc-line.js +0 -43
- package/dist/legacy/v1/duc/duc-path.d.ts +0 -26
- package/dist/legacy/v1/duc/duc-path.js +0 -69
- package/dist/legacy/v1/duc/duc-table-cell.d.ts +0 -22
- package/dist/legacy/v1/duc/duc-table-cell.js +0 -57
- package/dist/legacy/v1/duc/duc-table-column.d.ts +0 -18
- package/dist/legacy/v1/duc/duc-table-column.js +0 -50
- package/dist/legacy/v1/duc/duc-table-row.d.ts +0 -18
- package/dist/legacy/v1/duc/duc-table-row.js +0 -50
- package/dist/legacy/v1/duc/duc-table-style-props.d.ts +0 -39
- package/dist/legacy/v1/duc/duc-table-style-props.js +0 -114
- package/dist/legacy/v1/duc/duc-table-style.d.ts +0 -14
- package/dist/legacy/v1/duc/duc-table-style.js +0 -41
- package/dist/legacy/v1/duc/element-background.d.ts +0 -14
- package/dist/legacy/v1/duc/element-background.js +0 -41
- package/dist/legacy/v1/duc/element-content-base.d.ts +0 -22
- package/dist/legacy/v1/duc/element-content-base.js +0 -64
- package/dist/legacy/v1/duc/element-stroke.d.ts +0 -23
- package/dist/legacy/v1/duc/element-stroke.js +0 -66
- package/dist/legacy/v1/duc/exported-data-state.d.ts +0 -51
- package/dist/legacy/v1/duc/exported-data-state.js +0 -155
- package/dist/legacy/v1/duc/image-crop.d.ts +0 -23
- package/dist/legacy/v1/duc/image-crop.js +0 -80
- package/dist/legacy/v1/duc/linear-element-editor.d.ts +0 -44
- package/dist/legacy/v1/duc/linear-element-editor.js +0 -119
- package/dist/legacy/v1/duc/point-binding.d.ts +0 -25
- package/dist/legacy/v1/duc/point-binding.js +0 -72
- package/dist/legacy/v1/duc/point.d.ts +0 -20
- package/dist/legacy/v1/duc/point.js +0 -63
- package/dist/legacy/v1/duc/pointer-down-state.d.ts +0 -32
- package/dist/legacy/v1/duc/pointer-down-state.js +0 -90
- package/dist/legacy/v1/duc/renderer-state.d.ts +0 -17
- package/dist/legacy/v1/duc/renderer-state.js +0 -54
- package/dist/legacy/v1/duc/segment-midpoint-state.d.ts +0 -18
- package/dist/legacy/v1/duc/segment-midpoint-state.js +0 -57
- package/dist/legacy/v1/duc/simple-point.d.ts +0 -15
- package/dist/legacy/v1/duc/simple-point.js +0 -48
- package/dist/legacy/v1/duc/stroke-sides.d.ts +0 -23
- package/dist/legacy/v1/duc/stroke-sides.js +0 -66
- package/dist/legacy/v1/duc/stroke-style.d.ts +0 -31
- package/dist/legacy/v1/duc/stroke-style.js +0 -102
- package/dist/legacy/v1/duc/tiling-properties.d.ts +0 -21
- package/dist/legacy/v1/duc/tiling-properties.js +0 -75
- package/dist/legacy/v1/duc.d.ts +0 -35
- package/dist/legacy/v1/duc.js +0 -37
- package/dist/legacy/v1/index.d.ts +0 -1
- package/dist/legacy/v1/index.js +0 -1
- package/dist/legacy/v1/parse/index.d.ts +0 -67
- package/dist/legacy/v1/parse/index.js +0 -101
- package/dist/legacy/v1/parse/parseAppStateFromBinary.d.ts +0 -3
- package/dist/legacy/v1/parse/parseAppStateFromBinary.js +0 -139
- package/dist/legacy/v1/parse/parseBinaryFilesFromBinary.d.ts +0 -4
- package/dist/legacy/v1/parse/parseBinaryFilesFromBinary.js +0 -32
- package/dist/legacy/v1/parse/parseBlockFromBinary.d.ts +0 -3
- package/dist/legacy/v1/parse/parseBlockFromBinary.js +0 -70
- package/dist/legacy/v1/parse/parseElementFromBinary.d.ts +0 -8
- package/dist/legacy/v1/parse/parseElementFromBinary.js +0 -387
- package/dist/legacy/v1/parse/parseGroupFromBinary.d.ts +0 -4
- package/dist/legacy/v1/parse/parseGroupFromBinary.js +0 -36
- package/dist/legacy/v1/parse/parseRendererStateFromBinary.d.ts +0 -4
- package/dist/legacy/v1/parse/parseRendererStateFromBinary.js +0 -15
- package/dist/legacy/v1/serialize/index.d.ts +0 -5
- package/dist/legacy/v1/serialize/index.js +0 -81
- package/dist/legacy/v1/serialize/serializationUtils.d.ts +0 -17
- package/dist/legacy/v1/serialize/serializationUtils.js +0 -27
- package/dist/legacy/v1/serialize/serializeAppStateFromDuc.d.ts +0 -4
- package/dist/legacy/v1/serialize/serializeAppStateFromDuc.js +0 -145
- package/dist/legacy/v1/serialize/serializeBinaryFilesFromDuc.d.ts +0 -4
- package/dist/legacy/v1/serialize/serializeBinaryFilesFromDuc.js +0 -46
- package/dist/legacy/v1/serialize/serializeBlockFromDuc.d.ts +0 -3
- package/dist/legacy/v1/serialize/serializeBlockFromDuc.js +0 -60
- package/dist/legacy/v1/serialize/serializeElementFromDuc.d.ts +0 -8
- package/dist/legacy/v1/serialize/serializeElementFromDuc.js +0 -435
- package/dist/legacy/v1/serialize/serializeGroupFromDuc.d.ts +0 -3
- package/dist/legacy/v1/serialize/serializeGroupFromDuc.js +0 -37
- package/dist/legacy/v1/serialize/serializeRendererStateFromDuc.d.ts +0 -4
- package/dist/legacy/v1/serialize/serializeRendererStateFromDuc.js +0 -7
- package/dist/legacy/v1/types/elements/index.d.ts +0 -480
- package/dist/legacy/v1/types/elements/index.js +0 -1
- package/dist/legacy/v1/types/elements/typeChecks.d.ts +0 -40
- package/dist/legacy/v1/types/elements/typeChecks.js +0 -179
- package/dist/legacy/v1/types/geometryTypes.d.ts +0 -78
- package/dist/legacy/v1/types/geometryTypes.js +0 -1
- package/dist/legacy/v1/types/index.d.ts +0 -496
- package/dist/legacy/v1/types/index.js +0 -1
- package/dist/legacy/v1/types/utility-types.d.ts +0 -31
- package/dist/legacy/v1/types/utility-types.js +0 -1
- package/dist/legacy/v1/utils/bounds.d.ts +0 -76
- package/dist/legacy/v1/utils/bounds.js +0 -415
- package/dist/legacy/v1/utils/constants.d.ts +0 -370
- package/dist/legacy/v1/utils/constants.js +0 -571
- package/dist/legacy/v1/utils/elements/index.d.ts +0 -26
- package/dist/legacy/v1/utils/elements/index.js +0 -108
- package/dist/legacy/v1/utils/elements/linearElement.d.ts +0 -133
- package/dist/legacy/v1/utils/elements/linearElement.js +0 -544
- package/dist/legacy/v1/utils/elements/textElement.d.ts +0 -89
- package/dist/legacy/v1/utils/elements/textElement.js +0 -563
- package/dist/legacy/v1/utils/index.d.ts +0 -26
- package/dist/legacy/v1/utils/index.js +0 -40
- package/dist/legacy/v1/utils/math/algebra/ga.d.ts +0 -63
- package/dist/legacy/v1/utils/math/algebra/ga.js +0 -268
- package/dist/legacy/v1/utils/math/algebra/gadirections.d.ts +0 -9
- package/dist/legacy/v1/utils/math/algebra/gadirections.js +0 -18
- package/dist/legacy/v1/utils/math/algebra/galines.d.ts +0 -23
- package/dist/legacy/v1/utils/math/algebra/galines.js +0 -32
- package/dist/legacy/v1/utils/math/algebra/gapoints.d.ts +0 -8
- package/dist/legacy/v1/utils/math/algebra/gapoints.js +0 -30
- package/dist/legacy/v1/utils/math/algebra/gatransforms.d.ts +0 -10
- package/dist/legacy/v1/utils/math/algebra/gatransforms.js +0 -23
- package/dist/legacy/v1/utils/math/bbox.d.ts +0 -10
- package/dist/legacy/v1/utils/math/bbox.js +0 -42
- package/dist/legacy/v1/utils/math/geometry.d.ts +0 -102
- package/dist/legacy/v1/utils/math/geometry.js +0 -790
- package/dist/legacy/v1/utils/math/index.d.ts +0 -309
- package/dist/legacy/v1/utils/math/index.js +0 -1140
- package/dist/legacy/v1/utils/math/random.d.ts +0 -4
- package/dist/legacy/v1/utils/math/random.js +0 -25
- package/dist/legacy/v1/utils/measurements.d.ts +0 -33
- package/dist/legacy/v1/utils/measurements.js +0 -65
- package/dist/legacy/v1/utils/normalize.d.ts +0 -14
- package/dist/legacy/v1/utils/normalize.js +0 -49
- package/dist/legacy/v1/utils/restore.d.ts +0 -197
- package/dist/legacy/v1/utils/restore.js +0 -1255
- package/dist/legacy/v1/utils/scopes.d.ts +0 -260
- package/dist/legacy/v1/utils/scopes.js +0 -661
- package/dist/legacy/v1/utils/standards.d.ts +0 -12
- package/dist/legacy/v1/utils/standards.js +0 -10
- package/dist/legacy/v1/utils/state/index.d.ts +0 -2
- package/dist/legacy/v1/utils/state/index.js +0 -68
- package/dist/legacy/v1/utils/url.d.ts +0 -8
- package/dist/legacy/v1/utils/url.js +0 -33
package/README.md
CHANGED
|
@@ -39,4 +39,4 @@ To ensure smooth releases with semantic-release, please follow [these guidelines
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
*The duc format and libraries are constantly evolving, aiming to set new standards in the 2D CAD industry. Be a part of this transformation and help shape the future of design technology!*
|
|
42
|
+
*The duc format and libraries are constantly evolving, aiming to set new standards in the 2D CAD industry. Be a part of this transformation and help shape the future of design technology!*
|
|
@@ -3,20 +3,17 @@ import { DucTextStyle } from '../duc/duc-text-style';
|
|
|
3
3
|
import { FCFDatumStyle } from '../duc/fcfdatum-style';
|
|
4
4
|
import { FCFLayoutStyle } from '../duc/fcflayout-style';
|
|
5
5
|
import { FCFSymbolStyle } from '../duc/fcfsymbol-style';
|
|
6
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
7
6
|
export declare class DucFeatureControlFrameStyle {
|
|
8
7
|
bb: flatbuffers.ByteBuffer | null;
|
|
9
8
|
bb_pos: number;
|
|
10
9
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucFeatureControlFrameStyle;
|
|
11
10
|
static getRootAsDucFeatureControlFrameStyle(bb: flatbuffers.ByteBuffer, obj?: DucFeatureControlFrameStyle): DucFeatureControlFrameStyle;
|
|
12
11
|
static getSizePrefixedRootAsDucFeatureControlFrameStyle(bb: flatbuffers.ByteBuffer, obj?: DucFeatureControlFrameStyle): DucFeatureControlFrameStyle;
|
|
13
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
14
12
|
textStyle(obj?: DucTextStyle): DucTextStyle | null;
|
|
15
13
|
layout(obj?: FCFLayoutStyle): FCFLayoutStyle | null;
|
|
16
14
|
symbols(obj?: FCFSymbolStyle): FCFSymbolStyle | null;
|
|
17
15
|
datumStyle(obj?: FCFDatumStyle): FCFDatumStyle | null;
|
|
18
16
|
static startDucFeatureControlFrameStyle(builder: flatbuffers.Builder): void;
|
|
19
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
20
17
|
static addTextStyle(builder: flatbuffers.Builder, textStyleOffset: flatbuffers.Offset): void;
|
|
21
18
|
static addLayout(builder: flatbuffers.Builder, layoutOffset: flatbuffers.Offset): void;
|
|
22
19
|
static addSymbols(builder: flatbuffers.Builder, symbolsOffset: flatbuffers.Offset): void;
|
|
@@ -5,7 +5,6 @@ import { DucTextStyle } from '../duc/duc-text-style';
|
|
|
5
5
|
import { FCFDatumStyle } from '../duc/fcfdatum-style';
|
|
6
6
|
import { FCFLayoutStyle } from '../duc/fcflayout-style';
|
|
7
7
|
import { FCFSymbolStyle } from '../duc/fcfsymbol-style';
|
|
8
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
9
8
|
export class DucFeatureControlFrameStyle {
|
|
10
9
|
constructor() {
|
|
11
10
|
this.bb = null;
|
|
@@ -23,10 +22,6 @@ export class DucFeatureControlFrameStyle {
|
|
|
23
22
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
24
23
|
return (obj || new DucFeatureControlFrameStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
25
24
|
}
|
|
26
|
-
baseStyle(obj) {
|
|
27
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
28
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
29
|
-
}
|
|
30
25
|
textStyle(obj) {
|
|
31
26
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
32
27
|
return offset ? (obj || new DucTextStyle()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
@@ -46,9 +41,6 @@ export class DucFeatureControlFrameStyle {
|
|
|
46
41
|
static startDucFeatureControlFrameStyle(builder) {
|
|
47
42
|
builder.startObject(5);
|
|
48
43
|
}
|
|
49
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
50
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
51
|
-
}
|
|
52
44
|
static addTextStyle(builder, textStyleOffset) {
|
|
53
45
|
builder.addFieldOffset(1, textStyleOffset, 0);
|
|
54
46
|
}
|
|
@@ -3,14 +3,12 @@ import { BLOCK_ATTACHMENT } from '../duc/block-attachment';
|
|
|
3
3
|
import { DucHead } from '../duc/duc-head';
|
|
4
4
|
import { DucTextStyle } from '../duc/duc-text-style';
|
|
5
5
|
import { VERTICAL_ALIGN } from '../duc/vertical-align';
|
|
6
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
7
6
|
export declare class DucLeaderStyle {
|
|
8
7
|
bb: flatbuffers.ByteBuffer | null;
|
|
9
8
|
bb_pos: number;
|
|
10
9
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucLeaderStyle;
|
|
11
10
|
static getRootAsDucLeaderStyle(bb: flatbuffers.ByteBuffer, obj?: DucLeaderStyle): DucLeaderStyle;
|
|
12
11
|
static getSizePrefixedRootAsDucLeaderStyle(bb: flatbuffers.ByteBuffer, obj?: DucLeaderStyle): DucLeaderStyle;
|
|
13
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
14
12
|
headsOverride(index: number, obj?: DucHead): DucHead | null;
|
|
15
13
|
headsOverrideLength(): number;
|
|
16
14
|
dogleg(): number;
|
|
@@ -18,7 +16,6 @@ export declare class DucLeaderStyle {
|
|
|
18
16
|
textAttachment(): VERTICAL_ALIGN | null;
|
|
19
17
|
blockAttachment(): BLOCK_ATTACHMENT | null;
|
|
20
18
|
static startDucLeaderStyle(builder: flatbuffers.Builder): void;
|
|
21
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
22
19
|
static addHeadsOverride(builder: flatbuffers.Builder, headsOverrideOffset: flatbuffers.Offset): void;
|
|
23
20
|
static createHeadsOverrideVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
24
21
|
static startHeadsOverrideVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
4
|
import { DucHead } from '../duc/duc-head';
|
|
5
5
|
import { DucTextStyle } from '../duc/duc-text-style';
|
|
6
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
7
6
|
export class DucLeaderStyle {
|
|
8
7
|
constructor() {
|
|
9
8
|
this.bb = null;
|
|
@@ -21,10 +20,6 @@ export class DucLeaderStyle {
|
|
|
21
20
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
22
21
|
return (obj || new DucLeaderStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
23
22
|
}
|
|
24
|
-
baseStyle(obj) {
|
|
25
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
26
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
27
|
-
}
|
|
28
23
|
headsOverride(index, obj) {
|
|
29
24
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
30
25
|
return offset ? (obj || new DucHead()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
|
|
@@ -52,9 +47,6 @@ export class DucLeaderStyle {
|
|
|
52
47
|
static startDucLeaderStyle(builder) {
|
|
53
48
|
builder.startObject(6);
|
|
54
49
|
}
|
|
55
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
56
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
57
|
-
}
|
|
58
50
|
static addHeadsOverride(builder, headsOverrideOffset) {
|
|
59
51
|
builder.addFieldOffset(1, headsOverrideOffset, 0);
|
|
60
52
|
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
3
2
|
export declare class DucPlotStyle {
|
|
4
3
|
bb: flatbuffers.ByteBuffer | null;
|
|
5
4
|
bb_pos: number;
|
|
6
5
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucPlotStyle;
|
|
7
6
|
static getRootAsDucPlotStyle(bb: flatbuffers.ByteBuffer, obj?: DucPlotStyle): DucPlotStyle;
|
|
8
7
|
static getSizePrefixedRootAsDucPlotStyle(bb: flatbuffers.ByteBuffer, obj?: DucPlotStyle): DucPlotStyle;
|
|
9
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
10
8
|
static startDucPlotStyle(builder: flatbuffers.Builder): void;
|
|
11
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
12
9
|
static endDucPlotStyle(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
13
|
-
static createDucPlotStyle(builder: flatbuffers.Builder
|
|
10
|
+
static createDucPlotStyle(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
14
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
5
4
|
export class DucPlotStyle {
|
|
6
5
|
constructor() {
|
|
7
6
|
this.bb = null;
|
|
@@ -19,23 +18,15 @@ export class DucPlotStyle {
|
|
|
19
18
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
19
|
return (obj || new DucPlotStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
20
|
}
|
|
22
|
-
baseStyle(obj) {
|
|
23
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
25
|
-
}
|
|
26
21
|
static startDucPlotStyle(builder) {
|
|
27
22
|
builder.startObject(1);
|
|
28
23
|
}
|
|
29
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
30
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
31
|
-
}
|
|
32
24
|
static endDucPlotStyle(builder) {
|
|
33
25
|
const offset = builder.endObject();
|
|
34
26
|
return offset;
|
|
35
27
|
}
|
|
36
|
-
static createDucPlotStyle(builder
|
|
28
|
+
static createDucPlotStyle(builder) {
|
|
37
29
|
DucPlotStyle.startDucPlotStyle(builder);
|
|
38
|
-
DucPlotStyle.addBaseStyle(builder, baseStyleOffset);
|
|
39
30
|
return DucPlotStyle.endDucPlotStyle(builder);
|
|
40
31
|
}
|
|
41
32
|
}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
2
|
import { DucTableCellStyle } from '../duc/duc-table-cell-style';
|
|
3
3
|
import { TABLE_FLOW_DIRECTION } from '../duc/table-flow-direction';
|
|
4
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
5
4
|
export declare class DucTableStyle {
|
|
6
5
|
bb: flatbuffers.ByteBuffer | null;
|
|
7
6
|
bb_pos: number;
|
|
8
7
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucTableStyle;
|
|
9
8
|
static getRootAsDucTableStyle(bb: flatbuffers.ByteBuffer, obj?: DucTableStyle): DucTableStyle;
|
|
10
9
|
static getSizePrefixedRootAsDucTableStyle(bb: flatbuffers.ByteBuffer, obj?: DucTableStyle): DucTableStyle;
|
|
11
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
12
10
|
flowDirection(): TABLE_FLOW_DIRECTION | null;
|
|
13
11
|
headerRowStyle(obj?: DucTableCellStyle): DucTableCellStyle | null;
|
|
14
12
|
dataRowStyle(obj?: DucTableCellStyle): DucTableCellStyle | null;
|
|
15
13
|
dataColumnStyle(obj?: DucTableCellStyle): DucTableCellStyle | null;
|
|
16
14
|
static startDucTableStyle(builder: flatbuffers.Builder): void;
|
|
17
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
18
15
|
static addFlowDirection(builder: flatbuffers.Builder, flowDirection: TABLE_FLOW_DIRECTION): void;
|
|
19
16
|
static addHeaderRowStyle(builder: flatbuffers.Builder, headerRowStyleOffset: flatbuffers.Offset): void;
|
|
20
17
|
static addDataRowStyle(builder: flatbuffers.Builder, dataRowStyleOffset: flatbuffers.Offset): void;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
4
|
import { DucTableCellStyle } from '../duc/duc-table-cell-style';
|
|
5
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
6
5
|
export class DucTableStyle {
|
|
7
6
|
constructor() {
|
|
8
7
|
this.bb = null;
|
|
@@ -20,10 +19,6 @@ export class DucTableStyle {
|
|
|
20
19
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
20
|
return (obj || new DucTableStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
21
|
}
|
|
23
|
-
baseStyle(obj) {
|
|
24
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
25
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
26
|
-
}
|
|
27
22
|
flowDirection() {
|
|
28
23
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
29
24
|
return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
|
|
@@ -43,9 +38,6 @@ export class DucTableStyle {
|
|
|
43
38
|
static startDucTableStyle(builder) {
|
|
44
39
|
builder.startObject(5);
|
|
45
40
|
}
|
|
46
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
47
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
48
|
-
}
|
|
49
41
|
static addFlowDirection(builder, flowDirection) {
|
|
50
42
|
builder.addFieldInt8(1, flowDirection, null);
|
|
51
43
|
}
|
|
@@ -2,14 +2,12 @@ import * as flatbuffers from 'flatbuffers';
|
|
|
2
2
|
import { LineSpacing } from '../duc/line-spacing';
|
|
3
3
|
import { TEXT_ALIGN } from '../duc/text-align';
|
|
4
4
|
import { VERTICAL_ALIGN } from '../duc/vertical-align';
|
|
5
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
6
5
|
export declare class DucTextStyle {
|
|
7
6
|
bb: flatbuffers.ByteBuffer | null;
|
|
8
7
|
bb_pos: number;
|
|
9
8
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucTextStyle;
|
|
10
9
|
static getRootAsDucTextStyle(bb: flatbuffers.ByteBuffer, obj?: DucTextStyle): DucTextStyle;
|
|
11
10
|
static getSizePrefixedRootAsDucTextStyle(bb: flatbuffers.ByteBuffer, obj?: DucTextStyle): DucTextStyle;
|
|
12
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
13
11
|
isLtr(): boolean;
|
|
14
12
|
fontFamily(): string | null;
|
|
15
13
|
fontFamily(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
@@ -26,7 +24,6 @@ export declare class DucTextStyle {
|
|
|
26
24
|
isUpsideDown(): boolean;
|
|
27
25
|
isBackwards(): boolean;
|
|
28
26
|
static startDucTextStyle(builder: flatbuffers.Builder): void;
|
|
29
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
30
27
|
static addIsLtr(builder: flatbuffers.Builder, isLtr: boolean): void;
|
|
31
28
|
static addFontFamily(builder: flatbuffers.Builder, fontFamilyOffset: flatbuffers.Offset): void;
|
|
32
29
|
static addBigFontFamily(builder: flatbuffers.Builder, bigFontFamilyOffset: flatbuffers.Offset): void;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
4
|
import { LineSpacing } from '../duc/line-spacing';
|
|
5
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
6
5
|
export class DucTextStyle {
|
|
7
6
|
constructor() {
|
|
8
7
|
this.bb = null;
|
|
@@ -20,10 +19,6 @@ export class DucTextStyle {
|
|
|
20
19
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
21
20
|
return (obj || new DucTextStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
22
21
|
}
|
|
23
|
-
baseStyle(obj) {
|
|
24
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
25
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
26
|
-
}
|
|
27
22
|
isLtr() {
|
|
28
23
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
29
24
|
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
@@ -79,9 +74,6 @@ export class DucTextStyle {
|
|
|
79
74
|
static startDucTextStyle(builder) {
|
|
80
75
|
builder.startObject(14);
|
|
81
76
|
}
|
|
82
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
83
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
84
|
-
}
|
|
85
77
|
static addIsLtr(builder, isLtr) {
|
|
86
78
|
builder.addFieldInt8(1, +isLtr, +false);
|
|
87
79
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
3
2
|
export declare class DucViewportStyle {
|
|
4
3
|
bb: flatbuffers.ByteBuffer | null;
|
|
5
4
|
bb_pos: number;
|
|
6
5
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucViewportStyle;
|
|
7
6
|
static getRootAsDucViewportStyle(bb: flatbuffers.ByteBuffer, obj?: DucViewportStyle): DucViewportStyle;
|
|
8
7
|
static getSizePrefixedRootAsDucViewportStyle(bb: flatbuffers.ByteBuffer, obj?: DucViewportStyle): DucViewportStyle;
|
|
9
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
10
8
|
scaleIndicatorVisible(): boolean;
|
|
11
9
|
static startDucViewportStyle(builder: flatbuffers.Builder): void;
|
|
12
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
13
10
|
static addScaleIndicatorVisible(builder: flatbuffers.Builder, scaleIndicatorVisible: boolean): void;
|
|
14
11
|
static endDucViewportStyle(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
15
|
-
static createDucViewportStyle(builder: flatbuffers.Builder,
|
|
12
|
+
static createDucViewportStyle(builder: flatbuffers.Builder, scaleIndicatorVisible: boolean): flatbuffers.Offset;
|
|
16
13
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
5
4
|
export class DucViewportStyle {
|
|
6
5
|
constructor() {
|
|
7
6
|
this.bb = null;
|
|
@@ -19,10 +18,6 @@ export class DucViewportStyle {
|
|
|
19
18
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
19
|
return (obj || new DucViewportStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
20
|
}
|
|
22
|
-
baseStyle(obj) {
|
|
23
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
25
|
-
}
|
|
26
21
|
scaleIndicatorVisible() {
|
|
27
22
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
23
|
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
@@ -30,9 +25,6 @@ export class DucViewportStyle {
|
|
|
30
25
|
static startDucViewportStyle(builder) {
|
|
31
26
|
builder.startObject(2);
|
|
32
27
|
}
|
|
33
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
34
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
35
|
-
}
|
|
36
28
|
static addScaleIndicatorVisible(builder, scaleIndicatorVisible) {
|
|
37
29
|
builder.addFieldInt8(1, +scaleIndicatorVisible, +false);
|
|
38
30
|
}
|
|
@@ -40,9 +32,8 @@ export class DucViewportStyle {
|
|
|
40
32
|
const offset = builder.endObject();
|
|
41
33
|
return offset;
|
|
42
34
|
}
|
|
43
|
-
static createDucViewportStyle(builder,
|
|
35
|
+
static createDucViewportStyle(builder, scaleIndicatorVisible) {
|
|
44
36
|
DucViewportStyle.startDucViewportStyle(builder);
|
|
45
|
-
DucViewportStyle.addBaseStyle(builder, baseStyleOffset);
|
|
46
37
|
DucViewportStyle.addScaleIndicatorVisible(builder, scaleIndicatorVisible);
|
|
47
38
|
return DucViewportStyle.endDucViewportStyle(builder);
|
|
48
39
|
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
3
2
|
export declare class DucXRayStyle {
|
|
4
3
|
bb: flatbuffers.ByteBuffer | null;
|
|
5
4
|
bb_pos: number;
|
|
6
5
|
__init(i: number, bb: flatbuffers.ByteBuffer): DucXRayStyle;
|
|
7
6
|
static getRootAsDucXRayStyle(bb: flatbuffers.ByteBuffer, obj?: DucXRayStyle): DucXRayStyle;
|
|
8
7
|
static getSizePrefixedRootAsDucXRayStyle(bb: flatbuffers.ByteBuffer, obj?: DucXRayStyle): DucXRayStyle;
|
|
9
|
-
baseStyle(obj?: _DucElementStylesBase): _DucElementStylesBase | null;
|
|
10
8
|
color(): string | null;
|
|
11
9
|
color(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
12
10
|
static startDucXRayStyle(builder: flatbuffers.Builder): void;
|
|
13
|
-
static addBaseStyle(builder: flatbuffers.Builder, baseStyleOffset: flatbuffers.Offset): void;
|
|
14
11
|
static addColor(builder: flatbuffers.Builder, colorOffset: flatbuffers.Offset): void;
|
|
15
12
|
static endDucXRayStyle(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
16
|
-
static createDucXRayStyle(builder: flatbuffers.Builder,
|
|
13
|
+
static createDucXRayStyle(builder: flatbuffers.Builder, colorOffset: flatbuffers.Offset): flatbuffers.Offset;
|
|
17
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
3
|
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { _DucElementStylesBase } from '../duc/duc-element-styles-base';
|
|
5
4
|
export class DucXRayStyle {
|
|
6
5
|
constructor() {
|
|
7
6
|
this.bb = null;
|
|
@@ -19,10 +18,6 @@ export class DucXRayStyle {
|
|
|
19
18
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
19
|
return (obj || new DucXRayStyle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
20
|
}
|
|
22
|
-
baseStyle(obj) {
|
|
23
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
-
return offset ? (obj || new _DucElementStylesBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
25
|
-
}
|
|
26
21
|
color(optionalEncoding) {
|
|
27
22
|
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
23
|
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
@@ -30,9 +25,6 @@ export class DucXRayStyle {
|
|
|
30
25
|
static startDucXRayStyle(builder) {
|
|
31
26
|
builder.startObject(2);
|
|
32
27
|
}
|
|
33
|
-
static addBaseStyle(builder, baseStyleOffset) {
|
|
34
|
-
builder.addFieldOffset(0, baseStyleOffset, 0);
|
|
35
|
-
}
|
|
36
28
|
static addColor(builder, colorOffset) {
|
|
37
29
|
builder.addFieldOffset(1, colorOffset, 0);
|
|
38
30
|
}
|
|
@@ -40,9 +32,8 @@ export class DucXRayStyle {
|
|
|
40
32
|
const offset = builder.endObject();
|
|
41
33
|
return offset;
|
|
42
34
|
}
|
|
43
|
-
static createDucXRayStyle(builder,
|
|
35
|
+
static createDucXRayStyle(builder, colorOffset) {
|
|
44
36
|
DucXRayStyle.startDucXRayStyle(builder);
|
|
45
|
-
DucXRayStyle.addBaseStyle(builder, baseStyleOffset);
|
|
46
37
|
DucXRayStyle.addColor(builder, colorOffset);
|
|
47
38
|
return DucXRayStyle.endDucXRayStyle(builder);
|
|
48
39
|
}
|
|
@@ -46,6 +46,8 @@ export declare class ExportedDataState {
|
|
|
46
46
|
externalFiles(index: number, obj?: DucExternalFileEntry): DucExternalFileEntry | null;
|
|
47
47
|
externalFilesLength(): number;
|
|
48
48
|
versionGraph(obj?: VersionGraph): VersionGraph | null;
|
|
49
|
+
id(): string | null;
|
|
50
|
+
id(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
|
|
49
51
|
static startExportedDataState(builder: flatbuffers.Builder): void;
|
|
50
52
|
static addType(builder: flatbuffers.Builder, typeOffset: flatbuffers.Offset): void;
|
|
51
53
|
static addVersionLegacy(builder: flatbuffers.Builder, versionLegacy: number): void;
|
|
@@ -81,6 +83,7 @@ export declare class ExportedDataState {
|
|
|
81
83
|
static createExternalFilesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
82
84
|
static startExternalFilesVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
83
85
|
static addVersionGraph(builder: flatbuffers.Builder, versionGraphOffset: flatbuffers.Offset): void;
|
|
86
|
+
static addId(builder: flatbuffers.Builder, idOffset: flatbuffers.Offset): void;
|
|
84
87
|
static endExportedDataState(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
85
88
|
static finishExportedDataStateBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
|
|
86
89
|
static finishSizePrefixedExportedDataStateBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
|
|
@@ -136,8 +136,12 @@ export class ExportedDataState {
|
|
|
136
136
|
const offset = this.bb.__offset(this.bb_pos, 34);
|
|
137
137
|
return offset ? (obj || new VersionGraph()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
138
138
|
}
|
|
139
|
+
id(optionalEncoding) {
|
|
140
|
+
const offset = this.bb.__offset(this.bb_pos, 36);
|
|
141
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
142
|
+
}
|
|
139
143
|
static startExportedDataState(builder) {
|
|
140
|
-
builder.startObject(
|
|
144
|
+
builder.startObject(17);
|
|
141
145
|
}
|
|
142
146
|
static addType(builder, typeOffset) {
|
|
143
147
|
builder.addFieldOffset(0, typeOffset, 0);
|
|
@@ -277,6 +281,9 @@ export class ExportedDataState {
|
|
|
277
281
|
static addVersionGraph(builder, versionGraphOffset) {
|
|
278
282
|
builder.addFieldOffset(15, versionGraphOffset, 0);
|
|
279
283
|
}
|
|
284
|
+
static addId(builder, idOffset) {
|
|
285
|
+
builder.addFieldOffset(16, idOffset, 0);
|
|
286
|
+
}
|
|
280
287
|
static endExportedDataState(builder) {
|
|
281
288
|
const offset = builder.endObject();
|
|
282
289
|
return offset;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/parse.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FileSystemHandle } from 'browser-fs-access';
|
|
2
|
-
import { CustomHatchPattern as CustomHatchPatternFb, DimensionToleranceStyle as DimensionToleranceStyleFb, DucBlock as DucBlockFb, DucDimensionStyle as DucDimensionStyleFb, DucDocStyle as DucDocStyleFb, DucExternalFileEntry, DucFeatureControlFrameStyle as DucFeatureControlFrameStyleFb, DucGlobalState as DucGlobalStateFb, DucGroup as DucGroupFb, DucHatchStyle as DucHatchStyleFb, DucHead as DucHeadFb, DucImageFilter as DucImageFilterFb, DucLayer as DucLayerFb, DucLeaderStyle as DucLeaderStyleFb, DucLine as DucLineFb, DucLineReference as DucLineReferenceFb, DucLocalState as DucLocalStateFb, DucPath as DucPathFb, DucPlotStyle as DucPlotStyleFb, DucPointBinding as DucPointBindingFb, DucPoint as DucPointFb, DucRegion as DucRegionFb, DucStackLikeStyles as DucStackLikeStylesFb, DucTableCellStyle as DucTableCellStyleFb, DucTableStyle as DucTableStyleFb, DucTextStyle as DucTextStyleFb, DucViewportStyle as DucViewportStyleFb, DucXRayStyle as DucXRayStyleFb, ElementBackground as ElementBackgroundFb, ElementContentBase as ElementContentBaseFb, ElementStroke as ElementStrokeFb, ElementWrapper, ExportedDataState as ExportedDataStateFb, GeometricPoint as GeometricPointFb, HatchPatternLine as HatchPatternLineFb, Margins as MarginsFb, PrimaryUnits as PrimaryUnitsFb, Standard as StandardFb, StrokeSides as StrokeSidesFb, StrokeStyle as StrokeStyleFb, TilingProperties as TilingPropertiesFb, VersionGraph as VersionGraphFb, _DucElementBase as _DucElementBaseFb, _DucElementStylesBase as _DucElementStylesBaseFb, _DucLinearElementBase as _DucLinearElementBaseFb, _DucStackBase as _DucStackBaseFb, _DucStackElementBase as _DucStackElementBaseFb } from "
|
|
3
|
-
import { RestoredDataState } from "
|
|
4
|
-
import { Standard, StandardUnits } from "
|
|
5
|
-
import { CustomHatchPattern, Dictionary, DucBlock, DucDimensionStyle, DucDocStyle, DucElement, DucExternalFiles, DucFeatureControlFrameStyle, DucGlobalState, DucGroup, DucHatchStyle, DucHead, DucImageFilter, DucLayer, DucLeaderStyle, DucLine, DucLineReference, DucLocalState, DucPath, DucPlotStyle, DucPoint, DucPointBinding, DucRegion, DucStackLikeStyles, DucTableCellStyle, DucTableStyle, DucTextStyle, DucViewportStyle, DucXRayStyle, ElementBackground, ElementContentBase, ElementStroke, GeometricPoint, HatchPatternLine, PlotLayout, StrokeSides, StrokeStyle, TilingProperties, VersionGraph, _DucElementBase, _DucElementStylesBase, _DucLinearElementBase, _DucStackBase, _DucStackElementBase } from "
|
|
2
|
+
import { CustomHatchPattern as CustomHatchPatternFb, DimensionToleranceStyle as DimensionToleranceStyleFb, DucBlock as DucBlockFb, DucDimensionStyle as DucDimensionStyleFb, DucDocStyle as DucDocStyleFb, DucExternalFileEntry, DucFeatureControlFrameStyle as DucFeatureControlFrameStyleFb, DucGlobalState as DucGlobalStateFb, DucGroup as DucGroupFb, DucHatchStyle as DucHatchStyleFb, DucHead as DucHeadFb, DucImageFilter as DucImageFilterFb, DucLayer as DucLayerFb, DucLeaderStyle as DucLeaderStyleFb, DucLine as DucLineFb, DucLineReference as DucLineReferenceFb, DucLocalState as DucLocalStateFb, DucPath as DucPathFb, DucPlotStyle as DucPlotStyleFb, DucPointBinding as DucPointBindingFb, DucPoint as DucPointFb, DucRegion as DucRegionFb, DucStackLikeStyles as DucStackLikeStylesFb, DucTableCellStyle as DucTableCellStyleFb, DucTableStyle as DucTableStyleFb, DucTextStyle as DucTextStyleFb, DucViewportStyle as DucViewportStyleFb, DucXRayStyle as DucXRayStyleFb, ElementBackground as ElementBackgroundFb, ElementContentBase as ElementContentBaseFb, ElementStroke as ElementStrokeFb, ElementWrapper, ExportedDataState as ExportedDataStateFb, GeometricPoint as GeometricPointFb, HatchPatternLine as HatchPatternLineFb, Margins as MarginsFb, PrimaryUnits as PrimaryUnitsFb, Standard as StandardFb, StrokeSides as StrokeSidesFb, StrokeStyle as StrokeStyleFb, TilingProperties as TilingPropertiesFb, VersionGraph as VersionGraphFb, _DucElementBase as _DucElementBaseFb, _DucElementStylesBase as _DucElementStylesBaseFb, _DucLinearElementBase as _DucLinearElementBaseFb, _DucStackBase as _DucStackBaseFb, _DucStackElementBase as _DucStackElementBaseFb } from "./flatbuffers/duc";
|
|
3
|
+
import { RestoreConfig, RestoredDataState } from "./restore";
|
|
4
|
+
import { Standard, StandardUnits } from "./technical";
|
|
5
|
+
import { CustomHatchPattern, Dictionary, DucBlock, DucDimensionStyle, DucDocStyle, DucElement, DucExternalFiles, DucFeatureControlFrameStyle, DucGlobalState, DucGroup, DucHatchStyle, DucHead, DucImageFilter, DucLayer, DucLeaderStyle, DucLine, DucLineReference, DucLocalState, DucPath, DucPlotStyle, DucPoint, DucPointBinding, DucRegion, DucStackLikeStyles, DucTableCellStyle, DucTableStyle, DucTextStyle, DucViewportStyle, DucXRayStyle, ElementBackground, ElementContentBase, ElementStroke, GeometricPoint, HatchPatternLine, PlotLayout, StrokeSides, StrokeStyle, TilingProperties, VersionGraph, _DucElementBase, _DucElementStylesBase, _DucLinearElementBase, _DucStackBase, _DucStackElementBase } from "./types";
|
|
6
6
|
export declare function parseGeometricPoint(point: GeometricPointFb): GeometricPoint;
|
|
7
7
|
export declare function parsePoint(point: DucPointFb): DucPoint;
|
|
8
8
|
export declare function parseMargins(margins: MarginsFb): PlotLayout["margins"];
|
|
@@ -51,4 +51,4 @@ export declare function parsePrimaryUnits(units: PrimaryUnitsFb): StandardUnits[
|
|
|
51
51
|
export declare function parseStandardFromBinary(standard: StandardFb): Standard;
|
|
52
52
|
export declare function parseThumbnailFromBinary(data: ExportedDataStateFb): Uint8Array | undefined;
|
|
53
53
|
export declare function parseVersionGraphFromBinary(graph: VersionGraphFb | null): VersionGraph | null;
|
|
54
|
-
export declare const parseDuc: (blob: Blob | File, fileHandle?: FileSystemHandle | null) => Promise<RestoredDataState>;
|
|
54
|
+
export declare const parseDuc: (blob: Blob | File, fileHandle?: FileSystemHandle | null, restoreConfig?: RestoreConfig) => Promise<RestoredDataState>;
|
package/dist/parse.js
CHANGED
|
@@ -7,9 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { DucArrowElement as DucArrowElementFb, DucBlockInstanceElement as DucBlockInstanceElementFb, DucDimensionElement as DucDimensionElementFb, DucDocElement as DucDocElementFb, DucEllipseElement as DucEllipseElementFb, DucEmbeddableElement as DucEmbeddableElementFb, DucFeatureControlFrameElement as DucFeatureControlFrameElementFb, DucFrameElement as DucFrameElementFb, DucFreeDrawElement as DucFreeDrawElementFb, DucImageElement as DucImageElementFb, DucLeaderElement as DucLeaderElementFb, DucLinearElement as DucLinearElementFb, DucMermaidElement as DucMermaidElementFb, DucParametricElement as DucParametricElementFb, DucPdfElement as DucPdfElementFb, DucPlotElement as DucPlotElementFb, DucPolygonElement as DucPolygonElementFb, DucRectangleElement as DucRectangleElementFb, DucTableElement as DucTableElementFb, DucTextDynamicDictionarySource as DucTextDynamicDictionarySourceFb, DucTextDynamicElementSource as DucTextDynamicElementSourceFb, DucTextElement as DucTextElementFb, DucViewportElement as DucViewportElementFb, DucXRayElement as DucXRayElementFb, Element as ElementUnion, ExportedDataState, LEADER_CONTENT_TYPE as LEADER_CONTENT_TYPE_ENUM, LeaderBlockContent as LeaderBlockContentFb, LeaderTextBlockContent as LeaderTextBlockContentFb, TEXT_FIELD_SOURCE_TYPE } from "
|
|
11
|
-
import {
|
|
12
|
-
import { restore } from "ducjs/restore";
|
|
10
|
+
import { DucArrowElement as DucArrowElementFb, DucBlockInstanceElement as DucBlockInstanceElementFb, DucDimensionElement as DucDimensionElementFb, DucDocElement as DucDocElementFb, DucEllipseElement as DucEllipseElementFb, DucEmbeddableElement as DucEmbeddableElementFb, DucFeatureControlFrameElement as DucFeatureControlFrameElementFb, DucFrameElement as DucFrameElementFb, DucFreeDrawElement as DucFreeDrawElementFb, DucImageElement as DucImageElementFb, DucLeaderElement as DucLeaderElementFb, DucLinearElement as DucLinearElementFb, DucMermaidElement as DucMermaidElementFb, DucParametricElement as DucParametricElementFb, DucPdfElement as DucPdfElementFb, DucPlotElement as DucPlotElementFb, DucPolygonElement as DucPolygonElementFb, DucRectangleElement as DucRectangleElementFb, DucTableElement as DucTableElementFb, DucTextDynamicDictionarySource as DucTextDynamicDictionarySourceFb, DucTextDynamicElementSource as DucTextDynamicElementSourceFb, DucTextElement as DucTextElementFb, DucViewportElement as DucViewportElementFb, DucXRayElement as DucXRayElementFb, Element as ElementUnion, ExportedDataState, LEADER_CONTENT_TYPE as LEADER_CONTENT_TYPE_ENUM, LeaderBlockContent as LeaderBlockContentFb, LeaderTextBlockContent as LeaderTextBlockContentFb, TEXT_FIELD_SOURCE_TYPE } from "./flatbuffers/duc";
|
|
11
|
+
import { restore } from "./restore";
|
|
13
12
|
import * as flatbuffers from "flatbuffers";
|
|
14
13
|
// #region HELPERS & LOW-LEVEL CASTS
|
|
15
14
|
// Helper functions for type casting
|
|
@@ -509,29 +508,58 @@ function parseParametricElement(element) {
|
|
|
509
508
|
// #region STYLE PARSERS (ELEMENT-LEVEL)
|
|
510
509
|
export function parseTextStyle(style) {
|
|
511
510
|
const lineSpacing = style.lineSpacing();
|
|
512
|
-
return
|
|
511
|
+
return {
|
|
512
|
+
isLtr: style.isLtr(),
|
|
513
|
+
fontFamily: style.fontFamily(), // For now will use as any because this will be a string in the future
|
|
514
|
+
bigFontFamily: style.bigFontFamily(),
|
|
515
|
+
textAlign: style.textAlign(),
|
|
516
|
+
verticalAlign: style.verticalAlign(),
|
|
517
|
+
lineHeight: style.lineHeight(),
|
|
518
|
+
lineSpacing: {
|
|
513
519
|
value: toPrecisionValue(lineSpacing.value()),
|
|
514
520
|
type: lineSpacing.type(),
|
|
515
|
-
},
|
|
521
|
+
},
|
|
522
|
+
obliqueAngle: toRadian(style.obliqueAngle()),
|
|
523
|
+
fontSize: toPrecisionValue(style.fontSize()),
|
|
524
|
+
paperTextHeight: toPrecisionValue(style.paperTextHeight()),
|
|
525
|
+
widthFactor: toScaleFactor(style.widthFactor()),
|
|
526
|
+
isUpsideDown: style.isUpsideDown(),
|
|
527
|
+
isBackwards: style.isBackwards(),
|
|
528
|
+
};
|
|
516
529
|
}
|
|
517
530
|
export function parseTableCellStyle(style) {
|
|
518
531
|
return Object.assign(Object.assign({}, parseElementStylesBase(style.baseStyle())), { textStyle: parseTextStyle(style.textStyle()), margins: parseMargins(style.margins()), alignment: style.alignment() });
|
|
519
532
|
}
|
|
520
533
|
export function parseTableStyle(style) {
|
|
521
|
-
return
|
|
534
|
+
return {
|
|
535
|
+
flowDirection: style.flowDirection(),
|
|
536
|
+
headerRowStyle: parseTableCellStyle(style.headerRowStyle()),
|
|
537
|
+
dataRowStyle: parseTableCellStyle(style.dataRowStyle()),
|
|
538
|
+
dataColumnStyle: parseTableCellStyle(style.dataColumnStyle()),
|
|
539
|
+
};
|
|
522
540
|
}
|
|
523
541
|
export function parsePlotStyle(style) {
|
|
524
|
-
return
|
|
542
|
+
return {};
|
|
525
543
|
}
|
|
526
544
|
export function parseViewportStyle(style) {
|
|
527
|
-
return
|
|
545
|
+
return {
|
|
546
|
+
scaleIndicatorVisible: style.scaleIndicatorVisible(),
|
|
547
|
+
};
|
|
528
548
|
}
|
|
529
549
|
export function parseXRayStyle(style) {
|
|
530
|
-
return
|
|
550
|
+
return {
|
|
551
|
+
color: style.color(),
|
|
552
|
+
};
|
|
531
553
|
}
|
|
532
554
|
export function parseLeaderStyle(style) {
|
|
533
555
|
var _a, _b;
|
|
534
|
-
return
|
|
556
|
+
return {
|
|
557
|
+
headsOverride: style.headsOverrideLength() > 0 ? [parseHead(style.headsOverride(0)), parseHead(style.headsOverride(1))] : undefined,
|
|
558
|
+
dogleg: style.dogleg() ? toPrecisionValue(style.dogleg()) : undefined,
|
|
559
|
+
textStyle: parseTextStyle(style.textStyle()),
|
|
560
|
+
textAttachment: ((_a = style.textAttachment()) !== null && _a !== void 0 ? _a : undefined),
|
|
561
|
+
blockAttachment: ((_b = style.blockAttachment()) !== null && _b !== void 0 ? _b : undefined),
|
|
562
|
+
};
|
|
535
563
|
}
|
|
536
564
|
export function parseDimensionToleranceStyle(style) {
|
|
537
565
|
return {
|
|
@@ -574,15 +602,20 @@ export function parseDimensionStyle(style) {
|
|
|
574
602
|
}
|
|
575
603
|
export function parseFeatureControlFrameStyle(style) {
|
|
576
604
|
const layout = style.layout();
|
|
577
|
-
return
|
|
605
|
+
return {
|
|
606
|
+
textStyle: parseTextStyle(style.textStyle()),
|
|
607
|
+
layout: {
|
|
578
608
|
padding: toPrecisionValue(layout.padding()),
|
|
579
609
|
segmentSpacing: toPrecisionValue(layout.segmentSpacing()),
|
|
580
610
|
rowSpacing: toPrecisionValue(layout.rowSpacing()),
|
|
581
|
-
},
|
|
611
|
+
},
|
|
612
|
+
symbols: {
|
|
582
613
|
scale: style.symbols().scale(),
|
|
583
|
-
},
|
|
614
|
+
},
|
|
615
|
+
datumStyle: {
|
|
584
616
|
bracketStyle: style.datumStyle().bracketStyle(),
|
|
585
|
-
}
|
|
617
|
+
},
|
|
618
|
+
};
|
|
586
619
|
}
|
|
587
620
|
export function parseDocStyle(style) {
|
|
588
621
|
const paragraph = style.paragraph();
|
|
@@ -775,9 +808,11 @@ export function parseDictionaryFromBinary(data) {
|
|
|
775
808
|
export function parseExternalFilesFromBinary(entry) {
|
|
776
809
|
const fileData = entry.value();
|
|
777
810
|
const data = fileData.dataArray();
|
|
811
|
+
const key = entry.key();
|
|
812
|
+
const id = fileData.id();
|
|
778
813
|
return {
|
|
779
|
-
[
|
|
780
|
-
id
|
|
814
|
+
[key]: {
|
|
815
|
+
id,
|
|
781
816
|
mimeType: fileData.mimeType(),
|
|
782
817
|
data,
|
|
783
818
|
created: Number(fileData.created()),
|
|
@@ -1175,7 +1210,8 @@ export function parseVersionGraphFromBinary(graph) {
|
|
|
1175
1210
|
}
|
|
1176
1211
|
// #endregion
|
|
1177
1212
|
// #region ROOT PARSER
|
|
1178
|
-
export const parseDuc = (blob_1, ...args_1) => __awaiter(void 0, [blob_1, ...args_1], void 0, function* (blob, fileHandle = null) {
|
|
1213
|
+
export const parseDuc = (blob_1, ...args_1) => __awaiter(void 0, [blob_1, ...args_1], void 0, function* (blob, fileHandle = null, restoreConfig = {}) {
|
|
1214
|
+
var _a;
|
|
1179
1215
|
const arrayBuffer = yield blob.arrayBuffer();
|
|
1180
1216
|
if (!arrayBuffer || arrayBuffer.byteLength === 0) {
|
|
1181
1217
|
throw new Error('Invalid DUC buffer: empty file');
|
|
@@ -1189,10 +1225,9 @@ export const parseDuc = (blob_1, ...args_1) => __awaiter(void 0, [blob_1, ...arg
|
|
|
1189
1225
|
catch (e) {
|
|
1190
1226
|
throw new Error('Invalid DUC buffer: cannot read root table');
|
|
1191
1227
|
}
|
|
1192
|
-
// TODO: For now don't touch, to be removed on a late duc v2 version
|
|
1193
1228
|
const legacyVersion = data.versionLegacy();
|
|
1194
1229
|
if (legacyVersion) {
|
|
1195
|
-
|
|
1230
|
+
throw new Error(`Unsupported DUC version: ${legacyVersion}. Please use version ducjs@2.0.1 or lower to support this file.`);
|
|
1196
1231
|
}
|
|
1197
1232
|
const version = data.version();
|
|
1198
1233
|
const localState = data.ducLocalState();
|
|
@@ -1295,11 +1330,12 @@ export const parseDuc = (blob_1, ...args_1) => __awaiter(void 0, [blob_1, ...arg
|
|
|
1295
1330
|
standards,
|
|
1296
1331
|
files: parsedFiles,
|
|
1297
1332
|
versionGraph: versionGraph !== null && versionGraph !== void 0 ? versionGraph : undefined,
|
|
1333
|
+
id: (_a = data.id()) !== null && _a !== void 0 ? _a : undefined,
|
|
1298
1334
|
}, {
|
|
1299
1335
|
syncInvalidIndices: (elements) => elements,
|
|
1300
1336
|
repairBindings: true,
|
|
1301
1337
|
refreshDimensions: false,
|
|
1302
|
-
});
|
|
1338
|
+
}, restoreConfig);
|
|
1303
1339
|
return {
|
|
1304
1340
|
thumbnail: sanitized.thumbnail,
|
|
1305
1341
|
dictionary: sanitized.dictionary,
|
|
@@ -1313,6 +1349,7 @@ export const parseDuc = (blob_1, ...args_1) => __awaiter(void 0, [blob_1, ...arg
|
|
|
1313
1349
|
layers: sanitized.layers,
|
|
1314
1350
|
standards: sanitized.standards,
|
|
1315
1351
|
versionGraph: sanitized.versionGraph,
|
|
1352
|
+
id: sanitized.id,
|
|
1316
1353
|
};
|
|
1317
1354
|
});
|
|
1318
1355
|
// #endregion
|