ducjs 2.4.0 → 3.0.3
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 +4 -5
- package/dist/enums.d.ts +135 -0
- package/dist/enums.js +155 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/lazy-files.d.ts +31 -71
- package/dist/lazy-files.js +91 -163
- package/dist/parse.d.ts +16 -82
- package/dist/parse.js +56 -1646
- 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 +126 -128
- package/dist/restore/restoreElements.d.ts +1 -1
- package/dist/restore/restoreElements.js +31 -499
- package/dist/serialize.d.ts +11 -4
- package/dist/serialize.js +58 -2546
- package/dist/technical/index.d.ts +0 -1
- package/dist/technical/index.js +0 -1
- package/dist/technical/scopes.d.ts +2 -2
- package/dist/technical/scopes.js +29 -14
- package/dist/transform.d.ts +12 -0
- package/dist/transform.js +442 -0
- package/dist/types/elements/index.d.ts +116 -689
- package/dist/types/elements/typeChecks.d.ts +3 -3
- package/dist/types/elements/typeChecks.js +3 -8
- package/dist/types/geometryTypes.d.ts +1 -1
- package/dist/types/index.d.ts +38 -305
- package/dist/utils/constants.d.ts +3 -86
- package/dist/utils/constants.js +1 -197
- 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 +22 -51
- package/dist/utils/elements/textElement.js +1 -1
- 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 +4 -70
- 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 +3 -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 -24
- package/dist/flatbuffers/duc/document-grid-config.js +0 -81
- 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
|
@@ -1,63 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { PRUNING_LEVEL, TEXT_ALIGN } from "../../
|
|
3
|
-
import {
|
|
1
|
+
import { isFiniteNumber } from "..";
|
|
2
|
+
import { PRUNING_LEVEL, TEXT_ALIGN } from "../../enums";
|
|
3
|
+
import { isValidPrecisionScopeValue } from "../../restore/restoreDataState";
|
|
4
4
|
import { getPrecisionValueFromRaw, getScaledZoomValueForScope, getScopedZoomValue, NEUTRAL_SCOPE, } from "../../technical/scopes";
|
|
5
5
|
import { COLOR_PALETTE, DEFAULT_ELEMENT_PROPS, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, } from "../constants";
|
|
6
6
|
import { getNormalizedZoom } from "../normalize";
|
|
7
|
-
import { isFiniteNumber } from "..";
|
|
8
|
-
import { isValidPrecisionScopeValue } from "../../restore/restoreDataState";
|
|
9
|
-
// appState
|
|
10
|
-
// export const updateActiveTool = (
|
|
11
|
-
// appState: Pick<DucLocalState, "activeTool">,
|
|
12
|
-
// data: ((
|
|
13
|
-
// | {
|
|
14
|
-
// type: ToolType;
|
|
15
|
-
// }
|
|
16
|
-
// | { type: "custom"; customType: string }
|
|
17
|
-
// ) & { locked?: boolean; fromSelection?: boolean }) & {
|
|
18
|
-
// lastActiveToolBeforeEraser?: ActiveTool | null;
|
|
19
|
-
// },
|
|
20
|
-
// ): DucLocalState["activeTool"] => {
|
|
21
|
-
// if (data.type === "custom") {
|
|
22
|
-
// return {
|
|
23
|
-
// ...appState.activeTool,
|
|
24
|
-
// type: "custom",
|
|
25
|
-
// customType: data.customType,
|
|
26
|
-
// locked: data.locked ?? appState.activeTool.locked,
|
|
27
|
-
// };
|
|
28
|
-
// }
|
|
29
|
-
// return {
|
|
30
|
-
// ...appState.activeTool,
|
|
31
|
-
// lastActiveTool:
|
|
32
|
-
// data.lastActiveToolBeforeEraser === undefined
|
|
33
|
-
// ? appState.activeTool.lastActiveTool
|
|
34
|
-
// : data.lastActiveToolBeforeEraser,
|
|
35
|
-
// type: data.type,
|
|
36
|
-
// customType: null,
|
|
37
|
-
// locked: data.locked ?? appState.activeTool.locked,
|
|
38
|
-
// fromSelection: data.fromSelection ?? false,
|
|
39
|
-
// };
|
|
40
|
-
// };
|
|
41
|
-
// activeTool: {
|
|
42
|
-
// type: "selection",
|
|
43
|
-
// customType: null,
|
|
44
|
-
// locked: DEFAULT_ELEMENT_PROPS.locked,
|
|
45
|
-
// fromSelection: false,
|
|
46
|
-
// lastActiveTool: null,
|
|
47
|
-
// },
|
|
48
|
-
// duconfig
|
|
49
|
-
// displayAllPointDistances: false,
|
|
50
|
-
// displayDistanceOnDrawing: true,
|
|
51
|
-
// displayAllPointInfoSelected: false,
|
|
52
|
-
// displayAllPointCoordinates: false,
|
|
53
|
-
// displayRootAxis: false,
|
|
54
|
-
// showHyperlinkPopup: false,
|
|
55
|
-
// antiAliasing: ANTI_ALIASING.ANALYTIC,
|
|
56
|
-
// vSync: true,
|
|
57
|
-
// zoomStep: 0,
|
|
58
|
-
// scaleRatioLocked: false,
|
|
59
|
-
// theme: THEME.LIGHT,
|
|
60
|
-
// debugRendering: false,
|
|
61
7
|
/**
|
|
62
8
|
* Returns the zoom object with value, scoped, and scaled properties,
|
|
63
9
|
* using importedState, restoredGlobalState, and defaults.
|
|
@@ -80,14 +26,6 @@ export const getDefaultGlobalState = () => {
|
|
|
80
26
|
viewBackgroundColor: typeof window !== "undefined" ? (window.matchMedia("(prefers-color-scheme: dark)").matches ? COLOR_PALETTE.night : COLOR_PALETTE.white) : COLOR_PALETTE.white,
|
|
81
27
|
scopeExponentThreshold: 3,
|
|
82
28
|
mainScope: NEUTRAL_SCOPE,
|
|
83
|
-
dashSpacingScale: 1,
|
|
84
|
-
isDashSpacingAffectedByViewportScale: false,
|
|
85
|
-
dimensionsAssociativeByDefault: false,
|
|
86
|
-
useAnnotativeScaling: false,
|
|
87
|
-
displayPrecision: {
|
|
88
|
-
linear: 2,
|
|
89
|
-
angular: 1,
|
|
90
|
-
},
|
|
91
29
|
pruningLevel: PRUNING_LEVEL.BALANCED,
|
|
92
30
|
};
|
|
93
31
|
};
|
|
@@ -99,7 +37,6 @@ export const getDefaultLocalState = () => {
|
|
|
99
37
|
const scopedZoom = getScopedZoomValue(zoom, scope);
|
|
100
38
|
return {
|
|
101
39
|
scope,
|
|
102
|
-
activeStandardId: PREDEFINED_STANDARDS.DUC,
|
|
103
40
|
isBindingEnabled: true,
|
|
104
41
|
scrollX: getPrecisionValueFromRaw(scrollX, NEUTRAL_SCOPE, scope),
|
|
105
42
|
scrollY: getPrecisionValueFromRaw(scrollY, NEUTRAL_SCOPE, scope),
|
|
@@ -117,15 +54,12 @@ export const getDefaultLocalState = () => {
|
|
|
117
54
|
currentItemFontSize: getPrecisionValueFromRaw(DEFAULT_FONT_SIZE, scope, scope),
|
|
118
55
|
currentItemOpacity: DEFAULT_ELEMENT_PROPS.opacity,
|
|
119
56
|
currentItemRoundness: getPrecisionValueFromRaw(0, scope, scope),
|
|
120
|
-
activeGridSettings: [],
|
|
121
|
-
activeSnapSettings: "",
|
|
122
57
|
penMode: false,
|
|
123
58
|
viewModeEnabled: false,
|
|
124
59
|
objectsSnapModeEnabled: true,
|
|
125
60
|
gridModeEnabled: false,
|
|
126
61
|
outlineModeEnabled: false,
|
|
127
62
|
manualSaveMode: false,
|
|
128
|
-
|
|
129
|
-
gridStep: 10,
|
|
63
|
+
decimalPlaces: 2,
|
|
130
64
|
};
|
|
131
65
|
};
|
package/dist/utils/traverse.d.ts
CHANGED
|
@@ -20,3 +20,11 @@ import { Scope } from "../types";
|
|
|
20
20
|
* @param detectedScope - Internally tracked scope for the current level
|
|
21
21
|
*/
|
|
22
22
|
export declare const traverseAndUpdatePrecisionValues: (obj: any, targetScope: Scope, providedScope?: Scope, visited?: WeakSet<WeakKey>, detectedScope?: Scope) => any;
|
|
23
|
+
/**
|
|
24
|
+
* Traverses an object and normalizes it for serialization in `targetScope`.
|
|
25
|
+
*
|
|
26
|
+
* - Converts all PrecisionValue fields so `scoped` is in `targetScope`
|
|
27
|
+
* - Rewrites PrecisionValue `value` from the computed `scoped` value
|
|
28
|
+
* - Rewrites `scope` / `mainScope` string fields to `targetScope`
|
|
29
|
+
*/
|
|
30
|
+
export declare const normalizeForSerializationScope: <T>(obj: T, targetScope: Scope, providedScope?: Scope) => T;
|
package/dist/utils/traverse.js
CHANGED
|
@@ -85,3 +85,40 @@ export const traverseAndUpdatePrecisionValues = (obj, targetScope, providedScope
|
|
|
85
85
|
}
|
|
86
86
|
return result;
|
|
87
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Traverses an object and normalizes it for serialization in `targetScope`.
|
|
90
|
+
*
|
|
91
|
+
* - Converts all PrecisionValue fields so `scoped` is in `targetScope`
|
|
92
|
+
* - Rewrites PrecisionValue `value` from the computed `scoped` value
|
|
93
|
+
* - Rewrites `scope` / `mainScope` string fields to `targetScope`
|
|
94
|
+
*/
|
|
95
|
+
export const normalizeForSerializationScope = (obj, targetScope, providedScope) => {
|
|
96
|
+
const converted = traverseAndUpdatePrecisionValues(obj, targetScope, providedScope);
|
|
97
|
+
return rewriteScopeAndPrecisionValues(converted, targetScope);
|
|
98
|
+
};
|
|
99
|
+
const rewriteScopeAndPrecisionValues = (obj, targetScope, visited = new WeakSet()) => {
|
|
100
|
+
if (obj == null || typeof obj !== "object")
|
|
101
|
+
return obj;
|
|
102
|
+
if (isPrecisionValue(obj)) {
|
|
103
|
+
return Object.assign(Object.assign({}, obj), { value: obj.scoped });
|
|
104
|
+
}
|
|
105
|
+
if (Array.isArray(obj)) {
|
|
106
|
+
return obj.map((item) => rewriteScopeAndPrecisionValues(item, targetScope, visited));
|
|
107
|
+
}
|
|
108
|
+
if (visited.has(obj))
|
|
109
|
+
return obj;
|
|
110
|
+
visited.add(obj);
|
|
111
|
+
if (obj.constructor !== Object) {
|
|
112
|
+
return obj;
|
|
113
|
+
}
|
|
114
|
+
const result = {};
|
|
115
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
116
|
+
if ((key === "scope" || key === "mainScope") &&
|
|
117
|
+
typeof value === "string") {
|
|
118
|
+
result[key] = targetScope;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
result[key] = rewriteScopeAndPrecisionValues(value, targetScope, visited);
|
|
122
|
+
}
|
|
123
|
+
return result;
|
|
124
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { VersionGraph } from "./types";
|
|
2
|
+
export interface RestoredVersion {
|
|
3
|
+
versionNumber: number;
|
|
4
|
+
schemaVersion: number;
|
|
5
|
+
data: Uint8Array;
|
|
6
|
+
fromCheckpoint: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface VersionEntry {
|
|
9
|
+
id: string;
|
|
10
|
+
versionNumber: number;
|
|
11
|
+
schemaVersion: number;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
description?: string;
|
|
14
|
+
isManualSave: boolean;
|
|
15
|
+
userId?: string;
|
|
16
|
+
versionType: "checkpoint" | "delta";
|
|
17
|
+
sizeBytes: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Restore the full document state at a specific version number.
|
|
21
|
+
*
|
|
22
|
+
* If the version corresponds to a checkpoint, the raw data is returned directly.
|
|
23
|
+
* Otherwise, the nearest preceding checkpoint is loaded and deltas are replayed
|
|
24
|
+
* on top of it to reconstruct the state.
|
|
25
|
+
*
|
|
26
|
+
* All heavy lifting (SQLite access, decompression, delta replay) happens in
|
|
27
|
+
* Rust/WASM.
|
|
28
|
+
*/
|
|
29
|
+
export declare const restoreVersion: (ducBuffer: Uint8Array, versionNumber: number) => Promise<RestoredVersion>;
|
|
30
|
+
/**
|
|
31
|
+
* Restore a specific checkpoint by its ID.
|
|
32
|
+
*/
|
|
33
|
+
export declare const restoreCheckpoint: (ducBuffer: Uint8Array, checkpointId: string) => Promise<RestoredVersion>;
|
|
34
|
+
/**
|
|
35
|
+
* List all versions (checkpoints and deltas) in the .duc file,
|
|
36
|
+
* ordered by version number descending. Does not load data blobs.
|
|
37
|
+
*/
|
|
38
|
+
export declare const listVersions: (ducBuffer: Uint8Array) => Promise<VersionEntry[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Read the full version graph from the .duc file, including all
|
|
41
|
+
* checkpoints, deltas, chains, and metadata.
|
|
42
|
+
*/
|
|
43
|
+
export declare const readVersionGraph: (ducBuffer: Uint8Array) => Promise<VersionGraph | undefined>;
|
|
44
|
+
/**
|
|
45
|
+
* Revert the document to a specific version, deleting all versions
|
|
46
|
+
* newer than the target. Returns the restored state at that version.
|
|
47
|
+
*
|
|
48
|
+
* **Warning**: This mutates the .duc buffer in-place (via the WASM
|
|
49
|
+
* SQLite connection). The returned `RestoredVersion.data` contains the
|
|
50
|
+
* full document state at the target version.
|
|
51
|
+
*/
|
|
52
|
+
export declare const revertToVersion: (ducBuffer: Uint8Array, targetVersion: number) => Promise<RestoredVersion>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the current version-control schema version from Rust.
|
|
55
|
+
*
|
|
56
|
+
* This is the single source of truth for the schema version number,
|
|
57
|
+
* generated from `schema/duc.sql` (`PRAGMA user_version`) at build time.
|
|
58
|
+
* The version control system handles migration bookkeeping automatically
|
|
59
|
+
* on the next checkpoint or delta creation.
|
|
60
|
+
*/
|
|
61
|
+
export declare const getCurrentSchemaVersion: () => Promise<number>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { ensureWasm, wasmGetCurrentSchemaVersion, wasmListVersions, wasmReadVersionGraph, wasmRestoreCheckpoint, wasmRestoreVersion, wasmRevertToVersion, } from "./wasm";
|
|
11
|
+
/**
|
|
12
|
+
* Restore the full document state at a specific version number.
|
|
13
|
+
*
|
|
14
|
+
* If the version corresponds to a checkpoint, the raw data is returned directly.
|
|
15
|
+
* Otherwise, the nearest preceding checkpoint is loaded and deltas are replayed
|
|
16
|
+
* on top of it to reconstruct the state.
|
|
17
|
+
*
|
|
18
|
+
* All heavy lifting (SQLite access, decompression, delta replay) happens in
|
|
19
|
+
* Rust/WASM.
|
|
20
|
+
*/
|
|
21
|
+
export const restoreVersion = (ducBuffer, versionNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
+
yield ensureWasm();
|
|
23
|
+
const result = wasmRestoreVersion(ducBuffer, versionNumber);
|
|
24
|
+
if (!result) {
|
|
25
|
+
throw new Error(`Failed to restore version ${versionNumber}`);
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Restore a specific checkpoint by its ID.
|
|
31
|
+
*/
|
|
32
|
+
export const restoreCheckpoint = (ducBuffer, checkpointId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
yield ensureWasm();
|
|
34
|
+
const result = wasmRestoreCheckpoint(ducBuffer, checkpointId);
|
|
35
|
+
if (!result) {
|
|
36
|
+
throw new Error(`Failed to restore checkpoint ${checkpointId}`);
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* List all versions (checkpoints and deltas) in the .duc file,
|
|
42
|
+
* ordered by version number descending. Does not load data blobs.
|
|
43
|
+
*/
|
|
44
|
+
export const listVersions = (ducBuffer) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
+
yield ensureWasm();
|
|
46
|
+
const result = wasmListVersions(ducBuffer);
|
|
47
|
+
return (result !== null && result !== void 0 ? result : []);
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Read the full version graph from the .duc file, including all
|
|
51
|
+
* checkpoints, deltas, chains, and metadata.
|
|
52
|
+
*/
|
|
53
|
+
export const readVersionGraph = (ducBuffer) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
+
yield ensureWasm();
|
|
55
|
+
return wasmReadVersionGraph(ducBuffer);
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Revert the document to a specific version, deleting all versions
|
|
59
|
+
* newer than the target. Returns the restored state at that version.
|
|
60
|
+
*
|
|
61
|
+
* **Warning**: This mutates the .duc buffer in-place (via the WASM
|
|
62
|
+
* SQLite connection). The returned `RestoredVersion.data` contains the
|
|
63
|
+
* full document state at the target version.
|
|
64
|
+
*/
|
|
65
|
+
export const revertToVersion = (ducBuffer, targetVersion) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
yield ensureWasm();
|
|
67
|
+
const result = wasmRevertToVersion(ducBuffer, targetVersion);
|
|
68
|
+
if (!result) {
|
|
69
|
+
throw new Error(`Failed to revert to version ${targetVersion}`);
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
});
|
|
73
|
+
/**
|
|
74
|
+
* Returns the current version-control schema version from Rust.
|
|
75
|
+
*
|
|
76
|
+
* This is the single source of truth for the schema version number,
|
|
77
|
+
* generated from `schema/duc.sql` (`PRAGMA user_version`) at build time.
|
|
78
|
+
* The version control system handles migration bookkeeping automatically
|
|
79
|
+
* on the next checkpoint or delta creation.
|
|
80
|
+
*/
|
|
81
|
+
export const getCurrentSchemaVersion = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
82
|
+
yield ensureWasm();
|
|
83
|
+
return wasmGetCurrentSchemaVersion();
|
|
84
|
+
});
|
package/dist/wasm.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getCurrentSchemaVersion as _getCurrentSchemaVersion, getExternalFile as _getExternalFile, listExternalFiles as _listExternalFiles, listVersions as _listVersions, parseDuc as _parseDuc, parseDucLazy as _parseDucLazy, readVersionGraph as _readVersionGraph, restoreCheckpoint as _restoreCheckpoint, restoreVersion as _restoreVersion, revertToVersion as _revertToVersion, serializeDuc as _serializeDuc } from "../pkg/ducjs_wasm";
|
|
2
|
+
export declare function ensureWasm(wasmUrl?: string | URL | BufferSource): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Fetch the raw WASM binary as an ArrayBuffer.
|
|
5
|
+
* Must be called from the main thread (where the bundler resolves `import.meta.url`).
|
|
6
|
+
* Useful for transferring the binary to a web worker that needs to init WASM
|
|
7
|
+
* without being able to resolve the file URL itself.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getWasmBinary(): Promise<ArrayBuffer>;
|
|
10
|
+
export declare const wasmParseDuc: typeof _parseDuc;
|
|
11
|
+
export declare const wasmParseDucLazy: typeof _parseDucLazy;
|
|
12
|
+
export declare const wasmSerializeDuc: typeof _serializeDuc;
|
|
13
|
+
export declare const wasmGetExternalFile: typeof _getExternalFile;
|
|
14
|
+
export declare const wasmListExternalFiles: typeof _listExternalFiles;
|
|
15
|
+
export declare const wasmRestoreVersion: typeof _restoreVersion;
|
|
16
|
+
export declare const wasmRestoreCheckpoint: typeof _restoreCheckpoint;
|
|
17
|
+
export declare const wasmListVersions: typeof _listVersions;
|
|
18
|
+
export declare const wasmReadVersionGraph: typeof _readVersionGraph;
|
|
19
|
+
export declare const wasmRevertToVersion: typeof _revertToVersion;
|
|
20
|
+
export declare const wasmGetCurrentSchemaVersion: typeof _getCurrentSchemaVersion;
|
package/dist/wasm.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import init, { getCurrentSchemaVersion as _getCurrentSchemaVersion, getExternalFile as _getExternalFile, listExternalFiles as _listExternalFiles, listVersions as _listVersions, parseDuc as _parseDuc, parseDucLazy as _parseDucLazy, readVersionGraph as _readVersionGraph, restoreCheckpoint as _restoreCheckpoint, restoreVersion as _restoreVersion, revertToVersion as _revertToVersion, serializeDuc as _serializeDuc, } from "../pkg/ducjs_wasm";
|
|
11
|
+
let initialized = false;
|
|
12
|
+
let initPromise = null;
|
|
13
|
+
export function ensureWasm(wasmUrl) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
if (initialized)
|
|
16
|
+
return;
|
|
17
|
+
if (!initPromise) {
|
|
18
|
+
const arg = wasmUrl !== undefined ? { module_or_path: wasmUrl } : undefined;
|
|
19
|
+
initPromise = init(arg).then(() => {
|
|
20
|
+
initialized = true;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return initPromise;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Fetch the raw WASM binary as an ArrayBuffer.
|
|
28
|
+
* Must be called from the main thread (where the bundler resolves `import.meta.url`).
|
|
29
|
+
* Useful for transferring the binary to a web worker that needs to init WASM
|
|
30
|
+
* without being able to resolve the file URL itself.
|
|
31
|
+
*/
|
|
32
|
+
export function getWasmBinary() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const url = new URL('../pkg/ducjs_wasm_bg.wasm', import.meta.url);
|
|
35
|
+
const resp = yield fetch(url);
|
|
36
|
+
if (!resp.ok) {
|
|
37
|
+
throw new Error(`Failed to fetch WASM binary: ${resp.status} ${resp.statusText}`);
|
|
38
|
+
}
|
|
39
|
+
return resp.arrayBuffer();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export const wasmParseDuc = _parseDuc;
|
|
43
|
+
export const wasmParseDucLazy = _parseDucLazy;
|
|
44
|
+
export const wasmSerializeDuc = _serializeDuc;
|
|
45
|
+
export const wasmGetExternalFile = _getExternalFile;
|
|
46
|
+
export const wasmListExternalFiles = _listExternalFiles;
|
|
47
|
+
export const wasmRestoreVersion = _restoreVersion;
|
|
48
|
+
export const wasmRestoreCheckpoint = _restoreCheckpoint;
|
|
49
|
+
export const wasmListVersions = _listVersions;
|
|
50
|
+
export const wasmReadVersionGraph = _readVersionGraph;
|
|
51
|
+
export const wasmRevertToVersion = _revertToVersion;
|
|
52
|
+
export const wasmGetCurrentSchemaVersion = _getCurrentSchemaVersion;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ducjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "node scripts/build.js",
|
|
32
|
+
"test": "bun run check-types",
|
|
32
33
|
"check-types": "tsc --noEmit",
|
|
33
34
|
"semantic-release": "semantic-release"
|
|
34
35
|
},
|
|
@@ -46,13 +47,13 @@
|
|
|
46
47
|
"@braintree/sanitize-url": "6.0.2",
|
|
47
48
|
"browser-fs-access": "0.35.0",
|
|
48
49
|
"fflate": "^0.8.2",
|
|
49
|
-
"flatbuffers": "^24.12.23",
|
|
50
50
|
"nanoid": "5.1.5",
|
|
51
51
|
"perfect-freehand": "1.2.2",
|
|
52
52
|
"tinycolor2": "1.6.0"
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
55
|
"dist",
|
|
56
|
+
"pkg",
|
|
56
57
|
"README.md"
|
|
57
58
|
],
|
|
58
59
|
"publishConfig": {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { DIMENSION_UNITS_FORMAT } from '../duc/dimension-units-format';
|
|
3
|
-
import { _UnitSystemBase } from '../duc/unit-system-base';
|
|
4
|
-
export declare class AlternateUnits {
|
|
5
|
-
bb: flatbuffers.ByteBuffer | null;
|
|
6
|
-
bb_pos: number;
|
|
7
|
-
__init(i: number, bb: flatbuffers.ByteBuffer): AlternateUnits;
|
|
8
|
-
static getRootAsAlternateUnits(bb: flatbuffers.ByteBuffer, obj?: AlternateUnits): AlternateUnits;
|
|
9
|
-
static getSizePrefixedRootAsAlternateUnits(bb: flatbuffers.ByteBuffer, obj?: AlternateUnits): AlternateUnits;
|
|
10
|
-
base(obj?: _UnitSystemBase): _UnitSystemBase | null;
|
|
11
|
-
format(): DIMENSION_UNITS_FORMAT | null;
|
|
12
|
-
isVisible(): boolean;
|
|
13
|
-
multiplier(): number;
|
|
14
|
-
static startAlternateUnits(builder: flatbuffers.Builder): void;
|
|
15
|
-
static addBase(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset): void;
|
|
16
|
-
static addFormat(builder: flatbuffers.Builder, format: DIMENSION_UNITS_FORMAT): void;
|
|
17
|
-
static addIsVisible(builder: flatbuffers.Builder, isVisible: boolean): void;
|
|
18
|
-
static addMultiplier(builder: flatbuffers.Builder, multiplier: number): void;
|
|
19
|
-
static endAlternateUnits(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
20
|
-
static createAlternateUnits(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset, format: DIMENSION_UNITS_FORMAT | null, isVisible: boolean, multiplier: number): flatbuffers.Offset;
|
|
21
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
-
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { _UnitSystemBase } from '../duc/unit-system-base';
|
|
5
|
-
export class AlternateUnits {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.bb = null;
|
|
8
|
-
this.bb_pos = 0;
|
|
9
|
-
}
|
|
10
|
-
__init(i, bb) {
|
|
11
|
-
this.bb_pos = i;
|
|
12
|
-
this.bb = bb;
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
static getRootAsAlternateUnits(bb, obj) {
|
|
16
|
-
return (obj || new AlternateUnits()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
17
|
-
}
|
|
18
|
-
static getSizePrefixedRootAsAlternateUnits(bb, obj) {
|
|
19
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
|
-
return (obj || new AlternateUnits()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
base(obj) {
|
|
23
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
-
return offset ? (obj || new _UnitSystemBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
25
|
-
}
|
|
26
|
-
format() {
|
|
27
|
-
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
|
-
return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
|
|
29
|
-
}
|
|
30
|
-
isVisible() {
|
|
31
|
-
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
32
|
-
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
33
|
-
}
|
|
34
|
-
multiplier() {
|
|
35
|
-
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
36
|
-
return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
|
|
37
|
-
}
|
|
38
|
-
static startAlternateUnits(builder) {
|
|
39
|
-
builder.startObject(4);
|
|
40
|
-
}
|
|
41
|
-
static addBase(builder, baseOffset) {
|
|
42
|
-
builder.addFieldOffset(0, baseOffset, 0);
|
|
43
|
-
}
|
|
44
|
-
static addFormat(builder, format) {
|
|
45
|
-
builder.addFieldInt8(1, format, null);
|
|
46
|
-
}
|
|
47
|
-
static addIsVisible(builder, isVisible) {
|
|
48
|
-
builder.addFieldInt8(2, +isVisible, +false);
|
|
49
|
-
}
|
|
50
|
-
static addMultiplier(builder, multiplier) {
|
|
51
|
-
builder.addFieldFloat32(3, multiplier, 0.0);
|
|
52
|
-
}
|
|
53
|
-
static endAlternateUnits(builder) {
|
|
54
|
-
const offset = builder.endObject();
|
|
55
|
-
return offset;
|
|
56
|
-
}
|
|
57
|
-
static createAlternateUnits(builder, baseOffset, format, isVisible, multiplier) {
|
|
58
|
-
AlternateUnits.startAlternateUnits(builder);
|
|
59
|
-
AlternateUnits.addBase(builder, baseOffset);
|
|
60
|
-
if (format !== null)
|
|
61
|
-
AlternateUnits.addFormat(builder, format);
|
|
62
|
-
AlternateUnits.addIsVisible(builder, isVisible);
|
|
63
|
-
AlternateUnits.addMultiplier(builder, multiplier);
|
|
64
|
-
return AlternateUnits.endAlternateUnits(builder);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as flatbuffers from 'flatbuffers';
|
|
2
|
-
import { ANGULAR_UNITS_FORMAT } from '../duc/angular-units-format';
|
|
3
|
-
import { _UnitSystemBase } from '../duc/unit-system-base';
|
|
4
|
-
export declare class AngularUnitSystem {
|
|
5
|
-
bb: flatbuffers.ByteBuffer | null;
|
|
6
|
-
bb_pos: number;
|
|
7
|
-
__init(i: number, bb: flatbuffers.ByteBuffer): AngularUnitSystem;
|
|
8
|
-
static getRootAsAngularUnitSystem(bb: flatbuffers.ByteBuffer, obj?: AngularUnitSystem): AngularUnitSystem;
|
|
9
|
-
static getSizePrefixedRootAsAngularUnitSystem(bb: flatbuffers.ByteBuffer, obj?: AngularUnitSystem): AngularUnitSystem;
|
|
10
|
-
base(obj?: _UnitSystemBase): _UnitSystemBase | null;
|
|
11
|
-
format(): ANGULAR_UNITS_FORMAT | null;
|
|
12
|
-
static startAngularUnitSystem(builder: flatbuffers.Builder): void;
|
|
13
|
-
static addBase(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset): void;
|
|
14
|
-
static addFormat(builder: flatbuffers.Builder, format: ANGULAR_UNITS_FORMAT): void;
|
|
15
|
-
static endAngularUnitSystem(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
16
|
-
static createAngularUnitSystem(builder: flatbuffers.Builder, baseOffset: flatbuffers.Offset, format: ANGULAR_UNITS_FORMAT | null): flatbuffers.Offset;
|
|
17
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
-
import * as flatbuffers from 'flatbuffers';
|
|
4
|
-
import { _UnitSystemBase } from '../duc/unit-system-base';
|
|
5
|
-
export class AngularUnitSystem {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.bb = null;
|
|
8
|
-
this.bb_pos = 0;
|
|
9
|
-
}
|
|
10
|
-
__init(i, bb) {
|
|
11
|
-
this.bb_pos = i;
|
|
12
|
-
this.bb = bb;
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
static getRootAsAngularUnitSystem(bb, obj) {
|
|
16
|
-
return (obj || new AngularUnitSystem()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
17
|
-
}
|
|
18
|
-
static getSizePrefixedRootAsAngularUnitSystem(bb, obj) {
|
|
19
|
-
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
|
-
return (obj || new AngularUnitSystem()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
-
}
|
|
22
|
-
base(obj) {
|
|
23
|
-
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
-
return offset ? (obj || new _UnitSystemBase()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
25
|
-
}
|
|
26
|
-
format() {
|
|
27
|
-
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
|
-
return offset ? this.bb.readUint8(this.bb_pos + offset) : null;
|
|
29
|
-
}
|
|
30
|
-
static startAngularUnitSystem(builder) {
|
|
31
|
-
builder.startObject(2);
|
|
32
|
-
}
|
|
33
|
-
static addBase(builder, baseOffset) {
|
|
34
|
-
builder.addFieldOffset(0, baseOffset, 0);
|
|
35
|
-
}
|
|
36
|
-
static addFormat(builder, format) {
|
|
37
|
-
builder.addFieldInt8(1, format, null);
|
|
38
|
-
}
|
|
39
|
-
static endAngularUnitSystem(builder) {
|
|
40
|
-
const offset = builder.endObject();
|
|
41
|
-
return offset;
|
|
42
|
-
}
|
|
43
|
-
static createAngularUnitSystem(builder, baseOffset, format) {
|
|
44
|
-
AngularUnitSystem.startAngularUnitSystem(builder);
|
|
45
|
-
AngularUnitSystem.addBase(builder, baseOffset);
|
|
46
|
-
if (format !== null)
|
|
47
|
-
AngularUnitSystem.addFormat(builder, format);
|
|
48
|
-
return AngularUnitSystem.endAngularUnitSystem(builder);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
-
export var ANGULAR_UNITS_FORMAT;
|
|
4
|
-
(function (ANGULAR_UNITS_FORMAT) {
|
|
5
|
-
ANGULAR_UNITS_FORMAT[ANGULAR_UNITS_FORMAT["DECIMAL_DEGREES"] = 10] = "DECIMAL_DEGREES";
|
|
6
|
-
ANGULAR_UNITS_FORMAT[ANGULAR_UNITS_FORMAT["DEGREES_MINUTES_SECONDS"] = 11] = "DEGREES_MINUTES_SECONDS";
|
|
7
|
-
ANGULAR_UNITS_FORMAT[ANGULAR_UNITS_FORMAT["GRADS"] = 12] = "GRADS";
|
|
8
|
-
ANGULAR_UNITS_FORMAT[ANGULAR_UNITS_FORMAT["RADIANS"] = 13] = "RADIANS";
|
|
9
|
-
ANGULAR_UNITS_FORMAT[ANGULAR_UNITS_FORMAT["SURVEYOR"] = 14] = "SURVEYOR";
|
|
10
|
-
})(ANGULAR_UNITS_FORMAT || (ANGULAR_UNITS_FORMAT = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
-
export var AXIS;
|
|
4
|
-
(function (AXIS) {
|
|
5
|
-
AXIS[AXIS["X"] = 10] = "X";
|
|
6
|
-
AXIS[AXIS["Y"] = 20] = "Y";
|
|
7
|
-
AXIS[AXIS["Z"] = 30] = "Z";
|
|
8
|
-
})(AXIS || (AXIS = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
-
export var BEZIER_MIRRORING;
|
|
4
|
-
(function (BEZIER_MIRRORING) {
|
|
5
|
-
BEZIER_MIRRORING[BEZIER_MIRRORING["NONE"] = 10] = "NONE";
|
|
6
|
-
BEZIER_MIRRORING[BEZIER_MIRRORING["ANGLE"] = 11] = "ANGLE";
|
|
7
|
-
BEZIER_MIRRORING[BEZIER_MIRRORING["ANGLE_LENGTH"] = 12] = "ANGLE_LENGTH";
|
|
8
|
-
})(BEZIER_MIRRORING || (BEZIER_MIRRORING = {}));
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
-
export var BLENDING;
|
|
4
|
-
(function (BLENDING) {
|
|
5
|
-
BLENDING[BLENDING["MULTIPLY"] = 11] = "MULTIPLY";
|
|
6
|
-
BLENDING[BLENDING["SCREEN"] = 12] = "SCREEN";
|
|
7
|
-
BLENDING[BLENDING["OVERLAY"] = 13] = "OVERLAY";
|
|
8
|
-
BLENDING[BLENDING["DARKEN"] = 14] = "DARKEN";
|
|
9
|
-
BLENDING[BLENDING["LIGHTEN"] = 15] = "LIGHTEN";
|
|
10
|
-
BLENDING[BLENDING["DIFFERENCE"] = 16] = "DIFFERENCE";
|
|
11
|
-
BLENDING[BLENDING["EXCLUSION"] = 17] = "EXCLUSION";
|
|
12
|
-
})(BLENDING || (BLENDING = {}));
|