ducjs 2.4.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 +4 -1
- package/dist/index.js +4 -1
- package/dist/lazy-files.d.ts +31 -71
- package/dist/lazy-files.js +85 -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 +117 -127
- 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 +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 +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 +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 -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
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
# ducjs
|
|
15
15
|
|
|
16
|
-
The `ducjs` package offers comprehensive TypeScript types and helper functions to work effortlessly with the `duc` CAD file format. Built with
|
|
16
|
+
The `ducjs` package offers comprehensive TypeScript types and helper functions to work effortlessly with the `duc` CAD file format. Built with SQLite and optimized for performance, this package enables you to parse, validate, and manipulate `duc` files with ease.
|
|
17
17
|
|
|
18
18
|
## Documentation
|
|
19
19
|
|
|
@@ -39,4 +39,4 @@ To ensure smooth releases with semantic-release, please follow [these guidelines
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
*The duc format and libraries are constantly evolving, aiming to set new standards in the 2D CAD industry. Be a part of this transformation and help shape the future of design technology!*
|
|
42
|
+
*The duc format and libraries are constantly evolving, aiming to set new standards in the 2D CAD industry. Be a part of this transformation and help shape the future of design technology!*
|
package/dist/enums.d.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native enum definitions for DUC types.
|
|
3
|
+
* Source of truth: duc.sql
|
|
4
|
+
*/
|
|
5
|
+
export declare enum VERTICAL_ALIGN {
|
|
6
|
+
TOP = 10,
|
|
7
|
+
MIDDLE = 11,
|
|
8
|
+
BOTTOM = 12
|
|
9
|
+
}
|
|
10
|
+
export declare enum TEXT_ALIGN {
|
|
11
|
+
LEFT = 10,
|
|
12
|
+
CENTER = 11,
|
|
13
|
+
RIGHT = 12
|
|
14
|
+
}
|
|
15
|
+
export declare enum LINE_SPACING_TYPE {
|
|
16
|
+
AT_LEAST = 10,
|
|
17
|
+
EXACTLY = 11,
|
|
18
|
+
MULTIPLE = 12
|
|
19
|
+
}
|
|
20
|
+
export declare enum STROKE_PLACEMENT {
|
|
21
|
+
INSIDE = 10,
|
|
22
|
+
CENTER = 11,
|
|
23
|
+
OUTSIDE = 12
|
|
24
|
+
}
|
|
25
|
+
export declare enum STROKE_PREFERENCE {
|
|
26
|
+
SOLID = 10,
|
|
27
|
+
DASHED = 11,
|
|
28
|
+
DOTTED = 12,
|
|
29
|
+
CUSTOM = 13
|
|
30
|
+
}
|
|
31
|
+
export declare enum STROKE_SIDE_PREFERENCE {
|
|
32
|
+
TOP = 10,
|
|
33
|
+
BOTTOM = 11,
|
|
34
|
+
LEFT = 12,
|
|
35
|
+
RIGHT = 13,
|
|
36
|
+
CUSTOM = 14,
|
|
37
|
+
ALL = 15
|
|
38
|
+
}
|
|
39
|
+
export declare enum STROKE_CAP {
|
|
40
|
+
BUTT = 10,
|
|
41
|
+
ROUND = 11,
|
|
42
|
+
SQUARE = 12
|
|
43
|
+
}
|
|
44
|
+
export declare enum STROKE_JOIN {
|
|
45
|
+
MITER = 10,
|
|
46
|
+
ROUND = 11,
|
|
47
|
+
BEVEL = 12
|
|
48
|
+
}
|
|
49
|
+
export declare enum LINE_HEAD {
|
|
50
|
+
ARROW = 10,
|
|
51
|
+
BAR = 11,
|
|
52
|
+
CIRCLE = 12,
|
|
53
|
+
CIRCLE_OUTLINED = 13,
|
|
54
|
+
TRIANGLE = 14,
|
|
55
|
+
TRIANGLE_OUTLINED = 15,
|
|
56
|
+
DIAMOND = 16,
|
|
57
|
+
DIAMOND_OUTLINED = 17,
|
|
58
|
+
CROSS = 18,
|
|
59
|
+
OPEN_ARROW = 19,
|
|
60
|
+
REVERSED_ARROW = 20,
|
|
61
|
+
REVERSED_TRIANGLE = 21,
|
|
62
|
+
REVERSED_TRIANGLE_OUTLINED = 22,
|
|
63
|
+
CONE = 23,
|
|
64
|
+
HALF_CONE = 24
|
|
65
|
+
}
|
|
66
|
+
export declare enum BEZIER_MIRRORING {
|
|
67
|
+
NONE = 10,
|
|
68
|
+
ANGLE = 11,
|
|
69
|
+
ANGLE_LENGTH = 12
|
|
70
|
+
}
|
|
71
|
+
export declare enum BLENDING {
|
|
72
|
+
MULTIPLY = 11,
|
|
73
|
+
SCREEN = 12,
|
|
74
|
+
OVERLAY = 13,
|
|
75
|
+
DARKEN = 14,
|
|
76
|
+
LIGHTEN = 15,
|
|
77
|
+
DIFFERENCE = 16,
|
|
78
|
+
EXCLUSION = 17
|
|
79
|
+
}
|
|
80
|
+
export declare enum ELEMENT_CONTENT_PREFERENCE {
|
|
81
|
+
SOLID = 12,
|
|
82
|
+
FILL = 14,
|
|
83
|
+
FIT = 15,
|
|
84
|
+
TILE = 16,
|
|
85
|
+
STRETCH = 17,
|
|
86
|
+
HATCH = 18
|
|
87
|
+
}
|
|
88
|
+
export declare enum HATCH_STYLE {
|
|
89
|
+
NORMAL = 10,
|
|
90
|
+
OUTER = 11,
|
|
91
|
+
IGNORE = 12
|
|
92
|
+
}
|
|
93
|
+
export declare enum IMAGE_STATUS {
|
|
94
|
+
PENDING = 10,
|
|
95
|
+
SAVED = 11,
|
|
96
|
+
ERROR = 12
|
|
97
|
+
}
|
|
98
|
+
export declare enum PRUNING_LEVEL {
|
|
99
|
+
CONSERVATIVE = 10,
|
|
100
|
+
BALANCED = 20,
|
|
101
|
+
AGGRESSIVE = 30
|
|
102
|
+
}
|
|
103
|
+
export declare enum BOOLEAN_OPERATION {
|
|
104
|
+
UNION = 10,
|
|
105
|
+
SUBTRACT = 11,
|
|
106
|
+
INTERSECT = 12,
|
|
107
|
+
EXCLUDE = 13
|
|
108
|
+
}
|
|
109
|
+
export declare enum YOUTUBE_STATES {
|
|
110
|
+
/** The YouTube player is unstarted. */
|
|
111
|
+
UNSTARTED = -1,
|
|
112
|
+
/** The YouTube player has ended. */
|
|
113
|
+
ENDED = 0,
|
|
114
|
+
/** The YouTube player is currently playing. */
|
|
115
|
+
PLAYING = 1,
|
|
116
|
+
/** The YouTube player is paused. */
|
|
117
|
+
PAUSED = 2,
|
|
118
|
+
/** The YouTube player is buffering. */
|
|
119
|
+
BUFFERING = 3,
|
|
120
|
+
/** The YouTube player is cued. */
|
|
121
|
+
CUED = 5
|
|
122
|
+
}
|
|
123
|
+
export declare enum HANDLE_TYPE {
|
|
124
|
+
HANDLE_IN = 10,
|
|
125
|
+
HANDLE_OUT = 11
|
|
126
|
+
}
|
|
127
|
+
export declare enum UNIT_SYSTEM {
|
|
128
|
+
METRIC = 10,
|
|
129
|
+
IMPERIAL = 11
|
|
130
|
+
}
|
|
131
|
+
export declare enum AXIS {
|
|
132
|
+
X = 10,
|
|
133
|
+
Y = 20,
|
|
134
|
+
Z = 30
|
|
135
|
+
}
|
package/dist/enums.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native enum definitions for DUC types.
|
|
3
|
+
* Source of truth: duc.sql
|
|
4
|
+
*/
|
|
5
|
+
export var VERTICAL_ALIGN;
|
|
6
|
+
(function (VERTICAL_ALIGN) {
|
|
7
|
+
VERTICAL_ALIGN[VERTICAL_ALIGN["TOP"] = 10] = "TOP";
|
|
8
|
+
VERTICAL_ALIGN[VERTICAL_ALIGN["MIDDLE"] = 11] = "MIDDLE";
|
|
9
|
+
VERTICAL_ALIGN[VERTICAL_ALIGN["BOTTOM"] = 12] = "BOTTOM";
|
|
10
|
+
})(VERTICAL_ALIGN || (VERTICAL_ALIGN = {}));
|
|
11
|
+
export var TEXT_ALIGN;
|
|
12
|
+
(function (TEXT_ALIGN) {
|
|
13
|
+
TEXT_ALIGN[TEXT_ALIGN["LEFT"] = 10] = "LEFT";
|
|
14
|
+
TEXT_ALIGN[TEXT_ALIGN["CENTER"] = 11] = "CENTER";
|
|
15
|
+
TEXT_ALIGN[TEXT_ALIGN["RIGHT"] = 12] = "RIGHT";
|
|
16
|
+
})(TEXT_ALIGN || (TEXT_ALIGN = {}));
|
|
17
|
+
export var LINE_SPACING_TYPE;
|
|
18
|
+
(function (LINE_SPACING_TYPE) {
|
|
19
|
+
LINE_SPACING_TYPE[LINE_SPACING_TYPE["AT_LEAST"] = 10] = "AT_LEAST";
|
|
20
|
+
LINE_SPACING_TYPE[LINE_SPACING_TYPE["EXACTLY"] = 11] = "EXACTLY";
|
|
21
|
+
LINE_SPACING_TYPE[LINE_SPACING_TYPE["MULTIPLE"] = 12] = "MULTIPLE";
|
|
22
|
+
})(LINE_SPACING_TYPE || (LINE_SPACING_TYPE = {}));
|
|
23
|
+
export var STROKE_PLACEMENT;
|
|
24
|
+
(function (STROKE_PLACEMENT) {
|
|
25
|
+
STROKE_PLACEMENT[STROKE_PLACEMENT["INSIDE"] = 10] = "INSIDE";
|
|
26
|
+
STROKE_PLACEMENT[STROKE_PLACEMENT["CENTER"] = 11] = "CENTER";
|
|
27
|
+
STROKE_PLACEMENT[STROKE_PLACEMENT["OUTSIDE"] = 12] = "OUTSIDE";
|
|
28
|
+
})(STROKE_PLACEMENT || (STROKE_PLACEMENT = {}));
|
|
29
|
+
export var STROKE_PREFERENCE;
|
|
30
|
+
(function (STROKE_PREFERENCE) {
|
|
31
|
+
STROKE_PREFERENCE[STROKE_PREFERENCE["SOLID"] = 10] = "SOLID";
|
|
32
|
+
STROKE_PREFERENCE[STROKE_PREFERENCE["DASHED"] = 11] = "DASHED";
|
|
33
|
+
STROKE_PREFERENCE[STROKE_PREFERENCE["DOTTED"] = 12] = "DOTTED";
|
|
34
|
+
STROKE_PREFERENCE[STROKE_PREFERENCE["CUSTOM"] = 13] = "CUSTOM";
|
|
35
|
+
})(STROKE_PREFERENCE || (STROKE_PREFERENCE = {}));
|
|
36
|
+
export var STROKE_SIDE_PREFERENCE;
|
|
37
|
+
(function (STROKE_SIDE_PREFERENCE) {
|
|
38
|
+
STROKE_SIDE_PREFERENCE[STROKE_SIDE_PREFERENCE["TOP"] = 10] = "TOP";
|
|
39
|
+
STROKE_SIDE_PREFERENCE[STROKE_SIDE_PREFERENCE["BOTTOM"] = 11] = "BOTTOM";
|
|
40
|
+
STROKE_SIDE_PREFERENCE[STROKE_SIDE_PREFERENCE["LEFT"] = 12] = "LEFT";
|
|
41
|
+
STROKE_SIDE_PREFERENCE[STROKE_SIDE_PREFERENCE["RIGHT"] = 13] = "RIGHT";
|
|
42
|
+
STROKE_SIDE_PREFERENCE[STROKE_SIDE_PREFERENCE["CUSTOM"] = 14] = "CUSTOM";
|
|
43
|
+
STROKE_SIDE_PREFERENCE[STROKE_SIDE_PREFERENCE["ALL"] = 15] = "ALL";
|
|
44
|
+
})(STROKE_SIDE_PREFERENCE || (STROKE_SIDE_PREFERENCE = {}));
|
|
45
|
+
export var STROKE_CAP;
|
|
46
|
+
(function (STROKE_CAP) {
|
|
47
|
+
STROKE_CAP[STROKE_CAP["BUTT"] = 10] = "BUTT";
|
|
48
|
+
STROKE_CAP[STROKE_CAP["ROUND"] = 11] = "ROUND";
|
|
49
|
+
STROKE_CAP[STROKE_CAP["SQUARE"] = 12] = "SQUARE";
|
|
50
|
+
})(STROKE_CAP || (STROKE_CAP = {}));
|
|
51
|
+
export var STROKE_JOIN;
|
|
52
|
+
(function (STROKE_JOIN) {
|
|
53
|
+
STROKE_JOIN[STROKE_JOIN["MITER"] = 10] = "MITER";
|
|
54
|
+
STROKE_JOIN[STROKE_JOIN["ROUND"] = 11] = "ROUND";
|
|
55
|
+
STROKE_JOIN[STROKE_JOIN["BEVEL"] = 12] = "BEVEL";
|
|
56
|
+
})(STROKE_JOIN || (STROKE_JOIN = {}));
|
|
57
|
+
export var LINE_HEAD;
|
|
58
|
+
(function (LINE_HEAD) {
|
|
59
|
+
LINE_HEAD[LINE_HEAD["ARROW"] = 10] = "ARROW";
|
|
60
|
+
LINE_HEAD[LINE_HEAD["BAR"] = 11] = "BAR";
|
|
61
|
+
LINE_HEAD[LINE_HEAD["CIRCLE"] = 12] = "CIRCLE";
|
|
62
|
+
LINE_HEAD[LINE_HEAD["CIRCLE_OUTLINED"] = 13] = "CIRCLE_OUTLINED";
|
|
63
|
+
LINE_HEAD[LINE_HEAD["TRIANGLE"] = 14] = "TRIANGLE";
|
|
64
|
+
LINE_HEAD[LINE_HEAD["TRIANGLE_OUTLINED"] = 15] = "TRIANGLE_OUTLINED";
|
|
65
|
+
LINE_HEAD[LINE_HEAD["DIAMOND"] = 16] = "DIAMOND";
|
|
66
|
+
LINE_HEAD[LINE_HEAD["DIAMOND_OUTLINED"] = 17] = "DIAMOND_OUTLINED";
|
|
67
|
+
LINE_HEAD[LINE_HEAD["CROSS"] = 18] = "CROSS";
|
|
68
|
+
LINE_HEAD[LINE_HEAD["OPEN_ARROW"] = 19] = "OPEN_ARROW";
|
|
69
|
+
LINE_HEAD[LINE_HEAD["REVERSED_ARROW"] = 20] = "REVERSED_ARROW";
|
|
70
|
+
LINE_HEAD[LINE_HEAD["REVERSED_TRIANGLE"] = 21] = "REVERSED_TRIANGLE";
|
|
71
|
+
LINE_HEAD[LINE_HEAD["REVERSED_TRIANGLE_OUTLINED"] = 22] = "REVERSED_TRIANGLE_OUTLINED";
|
|
72
|
+
LINE_HEAD[LINE_HEAD["CONE"] = 23] = "CONE";
|
|
73
|
+
LINE_HEAD[LINE_HEAD["HALF_CONE"] = 24] = "HALF_CONE";
|
|
74
|
+
})(LINE_HEAD || (LINE_HEAD = {}));
|
|
75
|
+
export var BEZIER_MIRRORING;
|
|
76
|
+
(function (BEZIER_MIRRORING) {
|
|
77
|
+
BEZIER_MIRRORING[BEZIER_MIRRORING["NONE"] = 10] = "NONE";
|
|
78
|
+
BEZIER_MIRRORING[BEZIER_MIRRORING["ANGLE"] = 11] = "ANGLE";
|
|
79
|
+
BEZIER_MIRRORING[BEZIER_MIRRORING["ANGLE_LENGTH"] = 12] = "ANGLE_LENGTH";
|
|
80
|
+
})(BEZIER_MIRRORING || (BEZIER_MIRRORING = {}));
|
|
81
|
+
export var BLENDING;
|
|
82
|
+
(function (BLENDING) {
|
|
83
|
+
BLENDING[BLENDING["MULTIPLY"] = 11] = "MULTIPLY";
|
|
84
|
+
BLENDING[BLENDING["SCREEN"] = 12] = "SCREEN";
|
|
85
|
+
BLENDING[BLENDING["OVERLAY"] = 13] = "OVERLAY";
|
|
86
|
+
BLENDING[BLENDING["DARKEN"] = 14] = "DARKEN";
|
|
87
|
+
BLENDING[BLENDING["LIGHTEN"] = 15] = "LIGHTEN";
|
|
88
|
+
BLENDING[BLENDING["DIFFERENCE"] = 16] = "DIFFERENCE";
|
|
89
|
+
BLENDING[BLENDING["EXCLUSION"] = 17] = "EXCLUSION";
|
|
90
|
+
})(BLENDING || (BLENDING = {}));
|
|
91
|
+
export var ELEMENT_CONTENT_PREFERENCE;
|
|
92
|
+
(function (ELEMENT_CONTENT_PREFERENCE) {
|
|
93
|
+
ELEMENT_CONTENT_PREFERENCE[ELEMENT_CONTENT_PREFERENCE["SOLID"] = 12] = "SOLID";
|
|
94
|
+
ELEMENT_CONTENT_PREFERENCE[ELEMENT_CONTENT_PREFERENCE["FILL"] = 14] = "FILL";
|
|
95
|
+
ELEMENT_CONTENT_PREFERENCE[ELEMENT_CONTENT_PREFERENCE["FIT"] = 15] = "FIT";
|
|
96
|
+
ELEMENT_CONTENT_PREFERENCE[ELEMENT_CONTENT_PREFERENCE["TILE"] = 16] = "TILE";
|
|
97
|
+
ELEMENT_CONTENT_PREFERENCE[ELEMENT_CONTENT_PREFERENCE["STRETCH"] = 17] = "STRETCH";
|
|
98
|
+
ELEMENT_CONTENT_PREFERENCE[ELEMENT_CONTENT_PREFERENCE["HATCH"] = 18] = "HATCH";
|
|
99
|
+
})(ELEMENT_CONTENT_PREFERENCE || (ELEMENT_CONTENT_PREFERENCE = {}));
|
|
100
|
+
export var HATCH_STYLE;
|
|
101
|
+
(function (HATCH_STYLE) {
|
|
102
|
+
HATCH_STYLE[HATCH_STYLE["NORMAL"] = 10] = "NORMAL";
|
|
103
|
+
HATCH_STYLE[HATCH_STYLE["OUTER"] = 11] = "OUTER";
|
|
104
|
+
HATCH_STYLE[HATCH_STYLE["IGNORE"] = 12] = "IGNORE";
|
|
105
|
+
})(HATCH_STYLE || (HATCH_STYLE = {}));
|
|
106
|
+
export var IMAGE_STATUS;
|
|
107
|
+
(function (IMAGE_STATUS) {
|
|
108
|
+
IMAGE_STATUS[IMAGE_STATUS["PENDING"] = 10] = "PENDING";
|
|
109
|
+
IMAGE_STATUS[IMAGE_STATUS["SAVED"] = 11] = "SAVED";
|
|
110
|
+
IMAGE_STATUS[IMAGE_STATUS["ERROR"] = 12] = "ERROR";
|
|
111
|
+
})(IMAGE_STATUS || (IMAGE_STATUS = {}));
|
|
112
|
+
export var PRUNING_LEVEL;
|
|
113
|
+
(function (PRUNING_LEVEL) {
|
|
114
|
+
PRUNING_LEVEL[PRUNING_LEVEL["CONSERVATIVE"] = 10] = "CONSERVATIVE";
|
|
115
|
+
PRUNING_LEVEL[PRUNING_LEVEL["BALANCED"] = 20] = "BALANCED";
|
|
116
|
+
PRUNING_LEVEL[PRUNING_LEVEL["AGGRESSIVE"] = 30] = "AGGRESSIVE";
|
|
117
|
+
})(PRUNING_LEVEL || (PRUNING_LEVEL = {}));
|
|
118
|
+
export var BOOLEAN_OPERATION;
|
|
119
|
+
(function (BOOLEAN_OPERATION) {
|
|
120
|
+
BOOLEAN_OPERATION[BOOLEAN_OPERATION["UNION"] = 10] = "UNION";
|
|
121
|
+
BOOLEAN_OPERATION[BOOLEAN_OPERATION["SUBTRACT"] = 11] = "SUBTRACT";
|
|
122
|
+
BOOLEAN_OPERATION[BOOLEAN_OPERATION["INTERSECT"] = 12] = "INTERSECT";
|
|
123
|
+
BOOLEAN_OPERATION[BOOLEAN_OPERATION["EXCLUDE"] = 13] = "EXCLUDE";
|
|
124
|
+
})(BOOLEAN_OPERATION || (BOOLEAN_OPERATION = {}));
|
|
125
|
+
export var YOUTUBE_STATES;
|
|
126
|
+
(function (YOUTUBE_STATES) {
|
|
127
|
+
/** The YouTube player is unstarted. */
|
|
128
|
+
YOUTUBE_STATES[YOUTUBE_STATES["UNSTARTED"] = -1] = "UNSTARTED";
|
|
129
|
+
/** The YouTube player has ended. */
|
|
130
|
+
YOUTUBE_STATES[YOUTUBE_STATES["ENDED"] = 0] = "ENDED";
|
|
131
|
+
/** The YouTube player is currently playing. */
|
|
132
|
+
YOUTUBE_STATES[YOUTUBE_STATES["PLAYING"] = 1] = "PLAYING";
|
|
133
|
+
/** The YouTube player is paused. */
|
|
134
|
+
YOUTUBE_STATES[YOUTUBE_STATES["PAUSED"] = 2] = "PAUSED";
|
|
135
|
+
/** The YouTube player is buffering. */
|
|
136
|
+
YOUTUBE_STATES[YOUTUBE_STATES["BUFFERING"] = 3] = "BUFFERING";
|
|
137
|
+
/** The YouTube player is cued. */
|
|
138
|
+
YOUTUBE_STATES[YOUTUBE_STATES["CUED"] = 5] = "CUED";
|
|
139
|
+
})(YOUTUBE_STATES || (YOUTUBE_STATES = {}));
|
|
140
|
+
export var HANDLE_TYPE;
|
|
141
|
+
(function (HANDLE_TYPE) {
|
|
142
|
+
HANDLE_TYPE[HANDLE_TYPE["HANDLE_IN"] = 10] = "HANDLE_IN";
|
|
143
|
+
HANDLE_TYPE[HANDLE_TYPE["HANDLE_OUT"] = 11] = "HANDLE_OUT";
|
|
144
|
+
})(HANDLE_TYPE || (HANDLE_TYPE = {}));
|
|
145
|
+
export var UNIT_SYSTEM;
|
|
146
|
+
(function (UNIT_SYSTEM) {
|
|
147
|
+
UNIT_SYSTEM[UNIT_SYSTEM["METRIC"] = 10] = "METRIC";
|
|
148
|
+
UNIT_SYSTEM[UNIT_SYSTEM["IMPERIAL"] = 11] = "IMPERIAL";
|
|
149
|
+
})(UNIT_SYSTEM || (UNIT_SYSTEM = {}));
|
|
150
|
+
export var AXIS;
|
|
151
|
+
(function (AXIS) {
|
|
152
|
+
AXIS[AXIS["X"] = 10] = "X";
|
|
153
|
+
AXIS[AXIS["Y"] = 20] = "Y";
|
|
154
|
+
AXIS[AXIS["Z"] = 30] = "Z";
|
|
155
|
+
})(AXIS || (AXIS = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export *
|
|
1
|
+
export * from "./enums";
|
|
2
2
|
export * from "./lazy-files";
|
|
3
3
|
export * from "./parse";
|
|
4
4
|
export * from "./restore";
|
|
5
5
|
export * from "./serialize";
|
|
6
6
|
export * from "./technical";
|
|
7
|
+
export * from "./transform";
|
|
7
8
|
export * from "./types";
|
|
8
9
|
export * from "./utils";
|
|
10
|
+
export * as vc from "./version-control";
|
|
11
|
+
export { ensureWasm, getWasmBinary } from "./wasm";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export *
|
|
1
|
+
export * from "./enums";
|
|
2
2
|
export * from "./lazy-files";
|
|
3
3
|
export * from "./parse";
|
|
4
4
|
export * from "./restore";
|
|
5
5
|
export * from "./serialize";
|
|
6
6
|
export * from "./technical";
|
|
7
|
+
export * from "./transform";
|
|
7
8
|
export * from "./types";
|
|
8
9
|
export * from "./utils";
|
|
10
|
+
export * as vc from "./version-control";
|
|
11
|
+
export { ensureWasm, getWasmBinary } from "./wasm";
|
package/dist/lazy-files.d.ts
CHANGED
|
@@ -1,84 +1,44 @@
|
|
|
1
|
+
import type { DucExternalFileData, DucExternalFiles } from "./types";
|
|
2
|
+
export type LazyFileMetadata = {
|
|
3
|
+
id: string;
|
|
4
|
+
mimeType: string;
|
|
5
|
+
created: number;
|
|
6
|
+
lastRetrieved?: number;
|
|
7
|
+
version?: number;
|
|
8
|
+
};
|
|
1
9
|
/**
|
|
2
|
-
*
|
|
10
|
+
* Provides lazy access to external files embedded inside a `.duc` buffer.
|
|
3
11
|
*
|
|
4
|
-
* Instead of
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* (a Uint8Array pointing into the original buffer), so no allocation occurs until the
|
|
8
|
-
* consumer actually needs the data.
|
|
9
|
-
*
|
|
10
|
-
* Memory lifecycle:
|
|
11
|
-
* 1. On parse: only metadata (~200 bytes per file) enters JS heap.
|
|
12
|
-
* 2. On demand: `getFileData(fileId)` reads the zero-copy slice from the buffer.
|
|
13
|
-
* 3. The caller (renderer/worker) uses the data, then lets it GC naturally.
|
|
14
|
-
* 4. If the store is released, the buffer reference is dropped, freeing everything.
|
|
15
|
-
*
|
|
16
|
-
* This is the key to supporting 1000s of external files without RAM bloat.
|
|
12
|
+
* Instead of loading all file blobs into memory at parse time, this store
|
|
13
|
+
* keeps a reference to the raw `.duc` buffer and fetches individual files
|
|
14
|
+
* on demand via WASM calls.
|
|
17
15
|
*/
|
|
18
|
-
import type { DucExternalFileData, DucExternalFileMetadata, DucExternalFiles } from "./types";
|
|
19
|
-
export type ExternalFileMetadataMap = Record<string, DucExternalFileMetadata>;
|
|
20
16
|
export declare class LazyExternalFileStore {
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
/** Map from file id → lazy entry */
|
|
25
|
-
private _entries;
|
|
26
|
-
/** Map from element key → file id (the external_files vector uses element id as key) */
|
|
27
|
-
private _keyToFileId;
|
|
28
|
-
/**
|
|
29
|
-
* Files that were added at runtime (e.g. user uploading a new image).
|
|
30
|
-
* These aren't in the original FlatBuffer so we hold their data directly.
|
|
31
|
-
*/
|
|
32
|
-
private _runtimeFiles;
|
|
17
|
+
private buffer;
|
|
18
|
+
private metadataCache;
|
|
19
|
+
private runtimeFiles;
|
|
33
20
|
constructor(buffer: Uint8Array);
|
|
34
|
-
|
|
35
|
-
/** Total number of external files */
|
|
21
|
+
get isReleased(): boolean;
|
|
36
22
|
get size(): number;
|
|
37
|
-
/**
|
|
23
|
+
/** Check if a file with this ID exists. */
|
|
38
24
|
has(fileId: string): boolean;
|
|
39
|
-
/** Get metadata
|
|
40
|
-
getMetadata(fileId: string):
|
|
41
|
-
/** Get
|
|
42
|
-
getAllMetadata():
|
|
43
|
-
/**
|
|
44
|
-
* Get full file data (metadata + binary bytes) ON DEMAND.
|
|
45
|
-
*
|
|
46
|
-
* For files from the original FlatBuffer, this returns a zero-copy Uint8Array
|
|
47
|
-
* view into the original buffer — no allocation for the file bytes themselves.
|
|
48
|
-
* The view is valid as long as this store hasn't been released.
|
|
49
|
-
*
|
|
50
|
-
* For runtime-added files, returns the data directly.
|
|
51
|
-
*/
|
|
25
|
+
/** Get metadata (without data blob) for a specific file. */
|
|
26
|
+
getMetadata(fileId: string): LazyFileMetadata | undefined;
|
|
27
|
+
/** Get metadata for all files. */
|
|
28
|
+
getAllMetadata(): LazyFileMetadata[];
|
|
29
|
+
/** Fetch the full file data (including blob) for a specific file. */
|
|
52
30
|
getFileData(fileId: string): DucExternalFileData | null;
|
|
53
|
-
/**
|
|
54
|
-
* Get a detached copy of the file data (allocates new ArrayBuffer).
|
|
55
|
-
* Use this when you need to transfer data to a worker or keep it beyond store lifetime.
|
|
56
|
-
*/
|
|
31
|
+
/** Fetch file data and return a copy of the data buffer (safe for transfer). */
|
|
57
32
|
getFileDataCopy(fileId: string): DucExternalFileData | null;
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/** Remove a runtime-added file */
|
|
64
|
-
removeRuntimeFile(fileId: string): void;
|
|
65
|
-
/**
|
|
66
|
-
* Export all files as a standard DucExternalFiles record.
|
|
67
|
-
* This COPIES all file data eagerly — use only for serialization.
|
|
68
|
-
*/
|
|
33
|
+
/** Add a file at runtime (not persisted in .duc until next serialize). */
|
|
34
|
+
addRuntimeFile(fileId: string, data: DucExternalFileData): void;
|
|
35
|
+
/** Remove a runtime file. */
|
|
36
|
+
removeRuntimeFile(fileId: string): boolean;
|
|
37
|
+
/** Export all files eagerly as a DucExternalFiles record. */
|
|
69
38
|
toExternalFiles(): DucExternalFiles;
|
|
70
|
-
/**
|
|
71
|
-
* Merge runtime files from the given DucExternalFiles map.
|
|
72
|
-
* Only adds files not already present in the store.
|
|
73
|
-
*/
|
|
39
|
+
/** Merge files from another source (only adds missing). */
|
|
74
40
|
mergeFiles(files: DucExternalFiles): void;
|
|
75
|
-
/**
|
|
76
|
-
get estimatedMetadataBytes(): number;
|
|
77
|
-
/**
|
|
78
|
-
* Release the FlatBuffer reference. After this, only runtime-added files remain accessible.
|
|
79
|
-
* Call this when switching documents or when the store is no longer needed.
|
|
80
|
-
*/
|
|
41
|
+
/** Release the underlying buffer to free memory. */
|
|
81
42
|
release(): void;
|
|
82
|
-
|
|
83
|
-
get isReleased(): boolean;
|
|
43
|
+
private getMetadataMap;
|
|
84
44
|
}
|