ducjs 1.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/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/flatbuffers/duc/alternate-units.d.ts +21 -0
- package/dist/flatbuffers/duc/alternate-units.js +66 -0
- package/dist/flatbuffers/duc/angular-unit-system.d.ts +17 -0
- package/dist/flatbuffers/duc/angular-unit-system.js +50 -0
- package/dist/flatbuffers/duc/angular-units-format.d.ts +7 -0
- package/dist/flatbuffers/duc/angular-units-format.js +10 -0
- package/dist/flatbuffers/duc/axis.d.ts +5 -0
- package/dist/flatbuffers/duc/axis.js +8 -0
- package/dist/flatbuffers/duc/bezier-mirroring.d.ts +5 -0
- package/dist/flatbuffers/duc/bezier-mirroring.js +8 -0
- package/dist/flatbuffers/duc/blending.d.ts +9 -0
- package/dist/flatbuffers/duc/blending.js +12 -0
- package/dist/flatbuffers/duc/block-attachment.d.ts +4 -0
- package/dist/flatbuffers/duc/block-attachment.js +7 -0
- package/dist/flatbuffers/duc/boolean-operation.d.ts +6 -0
- package/dist/flatbuffers/duc/boolean-operation.js +9 -0
- package/dist/flatbuffers/duc/bound-element.d.ts +17 -0
- package/dist/flatbuffers/duc/bound-element.js +48 -0
- package/dist/flatbuffers/duc/checkpoint.d.ts +22 -0
- package/dist/flatbuffers/duc/checkpoint.js +75 -0
- package/dist/flatbuffers/duc/column-layout.d.ts +22 -0
- package/dist/flatbuffers/duc/column-layout.js +72 -0
- package/dist/flatbuffers/duc/column-type.d.ts +5 -0
- package/dist/flatbuffers/duc/column-type.js +8 -0
- package/dist/flatbuffers/duc/custom-hatch-pattern.d.ts +23 -0
- package/dist/flatbuffers/duc/custom-hatch-pattern.js +71 -0
- package/dist/flatbuffers/duc/datum-bracket-style.d.ts +5 -0
- package/dist/flatbuffers/duc/datum-bracket-style.js +8 -0
- package/dist/flatbuffers/duc/datum-reference.d.ts +17 -0
- package/dist/flatbuffers/duc/datum-reference.js +49 -0
- package/dist/flatbuffers/duc/datum-target-type.d.ts +6 -0
- package/dist/flatbuffers/duc/datum-target-type.js +9 -0
- package/dist/flatbuffers/duc/decimal-separator.d.ts +4 -0
- package/dist/flatbuffers/duc/decimal-separator.js +7 -0
- package/dist/flatbuffers/duc/delta.d.ts +20 -0
- package/dist/flatbuffers/duc/delta.js +64 -0
- package/dist/flatbuffers/duc/dictionary-entry.d.ts +17 -0
- package/dist/flatbuffers/duc/dictionary-entry.js +49 -0
- package/dist/flatbuffers/duc/dimension-baseline-data.d.ts +14 -0
- package/dist/flatbuffers/duc/dimension-baseline-data.js +40 -0
- package/dist/flatbuffers/duc/dimension-bindings.d.ts +17 -0
- package/dist/flatbuffers/duc/dimension-bindings.js +50 -0
- package/dist/flatbuffers/duc/dimension-continue-data.d.ts +14 -0
- package/dist/flatbuffers/duc/dimension-continue-data.js +40 -0
- package/dist/flatbuffers/duc/dimension-definition-points.d.ts +21 -0
- package/dist/flatbuffers/duc/dimension-definition-points.js +64 -0
- package/dist/flatbuffers/duc/dimension-ext-line-style.d.ts +18 -0
- package/dist/flatbuffers/duc/dimension-ext-line-style.js +57 -0
- package/dist/flatbuffers/duc/dimension-fit-rule.d.ts +6 -0
- package/dist/flatbuffers/duc/dimension-fit-rule.js +9 -0
- package/dist/flatbuffers/duc/dimension-fit-style.d.ts +19 -0
- package/dist/flatbuffers/duc/dimension-fit-style.js +58 -0
- package/dist/flatbuffers/duc/dimension-line-style.d.ts +16 -0
- package/dist/flatbuffers/duc/dimension-line-style.js +49 -0
- package/dist/flatbuffers/duc/dimension-symbol-style.d.ts +22 -0
- package/dist/flatbuffers/duc/dimension-symbol-style.js +72 -0
- package/dist/flatbuffers/duc/dimension-text-placement.d.ts +5 -0
- package/dist/flatbuffers/duc/dimension-text-placement.js +8 -0
- package/dist/flatbuffers/duc/dimension-tolerance-style.d.ts +24 -0
- package/dist/flatbuffers/duc/dimension-tolerance-style.js +71 -0
- package/dist/flatbuffers/duc/dimension-type.d.ts +15 -0
- package/dist/flatbuffers/duc/dimension-type.js +18 -0
- package/dist/flatbuffers/duc/dimension-units-format.d.ts +7 -0
- package/dist/flatbuffers/duc/dimension-units-format.js +10 -0
- package/dist/flatbuffers/duc/dimension-validation-rules.d.ts +25 -0
- package/dist/flatbuffers/duc/dimension-validation-rules.js +74 -0
- package/dist/flatbuffers/duc/duc-arrow-element.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-arrow-element.js +49 -0
- package/dist/flatbuffers/duc/duc-block-attribute-definition-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-block-attribute-definition-entry.js +44 -0
- package/dist/flatbuffers/duc/duc-block-attribute-definition.d.ts +22 -0
- package/dist/flatbuffers/duc/duc-block-attribute-definition.js +64 -0
- package/dist/flatbuffers/duc/duc-block-duplication-array.d.ts +19 -0
- package/dist/flatbuffers/duc/duc-block-duplication-array.js +64 -0
- package/dist/flatbuffers/duc/duc-block-instance-element.d.ts +30 -0
- package/dist/flatbuffers/duc/duc-block-instance-element.js +94 -0
- package/dist/flatbuffers/duc/duc-block.d.ts +34 -0
- package/dist/flatbuffers/duc/duc-block.js +111 -0
- package/dist/flatbuffers/duc/duc-common-style.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-common-style.js +44 -0
- package/dist/flatbuffers/duc/duc-dimension-element.d.ts +45 -0
- package/dist/flatbuffers/duc/duc-dimension-element.js +120 -0
- package/dist/flatbuffers/duc/duc-dimension-style.d.ts +28 -0
- package/dist/flatbuffers/duc/duc-dimension-style.js +76 -0
- package/dist/flatbuffers/duc/duc-doc-element.d.ts +33 -0
- package/dist/flatbuffers/duc/duc-doc-element.js +95 -0
- package/dist/flatbuffers/duc/duc-doc-style.d.ts +19 -0
- package/dist/flatbuffers/duc/duc-doc-style.js +52 -0
- package/dist/flatbuffers/duc/duc-element-base.d.ts +88 -0
- package/dist/flatbuffers/duc/duc-element-base.js +269 -0
- package/dist/flatbuffers/duc/duc-element-styles-base.d.ts +30 -0
- package/dist/flatbuffers/duc/duc-element-styles-base.js +103 -0
- package/dist/flatbuffers/duc/duc-ellipse-element.d.ts +22 -0
- package/dist/flatbuffers/duc/duc-ellipse-element.js +73 -0
- package/dist/flatbuffers/duc/duc-embeddable-element.d.ts +14 -0
- package/dist/flatbuffers/duc/duc-embeddable-element.js +41 -0
- package/dist/flatbuffers/duc/duc-external-file-data.d.ts +27 -0
- package/dist/flatbuffers/duc/duc-external-file-data.js +92 -0
- package/dist/flatbuffers/duc/duc-external-file-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-external-file-entry.js +44 -0
- package/dist/flatbuffers/duc/duc-feature-control-frame-element.d.ts +31 -0
- package/dist/flatbuffers/duc/duc-feature-control-frame-element.js +89 -0
- package/dist/flatbuffers/duc/duc-feature-control-frame-style.d.ts +25 -0
- package/dist/flatbuffers/duc/duc-feature-control-frame-style.js +68 -0
- package/dist/flatbuffers/duc/duc-frame-element.d.ts +14 -0
- package/dist/flatbuffers/duc/duc-frame-element.js +41 -0
- package/dist/flatbuffers/duc/duc-free-draw-element.d.ts +52 -0
- package/dist/flatbuffers/duc/duc-free-draw-element.js +154 -0
- package/dist/flatbuffers/duc/duc-free-draw-ends.d.ts +18 -0
- package/dist/flatbuffers/duc/duc-free-draw-ends.js +56 -0
- package/dist/flatbuffers/duc/duc-global-state.d.ts +37 -0
- package/dist/flatbuffers/duc/duc-global-state.js +121 -0
- package/dist/flatbuffers/duc/duc-group.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-group.js +44 -0
- package/dist/flatbuffers/duc/duc-hatch-style.d.ts +28 -0
- package/dist/flatbuffers/duc/duc-hatch-style.js +79 -0
- package/dist/flatbuffers/duc/duc-head.d.ts +19 -0
- package/dist/flatbuffers/duc/duc-head.js +57 -0
- package/dist/flatbuffers/duc/duc-image-element.d.ts +35 -0
- package/dist/flatbuffers/duc/duc-image-element.js +91 -0
- package/dist/flatbuffers/duc/duc-image-filter.d.ts +15 -0
- package/dist/flatbuffers/duc/duc-image-filter.js +48 -0
- package/dist/flatbuffers/duc/duc-layer-overrides.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-layer-overrides.js +44 -0
- package/dist/flatbuffers/duc/duc-layer.d.ts +21 -0
- package/dist/flatbuffers/duc/duc-layer.js +59 -0
- package/dist/flatbuffers/duc/duc-leader-element.d.ts +22 -0
- package/dist/flatbuffers/duc/duc-leader-element.js +60 -0
- package/dist/flatbuffers/duc/duc-leader-style.d.ts +30 -0
- package/dist/flatbuffers/duc/duc-leader-style.js +87 -0
- package/dist/flatbuffers/duc/duc-line-reference.d.ts +15 -0
- package/dist/flatbuffers/duc/duc-line-reference.js +43 -0
- package/dist/flatbuffers/duc/duc-line.d.ts +15 -0
- package/dist/flatbuffers/duc/duc-line.js +43 -0
- package/dist/flatbuffers/duc/duc-linear-element-base.d.ts +38 -0
- package/dist/flatbuffers/duc/duc-linear-element-base.js +124 -0
- package/dist/flatbuffers/duc/duc-linear-element.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-linear-element.js +49 -0
- package/dist/flatbuffers/duc/duc-local-state.d.ts +68 -0
- package/dist/flatbuffers/duc/duc-local-state.js +206 -0
- package/dist/flatbuffers/duc/duc-mermaid-element.d.ts +23 -0
- package/dist/flatbuffers/duc/duc-mermaid-element.js +65 -0
- package/dist/flatbuffers/duc/duc-parametric-element.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-parametric-element.js +44 -0
- package/dist/flatbuffers/duc/duc-path.d.ts +26 -0
- package/dist/flatbuffers/duc/duc-path.js +69 -0
- package/dist/flatbuffers/duc/duc-pdf-element.d.ts +17 -0
- package/dist/flatbuffers/duc/duc-pdf-element.js +49 -0
- package/dist/flatbuffers/duc/duc-plot-element.d.ts +19 -0
- package/dist/flatbuffers/duc/duc-plot-element.js +52 -0
- package/dist/flatbuffers/duc/duc-plot-style.d.ts +14 -0
- package/dist/flatbuffers/duc/duc-plot-style.js +41 -0
- package/dist/flatbuffers/duc/duc-point-binding.d.ts +26 -0
- package/dist/flatbuffers/duc/duc-point-binding.js +73 -0
- package/dist/flatbuffers/duc/duc-point.d.ts +18 -0
- package/dist/flatbuffers/duc/duc-point.js +57 -0
- package/dist/flatbuffers/duc/duc-polygon-element.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-polygon-element.js +49 -0
- package/dist/flatbuffers/duc/duc-rectangle-element.d.ts +14 -0
- package/dist/flatbuffers/duc/duc-rectangle-element.js +41 -0
- package/dist/flatbuffers/duc/duc-region.d.ts +19 -0
- package/dist/flatbuffers/duc/duc-region.js +51 -0
- package/dist/flatbuffers/duc/duc-stack-base.d.ts +27 -0
- package/dist/flatbuffers/duc/duc-stack-base.js +78 -0
- package/dist/flatbuffers/duc/duc-stack-element-base.d.ts +23 -0
- package/dist/flatbuffers/duc/duc-stack-element-base.js +65 -0
- package/dist/flatbuffers/duc/duc-stack-like-styles.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-stack-like-styles.js +48 -0
- package/dist/flatbuffers/duc/duc-table-auto-size.d.ts +15 -0
- package/dist/flatbuffers/duc/duc-table-auto-size.js +48 -0
- package/dist/flatbuffers/duc/duc-table-cell-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-table-cell-entry.js +44 -0
- package/dist/flatbuffers/duc/duc-table-cell-span.d.ts +15 -0
- package/dist/flatbuffers/duc/duc-table-cell-span.js +48 -0
- package/dist/flatbuffers/duc/duc-table-cell-style.d.ts +22 -0
- package/dist/flatbuffers/duc/duc-table-cell-style.js +59 -0
- package/dist/flatbuffers/duc/duc-table-cell.d.ts +27 -0
- package/dist/flatbuffers/duc/duc-table-cell.js +72 -0
- package/dist/flatbuffers/duc/duc-table-column-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-table-column-entry.js +44 -0
- package/dist/flatbuffers/duc/duc-table-column.d.ts +18 -0
- package/dist/flatbuffers/duc/duc-table-column.js +51 -0
- package/dist/flatbuffers/duc/duc-table-element.d.ts +51 -0
- package/dist/flatbuffers/duc/duc-table-element.js +167 -0
- package/dist/flatbuffers/duc/duc-table-row-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-table-row-entry.js +44 -0
- package/dist/flatbuffers/duc/duc-table-row.d.ts +18 -0
- package/dist/flatbuffers/duc/duc-table-row.js +51 -0
- package/dist/flatbuffers/duc/duc-table-style.d.ts +23 -0
- package/dist/flatbuffers/duc/duc-table-style.js +65 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-dictionary-source.d.ts +14 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-dictionary-source.js +40 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-element-source.d.ts +17 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-element-source.js +49 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-part.d.ts +22 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-part.js +58 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-source-data.d.ts +9 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-source-data.js +26 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-source.d.ts +19 -0
- package/dist/flatbuffers/duc/duc-text-dynamic-source.js +58 -0
- package/dist/flatbuffers/duc/duc-text-element.d.ts +33 -0
- package/dist/flatbuffers/duc/duc-text-element.js +94 -0
- package/dist/flatbuffers/duc/duc-text-style.d.ts +44 -0
- package/dist/flatbuffers/duc/duc-text-style.js +128 -0
- package/dist/flatbuffers/duc/duc-ucs.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-ucs.js +49 -0
- package/dist/flatbuffers/duc/duc-view.d.ts +24 -0
- package/dist/flatbuffers/duc/duc-view.js +71 -0
- package/dist/flatbuffers/duc/duc-viewport-element.d.ts +36 -0
- package/dist/flatbuffers/duc/duc-viewport-element.js +102 -0
- package/dist/flatbuffers/duc/duc-viewport-style.d.ts +16 -0
- package/dist/flatbuffers/duc/duc-viewport-style.js +49 -0
- package/dist/flatbuffers/duc/duc-xray-element.d.ts +23 -0
- package/dist/flatbuffers/duc/duc-xray-element.js +66 -0
- package/dist/flatbuffers/duc/duc-xray-style.d.ts +17 -0
- package/dist/flatbuffers/duc/duc-xray-style.js +49 -0
- package/dist/flatbuffers/duc/dynamic-snap-settings.d.ts +17 -0
- package/dist/flatbuffers/duc/dynamic-snap-settings.js +56 -0
- package/dist/flatbuffers/duc/element-background.d.ts +14 -0
- package/dist/flatbuffers/duc/element-background.js +41 -0
- package/dist/flatbuffers/duc/element-content-base.d.ts +29 -0
- package/dist/flatbuffers/duc/element-content-base.js +80 -0
- package/dist/flatbuffers/duc/element-content-preference.d.ts +8 -0
- package/dist/flatbuffers/duc/element-content-preference.js +11 -0
- package/dist/flatbuffers/duc/element-stroke.d.ts +24 -0
- package/dist/flatbuffers/duc/element-stroke.js +66 -0
- package/dist/flatbuffers/duc/element-wrapper.d.ts +16 -0
- package/dist/flatbuffers/duc/element-wrapper.js +49 -0
- package/dist/flatbuffers/duc/element.d.ts +49 -0
- package/dist/flatbuffers/duc/element.js +106 -0
- package/dist/flatbuffers/duc/exported-data-state.d.ts +87 -0
- package/dist/flatbuffers/duc/exported-data-state.js +290 -0
- package/dist/flatbuffers/duc/fcfbetween-modifier.d.ts +17 -0
- package/dist/flatbuffers/duc/fcfbetween-modifier.js +48 -0
- package/dist/flatbuffers/duc/fcfdatum-definition.d.ts +16 -0
- package/dist/flatbuffers/duc/fcfdatum-definition.js +43 -0
- package/dist/flatbuffers/duc/fcfdatum-style.d.ts +14 -0
- package/dist/flatbuffers/duc/fcfdatum-style.js +41 -0
- package/dist/flatbuffers/duc/fcfframe-modifiers.d.ts +22 -0
- package/dist/flatbuffers/duc/fcfframe-modifiers.js +65 -0
- package/dist/flatbuffers/duc/fcflayout-style.d.ts +17 -0
- package/dist/flatbuffers/duc/fcflayout-style.js +56 -0
- package/dist/flatbuffers/duc/fcfprojected-zone-modifier.d.ts +13 -0
- package/dist/flatbuffers/duc/fcfprojected-zone-modifier.js +40 -0
- package/dist/flatbuffers/duc/fcfsegment-row.d.ts +17 -0
- package/dist/flatbuffers/duc/fcfsegment-row.js +55 -0
- package/dist/flatbuffers/duc/fcfsymbol-style.d.ts +13 -0
- package/dist/flatbuffers/duc/fcfsymbol-style.js +40 -0
- package/dist/flatbuffers/duc/feature-control-frame-segment.d.ts +22 -0
- package/dist/flatbuffers/duc/feature-control-frame-segment.js +65 -0
- package/dist/flatbuffers/duc/feature-modifier.d.ts +18 -0
- package/dist/flatbuffers/duc/feature-modifier.js +21 -0
- package/dist/flatbuffers/duc/gdt-symbol.d.ts +22 -0
- package/dist/flatbuffers/duc/gdt-symbol.js +25 -0
- package/dist/flatbuffers/duc/geometric-point.d.ts +10 -0
- package/dist/flatbuffers/duc/geometric-point.js +27 -0
- package/dist/flatbuffers/duc/grid-display-type.d.ts +6 -0
- package/dist/flatbuffers/duc/grid-display-type.js +9 -0
- package/dist/flatbuffers/duc/grid-settings.d.ts +54 -0
- package/dist/flatbuffers/duc/grid-settings.js +165 -0
- package/dist/flatbuffers/duc/grid-style.d.ts +26 -0
- package/dist/flatbuffers/duc/grid-style.js +74 -0
- package/dist/flatbuffers/duc/grid-type.d.ts +7 -0
- package/dist/flatbuffers/duc/grid-type.js +10 -0
- package/dist/flatbuffers/duc/handle-type.d.ts +4 -0
- package/dist/flatbuffers/duc/handle-type.js +7 -0
- package/dist/flatbuffers/duc/hatch-pattern-line.d.ts +35 -0
- package/dist/flatbuffers/duc/hatch-pattern-line.js +93 -0
- package/dist/flatbuffers/duc/hatch-style.d.ts +5 -0
- package/dist/flatbuffers/duc/hatch-style.js +8 -0
- package/dist/flatbuffers/duc/identified-common-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-common-style.js +44 -0
- package/dist/flatbuffers/duc/identified-dimension-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-dimension-style.js +44 -0
- package/dist/flatbuffers/duc/identified-doc-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-doc-style.js +44 -0
- package/dist/flatbuffers/duc/identified-fcfstyle.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-fcfstyle.js +44 -0
- package/dist/flatbuffers/duc/identified-grid-settings.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-grid-settings.js +44 -0
- package/dist/flatbuffers/duc/identified-hatch-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-hatch-style.js +44 -0
- package/dist/flatbuffers/duc/identified-leader-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-leader-style.js +44 -0
- package/dist/flatbuffers/duc/identified-snap-settings.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-snap-settings.js +44 -0
- package/dist/flatbuffers/duc/identified-stack-like-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-stack-like-style.js +44 -0
- package/dist/flatbuffers/duc/identified-table-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-table-style.js +44 -0
- package/dist/flatbuffers/duc/identified-text-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-text-style.js +44 -0
- package/dist/flatbuffers/duc/identified-ucs.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-ucs.js +44 -0
- package/dist/flatbuffers/duc/identified-view.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-view.js +44 -0
- package/dist/flatbuffers/duc/identified-viewport-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-viewport-style.js +44 -0
- package/dist/flatbuffers/duc/identified-xray-style.d.ts +16 -0
- package/dist/flatbuffers/duc/identified-xray-style.js +44 -0
- package/dist/flatbuffers/duc/identifier.d.ts +20 -0
- package/dist/flatbuffers/duc/identifier.js +57 -0
- package/dist/flatbuffers/duc/image-crop.d.ts +23 -0
- package/dist/flatbuffers/duc/image-crop.js +80 -0
- package/dist/flatbuffers/duc/image-status.d.ts +5 -0
- package/dist/flatbuffers/duc/image-status.js +8 -0
- package/dist/flatbuffers/duc/isometric-grid-settings.d.ts +15 -0
- package/dist/flatbuffers/duc/isometric-grid-settings.js +48 -0
- package/dist/flatbuffers/duc/jsonpatch-operation.d.ts +23 -0
- package/dist/flatbuffers/duc/jsonpatch-operation.js +64 -0
- package/dist/flatbuffers/duc/layer-snap-filters.d.ts +23 -0
- package/dist/flatbuffers/duc/layer-snap-filters.js +76 -0
- package/dist/flatbuffers/duc/layer-validation-rules.d.ts +17 -0
- package/dist/flatbuffers/duc/layer-validation-rules.js +54 -0
- package/dist/flatbuffers/duc/leader-block-content.d.ts +25 -0
- package/dist/flatbuffers/duc/leader-block-content.js +85 -0
- package/dist/flatbuffers/duc/leader-content-data.d.ts +9 -0
- package/dist/flatbuffers/duc/leader-content-data.js +26 -0
- package/dist/flatbuffers/duc/leader-content-type.d.ts +4 -0
- package/dist/flatbuffers/duc/leader-content-type.js +7 -0
- package/dist/flatbuffers/duc/leader-content.d.ts +19 -0
- package/dist/flatbuffers/duc/leader-content.js +58 -0
- package/dist/flatbuffers/duc/leader-text-block-content.d.ts +14 -0
- package/dist/flatbuffers/duc/leader-text-block-content.js +40 -0
- package/dist/flatbuffers/duc/line-head.d.ts +17 -0
- package/dist/flatbuffers/duc/line-head.js +20 -0
- package/dist/flatbuffers/duc/line-spacing-type.d.ts +5 -0
- package/dist/flatbuffers/duc/line-spacing-type.js +8 -0
- package/dist/flatbuffers/duc/line-spacing.d.ts +16 -0
- package/dist/flatbuffers/duc/line-spacing.js +49 -0
- package/dist/flatbuffers/duc/linear-unit-system.d.ts +24 -0
- package/dist/flatbuffers/duc/linear-unit-system.js +75 -0
- package/dist/flatbuffers/duc/margins.d.ts +19 -0
- package/dist/flatbuffers/duc/margins.js +64 -0
- package/dist/flatbuffers/duc/mark-ellipse-center.d.ts +4 -0
- package/dist/flatbuffers/duc/mark-ellipse-center.js +7 -0
- package/dist/flatbuffers/duc/material-condition.d.ts +5 -0
- package/dist/flatbuffers/duc/material-condition.js +8 -0
- package/dist/flatbuffers/duc/object-snap-mode.d.ts +22 -0
- package/dist/flatbuffers/duc/object-snap-mode.js +25 -0
- package/dist/flatbuffers/duc/paragraph-formatting.d.ts +33 -0
- package/dist/flatbuffers/duc/paragraph-formatting.js +106 -0
- package/dist/flatbuffers/duc/parametric-source-type.d.ts +4 -0
- package/dist/flatbuffers/duc/parametric-source-type.js +7 -0
- package/dist/flatbuffers/duc/parametric-source.d.ts +20 -0
- package/dist/flatbuffers/duc/parametric-source.js +57 -0
- package/dist/flatbuffers/duc/plot-layout.d.ts +14 -0
- package/dist/flatbuffers/duc/plot-layout.js +41 -0
- package/dist/flatbuffers/duc/point-binding-point.d.ts +15 -0
- package/dist/flatbuffers/duc/point-binding-point.js +48 -0
- package/dist/flatbuffers/duc/polar-grid-settings.d.ts +17 -0
- package/dist/flatbuffers/duc/polar-grid-settings.js +56 -0
- package/dist/flatbuffers/duc/polar-tracking-settings.d.ts +29 -0
- package/dist/flatbuffers/duc/polar-tracking-settings.js +90 -0
- package/dist/flatbuffers/duc/primary-units.d.ts +16 -0
- package/dist/flatbuffers/duc/primary-units.js +44 -0
- package/dist/flatbuffers/duc/pruning-level.d.ts +5 -0
- package/dist/flatbuffers/duc/pruning-level.js +8 -0
- package/dist/flatbuffers/duc/snap-marker-settings.d.ts +23 -0
- package/dist/flatbuffers/duc/snap-marker-settings.js +79 -0
- package/dist/flatbuffers/duc/snap-marker-shape.d.ts +6 -0
- package/dist/flatbuffers/duc/snap-marker-shape.js +9 -0
- package/dist/flatbuffers/duc/snap-marker-style-entry.d.ts +16 -0
- package/dist/flatbuffers/duc/snap-marker-style-entry.js +43 -0
- package/dist/flatbuffers/duc/snap-marker-style.d.ts +17 -0
- package/dist/flatbuffers/duc/snap-marker-style.js +49 -0
- package/dist/flatbuffers/duc/snap-mode.d.ts +4 -0
- package/dist/flatbuffers/duc/snap-mode.js +7 -0
- package/dist/flatbuffers/duc/snap-override-behavior.d.ts +5 -0
- package/dist/flatbuffers/duc/snap-override-behavior.js +8 -0
- package/dist/flatbuffers/duc/snap-override.d.ts +17 -0
- package/dist/flatbuffers/duc/snap-override.js +49 -0
- package/dist/flatbuffers/duc/snap-settings.d.ts +75 -0
- package/dist/flatbuffers/duc/snap-settings.js +245 -0
- package/dist/flatbuffers/duc/stack-format-properties.d.ts +18 -0
- package/dist/flatbuffers/duc/stack-format-properties.js +57 -0
- package/dist/flatbuffers/duc/stack-format.d.ts +21 -0
- package/dist/flatbuffers/duc/stack-format.js +64 -0
- package/dist/flatbuffers/duc/stacked-text-align.d.ts +5 -0
- package/dist/flatbuffers/duc/stacked-text-align.js +8 -0
- package/dist/flatbuffers/duc/standard-overrides.d.ts +63 -0
- package/dist/flatbuffers/duc/standard-overrides.js +162 -0
- package/dist/flatbuffers/duc/standard-styles.d.ts +77 -0
- package/dist/flatbuffers/duc/standard-styles.js +285 -0
- package/dist/flatbuffers/duc/standard-units.d.ts +16 -0
- package/dist/flatbuffers/duc/standard-units.js +44 -0
- package/dist/flatbuffers/duc/standard-validation.d.ts +16 -0
- package/dist/flatbuffers/duc/standard-validation.js +44 -0
- package/dist/flatbuffers/duc/standard-view-settings.d.ts +35 -0
- package/dist/flatbuffers/duc/standard-view-settings.js +124 -0
- package/dist/flatbuffers/duc/standard.d.ts +33 -0
- package/dist/flatbuffers/duc/standard.js +90 -0
- package/dist/flatbuffers/duc/string-value-entry.d.ts +17 -0
- package/dist/flatbuffers/duc/string-value-entry.js +49 -0
- package/dist/flatbuffers/duc/stroke-cap.d.ts +5 -0
- package/dist/flatbuffers/duc/stroke-cap.js +8 -0
- package/dist/flatbuffers/duc/stroke-join.d.ts +5 -0
- package/dist/flatbuffers/duc/stroke-join.js +8 -0
- package/dist/flatbuffers/duc/stroke-placement.d.ts +5 -0
- package/dist/flatbuffers/duc/stroke-placement.js +8 -0
- package/dist/flatbuffers/duc/stroke-preference.d.ts +6 -0
- package/dist/flatbuffers/duc/stroke-preference.js +9 -0
- package/dist/flatbuffers/duc/stroke-side-preference.d.ts +8 -0
- package/dist/flatbuffers/duc/stroke-side-preference.js +11 -0
- package/dist/flatbuffers/duc/stroke-sides.d.ts +24 -0
- package/dist/flatbuffers/duc/stroke-sides.js +67 -0
- package/dist/flatbuffers/duc/stroke-style.d.ts +37 -0
- package/dist/flatbuffers/duc/stroke-style.js +111 -0
- package/dist/flatbuffers/duc/stroke-width.d.ts +5 -0
- package/dist/flatbuffers/duc/stroke-width.js +8 -0
- package/dist/flatbuffers/duc/table-cell-alignment.d.ts +11 -0
- package/dist/flatbuffers/duc/table-cell-alignment.js +14 -0
- package/dist/flatbuffers/duc/table-flow-direction.d.ts +4 -0
- package/dist/flatbuffers/duc/table-flow-direction.js +7 -0
- package/dist/flatbuffers/duc/text-align.d.ts +5 -0
- package/dist/flatbuffers/duc/text-align.js +8 -0
- package/dist/flatbuffers/duc/text-column.d.ts +15 -0
- package/dist/flatbuffers/duc/text-column.js +48 -0
- package/dist/flatbuffers/duc/text-field-source-property.d.ts +13 -0
- package/dist/flatbuffers/duc/text-field-source-property.js +16 -0
- package/dist/flatbuffers/duc/text-field-source-type.d.ts +4 -0
- package/dist/flatbuffers/duc/text-field-source-type.js +7 -0
- package/dist/flatbuffers/duc/text-flow-direction.d.ts +6 -0
- package/dist/flatbuffers/duc/text-flow-direction.js +9 -0
- package/dist/flatbuffers/duc/tiling-properties.d.ts +21 -0
- package/dist/flatbuffers/duc/tiling-properties.js +75 -0
- package/dist/flatbuffers/duc/tolerance-clause.d.ts +27 -0
- package/dist/flatbuffers/duc/tolerance-clause.js +84 -0
- package/dist/flatbuffers/duc/tolerance-display.d.ts +7 -0
- package/dist/flatbuffers/duc/tolerance-display.js +10 -0
- package/dist/flatbuffers/duc/tolerance-type.d.ts +5 -0
- package/dist/flatbuffers/duc/tolerance-type.js +8 -0
- package/dist/flatbuffers/duc/tolerance-zone-type.d.ts +7 -0
- package/dist/flatbuffers/duc/tolerance-zone-type.js +10 -0
- package/dist/flatbuffers/duc/tracking-line-style.d.ts +26 -0
- package/dist/flatbuffers/duc/tracking-line-style.js +74 -0
- package/dist/flatbuffers/duc/unit-precision.d.ts +19 -0
- package/dist/flatbuffers/duc/unit-precision.js +64 -0
- package/dist/flatbuffers/duc/unit-system-base.d.ts +20 -0
- package/dist/flatbuffers/duc/unit-system-base.js +65 -0
- package/dist/flatbuffers/duc/unit-system.d.ts +4 -0
- package/dist/flatbuffers/duc/unit-system.js +7 -0
- package/dist/flatbuffers/duc/version-base.d.ts +27 -0
- package/dist/flatbuffers/duc/version-base.js +80 -0
- package/dist/flatbuffers/duc/version-graph-metadata.d.ts +15 -0
- package/dist/flatbuffers/duc/version-graph-metadata.js +48 -0
- package/dist/flatbuffers/duc/version-graph.d.ts +31 -0
- package/dist/flatbuffers/duc/version-graph.js +94 -0
- package/dist/flatbuffers/duc/vertical-align.d.ts +5 -0
- package/dist/flatbuffers/duc/vertical-align.js +8 -0
- package/dist/flatbuffers/duc/viewport-shade-plot.d.ts +6 -0
- package/dist/flatbuffers/duc/viewport-shade-plot.js +9 -0
- package/dist/flatbuffers/duc/youtube-states.d.ts +8 -0
- package/dist/flatbuffers/duc/youtube-states.js +11 -0
- package/dist/flatbuffers/duc.d.ts +227 -0
- package/dist/flatbuffers/duc.js +229 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/legacy/index.d.ts +1 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/v1/duc/app-state.d.ts +124 -0
- package/dist/legacy/v1/duc/app-state.js +388 -0
- package/dist/legacy/v1/duc/binary-file-data.d.ts +27 -0
- package/dist/legacy/v1/duc/binary-file-data.js +90 -0
- package/dist/legacy/v1/duc/binary-files-entry.d.ts +16 -0
- package/dist/legacy/v1/duc/binary-files-entry.js +43 -0
- package/dist/legacy/v1/duc/binary-files.d.ts +17 -0
- package/dist/legacy/v1/duc/binary-files.js +55 -0
- package/dist/legacy/v1/duc/binding-point.d.ts +15 -0
- package/dist/legacy/v1/duc/binding-point.js +48 -0
- package/dist/legacy/v1/duc/bound-element.d.ts +17 -0
- package/dist/legacy/v1/duc/bound-element.js +48 -0
- package/dist/legacy/v1/duc/duc-block-attribute-details.d.ts +22 -0
- package/dist/legacy/v1/duc/duc-block-attribute-details.js +57 -0
- package/dist/legacy/v1/duc/duc-block-attribute.d.ts +16 -0
- package/dist/legacy/v1/duc/duc-block-attribute.js +43 -0
- package/dist/legacy/v1/duc/duc-block-instance-element-override.d.ts +17 -0
- package/dist/legacy/v1/duc/duc-block-instance-element-override.js +48 -0
- package/dist/legacy/v1/duc/duc-block.d.ts +34 -0
- package/dist/legacy/v1/duc/duc-block.js +110 -0
- package/dist/legacy/v1/duc/duc-element.d.ts +273 -0
- package/dist/legacy/v1/duc/duc-element.js +865 -0
- package/dist/legacy/v1/duc/duc-group.d.ts +40 -0
- package/dist/legacy/v1/duc/duc-group.js +114 -0
- package/dist/legacy/v1/duc/duc-line-reference.d.ts +15 -0
- package/dist/legacy/v1/duc/duc-line-reference.js +43 -0
- package/dist/legacy/v1/duc/duc-line.d.ts +15 -0
- package/dist/legacy/v1/duc/duc-line.js +43 -0
- package/dist/legacy/v1/duc/duc-path.d.ts +26 -0
- package/dist/legacy/v1/duc/duc-path.js +69 -0
- package/dist/legacy/v1/duc/duc-table-cell.d.ts +22 -0
- package/dist/legacy/v1/duc/duc-table-cell.js +57 -0
- package/dist/legacy/v1/duc/duc-table-column.d.ts +18 -0
- package/dist/legacy/v1/duc/duc-table-column.js +50 -0
- package/dist/legacy/v1/duc/duc-table-row.d.ts +18 -0
- package/dist/legacy/v1/duc/duc-table-row.js +50 -0
- package/dist/legacy/v1/duc/duc-table-style-props.d.ts +39 -0
- package/dist/legacy/v1/duc/duc-table-style-props.js +114 -0
- package/dist/legacy/v1/duc/duc-table-style.d.ts +14 -0
- package/dist/legacy/v1/duc/duc-table-style.js +41 -0
- package/dist/legacy/v1/duc/element-background.d.ts +14 -0
- package/dist/legacy/v1/duc/element-background.js +41 -0
- package/dist/legacy/v1/duc/element-content-base.d.ts +22 -0
- package/dist/legacy/v1/duc/element-content-base.js +64 -0
- package/dist/legacy/v1/duc/element-stroke.d.ts +23 -0
- package/dist/legacy/v1/duc/element-stroke.js +66 -0
- package/dist/legacy/v1/duc/exported-data-state.d.ts +51 -0
- package/dist/legacy/v1/duc/exported-data-state.js +155 -0
- package/dist/legacy/v1/duc/image-crop.d.ts +23 -0
- package/dist/legacy/v1/duc/image-crop.js +80 -0
- package/dist/legacy/v1/duc/linear-element-editor.d.ts +44 -0
- package/dist/legacy/v1/duc/linear-element-editor.js +119 -0
- package/dist/legacy/v1/duc/point-binding.d.ts +25 -0
- package/dist/legacy/v1/duc/point-binding.js +72 -0
- package/dist/legacy/v1/duc/point.d.ts +20 -0
- package/dist/legacy/v1/duc/point.js +63 -0
- package/dist/legacy/v1/duc/pointer-down-state.d.ts +32 -0
- package/dist/legacy/v1/duc/pointer-down-state.js +90 -0
- package/dist/legacy/v1/duc/renderer-state.d.ts +17 -0
- package/dist/legacy/v1/duc/renderer-state.js +54 -0
- package/dist/legacy/v1/duc/segment-midpoint-state.d.ts +18 -0
- package/dist/legacy/v1/duc/segment-midpoint-state.js +57 -0
- package/dist/legacy/v1/duc/simple-point.d.ts +15 -0
- package/dist/legacy/v1/duc/simple-point.js +48 -0
- package/dist/legacy/v1/duc/stroke-sides.d.ts +23 -0
- package/dist/legacy/v1/duc/stroke-sides.js +66 -0
- package/dist/legacy/v1/duc/stroke-style.d.ts +31 -0
- package/dist/legacy/v1/duc/stroke-style.js +102 -0
- package/dist/legacy/v1/duc/tiling-properties.d.ts +21 -0
- package/dist/legacy/v1/duc/tiling-properties.js +75 -0
- package/dist/legacy/v1/duc.d.ts +35 -0
- package/dist/legacy/v1/duc.js +37 -0
- package/dist/legacy/v1/index.d.ts +1 -0
- package/dist/legacy/v1/index.js +1 -0
- package/dist/legacy/v1/parse/index.d.ts +67 -0
- package/dist/legacy/v1/parse/index.js +101 -0
- package/dist/legacy/v1/parse/parseAppStateFromBinary.d.ts +3 -0
- package/dist/legacy/v1/parse/parseAppStateFromBinary.js +139 -0
- package/dist/legacy/v1/parse/parseBinaryFilesFromBinary.d.ts +4 -0
- package/dist/legacy/v1/parse/parseBinaryFilesFromBinary.js +32 -0
- package/dist/legacy/v1/parse/parseBlockFromBinary.d.ts +3 -0
- package/dist/legacy/v1/parse/parseBlockFromBinary.js +70 -0
- package/dist/legacy/v1/parse/parseElementFromBinary.d.ts +8 -0
- package/dist/legacy/v1/parse/parseElementFromBinary.js +387 -0
- package/dist/legacy/v1/parse/parseGroupFromBinary.d.ts +4 -0
- package/dist/legacy/v1/parse/parseGroupFromBinary.js +36 -0
- package/dist/legacy/v1/parse/parseRendererStateFromBinary.d.ts +4 -0
- package/dist/legacy/v1/parse/parseRendererStateFromBinary.js +15 -0
- package/dist/legacy/v1/serialize/index.d.ts +5 -0
- package/dist/legacy/v1/serialize/index.js +81 -0
- package/dist/legacy/v1/serialize/serializationUtils.d.ts +17 -0
- package/dist/legacy/v1/serialize/serializationUtils.js +27 -0
- package/dist/legacy/v1/serialize/serializeAppStateFromDuc.d.ts +4 -0
- package/dist/legacy/v1/serialize/serializeAppStateFromDuc.js +145 -0
- package/dist/legacy/v1/serialize/serializeBinaryFilesFromDuc.d.ts +4 -0
- package/dist/legacy/v1/serialize/serializeBinaryFilesFromDuc.js +46 -0
- package/dist/legacy/v1/serialize/serializeBlockFromDuc.d.ts +3 -0
- package/dist/legacy/v1/serialize/serializeBlockFromDuc.js +60 -0
- package/dist/legacy/v1/serialize/serializeElementFromDuc.d.ts +8 -0
- package/dist/legacy/v1/serialize/serializeElementFromDuc.js +435 -0
- package/dist/legacy/v1/serialize/serializeGroupFromDuc.d.ts +3 -0
- package/dist/legacy/v1/serialize/serializeGroupFromDuc.js +37 -0
- package/dist/legacy/v1/serialize/serializeRendererStateFromDuc.d.ts +4 -0
- package/dist/legacy/v1/serialize/serializeRendererStateFromDuc.js +7 -0
- package/dist/legacy/v1/types/elements/index.d.ts +480 -0
- package/dist/legacy/v1/types/elements/index.js +1 -0
- package/dist/legacy/v1/types/elements/typeChecks.d.ts +40 -0
- package/dist/legacy/v1/types/elements/typeChecks.js +179 -0
- package/dist/legacy/v1/types/geometryTypes.d.ts +78 -0
- package/dist/legacy/v1/types/geometryTypes.js +1 -0
- package/dist/legacy/v1/types/index.d.ts +496 -0
- package/dist/legacy/v1/types/index.js +1 -0
- package/dist/legacy/v1/types/utility-types.d.ts +31 -0
- package/dist/legacy/v1/types/utility-types.js +1 -0
- package/dist/legacy/v1/utils/bounds.d.ts +76 -0
- package/dist/legacy/v1/utils/bounds.js +415 -0
- package/dist/legacy/v1/utils/constants.d.ts +370 -0
- package/dist/legacy/v1/utils/constants.js +571 -0
- package/dist/legacy/v1/utils/elements/index.d.ts +26 -0
- package/dist/legacy/v1/utils/elements/index.js +108 -0
- package/dist/legacy/v1/utils/elements/linearElement.d.ts +133 -0
- package/dist/legacy/v1/utils/elements/linearElement.js +544 -0
- package/dist/legacy/v1/utils/elements/textElement.d.ts +89 -0
- package/dist/legacy/v1/utils/elements/textElement.js +563 -0
- package/dist/legacy/v1/utils/index.d.ts +26 -0
- package/dist/legacy/v1/utils/index.js +40 -0
- package/dist/legacy/v1/utils/math/algebra/ga.d.ts +63 -0
- package/dist/legacy/v1/utils/math/algebra/ga.js +268 -0
- package/dist/legacy/v1/utils/math/algebra/gadirections.d.ts +9 -0
- package/dist/legacy/v1/utils/math/algebra/gadirections.js +18 -0
- package/dist/legacy/v1/utils/math/algebra/galines.d.ts +23 -0
- package/dist/legacy/v1/utils/math/algebra/galines.js +32 -0
- package/dist/legacy/v1/utils/math/algebra/gapoints.d.ts +8 -0
- package/dist/legacy/v1/utils/math/algebra/gapoints.js +30 -0
- package/dist/legacy/v1/utils/math/algebra/gatransforms.d.ts +10 -0
- package/dist/legacy/v1/utils/math/algebra/gatransforms.js +23 -0
- package/dist/legacy/v1/utils/math/bbox.d.ts +10 -0
- package/dist/legacy/v1/utils/math/bbox.js +42 -0
- package/dist/legacy/v1/utils/math/geometry.d.ts +102 -0
- package/dist/legacy/v1/utils/math/geometry.js +790 -0
- package/dist/legacy/v1/utils/math/index.d.ts +309 -0
- package/dist/legacy/v1/utils/math/index.js +1140 -0
- package/dist/legacy/v1/utils/math/random.d.ts +4 -0
- package/dist/legacy/v1/utils/math/random.js +25 -0
- package/dist/legacy/v1/utils/measurements.d.ts +33 -0
- package/dist/legacy/v1/utils/measurements.js +65 -0
- package/dist/legacy/v1/utils/normalize.d.ts +14 -0
- package/dist/legacy/v1/utils/normalize.js +49 -0
- package/dist/legacy/v1/utils/restore.d.ts +197 -0
- package/dist/legacy/v1/utils/restore.js +1255 -0
- package/dist/legacy/v1/utils/scopes.d.ts +260 -0
- package/dist/legacy/v1/utils/scopes.js +661 -0
- package/dist/legacy/v1/utils/standards.d.ts +12 -0
- package/dist/legacy/v1/utils/standards.js +10 -0
- package/dist/legacy/v1/utils/state/index.d.ts +2 -0
- package/dist/legacy/v1/utils/state/index.js +68 -0
- package/dist/legacy/v1/utils/url.d.ts +8 -0
- package/dist/legacy/v1/utils/url.js +33 -0
- package/dist/parse.d.ts +54 -0
- package/dist/parse.js +1318 -0
- package/dist/restore/index.d.ts +3 -0
- package/dist/restore/index.js +3 -0
- package/dist/restore/restoreDataState.d.ts +191 -0
- package/dist/restore/restoreDataState.js +716 -0
- package/dist/restore/restoreElements.d.ts +34 -0
- package/dist/restore/restoreElements.js +1281 -0
- package/dist/restore/restoreStandards.d.ts +8 -0
- package/dist/restore/restoreStandards.js +224 -0
- package/dist/serialize.d.ts +3 -0
- package/dist/serialize.js +2465 -0
- package/dist/technical/index.d.ts +3 -0
- package/dist/technical/index.js +3 -0
- package/dist/technical/measurements.d.ts +31 -0
- package/dist/technical/measurements.js +64 -0
- package/dist/technical/scopes.d.ts +261 -0
- package/dist/technical/scopes.js +661 -0
- package/dist/technical/standards.d.ts +124 -0
- package/dist/technical/standards.js +10 -0
- package/dist/types/elements/index.d.ts +1356 -0
- package/dist/types/elements/index.js +1 -0
- package/dist/types/elements/typeChecks.d.ts +40 -0
- package/dist/types/elements/typeChecks.js +188 -0
- package/dist/types/geometryTypes.d.ts +90 -0
- package/dist/types/geometryTypes.js +1 -0
- package/dist/types/index.d.ts +591 -0
- package/dist/types/index.js +3 -0
- package/dist/types/utility-types.d.ts +31 -0
- package/dist/types/utility-types.js +1 -0
- package/dist/utils/bounds.d.ts +75 -0
- package/dist/utils/bounds.js +414 -0
- package/dist/utils/constants.d.ts +288 -0
- package/dist/utils/constants.js +529 -0
- package/dist/utils/elements/frameElement.d.ts +4 -0
- package/dist/utils/elements/frameElement.js +16 -0
- package/dist/utils/elements/freedrawElement.d.ts +2 -0
- package/dist/utils/elements/freedrawElement.js +46 -0
- package/dist/utils/elements/index.d.ts +51 -0
- package/dist/utils/elements/index.js +215 -0
- package/dist/utils/elements/linearElement.d.ts +53 -0
- package/dist/utils/elements/linearElement.js +539 -0
- package/dist/utils/elements/newElement.d.ts +72 -0
- package/dist/utils/elements/newElement.js +268 -0
- package/dist/utils/elements/textElement.d.ts +89 -0
- package/dist/utils/elements/textElement.js +565 -0
- package/dist/utils/elements/viewportElement.d.ts +6 -0
- package/dist/utils/elements/viewportElement.js +9 -0
- package/dist/utils/filebyte.d.ts +39 -0
- package/dist/utils/filebyte.js +117 -0
- package/dist/utils/functionCodec.d.ts +5 -0
- package/dist/utils/functionCodec.js +86 -0
- package/dist/utils/index.d.ts +32 -0
- package/dist/utils/index.js +53 -0
- package/dist/utils/math/algebra/ga.d.ts +63 -0
- package/dist/utils/math/algebra/ga.js +268 -0
- package/dist/utils/math/algebra/gadirections.d.ts +9 -0
- package/dist/utils/math/algebra/gadirections.js +18 -0
- package/dist/utils/math/algebra/galines.d.ts +23 -0
- package/dist/utils/math/algebra/galines.js +32 -0
- package/dist/utils/math/algebra/gapoints.d.ts +8 -0
- package/dist/utils/math/algebra/gapoints.js +30 -0
- package/dist/utils/math/algebra/gatransforms.d.ts +10 -0
- package/dist/utils/math/algebra/gatransforms.js +23 -0
- package/dist/utils/math/algebra/index.d.ts +5 -0
- package/dist/utils/math/algebra/index.js +5 -0
- package/dist/utils/math/bbox.d.ts +10 -0
- package/dist/utils/math/bbox.js +42 -0
- package/dist/utils/math/geometry.d.ts +102 -0
- package/dist/utils/math/geometry.js +790 -0
- package/dist/utils/math/index.d.ts +323 -0
- package/dist/utils/math/index.js +1188 -0
- package/dist/utils/math/random.d.ts +4 -0
- package/dist/utils/math/random.js +25 -0
- package/dist/utils/normalize.d.ts +14 -0
- package/dist/utils/normalize.js +49 -0
- package/dist/utils/shape.d.ts +15 -0
- package/dist/utils/shape.js +254 -0
- package/dist/utils/state/grid.d.ts +7 -0
- package/dist/utils/state/grid.js +25 -0
- package/dist/utils/state/index.d.ts +9 -0
- package/dist/utils/state/index.js +131 -0
- package/dist/utils/url.d.ts +8 -0
- package/dist/utils/url.js +33 -0
- package/dist/utils/version.d.ts +1 -0
- package/dist/utils/version.js +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
import { ELEMENT_CONTENT_PREFERENCE, OBJECT_SNAP_MODE, STROKE_JOIN, STROKE_PLACEMENT, STROKE_PREFERENCE, TEXT_ALIGN, VERTICAL_ALIGN } from "ducjs/flatbuffers/duc";
|
|
2
|
+
import { MAX_ZOOM, MIN_ZOOM, NEUTRAL_SCOPE } from "ducjs/technical/scopes";
|
|
3
|
+
export const COLOR_PALETTE = {
|
|
4
|
+
transparent: "transparent",
|
|
5
|
+
black: "#1e1e1e",
|
|
6
|
+
white: "#ffffff",
|
|
7
|
+
midGray: "#808080",
|
|
8
|
+
night: "#0F0F0F"
|
|
9
|
+
};
|
|
10
|
+
// distance when creating text before it's considered `autoResize: false`
|
|
11
|
+
// we're using higher threshold so that clicks that end up being drags
|
|
12
|
+
// don't unintentionally create text elements that are wrapped to a few chars
|
|
13
|
+
// (happens a lot with fast clicks with the text tool)
|
|
14
|
+
export const TEXT_AUTOWRAP_THRESHOLD = 36; // px
|
|
15
|
+
export const DRAGGING_THRESHOLD = 10; // px
|
|
16
|
+
export const LINE_CONFIRM_THRESHOLD = 8; // px
|
|
17
|
+
export const FIXED_BINDING_DISTANCE = 5; // px
|
|
18
|
+
export const ELEMENT_SHIFT_TRANSLATE_AMOUNT = 5;
|
|
19
|
+
export const ELEMENT_TRANSLATE_AMOUNT = 1;
|
|
20
|
+
export const TEXT_TO_CENTER_SNAP_THRESHOLD = 30;
|
|
21
|
+
export const SHIFT_LOCKING_ANGLE = Math.PI / 12;
|
|
22
|
+
export const DEFAULT_GRID_SIZE = 1;
|
|
23
|
+
export const DEFAULT_GRID_STEP = 20;
|
|
24
|
+
export const SVG_NS = "http://www.w3.org/2000/svg";
|
|
25
|
+
export const IMAGE_MIME_TYPES = {
|
|
26
|
+
svg: "image/svg+xml",
|
|
27
|
+
png: "image/png",
|
|
28
|
+
jpg: "image/jpeg",
|
|
29
|
+
gif: "image/gif",
|
|
30
|
+
webp: "image/webp",
|
|
31
|
+
bmp: "image/bmp",
|
|
32
|
+
ico: "image/x-icon",
|
|
33
|
+
avif: "image/avif",
|
|
34
|
+
jfif: "image/jfif",
|
|
35
|
+
};
|
|
36
|
+
export const MIME_TYPES = Object.assign({ json: "application/json",
|
|
37
|
+
// excalidraw data
|
|
38
|
+
duc: "application/vnd.duc-cad", ducfig: "application/vnd.duc-config", excalidrawlib: "application/vnd.excalidrawlib+json",
|
|
39
|
+
// image-encoded excalidraw data
|
|
40
|
+
"excalidraw.svg": "image/svg+xml", "excalidraw.png": "image/png",
|
|
41
|
+
// binary
|
|
42
|
+
binary: "application/octet-stream" }, IMAGE_MIME_TYPES);
|
|
43
|
+
export const EXPORT_IMAGE_TYPES = {
|
|
44
|
+
png: "png",
|
|
45
|
+
svg: "svg",
|
|
46
|
+
clipboard: "clipboard",
|
|
47
|
+
};
|
|
48
|
+
export const EXPORT_DATA_TYPES = {
|
|
49
|
+
duc: "duc",
|
|
50
|
+
json: "json",
|
|
51
|
+
excalidrawClipboard: "excalidraw/clipboard",
|
|
52
|
+
excalidrawLibrary: "excalidrawlib",
|
|
53
|
+
excalidrawClipboardWithAPI: "excalidraw-api/clipboard",
|
|
54
|
+
};
|
|
55
|
+
export const VERSIONS = {
|
|
56
|
+
excalidraw: 2,
|
|
57
|
+
excalidrawLibrary: 2,
|
|
58
|
+
};
|
|
59
|
+
export const DEFAULT_ZOOM_STEP = 0.1;
|
|
60
|
+
export const MIN_ZOOM_STEP = 0.0000001;
|
|
61
|
+
export const MAX_ZOOM_STEP = 5;
|
|
62
|
+
export { MAX_ZOOM, MIN_ZOOM };
|
|
63
|
+
export const BOUND_TEXT_PADDING = 5;
|
|
64
|
+
export const ARROW_LABEL_WIDTH_FRACTION = 0.7;
|
|
65
|
+
export const ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO = 11;
|
|
66
|
+
export const NO_PEER_POINTS = []; // Empty array for points with no connections
|
|
67
|
+
export const ELEMENT_READY_TO_ERASE_OPACITY = 0.2;
|
|
68
|
+
export const HIDE_FRAME_NAME_ZOOM_THRESHOLD = 0.18;
|
|
69
|
+
// Radius represented as 25% of element's largest side (width/height).
|
|
70
|
+
// Used for LEGACY and PROPORTIONAL_RADIUS algorithms, or when the element is
|
|
71
|
+
// below the cutoff size.
|
|
72
|
+
export const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
73
|
+
// Fixed radius for the ADAPTIVE_RADIUS algorithm. In pixels.
|
|
74
|
+
export const DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
75
|
+
/**
|
|
76
|
+
* // TODO: shouldn't be really `const`, likely neither have integers as values, due to value for the custom fonts, which should likely be some hash.
|
|
77
|
+
*
|
|
78
|
+
* Let's think this through and consider:
|
|
79
|
+
* - https://developer.mozilla.org/en-US/docs/Web/CSS/generic-family
|
|
80
|
+
* - https://drafts.csswg.org/css-fonts-4/#font-family-prop
|
|
81
|
+
* - https://learn.microsoft.com/en-us/typography/opentype/spec/ibmfc
|
|
82
|
+
*/
|
|
83
|
+
export const FONT_FAMILY = {
|
|
84
|
+
Virgil: 1,
|
|
85
|
+
Helvetica: 2,
|
|
86
|
+
Cascadia: 3,
|
|
87
|
+
// leave 4 unused as it was historically used for Assistant (which we don't use anymore) or custom font (Obsidian)
|
|
88
|
+
Excalifont: 5,
|
|
89
|
+
Nunito: 6,
|
|
90
|
+
"Lilita One": 7,
|
|
91
|
+
"Comic Shanns": 8,
|
|
92
|
+
"Liberation Sans": 9,
|
|
93
|
+
"Roboto Mono": 10,
|
|
94
|
+
};
|
|
95
|
+
export const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
|
|
96
|
+
export const DEFAULT_VERSION = "{version}";
|
|
97
|
+
export const MIN_FONT_SIZE = 1;
|
|
98
|
+
export const DEFAULT_FONT_SIZE = 20;
|
|
99
|
+
export const DEFAULT_FONT_FAMILY = FONT_FAMILY["Roboto Mono"];
|
|
100
|
+
export const DEFAULT_TEXT_ALIGN = TEXT_ALIGN.LEFT;
|
|
101
|
+
export const DEFAULT_VERTICAL_ALIGN = VERTICAL_ALIGN.TOP;
|
|
102
|
+
export const DEFAULT_LINE_HEIGHT = 1;
|
|
103
|
+
export const DEFAULT_POLYGON_SIDES = 5;
|
|
104
|
+
export const LIBRARY_DISABLED_TYPES = new Set([
|
|
105
|
+
"iframe",
|
|
106
|
+
"embeddable",
|
|
107
|
+
"image",
|
|
108
|
+
]);
|
|
109
|
+
/**
|
|
110
|
+
* not translated as this is used only in public, stateless API as default value
|
|
111
|
+
* where filename is optional and we can't retrieve name from app state
|
|
112
|
+
*/
|
|
113
|
+
export const DEFAULT_FILENAME = "Untitled";
|
|
114
|
+
export const MIN_WIDTH_OR_HEIGHT = 1;
|
|
115
|
+
export const EASINGS = [
|
|
116
|
+
'linear',
|
|
117
|
+
'easeInQuad',
|
|
118
|
+
'easeOutQuad',
|
|
119
|
+
'easeInOutQuad',
|
|
120
|
+
'easeInCubic',
|
|
121
|
+
'easeOutCubic',
|
|
122
|
+
'easeInOutCubic',
|
|
123
|
+
'easeInQuart',
|
|
124
|
+
'easeOutQuart',
|
|
125
|
+
'easeInOutQuart',
|
|
126
|
+
'easeInQuint',
|
|
127
|
+
'easeOutQuint',
|
|
128
|
+
'easeInOutQuint',
|
|
129
|
+
'easeInSine',
|
|
130
|
+
'easeOutSine',
|
|
131
|
+
'easeInOutSine',
|
|
132
|
+
'easeInExpo',
|
|
133
|
+
'easeOutExpo',
|
|
134
|
+
'easeInOutExpo',
|
|
135
|
+
];
|
|
136
|
+
export const FREEDRAW_EASINGS = {
|
|
137
|
+
linear: (t) => t,
|
|
138
|
+
easeInQuad: (t) => t * t,
|
|
139
|
+
easeOutQuad: (t) => t * (2 - t),
|
|
140
|
+
easeInOutQuad: (t) => (t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t),
|
|
141
|
+
easeInCubic: (t) => t * t * t,
|
|
142
|
+
easeOutCubic: (t) => --t * t * t + 1,
|
|
143
|
+
easeInOutCubic: (t) => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
144
|
+
easeInQuart: (t) => t * t * t * t,
|
|
145
|
+
easeOutQuart: (t) => 1 - --t * t * t * t,
|
|
146
|
+
easeInOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t,
|
|
147
|
+
easeInQuint: (t) => t * t * t * t * t,
|
|
148
|
+
easeOutQuint: (t) => 1 + --t * t * t * t * t,
|
|
149
|
+
easeInOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t,
|
|
150
|
+
easeInSine: (t) => 1 - Math.cos((t * Math.PI) / 2),
|
|
151
|
+
easeOutSine: (t) => Math.sin((t * Math.PI) / 2),
|
|
152
|
+
easeInOutSine: (t) => -(Math.cos(Math.PI * t) - 1) / 2,
|
|
153
|
+
easeInExpo: (t) => (t <= 0 ? 0 : Math.pow(2, 10 * t - 10)),
|
|
154
|
+
easeOutExpo: (t) => (t >= 1 ? 1 : 1 - Math.pow(2, -10 * t)),
|
|
155
|
+
easeInOutExpo: (t) => t <= 0
|
|
156
|
+
? 0
|
|
157
|
+
: t >= 1
|
|
158
|
+
? 1
|
|
159
|
+
: t < 0.5
|
|
160
|
+
? Math.pow(2, 20 * t - 10) / 2
|
|
161
|
+
: (2 - Math.pow(2, -20 * t + 10)) / 2,
|
|
162
|
+
};
|
|
163
|
+
export const DEFAULT_FRAME_STYLE = ({
|
|
164
|
+
stroke: [{
|
|
165
|
+
content: {
|
|
166
|
+
preference: ELEMENT_CONTENT_PREFERENCE.SOLID,
|
|
167
|
+
src: COLOR_PALETTE.midGray,
|
|
168
|
+
visible: true,
|
|
169
|
+
opacity: 1,
|
|
170
|
+
},
|
|
171
|
+
width: { value: 2, scoped: 2 },
|
|
172
|
+
style: {
|
|
173
|
+
preference: STROKE_PREFERENCE.SOLID,
|
|
174
|
+
join: STROKE_JOIN.MITER,
|
|
175
|
+
},
|
|
176
|
+
placement: STROKE_PLACEMENT.INSIDE,
|
|
177
|
+
}],
|
|
178
|
+
background: [{
|
|
179
|
+
content: {
|
|
180
|
+
preference: ELEMENT_CONTENT_PREFERENCE.SOLID,
|
|
181
|
+
src: COLOR_PALETTE.midGray,
|
|
182
|
+
visible: false,
|
|
183
|
+
opacity: 0.1,
|
|
184
|
+
},
|
|
185
|
+
}],
|
|
186
|
+
roundness: { value: 0, scoped: 0 },
|
|
187
|
+
radius: 8,
|
|
188
|
+
nameOffsetY: 3,
|
|
189
|
+
nameColorLightTheme: "#80808080",
|
|
190
|
+
nameColorDarkTheme: "#80808080",
|
|
191
|
+
nameFontSize: 14,
|
|
192
|
+
nameLineHeight: 1.25,
|
|
193
|
+
});
|
|
194
|
+
export const DEFAULT_ELEMENT_PROPS = {
|
|
195
|
+
stroke: {
|
|
196
|
+
content: {
|
|
197
|
+
preference: ELEMENT_CONTENT_PREFERENCE.SOLID,
|
|
198
|
+
src: COLOR_PALETTE.midGray,
|
|
199
|
+
visible: true,
|
|
200
|
+
opacity: 1,
|
|
201
|
+
},
|
|
202
|
+
width: { value: 2, scoped: 2 },
|
|
203
|
+
style: {
|
|
204
|
+
preference: STROKE_PREFERENCE.SOLID,
|
|
205
|
+
join: STROKE_JOIN.MITER,
|
|
206
|
+
},
|
|
207
|
+
placement: STROKE_PLACEMENT.INSIDE,
|
|
208
|
+
},
|
|
209
|
+
background: {
|
|
210
|
+
content: {
|
|
211
|
+
preference: ELEMENT_CONTENT_PREFERENCE.SOLID,
|
|
212
|
+
src: COLOR_PALETTE.midGray,
|
|
213
|
+
visible: true,
|
|
214
|
+
opacity: 0.1,
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
isVisible: true,
|
|
218
|
+
isPlot: true,
|
|
219
|
+
isAnnotative: false,
|
|
220
|
+
roundness: { value: 0, scoped: 0 },
|
|
221
|
+
opacity: 1,
|
|
222
|
+
locked: false,
|
|
223
|
+
scope: NEUTRAL_SCOPE,
|
|
224
|
+
index: null,
|
|
225
|
+
width: { value: 0, scoped: 0 },
|
|
226
|
+
height: { value: 0, scoped: 0 },
|
|
227
|
+
angle: 0,
|
|
228
|
+
groupIds: [],
|
|
229
|
+
frameId: null,
|
|
230
|
+
boundElements: null,
|
|
231
|
+
link: null,
|
|
232
|
+
description: null,
|
|
233
|
+
};
|
|
234
|
+
export const DEFAULT_IFRAME_LIKE_NO_STYLE = ({
|
|
235
|
+
stroke: [Object.assign(Object.assign({}, DEFAULT_ELEMENT_PROPS.stroke), { content: Object.assign(Object.assign({}, DEFAULT_ELEMENT_PROPS.stroke.content), { visible: false }) })],
|
|
236
|
+
background: [Object.assign(Object.assign({}, DEFAULT_ELEMENT_PROPS.background), { content: Object.assign(Object.assign({}, DEFAULT_ELEMENT_PROPS.background.content), { visible: false }) })],
|
|
237
|
+
});
|
|
238
|
+
export const DEFAULT_LINEAR_ELEMENT_STROKE = Object.assign(Object.assign({}, DEFAULT_ELEMENT_PROPS.stroke), { placement: STROKE_PLACEMENT.CENTER });
|
|
239
|
+
export const DEFAULT_FREEDRAW_ELEMENT = {
|
|
240
|
+
size: 2,
|
|
241
|
+
thinning: 0.6,
|
|
242
|
+
streamline: 0.5,
|
|
243
|
+
smoothing: 0.5,
|
|
244
|
+
easing: FREEDRAW_EASINGS.easeOutSine,
|
|
245
|
+
};
|
|
246
|
+
export const DEFAULT_ELLIPSE_ELEMENT = {
|
|
247
|
+
ratio: 1,
|
|
248
|
+
startAngle: 0,
|
|
249
|
+
endAngle: Math.PI * 2,
|
|
250
|
+
showAuxCrosshair: false,
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Grid display types
|
|
254
|
+
*/
|
|
255
|
+
export const GRID_DISPLAY_TYPE = {
|
|
256
|
+
LINES: 10,
|
|
257
|
+
DOTS: 11,
|
|
258
|
+
CROSSES: 12,
|
|
259
|
+
ADAPTIVE: 13, // Changes based on zoom level
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Grid coordinate system types
|
|
263
|
+
*/
|
|
264
|
+
export const GRID_TYPE = {
|
|
265
|
+
RECTANGULAR: 10,
|
|
266
|
+
ISOMETRIC: 11,
|
|
267
|
+
POLAR: 12,
|
|
268
|
+
TRIANGULAR: 13,
|
|
269
|
+
CUSTOM: 14,
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Default grid configurations
|
|
273
|
+
*/
|
|
274
|
+
export const DEFAULT_GRID_SETTINGS = {
|
|
275
|
+
readonly: true,
|
|
276
|
+
isAdaptive: true,
|
|
277
|
+
type: GRID_TYPE.RECTANGULAR,
|
|
278
|
+
displayType: GRID_DISPLAY_TYPE.LINES,
|
|
279
|
+
xSpacing: { value: 10, scoped: 10 },
|
|
280
|
+
ySpacing: { value: 10, scoped: 10 },
|
|
281
|
+
subdivisions: 5,
|
|
282
|
+
origin: { x: 0, y: 0 },
|
|
283
|
+
rotation: 0,
|
|
284
|
+
followUCS: true,
|
|
285
|
+
majorStyle: {
|
|
286
|
+
color: "#CCCCCC",
|
|
287
|
+
opacity: 0.5,
|
|
288
|
+
dashPattern: [1, 1],
|
|
289
|
+
},
|
|
290
|
+
minorStyle: {
|
|
291
|
+
color: "#EEEEEE",
|
|
292
|
+
opacity: 0.3,
|
|
293
|
+
dashPattern: [0.5, 0.5],
|
|
294
|
+
},
|
|
295
|
+
showMinor: true,
|
|
296
|
+
minZoom: 0.1,
|
|
297
|
+
maxZoom: 100,
|
|
298
|
+
autoHide: true,
|
|
299
|
+
enableSnapping: true,
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Predefined grid configurations
|
|
303
|
+
*/
|
|
304
|
+
export const PREDEFINED_GRIDS = {
|
|
305
|
+
ARCHITECTURAL_IMPERIAL: "arch-imperial",
|
|
306
|
+
ARCHITECTURAL_METRIC: "arch-metric",
|
|
307
|
+
ENGINEERING_IMPERIAL: "eng-imperial",
|
|
308
|
+
ENGINEERING_METRIC: "eng-metric",
|
|
309
|
+
ISOMETRIC_30: "iso-30",
|
|
310
|
+
POLAR_DEGREES: "polar-deg",
|
|
311
|
+
FINE_DETAIL: "fine-detail",
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Snap behavior modes
|
|
315
|
+
*/
|
|
316
|
+
export const SNAP_MODE = {
|
|
317
|
+
RUNNING: 10,
|
|
318
|
+
SINGLE: 11,
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Snap override behaviors
|
|
322
|
+
*/
|
|
323
|
+
export const SNAP_OVERRIDE_BEHAVIOR = {
|
|
324
|
+
DISABLE: 10,
|
|
325
|
+
FORCE_GRID: 11,
|
|
326
|
+
FORCE_OBJECT: 12,
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Snap marker shapes
|
|
330
|
+
*/
|
|
331
|
+
export const SNAP_MARKER_SHAPE = {
|
|
332
|
+
SQUARE: 10,
|
|
333
|
+
CIRCLE: 11,
|
|
334
|
+
TRIANGLE: 12,
|
|
335
|
+
X: 13,
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Default snap settings configuration
|
|
339
|
+
*/
|
|
340
|
+
export const DEFAULT_SNAP_SETTINGS = {
|
|
341
|
+
readonly: true,
|
|
342
|
+
twistAngle: 0,
|
|
343
|
+
snapTolerance: 10,
|
|
344
|
+
objectSnapAperture: 8,
|
|
345
|
+
isOrthoModeOn: false,
|
|
346
|
+
polarTracking: {
|
|
347
|
+
enabled: false,
|
|
348
|
+
angles: [
|
|
349
|
+
0,
|
|
350
|
+
Math.PI / 4,
|
|
351
|
+
Math.PI / 2,
|
|
352
|
+
3 * Math.PI / 4,
|
|
353
|
+
Math.PI,
|
|
354
|
+
5 * Math.PI / 4,
|
|
355
|
+
3 * Math.PI / 2,
|
|
356
|
+
7 * Math.PI / 4
|
|
357
|
+
],
|
|
358
|
+
trackFromLastPoint: true,
|
|
359
|
+
showPolarCoordinates: true,
|
|
360
|
+
},
|
|
361
|
+
isObjectSnapOn: true,
|
|
362
|
+
activeObjectSnapModes: [
|
|
363
|
+
OBJECT_SNAP_MODE.ENDPOINT,
|
|
364
|
+
OBJECT_SNAP_MODE.MIDPOINT,
|
|
365
|
+
OBJECT_SNAP_MODE.CENTER,
|
|
366
|
+
OBJECT_SNAP_MODE.INTERSECTION,
|
|
367
|
+
],
|
|
368
|
+
snapPriority: [
|
|
369
|
+
OBJECT_SNAP_MODE.ENDPOINT,
|
|
370
|
+
OBJECT_SNAP_MODE.INTERSECTION,
|
|
371
|
+
OBJECT_SNAP_MODE.MIDPOINT,
|
|
372
|
+
OBJECT_SNAP_MODE.CENTER,
|
|
373
|
+
OBJECT_SNAP_MODE.QUADRANT,
|
|
374
|
+
OBJECT_SNAP_MODE.TANGENT,
|
|
375
|
+
OBJECT_SNAP_MODE.PERPENDICULAR,
|
|
376
|
+
OBJECT_SNAP_MODE.NEAREST,
|
|
377
|
+
],
|
|
378
|
+
showTrackingLines: true,
|
|
379
|
+
trackingLineStyle: {
|
|
380
|
+
color: "#00FF00",
|
|
381
|
+
opacity: 0.7,
|
|
382
|
+
dashPattern: [2, 2],
|
|
383
|
+
},
|
|
384
|
+
dynamicSnap: {
|
|
385
|
+
enabledDuringDrag: true,
|
|
386
|
+
enabledDuringRotation: true,
|
|
387
|
+
enabledDuringScale: true,
|
|
388
|
+
},
|
|
389
|
+
temporaryOverrides: [
|
|
390
|
+
{ key: "Shift", behavior: SNAP_OVERRIDE_BEHAVIOR.DISABLE },
|
|
391
|
+
{ key: "F9", behavior: SNAP_OVERRIDE_BEHAVIOR.FORCE_GRID },
|
|
392
|
+
],
|
|
393
|
+
magneticStrength: 50,
|
|
394
|
+
snapMode: SNAP_MODE.RUNNING,
|
|
395
|
+
snapMarkers: {
|
|
396
|
+
enabled: true,
|
|
397
|
+
size: 8,
|
|
398
|
+
duration: 2000,
|
|
399
|
+
styles: {
|
|
400
|
+
[OBJECT_SNAP_MODE.NONE]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#FFFFFF" },
|
|
401
|
+
[OBJECT_SNAP_MODE.ENDPOINT]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#FF0000" },
|
|
402
|
+
[OBJECT_SNAP_MODE.MIDPOINT]: { shape: SNAP_MARKER_SHAPE.TRIANGLE, color: "#00FF00" },
|
|
403
|
+
[OBJECT_SNAP_MODE.INTERSECTION]: { shape: SNAP_MARKER_SHAPE.X, color: "#FF00FF" },
|
|
404
|
+
[OBJECT_SNAP_MODE.EXTENSION]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#FFA500" },
|
|
405
|
+
[OBJECT_SNAP_MODE.PERPENDICULAR]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#800080" },
|
|
406
|
+
[OBJECT_SNAP_MODE.TANGENT]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#008080" },
|
|
407
|
+
[OBJECT_SNAP_MODE.NEAREST]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#808080" },
|
|
408
|
+
[OBJECT_SNAP_MODE.NODE]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#FFB6C1" },
|
|
409
|
+
[OBJECT_SNAP_MODE.INSERT]: { shape: SNAP_MARKER_SHAPE.TRIANGLE, color: "#90EE90" },
|
|
410
|
+
[OBJECT_SNAP_MODE.PARALLEL]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#F0E68C" },
|
|
411
|
+
[OBJECT_SNAP_MODE.APPARENT]: { shape: SNAP_MARKER_SHAPE.X, color: "#DDA0DD" },
|
|
412
|
+
[OBJECT_SNAP_MODE.FROM]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#20B2AA" },
|
|
413
|
+
[OBJECT_SNAP_MODE.POINT_FILTER]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#F4A460" },
|
|
414
|
+
[OBJECT_SNAP_MODE.TEMPORARY]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#32CD32" },
|
|
415
|
+
[OBJECT_SNAP_MODE.BETWEEN_TWO_POINTS]: { shape: SNAP_MARKER_SHAPE.TRIANGLE, color: "#FF6347" },
|
|
416
|
+
[OBJECT_SNAP_MODE.POINT_ON_CURVE]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#4169E1" },
|
|
417
|
+
[OBJECT_SNAP_MODE.GEOMETRIC]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#DC143C" },
|
|
418
|
+
[OBJECT_SNAP_MODE.CENTER]: { shape: SNAP_MARKER_SHAPE.CIRCLE, color: "#0000FF" },
|
|
419
|
+
[OBJECT_SNAP_MODE.QUADRANT]: { shape: SNAP_MARKER_SHAPE.SQUARE, color: "#FFFF00" },
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
constructionSnapEnabled: true,
|
|
423
|
+
snapToGridIntersections: false,
|
|
424
|
+
};
|
|
425
|
+
export const PAPER_SIZE = {
|
|
426
|
+
// ISO A Series
|
|
427
|
+
A0: "A0",
|
|
428
|
+
A1: "A1",
|
|
429
|
+
A2: "A2",
|
|
430
|
+
A3: "A3",
|
|
431
|
+
A4: "A4",
|
|
432
|
+
A5: "A5",
|
|
433
|
+
// ANSI Series
|
|
434
|
+
ANSI_A: "ANSI_A", // 8.5 x 11
|
|
435
|
+
ANSI_B: "ANSI_B", // 11 x 17
|
|
436
|
+
ANSI_C: "ANSI_C", // 17 x 22
|
|
437
|
+
ANSI_D: "ANSI_D", // 22 x 34
|
|
438
|
+
ANSI_E: "ANSI_E", // 34 x 44
|
|
439
|
+
// Architectural
|
|
440
|
+
ARCH_A: "ARCH_A", // 9 x 12
|
|
441
|
+
ARCH_B: "ARCH_B", // 12 x 18
|
|
442
|
+
ARCH_C: "ARCH_C", // 18 x 24
|
|
443
|
+
ARCH_D: "ARCH_D", // 24 x 36
|
|
444
|
+
ARCH_E: "ARCH_E", // 36 x 48
|
|
445
|
+
CUSTOM: "CUSTOM",
|
|
446
|
+
};
|
|
447
|
+
export const PREDEFINED_HATCH_PATTERNS = {
|
|
448
|
+
// Solid Fill
|
|
449
|
+
SOLID: "SOLID",
|
|
450
|
+
// ANSI Patterns
|
|
451
|
+
ANSI31: "ANSI31", // General crosshatch
|
|
452
|
+
ANSI32: "ANSI32", // Steel
|
|
453
|
+
ANSI33: "ANSI33", // Bronze, brass, copper
|
|
454
|
+
ANSI34: "ANSI34", // Plastic, rubber
|
|
455
|
+
ANSI35: "ANSI35", // Thermal insulation
|
|
456
|
+
ANSI36: "ANSI36", // Steel, cast iron
|
|
457
|
+
ANSI37: "ANSI37", // Aluminum
|
|
458
|
+
ANSI38: "ANSI38", // Lead, zinc, magnesium
|
|
459
|
+
// Architectural Patterns
|
|
460
|
+
AR_B816: "AR-B816", // Brick
|
|
461
|
+
AR_B816C: "AR-B816C", // Brick common
|
|
462
|
+
AR_CONC: "AR-CONC", // Concrete
|
|
463
|
+
AR_HBONE: "AR-HBONE", // Herringbone
|
|
464
|
+
AR_SAND: "AR-SAND", // Sand
|
|
465
|
+
AR_RSHKE: "AR-RSHKE", // Roof shingles
|
|
466
|
+
// ISO Patterns
|
|
467
|
+
ACAD_ISO02W100: "ACAD_ISO02W100", // Insulation
|
|
468
|
+
ACAD_ISO03W100: "ACAD_ISO03W100", // General crosshatch
|
|
469
|
+
ACAD_ISO04W100: "ACAD_ISO04W100", // Concrete
|
|
470
|
+
ACAD_ISO06W100: "ACAD_ISO06W100", // Cast iron
|
|
471
|
+
ACAD_ISO08W100: "ACAD_ISO08W100", // Copper/brass
|
|
472
|
+
ACAD_ISO11W100: "ACAD_ISO11W100", // Steel
|
|
473
|
+
ACAD_ISO13W100: "ACAD_ISO13W100", // Plastic
|
|
474
|
+
// Common Patterns
|
|
475
|
+
BOX: "BOX",
|
|
476
|
+
BRICK: "BRICK",
|
|
477
|
+
CROSS: "CROSS",
|
|
478
|
+
DASH: "DASH",
|
|
479
|
+
DOTS: "DOTS",
|
|
480
|
+
EARTH: "EARTH",
|
|
481
|
+
GRASS: "GRASS",
|
|
482
|
+
GRAVEL: "GRAVEL",
|
|
483
|
+
HEX: "HEX",
|
|
484
|
+
HONEY: "HONEY",
|
|
485
|
+
INSUL: "INSUL",
|
|
486
|
+
LINE: "LINE",
|
|
487
|
+
NET: "NET",
|
|
488
|
+
SQUARE: "SQUARE",
|
|
489
|
+
STEEL: "STEEL",
|
|
490
|
+
TRIANG: "TRIANG",
|
|
491
|
+
ZIGZAG: "ZIGZAG",
|
|
492
|
+
};
|
|
493
|
+
// /**
|
|
494
|
+
// * Default hatch styles
|
|
495
|
+
// */
|
|
496
|
+
// export const DEFAULT_HATCH_STYLE: DucHatchStyle = {
|
|
497
|
+
// id: "default-hatch",
|
|
498
|
+
// name: "Default Hatch",
|
|
499
|
+
// background: {
|
|
500
|
+
// content: {
|
|
501
|
+
// preference: "color",
|
|
502
|
+
// src: "#000000",
|
|
503
|
+
// visible: true,
|
|
504
|
+
// opacity: 1,
|
|
505
|
+
// }
|
|
506
|
+
// },
|
|
507
|
+
// stroke: {
|
|
508
|
+
// content: {
|
|
509
|
+
// preference: "color",
|
|
510
|
+
// src: "#000000",
|
|
511
|
+
// visible: true,
|
|
512
|
+
// opacity: 1,
|
|
513
|
+
// },
|
|
514
|
+
// width: { value: 1, scoped: 1 },
|
|
515
|
+
// style: {
|
|
516
|
+
// preference: "solid",
|
|
517
|
+
// scale: 1,
|
|
518
|
+
// },
|
|
519
|
+
// placement: "center",
|
|
520
|
+
// },
|
|
521
|
+
// hatchStyle: HATCH_STYLE.NORMAL,
|
|
522
|
+
// pattern: {
|
|
523
|
+
// name: "ANSI31",
|
|
524
|
+
// scale: 1,
|
|
525
|
+
// angle: 0,
|
|
526
|
+
// origin: { x: 0, y: 0 },
|
|
527
|
+
// double: false,
|
|
528
|
+
// },
|
|
529
|
+
// };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DucElement, DucElementsIncludingDeleted, DucFrameLikeElement, ElementsMap } from "ducjs/types/elements";
|
|
2
|
+
export declare const getContainingFrame: (element: DucElement, elementsMap: ElementsMap) => DucFrameLikeElement | null;
|
|
3
|
+
export declare const getFrameLikeElements: (allElements: DucElementsIncludingDeleted) => DucFrameLikeElement[];
|
|
4
|
+
export declare const getFrameLikeTitle: (element: DucFrameLikeElement) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isFrameLikeElement } from "ducjs/types/elements/typeChecks";
|
|
2
|
+
export const getContainingFrame = (element, elementsMap) => {
|
|
3
|
+
if (!element.frameId) {
|
|
4
|
+
return null;
|
|
5
|
+
}
|
|
6
|
+
return (elementsMap.get(element.frameId) ||
|
|
7
|
+
null);
|
|
8
|
+
};
|
|
9
|
+
export const getFrameLikeElements = (allElements) => {
|
|
10
|
+
return allElements.filter((element) => isFrameLikeElement(element));
|
|
11
|
+
};
|
|
12
|
+
export const getFrameLikeTitle = (element) => {
|
|
13
|
+
return element.label === null
|
|
14
|
+
? "Frame"
|
|
15
|
+
: element.label;
|
|
16
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { med } from "ducjs/utils/math";
|
|
2
|
+
import { getStroke } from "perfect-freehand";
|
|
3
|
+
// Trim SVG path data so number are each two decimal points. This
|
|
4
|
+
// improves SVG exports, and prevents rendering errors on points
|
|
5
|
+
// with long decimals.
|
|
6
|
+
const TO_FIXED_PRECISION = /(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;
|
|
7
|
+
function getSvgPathFromStroke(points) {
|
|
8
|
+
if (!points.length) {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
const max = points.length - 1;
|
|
12
|
+
return points
|
|
13
|
+
.reduce((acc, point, i, arr) => {
|
|
14
|
+
if (i === max) {
|
|
15
|
+
acc.push(point, med(point, arr[0]), "L", arr[0], "Z");
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
acc.push(point, med(point, arr[i + 1]));
|
|
19
|
+
}
|
|
20
|
+
return acc;
|
|
21
|
+
}, ["M", points[0], "Q"])
|
|
22
|
+
.join(" ")
|
|
23
|
+
.replace(TO_FIXED_PRECISION, "$1");
|
|
24
|
+
}
|
|
25
|
+
export function getFreeDrawSvgPath(element) {
|
|
26
|
+
// If input points are empty (should they ever be?) return a dot
|
|
27
|
+
if (element.points.length === 0) {
|
|
28
|
+
return "";
|
|
29
|
+
}
|
|
30
|
+
const inputPoints = element.simulatePressure
|
|
31
|
+
? element.points.map(({ x, y }, i) => [x.scoped, y.scoped, element.pressures[i]])
|
|
32
|
+
: element.points.map(({ x, y }) => [x.scoped, y.scoped]);
|
|
33
|
+
// Consider changing the options for simulated pressure vs real pressure
|
|
34
|
+
const options = {
|
|
35
|
+
size: element.size.scoped,
|
|
36
|
+
simulatePressure: element.simulatePressure,
|
|
37
|
+
thinning: element.thinning,
|
|
38
|
+
smoothing: element.smoothing,
|
|
39
|
+
streamline: element.streamline,
|
|
40
|
+
easing: element.easing,
|
|
41
|
+
start: element.start || undefined,
|
|
42
|
+
end: element.end || undefined,
|
|
43
|
+
last: !!element.lastCommittedPoint, // LastCommittedPoint is added on pointerup
|
|
44
|
+
};
|
|
45
|
+
return getSvgPathFromStroke(getStroke(inputPoints, options));
|
|
46
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export * from "./newElement";
|
|
2
|
+
export * from "./freedrawElement";
|
|
3
|
+
export * from "./linearElement";
|
|
4
|
+
export * from "./textElement";
|
|
5
|
+
export * from "./frameElement";
|
|
6
|
+
export * from "./viewportElement";
|
|
7
|
+
import { Scope } from "ducjs/types";
|
|
8
|
+
import { _DucStackBase, DucElement, DucNonSelectionElement, DucTableElement, DucTextStyle, ElementConstructorOpts, NonDeleted } from "ducjs/types/elements";
|
|
9
|
+
import { GeometricPoint, TuplePoint } from "ducjs/types/geometryTypes";
|
|
10
|
+
import { Mutable } from "ducjs/types/utility-types";
|
|
11
|
+
/**
|
|
12
|
+
* Returns a default DucTextStyle object for the given scope.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getDefaultTextStyle(currentScope: Scope): DucTextStyle;
|
|
15
|
+
/**
|
|
16
|
+
* Mutates element, bumping `version`, `versionNonce`, and `updated`.
|
|
17
|
+
*
|
|
18
|
+
* NOTE: does not trigger re-render.
|
|
19
|
+
*/
|
|
20
|
+
export declare const bumpVersion: <T extends Mutable<DucElement>>(element: T, version?: DucElement["version"]) => T;
|
|
21
|
+
export declare const getDefaultStackProperties: () => _DucStackBase;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the data structures for a default table.
|
|
24
|
+
* This does not include base element properties like x, y, width, etc.,
|
|
25
|
+
* which are added during element creation.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getDefaultTableData: (currentScope: Scope) => {
|
|
28
|
+
columnOrder: DucTableElement["columnOrder"];
|
|
29
|
+
rowOrder: DucTableElement["rowOrder"];
|
|
30
|
+
columns: DucTableElement["columns"];
|
|
31
|
+
rows: DucTableElement["rows"];
|
|
32
|
+
cells: DucTableElement["cells"];
|
|
33
|
+
flowDirection: DucTableElement["flowDirection"];
|
|
34
|
+
headerRowStyle: DucTableElement["headerRowStyle"];
|
|
35
|
+
dataRowStyle: DucTableElement["dataRowStyle"];
|
|
36
|
+
dataColumnStyle: DucTableElement["dataColumnStyle"];
|
|
37
|
+
headerRowCount: DucTableElement["headerRowCount"];
|
|
38
|
+
autoSize: DucTableElement["autoSize"];
|
|
39
|
+
};
|
|
40
|
+
export declare const getBaseElementProps: (element: DucNonSelectionElement) => ElementConstructorOpts;
|
|
41
|
+
export declare function convertPointToTuple(point: GeometricPoint): TuplePoint;
|
|
42
|
+
export declare const migratePoints: (points: any[]) => GeometricPoint[];
|
|
43
|
+
export declare const getNonDeletedElements: <T extends DucElement>(elements: readonly T[]) => readonly NonDeleted<T>[];
|
|
44
|
+
export declare const isInvisiblySmallElement: (element: DucElement) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Sorts a list of DucElements by their z-index (lowest first).
|
|
47
|
+
*
|
|
48
|
+
* @param elements The list of elements to sort.
|
|
49
|
+
* @returns A new array with elements sorted by z-index.
|
|
50
|
+
*/
|
|
51
|
+
export declare const getElementsSortedByZIndex: (elements: readonly DucElement[]) => DucElement[];
|