ducjs 2.3.0 → 3.0.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 +2 -2
- package/dist/enums.d.ts +135 -0
- package/dist/enums.js +155 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +8 -4
- package/dist/lazy-files.d.ts +44 -0
- package/dist/lazy-files.js +129 -0
- package/dist/parse.d.ts +21 -55
- package/dist/parse.js +58 -1445
- package/dist/restore/index.d.ts +0 -1
- package/dist/restore/index.js +0 -1
- package/dist/restore/restoreDataState.d.ts +6 -10
- package/dist/restore/restoreDataState.js +117 -127
- package/dist/restore/restoreElements.d.ts +1 -1
- package/dist/restore/restoreElements.js +37 -494
- package/dist/serialize.d.ts +11 -4
- package/dist/serialize.js +58 -2545
- package/dist/technical/index.d.ts +0 -1
- package/dist/technical/index.js +0 -1
- package/dist/technical/scopes.d.ts +1 -1
- package/dist/technical/scopes.js +1 -1
- package/dist/transform.d.ts +12 -0
- package/dist/transform.js +442 -0
- package/dist/types/elements/index.d.ts +120 -693
- package/dist/types/elements/typeChecks.d.ts +6 -3
- package/dist/types/elements/typeChecks.js +9 -8
- package/dist/types/geometryTypes.d.ts +1 -1
- package/dist/types/index.d.ts +38 -305
- package/dist/utils/constants.d.ts +21 -100
- package/dist/utils/constants.js +29 -212
- package/dist/utils/elements/freedrawElement.d.ts +6 -0
- package/dist/utils/elements/freedrawElement.js +28 -11
- package/dist/utils/elements/index.d.ts +3 -14
- package/dist/utils/elements/index.js +7 -99
- package/dist/utils/elements/linearElement.d.ts +2 -2
- package/dist/utils/elements/newElement.d.ts +2 -12
- package/dist/utils/elements/newElement.js +32 -52
- package/dist/utils/elements/textElement.d.ts +3 -3
- package/dist/utils/elements/textElement.js +44 -17
- package/dist/utils/math/index.d.ts +5 -4
- package/dist/utils/math/index.js +3 -3
- package/dist/utils/shape.js +2 -2
- package/dist/utils/state/index.d.ts +0 -1
- package/dist/utils/state/index.js +5 -71
- package/dist/utils/traverse.d.ts +8 -0
- package/dist/utils/traverse.js +37 -0
- package/dist/version-control.d.ts +61 -0
- package/dist/version-control.js +84 -0
- package/dist/wasm.d.ts +20 -0
- package/dist/wasm.js +52 -0
- package/package.json +2 -2
- package/dist/flatbuffers/duc/alternate-units.d.ts +0 -21
- package/dist/flatbuffers/duc/alternate-units.js +0 -66
- package/dist/flatbuffers/duc/angular-unit-system.d.ts +0 -17
- package/dist/flatbuffers/duc/angular-unit-system.js +0 -50
- package/dist/flatbuffers/duc/angular-units-format.d.ts +0 -7
- package/dist/flatbuffers/duc/angular-units-format.js +0 -10
- package/dist/flatbuffers/duc/axis.d.ts +0 -5
- package/dist/flatbuffers/duc/axis.js +0 -8
- package/dist/flatbuffers/duc/bezier-mirroring.d.ts +0 -5
- package/dist/flatbuffers/duc/bezier-mirroring.js +0 -8
- package/dist/flatbuffers/duc/blending.d.ts +0 -9
- package/dist/flatbuffers/duc/blending.js +0 -12
- package/dist/flatbuffers/duc/block-attachment.d.ts +0 -4
- package/dist/flatbuffers/duc/block-attachment.js +0 -7
- package/dist/flatbuffers/duc/boolean-operation.d.ts +0 -6
- package/dist/flatbuffers/duc/boolean-operation.js +0 -9
- package/dist/flatbuffers/duc/bound-element.d.ts +0 -17
- package/dist/flatbuffers/duc/bound-element.js +0 -48
- package/dist/flatbuffers/duc/checkpoint.d.ts +0 -22
- package/dist/flatbuffers/duc/checkpoint.js +0 -75
- package/dist/flatbuffers/duc/column-layout.d.ts +0 -22
- package/dist/flatbuffers/duc/column-layout.js +0 -72
- package/dist/flatbuffers/duc/column-type.d.ts +0 -5
- package/dist/flatbuffers/duc/column-type.js +0 -8
- package/dist/flatbuffers/duc/custom-hatch-pattern.d.ts +0 -23
- package/dist/flatbuffers/duc/custom-hatch-pattern.js +0 -71
- package/dist/flatbuffers/duc/datum-bracket-style.d.ts +0 -5
- package/dist/flatbuffers/duc/datum-bracket-style.js +0 -8
- package/dist/flatbuffers/duc/datum-reference.d.ts +0 -17
- package/dist/flatbuffers/duc/datum-reference.js +0 -49
- package/dist/flatbuffers/duc/datum-target-type.d.ts +0 -6
- package/dist/flatbuffers/duc/datum-target-type.js +0 -9
- package/dist/flatbuffers/duc/decimal-separator.d.ts +0 -4
- package/dist/flatbuffers/duc/decimal-separator.js +0 -7
- package/dist/flatbuffers/duc/delta.d.ts +0 -22
- package/dist/flatbuffers/duc/delta.js +0 -75
- package/dist/flatbuffers/duc/dictionary-entry.d.ts +0 -17
- package/dist/flatbuffers/duc/dictionary-entry.js +0 -49
- package/dist/flatbuffers/duc/dimension-baseline-data.d.ts +0 -14
- package/dist/flatbuffers/duc/dimension-baseline-data.js +0 -40
- package/dist/flatbuffers/duc/dimension-bindings.d.ts +0 -17
- package/dist/flatbuffers/duc/dimension-bindings.js +0 -50
- package/dist/flatbuffers/duc/dimension-continue-data.d.ts +0 -14
- package/dist/flatbuffers/duc/dimension-continue-data.js +0 -40
- package/dist/flatbuffers/duc/dimension-definition-points.d.ts +0 -21
- package/dist/flatbuffers/duc/dimension-definition-points.js +0 -64
- package/dist/flatbuffers/duc/dimension-ext-line-style.d.ts +0 -18
- package/dist/flatbuffers/duc/dimension-ext-line-style.js +0 -57
- package/dist/flatbuffers/duc/dimension-fit-rule.d.ts +0 -6
- package/dist/flatbuffers/duc/dimension-fit-rule.js +0 -9
- package/dist/flatbuffers/duc/dimension-fit-style.d.ts +0 -19
- package/dist/flatbuffers/duc/dimension-fit-style.js +0 -58
- package/dist/flatbuffers/duc/dimension-line-style.d.ts +0 -16
- package/dist/flatbuffers/duc/dimension-line-style.js +0 -49
- package/dist/flatbuffers/duc/dimension-symbol-style.d.ts +0 -22
- package/dist/flatbuffers/duc/dimension-symbol-style.js +0 -72
- package/dist/flatbuffers/duc/dimension-text-placement.d.ts +0 -5
- package/dist/flatbuffers/duc/dimension-text-placement.js +0 -8
- package/dist/flatbuffers/duc/dimension-tolerance-style.d.ts +0 -24
- package/dist/flatbuffers/duc/dimension-tolerance-style.js +0 -71
- package/dist/flatbuffers/duc/dimension-type.d.ts +0 -15
- package/dist/flatbuffers/duc/dimension-type.js +0 -18
- package/dist/flatbuffers/duc/dimension-units-format.d.ts +0 -7
- package/dist/flatbuffers/duc/dimension-units-format.js +0 -10
- package/dist/flatbuffers/duc/dimension-validation-rules.d.ts +0 -25
- package/dist/flatbuffers/duc/dimension-validation-rules.js +0 -74
- package/dist/flatbuffers/duc/document-grid-align-items.d.ts +0 -5
- package/dist/flatbuffers/duc/document-grid-align-items.js +0 -8
- package/dist/flatbuffers/duc/document-grid-config.d.ts +0 -22
- package/dist/flatbuffers/duc/document-grid-config.js +0 -73
- package/dist/flatbuffers/duc/duc-arrow-element.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-arrow-element.js +0 -49
- package/dist/flatbuffers/duc/duc-block-attribute-definition-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-block-attribute-definition-entry.js +0 -44
- package/dist/flatbuffers/duc/duc-block-attribute-definition.d.ts +0 -22
- package/dist/flatbuffers/duc/duc-block-attribute-definition.js +0 -64
- package/dist/flatbuffers/duc/duc-block-collection-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-block-collection-entry.js +0 -48
- package/dist/flatbuffers/duc/duc-block-collection.d.ts +0 -31
- package/dist/flatbuffers/duc/duc-block-collection.js +0 -97
- package/dist/flatbuffers/duc/duc-block-duplication-array.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-block-duplication-array.js +0 -64
- package/dist/flatbuffers/duc/duc-block-instance-element.d.ts +0 -10
- package/dist/flatbuffers/duc/duc-block-instance-element.js +0 -28
- package/dist/flatbuffers/duc/duc-block-instance.d.ts +0 -32
- package/dist/flatbuffers/duc/duc-block-instance.js +0 -100
- package/dist/flatbuffers/duc/duc-block-metadata.d.ts +0 -26
- package/dist/flatbuffers/duc/duc-block-metadata.js +0 -90
- package/dist/flatbuffers/duc/duc-block.d.ts +0 -36
- package/dist/flatbuffers/duc/duc-block.js +0 -112
- package/dist/flatbuffers/duc/duc-common-style.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-common-style.js +0 -44
- package/dist/flatbuffers/duc/duc-dimension-element.d.ts +0 -45
- package/dist/flatbuffers/duc/duc-dimension-element.js +0 -120
- package/dist/flatbuffers/duc/duc-dimension-style.d.ts +0 -28
- package/dist/flatbuffers/duc/duc-dimension-style.js +0 -76
- package/dist/flatbuffers/duc/duc-doc-element.d.ts +0 -39
- package/dist/flatbuffers/duc/duc-doc-element.js +0 -110
- package/dist/flatbuffers/duc/duc-doc-style.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-doc-style.js +0 -52
- package/dist/flatbuffers/duc/duc-element-base.d.ts +0 -100
- package/dist/flatbuffers/duc/duc-element-base.js +0 -315
- package/dist/flatbuffers/duc/duc-element-styles-base.d.ts +0 -30
- package/dist/flatbuffers/duc/duc-element-styles-base.js +0 -103
- package/dist/flatbuffers/duc/duc-ellipse-element.d.ts +0 -22
- package/dist/flatbuffers/duc/duc-ellipse-element.js +0 -73
- package/dist/flatbuffers/duc/duc-embeddable-element.d.ts +0 -14
- package/dist/flatbuffers/duc/duc-embeddable-element.js +0 -41
- package/dist/flatbuffers/duc/duc-external-file-data.d.ts +0 -27
- package/dist/flatbuffers/duc/duc-external-file-data.js +0 -92
- package/dist/flatbuffers/duc/duc-external-file-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-external-file-entry.js +0 -44
- package/dist/flatbuffers/duc/duc-feature-control-frame-element.d.ts +0 -31
- package/dist/flatbuffers/duc/duc-feature-control-frame-element.js +0 -89
- package/dist/flatbuffers/duc/duc-feature-control-frame-style.d.ts +0 -22
- package/dist/flatbuffers/duc/duc-feature-control-frame-style.js +0 -60
- package/dist/flatbuffers/duc/duc-frame-element.d.ts +0 -14
- package/dist/flatbuffers/duc/duc-frame-element.js +0 -41
- package/dist/flatbuffers/duc/duc-free-draw-element.d.ts +0 -52
- package/dist/flatbuffers/duc/duc-free-draw-element.js +0 -154
- package/dist/flatbuffers/duc/duc-free-draw-ends.d.ts +0 -18
- package/dist/flatbuffers/duc/duc-free-draw-ends.js +0 -56
- package/dist/flatbuffers/duc/duc-global-state.d.ts +0 -37
- package/dist/flatbuffers/duc/duc-global-state.js +0 -121
- package/dist/flatbuffers/duc/duc-group.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-group.js +0 -44
- package/dist/flatbuffers/duc/duc-hatch-style.d.ts +0 -28
- package/dist/flatbuffers/duc/duc-hatch-style.js +0 -79
- package/dist/flatbuffers/duc/duc-head.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-head.js +0 -57
- package/dist/flatbuffers/duc/duc-image-element.d.ts +0 -35
- package/dist/flatbuffers/duc/duc-image-element.js +0 -91
- package/dist/flatbuffers/duc/duc-image-filter.d.ts +0 -15
- package/dist/flatbuffers/duc/duc-image-filter.js +0 -48
- package/dist/flatbuffers/duc/duc-layer-overrides.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-layer-overrides.js +0 -44
- package/dist/flatbuffers/duc/duc-layer.d.ts +0 -21
- package/dist/flatbuffers/duc/duc-layer.js +0 -59
- package/dist/flatbuffers/duc/duc-leader-element.d.ts +0 -22
- package/dist/flatbuffers/duc/duc-leader-element.js +0 -60
- package/dist/flatbuffers/duc/duc-leader-style.d.ts +0 -27
- package/dist/flatbuffers/duc/duc-leader-style.js +0 -79
- package/dist/flatbuffers/duc/duc-line-reference.d.ts +0 -15
- package/dist/flatbuffers/duc/duc-line-reference.js +0 -43
- package/dist/flatbuffers/duc/duc-line.d.ts +0 -15
- package/dist/flatbuffers/duc/duc-line.js +0 -43
- package/dist/flatbuffers/duc/duc-linear-element-base.d.ts +0 -38
- package/dist/flatbuffers/duc/duc-linear-element-base.js +0 -124
- package/dist/flatbuffers/duc/duc-linear-element.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-linear-element.js +0 -49
- package/dist/flatbuffers/duc/duc-local-state.d.ts +0 -68
- package/dist/flatbuffers/duc/duc-local-state.js +0 -206
- package/dist/flatbuffers/duc/duc-mermaid-element.d.ts +0 -23
- package/dist/flatbuffers/duc/duc-mermaid-element.js +0 -65
- package/dist/flatbuffers/duc/duc-model-element.d.ts +0 -26
- package/dist/flatbuffers/duc/duc-model-element.js +0 -79
- package/dist/flatbuffers/duc/duc-parametric-element.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-parametric-element.js +0 -44
- package/dist/flatbuffers/duc/duc-path.d.ts +0 -26
- package/dist/flatbuffers/duc/duc-path.js +0 -69
- package/dist/flatbuffers/duc/duc-pdf-element.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-pdf-element.js +0 -51
- package/dist/flatbuffers/duc/duc-plot-element.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-plot-element.js +0 -52
- package/dist/flatbuffers/duc/duc-plot-style.d.ts +0 -11
- package/dist/flatbuffers/duc/duc-plot-style.js +0 -32
- package/dist/flatbuffers/duc/duc-point-binding.d.ts +0 -26
- package/dist/flatbuffers/duc/duc-point-binding.js +0 -73
- package/dist/flatbuffers/duc/duc-point.d.ts +0 -18
- package/dist/flatbuffers/duc/duc-point.js +0 -57
- package/dist/flatbuffers/duc/duc-polygon-element.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-polygon-element.js +0 -49
- package/dist/flatbuffers/duc/duc-rectangle-element.d.ts +0 -14
- package/dist/flatbuffers/duc/duc-rectangle-element.js +0 -41
- package/dist/flatbuffers/duc/duc-region.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-region.js +0 -51
- package/dist/flatbuffers/duc/duc-stack-base.d.ts +0 -27
- package/dist/flatbuffers/duc/duc-stack-base.js +0 -78
- package/dist/flatbuffers/duc/duc-stack-element-base.d.ts +0 -23
- package/dist/flatbuffers/duc/duc-stack-element-base.js +0 -65
- package/dist/flatbuffers/duc/duc-stack-like-styles.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-stack-like-styles.js +0 -48
- package/dist/flatbuffers/duc/duc-table-auto-size.d.ts +0 -15
- package/dist/flatbuffers/duc/duc-table-auto-size.js +0 -48
- package/dist/flatbuffers/duc/duc-table-cell-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-table-cell-entry.js +0 -44
- package/dist/flatbuffers/duc/duc-table-cell-span.d.ts +0 -15
- package/dist/flatbuffers/duc/duc-table-cell-span.js +0 -48
- package/dist/flatbuffers/duc/duc-table-cell-style.d.ts +0 -22
- package/dist/flatbuffers/duc/duc-table-cell-style.js +0 -59
- package/dist/flatbuffers/duc/duc-table-cell.d.ts +0 -27
- package/dist/flatbuffers/duc/duc-table-cell.js +0 -72
- package/dist/flatbuffers/duc/duc-table-column-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-table-column-entry.js +0 -44
- package/dist/flatbuffers/duc/duc-table-column.d.ts +0 -18
- package/dist/flatbuffers/duc/duc-table-column.js +0 -51
- package/dist/flatbuffers/duc/duc-table-element.d.ts +0 -51
- package/dist/flatbuffers/duc/duc-table-element.js +0 -167
- package/dist/flatbuffers/duc/duc-table-row-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-table-row-entry.js +0 -44
- package/dist/flatbuffers/duc/duc-table-row.d.ts +0 -18
- package/dist/flatbuffers/duc/duc-table-row.js +0 -51
- package/dist/flatbuffers/duc/duc-table-style.d.ts +0 -20
- package/dist/flatbuffers/duc/duc-table-style.js +0 -57
- package/dist/flatbuffers/duc/duc-text-dynamic-dictionary-source.d.ts +0 -14
- package/dist/flatbuffers/duc/duc-text-dynamic-dictionary-source.js +0 -40
- package/dist/flatbuffers/duc/duc-text-dynamic-element-source.d.ts +0 -17
- package/dist/flatbuffers/duc/duc-text-dynamic-element-source.js +0 -49
- package/dist/flatbuffers/duc/duc-text-dynamic-part.d.ts +0 -22
- package/dist/flatbuffers/duc/duc-text-dynamic-part.js +0 -58
- package/dist/flatbuffers/duc/duc-text-dynamic-source-data.d.ts +0 -9
- package/dist/flatbuffers/duc/duc-text-dynamic-source-data.js +0 -26
- package/dist/flatbuffers/duc/duc-text-dynamic-source.d.ts +0 -19
- package/dist/flatbuffers/duc/duc-text-dynamic-source.js +0 -58
- package/dist/flatbuffers/duc/duc-text-element.d.ts +0 -33
- package/dist/flatbuffers/duc/duc-text-element.js +0 -94
- package/dist/flatbuffers/duc/duc-text-style.d.ts +0 -41
- package/dist/flatbuffers/duc/duc-text-style.js +0 -120
- package/dist/flatbuffers/duc/duc-ucs.d.ts +0 -16
- package/dist/flatbuffers/duc/duc-ucs.js +0 -49
- package/dist/flatbuffers/duc/duc-view.d.ts +0 -24
- package/dist/flatbuffers/duc/duc-view.js +0 -71
- package/dist/flatbuffers/duc/duc-viewport-element.d.ts +0 -36
- package/dist/flatbuffers/duc/duc-viewport-element.js +0 -102
- package/dist/flatbuffers/duc/duc-viewport-style.d.ts +0 -13
- package/dist/flatbuffers/duc/duc-viewport-style.js +0 -40
- package/dist/flatbuffers/duc/duc-xray-element.d.ts +0 -23
- package/dist/flatbuffers/duc/duc-xray-element.js +0 -66
- package/dist/flatbuffers/duc/duc-xray-style.d.ts +0 -14
- package/dist/flatbuffers/duc/duc-xray-style.js +0 -40
- package/dist/flatbuffers/duc/dynamic-snap-settings.d.ts +0 -17
- package/dist/flatbuffers/duc/dynamic-snap-settings.js +0 -56
- package/dist/flatbuffers/duc/element-background.d.ts +0 -14
- package/dist/flatbuffers/duc/element-background.js +0 -41
- package/dist/flatbuffers/duc/element-content-base.d.ts +0 -29
- package/dist/flatbuffers/duc/element-content-base.js +0 -80
- package/dist/flatbuffers/duc/element-content-preference.d.ts +0 -8
- package/dist/flatbuffers/duc/element-content-preference.js +0 -11
- package/dist/flatbuffers/duc/element-stroke.d.ts +0 -24
- package/dist/flatbuffers/duc/element-stroke.js +0 -66
- package/dist/flatbuffers/duc/element-wrapper.d.ts +0 -16
- package/dist/flatbuffers/duc/element-wrapper.js +0 -49
- package/dist/flatbuffers/duc/element.d.ts +0 -51
- package/dist/flatbuffers/duc/element.js +0 -110
- package/dist/flatbuffers/duc/exported-data-state.d.ts +0 -102
- package/dist/flatbuffers/duc/exported-data-state.js +0 -341
- package/dist/flatbuffers/duc/fcfbetween-modifier.d.ts +0 -17
- package/dist/flatbuffers/duc/fcfbetween-modifier.js +0 -48
- package/dist/flatbuffers/duc/fcfdatum-definition.d.ts +0 -16
- package/dist/flatbuffers/duc/fcfdatum-definition.js +0 -43
- package/dist/flatbuffers/duc/fcfdatum-style.d.ts +0 -14
- package/dist/flatbuffers/duc/fcfdatum-style.js +0 -41
- package/dist/flatbuffers/duc/fcfframe-modifiers.d.ts +0 -22
- package/dist/flatbuffers/duc/fcfframe-modifiers.js +0 -65
- package/dist/flatbuffers/duc/fcflayout-style.d.ts +0 -17
- package/dist/flatbuffers/duc/fcflayout-style.js +0 -56
- package/dist/flatbuffers/duc/fcfprojected-zone-modifier.d.ts +0 -13
- package/dist/flatbuffers/duc/fcfprojected-zone-modifier.js +0 -40
- package/dist/flatbuffers/duc/fcfsegment-row.d.ts +0 -17
- package/dist/flatbuffers/duc/fcfsegment-row.js +0 -55
- package/dist/flatbuffers/duc/fcfsymbol-style.d.ts +0 -13
- package/dist/flatbuffers/duc/fcfsymbol-style.js +0 -40
- package/dist/flatbuffers/duc/feature-control-frame-segment.d.ts +0 -22
- package/dist/flatbuffers/duc/feature-control-frame-segment.js +0 -65
- package/dist/flatbuffers/duc/feature-modifier.d.ts +0 -18
- package/dist/flatbuffers/duc/feature-modifier.js +0 -21
- package/dist/flatbuffers/duc/gdt-symbol.d.ts +0 -22
- package/dist/flatbuffers/duc/gdt-symbol.js +0 -25
- package/dist/flatbuffers/duc/geometric-point.d.ts +0 -10
- package/dist/flatbuffers/duc/geometric-point.js +0 -27
- package/dist/flatbuffers/duc/grid-display-type.d.ts +0 -6
- package/dist/flatbuffers/duc/grid-display-type.js +0 -9
- package/dist/flatbuffers/duc/grid-settings.d.ts +0 -54
- package/dist/flatbuffers/duc/grid-settings.js +0 -165
- package/dist/flatbuffers/duc/grid-style.d.ts +0 -26
- package/dist/flatbuffers/duc/grid-style.js +0 -74
- package/dist/flatbuffers/duc/grid-type.d.ts +0 -7
- package/dist/flatbuffers/duc/grid-type.js +0 -10
- package/dist/flatbuffers/duc/handle-type.d.ts +0 -4
- package/dist/flatbuffers/duc/handle-type.js +0 -7
- package/dist/flatbuffers/duc/hatch-pattern-line.d.ts +0 -35
- package/dist/flatbuffers/duc/hatch-pattern-line.js +0 -93
- package/dist/flatbuffers/duc/hatch-style.d.ts +0 -5
- package/dist/flatbuffers/duc/hatch-style.js +0 -8
- package/dist/flatbuffers/duc/identified-common-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-common-style.js +0 -44
- package/dist/flatbuffers/duc/identified-dimension-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-dimension-style.js +0 -44
- package/dist/flatbuffers/duc/identified-doc-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-doc-style.js +0 -44
- package/dist/flatbuffers/duc/identified-fcfstyle.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-fcfstyle.js +0 -44
- package/dist/flatbuffers/duc/identified-grid-settings.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-grid-settings.js +0 -44
- package/dist/flatbuffers/duc/identified-hatch-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-hatch-style.js +0 -44
- package/dist/flatbuffers/duc/identified-leader-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-leader-style.js +0 -44
- package/dist/flatbuffers/duc/identified-snap-settings.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-snap-settings.js +0 -44
- package/dist/flatbuffers/duc/identified-stack-like-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-stack-like-style.js +0 -44
- package/dist/flatbuffers/duc/identified-table-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-table-style.js +0 -44
- package/dist/flatbuffers/duc/identified-text-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-text-style.js +0 -44
- package/dist/flatbuffers/duc/identified-ucs.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-ucs.js +0 -44
- package/dist/flatbuffers/duc/identified-view.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-view.js +0 -44
- package/dist/flatbuffers/duc/identified-viewport-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-viewport-style.js +0 -44
- package/dist/flatbuffers/duc/identified-xray-style.d.ts +0 -16
- package/dist/flatbuffers/duc/identified-xray-style.js +0 -44
- package/dist/flatbuffers/duc/identifier.d.ts +0 -20
- package/dist/flatbuffers/duc/identifier.js +0 -57
- package/dist/flatbuffers/duc/image-crop.d.ts +0 -23
- package/dist/flatbuffers/duc/image-crop.js +0 -80
- package/dist/flatbuffers/duc/image-status.d.ts +0 -5
- package/dist/flatbuffers/duc/image-status.js +0 -8
- package/dist/flatbuffers/duc/isometric-grid-settings.d.ts +0 -15
- package/dist/flatbuffers/duc/isometric-grid-settings.js +0 -48
- package/dist/flatbuffers/duc/jsonpatch-operation.d.ts +0 -23
- package/dist/flatbuffers/duc/jsonpatch-operation.js +0 -64
- package/dist/flatbuffers/duc/layer-snap-filters.d.ts +0 -23
- package/dist/flatbuffers/duc/layer-snap-filters.js +0 -76
- package/dist/flatbuffers/duc/layer-validation-rules.d.ts +0 -17
- package/dist/flatbuffers/duc/layer-validation-rules.js +0 -54
- package/dist/flatbuffers/duc/leader-block-content.d.ts +0 -25
- package/dist/flatbuffers/duc/leader-block-content.js +0 -85
- package/dist/flatbuffers/duc/leader-content-data.d.ts +0 -9
- package/dist/flatbuffers/duc/leader-content-data.js +0 -26
- package/dist/flatbuffers/duc/leader-content-type.d.ts +0 -4
- package/dist/flatbuffers/duc/leader-content-type.js +0 -7
- package/dist/flatbuffers/duc/leader-content.d.ts +0 -19
- package/dist/flatbuffers/duc/leader-content.js +0 -58
- package/dist/flatbuffers/duc/leader-text-block-content.d.ts +0 -14
- package/dist/flatbuffers/duc/leader-text-block-content.js +0 -40
- package/dist/flatbuffers/duc/line-head.d.ts +0 -17
- package/dist/flatbuffers/duc/line-head.js +0 -20
- package/dist/flatbuffers/duc/line-spacing-type.d.ts +0 -5
- package/dist/flatbuffers/duc/line-spacing-type.js +0 -8
- package/dist/flatbuffers/duc/line-spacing.d.ts +0 -16
- package/dist/flatbuffers/duc/line-spacing.js +0 -49
- package/dist/flatbuffers/duc/linear-unit-system.d.ts +0 -24
- package/dist/flatbuffers/duc/linear-unit-system.js +0 -75
- package/dist/flatbuffers/duc/margins.d.ts +0 -19
- package/dist/flatbuffers/duc/margins.js +0 -64
- package/dist/flatbuffers/duc/mark-ellipse-center.d.ts +0 -4
- package/dist/flatbuffers/duc/mark-ellipse-center.js +0 -7
- package/dist/flatbuffers/duc/material-condition.d.ts +0 -5
- package/dist/flatbuffers/duc/material-condition.js +0 -8
- package/dist/flatbuffers/duc/object-snap-mode.d.ts +0 -22
- package/dist/flatbuffers/duc/object-snap-mode.js +0 -25
- package/dist/flatbuffers/duc/paragraph-formatting.d.ts +0 -33
- package/dist/flatbuffers/duc/paragraph-formatting.js +0 -106
- package/dist/flatbuffers/duc/parametric-source-type.d.ts +0 -4
- package/dist/flatbuffers/duc/parametric-source-type.js +0 -7
- package/dist/flatbuffers/duc/parametric-source.d.ts +0 -20
- package/dist/flatbuffers/duc/parametric-source.js +0 -57
- package/dist/flatbuffers/duc/plot-layout.d.ts +0 -14
- package/dist/flatbuffers/duc/plot-layout.js +0 -41
- package/dist/flatbuffers/duc/point-binding-point.d.ts +0 -15
- package/dist/flatbuffers/duc/point-binding-point.js +0 -48
- package/dist/flatbuffers/duc/polar-grid-settings.d.ts +0 -17
- package/dist/flatbuffers/duc/polar-grid-settings.js +0 -56
- package/dist/flatbuffers/duc/polar-tracking-settings.d.ts +0 -29
- package/dist/flatbuffers/duc/polar-tracking-settings.js +0 -90
- package/dist/flatbuffers/duc/primary-units.d.ts +0 -16
- package/dist/flatbuffers/duc/primary-units.js +0 -44
- package/dist/flatbuffers/duc/pruning-level.d.ts +0 -5
- package/dist/flatbuffers/duc/pruning-level.js +0 -8
- package/dist/flatbuffers/duc/snap-marker-settings.d.ts +0 -23
- package/dist/flatbuffers/duc/snap-marker-settings.js +0 -79
- package/dist/flatbuffers/duc/snap-marker-shape.d.ts +0 -6
- package/dist/flatbuffers/duc/snap-marker-shape.js +0 -9
- package/dist/flatbuffers/duc/snap-marker-style-entry.d.ts +0 -16
- package/dist/flatbuffers/duc/snap-marker-style-entry.js +0 -43
- package/dist/flatbuffers/duc/snap-marker-style.d.ts +0 -17
- package/dist/flatbuffers/duc/snap-marker-style.js +0 -49
- package/dist/flatbuffers/duc/snap-mode.d.ts +0 -4
- package/dist/flatbuffers/duc/snap-mode.js +0 -7
- package/dist/flatbuffers/duc/snap-override-behavior.d.ts +0 -5
- package/dist/flatbuffers/duc/snap-override-behavior.js +0 -8
- package/dist/flatbuffers/duc/snap-override.d.ts +0 -17
- package/dist/flatbuffers/duc/snap-override.js +0 -49
- package/dist/flatbuffers/duc/snap-settings.d.ts +0 -75
- package/dist/flatbuffers/duc/snap-settings.js +0 -245
- package/dist/flatbuffers/duc/stack-format-properties.d.ts +0 -18
- package/dist/flatbuffers/duc/stack-format-properties.js +0 -57
- package/dist/flatbuffers/duc/stack-format.d.ts +0 -21
- package/dist/flatbuffers/duc/stack-format.js +0 -64
- package/dist/flatbuffers/duc/stacked-text-align.d.ts +0 -5
- package/dist/flatbuffers/duc/stacked-text-align.js +0 -8
- package/dist/flatbuffers/duc/standard-overrides.d.ts +0 -63
- package/dist/flatbuffers/duc/standard-overrides.js +0 -162
- package/dist/flatbuffers/duc/standard-styles.d.ts +0 -77
- package/dist/flatbuffers/duc/standard-styles.js +0 -285
- package/dist/flatbuffers/duc/standard-units.d.ts +0 -16
- package/dist/flatbuffers/duc/standard-units.js +0 -44
- package/dist/flatbuffers/duc/standard-validation.d.ts +0 -16
- package/dist/flatbuffers/duc/standard-validation.js +0 -44
- package/dist/flatbuffers/duc/standard-view-settings.d.ts +0 -35
- package/dist/flatbuffers/duc/standard-view-settings.js +0 -124
- package/dist/flatbuffers/duc/standard.d.ts +0 -33
- package/dist/flatbuffers/duc/standard.js +0 -90
- package/dist/flatbuffers/duc/string-value-entry.d.ts +0 -17
- package/dist/flatbuffers/duc/string-value-entry.js +0 -49
- package/dist/flatbuffers/duc/stroke-cap.d.ts +0 -5
- package/dist/flatbuffers/duc/stroke-cap.js +0 -8
- package/dist/flatbuffers/duc/stroke-join.d.ts +0 -5
- package/dist/flatbuffers/duc/stroke-join.js +0 -8
- package/dist/flatbuffers/duc/stroke-placement.d.ts +0 -5
- package/dist/flatbuffers/duc/stroke-placement.js +0 -8
- package/dist/flatbuffers/duc/stroke-preference.d.ts +0 -6
- package/dist/flatbuffers/duc/stroke-preference.js +0 -9
- package/dist/flatbuffers/duc/stroke-side-preference.d.ts +0 -8
- package/dist/flatbuffers/duc/stroke-side-preference.js +0 -11
- package/dist/flatbuffers/duc/stroke-sides.d.ts +0 -24
- package/dist/flatbuffers/duc/stroke-sides.js +0 -67
- package/dist/flatbuffers/duc/stroke-style.d.ts +0 -37
- package/dist/flatbuffers/duc/stroke-style.js +0 -111
- package/dist/flatbuffers/duc/stroke-width.d.ts +0 -5
- package/dist/flatbuffers/duc/stroke-width.js +0 -8
- package/dist/flatbuffers/duc/table-cell-alignment.d.ts +0 -11
- package/dist/flatbuffers/duc/table-cell-alignment.js +0 -14
- package/dist/flatbuffers/duc/table-flow-direction.d.ts +0 -4
- package/dist/flatbuffers/duc/table-flow-direction.js +0 -7
- package/dist/flatbuffers/duc/text-align.d.ts +0 -5
- package/dist/flatbuffers/duc/text-align.js +0 -8
- package/dist/flatbuffers/duc/text-column.d.ts +0 -15
- package/dist/flatbuffers/duc/text-column.js +0 -48
- package/dist/flatbuffers/duc/text-field-source-property.d.ts +0 -13
- package/dist/flatbuffers/duc/text-field-source-property.js +0 -16
- package/dist/flatbuffers/duc/text-field-source-type.d.ts +0 -4
- package/dist/flatbuffers/duc/text-field-source-type.js +0 -7
- package/dist/flatbuffers/duc/text-flow-direction.d.ts +0 -6
- package/dist/flatbuffers/duc/text-flow-direction.js +0 -9
- package/dist/flatbuffers/duc/tiling-properties.d.ts +0 -21
- package/dist/flatbuffers/duc/tiling-properties.js +0 -75
- package/dist/flatbuffers/duc/tolerance-clause.d.ts +0 -27
- package/dist/flatbuffers/duc/tolerance-clause.js +0 -84
- package/dist/flatbuffers/duc/tolerance-display.d.ts +0 -7
- package/dist/flatbuffers/duc/tolerance-display.js +0 -10
- package/dist/flatbuffers/duc/tolerance-type.d.ts +0 -5
- package/dist/flatbuffers/duc/tolerance-type.js +0 -8
- package/dist/flatbuffers/duc/tolerance-zone-type.d.ts +0 -7
- package/dist/flatbuffers/duc/tolerance-zone-type.js +0 -10
- package/dist/flatbuffers/duc/tracking-line-style.d.ts +0 -26
- package/dist/flatbuffers/duc/tracking-line-style.js +0 -74
- package/dist/flatbuffers/duc/unit-precision.d.ts +0 -19
- package/dist/flatbuffers/duc/unit-precision.js +0 -64
- package/dist/flatbuffers/duc/unit-system-base.d.ts +0 -20
- package/dist/flatbuffers/duc/unit-system-base.js +0 -65
- package/dist/flatbuffers/duc/unit-system.d.ts +0 -4
- package/dist/flatbuffers/duc/unit-system.js +0 -7
- package/dist/flatbuffers/duc/version-base.d.ts +0 -27
- package/dist/flatbuffers/duc/version-base.js +0 -80
- package/dist/flatbuffers/duc/version-graph-metadata.d.ts +0 -15
- package/dist/flatbuffers/duc/version-graph-metadata.js +0 -48
- package/dist/flatbuffers/duc/version-graph.d.ts +0 -31
- package/dist/flatbuffers/duc/version-graph.js +0 -94
- package/dist/flatbuffers/duc/vertical-align.d.ts +0 -5
- package/dist/flatbuffers/duc/vertical-align.js +0 -8
- package/dist/flatbuffers/duc/viewport-shade-plot.d.ts +0 -6
- package/dist/flatbuffers/duc/viewport-shade-plot.js +0 -9
- package/dist/flatbuffers/duc/youtube-states.d.ts +0 -8
- package/dist/flatbuffers/duc/youtube-states.js +0 -11
- package/dist/flatbuffers/duc.d.ts +0 -234
- package/dist/flatbuffers/duc.js +0 -236
- package/dist/restore/restoreStandards.d.ts +0 -8
- package/dist/restore/restoreStandards.js +0 -224
- package/dist/technical/standards.d.ts +0 -124
- package/dist/technical/standards.js +0 -10
- package/dist/utils/elements/viewportElement.d.ts +0 -6
- package/dist/utils/elements/viewportElement.js +0 -9
- package/dist/utils/state/grid.d.ts +0 -7
- package/dist/utils/state/grid.js +0 -25
package/dist/utils/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ELEMENT_CONTENT_PREFERENCE,
|
|
1
|
+
import { ELEMENT_CONTENT_PREFERENCE, STROKE_JOIN, STROKE_PLACEMENT, STROKE_PREFERENCE, TEXT_ALIGN, VERTICAL_ALIGN } from "../enums";
|
|
2
2
|
import { MAX_ZOOM, MIN_ZOOM, NEUTRAL_SCOPE } from "../technical/scopes";
|
|
3
3
|
export const COLOR_PALETTE = {
|
|
4
4
|
transparent: "transparent",
|
|
@@ -87,24 +87,37 @@ export const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
|
87
87
|
// Fixed radius for the ADAPTIVE_RADIUS algorithm. In pixels.
|
|
88
88
|
export const DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* Font family identifiers. Values are the actual CSS font-family names
|
|
91
|
+
* so they can be passed directly to Google Fonts / Canvas2D.
|
|
91
92
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* - https://drafts.csswg.org/css-fonts-4/#font-family-prop
|
|
95
|
-
* - https://learn.microsoft.com/en-us/typography/opentype/spec/ibmfc
|
|
93
|
+
* For backward compatibility with old files that stored numeric IDs,
|
|
94
|
+
* use `LEGACY_FONT_ID_TO_NAME` to resolve them.
|
|
96
95
|
*/
|
|
97
96
|
export const FONT_FAMILY = {
|
|
98
|
-
Virgil:
|
|
99
|
-
Helvetica:
|
|
100
|
-
Cascadia:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
97
|
+
Virgil: "Virgil",
|
|
98
|
+
Helvetica: "Helvetica",
|
|
99
|
+
Cascadia: "Cascadia",
|
|
100
|
+
Excalifont: "Excalifont",
|
|
101
|
+
Nunito: "Nunito",
|
|
102
|
+
"Lilita One": "Lilita One",
|
|
103
|
+
"Comic Shanns": "Comic Shanns",
|
|
104
|
+
"Liberation Sans": "Liberation Sans",
|
|
105
|
+
"Roboto Mono": "Roboto Mono",
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Reverse mapping from legacy numeric font IDs to font family names.
|
|
109
|
+
* Used when loading old .duc files that encoded fontFamily as a number.
|
|
110
|
+
*/
|
|
111
|
+
export const LEGACY_FONT_ID_TO_NAME = {
|
|
112
|
+
1: "Virgil",
|
|
113
|
+
2: "Helvetica",
|
|
114
|
+
3: "Cascadia",
|
|
115
|
+
5: "Excalifont",
|
|
116
|
+
6: "Nunito",
|
|
117
|
+
7: "Lilita One",
|
|
118
|
+
8: "Comic Shanns",
|
|
119
|
+
9: "Liberation Sans",
|
|
120
|
+
10: "Roboto Mono",
|
|
108
121
|
};
|
|
109
122
|
export const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
|
|
110
123
|
export const DEFAULT_VERSION = "{version}";
|
|
@@ -230,7 +243,6 @@ export const DEFAULT_ELEMENT_PROPS = {
|
|
|
230
243
|
},
|
|
231
244
|
isVisible: true,
|
|
232
245
|
isPlot: true,
|
|
233
|
-
isAnnotative: false,
|
|
234
246
|
roundness: { value: 0, scoped: 0 },
|
|
235
247
|
opacity: 1,
|
|
236
248
|
locked: false,
|
|
@@ -263,201 +275,6 @@ export const DEFAULT_ELLIPSE_ELEMENT = {
|
|
|
263
275
|
endAngle: Math.PI * 2,
|
|
264
276
|
showAuxCrosshair: false,
|
|
265
277
|
};
|
|
266
|
-
/**
|
|
267
|
-
* Grid display types
|
|
268
|
-
*/
|
|
269
|
-
export const GRID_DISPLAY_TYPE = {
|
|
270
|
-
LINES: 10,
|
|
271
|
-
DOTS: 11,
|
|
272
|
-
CROSSES: 12,
|
|
273
|
-
ADAPTIVE: 13, // Changes based on zoom level
|
|
274
|
-
};
|
|
275
|
-
/**
|
|
276
|
-
* Grid coordinate system types
|
|
277
|
-
*/
|
|
278
|
-
export const GRID_TYPE = {
|
|
279
|
-
RECTANGULAR: 10,
|
|
280
|
-
ISOMETRIC: 11,
|
|
281
|
-
POLAR: 12,
|
|
282
|
-
TRIANGULAR: 13,
|
|
283
|
-
CUSTOM: 14,
|
|
284
|
-
};
|
|
285
|
-
/**
|
|
286
|
-
* Default grid configurations
|
|
287
|
-
*/
|
|
288
|
-
export const DEFAULT_GRID_SETTINGS = {
|
|
289
|
-
readonly: true,
|
|
290
|
-
isAdaptive: true,
|
|
291
|
-
type: GRID_TYPE.RECTANGULAR,
|
|
292
|
-
displayType: GRID_DISPLAY_TYPE.LINES,
|
|
293
|
-
xSpacing: { value: 10, scoped: 10 },
|
|
294
|
-
ySpacing: { value: 10, scoped: 10 },
|
|
295
|
-
subdivisions: 5,
|
|
296
|
-
origin: { x: 0, y: 0 },
|
|
297
|
-
rotation: 0,
|
|
298
|
-
followUCS: true,
|
|
299
|
-
majorStyle: {
|
|
300
|
-
color: "#CCCCCC",
|
|
301
|
-
opacity: 0.5,
|
|
302
|
-
dashPattern: [1, 1],
|
|
303
|
-
},
|
|
304
|
-
minorStyle: {
|
|
305
|
-
color: "#EEEEEE",
|
|
306
|
-
opacity: 0.3,
|
|
307
|
-
dashPattern: [0.5, 0.5],
|
|
308
|
-
},
|
|
309
|
-
showMinor: true,
|
|
310
|
-
minZoom: 0.1,
|
|
311
|
-
maxZoom: 100,
|
|
312
|
-
autoHide: true,
|
|
313
|
-
enableSnapping: true,
|
|
314
|
-
};
|
|
315
|
-
/**
|
|
316
|
-
* Predefined grid configurations
|
|
317
|
-
*/
|
|
318
|
-
export const PREDEFINED_GRIDS = {
|
|
319
|
-
ARCHITECTURAL_IMPERIAL: "arch-imperial",
|
|
320
|
-
ARCHITECTURAL_METRIC: "arch-metric",
|
|
321
|
-
ENGINEERING_IMPERIAL: "eng-imperial",
|
|
322
|
-
ENGINEERING_METRIC: "eng-metric",
|
|
323
|
-
ISOMETRIC_30: "iso-30",
|
|
324
|
-
POLAR_DEGREES: "polar-deg",
|
|
325
|
-
FINE_DETAIL: "fine-detail",
|
|
326
|
-
};
|
|
327
|
-
/**
|
|
328
|
-
* Snap behavior modes
|
|
329
|
-
*/
|
|
330
|
-
export const SNAP_MODE = {
|
|
331
|
-
RUNNING: 10,
|
|
332
|
-
SINGLE: 11,
|
|
333
|
-
};
|
|
334
|
-
/**
|
|
335
|
-
* Snap override behaviors
|
|
336
|
-
*/
|
|
337
|
-
export const SNAP_OVERRIDE_BEHAVIOR = {
|
|
338
|
-
DISABLE: 10,
|
|
339
|
-
FORCE_GRID: 11,
|
|
340
|
-
FORCE_OBJECT: 12,
|
|
341
|
-
};
|
|
342
|
-
/**
|
|
343
|
-
* Snap marker shapes
|
|
344
|
-
*/
|
|
345
|
-
export const SNAP_MARKER_SHAPE = {
|
|
346
|
-
SQUARE: 10,
|
|
347
|
-
CIRCLE: 11,
|
|
348
|
-
TRIANGLE: 12,
|
|
349
|
-
X: 13,
|
|
350
|
-
};
|
|
351
|
-
/**
|
|
352
|
-
* Default snap settings configuration
|
|
353
|
-
*/
|
|
354
|
-
export const DEFAULT_SNAP_SETTINGS = {
|
|
355
|
-
readonly: true,
|
|
356
|
-
twistAngle: 0,
|
|
357
|
-
snapTolerance: 10,
|
|
358
|
-
objectSnapAperture: 8,
|
|
359
|
-
isOrthoModeOn: false,
|
|
360
|
-
polarTracking: {
|
|
361
|
-
enabled: false,
|
|
362
|
-
angles: [
|
|
363
|
-
0,
|
|
364
|
-
Math.PI / 4,
|
|
365
|
-
Math.PI / 2,
|
|
366
|
-
3 * Math.PI / 4,
|
|
367
|
-
Math.PI,
|
|
368
|
-
5 * Math.PI / 4,
|
|
369
|
-
3 * Math.PI / 2,
|
|
370
|
-
7 * Math.PI / 4
|
|
371
|
-
],
|
|
372
|
-
trackFromLastPoint: true,
|
|
373
|
-
showPolarCoordinates: true,
|
|
374
|
-
},
|
|
375
|
-
isObjectSnapOn: true,
|
|
376
|
-
activeObjectSnapModes: [
|
|
377
|
-
OBJECT_SNAP_MODE.ENDPOINT,
|
|
378
|
-
OBJECT_SNAP_MODE.MIDPOINT,
|
|
379
|
-
OBJECT_SNAP_MODE.CENTER,
|
|
380
|
-
OBJECT_SNAP_MODE.INTERSECTION,
|
|
381
|
-
],
|
|
382
|
-
snapPriority: [
|
|
383
|
-
OBJECT_SNAP_MODE.ENDPOINT,
|
|
384
|
-
OBJECT_SNAP_MODE.INTERSECTION,
|
|
385
|
-
OBJECT_SNAP_MODE.MIDPOINT,
|
|
386
|
-
OBJECT_SNAP_MODE.CENTER,
|
|
387
|
-
OBJECT_SNAP_MODE.QUADRANT,
|
|
388
|
-
OBJECT_SNAP_MODE.TANGENT,
|
|
389
|
-
OBJECT_SNAP_MODE.PERPENDICULAR,
|
|
390
|
-
OBJECT_SNAP_MODE.NEAREST,
|
|
391
|
-
],
|
|
392
|
-
showTrackingLines: true,
|
|
393
|
-
trackingLineStyle: {
|
|
394
|
-
color: "#00FF00",
|
|
395
|
-
opacity: 0.7,
|
|
396
|
-
dashPattern: [2, 2],
|
|
397
|
-
},
|
|
398
|
-
dynamicSnap: {
|
|
399
|
-
enabledDuringDrag: true,
|
|
400
|
-
enabledDuringRotation: true,
|
|
401
|
-
enabledDuringScale: true,
|
|
402
|
-
},
|
|
403
|
-
temporaryOverrides: [
|
|
404
|
-
{ key: "Shift", behavior: SNAP_OVERRIDE_BEHAVIOR.DISABLE },
|
|
405
|
-
{ key: "F9", behavior: SNAP_OVERRIDE_BEHAVIOR.FORCE_GRID },
|
|
406
|
-
],
|
|
407
|
-
magneticStrength: 50,
|
|
408
|
-
snapMode: SNAP_MODE.RUNNING,
|
|
409
|
-
snapMarkers: {
|
|
410
|
-
enabled: true,
|
|
411
|
-
size: 8,
|
|
412
|
-
duration: 2000,
|
|
413
|
-
styles: {
|
|
414
|
-
[OBJECT_SNAP_MODE.NONE]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#FFFFFF" },
|
|
415
|
-
[OBJECT_SNAP_MODE.ENDPOINT]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#FF0000" },
|
|
416
|
-
[OBJECT_SNAP_MODE.MIDPOINT]: { shape: SNAP_MARKER_SHAPE.TRIANGLE, color: "#00FF00" },
|
|
417
|
-
[OBJECT_SNAP_MODE.INTERSECTION]: { shape: SNAP_MARKER_SHAPE.X, color: "#FF00FF" },
|
|
418
|
-
[OBJECT_SNAP_MODE.EXTENSION]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#FFA500" },
|
|
419
|
-
[OBJECT_SNAP_MODE.PERPENDICULAR]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#800080" },
|
|
420
|
-
[OBJECT_SNAP_MODE.TANGENT]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#008080" },
|
|
421
|
-
[OBJECT_SNAP_MODE.NEAREST]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#808080" },
|
|
422
|
-
[OBJECT_SNAP_MODE.NODE]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#FFB6C1" },
|
|
423
|
-
[OBJECT_SNAP_MODE.INSERT]: { shape: SNAP_MARKER_SHAPE.TRIANGLE, color: "#90EE90" },
|
|
424
|
-
[OBJECT_SNAP_MODE.PARALLEL]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#F0E68C" },
|
|
425
|
-
[OBJECT_SNAP_MODE.APPARENT]: { shape: SNAP_MARKER_SHAPE.X, color: "#DDA0DD" },
|
|
426
|
-
[OBJECT_SNAP_MODE.FROM]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#20B2AA" },
|
|
427
|
-
[OBJECT_SNAP_MODE.POINT_FILTER]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#F4A460" },
|
|
428
|
-
[OBJECT_SNAP_MODE.TEMPORARY]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#32CD32" },
|
|
429
|
-
[OBJECT_SNAP_MODE.BETWEEN_TWO_POINTS]: { shape: SNAP_MARKER_SHAPE.TRIANGLE, color: "#FF6347" },
|
|
430
|
-
[OBJECT_SNAP_MODE.POINT_ON_CURVE]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#4169E1" },
|
|
431
|
-
[OBJECT_SNAP_MODE.GEOMETRIC]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#DC143C" },
|
|
432
|
-
[OBJECT_SNAP_MODE.CENTER]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#0000FF" },
|
|
433
|
-
[OBJECT_SNAP_MODE.QUADRANT]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#FFFF00" },
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
|
-
constructionSnapEnabled: true,
|
|
437
|
-
snapToGridIntersections: false,
|
|
438
|
-
};
|
|
439
|
-
export const PAPER_SIZE = {
|
|
440
|
-
// ISO A Series
|
|
441
|
-
A0: "A0",
|
|
442
|
-
A1: "A1",
|
|
443
|
-
A2: "A2",
|
|
444
|
-
A3: "A3",
|
|
445
|
-
A4: "A4",
|
|
446
|
-
A5: "A5",
|
|
447
|
-
// ANSI Series
|
|
448
|
-
ANSI_A: "ANSI_A", // 8.5 x 11
|
|
449
|
-
ANSI_B: "ANSI_B", // 11 x 17
|
|
450
|
-
ANSI_C: "ANSI_C", // 17 x 22
|
|
451
|
-
ANSI_D: "ANSI_D", // 22 x 34
|
|
452
|
-
ANSI_E: "ANSI_E", // 34 x 44
|
|
453
|
-
// Architectural
|
|
454
|
-
ARCH_A: "ARCH_A", // 9 x 12
|
|
455
|
-
ARCH_B: "ARCH_B", // 12 x 18
|
|
456
|
-
ARCH_C: "ARCH_C", // 18 x 24
|
|
457
|
-
ARCH_D: "ARCH_D", // 24 x 36
|
|
458
|
-
ARCH_E: "ARCH_E", // 36 x 48
|
|
459
|
-
CUSTOM: "CUSTOM",
|
|
460
|
-
};
|
|
461
278
|
export const PREDEFINED_HATCH_PATTERNS = {
|
|
462
279
|
// Solid Fill
|
|
463
280
|
SOLID: "SOLID",
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { DucFreeDrawElement } from "../../types/elements";
|
|
2
2
|
export declare function getFreeDrawSvgPath(element: DucFreeDrawElement): string;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the raw outline polygon points from perfect-freehand.
|
|
5
|
+
* Each point is [x, y]. The result forms a closed polygon that
|
|
6
|
+
* represents the visual shape of the freedraw stroke.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getFreeDrawStrokePoints(element: DucFreeDrawElement): number[][];
|
|
@@ -22,16 +22,8 @@ function getSvgPathFromStroke(points) {
|
|
|
22
22
|
.join(" ")
|
|
23
23
|
.replace(TO_FIXED_PRECISION, "$1");
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (element.points.length === 0) {
|
|
28
|
-
return "";
|
|
29
|
-
}
|
|
30
|
-
const inputPoints = element.simulatePressure
|
|
31
|
-
? element.points.map(({ x, y }, i) => [x.scoped, y.scoped, element.pressures[i]])
|
|
32
|
-
: element.points.map(({ x, y }) => [x.scoped, y.scoped]);
|
|
33
|
-
// Consider changing the options for simulated pressure vs real pressure
|
|
34
|
-
const options = {
|
|
25
|
+
function buildStrokeOptions(element) {
|
|
26
|
+
return {
|
|
35
27
|
size: element.size.scoped,
|
|
36
28
|
simulatePressure: element.simulatePressure,
|
|
37
29
|
thinning: element.thinning,
|
|
@@ -40,7 +32,32 @@ export function getFreeDrawSvgPath(element) {
|
|
|
40
32
|
easing: element.easing,
|
|
41
33
|
start: element.start || undefined,
|
|
42
34
|
end: element.end || undefined,
|
|
43
|
-
last: !!element.lastCommittedPoint,
|
|
35
|
+
last: !!element.lastCommittedPoint,
|
|
44
36
|
};
|
|
37
|
+
}
|
|
38
|
+
function buildInputPoints(element) {
|
|
39
|
+
return element.simulatePressure
|
|
40
|
+
? element.points.map(({ x, y }, i) => [x.scoped, y.scoped, element.pressures[i]])
|
|
41
|
+
: element.points.map(({ x, y }) => [x.scoped, y.scoped]);
|
|
42
|
+
}
|
|
43
|
+
export function getFreeDrawSvgPath(element) {
|
|
44
|
+
if (element.points.length === 0) {
|
|
45
|
+
return "";
|
|
46
|
+
}
|
|
47
|
+
const inputPoints = buildInputPoints(element);
|
|
48
|
+
const options = buildStrokeOptions(element);
|
|
45
49
|
return getSvgPathFromStroke(getStroke(inputPoints, options));
|
|
46
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns the raw outline polygon points from perfect-freehand.
|
|
53
|
+
* Each point is [x, y]. The result forms a closed polygon that
|
|
54
|
+
* represents the visual shape of the freedraw stroke.
|
|
55
|
+
*/
|
|
56
|
+
export function getFreeDrawStrokePoints(element) {
|
|
57
|
+
if (element.points.length === 0) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
const inputPoints = buildInputPoints(element);
|
|
61
|
+
const options = buildStrokeOptions(element);
|
|
62
|
+
return getStroke(inputPoints, options);
|
|
63
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./frameElement";
|
|
2
2
|
export * from "./freedrawElement";
|
|
3
3
|
export * from "./linearElement";
|
|
4
|
+
export * from "./newElement";
|
|
4
5
|
export * from "./textElement";
|
|
5
|
-
export * from "./frameElement";
|
|
6
|
-
export * from "./viewportElement";
|
|
7
6
|
import { Scope } from "../../types";
|
|
8
7
|
import { _DucStackBase, DucElement, DucNonSelectionElement, DucTableElement, DucTextStyle, ElementConstructorOpts, NonDeleted } from "../../types/elements";
|
|
9
8
|
import { GeometricPoint, TuplePoint } from "../../types/geometryTypes";
|
|
@@ -25,17 +24,7 @@ export declare const getDefaultStackProperties: () => _DucStackBase;
|
|
|
25
24
|
* which are added during element creation.
|
|
26
25
|
*/
|
|
27
26
|
export declare const getDefaultTableData: (currentScope: Scope) => {
|
|
28
|
-
|
|
29
|
-
rowOrder: DucTableElement["rowOrder"];
|
|
30
|
-
columns: DucTableElement["columns"];
|
|
31
|
-
rows: DucTableElement["rows"];
|
|
32
|
-
cells: DucTableElement["cells"];
|
|
33
|
-
flowDirection: DucTableElement["flowDirection"];
|
|
34
|
-
headerRowStyle: DucTableElement["headerRowStyle"];
|
|
35
|
-
dataRowStyle: DucTableElement["dataRowStyle"];
|
|
36
|
-
dataColumnStyle: DucTableElement["dataColumnStyle"];
|
|
37
|
-
headerRowCount: DucTableElement["headerRowCount"];
|
|
38
|
-
autoSize: DucTableElement["autoSize"];
|
|
27
|
+
fileId: DucTableElement["fileId"];
|
|
39
28
|
};
|
|
40
29
|
export declare const getBaseElementProps: (element: DucNonSelectionElement) => ElementConstructorOpts;
|
|
41
30
|
export declare function convertPointToTuple(point: GeometricPoint): TuplePoint;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./frameElement";
|
|
2
2
|
export * from "./freedrawElement";
|
|
3
3
|
export * from "./linearElement";
|
|
4
|
+
export * from "./newElement";
|
|
4
5
|
export * from "./textElement";
|
|
5
|
-
export * from "./frameElement";
|
|
6
|
-
export * from "./viewportElement";
|
|
7
|
-
import { LINE_SPACING_TYPE, TABLE_CELL_ALIGNMENT, TABLE_FLOW_DIRECTION } from "../../flatbuffers/duc";
|
|
8
|
-
import { isFreeDrawElement, isLinearElement } from "../../types/elements/typeChecks";
|
|
9
6
|
import { getUpdatedTimestamp } from "..";
|
|
10
|
-
import {
|
|
11
|
-
import { randomInteger } from "../math/random";
|
|
7
|
+
import { LINE_SPACING_TYPE } from "../../enums";
|
|
12
8
|
import { getPrecisionValueFromRaw } from "../../technical/scopes";
|
|
9
|
+
import { isFreeDrawElement, isLinearElement } from "../../types/elements/typeChecks";
|
|
10
|
+
import { DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_TEXT_ALIGN, DEFAULT_VERTICAL_ALIGN } from "../constants";
|
|
11
|
+
import { randomInteger } from "../math/random";
|
|
13
12
|
/**
|
|
14
13
|
* Returns a default DucTextStyle object for the given scope.
|
|
15
14
|
*/
|
|
@@ -24,7 +23,6 @@ export function getDefaultTextStyle(currentScope) {
|
|
|
24
23
|
lineSpacing: { type: LINE_SPACING_TYPE.MULTIPLE, value: 1.2 },
|
|
25
24
|
obliqueAngle: 0,
|
|
26
25
|
fontSize: getPrecisionValueFromRaw(DEFAULT_FONT_SIZE, currentScope, currentScope),
|
|
27
|
-
paperTextHeight: undefined,
|
|
28
26
|
widthFactor: 1,
|
|
29
27
|
isUpsideDown: false,
|
|
30
28
|
isBackwards: false,
|
|
@@ -50,7 +48,6 @@ export const getDefaultStackProperties = () => {
|
|
|
50
48
|
isVisible: true,
|
|
51
49
|
isPlot: true,
|
|
52
50
|
opacity: 1,
|
|
53
|
-
labelingColor: "transparent",
|
|
54
51
|
};
|
|
55
52
|
};
|
|
56
53
|
/**
|
|
@@ -59,96 +56,8 @@ export const getDefaultStackProperties = () => {
|
|
|
59
56
|
* which are added during element creation.
|
|
60
57
|
*/
|
|
61
58
|
export const getDefaultTableData = (currentScope) => {
|
|
62
|
-
// Default structure
|
|
63
|
-
const columnCount = 3;
|
|
64
|
-
const headerRowCount = 1;
|
|
65
|
-
const dataRowCount = 3; // header + 3 data rows
|
|
66
|
-
const totalRows = headerRowCount + dataRowCount;
|
|
67
|
-
const columnIds = Array.from({ length: columnCount }, (_, i) => `col${i + 1}`);
|
|
68
|
-
const rowIds = Array.from({ length: totalRows }, (_, i) => `row${i + 1}`);
|
|
69
|
-
// Spacing and sizing
|
|
70
|
-
const hMargin = getPrecisionValueFromRaw(8, currentScope, currentScope);
|
|
71
|
-
const vMargin = getPrecisionValueFromRaw(6, currentScope, currentScope);
|
|
72
|
-
const defaultFontSize = getPrecisionValueFromRaw(DEFAULT_FONT_SIZE, currentScope, currentScope);
|
|
73
|
-
// Slightly taller header row for visual hierarchy
|
|
74
|
-
const dataRowHeight = (defaultFontSize.value * 1.2) + (vMargin.value * 2);
|
|
75
|
-
const headerRowHeight = (defaultFontSize.value * 1.4) + (vMargin.value * 2);
|
|
76
|
-
// A practical starting column width
|
|
77
|
-
const defaultColumnWidth = getPrecisionValueFromRaw(140, currentScope, currentScope);
|
|
78
|
-
// Base/default styling for cells
|
|
79
|
-
const baseCellStyle = {
|
|
80
|
-
stroke: [DEFAULT_ELEMENT_PROPS.stroke],
|
|
81
|
-
background: [DEFAULT_ELEMENT_PROPS.background],
|
|
82
|
-
roundness: DEFAULT_ELEMENT_PROPS.roundness,
|
|
83
|
-
opacity: DEFAULT_ELEMENT_PROPS.opacity,
|
|
84
|
-
textStyle: {
|
|
85
|
-
isLtr: true,
|
|
86
|
-
fontFamily: FONT_FAMILY.Virgil,
|
|
87
|
-
bigFontFamily: "sans-serif",
|
|
88
|
-
textAlign: DEFAULT_TEXT_ALIGN,
|
|
89
|
-
verticalAlign: DEFAULT_VERTICAL_ALIGN,
|
|
90
|
-
lineHeight: 1.2,
|
|
91
|
-
lineSpacing: { type: LINE_SPACING_TYPE.MULTIPLE, value: 1.2 },
|
|
92
|
-
obliqueAngle: 0,
|
|
93
|
-
fontSize: defaultFontSize,
|
|
94
|
-
paperTextHeight: undefined,
|
|
95
|
-
widthFactor: 1,
|
|
96
|
-
isUpsideDown: false,
|
|
97
|
-
isBackwards: false,
|
|
98
|
-
},
|
|
99
|
-
margins: {
|
|
100
|
-
top: vMargin,
|
|
101
|
-
right: hMargin,
|
|
102
|
-
bottom: vMargin,
|
|
103
|
-
left: hMargin,
|
|
104
|
-
},
|
|
105
|
-
// Left + middle is a great general-purpose default for tables
|
|
106
|
-
alignment: TABLE_CELL_ALIGNMENT.MIDDLE_LEFT,
|
|
107
|
-
};
|
|
108
|
-
// Create default columns
|
|
109
|
-
const columns = Object.fromEntries(columnIds.map((id) => [id, { id, width: defaultColumnWidth }]));
|
|
110
|
-
// Create default rows (taller header row)
|
|
111
|
-
const rows = Object.fromEntries(rowIds.map((id, idx) => [
|
|
112
|
-
id,
|
|
113
|
-
{
|
|
114
|
-
id,
|
|
115
|
-
height: idx < headerRowCount
|
|
116
|
-
? getPrecisionValueFromRaw(headerRowHeight, currentScope, currentScope)
|
|
117
|
-
: getPrecisionValueFromRaw(dataRowHeight, currentScope, currentScope)
|
|
118
|
-
},
|
|
119
|
-
]));
|
|
120
|
-
// Create default cells
|
|
121
|
-
const cells = Object.create(null);
|
|
122
|
-
// Friendly header labels via Markdown (bold)
|
|
123
|
-
const headerLabels = ["Column A", "Column B", "Column C"];
|
|
124
|
-
rowIds.forEach((rowId, rIdx) => {
|
|
125
|
-
columnIds.forEach((colId, cIdx) => {
|
|
126
|
-
var _a;
|
|
127
|
-
const cellId = `${rowId}:${colId}`;
|
|
128
|
-
const isHeaderRow = rIdx < headerRowCount;
|
|
129
|
-
cells[cellId] = {
|
|
130
|
-
rowId,
|
|
131
|
-
columnId: colId,
|
|
132
|
-
data: isHeaderRow ? `**${(_a = headerLabels[cIdx]) !== null && _a !== void 0 ? _a : `Column ${cIdx + 1}`}**` : "",
|
|
133
|
-
locked: false,
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
59
|
return {
|
|
138
|
-
|
|
139
|
-
columnOrder: columnIds,
|
|
140
|
-
rowOrder: rowIds,
|
|
141
|
-
columns,
|
|
142
|
-
rows,
|
|
143
|
-
cells,
|
|
144
|
-
// Style & Behavior
|
|
145
|
-
flowDirection: TABLE_FLOW_DIRECTION.DOWN,
|
|
146
|
-
headerRowStyle: baseCellStyle,
|
|
147
|
-
dataRowStyle: baseCellStyle,
|
|
148
|
-
dataColumnStyle: baseCellStyle,
|
|
149
|
-
headerRowCount,
|
|
150
|
-
// Let rows grow to fit content; keep columns fixed unless user opts in
|
|
151
|
-
autoSize: { columns: false, rows: true },
|
|
60
|
+
fileId: null,
|
|
152
61
|
};
|
|
153
62
|
};
|
|
154
63
|
export const getBaseElementProps = (element) => {
|
|
@@ -159,7 +68,6 @@ export const getBaseElementProps = (element) => {
|
|
|
159
68
|
label: element.label,
|
|
160
69
|
isVisible: element.isVisible,
|
|
161
70
|
isPlot: element.isPlot,
|
|
162
|
-
isAnnotative: element.isAnnotative,
|
|
163
71
|
layerId: element.layerId,
|
|
164
72
|
regionIds: element.regionIds,
|
|
165
73
|
blockIds: element.blockIds,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HANDLE_TYPE } from "../../flatbuffers/duc";
|
|
2
1
|
import type { PrecisionValue, RawValue, Scope } from "../../types";
|
|
3
2
|
import type { DucLine, DucLinearElement, DucLinearLikeElement, DucPoint, DucTextElementWithContainer, ElementsMap, NonDeleted } from "../../types/elements";
|
|
4
3
|
import { Bounds, GeometricPoint } from "../../types/geometryTypes";
|
|
5
4
|
import type { ValueOf } from "../../types/utility-types";
|
|
6
5
|
import { ElementAbsoluteCoords } from "../bounds";
|
|
6
|
+
import { HANDLE_TYPE } from "../../enums";
|
|
7
7
|
export type HandleType = ValueOf<typeof HANDLE_TYPE> | null;
|
|
8
8
|
export type HandleInfo = {
|
|
9
9
|
pointIndex: number;
|
|
10
|
-
handleType:
|
|
10
|
+
handleType: HandleType;
|
|
11
11
|
lineIndex: number;
|
|
12
12
|
handle: DucPoint;
|
|
13
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scope } from "../../types";
|
|
2
|
-
import { DucArrowElement,
|
|
2
|
+
import { DucArrowElement, DucDocElement, DucElement, DucEllipseElement, DucEmbeddableElement, DucFrameElement, DucFreeDrawElement, DucGenericElement, DucImageElement, DucLinearElement, DucModelElement, DucPdfElement, DucPlotElement, DucPolygonElement, DucTableElement, DucTextElement, ElementConstructorOpts, ElementUpdate, NonDeleted } from "../../types/elements";
|
|
3
3
|
import { Mutable } from "../../types/utility-types";
|
|
4
4
|
export declare const newElementWith: <TElement extends DucElement>(element: TElement, updates: ElementUpdate<TElement>,
|
|
5
5
|
/** pass `true` to always regenerate */
|
|
@@ -12,11 +12,6 @@ export declare const newEmbeddableElement: (currentScope: Scope, opts: {
|
|
|
12
12
|
} & ElementConstructorOpts) => NonDeleted<DucEmbeddableElement>;
|
|
13
13
|
export declare const newFrameElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucFrameElement>;
|
|
14
14
|
export declare const newPlotElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucPlotElement>;
|
|
15
|
-
export declare const newViewportElement: (currentScope: Scope, opts: {
|
|
16
|
-
zoom?: number;
|
|
17
|
-
scopeExponentThreshold?: number;
|
|
18
|
-
mainScope?: Scope;
|
|
19
|
-
} & ElementConstructorOpts) => NonDeleted<DucViewportElement>;
|
|
20
15
|
export declare const newEllipseElement: (currentScope: Scope, opts: {
|
|
21
16
|
type: "ellipse";
|
|
22
17
|
ratio?: DucEllipseElement["ratio"];
|
|
@@ -41,12 +36,7 @@ export declare const newImageElement: (currentScope: Scope, opts: Partial<DucIma
|
|
|
41
36
|
export declare const newTableElement: (currentScope: Scope, opts: Partial<DucTableElement> & ElementConstructorOpts) => NonDeleted<DucTableElement>;
|
|
42
37
|
export declare const newDocElement: (currentScope: Scope, opts: Partial<DucDocElement> & ElementConstructorOpts) => NonDeleted<DucDocElement>;
|
|
43
38
|
export declare const newPdfElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucPdfElement>;
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const newXRayElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucXRayElement>;
|
|
46
|
-
export declare const newLeaderElement: (currentScope: Scope, opts: Partial<DucLeaderElement> & ElementConstructorOpts) => NonDeleted<DucLeaderElement>;
|
|
47
|
-
export declare const newDimensionElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucDimensionElement>;
|
|
48
|
-
export declare const newFeatureControlFrameElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucFeatureControlFrameElement>;
|
|
49
|
-
export declare const newParametricElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucModelElement>;
|
|
39
|
+
export declare const newModelElement: (currentScope: Scope, opts: ElementConstructorOpts) => NonDeleted<DucModelElement>;
|
|
50
40
|
/**
|
|
51
41
|
* Clones DucElement data structure. Does not regenerate id, nonce, or
|
|
52
42
|
* any value. The purpose is to to break object references for immutability
|