@pixerate/editor 0.113.0 → 0.114.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/THIRD_PARTY_NOTICES.md +5 -0
- package/dist/animation-editor/index.cjs +60 -54
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +3 -3
- package/dist/animation-editor/index.d.ts +3 -3
- package/dist/animation-editor/index.js +14 -8
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/builtin-CY97ppKM.d.cts +354 -0
- package/dist/builtin-CY97ppKM.d.ts +354 -0
- package/dist/canvas/index.cjs +3 -3
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.js +9 -9
- package/dist/chunk-26PGXHY7.cjs +753 -0
- package/dist/chunk-26PGXHY7.cjs.map +1 -0
- package/dist/chunk-2OJACTPR.cjs +929 -0
- package/dist/chunk-2OJACTPR.cjs.map +1 -0
- package/dist/chunk-3UFGNHSP.js +929 -0
- package/dist/chunk-3UFGNHSP.js.map +1 -0
- package/dist/{chunk-YGIMK4NX.cjs → chunk-5OVJHMZQ.cjs} +757 -825
- package/dist/chunk-5OVJHMZQ.cjs.map +1 -0
- package/dist/chunk-643B2HKC.cjs +534 -0
- package/dist/chunk-643B2HKC.cjs.map +1 -0
- package/dist/chunk-6FCKOS2B.js +534 -0
- package/dist/chunk-6FCKOS2B.js.map +1 -0
- package/dist/chunk-BRLYOPLT.js +2574 -0
- package/dist/chunk-BRLYOPLT.js.map +1 -0
- package/dist/{chunk-LQEEDHOP.js → chunk-C6C5PDKU.js} +759 -761
- package/dist/chunk-C6C5PDKU.js.map +1 -0
- package/dist/{chunk-4KLT7ZYS.cjs → chunk-DFQEX3AM.cjs} +29 -29
- package/dist/{chunk-4KLT7ZYS.cjs.map → chunk-DFQEX3AM.cjs.map} +1 -1
- package/dist/{chunk-CZOXTEMN.js → chunk-EUVSQ25B.js} +336 -404
- package/dist/chunk-EUVSQ25B.js.map +1 -0
- package/dist/chunk-G5NMLUVF.cjs +2574 -0
- package/dist/chunk-G5NMLUVF.cjs.map +1 -0
- package/dist/{chunk-LPYOIVLA.js → chunk-LKCYANMW.js} +3 -3
- package/dist/{chunk-W3GXSUSQ.cjs → chunk-LPLCWZTM.cjs} +5087 -1283
- package/dist/chunk-LPLCWZTM.cjs.map +1 -0
- package/dist/chunk-MMVHBKMM.js +753 -0
- package/dist/chunk-MMVHBKMM.js.map +1 -0
- package/dist/{chunk-POGBUYWE.cjs → chunk-ST7E3NEE.cjs} +857 -859
- package/dist/chunk-ST7E3NEE.cjs.map +1 -0
- package/dist/{chunk-7VOHOPLW.cjs → chunk-TCKIXI46.cjs} +59 -59
- package/dist/{chunk-7VOHOPLW.cjs.map → chunk-TCKIXI46.cjs.map} +1 -1
- package/dist/{chunk-XIOMMGPD.cjs → chunk-TFOPHZ3U.cjs} +1 -1
- package/dist/chunk-TFOPHZ3U.cjs.map +1 -0
- package/dist/{chunk-Z4BC6M74.js → chunk-UBIXVXPR.js} +2 -2
- package/dist/{chunk-BLWCAQCW.js → chunk-VXR7XWMF.js} +4574 -770
- package/dist/chunk-VXR7XWMF.js.map +1 -0
- package/dist/{chunk-HNS7UHCM.js → chunk-XK5LZKBD.js} +1 -1
- package/dist/chunk-XK5LZKBD.js.map +1 -0
- package/dist/cms/index.cjs +146 -0
- package/dist/cms/index.cjs.map +1 -0
- package/dist/cms/index.d.cts +51 -0
- package/dist/cms/index.d.ts +51 -0
- package/dist/cms/index.js +146 -0
- package/dist/cms/index.js.map +1 -0
- package/dist/{export-DIkoK8-r.d.ts → export-_1dUKwpF.d.ts} +217 -191
- package/dist/{export-CEXEzqBf.d.cts → export-b6NjCZ5-.d.cts} +217 -191
- package/dist/image-editor/index.cjs +1779 -1280
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +77 -93
- package/dist/image-editor/index.d.ts +77 -93
- package/dist/image-editor/index.js +740 -241
- package/dist/image-editor/index.js.map +1 -1
- package/dist/opentype-BZEOSOX3.d.ts +188 -0
- package/dist/opentype-Dpe75vL5.d.cts +188 -0
- package/dist/paint/index.cjs +4 -4
- package/dist/paint/index.d.cts +2 -2
- package/dist/paint/index.d.ts +2 -2
- package/dist/paint/index.js +3 -3
- package/dist/paint-editor/index.cjs +146 -145
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +9 -8
- package/dist/paint-editor/index.d.ts +9 -8
- package/dist/paint-editor/index.js +6 -5
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/raster/index.cjs +53 -3
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.d.cts +62 -91
- package/dist/raster/index.d.ts +62 -91
- package/dist/raster/index.js +59 -9
- package/dist/{render-BEriFuqK.d.cts → render-B1K_OoLy.d.cts} +87 -2
- package/dist/{render-tjzKaik-.d.ts → render-CrmHOgpo.d.ts} +87 -2
- package/dist/{retouch-CEIKR22W.d.cts → retouch-Bxkuc0KH.d.cts} +1 -1
- package/dist/{retouch-BXmeSCaB.d.ts → retouch-Do6tBs2H.d.ts} +1 -1
- package/dist/{surface-C8RRg_Bh.d.cts → surface-Cn30xIV6.d.cts} +6 -1
- package/dist/{surface-C8RRg_Bh.d.ts → surface-Cn30xIV6.d.ts} +6 -1
- package/dist/{svg-D_cfkhlB.d.cts → svg-BnRj0q8i.d.cts} +16 -4
- package/dist/{svg-wIaKLrU0.d.ts → svg-CmmBFfGT.d.ts} +16 -4
- package/dist/{types-DtL_qLFz.d.ts → types-1SUQKDAw.d.ts} +273 -4
- package/dist/{types-DyQq-WPY.d.cts → types-yINF17Ta.d.cts} +273 -4
- package/dist/vector/index.cjs +12170 -7343
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +1579 -16
- package/dist/vector/index.d.ts +1579 -16
- package/dist/vector/index.js +6303 -1476
- package/dist/vector/index.js.map +1 -1
- package/dist/warp-B39VsOtd.d.cts +348 -0
- package/dist/warp-DMN30aY6.d.ts +348 -0
- package/dist/zlib-dxQdgHyN.d.cts +95 -0
- package/dist/zlib-dxQdgHyN.d.ts +95 -0
- package/package.json +6 -1
- package/skills/pixerate-image-editor/SKILL.md +12 -36
- package/skills/pixerate-image-editor/references/color-management.md +37 -0
- package/skills/pixerate-image-editor/references/photoshop-files.md +39 -0
- package/skills/pixerate-vector/SKILL.md +54 -2
- package/dist/chunk-BLWCAQCW.js.map +0 -1
- package/dist/chunk-CZOXTEMN.js.map +0 -1
- package/dist/chunk-HNS7UHCM.js.map +0 -1
- package/dist/chunk-JLYX4V57.cjs +0 -2001
- package/dist/chunk-JLYX4V57.cjs.map +0 -1
- package/dist/chunk-KB2YBCVS.js +0 -2001
- package/dist/chunk-KB2YBCVS.js.map +0 -1
- package/dist/chunk-LQEEDHOP.js.map +0 -1
- package/dist/chunk-POGBUYWE.cjs.map +0 -1
- package/dist/chunk-W3GXSUSQ.cjs.map +0 -1
- package/dist/chunk-XIOMMGPD.cjs.map +0 -1
- package/dist/chunk-YGIMK4NX.cjs.map +0 -1
- package/dist/homography-CZ-tFjay.d.cts +0 -50
- package/dist/homography-Ctfjoc1b.d.ts +0 -50
- package/dist/warp-CWHZzE3x.d.ts +0 -118
- package/dist/warp-D5jz_tN7.d.cts +0 -118
- /package/dist/{chunk-LPYOIVLA.js.map → chunk-LKCYANMW.js.map} +0 -0
- /package/dist/{chunk-Z4BC6M74.js.map → chunk-UBIXVXPR.js.map} +0 -0
package/dist/vector/index.d.cts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { o as Vec2$1, w as VectorSubpath, h as VectorBounds, z as VectorAnchor, x as VectorDocument, e as VectorNode, b as VectorPathNode, A as VectorTextNode, B as VectorAnchorType, s as VectorPaint, g as VectorGroupNode, C as VectorCornerKind, y as VectorWidthPoint, n as VectorGradient, u as VectorGradientStop, D as VectorViewport, E as VectorConnectorRoute, F as VectorConnectorSide, G as VectorConnectorEnd, H as VectorConnector, I as VectorConstraintKind, J as VectorConstraint, K as VectorCharacterStyle, L as VectorTextRun, M as VectorParagraphStyle, N as VectorTextFrame, O as VectorTransformHandle, P as VectorAnchorRef, Q as VectorPathfinderOperation, R as VectorTool, S as VectorDefaults, T as VectorTextAlign, U as VectorStyle, W as VectorHandleRef, X as VectorSegmentRef, Y as VectorBlendOptions, t as VectorMatrix, Z as VectorModifiers, _ as VectorBlendMode, k as VectorFilterType, V as VectorEffectType, $ as VectorAlign, a0 as VectorDistribute, a1 as VectorArrange, d as VectorBooleanOperation, a2 as VectorMaskType, a3 as VectorArrowhead, a4 as VectorResizing, a5 as VectorFrame, a6 as VectorHorizontalResizing, a7 as VectorVerticalResizing, a8 as VectorMask, a9 as VectorAverageAxis, aa as VectorSymbol, ab as VectorParameter, i as VectorWarpMesh, c as VectorFillRule, ac as VectorBlendSpacing, ad as VectorGradientInterpolation, q as VectorGradientSpread, r as VectorGradientType, v as VectorStrokeAlign, ae as VectorStrokeGradientMode, af as VectorArrowAlign, f as VectorEffect, ag as VectorPaintLayer, ah as VectorStrokeLayer, m as VectorFilter, ai as VectorBlend, aj as VectorMergeMode, ak as VectorLineJoin, a as VectorEffectParamsMap, al as VectorStrokeSettings, am as VectorInstanceOverrides, j as VectorInstanceNode } from '../types-yINF17Ta.cjs';
|
|
2
|
+
export { an as VECTOR_ARROWHEADS, ao as VECTOR_BLEND_MODES, ap as VECTOR_BLEND_SPACINGS, aq as VECTOR_CONNECTOR_ROUTES, ar as VECTOR_CONNECTOR_SIDES, as as VECTOR_CONSTRAINT_KINDS, at as VECTOR_CORNER_KINDS, au as VECTOR_EFFECT_TYPES, av as VECTOR_FILTER_TYPES, aw as VECTOR_GRADIENT_INTERPOLATIONS, ax as VECTOR_GRADIENT_SPREADS, ay as VECTOR_GRADIENT_TYPES, az as VECTOR_HORIZONTAL_RESIZING, aA as VECTOR_MASK_TYPES, aB as VECTOR_MERGE_MODES, aC as VECTOR_PATHFINDER_OPERATIONS, aD as VECTOR_PATH_TEXT_BASELINES, aE as VECTOR_STROKE_GRADIENT_MODES, aF as VECTOR_TEXT_ALIGNS, aG as VECTOR_TOOLS, aH as VECTOR_TRANSFORM_HANDLES, aI as VECTOR_VERTICAL_RESIZING, aJ as VectorCorner, l as VectorFilterParamsMap, aK as VectorGeomRef, p as VectorGradientUnits, aL as VectorLineCap, aM as VectorPathTextBaseline, aN as VectorStrokeLayerKind, aO as VectorTextRunStyle, aP as VectorWarpStyle } from '../types-yINF17Ta.cjs';
|
|
3
3
|
import { P as Point } from '../types-BFkYA4eF.cjs';
|
|
4
4
|
import { a as BezierPathInput, A as AffineMatrix$1, B as BezierPath, c as BezierSegment } from '../bezier-BfwIbVTl.cjs';
|
|
5
5
|
export { S as SvgGradientDef } from '../bezier-BfwIbVTl.cjs';
|
|
6
|
-
import { a as VectorGradientHandle, V as VectorSvgExportOptions, b as VectorGradientPatch, c as VectorEnvelopeParams, d as VectorRenderFilter, e as VectorAppearanceShape, f as VectorFilterParamSpec, g as VectorEffectParamSpec, h as VectorRenderStrokeParts, i as VectorPaintDef } from '../svg-
|
|
7
|
-
export { j as VECTOR_EFFECT_DEFAULTS, k as VECTOR_EFFECT_LABELS, l as VECTOR_EFFECT_PARAM_SPECS, m as VECTOR_FILTER_DEFAULTS, n as VECTOR_FILTER_LABELS, o as VECTOR_FILTER_MENU, p as VECTOR_FILTER_PARAM_SPECS, q as VECTOR_GRADIENT_MAX_PERIODS, r as VECTOR_GRADIENT_MIN_STOPS, s as VectorBooleanOperand, t as VectorFilterPrimitive, u as VectorGradientPoints, v as VectorGradientRamp, w as VectorGradientSvgOptions, x as VectorPaintSvgOptions, y as VectorRgba, z as VectorSvgImportOptions, A as VectorSvgPatternDef, B as VectorSvgWrapper, C as activeVectorEffects, D as activeVectorFilters, E as applyVectorCornersAttribute, F as applyVectorEffects, G as applyVectorGradientPatch, H as applyVectorGradientSpread, I as clearVectorLiveBooleanCache, J as convertVectorGradient, K as createVectorEffect, L as createVectorFilter, M as defaultVectorGradient, N as expandVectorAppearance, O as expandVectorAppearances, P as expandVectorGradientSpread, Q as expandVectorGradientStops, R as explicitVectorGradient, S as foldVectorBooleanOperands, T as gradientMidpointRemap, U as hasExplicitGradientGeometry, W as hasOwnVectorAppearance, X as hasVectorAppearance, Y as insertVectorGradientStop, Z as isCentredVectorGradient, _ as isVectorFilterType, $ as isVectorGradient, a0 as isVectorLiveBoolean, a1 as mapVectorGradient, a2 as mapVectorPaint, a3 as moveVectorGradientHandle, a4 as moveVectorGradientStop, a5 as normalizeVectorEffectParams, a6 as normalizeVectorFilterParams, a7 as parseSvgTransform, a8 as parseVectorColor, a9 as parseVectorSvg, aa as patternAttrs, ab as periodicVectorGradientStops, ac as pinVectorGradient, ad as removeVectorGradientStop, ae as reverseVectorGradient, af as samplePlainStops, ag as sampleVectorGradient, ah as sampleVectorGradientAt, ai as sampleVectorPaintDefAt, aj as sanitizeVectorEffects, ak as sanitizeVectorFilters, al as sanitizeVectorGradient, am as setVectorGradientVector, an as sortedVectorGradientStops, ao as spanVectorGradientStops, ap as transformVectorEffects, aq as transformVectorGradient, ar as transformVectorPaint, as as vectorAppearanceNodes, at as vectorAppearanceOutline, au as vectorAppearanceShapes, av as vectorBoxMatrix, aw as vectorChildAppearanceShapes, ax as vectorCornersAttribute, ay as vectorDocumentToSvg, az as vectorEffectInputBounds, aA as vectorEffectInputPaths, aB as vectorEnteredGroups, aC as vectorEnvelopeFrame, aD as vectorEnvelopeMap, aE as vectorEnvelopeMesh, aF as vectorFilterMarkup, aG as vectorFilterParamKeys, aH as vectorFilterReach, aI as vectorFilterSvg, aJ as vectorGradientArea, aK as vectorGradientAspect, aL as vectorGradientFocalParam, aM as vectorGradientHandles, aN as vectorGradientMatrix, aO as vectorGradientMidpointFromPosition, aP as vectorGradientMidpointPosition, aQ as vectorGradientNeedsExpansion, aR as vectorGradientParam, aS as vectorGradientPoints, aT as vectorGradientRamp, aU as vectorGradientSvgDefs, aV as vectorGradientTAt, aW as vectorGradientUnitsMatrix, aX as
|
|
6
|
+
import { a as VectorGradientHandle, V as VectorSvgExportOptions, b as VectorGradientPatch, c as VectorEnvelopeParams, d as VectorRenderFilter, e as VectorAppearanceShape, f as VectorFilterParamSpec, g as VectorEffectParamSpec, h as VectorRenderStrokeParts, i as VectorPaintDef } from '../svg-BnRj0q8i.cjs';
|
|
7
|
+
export { j as VECTOR_EFFECT_DEFAULTS, k as VECTOR_EFFECT_LABELS, l as VECTOR_EFFECT_PARAM_SPECS, m as VECTOR_FILTER_DEFAULTS, n as VECTOR_FILTER_LABELS, o as VECTOR_FILTER_MENU, p as VECTOR_FILTER_PARAM_SPECS, q as VECTOR_GRADIENT_MAX_PERIODS, r as VECTOR_GRADIENT_MIN_STOPS, s as VectorBooleanOperand, t as VectorFilterPrimitive, u as VectorGradientPoints, v as VectorGradientRamp, w as VectorGradientSvgOptions, x as VectorPaintSvgOptions, y as VectorRgba, z as VectorSvgImportOptions, A as VectorSvgPatternDef, B as VectorSvgWrapper, C as activeVectorEffects, D as activeVectorFilters, E as applyVectorCornersAttribute, F as applyVectorEffects, G as applyVectorGradientPatch, H as applyVectorGradientSpread, I as clearVectorLiveBooleanCache, J as convertVectorGradient, K as createVectorEffect, L as createVectorFilter, M as defaultVectorGradient, N as expandVectorAppearance, O as expandVectorAppearances, P as expandVectorGradientSpread, Q as expandVectorGradientStops, R as explicitVectorGradient, S as foldVectorBooleanOperands, T as gradientMidpointRemap, U as hasExplicitGradientGeometry, W as hasOwnVectorAppearance, X as hasVectorAppearance, Y as insertVectorGradientStop, Z as isCentredVectorGradient, _ as isVectorFilterType, $ as isVectorGradient, a0 as isVectorLiveBoolean, a1 as mapVectorGradient, a2 as mapVectorPaint, a3 as moveVectorGradientHandle, a4 as moveVectorGradientStop, a5 as normalizeVectorEffectParams, a6 as normalizeVectorFilterParams, a7 as parseSvgTransform, a8 as parseVectorColor, a9 as parseVectorSvg, aa as patternAttrs, ab as periodicVectorGradientStops, ac as pinVectorGradient, ad as removeVectorGradientStop, ae as reverseVectorGradient, af as samplePlainStops, ag as sampleVectorGradient, ah as sampleVectorGradientAt, ai as sampleVectorPaintDefAt, aj as sanitizeVectorEffects, ak as sanitizeVectorFilters, al as sanitizeVectorGradient, am as setVectorGradientVector, an as sortedVectorGradientStops, ao as spanVectorGradientStops, ap as transformVectorEffects, aq as transformVectorGradient, ar as transformVectorPaint, as as vectorAppearanceNodes, at as vectorAppearanceOutline, au as vectorAppearanceShapes, av as vectorBoxMatrix, aw as vectorChildAppearanceShapes, ax as vectorCornersAttribute, ay as vectorDocumentToSvg, az as vectorEffectInputBounds, aA as vectorEffectInputPaths, aB as vectorEnteredGroups, aC as vectorEnvelopeFrame, aD as vectorEnvelopeMap, aE as vectorEnvelopeMesh, aF as vectorFilterMarkup, aG as vectorFilterParamKeys, aH as vectorFilterReach, aI as vectorFilterSvg, aJ as vectorGradientArea, aK as vectorGradientAspect, aL as vectorGradientFocalParam, aM as vectorGradientHandles, aN as vectorGradientMatrix, aO as vectorGradientMidpointFromPosition, aP as vectorGradientMidpointPosition, aQ as vectorGradientNeedsExpansion, aR as vectorGradientParam, aS as vectorGradientPoints, aT as vectorGradientRamp, aU as vectorGradientSvgDefs, aV as vectorGradientTAt, aW as vectorGradientUnitsMatrix, aX as vectorInstanceDrawn, aY as vectorLiveBooleanSteps, aZ as vectorNodeEnvelope, a_ as vectorNodeFilterSvg, a$ as vectorNodeLocalPaintBounds, b0 as vectorOperandOperation, b1 as vectorPaintToSvg, b2 as vectorPathLocalBounds, b3 as vectorStrokeSvgParts, b4 as widthProfileFromAttribute, b5 as widthProfileToAttribute } from '../svg-BnRj0q8i.cjs';
|
|
8
8
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
9
|
+
import { a as TextFont, L as LaidFragment, f as LaidLine, e as TextLayout, T as TextShaper } from '../warp-B39VsOtd.cjs';
|
|
10
|
+
export { g as VECTOR_WARP_STYLES, h as VECTOR_WARP_STYLE_LABELS, W as VectorWarpPreset, i as dragVectorMeshPoint, j as evalVectorMesh, k as fitVectorMesh, l as isValidVectorMesh, m as mapVectorMeshPoints, p as pullVectorMesh, r as removeVectorMeshSplitU, n as removeVectorMeshSplitV, o as resizeVectorMesh, s as splitVectorMeshU, q as splitVectorMeshV, t as vectorIdentityMesh, w as vectorMeshColumns, u as vectorMeshControlBounds, v as vectorMeshEditPoints, x as vectorMeshGridCurves, y as vectorMeshParamAt, z as vectorMeshRows, A as vectorWarpPresetGrid, B as vectorWarpPresetMesh } from '../warp-B39VsOtd.cjs';
|
|
11
|
+
import { A as AffineMatrix, V as Vec2 } from '../types-CwMPoRMU.cjs';
|
|
12
|
+
export { H as VectorHomography } from '../types-CwMPoRMU.cjs';
|
|
9
13
|
import { C as CommandSpec } from '../registry-CaR7LC6W.cjs';
|
|
10
14
|
import { S as StrokeJoin, a as StrokeCap, P as PlanarMap, b as PathfinderOperation, c as PathfinderShape } from '../pathfinder-BZL8aSu0.cjs';
|
|
11
15
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
12
|
-
export { a as applyVectorHomography, o as orderVectorQuad, s as solve8,
|
|
13
|
-
import { A as AffineMatrix, V as Vec2 } from '../types-CwMPoRMU.cjs';
|
|
14
|
-
export { H as VectorHomography } from '../types-CwMPoRMU.cjs';
|
|
15
|
-
export { a as VECTOR_WARP_STYLES, b as VECTOR_WARP_STYLE_LABELS, W as VectorWarpPreset, d as dragVectorMeshPoint, e as evalVectorMesh, f as fitVectorMesh, i as isValidVectorMesh, m as mapVectorMeshPoints, p as pullVectorMesh, r as removeVectorMeshSplitU, c as removeVectorMeshSplitV, g as resizeVectorMesh, s as splitVectorMeshU, h as splitVectorMeshV, j as vectorIdentityMesh, w as vectorMeshColumns, k as vectorMeshControlBounds, l as vectorMeshEditPoints, n as vectorMeshGridCurves, o as vectorMeshParamAt, q as vectorMeshRows, t as vectorWarpPresetGrid, u as vectorWarpPresetMesh } from '../warp-D5jz_tN7.cjs';
|
|
16
|
+
export { C as CanvasTextShaperOptions, O as OpenTypeFont, a as OutlineFontEntry, b as OutlineFontFace, c as OutlinePathCommand, d as applyVectorHomography, e as createCanvasTextShaper, f as createMetricTextShaper, g as createOutlineTextShaper, h as cssFontFamily, l as loadOpenTypeFont, o as orderVectorQuad, p as parseOpenTypeFont, s as solve8, i as vectorHomography, j as vectorHomographyKeepsQuad } from '../opentype-Dpe75vL5.cjs';
|
|
16
17
|
import '../types-DsiXGmjo.cjs';
|
|
17
18
|
import '../schema-Di0CS6Pe.cjs';
|
|
18
19
|
|
|
@@ -90,6 +91,8 @@ declare function locateVectorNode(nodes: VectorNode[], id: string): {
|
|
|
90
91
|
index: number;
|
|
91
92
|
parent: VectorGroupNode | null;
|
|
92
93
|
} | null;
|
|
94
|
+
/** Every node that paints with fills and strokes in the subtree: paths and text. */
|
|
95
|
+
declare function collectPaintedNodes(node: VectorNode): Array<VectorPathNode | VectorTextNode>;
|
|
93
96
|
/** Every path node in the subtree (a path node itself, or a group's descendants). */
|
|
94
97
|
declare function collectPathNodes(node: VectorNode): VectorPathNode[];
|
|
95
98
|
/** The node's local → parent matrix (identity when it has no `transform`). */
|
|
@@ -257,11 +260,11 @@ declare function expandVectorCorners(subpaths: readonly VectorSubpath[]): Vector
|
|
|
257
260
|
* Sets (or clears, with radius 0) the live corner of anchors. `kind` keeps each anchor's own
|
|
258
261
|
* kind when omitted. Anchors that make no corner keep the radius too, so it applies once they do.
|
|
259
262
|
*/
|
|
260
|
-
declare function setAnchorCorner(a: VectorAnchor, radius: number, kind?: VectorCornerKind): VectorAnchor;
|
|
263
|
+
declare function setAnchorCorner(a: VectorAnchor, radius: number, kind?: VectorCornerKind, smoothing?: number): VectorAnchor;
|
|
261
264
|
/** The next corner kind (Alt-clicking a corner widget cycles round → inverted → chamfer). */
|
|
262
265
|
declare function nextVectorCornerKind(kind: VectorCornerKind | undefined): VectorCornerKind;
|
|
263
266
|
/** Every anchor of a subpath given the same live corner (radius 0 clears them). */
|
|
264
|
-
declare function setSubpathCorners(sp: VectorSubpath, radius: number, kind?: VectorCornerKind): VectorSubpath;
|
|
267
|
+
declare function setSubpathCorners(sp: VectorSubpath, radius: number, kind?: VectorCornerKind, smoothing?: number): VectorSubpath;
|
|
265
268
|
|
|
266
269
|
/**
|
|
267
270
|
* Variable-width stroke profiles: stroke widths at positions along a path (each subpath on its
|
|
@@ -461,6 +464,487 @@ declare function vectorGradientBarPosition(a: Pick<VectorGradientAnnotator, 'sta
|
|
|
461
464
|
/** The annotator part under screen point `p`: stops, then midpoints, the handles and the bar. */
|
|
462
465
|
declare function hitVectorGradientAnnotator(a: VectorGradientAnnotator, p: Vec2$1): VectorGradientPart | null;
|
|
463
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Connectors glued to objects: connection sites, routing and rerouting after every edit.
|
|
469
|
+
*
|
|
470
|
+
* After wordcraft's `crates/doc/src/connector.rs` (`sites`, `site_point`, `nearest_site`,
|
|
471
|
+
* `connector_segs`, `reroute_group`) and deckcraft's `crates/engine/src/connect.rs` (`sites`,
|
|
472
|
+
* `nearest_site`, `reroute`, `set_glue`) (MIT OR Apache-2.0, © ArtCraft Team and contributors; see
|
|
473
|
+
* THIRD_PARTY_NOTICES.md): an end is glued to a site of another object (here a side's middle or the
|
|
474
|
+
* centre of its own bounds, through its rotation); the connector is routed again whenever what it
|
|
475
|
+
* is glued to changes, and glue to an object that no longer exists is dropped, the end staying where
|
|
476
|
+
* it was. Straight, elbow and curved routes follow `connector_segs`; elbows leave and enter along the
|
|
477
|
+
* sides' normals (a gap out first) and curves take their handles along them. `auto` sides (the one
|
|
478
|
+
* facing the other end) are ours.
|
|
479
|
+
*/
|
|
480
|
+
|
|
481
|
+
type Vec$1 = {
|
|
482
|
+
x: number;
|
|
483
|
+
y: number;
|
|
484
|
+
};
|
|
485
|
+
/** A connection site in document space: where an end meets the object, and the side's outward normal. */
|
|
486
|
+
interface VectorConnectionSite {
|
|
487
|
+
side: Exclude<VectorConnectorSide, 'auto'>;
|
|
488
|
+
x: number;
|
|
489
|
+
y: number;
|
|
490
|
+
/** Unit outward normal (zero for the centre). */
|
|
491
|
+
nx: number;
|
|
492
|
+
ny: number;
|
|
493
|
+
}
|
|
494
|
+
/** Whether the node is a connector path. */
|
|
495
|
+
declare function isVectorConnector(node: VectorNode | null | undefined): node is VectorPathNode & {
|
|
496
|
+
connector: VectorConnector;
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* The connection sites of node `id` in document space, in the order top, right, bottom, left,
|
|
500
|
+
* centre: the middles of its own (unrotated) bounds' sides, through its rotation and its ancestors'.
|
|
501
|
+
* Empty for a connector, a hidden node or one without extent.
|
|
502
|
+
*/
|
|
503
|
+
declare function vectorConnectionSites(nodes: readonly VectorNode[], id: string): VectorConnectionSite[];
|
|
504
|
+
/** The site of `sites` nearest `p` (document space) within `radius`, or null. */
|
|
505
|
+
declare function nearestVectorConnectionSite(sites: readonly VectorConnectionSite[], p: Vec$1, radius?: number): VectorConnectionSite | null;
|
|
506
|
+
/** A routed end: its point and the direction the line leaves it (zero when it has none). */
|
|
507
|
+
interface RoutedEnd {
|
|
508
|
+
x: number;
|
|
509
|
+
y: number;
|
|
510
|
+
nx: number;
|
|
511
|
+
ny: number;
|
|
512
|
+
glued: boolean;
|
|
513
|
+
}
|
|
514
|
+
/** The connector's path in document space, from routed ends. */
|
|
515
|
+
declare function vectorConnectorWorldAnchors(a: RoutedEnd, b: RoutedEnd, route: VectorConnectorRoute, options?: {
|
|
516
|
+
radius?: number;
|
|
517
|
+
gap?: number;
|
|
518
|
+
}): VectorAnchor[];
|
|
519
|
+
/** What routing a connector gives: its new subpaths (own space) and which ends lost their object. */
|
|
520
|
+
interface VectorConnectorRouting {
|
|
521
|
+
subpaths: VectorSubpath[];
|
|
522
|
+
/** The resolved sides of its glued ends (null when not glued). */
|
|
523
|
+
startSide: Exclude<VectorConnectorSide, 'auto'> | null;
|
|
524
|
+
endSide: Exclude<VectorConnectorSide, 'auto'> | null;
|
|
525
|
+
/** Ends glued to an object that no longer exists (or has no extent). */
|
|
526
|
+
dropped: {
|
|
527
|
+
start: boolean;
|
|
528
|
+
end: boolean;
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
/** Routes connector `id` of `nodes` from where its ends are glued (or stored), or null when it is not a connector. */
|
|
532
|
+
declare function routeVectorConnector(nodes: readonly VectorNode[], id: string): VectorConnectorRouting | null;
|
|
533
|
+
/**
|
|
534
|
+
* The document with every connector routed again (glue to objects that no longer exist dropped);
|
|
535
|
+
* the same object when nothing moved.
|
|
536
|
+
*/
|
|
537
|
+
declare function rerouteVectorConnectors<D extends Pick<VectorDocument, 'nodes'>>(doc: D): D;
|
|
538
|
+
/** Reads connector settings from untrusted data (JSON, SVG import), or null. */
|
|
539
|
+
declare function sanitizeVectorConnector(value: unknown): VectorConnector | null;
|
|
540
|
+
/** Labels for the connector pickers. */
|
|
541
|
+
declare const VECTOR_CONNECTOR_ROUTE_LABELS: Readonly<Record<VectorConnectorRoute, string>>;
|
|
542
|
+
declare const VECTOR_CONNECTOR_SIDE_LABELS: Readonly<Record<VectorConnectorSide, string>>;
|
|
543
|
+
/** What the connector panel shows: the first selected connector, or null. */
|
|
544
|
+
interface VectorConnectorPanel {
|
|
545
|
+
id: string;
|
|
546
|
+
route: VectorConnectorRoute;
|
|
547
|
+
radius: number;
|
|
548
|
+
gap: number;
|
|
549
|
+
start: VectorConnectorEnd | null;
|
|
550
|
+
end: VectorConnectorEnd | null;
|
|
551
|
+
}
|
|
552
|
+
/** The connector panel's data for a selection. */
|
|
553
|
+
declare function getVectorConnectorPanel(state: {
|
|
554
|
+
document: Pick<VectorDocument, 'nodes'>;
|
|
555
|
+
selection: readonly string[];
|
|
556
|
+
}): VectorConnectorPanel | null;
|
|
557
|
+
/**
|
|
558
|
+
* What a connector end dragged to `p` (document space) glues to: the nearest connection site
|
|
559
|
+
* within `radius` of a top-level object (that side), else the object under `p` (`auto`), else
|
|
560
|
+
* null (a free end). Connectors, hidden and locked objects and `exclude` are skipped.
|
|
561
|
+
*/
|
|
562
|
+
declare function vectorConnectorTargetAt(nodes: readonly VectorNode[], p: Vec$1, radius: number, exclude?: string): (VectorConnectorEnd & {
|
|
563
|
+
site: VectorConnectionSite | null;
|
|
564
|
+
}) | null;
|
|
565
|
+
|
|
566
|
+
declare class VectorExprError extends Error {
|
|
567
|
+
}
|
|
568
|
+
/** A valid name: a letter or `_`, then letters, digits or `_` (not `pi`), at most 64 characters. */
|
|
569
|
+
declare function isValidVectorParameterName(s: string): boolean;
|
|
570
|
+
/** Checks an expression's syntax (throws a `VectorExprError` saying what is wrong). */
|
|
571
|
+
declare function checkVectorExpression(text: string): void;
|
|
572
|
+
/** Names an expression refers to. */
|
|
573
|
+
declare function vectorExpressionNames(text: string): string[];
|
|
574
|
+
/** Named expressions (parameters and dimensional constraint names), evaluated lazily with cycle detection. */
|
|
575
|
+
declare class VectorExprEnv {
|
|
576
|
+
private readonly exprs;
|
|
577
|
+
private readonly cache;
|
|
578
|
+
set(name: string, expr: string): void;
|
|
579
|
+
has(name: string): boolean;
|
|
580
|
+
/** The value of a name. */
|
|
581
|
+
value(name: string, stack?: string[]): number;
|
|
582
|
+
/** Evaluates a free expression against these names. */
|
|
583
|
+
eval(text: string): number;
|
|
584
|
+
}
|
|
585
|
+
/** Evaluates an expression with no names. */
|
|
586
|
+
declare function evalVectorExpression(text: string): number;
|
|
587
|
+
/** A value as an expression: up to 6 decimals, trailing zeros trimmed. */
|
|
588
|
+
declare function formatVectorValue(v: number): string;
|
|
589
|
+
|
|
590
|
+
/** Most constraints one document may hold. */
|
|
591
|
+
declare const VECTOR_MAX_CONSTRAINTS = 2000;
|
|
592
|
+
declare const VECTOR_DIMENSIONAL_KINDS: ReadonlySet<VectorConstraintKind>;
|
|
593
|
+
declare class VectorConstraintError extends Error {
|
|
594
|
+
/** Constraints involved (conflicting or duplicated), when known. */
|
|
595
|
+
readonly ids: string[];
|
|
596
|
+
constructor(message: string,
|
|
597
|
+
/** Constraints involved (conflicting or duplicated), when known. */
|
|
598
|
+
ids?: string[]);
|
|
599
|
+
}
|
|
600
|
+
/** Subpath and index of the anchor with `id` in a path, or null. */
|
|
601
|
+
declare function findVectorAnchorById(node: VectorPathNode, id: string): {
|
|
602
|
+
subpath: number;
|
|
603
|
+
index: number;
|
|
604
|
+
} | null;
|
|
605
|
+
/** The round closed path's centre and radius (document space), or null when it is not round. */
|
|
606
|
+
declare function vectorPathCircle(node: VectorPathNode, world?: AffineMatrix): {
|
|
607
|
+
c: Vec2$1;
|
|
608
|
+
r: number;
|
|
609
|
+
} | null;
|
|
610
|
+
/** The expression environment: the document's parameters and named dimensional constraints. */
|
|
611
|
+
declare function vectorConstraintEnv(doc: VectorDocument): VectorExprEnv;
|
|
612
|
+
/** The value of a dimensional constraint (degrees for angles). */
|
|
613
|
+
declare function vectorConstraintValue(env: VectorExprEnv, c: VectorConstraint): number;
|
|
614
|
+
/** What a solve did. */
|
|
615
|
+
interface VectorSolveResult {
|
|
616
|
+
/** The document with the solved geometry (the same object when nothing moved). */
|
|
617
|
+
document: VectorDocument;
|
|
618
|
+
/** Every component converged (every constraint holds). */
|
|
619
|
+
converged: boolean;
|
|
620
|
+
/** Constraints in conflict where a component did not converge. */
|
|
621
|
+
conflicts: string[];
|
|
622
|
+
/** Constraints that could not be interpreted (and were ignored), with the reason. */
|
|
623
|
+
skipped: {
|
|
624
|
+
id: string;
|
|
625
|
+
message: string;
|
|
626
|
+
}[];
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Solves the document's constraints and writes the geometry back. `previous` (the last solved
|
|
630
|
+
* document) marks what was just edited, which moves least. A component that cannot be solved is
|
|
631
|
+
* left with its best compromise and reported in `conflicts`.
|
|
632
|
+
*/
|
|
633
|
+
declare function solveVectorConstraints(doc: VectorDocument, previous?: VectorDocument | null): VectorSolveResult;
|
|
634
|
+
/** The largest residual of each constraint at the current geometry (null when it cannot be interpreted). */
|
|
635
|
+
declare function vectorConstraintResiduals(doc: VectorDocument): Map<string, number | null>;
|
|
636
|
+
/** The current value of a dimensional constraint's references (degrees for angles). */
|
|
637
|
+
declare function measureVectorConstraint(doc: VectorDocument, c: Pick<VectorConstraint, 'kind' | 'refs' | 'axis'>): number;
|
|
638
|
+
/** Checks a constraint's references against the document (throws with what is needed). */
|
|
639
|
+
declare function validateVectorConstraint(doc: VectorDocument, c: VectorConstraint): void;
|
|
640
|
+
/** Next free name for a dimensional constraint (`d1`, `ang2`, `rad1`, `dia1`). */
|
|
641
|
+
declare function nextVectorConstraintName(doc: VectorDocument, kind: VectorConstraintKind): string;
|
|
642
|
+
/**
|
|
643
|
+
* Adds a constraint to the document: names and measures a dimensional one without a value,
|
|
644
|
+
* refuses one that conflicts with the others or duplicates them (over-constrains), solves and
|
|
645
|
+
* returns the new document. Throws a `VectorConstraintError` naming the constraints involved.
|
|
646
|
+
*/
|
|
647
|
+
declare function addVectorConstraint(doc: VectorDocument, input: VectorConstraint): VectorDocument;
|
|
648
|
+
/** Constraint state of the drawing or a part of it. */
|
|
649
|
+
type VectorDofStatus = 'unconstrained' | 'under' | 'fully' | 'over' | 'unknown';
|
|
650
|
+
interface VectorDofReport {
|
|
651
|
+
/** Remaining degrees of freedom (null when too large to analyse). */
|
|
652
|
+
dof: number | null;
|
|
653
|
+
status: VectorDofStatus;
|
|
654
|
+
/** Equations that only repeat others. */
|
|
655
|
+
redundant: number;
|
|
656
|
+
constraints: number;
|
|
657
|
+
/** Per constrained path: its parameters and remaining freedom. */
|
|
658
|
+
nodes: {
|
|
659
|
+
nodeId: string;
|
|
660
|
+
params: number;
|
|
661
|
+
dof: number | null;
|
|
662
|
+
status: VectorDofStatus;
|
|
663
|
+
}[];
|
|
664
|
+
message: string;
|
|
665
|
+
}
|
|
666
|
+
/** Degrees of freedom the constraints leave (QR rank of the Jacobian per component; per path by null space). */
|
|
667
|
+
declare function vectorConstraintDof(doc: VectorDocument): VectorDofReport;
|
|
668
|
+
/** Constraints whose references are gone (deleted paths or anchors) or no longer fit, removed. */
|
|
669
|
+
declare function purgeVectorConstraints(doc: VectorDocument): {
|
|
670
|
+
document: VectorDocument;
|
|
671
|
+
removed: string[];
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
interface VectorInferOptions {
|
|
675
|
+
/** Document units (default 0.5). */
|
|
676
|
+
distanceTolerance?: number;
|
|
677
|
+
/** Degrees (default 1). */
|
|
678
|
+
angleTolerance?: number;
|
|
679
|
+
/** Kinds to infer (default all of them). */
|
|
680
|
+
kinds?: readonly VectorConstraintKind[];
|
|
681
|
+
}
|
|
682
|
+
/** The path with every anchor given a stable id (`a1`, `a2`, …; existing ids kept). */
|
|
683
|
+
declare function withVectorAnchorIds(node: VectorPathNode): VectorPathNode;
|
|
684
|
+
/** The document with every anchor of the paths `ids` (all paths when absent) given an id. */
|
|
685
|
+
declare function withVectorDocumentAnchorIds(doc: VectorDocument, ids?: ReadonlySet<string>): VectorDocument;
|
|
686
|
+
/**
|
|
687
|
+
* Candidate constraints the paths `ids` (default all) nearly satisfy, most important first. Their
|
|
688
|
+
* anchors need ids (`withVectorDocumentAnchorIds`); candidates have ids `auto-<n>`.
|
|
689
|
+
*/
|
|
690
|
+
declare function inferVectorConstraints(doc: VectorDocument, ids?: readonly string[] | null, options?: VectorInferOptions): VectorConstraint[];
|
|
691
|
+
/**
|
|
692
|
+
* Auto-constrain: anchors of the paths given ids, the inferred constraints added one by one with
|
|
693
|
+
* `newId` ids (each solved; refused ones, redundant or conflicting, skipped). Returns the document
|
|
694
|
+
* and the constraints added.
|
|
695
|
+
*/
|
|
696
|
+
declare function autoConstrainVector(doc: VectorDocument, ids: readonly string[] | null, newId: () => string, options?: VectorInferOptions): {
|
|
697
|
+
document: VectorDocument;
|
|
698
|
+
added: VectorConstraint[];
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Text nodes: layout through the shared text engine (`src/text`, also used by the image editor's
|
|
703
|
+
* type layers), glyph placement for point, area and path text, glyph outlines, and the pure edits
|
|
704
|
+
* the controller and agent commands build on.
|
|
705
|
+
*
|
|
706
|
+
* Fonts come from one text shaper per page (`setVectorTextShaper`; the controller's `textShaper`
|
|
707
|
+
* option sets it). In browsers the default is the Canvas 2D shaper (the browser's own fonts, no
|
|
708
|
+
* outlines: text draws as SVG `<text>`), elsewhere a metric shaper that estimates advances. With an
|
|
709
|
+
* outline shaper (`createOutlineTextShaper` over fonts read by `parseOpenTypeFont`), text draws as
|
|
710
|
+
* its glyph outlines, so path effects, envelopes and Create Outlines work on it.
|
|
711
|
+
*/
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Sets the text shaper every vector editor on the page lays text out with (`null`: back to the
|
|
715
|
+
* default). Text nodes already laid out with another shaper lay out again when next drawn.
|
|
716
|
+
*/
|
|
717
|
+
declare function setVectorTextShaper(shaper: TextShaper | null): void;
|
|
718
|
+
/** The text shaper in use: the one set, else the browser's (Canvas 2D), else the metric shaper. */
|
|
719
|
+
declare function getVectorTextShaper(): TextShaper;
|
|
720
|
+
/** Bumped whenever the shaper changes (part of every layout cache key). */
|
|
721
|
+
declare function vectorTextShaperGeneration(): number;
|
|
722
|
+
/** Whether the shaper gives glyph outlines (text then draws as paths, and Create Outlines works). */
|
|
723
|
+
declare function vectorTextHasOutlines(): boolean;
|
|
724
|
+
/** Families the shaper can draw, when it can tell (always includes the generic families). */
|
|
725
|
+
declare function vectorTextFamilies(): string[];
|
|
726
|
+
declare const DEFAULT_VECTOR_FONT: Readonly<VectorCharacterStyle>;
|
|
727
|
+
/** Character style fields, in the order agents see them. */
|
|
728
|
+
declare const VECTOR_CHARACTER_STYLE_KEYS: readonly ["fontFamily", "fontWeight", "italic", "fontSize", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
729
|
+
/** Paragraph style fields. */
|
|
730
|
+
declare const VECTOR_PARAGRAPH_STYLE_KEYS: readonly ["align", "autoLeading", "firstLineIndent", "startIndent", "endIndent", "spaceBefore", "spaceAfter"];
|
|
731
|
+
declare class VectorTextError extends Error {
|
|
732
|
+
}
|
|
733
|
+
/** A resolved run: the node's style with the run's fields over it. */
|
|
734
|
+
interface VectorResolvedRun {
|
|
735
|
+
start: number;
|
|
736
|
+
end: number;
|
|
737
|
+
style: VectorCharacterStyle;
|
|
738
|
+
/** The run's own fill, when it has one. */
|
|
739
|
+
fill?: VectorPaint;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Runs fitted to a text of `length`: cut at its end, and text past the last run in the node's own
|
|
743
|
+
* style (an empty override). Neighbours with equal styles merge.
|
|
744
|
+
*/
|
|
745
|
+
declare function fitVectorTextRuns(runs: readonly VectorTextRun[], length: number): VectorTextRun[];
|
|
746
|
+
/** The node's runs fitted to its text, each with the full style it draws in. */
|
|
747
|
+
declare function vectorTextRuns(node: Pick<VectorTextNode, 'text' | 'font' | 'runs'>): VectorResolvedRun[];
|
|
748
|
+
/** The style at code unit `index` (the run holding it; past the end, the last run). */
|
|
749
|
+
declare function vectorTextStyleAt(node: Pick<VectorTextNode, 'text' | 'font' | 'runs'>, index: number): VectorResolvedRun;
|
|
750
|
+
/** A subpath flattened and measured by arc length. */
|
|
751
|
+
interface VectorPathMeasure {
|
|
752
|
+
points: Vec2$1[];
|
|
753
|
+
/** Cumulative length at each point. */
|
|
754
|
+
lengths: number[];
|
|
755
|
+
closed: boolean;
|
|
756
|
+
length: number;
|
|
757
|
+
}
|
|
758
|
+
/** Measures a path's first subpath by arc length (reversed when `reverse`). */
|
|
759
|
+
declare function measureVectorPath(path: BezierPath, reverse?: boolean): VectorPathMeasure;
|
|
760
|
+
/**
|
|
761
|
+
* Point and unit tangent at arc length `s`. Closed paths wrap; open paths continue straight along
|
|
762
|
+
* their end tangents past either end.
|
|
763
|
+
*/
|
|
764
|
+
declare function vectorPathAt(m: VectorPathMeasure, s: number): {
|
|
765
|
+
point: Vec2$1;
|
|
766
|
+
tangent: Vec2$1;
|
|
767
|
+
};
|
|
768
|
+
/**
|
|
769
|
+
* Arc-length positions for character pivots along a path: `xs` are the pivots along the line,
|
|
770
|
+
* `[x0, x1]` the line's extent. `left` / `center` / `right` keep the spacing; `justify` spreads the
|
|
771
|
+
* pivots over the path between the margins.
|
|
772
|
+
*/
|
|
773
|
+
declare function vectorPathTextPositions(xs: readonly number[], line: [number, number], align: 'left' | 'center' | 'right' | 'justify', length: number, start: number, end: number): number[];
|
|
774
|
+
/** One placed character, in the node's own space. */
|
|
775
|
+
interface VectorTextGlyph {
|
|
776
|
+
/** Index of its first code unit in the text. */
|
|
777
|
+
index: number;
|
|
778
|
+
/** The character (two code units for a surrogate pair). */
|
|
779
|
+
char: string;
|
|
780
|
+
/** Its origin: the start of the character on the baseline. */
|
|
781
|
+
x: number;
|
|
782
|
+
y: number;
|
|
783
|
+
/** Turn in degrees, clockwise on screen (0 for point and area text). */
|
|
784
|
+
angle: number;
|
|
785
|
+
advance: number;
|
|
786
|
+
/** The line's ascent and descent around the baseline. */
|
|
787
|
+
ascent: number;
|
|
788
|
+
descent: number;
|
|
789
|
+
/** Index into `fragments`. */
|
|
790
|
+
fragment: number;
|
|
791
|
+
}
|
|
792
|
+
/** A run of glyphs in one style on one line. */
|
|
793
|
+
interface VectorTextFragment {
|
|
794
|
+
style: VectorCharacterStyle;
|
|
795
|
+
/** The font as the shaper resolved it (its family may be a fallback). */
|
|
796
|
+
font: TextFont;
|
|
797
|
+
fill?: VectorPaint;
|
|
798
|
+
/** Glyphs of this fragment: `glyphs.slice(from, to)`. */
|
|
799
|
+
from: number;
|
|
800
|
+
to: number;
|
|
801
|
+
line: number;
|
|
802
|
+
/** The shared engine's fragment and line (point and area text). */
|
|
803
|
+
laid?: {
|
|
804
|
+
fragment: LaidFragment;
|
|
805
|
+
line: LaidLine;
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
/** A laid-out text node. */
|
|
809
|
+
interface VectorTextLayout {
|
|
810
|
+
/** The shaper it was laid out with. */
|
|
811
|
+
shaper: string;
|
|
812
|
+
glyphs: VectorTextGlyph[];
|
|
813
|
+
fragments: VectorTextFragment[];
|
|
814
|
+
/** Lines: their text range and baseline (node space for point and area text). */
|
|
815
|
+
lines: {
|
|
816
|
+
start: number;
|
|
817
|
+
end: number;
|
|
818
|
+
baseline: number;
|
|
819
|
+
x: number;
|
|
820
|
+
width: number;
|
|
821
|
+
}[];
|
|
822
|
+
/** Where text space (the shared layout's) starts in the node: the frame's origin. */
|
|
823
|
+
origin: Vec2$1;
|
|
824
|
+
/** The shared layout in text space (one line for path text). */
|
|
825
|
+
text: TextLayout;
|
|
826
|
+
/** Bounds of the glyph boxes (or the frame box of area text), node space; null when empty. */
|
|
827
|
+
bounds: VectorBounds | null;
|
|
828
|
+
/** Text that does not fit (lines below an area's box, characters past a path's end). */
|
|
829
|
+
overflow: boolean;
|
|
830
|
+
/** Families drawn with a fallback. */
|
|
831
|
+
missingFonts: string[];
|
|
832
|
+
}
|
|
833
|
+
/** Lays out a text node with the current shaper (memoised per node object and shaper). */
|
|
834
|
+
declare function layoutVectorText(node: VectorTextNode): VectorTextLayout;
|
|
835
|
+
/** The four corners of a glyph's box (origin, advance, ascent to descent), turned by its angle. */
|
|
836
|
+
declare function glyphBox(g: VectorTextGlyph): Vec2$1[];
|
|
837
|
+
/** The text as paths in the node's own space, one per fill (bottom to top in text order). */
|
|
838
|
+
interface VectorTextPaths {
|
|
839
|
+
/** `fill`: a run's own fill, or undefined for the node's paint. */
|
|
840
|
+
parts: Array<{
|
|
841
|
+
fill?: VectorPaint;
|
|
842
|
+
path: BezierPath;
|
|
843
|
+
}>;
|
|
844
|
+
/** Whether these are glyph outlines (false: glyph boxes, for geometry without an outline shaper). */
|
|
845
|
+
outlines: boolean;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* What a text node draws as geometry: its glyph outlines (plus underline and strike-through bars)
|
|
849
|
+
* with an outline shaper, else a box per glyph (ascent to descent), which bounds, hit-testing and
|
|
850
|
+
* snapping use. Memoised per node object and shaper.
|
|
851
|
+
*/
|
|
852
|
+
declare function vectorTextPaths(node: VectorTextNode): VectorTextPaths;
|
|
853
|
+
/**
|
|
854
|
+
* The style a text node paints with as a path node (for the drawing machinery): its paint stacks,
|
|
855
|
+
* stroke settings and fill rule, with `fill` replacing the top fill's paint when given.
|
|
856
|
+
*/
|
|
857
|
+
declare function vectorTextPaintSource(node: VectorTextNode, fill?: VectorPaint, subpaths?: VectorSubpath[]): VectorPathNode;
|
|
858
|
+
/** A caret as a segment from the top of its line to the bottom, node space. */
|
|
859
|
+
interface VectorTextCaret {
|
|
860
|
+
top: Vec2$1;
|
|
861
|
+
bottom: Vec2$1;
|
|
862
|
+
/** The line it is on. */
|
|
863
|
+
line: number;
|
|
864
|
+
}
|
|
865
|
+
/** The caret before code unit `index` (after the last character at the end). */
|
|
866
|
+
declare function vectorTextCaret(node: VectorTextNode, index: number): VectorTextCaret;
|
|
867
|
+
/** The text index nearest a node-space point (for clicks). */
|
|
868
|
+
declare function vectorTextIndexAt(node: VectorTextNode, p: Vec2$1): number;
|
|
869
|
+
/** Quads (node space) covering the glyphs of [start, end), one per line for point and area text. */
|
|
870
|
+
declare function vectorTextSelectionQuads(node: VectorTextNode, start: number, end: number): Vec2$1[][];
|
|
871
|
+
/**
|
|
872
|
+
* A character style patch validated (`null` clears an optional field). With `full`, the result
|
|
873
|
+
* must be a complete style (the node's own).
|
|
874
|
+
*/
|
|
875
|
+
declare function patchVectorCharacterStyle<T extends Partial<VectorCharacterStyle>>(base: T, patch: Record<string, unknown>, path?: string): T;
|
|
876
|
+
/** A paragraph style patch validated (`null` clears a field). */
|
|
877
|
+
declare function patchVectorParagraphStyle(base: VectorParagraphStyle, patch: Record<string, unknown>, path?: string): VectorParagraphStyle;
|
|
878
|
+
/** A frame from loose input, validated. */
|
|
879
|
+
declare function sanitizeVectorTextFrame(value: unknown, path?: string): VectorTextFrame;
|
|
880
|
+
/** Normalised runs: fitted to the text, empty overrides dropped, `null` when there is one plain style. */
|
|
881
|
+
declare function normalizeVectorTextRuns(text: string, runs: readonly VectorTextRun[] | null | undefined): VectorTextRun[] | null;
|
|
882
|
+
/** A text node read from untrusted data (JSON, SVG data attributes, agents): fields validated and normalised. */
|
|
883
|
+
declare function sanitizeVectorTextFields(value: Record<string, unknown>): Pick<VectorTextNode, 'text' | 'font' | 'runs' | 'paragraph' | 'frame'>;
|
|
884
|
+
/** A range of the text from loose input: [start, end) in UTF-16 code units (default the whole text). */
|
|
885
|
+
declare function vectorTextRange(text: string, start: unknown, end: unknown): [number, number];
|
|
886
|
+
/** The node with [start, end) of its text replaced by `insert` (styled like the character before it). */
|
|
887
|
+
declare function replaceVectorText(node: VectorTextNode, start: number, end: number, insert: string): VectorTextNode;
|
|
888
|
+
/**
|
|
889
|
+
* The node with a character style patch (and `fill`) applied over [start, end). The whole text
|
|
890
|
+
* changes the node's own style (and its `fill`) and drops those fields from its runs.
|
|
891
|
+
*/
|
|
892
|
+
declare function styleVectorText(node: VectorTextNode, start: number, end: number, patch: Record<string, unknown>): VectorTextNode;
|
|
893
|
+
/**
|
|
894
|
+
* The node with scale and skew of `m` baked in (its rigid part goes to `transform` elsewhere): the
|
|
895
|
+
* frame's points map through `m`, font sizes scale by √|det| (text keeps its proportions), and an
|
|
896
|
+
* area's box takes each axis' own scale.
|
|
897
|
+
*/
|
|
898
|
+
declare function bakeVectorTextGeometry(node: VectorTextNode, m: AffineMatrix): VectorTextNode;
|
|
899
|
+
/** The text of a node as a short name ("Hello world…"). */
|
|
900
|
+
declare function vectorTextName(text: string): string;
|
|
901
|
+
/** Parses loose path data for a path text frame (the first subpath). */
|
|
902
|
+
declare function pathTextFrameFromBezier(path: BezierPath): VectorSubpath | null;
|
|
903
|
+
/**
|
|
904
|
+
* The outline the editor shows for a text node (hover, selection), node space: an area's box, a
|
|
905
|
+
* path text's path, or a box round each line of point text.
|
|
906
|
+
*/
|
|
907
|
+
declare function vectorTextBoxOutline(node: VectorTextNode): BezierPath;
|
|
908
|
+
/** One `<tspan>` of text drawn as SVG text: a fragment's characters, each placed on its own. */
|
|
909
|
+
interface VectorTextSpan {
|
|
910
|
+
text: string;
|
|
911
|
+
/** Per-character origins (node space) and turns (degrees; absent when all are 0). */
|
|
912
|
+
x: number[];
|
|
913
|
+
y: number[];
|
|
914
|
+
rotate?: number[];
|
|
915
|
+
style: VectorCharacterStyle;
|
|
916
|
+
/** The family to draw with (the resolved one, a fallback when the family is missing). */
|
|
917
|
+
family: string;
|
|
918
|
+
/** The run's own fill, if it has one. */
|
|
919
|
+
fill?: VectorPaint;
|
|
920
|
+
}
|
|
921
|
+
/** The text as SVG text spans: one per fragment, every character placed by the layout. */
|
|
922
|
+
declare function vectorTextSpans(node: VectorTextNode): VectorTextSpan[];
|
|
923
|
+
/**
|
|
924
|
+
* The text as one path node in its style: its geometry (glyph outlines, or glyph boxes) and paint
|
|
925
|
+
* stacks. Paint servers and stroke layers of SVG text are computed on it.
|
|
926
|
+
*/
|
|
927
|
+
declare function vectorTextGeometryNode(node: VectorTextNode): VectorPathNode;
|
|
928
|
+
/** One `<tspan>` as render data: per-character positions (space-separated lists) and its font. */
|
|
929
|
+
interface VectorRenderTextSpan {
|
|
930
|
+
text: string;
|
|
931
|
+
x: string;
|
|
932
|
+
y: string;
|
|
933
|
+
/** Per-character turns in degrees (text on a path). */
|
|
934
|
+
rotate?: string;
|
|
935
|
+
/** A CSS `font-family` value. */
|
|
936
|
+
fontFamily: string;
|
|
937
|
+
fontSize: number;
|
|
938
|
+
fontWeight: number;
|
|
939
|
+
fontStyle?: 'italic';
|
|
940
|
+
/** `underline`, `line-through` or both. */
|
|
941
|
+
textDecoration?: string;
|
|
942
|
+
/** The run's own fill (a colour or `url(#id)`), for layers with `runFills`. */
|
|
943
|
+
fill?: string;
|
|
944
|
+
}
|
|
945
|
+
/** A span as render data (positions as SVG number lists), with the run's fill as drawn. */
|
|
946
|
+
declare function vectorTextSpanSvg(sp: VectorTextSpan, fill?: string): VectorRenderTextSpan;
|
|
947
|
+
|
|
464
948
|
/** A map of the plane (document or node space). */
|
|
465
949
|
type VectorPointMap = (p: Vec2$1) => Vec2$1;
|
|
466
950
|
/** Every anchor and handle of `subpaths` through `f` (no subdivision). */
|
|
@@ -537,7 +1021,7 @@ interface VectorGuideLine {
|
|
|
537
1021
|
y2: number;
|
|
538
1022
|
}
|
|
539
1023
|
/** What a point or box snapped to. */
|
|
540
|
-
type VectorSnapKind = 'anchor' | 'centre' | 'intersect' | 'perpendicular' | 'tangent' | 'path' | 'construction' | 'align' | 'spacing' | 'size';
|
|
1024
|
+
type VectorSnapKind = 'anchor' | 'centre' | 'intersect' | 'perpendicular' | 'tangent' | 'path' | 'construction' | 'align' | 'spacing' | 'size' | 'tracking';
|
|
541
1025
|
/** A guide label in document units: the snap kind's name, or a distance for gaps and sizes. */
|
|
542
1026
|
interface VectorGuideLabel {
|
|
543
1027
|
kind: VectorSnapKind;
|
|
@@ -585,6 +1069,37 @@ interface VectorSnapLeave {
|
|
|
585
1069
|
/** Snap to the perpendicular foot and tangent points from `at` on paths (default true). */
|
|
586
1070
|
curves?: boolean;
|
|
587
1071
|
}
|
|
1072
|
+
/**
|
|
1073
|
+
* A tracking path (CAD object snap tracking): a ray from `origin` along the unit `dir`. Acquired
|
|
1074
|
+
* points send `alignment` paths, an acquired end of an open path its `extension`, and the point a
|
|
1075
|
+
* drawn point leaves from its `polar` angles. Points snap where two paths cross, where a path
|
|
1076
|
+
* crosses a path of the drawing, or onto the nearest path.
|
|
1077
|
+
*/
|
|
1078
|
+
interface VectorTrackingPath {
|
|
1079
|
+
origin: Vec2$1;
|
|
1080
|
+
dir: Vec2$1;
|
|
1081
|
+
kind: 'alignment' | 'extension' | 'polar';
|
|
1082
|
+
}
|
|
1083
|
+
/** A point acquired for tracking, and the direction of its path's extension when it ends an open path. */
|
|
1084
|
+
interface VectorTrackingPoint {
|
|
1085
|
+
x: number;
|
|
1086
|
+
y: number;
|
|
1087
|
+
extension?: Vec2$1 | null;
|
|
1088
|
+
}
|
|
1089
|
+
/** The most points kept acquired (the oldest dropped first), as AutoCAD keeps. */
|
|
1090
|
+
declare const VECTOR_MAX_TRACKING_POINTS = 7;
|
|
1091
|
+
/** A unit direction for `deg` degrees counter-clockwise on the y-down page (exact on the axes). */
|
|
1092
|
+
declare function vectorAngleDirection(deg: number): Vec2$1;
|
|
1093
|
+
/**
|
|
1094
|
+
* Polar angles (degrees, counter-clockwise on the page, in [0, 360)): every multiple of
|
|
1095
|
+
* `increment` round the circle plus the `additional` angles, without repeats, at most 360. After
|
|
1096
|
+
* cadcraft's `polar_angles` (POLARANG / POLARADDANG).
|
|
1097
|
+
*/
|
|
1098
|
+
declare function vectorPolarAngles(increment: number, additional?: readonly number[]): number[];
|
|
1099
|
+
/** The increment (degrees) that `angles` are the multiples of, as lines (so 0, 45, 90, 135 is 45), or null when they are not one increment's multiples. */
|
|
1100
|
+
declare function vectorPolarIncrementOf(angles: readonly number[]): number | null;
|
|
1101
|
+
/** The paths acquired points send: a ray along each of `angles` (degrees) from each, plus its extension. After cadcraft's `Tracker::paths`. */
|
|
1102
|
+
declare function vectorTrackingPaths(points: readonly VectorTrackingPoint[], angles?: readonly number[]): VectorTrackingPath[];
|
|
588
1103
|
/** The construction guide angles new editors start with. */
|
|
589
1104
|
declare const VECTOR_CONSTRUCTION_ANGLES: readonly number[];
|
|
590
1105
|
/** Where `constrain` puts `p` (unchanged without one). */
|
|
@@ -604,6 +1119,7 @@ declare class VectorSnapTargets {
|
|
|
604
1119
|
private readonly boxes;
|
|
605
1120
|
/** Side lengths of the other objects (in their own frames), which a resize may match. */
|
|
606
1121
|
private readonly sizes;
|
|
1122
|
+
private segmentTree;
|
|
607
1123
|
private constructor();
|
|
608
1124
|
/** How many targets of each sort were gathered. */
|
|
609
1125
|
get counts(): {
|
|
@@ -658,7 +1174,7 @@ declare class VectorSnapTargets {
|
|
|
658
1174
|
* through `leave.at` (where a target's line crosses it if one does nearby), or else lines up
|
|
659
1175
|
* with targets on x and y.
|
|
660
1176
|
*/
|
|
661
|
-
snapFrom(p: Vec2$1, leave: VectorSnapLeave | null | undefined, tol: number): VectorPointSnap;
|
|
1177
|
+
snapFrom(p: Vec2$1, leave: VectorSnapLeave | null | undefined, tol: number, tracking?: readonly VectorTrackingPath[]): VectorPointSnap;
|
|
662
1178
|
private label;
|
|
663
1179
|
/** The anchor or centre nearest `p`, within `tol`. */
|
|
664
1180
|
private nearestPoint;
|
|
@@ -733,8 +1249,18 @@ interface VectorSnapOptions {
|
|
|
733
1249
|
guides: boolean;
|
|
734
1250
|
/** How near a target pulls, in screen pixels (default 5). */
|
|
735
1251
|
threshold: number;
|
|
736
|
-
/** Construction guide angles through the point a drawn point leaves from, in degrees (default 0, 45, 90, 135). */
|
|
1252
|
+
/** Construction guide angles through the point a drawn point leaves from, in degrees (default 0, 45, 90, 135). Polar tracking: see `vectorPolarAngles`. */
|
|
737
1253
|
angles: readonly number[];
|
|
1254
|
+
/**
|
|
1255
|
+
* Object snap tracking (default true): resting the pointer on an anchor, centre or crossing
|
|
1256
|
+
* while drawing acquires it (again releases it); acquired points send alignment paths, an open
|
|
1257
|
+
* path's end its extension, and points snap where paths cross, cross the drawing or onto them.
|
|
1258
|
+
*/
|
|
1259
|
+
tracking?: boolean;
|
|
1260
|
+
/** Acquired points send paths along every polar angle (`angles`) instead of only horizontal and vertical (default false). */
|
|
1261
|
+
trackPolar?: boolean;
|
|
1262
|
+
/** The pen measures polar angles from its last segment's direction instead of the page's x axis (default false). */
|
|
1263
|
+
polarRelative?: boolean;
|
|
738
1264
|
}
|
|
739
1265
|
/** Snap options new editors start with. Hold Cmd / Ctrl (`mod`) during a drag to bypass snapping. */
|
|
740
1266
|
declare const DEFAULT_VECTOR_SNAP: Readonly<VectorSnapOptions>;
|
|
@@ -792,6 +1318,60 @@ interface VectorEditorOptions {
|
|
|
792
1318
|
onChange?: (document: VectorDocument) => void;
|
|
793
1319
|
/** Start in Free Distort mode (see `setFreeDistort`). */
|
|
794
1320
|
freeDistort?: boolean;
|
|
1321
|
+
/**
|
|
1322
|
+
* The text shaper text nodes lay out with (see `setVectorTextShaper`; it is shared by every
|
|
1323
|
+
* editor on the page). Default: the browser's fonts, or estimated metrics outside a browser.
|
|
1324
|
+
*/
|
|
1325
|
+
textShaper?: TextShaper | null;
|
|
1326
|
+
/** Font and alignment new text gets (default 24 px sans-serif, left). */
|
|
1327
|
+
textDefaults?: Partial<VectorTextDefaults>;
|
|
1328
|
+
}
|
|
1329
|
+
/** Font and alignment of new text. */
|
|
1330
|
+
interface VectorTextDefaults extends VectorCharacterStyle {
|
|
1331
|
+
align?: VectorTextAlign;
|
|
1332
|
+
}
|
|
1333
|
+
/** Text to add (`addText`): point text at (`x`, `y`), area text with `width` and `height`, or text on `path`. */
|
|
1334
|
+
interface VectorTextInput extends VectorStyle {
|
|
1335
|
+
text: string;
|
|
1336
|
+
/** Point text: the first baseline's start; area text: the box's top left. */
|
|
1337
|
+
x?: number;
|
|
1338
|
+
y?: number;
|
|
1339
|
+
/** Area text: the box (both needed). */
|
|
1340
|
+
width?: number;
|
|
1341
|
+
height?: number;
|
|
1342
|
+
/** Text on a path: SVG path data or a subpath (document units); `x`, `y`, `width` and `height` are then ignored. */
|
|
1343
|
+
path?: string | VectorSubpath;
|
|
1344
|
+
/** Text on a path: margins from the path's start and end, side, orientation and baseline. */
|
|
1345
|
+
pathOptions?: Omit<Extract<VectorTextFrame, {
|
|
1346
|
+
kind: 'path';
|
|
1347
|
+
}>, 'kind' | 'path'>;
|
|
1348
|
+
font?: Partial<VectorCharacterStyle>;
|
|
1349
|
+
paragraph?: VectorParagraphStyle;
|
|
1350
|
+
name?: string;
|
|
1351
|
+
}
|
|
1352
|
+
/** A constraint reference from loose input: an anchor by `subpath` / `index` (or its `id` as `anchor`), its handle, its segment, or a path as a circle. */
|
|
1353
|
+
interface VectorConstraintRefInput {
|
|
1354
|
+
nodeId: string;
|
|
1355
|
+
subpath?: number;
|
|
1356
|
+
index?: number;
|
|
1357
|
+
anchor?: string;
|
|
1358
|
+
handle?: 'in' | 'out';
|
|
1359
|
+
segment?: boolean;
|
|
1360
|
+
circle?: boolean;
|
|
1361
|
+
}
|
|
1362
|
+
/** A constraint to add (`addConstraint`). */
|
|
1363
|
+
interface VectorConstraintInput {
|
|
1364
|
+
kind: VectorConstraintKind;
|
|
1365
|
+
refs: VectorConstraintRefInput[];
|
|
1366
|
+
value?: string | number;
|
|
1367
|
+
name?: string;
|
|
1368
|
+
axis?: 'aligned' | 'horizontal' | 'vertical';
|
|
1369
|
+
}
|
|
1370
|
+
/** The text being edited on the canvas: the node and the selection in UTF-16 code units (`anchor` where it started, `focus` the caret). */
|
|
1371
|
+
interface VectorTextEditState {
|
|
1372
|
+
nodeId: string;
|
|
1373
|
+
anchor: number;
|
|
1374
|
+
focus: number;
|
|
795
1375
|
}
|
|
796
1376
|
/** A pointer event as the controller needs it. Positions are in screen pixels relative to the canvas. */
|
|
797
1377
|
interface VectorPointerInput extends VectorModifiers {
|
|
@@ -941,6 +1521,16 @@ type VectorInteraction = {
|
|
|
941
1521
|
type: 'envelope';
|
|
942
1522
|
nodeId: string;
|
|
943
1523
|
index: number | null;
|
|
1524
|
+
}
|
|
1525
|
+
/** The Type tool dragging out an area text box (document space). */
|
|
1526
|
+
| {
|
|
1527
|
+
type: 'textBox';
|
|
1528
|
+
bounds: VectorBounds;
|
|
1529
|
+
}
|
|
1530
|
+
/** Selecting text by dragging over it. */
|
|
1531
|
+
| {
|
|
1532
|
+
type: 'textSelect';
|
|
1533
|
+
nodeId: string;
|
|
944
1534
|
} | {
|
|
945
1535
|
type: 'pan';
|
|
946
1536
|
};
|
|
@@ -999,6 +1589,34 @@ interface VectorEditorState {
|
|
|
999
1589
|
* a side skews along it (Alt: about the centre).
|
|
1000
1590
|
*/
|
|
1001
1591
|
freeDistort: boolean;
|
|
1592
|
+
/** The text being edited on the canvas, or null. Typing goes to `textInput`, keys to `keyDown`. */
|
|
1593
|
+
textEdit: VectorTextEditState | null;
|
|
1594
|
+
/** Font and alignment new text gets. */
|
|
1595
|
+
textDefaults: VectorTextDefaults;
|
|
1596
|
+
/**
|
|
1597
|
+
* Isolation mode: `document` is then the art of symbol `symbolId`, in the symbol's own space.
|
|
1598
|
+
* `host` is the whole document with that art (draw it dimmed behind, through `hostTransform`,
|
|
1599
|
+
* which lines the instance it was entered from up with the art).
|
|
1600
|
+
*/
|
|
1601
|
+
symbolEdit: {
|
|
1602
|
+
symbolId: string;
|
|
1603
|
+
name: string;
|
|
1604
|
+
instanceId: string | null;
|
|
1605
|
+
host: VectorDocument;
|
|
1606
|
+
hostTransform: VectorMatrix | null;
|
|
1607
|
+
} | null;
|
|
1608
|
+
/** Constraints the last solve could not satisfy (`conflicts`) or interpret (`skipped`), or null when all hold. */
|
|
1609
|
+
constraintIssues: {
|
|
1610
|
+
conflicts: string[];
|
|
1611
|
+
skipped: {
|
|
1612
|
+
id: string;
|
|
1613
|
+
message: string;
|
|
1614
|
+
}[];
|
|
1615
|
+
} | null;
|
|
1616
|
+
/** Points acquired for object snap tracking (document units), oldest first. */
|
|
1617
|
+
trackingPoints: readonly VectorTrackingPoint[];
|
|
1618
|
+
/** A distance or coordinate being typed while the pen draws (Enter places the point), or null. */
|
|
1619
|
+
typedEntry: string | null;
|
|
1002
1620
|
canUndo: boolean;
|
|
1003
1621
|
canRedo: boolean;
|
|
1004
1622
|
undoLabel: string;
|
|
@@ -1020,6 +1638,48 @@ type VectorMaskResult = {
|
|
|
1020
1638
|
ok: false;
|
|
1021
1639
|
message: string;
|
|
1022
1640
|
};
|
|
1641
|
+
/** A connector as `getConnectors` lists it. */
|
|
1642
|
+
interface VectorConnectorListing {
|
|
1643
|
+
id: string;
|
|
1644
|
+
name?: string;
|
|
1645
|
+
route: VectorConnectorRoute;
|
|
1646
|
+
radius?: number;
|
|
1647
|
+
/** Each end: the glued object, its side setting and the side in use, and where the end is (document units). */
|
|
1648
|
+
start: {
|
|
1649
|
+
nodeId?: string;
|
|
1650
|
+
side?: VectorConnectorSide;
|
|
1651
|
+
resolvedSide?: string | null;
|
|
1652
|
+
x?: number;
|
|
1653
|
+
y?: number;
|
|
1654
|
+
};
|
|
1655
|
+
end: {
|
|
1656
|
+
nodeId?: string;
|
|
1657
|
+
side?: VectorConnectorSide;
|
|
1658
|
+
resolvedSide?: string | null;
|
|
1659
|
+
x?: number;
|
|
1660
|
+
y?: number;
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1663
|
+
/** A frame as `getFrames` lists it. */
|
|
1664
|
+
interface VectorFrameListing {
|
|
1665
|
+
id: string;
|
|
1666
|
+
name: string;
|
|
1667
|
+
/** The group holding it (null for an artboard: a top-level frame). */
|
|
1668
|
+
parentId: string | null;
|
|
1669
|
+
artboard: boolean;
|
|
1670
|
+
/** Its rectangle in its own space, fill and clip. */
|
|
1671
|
+
frame: VectorFrame;
|
|
1672
|
+
/** Its rectangle in document space (axis-aligned). */
|
|
1673
|
+
bounds: VectorBounds | null;
|
|
1674
|
+
/** Its children, bottom to top, with their resizing constraints. */
|
|
1675
|
+
children: {
|
|
1676
|
+
id: string;
|
|
1677
|
+
type: VectorNode['type'];
|
|
1678
|
+
name?: string;
|
|
1679
|
+
horizontal: VectorHorizontalResizing;
|
|
1680
|
+
vertical: VectorVerticalResizing;
|
|
1681
|
+
}[];
|
|
1682
|
+
}
|
|
1023
1683
|
/** The shape the Blend tool blends from (its first click). */
|
|
1024
1684
|
interface VectorBlendStart {
|
|
1025
1685
|
nodeId: string;
|
|
@@ -1277,6 +1937,14 @@ declare class VectorEditorController {
|
|
|
1277
1937
|
private blendDefaults;
|
|
1278
1938
|
private gradientEdit;
|
|
1279
1939
|
private freeDistort;
|
|
1940
|
+
/** The text edit session: selection, the snapshot before a text node it created (until the first change), the merge key of its undo step. */
|
|
1941
|
+
private textEdit;
|
|
1942
|
+
private textEditCount;
|
|
1943
|
+
private symbolEdit;
|
|
1944
|
+
/** The document as last solved: what differs from it was just edited, so the solver moves it least. */
|
|
1945
|
+
private lastSolved;
|
|
1946
|
+
private constraintIssues;
|
|
1947
|
+
private textDefaults;
|
|
1280
1948
|
/** What the highlight shows, to skip notifying when the pointer stays over the same face. */
|
|
1281
1949
|
private builderHoverKey;
|
|
1282
1950
|
private readonly createId;
|
|
@@ -1306,6 +1974,11 @@ declare class VectorEditorController {
|
|
|
1306
1974
|
private computeState;
|
|
1307
1975
|
/** `doc` with its blends' steps brought up to date (the same object when they already are). */
|
|
1308
1976
|
private refreshed;
|
|
1977
|
+
/**
|
|
1978
|
+
* `doc` with its constraints solved (geometry edited since the last solve moving least) and
|
|
1979
|
+
* constraints on deleted anchors removed; the same object when nothing changes.
|
|
1980
|
+
*/
|
|
1981
|
+
private solved;
|
|
1309
1982
|
private notify;
|
|
1310
1983
|
private boundsOf;
|
|
1311
1984
|
private frameOf;
|
|
@@ -1509,8 +2182,15 @@ declare class VectorEditorController {
|
|
|
1509
2182
|
*/
|
|
1510
2183
|
setCornerRadius(radius: number, options?: {
|
|
1511
2184
|
kind?: VectorCornerKind;
|
|
2185
|
+
smoothing?: number;
|
|
2186
|
+
refs?: readonly VectorAnchorRef[];
|
|
2187
|
+
ids?: readonly string[];
|
|
2188
|
+
}): VectorActionResult;
|
|
2189
|
+
/** Sets corner smoothing (squircle, 0–1) of the same anchors as `setCornerRadius`, keeping their radii. */
|
|
2190
|
+
setCornerSmoothing(smoothing: number, options?: {
|
|
1512
2191
|
refs?: readonly VectorAnchorRef[];
|
|
1513
2192
|
ids?: readonly string[];
|
|
2193
|
+
merge?: string;
|
|
1514
2194
|
}): VectorActionResult;
|
|
1515
2195
|
/** Sets the live corner kind of the same anchors as `setCornerRadius`, keeping their radii. */
|
|
1516
2196
|
setCornerKind(kind: VectorCornerKind, options?: {
|
|
@@ -1854,6 +2534,170 @@ declare class VectorEditorController {
|
|
|
1854
2534
|
invert?: boolean;
|
|
1855
2535
|
name?: string;
|
|
1856
2536
|
}): VectorMaskResult;
|
|
2537
|
+
private trackingPoints;
|
|
2538
|
+
private lastSnap;
|
|
2539
|
+
private dwellTimer;
|
|
2540
|
+
private dwellAt;
|
|
2541
|
+
private dwellToggled;
|
|
2542
|
+
private typed;
|
|
2543
|
+
/** How long (ms) the pointer rests on a point before it is acquired or released for tracking. */
|
|
2544
|
+
static readonly TRACKING_DWELL_MS = 400;
|
|
2545
|
+
/** The pen's polar angles: measured from its last segment with `polarRelative`, else the page's (`snap.angles`). */
|
|
2546
|
+
private penAngles;
|
|
2547
|
+
/** Pointer rested on the snapped anchor, centre or crossing: starts (or keeps) the dwell that acquires it. */
|
|
2548
|
+
private dwell;
|
|
2549
|
+
/** The direction an open path's end at `p` (document space) would extend in, or null when no open path ends there. */
|
|
2550
|
+
private extensionAt;
|
|
2551
|
+
private toggleTracking;
|
|
2552
|
+
/**
|
|
2553
|
+
* Acquires the point at `x, y` (document units) for object snap tracking, or releases it when
|
|
2554
|
+
* it is acquired already, as resting the pointer on it does. An open path's end also sends its
|
|
2555
|
+
* extension. At most seven are kept, the oldest dropped. Returns the acquired points.
|
|
2556
|
+
*/
|
|
2557
|
+
acquireTrackingPoint(p: Vec2$1): readonly VectorTrackingPoint[];
|
|
2558
|
+
/** Releases every acquired tracking point. */
|
|
2559
|
+
clearTracking(notify?: boolean): void;
|
|
2560
|
+
/** A key typed while the pen draws: digits and `. , < @ -` build a typed entry, Enter places it, Backspace and Escape edit or drop it. */
|
|
2561
|
+
private typedKey;
|
|
2562
|
+
/**
|
|
2563
|
+
* Places the pen's next point from typed text, as CAD direct distance entry does: `120` is that
|
|
2564
|
+
* far from the last point toward the pointer (along the path it tracks), `120<30` that far at 30°
|
|
2565
|
+
* (counter-clockwise on the page, from the last segment with `snap.polarRelative`), `@40,-10`
|
|
2566
|
+
* an offset from the last point and `200,150` a position. One undo step. Fails without a path
|
|
2567
|
+
* being drawn with the pen.
|
|
2568
|
+
*/
|
|
2569
|
+
placePenPoint(text: string): VectorActionResult;
|
|
2570
|
+
/**
|
|
2571
|
+
* Adds an open (or closed) path drawn by dimensions, the way a CAD user types them: from
|
|
2572
|
+
* `start`, each step goes `length` at `angle` degrees (counter-clockwise on the page), by an
|
|
2573
|
+
* offset `dx, dy`, or to a position `x, y` (document units). Default style. One undo step;
|
|
2574
|
+
* selects it. Returns its id and the anchors placed.
|
|
2575
|
+
*/
|
|
2576
|
+
addPathByDimensions(input: {
|
|
2577
|
+
start: Vec2$1;
|
|
2578
|
+
steps: readonly ({
|
|
2579
|
+
length: number;
|
|
2580
|
+
angle: number;
|
|
2581
|
+
} | {
|
|
2582
|
+
dx: number;
|
|
2583
|
+
dy: number;
|
|
2584
|
+
} | {
|
|
2585
|
+
x: number;
|
|
2586
|
+
y: number;
|
|
2587
|
+
})[];
|
|
2588
|
+
closed?: boolean;
|
|
2589
|
+
name?: string;
|
|
2590
|
+
}): VectorMaskResult & {
|
|
2591
|
+
anchors?: Vec2$1[];
|
|
2592
|
+
};
|
|
2593
|
+
/** How near (document units) a connector end snaps to a connection site. */
|
|
2594
|
+
private connectorRadius;
|
|
2595
|
+
private downConnector;
|
|
2596
|
+
/** The route new connectors get (the Connector tool and `addConnector`). Default straight. */
|
|
2597
|
+
private connectorRoute;
|
|
2598
|
+
/** Sets the route the Connector tool draws with. */
|
|
2599
|
+
setConnectorRoute(route: VectorConnectorRoute): VectorActionResult;
|
|
2600
|
+
/** The route the Connector tool draws with. */
|
|
2601
|
+
getConnectorRoute(): VectorConnectorRoute;
|
|
2602
|
+
/** Checks a connector end given by an API caller: the object must exist and not be a connector. */
|
|
2603
|
+
private checkConnectorEnd;
|
|
2604
|
+
/**
|
|
2605
|
+
* Adds a connector from `start` to `end`, each glued to an object (`{ nodeId, side? }`, side
|
|
2606
|
+
* default `auto`) or a free point (`{ x, y }`, document units). It is routed now and after every
|
|
2607
|
+
* later edit, so it follows the objects. Stroked in the default stroke with an arrowhead at the
|
|
2608
|
+
* end unless given. One undo step; selects it.
|
|
2609
|
+
*/
|
|
2610
|
+
addConnector(input: {
|
|
2611
|
+
start: VectorConnectorEnd | Vec2$1;
|
|
2612
|
+
end: VectorConnectorEnd | Vec2$1;
|
|
2613
|
+
route?: VectorConnectorRoute;
|
|
2614
|
+
radius?: number;
|
|
2615
|
+
gap?: number;
|
|
2616
|
+
name?: string;
|
|
2617
|
+
stroke?: VectorPaint;
|
|
2618
|
+
strokeWidth?: number;
|
|
2619
|
+
startArrow?: VectorArrowhead | null;
|
|
2620
|
+
endArrow?: VectorArrowhead | null;
|
|
2621
|
+
}): VectorMaskResult;
|
|
2622
|
+
/**
|
|
2623
|
+
* Changes connectors (default: the selected ones): `start` / `end` glue an end to an object
|
|
2624
|
+
* (`{ nodeId, side? }`) or unglue it (`null`, the end staying where it is), and `route`,
|
|
2625
|
+
* `radius`, `gap` set how they run. Plain open paths given by id become connectors. One undo step.
|
|
2626
|
+
*/
|
|
2627
|
+
setConnector(patch: {
|
|
2628
|
+
start?: VectorConnectorEnd | null;
|
|
2629
|
+
end?: VectorConnectorEnd | null;
|
|
2630
|
+
route?: VectorConnectorRoute;
|
|
2631
|
+
radius?: number;
|
|
2632
|
+
gap?: number;
|
|
2633
|
+
}, options?: {
|
|
2634
|
+
ids?: readonly string[];
|
|
2635
|
+
}): VectorActionResult;
|
|
2636
|
+
/** Every connector: its ends (glued object and resolved side, or the free point) and route. */
|
|
2637
|
+
getConnectors(): VectorConnectorListing[];
|
|
2638
|
+
/** The connection sites of node `id` in document space (top, right, bottom, left, centre), or null when there is no such node. */
|
|
2639
|
+
getConnectionSites(id: string): VectorConnectionSite[] | null;
|
|
2640
|
+
/** A name for a new frame: "Frame <n>" after the frames there are. */
|
|
2641
|
+
private frameName;
|
|
2642
|
+
/**
|
|
2643
|
+
* Adds an empty frame (an artboard when top-level) with its rectangle at `x, y, width, height`
|
|
2644
|
+
* (document units), filled white by default and clipping its contents. With `adopt`, the
|
|
2645
|
+
* top-level objects it fully encloses move into it. One undo step; selects it.
|
|
2646
|
+
*/
|
|
2647
|
+
addFrame(input: {
|
|
2648
|
+
x: number;
|
|
2649
|
+
y: number;
|
|
2650
|
+
width: number;
|
|
2651
|
+
height: number;
|
|
2652
|
+
name?: string;
|
|
2653
|
+
fill?: VectorPaint;
|
|
2654
|
+
clip?: boolean;
|
|
2655
|
+
adopt?: boolean;
|
|
2656
|
+
}): VectorMaskResult;
|
|
2657
|
+
/**
|
|
2658
|
+
* Frame Selection: puts the selected (or given) objects, which must share a parent, into a new
|
|
2659
|
+
* frame fitted to their bounds plus `padding` (document units, default 0), in their place in the
|
|
2660
|
+
* stacking order. No fill unless `fill` is given; clips unless `clip: false`. One undo step;
|
|
2661
|
+
* selects the frame.
|
|
2662
|
+
*/
|
|
2663
|
+
frameSelection(options?: {
|
|
2664
|
+
ids?: readonly string[];
|
|
2665
|
+
padding?: number;
|
|
2666
|
+
name?: string;
|
|
2667
|
+
fill?: VectorPaint;
|
|
2668
|
+
clip?: boolean;
|
|
2669
|
+
}): VectorMaskResult;
|
|
2670
|
+
/** Frames among `ids` (default: the selection), or holding one of them directly. */
|
|
2671
|
+
private frameTargets;
|
|
2672
|
+
/**
|
|
2673
|
+
* Changes frames (default: the selected ones, or the frame holding the selection): `x`, `y`,
|
|
2674
|
+
* `width`, `height` move and resize the rectangle (in the frame's own space), and its children
|
|
2675
|
+
* follow their resizing constraints; `fill` (null for none) and `clip` set how it draws.
|
|
2676
|
+
* One undo step (merged while `merge` is the same key).
|
|
2677
|
+
*/
|
|
2678
|
+
setFrame(patch: {
|
|
2679
|
+
x?: number;
|
|
2680
|
+
y?: number;
|
|
2681
|
+
width?: number;
|
|
2682
|
+
height?: number;
|
|
2683
|
+
fill?: VectorPaint;
|
|
2684
|
+
clip?: boolean;
|
|
2685
|
+
}, options?: {
|
|
2686
|
+
ids?: readonly string[];
|
|
2687
|
+
merge?: string;
|
|
2688
|
+
}): VectorActionResult;
|
|
2689
|
+
/**
|
|
2690
|
+
* Sets the resizing constraints of the selected (or given) objects, which must be children of
|
|
2691
|
+
* frames: how each follows its frame when the frame is resized. A missing axis keeps its value.
|
|
2692
|
+
* One undo step.
|
|
2693
|
+
*/
|
|
2694
|
+
setResizing(resizing: VectorResizing, options?: {
|
|
2695
|
+
ids?: readonly string[];
|
|
2696
|
+
}): VectorActionResult;
|
|
2697
|
+
/** Every frame in the document (top-level ones are artboards), with its rectangle, parent and children's constraints. */
|
|
2698
|
+
getFrames(): VectorFrameListing[];
|
|
2699
|
+
/** One frame as an SVG document of its own size (its corner at the origin), or null when `id` is not a frame. */
|
|
2700
|
+
frameToSvg(id: string, options?: VectorSvgExportOptions): string | null;
|
|
1857
2701
|
/** Mask groups among `ids` (default: the selection), or holding one of them directly. */
|
|
1858
2702
|
private maskTargets;
|
|
1859
2703
|
/**
|
|
@@ -2150,6 +2994,248 @@ declare class VectorEditorController {
|
|
|
2150
2994
|
* width tool opens the width-point editor (`widthPointEdit`).
|
|
2151
2995
|
*/
|
|
2152
2996
|
doubleClick(screen: Vec2$1): void;
|
|
2997
|
+
/**
|
|
2998
|
+
* Sets the text shaper (shared by every vector editor on the page, see `setVectorTextShaper`) and
|
|
2999
|
+
* lays every text node out again with it. Not an undo step.
|
|
3000
|
+
*/
|
|
3001
|
+
setTextShaper(shaper: TextShaper | null): void;
|
|
3002
|
+
/** The text shaper in use. */
|
|
3003
|
+
getTextShaper(): TextShaper;
|
|
3004
|
+
/** Changes the font and alignment new text gets (validated; throws on a bad value). */
|
|
3005
|
+
setTextDefaults(patch: Partial<VectorTextDefaults>): void;
|
|
3006
|
+
/** The paint new text gets: black, no stroke (`addText` and the style panel change it). */
|
|
3007
|
+
private textStyle;
|
|
3008
|
+
/** Builds a text node from `input` with the text defaults (not added). Throws a `VectorTextError` on bad input. */
|
|
3009
|
+
createTextNode(input: VectorTextInput): VectorTextNode;
|
|
3010
|
+
/** Adds text (point, area or on a path, see `VectorTextInput`). Returns its id. */
|
|
3011
|
+
addText(input: VectorTextInput, options?: AddVectorNodeOptions): string;
|
|
3012
|
+
/** The text node `id`, or an error message. */
|
|
3013
|
+
private textNode;
|
|
3014
|
+
/** Replaces text node `id` by `fn(node)` as one undo step (merged with others of `merge`). */
|
|
3015
|
+
private editTextNode;
|
|
3016
|
+
/** Replaces [start, end) of text node `id` (default: all of it) with `text`. One undo step. */
|
|
3017
|
+
setText(id: string, text: string, range?: {
|
|
3018
|
+
start?: number;
|
|
3019
|
+
end?: number;
|
|
3020
|
+
}, options?: {
|
|
3021
|
+
merge?: string;
|
|
3022
|
+
}): VectorActionResult;
|
|
3023
|
+
/**
|
|
3024
|
+
* Applies character style fields (`fontFamily`, `fontWeight`, `italic`, `fontSize`, `tracking`,
|
|
3025
|
+
* `leading`, `baselineShift`, `underline`, `strikethrough`, `null` to clear) and `fill` to
|
|
3026
|
+
* [start, end) of text node `id` (default: all of it, which changes its own style). One undo step.
|
|
3027
|
+
*/
|
|
3028
|
+
setTextStyle(id: string, patch: Record<string, unknown>, range?: {
|
|
3029
|
+
start?: number;
|
|
3030
|
+
end?: number;
|
|
3031
|
+
}, options?: {
|
|
3032
|
+
merge?: string;
|
|
3033
|
+
}): VectorActionResult;
|
|
3034
|
+
/**
|
|
3035
|
+
* Applies character style fields (and `fill`) to the whole of every text node in `ids` (default:
|
|
3036
|
+
* the selected text, including text inside selected groups), or a paragraph patch with
|
|
3037
|
+
* `paragraph`. One undo step for all of them.
|
|
3038
|
+
*/
|
|
3039
|
+
styleTexts(patch: {
|
|
3040
|
+
style?: Record<string, unknown>;
|
|
3041
|
+
paragraph?: Record<string, unknown>;
|
|
3042
|
+
}, options?: {
|
|
3043
|
+
ids?: readonly string[];
|
|
3044
|
+
merge?: string;
|
|
3045
|
+
}): VectorActionResult;
|
|
3046
|
+
/** Changes paragraph fields (`align`, `autoLeading`, indents, spacing; `null` clears) of text node `id`. One undo step. */
|
|
3047
|
+
setParagraphStyle(id: string, patch: Record<string, unknown>, options?: {
|
|
3048
|
+
merge?: string;
|
|
3049
|
+
}): VectorActionResult;
|
|
3050
|
+
/**
|
|
3051
|
+
* Changes how text node `id` is set: `point` (keeps where its first line starts), `area` (a box:
|
|
3052
|
+
* `width` / `height` default to its current size, `x` / `y` to its top left) or `path` options
|
|
3053
|
+
* (`start`, `end`, `flip`, `orientation`, `baseline`; a new `path` needs path data or a subpath in
|
|
3054
|
+
* the node's own space). One undo step.
|
|
3055
|
+
*/
|
|
3056
|
+
setTextFrame(id: string, patch: Record<string, unknown>): VectorActionResult;
|
|
3057
|
+
/**
|
|
3058
|
+
* Turns path `pathId` into text set along it (Type on a Path): a text node in its place, its
|
|
3059
|
+
* anchors the text's path, its paint dropped for the text defaults (or `input`'s). Returns the
|
|
3060
|
+
* text's id, or an error.
|
|
3061
|
+
*/
|
|
3062
|
+
typeOnPath(pathId: string, input?: Partial<VectorTextInput>): VectorActionResult & {
|
|
3063
|
+
id?: string;
|
|
3064
|
+
};
|
|
3065
|
+
/**
|
|
3066
|
+
* Create Outlines: turns text into paths of its glyph outlines (one compound path, or a group
|
|
3067
|
+
* with one per run fill), keeping its paint, effects, filters and placement. Needs an outline
|
|
3068
|
+
* text shaper. Returns the new nodes' ids, or an error.
|
|
3069
|
+
*/
|
|
3070
|
+
createOutlines(options?: {
|
|
3071
|
+
ids?: readonly string[];
|
|
3072
|
+
}): VectorActionResult & {
|
|
3073
|
+
ids?: string[];
|
|
3074
|
+
};
|
|
3075
|
+
/** The layout of text node `id` (lines, glyphs, bounds, overflow), or null. */
|
|
3076
|
+
getTextLayout(id: string): VectorTextLayout | null;
|
|
3077
|
+
/**
|
|
3078
|
+
* Starts editing text node `id` on the canvas (the caret at `index`, default the end; or a
|
|
3079
|
+
* selection from `anchor` to `focus`). Typing goes to `textInput`, keys to `keyDown`.
|
|
3080
|
+
*/
|
|
3081
|
+
editText(id: string, options?: {
|
|
3082
|
+
index?: number;
|
|
3083
|
+
anchor?: number;
|
|
3084
|
+
focus?: number;
|
|
3085
|
+
}): VectorActionResult;
|
|
3086
|
+
/** Moves the caret or selection of the text being edited. */
|
|
3087
|
+
selectText(anchor: number, focus?: number): void;
|
|
3088
|
+
/**
|
|
3089
|
+
* Ends the text edit session. Text it created and left empty is removed (with no undo step when
|
|
3090
|
+
* nothing was typed); other emptied text is deleted as its own step.
|
|
3091
|
+
*/
|
|
3092
|
+
endTextEdit(): void;
|
|
3093
|
+
/** Types `text` over the selection of the text being edited (one undo step per session). */
|
|
3094
|
+
textInput(text: string): VectorActionResult;
|
|
3095
|
+
/** Deletes the selection, or one character (a whole surrogate pair) before or after the caret. */
|
|
3096
|
+
private textDelete;
|
|
3097
|
+
/** Keys while text is being edited: caret movement, deleting, Enter, Escape and style shortcuts. */
|
|
3098
|
+
private textKey;
|
|
3099
|
+
/** The selected characters of the text being edited ('' when the selection is collapsed), or null when not editing. */
|
|
3100
|
+
getSelectedText(): string | null;
|
|
3101
|
+
/** Cut while editing text: returns the selected characters and deletes them (null when not editing). */
|
|
3102
|
+
cutText(): string | null;
|
|
3103
|
+
/** The index one line up or down from `index`, at the same x (start or end of the text past the first or last line). */
|
|
3104
|
+
private lineMove;
|
|
3105
|
+
/** The topmost node of `type` under `p` (inside groups too, hit where it draws), or null. */
|
|
3106
|
+
private hitOfType;
|
|
3107
|
+
/** The topmost text node under `p` (inside groups too), or null. */
|
|
3108
|
+
private hitText;
|
|
3109
|
+
/** A text node created for the edit session (no undo step until something is typed). */
|
|
3110
|
+
private startNewText;
|
|
3111
|
+
private downType;
|
|
3112
|
+
private upTypeBox;
|
|
3113
|
+
/** The whole document: in isolation mode, the host with the edited symbol's art. */
|
|
3114
|
+
private storedDocument;
|
|
3115
|
+
private symbolEditState;
|
|
3116
|
+
/** The document's symbols (the stored ones, also while one is being edited). */
|
|
3117
|
+
getSymbols(): readonly VectorSymbol[];
|
|
3118
|
+
/** Ids of the instances of symbol `symbolId` in the whole document (inside other symbols too). */
|
|
3119
|
+
getSymbolInstances(symbolId: string): string[];
|
|
3120
|
+
private newSymbolId;
|
|
3121
|
+
/**
|
|
3122
|
+
* Make Symbol: turns the selected (or given) objects, which must share a parent, into a new
|
|
3123
|
+
* symbol whose registration point is their centre, and puts an instance in their place. One
|
|
3124
|
+
* undo step. Returns the symbol's and the instance's ids.
|
|
3125
|
+
*/
|
|
3126
|
+
makeSymbol(options?: {
|
|
3127
|
+
ids?: readonly string[];
|
|
3128
|
+
name?: string;
|
|
3129
|
+
}): VectorActionResult & {
|
|
3130
|
+
symbolId?: string;
|
|
3131
|
+
instanceId?: string;
|
|
3132
|
+
};
|
|
3133
|
+
/**
|
|
3134
|
+
* Places an instance of symbol `symbolId` with its registration point at (`x`, `y`) (default the
|
|
3135
|
+
* artboard's centre), or through `transform`. One undo step. Returns its id.
|
|
3136
|
+
*/
|
|
3137
|
+
placeSymbol(symbolId: string, options?: {
|
|
3138
|
+
x?: number;
|
|
3139
|
+
y?: number;
|
|
3140
|
+
transform?: VectorMatrix;
|
|
3141
|
+
name?: string;
|
|
3142
|
+
parentId?: string;
|
|
3143
|
+
}): VectorActionResult & {
|
|
3144
|
+
id?: string;
|
|
3145
|
+
};
|
|
3146
|
+
private instanceTargets;
|
|
3147
|
+
/**
|
|
3148
|
+
* Detach: replaces instances by groups of their symbol's art as drawn (placed, strokes scaled,
|
|
3149
|
+
* overrides applied), unlinked from the symbol. One undo step. Returns the groups' ids (the
|
|
3150
|
+
* instances' own).
|
|
3151
|
+
*/
|
|
3152
|
+
detachInstances(options?: {
|
|
3153
|
+
ids?: readonly string[];
|
|
3154
|
+
}): VectorActionResult & {
|
|
3155
|
+
ids?: string[];
|
|
3156
|
+
};
|
|
3157
|
+
/** Replace Symbol: instances draw symbol `symbolId` instead, keeping their placement. One undo step. */
|
|
3158
|
+
replaceSymbol(symbolId: string, options?: {
|
|
3159
|
+
ids?: readonly string[];
|
|
3160
|
+
}): VectorActionResult;
|
|
3161
|
+
/**
|
|
3162
|
+
* Instance options: `scaleStrokes` (strokes of the art scale with the instance), and overrides —
|
|
3163
|
+
* `fill` / `stroke` (every fill or stroke of the art in one paint; `null` clears), `hidden` (art
|
|
3164
|
+
* node ids not drawn). One undo step.
|
|
3165
|
+
*/
|
|
3166
|
+
setInstanceOptions(patch: {
|
|
3167
|
+
scaleStrokes?: boolean;
|
|
3168
|
+
fill?: VectorPaint | null;
|
|
3169
|
+
stroke?: VectorPaint | null;
|
|
3170
|
+
hidden?: string[] | null;
|
|
3171
|
+
}, options?: {
|
|
3172
|
+
ids?: readonly string[];
|
|
3173
|
+
}): VectorActionResult;
|
|
3174
|
+
/** Renames symbol `symbolId`. One undo step. */
|
|
3175
|
+
renameSymbol(symbolId: string, name: string): VectorActionResult;
|
|
3176
|
+
/**
|
|
3177
|
+
* Deletes symbol `symbolId`. With instances in use it refuses unless `detach` (they become plain
|
|
3178
|
+
* groups first). One undo step.
|
|
3179
|
+
*/
|
|
3180
|
+
deleteSymbol(symbolId: string, options?: {
|
|
3181
|
+
detach?: boolean;
|
|
3182
|
+
}): VectorActionResult;
|
|
3183
|
+
/**
|
|
3184
|
+
* Edit Symbol (isolation mode): the document becomes the art of symbol `id` (or of instance `id`'s
|
|
3185
|
+
* symbol), in its own space; everything else draws dimmed behind it. Edits are ordinary undo
|
|
3186
|
+
* steps; `exitSymbolEdit` returns to the document with every instance updated.
|
|
3187
|
+
*/
|
|
3188
|
+
editSymbol(id: string): VectorActionResult;
|
|
3189
|
+
/** The view inside isolation mode for the current (document) view. */
|
|
3190
|
+
private viewInto;
|
|
3191
|
+
/** The document's view for the current view inside isolation mode. */
|
|
3192
|
+
private viewOutOf;
|
|
3193
|
+
/** Leaves isolation mode: back to the whole document, the symbol's instances showing the edits. */
|
|
3194
|
+
exitSymbolEdit(): void;
|
|
3195
|
+
/** The document's constraints. */
|
|
3196
|
+
getConstraints(): readonly VectorConstraint[];
|
|
3197
|
+
/** The document's named parameters. */
|
|
3198
|
+
getParameters(): readonly VectorParameter[];
|
|
3199
|
+
/** Degrees of freedom the constraints leave, and whether any are redundant. */
|
|
3200
|
+
getConstraintDof(): VectorDofReport;
|
|
3201
|
+
/**
|
|
3202
|
+
* References from loose input to stable ones: anchors given by `subpath` / `index` get ids (the
|
|
3203
|
+
* path is updated in `nodes`). Throws on a missing path or anchor.
|
|
3204
|
+
*/
|
|
3205
|
+
private resolveRefs;
|
|
3206
|
+
private newConstraintId;
|
|
3207
|
+
/**
|
|
3208
|
+
* Adds a constraint: refs by anchor (`subpath` / `index`, or its id), handle, segment or circle;
|
|
3209
|
+
* dimensional kinds take a `value` expression (default: what the geometry measures now) and a
|
|
3210
|
+
* `name`. Refuses (changing nothing) one that conflicts with the others or repeats them, naming
|
|
3211
|
+
* them. One undo step. Returns the new constraint's id.
|
|
3212
|
+
*/
|
|
3213
|
+
addConstraint(input: VectorConstraintInput): VectorActionResult & {
|
|
3214
|
+
id?: string;
|
|
3215
|
+
ids?: string[];
|
|
3216
|
+
};
|
|
3217
|
+
/** Removes constraints by id. One undo step. */
|
|
3218
|
+
removeConstraints(ids: readonly string[]): VectorActionResult;
|
|
3219
|
+
/**
|
|
3220
|
+
* Sets a dimensional constraint's value expression (by id or name), or a named parameter's
|
|
3221
|
+
* (creating it; `null` removes a parameter), then solves. Refuses (changing nothing) a value
|
|
3222
|
+
* that does not evaluate or that the constraints cannot meet. One undo step.
|
|
3223
|
+
*/
|
|
3224
|
+
setConstraintValue(key: string, value: string | number | null, options?: {
|
|
3225
|
+
merge?: string;
|
|
3226
|
+
}): VectorActionResult & {
|
|
3227
|
+
ids?: string[];
|
|
3228
|
+
};
|
|
3229
|
+
/**
|
|
3230
|
+
* Auto-constrain: constraints the paths `ids` (default the selection, or every path) nearly
|
|
3231
|
+
* satisfy, added one by one (redundant or conflicting ones skipped). One undo step. Returns the
|
|
3232
|
+
* ids of the constraints added.
|
|
3233
|
+
*/
|
|
3234
|
+
autoConstrain(options?: {
|
|
3235
|
+
ids?: readonly string[];
|
|
3236
|
+
} & VectorInferOptions): VectorActionResult & {
|
|
3237
|
+
ids?: string[];
|
|
3238
|
+
};
|
|
2153
3239
|
/**
|
|
2154
3240
|
* Handles editor shortcuts. Returns true when the key was used (call `preventDefault`).
|
|
2155
3241
|
* Do not forward keys typed into text inputs.
|
|
@@ -2386,7 +3472,38 @@ interface VectorRenderMask extends Omit<VectorMaskRenderData, 'invertFilter'> {
|
|
|
2386
3472
|
/** The mask as drawn, for the `<mask>` of an opacity mask (in the group's own space). */
|
|
2387
3473
|
nodes?: VectorRenderNode[];
|
|
2388
3474
|
}
|
|
2389
|
-
|
|
3475
|
+
/**
|
|
3476
|
+
* Text drawn as SVG text (when the text shaper gives no glyph outlines; with outlines, text renders
|
|
3477
|
+
* as a `VectorRenderPath` or group). Draw a `<g>` with `id`, `transform`, `opacity`, `blendMode` and
|
|
3478
|
+
* `filter`, holding one `<text>` per layer, bottom to top, each holding every span as a `<tspan>`.
|
|
3479
|
+
*/
|
|
3480
|
+
interface VectorRenderText {
|
|
3481
|
+
kind: 'text';
|
|
3482
|
+
id: string;
|
|
3483
|
+
transform?: string;
|
|
3484
|
+
opacity: number;
|
|
3485
|
+
blendMode?: string;
|
|
3486
|
+
filter?: string;
|
|
3487
|
+
/**
|
|
3488
|
+
* Paint layers, bottom to top: a fill (`fill` set, `stroke` none) or a stroke. Draw each as a
|
|
3489
|
+
* `<text>` with these attributes (and `mix-blend-mode`). `runFills`: spans with their own `fill`
|
|
3490
|
+
* use it on this layer (the top fill).
|
|
3491
|
+
*/
|
|
3492
|
+
layers: Array<{
|
|
3493
|
+
kind: 'fill' | 'stroke';
|
|
3494
|
+
fill: string;
|
|
3495
|
+
stroke: string;
|
|
3496
|
+
strokeWidth: number;
|
|
3497
|
+
strokeLinejoin?: string;
|
|
3498
|
+
strokeDasharray?: string;
|
|
3499
|
+
opacity: number;
|
|
3500
|
+
blendMode?: string;
|
|
3501
|
+
runFills?: boolean;
|
|
3502
|
+
}>;
|
|
3503
|
+
spans: VectorRenderTextSpan[];
|
|
3504
|
+
}
|
|
3505
|
+
|
|
3506
|
+
type VectorRenderNode = VectorRenderPath | VectorRenderGroup | VectorRenderText;
|
|
2390
3507
|
interface VectorSceneRenderData {
|
|
2391
3508
|
/** SVG `transform` for the document layer: `translate(x y) scale(zoom)`. */
|
|
2392
3509
|
transform: string;
|
|
@@ -2622,6 +3739,79 @@ interface VectorOverlayRenderData {
|
|
|
2622
3739
|
enabled: boolean;
|
|
2623
3740
|
editing: boolean;
|
|
2624
3741
|
}[];
|
|
3742
|
+
/**
|
|
3743
|
+
* Text editing (screen space): the edited text's frame outline (`frame`, draw it thin and
|
|
3744
|
+
* dashed), the caret (a line, when the selection is collapsed), the selection's quads (`selection`,
|
|
3745
|
+
* filled translucent) and the overflow marker (a small boxed plus at `overflow` when text does
|
|
3746
|
+
* not fit). Also set, without caret, for the selected text while a Type tool is active.
|
|
3747
|
+
*/
|
|
3748
|
+
text: {
|
|
3749
|
+
nodeId: string;
|
|
3750
|
+
frame: string;
|
|
3751
|
+
caret: {
|
|
3752
|
+
x1: number;
|
|
3753
|
+
y1: number;
|
|
3754
|
+
x2: number;
|
|
3755
|
+
y2: number;
|
|
3756
|
+
} | null;
|
|
3757
|
+
selection: string[];
|
|
3758
|
+
overflow: Vec2$1 | null;
|
|
3759
|
+
editing: boolean;
|
|
3760
|
+
} | null;
|
|
3761
|
+
/** The Type tool's area text box being dragged out (screen space). */
|
|
3762
|
+
textBox: VectorBounds | null;
|
|
3763
|
+
/**
|
|
3764
|
+
* Constraint glyphs of the selected or edited paths (screen space): a label at (`x`, `y`) (a
|
|
3765
|
+
* glyph, or `name = value`), a dimension line for distances, `satisfied` false when the solve
|
|
3766
|
+
* could not meet it (draw it in a warning colour).
|
|
3767
|
+
*/
|
|
3768
|
+
/**
|
|
3769
|
+
* Name labels of the top-level frames (artboards), screen space: draw `name` just above (x, y),
|
|
3770
|
+
* the frame's top-left corner (bold when `selected`). Clicking a label should select the frame.
|
|
3771
|
+
*/
|
|
3772
|
+
frames: {
|
|
3773
|
+
id: string;
|
|
3774
|
+
name: string;
|
|
3775
|
+
x: number;
|
|
3776
|
+
y: number;
|
|
3777
|
+
selected: boolean;
|
|
3778
|
+
}[];
|
|
3779
|
+
/**
|
|
3780
|
+
* Connection sites, screen space, while the Connector tool is on: those of the object under the
|
|
3781
|
+
* pointer (top, right, bottom, left, centre), `active` on the one an end would glue to.
|
|
3782
|
+
*/
|
|
3783
|
+
connectorSites: {
|
|
3784
|
+
nodeId: string;
|
|
3785
|
+
side: string;
|
|
3786
|
+
x: number;
|
|
3787
|
+
y: number;
|
|
3788
|
+
active: boolean;
|
|
3789
|
+
}[];
|
|
3790
|
+
/** Points acquired for object snap tracking, screen space: draw a small `+` at each. */
|
|
3791
|
+
trackingPoints: {
|
|
3792
|
+
x: number;
|
|
3793
|
+
y: number;
|
|
3794
|
+
}[];
|
|
3795
|
+
/** The distance or coordinate being typed while the pen draws, and where to show it (screen space, by the pointer), or null. */
|
|
3796
|
+
typedEntry: {
|
|
3797
|
+
text: string;
|
|
3798
|
+
x: number;
|
|
3799
|
+
y: number;
|
|
3800
|
+
} | null;
|
|
3801
|
+
constraints: {
|
|
3802
|
+
id: string;
|
|
3803
|
+
kind: string;
|
|
3804
|
+
label: string;
|
|
3805
|
+
x: number;
|
|
3806
|
+
y: number;
|
|
3807
|
+
dimension: {
|
|
3808
|
+
x1: number;
|
|
3809
|
+
y1: number;
|
|
3810
|
+
x2: number;
|
|
3811
|
+
y2: number;
|
|
3812
|
+
} | null;
|
|
3813
|
+
satisfied: boolean;
|
|
3814
|
+
}[];
|
|
2625
3815
|
/** A short status, e.g. "W 120 × H 80" or "45°". */
|
|
2626
3816
|
status: string | null;
|
|
2627
3817
|
}
|
|
@@ -2825,6 +4015,8 @@ interface VectorSelectionStyle {
|
|
|
2825
4015
|
*/
|
|
2826
4016
|
cornerRadius: number;
|
|
2827
4017
|
cornerKind: VectorCornerKind;
|
|
4018
|
+
/** Squircle smoothing (0–1) of the first corner. */
|
|
4019
|
+
cornerSmoothing: number;
|
|
2828
4020
|
corners: number;
|
|
2829
4021
|
/** Some selected path is open, so arrowheads apply. */
|
|
2830
4022
|
hasOpenPath: boolean;
|
|
@@ -3040,7 +4232,7 @@ interface VectorCommandOptions {
|
|
|
3040
4232
|
/** A node as listed for agents. */
|
|
3041
4233
|
interface VectorNodeListing {
|
|
3042
4234
|
id: string;
|
|
3043
|
-
type: 'path' | 'group';
|
|
4235
|
+
type: 'path' | 'group' | 'text' | 'instance';
|
|
3044
4236
|
name?: string;
|
|
3045
4237
|
depth: number;
|
|
3046
4238
|
/** Axis-aligned bounds in document units. */
|
|
@@ -3060,6 +4252,13 @@ interface VectorNodeListing {
|
|
|
3060
4252
|
strokeWidth?: number;
|
|
3061
4253
|
/** SVG path data (paths only). */
|
|
3062
4254
|
d?: string;
|
|
4255
|
+
/** An instance's symbol, transform (it may scale and skew) and overrides. */
|
|
4256
|
+
symbolId?: string;
|
|
4257
|
+
transform?: number[];
|
|
4258
|
+
overrides?: unknown;
|
|
4259
|
+
/** A text node's text and frame kind (`point`, `area` or `path`); `vector.getText` has the rest. */
|
|
4260
|
+
text?: string;
|
|
4261
|
+
frame?: 'point' | 'area' | 'path';
|
|
3063
4262
|
children?: number;
|
|
3064
4263
|
/** A blend group's options (its steps are listed as children with `blendStep`). */
|
|
3065
4264
|
blend?: {
|
|
@@ -3087,6 +4286,12 @@ interface VectorNodeListing {
|
|
|
3087
4286
|
blendMode?: VectorBlendMode;
|
|
3088
4287
|
/** The node's visual filters (shadows, glows, blurs, feather). */
|
|
3089
4288
|
filters?: VectorFilter[];
|
|
4289
|
+
/** A frame's rectangle (in its own space), fill and clip (see vector.listFrames). */
|
|
4290
|
+
frameRect?: VectorFrame;
|
|
4291
|
+
/** A frame child's resizing constraints, when set. */
|
|
4292
|
+
resizing?: VectorResizing;
|
|
4293
|
+
/** A connector's ends and route (see vector.listConnectors). */
|
|
4294
|
+
connector?: VectorConnector;
|
|
3090
4295
|
/** A mask group's mask: type, inversion, the mask's id (its first child) and the masked contents. */
|
|
3091
4296
|
mask?: VectorMaskSummary;
|
|
3092
4297
|
}
|
|
@@ -4008,4 +5213,362 @@ declare function vectorTargetPaint(style: VectorStyle, target: 'fill' | 'stroke'
|
|
|
4008
5213
|
/** The node with `paint` in the place `vectorTargetPaint` reads (stored canonically). */
|
|
4009
5214
|
declare function withVectorTargetPaint<T extends VectorStyle>(node: T, target: 'fill' | 'stroke', layer: number | null, paint: VectorPaint): T;
|
|
4010
5215
|
|
|
4011
|
-
export { type AddVectorNodeOptions, AffineMatrix$1 as AffineMatrix, DEFAULT_VECTOR_BLEND_DISTANCE, DEFAULT_VECTOR_BLEND_STEPS, DEFAULT_VECTOR_PATH_EDIT, DEFAULT_VECTOR_SNAP, IDENTITY_MATRIX, KAPPA, LazyMouse, type MapVectorSubpathsOptions, type NearestSegment, type RecognizeInkOptions, VECTOR_ARROWHEAD_LABELS, VECTOR_BLEND_MAX_SMOOTH_STEPS, VECTOR_BLEND_MAX_STEPS, VECTOR_BLEND_MODE_LABELS, VECTOR_BLEND_MODE_MENU, VECTOR_BLEND_SPACING_LABELS, VECTOR_BUILDER_HATCH_GAP, VECTOR_CLIPBOARD_TYPE, VECTOR_CONSTRUCTION_ANGLES, VECTOR_CORNER_KIND_LABELS, VECTOR_CORNER_WIDGET_INSET, VECTOR_DISTORT_TOLERANCE, VECTOR_EDIT_TOGGLES, VECTOR_EFFECT_MENU, VECTOR_ENVELOPE_STYLE_OPTIONS, VECTOR_FILL_GAP, VECTOR_GRADIENT_INTERPOLATION_LABELS, VECTOR_GRADIENT_MIDPOINT_GAP, VECTOR_GRADIENT_OFF_BAR, VECTOR_GRADIENT_SPREAD_LABELS, VECTOR_GRADIENT_STOP_GAP, VECTOR_GRADIENT_TYPE_LABELS, VECTOR_INK_MAX_CORNERS, VECTOR_MASK_TYPE_LABELS, VECTOR_MASK_TYPE_OPTIONS, VECTOR_OVERLAY_THEME, VECTOR_PATHFINDER_ACTIONS, VECTOR_PATHFINDER_LABELS, VECTOR_PATH_ACTIONS, VECTOR_PENCIL_STRING_PX, VECTOR_PRESSURE_NOMINAL, VECTOR_ROTATE_HANDLE_OFFSET, VECTOR_STROKE_ALIGN_LABELS, VECTOR_STROKE_GRADIENT_MODE_LABELS, VECTOR_STROKE_SETTING_KEYS, VECTOR_STYLE_KEYS, VECTOR_TOOL_GLYPHS, VECTOR_TOOL_SHORTCUTS, VECTOR_WIDTH_PRESETS, VECTOR_WIDTH_PRESET_IDS, VECTOR_WIDTH_PROFILE_MAX_POINTS, VECTOR_WIDTH_PROFILE_MAX_SCALE, VECTOR_WIDTH_SAME_T, type VariableStrokeOptions, Vec2$1 as Vec2, type VectorActionResult, VectorAlign, VectorAnchor, VectorAnchorRef, VectorAnchorType, type VectorAppearancePanelData, type VectorAppearancePanelLayer, VectorAppearanceShape, VectorArrange, VectorArrowAlign, VectorArrowhead, type VectorArrowheadShape, VectorAverageAxis, VectorBlend, type VectorBlendControls, type VectorBlendInput, VectorBlendMode, VectorBlendOptions, type VectorBlendRail, VectorBlendSpacing, type VectorBlendStart, VectorBooleanOperation, VectorBounds, type VectorBuilderHit, type VectorBuilderLinePiece, type VectorBuilderPreview, type VectorBuilderReplacement, type VectorBuilderTouched, type VectorCommandOptions, type VectorCornerInfo, VectorCornerKind, type VectorCornerWidget, VectorDefaults, type VectorDistortMode, VectorDistribute, VectorDocument, VectorEditorController, type VectorEditorOptions, type VectorEditorState, VectorEffect, VectorEffectParamSpec, VectorEffectParamsMap, VectorEffectType, type VectorEffectsPanelData, type VectorEffectsPanelItem, type VectorEnvelopePanelData, VectorEnvelopeParams, VectorFillRule, VectorFilter, VectorFilterParamSpec, VectorFilterType, type VectorFiltersPanelItem, VectorGradient, type VectorGradientAnnotator, type VectorGradientEditorData, VectorGradientHandle, VectorGradientInterpolation, type VectorGradientPart, VectorGradientPatch, VectorGradientSpread, VectorGradientStop, type VectorGradientTarget, VectorGradientType, VectorGroupNode, type VectorGuideKind, type VectorGuideLabel, type VectorGuideLine, VectorHandleRef, type VectorHitTestOptions, type VectorHover, type VectorInkShape, type VectorInteraction, type VectorKeyInput, VectorLineJoin, VectorMask, type VectorMaskClipShape, type VectorMaskGroup, type VectorMaskPanelData, type VectorMaskRegionShape, type VectorMaskRenderData, type VectorMaskResult, type VectorMaskSummary, VectorMaskType, VectorMergeMode, VectorModifiers, type VectorMorph, type VectorMorphContour, type VectorMorphCorrespondence, type VectorMorphOptions, VectorNode, type VectorNodeListing, type VectorOverlayRenderData, VectorPaint, VectorPaintDef, VectorPaintLayer, type VectorPaintLayerHit, type VectorPaintLayerNode, type VectorPathAction, type VectorPathEditOptions, type VectorPathEntry, type VectorPathKeyframe, VectorPathNode, type VectorPathfinderAction, VectorPathfinderOperation, type VectorPathfinderPaint, type VectorPointMap, type VectorPointSnap, type VectorPointerInput, type VectorRectSnap, type VectorRenderAnchor, type VectorRenderCornerWidget, VectorRenderFilter, type VectorRenderGradientAnnotator, type VectorRenderGroup, type VectorRenderGuideLabel, type VectorRenderGuideLine, type VectorRenderHandle, type VectorRenderMask, type VectorRenderNode, type VectorRenderPaintLayer, type VectorRenderPath, VectorRenderStrokeParts, type VectorRenderWidthPoint, type VectorRepeaterCopy, type VectorScaleSnap, type VectorSceneRenderData, VectorSegmentRef, type VectorSelectionBoxGeometry, type VectorSelectionFrame, type VectorSelectionStyle, type VectorShapeBuilderFace, type VectorShapeBuilderMap, type VectorShapeBuilderPlan, type VectorShapeBuilderResult, type VectorShapeInput, type VectorSnapGuides, type VectorSnapKind, type VectorSnapLeave, type VectorSnapOptions, VectorSnapTargets, VectorStrokeAlign, VectorStrokeGradientMode, VectorStrokeLayer, type VectorStrokeParts, VectorStrokeSettings, type VectorStrokeSpot, VectorStyle, VectorSubpath, VectorSvgExportOptions, type VectorTaperOptions, VectorTool, VectorTransformHandle, VectorViewport, VectorWarpMesh, type VectorWaveOptions, type VectorWidthHandle, VectorWidthPoint, type VectorWidthPointEdit, type VectorWidthPointRef, type VectorWidthPreset, type VectorWidthPresetInfo, addBuilderHit, applyMatrix, applyMatrixLinear, applyVectorBlendOptions, arrowheadInset, arrowheadPath, arrowheadWeight, bendSegment, bezierToSubpaths, boundsFromPoints, boundsIntersect, cloneAnchor, cloneSubpath, cloneVectorDocument, cloneVectorNode, collectPathNodes, constrainToLeave, convertAnchor, cornerBisectorPoint, cornerRadiusChange, cornerSetback, correspondMorphContours, createVectorCommands, createVectorMorph, curvatureMoveAnchor, cutSubpathAt, dashIntervals, decomposeRigid, distortVectorNode, effectPathLength, effectPathVertexCount, effectiveStrokeAlign, ellipseSubpath, eraseFromFill, eraseFromOutline, eraserRegion, evaluateVectorPathKeyframes, expandVectorBlend, expandVectorCorners, expandVectorCornersOf, findVectorNode, fitCornerRadius, generateVectorBlendChildren, generateWidthProfile, getAnchor, getAnchorWorld, getEditablePathIds, getTransformHandlePositions, getVectorAppearancePanel, getVectorBlendControls, getVectorCornerWidgets, getVectorEffectsPanel, getVectorEnteredGroups, getVectorEnvelopePanel, getVectorEnvelopeTarget, getVectorGradientAnnotator, getVectorGradientEditor, getVectorMaskPanel, getVectorOverlayRenderData, getVectorSceneRenderData, getVectorSelectionBoxGeometry, getVectorSelectionFrame, getVectorSelectionStyle, getVectorWidthHandles, getVisibleAnchors, getVisibleHandles, hasPaint, hasStrokeExtras, hasVectorCorners, hasVectorPaintStacks, hitTestVectorNode, hitTestVectorNodes, hitTestVectorPaintLayer, hitTestVectorPaintStack, hitTestVectorStroke, hitVectorGradientAnnotator, inferAnchorType, insertAnchor, insertWidthPoint, interpolateMorphContours, interpolateRigidMatrix, interpolateVectorColor, interpolateVectorPaint, interpolateVectorPaths, interpolateVectorStyle, interpolateWidthProfiles, invertMatrix, isClosedBezierShape, isDrawnVectorPaintLayer, isIdentityMatrix, isPlainVectorPaintLayer, isUniformWidthProfile, isVectorBlendGroup, isVectorBlendMode, isVectorMaskActive, isVectorMaskGroup, isVectorMaskType, isVectorTextTarget, joinSubpaths, knifePath, lineSubpath, locateVectorNode, mapBezierPath, mapVectorPoints, mapVectorSubpaths, matrixRotation, mergePaths, mirrorWidthProfile, morphContourToSubpath, morphPathsCross, moveAnchorHandle, multiplyMatrices, nearestSegment, nearestStrokePosition, needsVectorPaintLayers, newVectorStrokeLayer, nextVectorCornerKind, nodeMatrix, normalizeVectorPaintStacks, offsetPaths, pathsCenter, planShapeBuilder, polygonSubpath, polylineBounds, pressureWidthProfile, puckerBloatPaths, recognizeInkShape, rectSubpath, refineMorphContour, refreshVectorBlends, releaseVectorBlend, removeAnchorKeepingShape, removeAnchors, removeAnchorsKeepingShape, removeRedundantPoints, removeWidthPoints, repeatPaths, resampleGradientStops, resolveVectorBlendOptions, reverseMorphContour, reverseSubpath, reverseWidthProfile, rotateMatrix, roundCornerPaths, roundSubpaths, samplePolyline, sanitizeVectorFills, sanitizeVectorMask, sanitizeVectorStrokeSettings, sanitizeVectorStrokes, sanitizeWidthProfile, scaleFor, scaleMatrix, setAnchorCorner, setSubpathCorners, setWidthPoint, simplifyPolyline, smoothSubpath, splitIntoFaces, splitSubpathAt, starSubpath, strokePositionPoint, strokeWidthProfileOf, subpathEnclosesArea, subpathPointAt, subpathSegment, subpathSegmentCount, subpathToMorphContour, subpathsToBezier, taperWaveFactor, toVectorKeyInput, toVectorModifiers, toVectorPointerInput, transformVectorNode, translateAnchor, translateMatrix, trimIntervals, trimPaths, trimPathsIndividually, turnMorphContour, twistPaths, unionBounds, variableStrokeOutline, variableStrokeRings, vectorBlendColorDistance, vectorBlendKeyTargets, vectorBlendKeys, vectorBlendModeCss, vectorBlendModeFromCss, vectorBlendRail, vectorBlendRailAt, vectorBlendSpine, vectorBlendStepCount, vectorBoxCorners, vectorBuilderErasedEdges, vectorCornerAt, vectorCorners, vectorDiamondPath, vectorDistortQuad, vectorFillMap, vectorFills, vectorGradientBarPosition, vectorGradientTargetPath, vectorInkShapeName, vectorMaskContains, vectorMaskContentBounds, vectorMaskContents, vectorMaskOwner, vectorMaskRegion, vectorMaskRegionPath, vectorMaskRegionShapes, vectorMaskRenderData, vectorMaskSource, vectorMaskSummary, vectorMaskedGeometry, vectorMaskedLocalBounds, vectorMaskedShapes, vectorMeshFromOutline, vectorMeshOutline, vectorNodeBounds, vectorNodeRotation, vectorNodeToBezier, vectorPaintLayerNodes, vectorPaintSwatch, vectorPaintToHex, vectorParentMatrix, vectorPathData, vectorPathEntries, vectorPathWorldBezier, vectorPathfinderShape, vectorRepeaterCopies, vectorResizeCursor, vectorResultStyle, vectorShapeBuilderHit, vectorShapeBuilderMap, vectorShearForSide, vectorSkewMatrix, vectorStacksHaveGradient, vectorStrokeGradientDefs, vectorStrokeLineArea, vectorStrokeOutline, vectorStrokeOutlinePath, vectorStrokeParts, vectorStrokeReach, vectorStrokeSettings, vectorStrokeStackReach, vectorStrokeWidthGeometry, vectorStrokes, vectorTargetPaint, vectorToolLabel, vectorWorldMatrix, walkVectorNodes, widthProfileAt, widthProfileMaxScale, widthProfilePreset, widthProfilePresetId, wigglePaths, withVectorFills, withVectorStrokes, withVectorTargetPaint, zigzagPaths };
|
|
5216
|
+
/**
|
|
5217
|
+
* Frames (artboards) and their children's resizing constraints.
|
|
5218
|
+
*
|
|
5219
|
+
* A frame is a group with `frame` set: a rectangle in the group's own space, a fill drawn below the
|
|
5220
|
+
* children and (by default) a clip. It draws, hit-tests and bounds through `vectorFrameDrawn`, an
|
|
5221
|
+
* equivalent clip group (or plain group without the clip), so rendering, masks, snapping and SVG
|
|
5222
|
+
* export reuse the mask group machinery. Resizing a frame lays out its children by their
|
|
5223
|
+
* `resizing` constraints (`vectorFrameChildMatrix`) instead of scaling them.
|
|
5224
|
+
*
|
|
5225
|
+
* The constraint rules follow figcraft's `crates/layout/src/lib.rs` `apply_constraints` (MIT OR
|
|
5226
|
+
* Apache-2.0, © ArtCraft Team and contributors; see THIRD_PARTY_NOTICES.md), as already ported for
|
|
5227
|
+
* the canvas package (`canvas/autoLayout.ts`): left / right / left and right / centre / scale
|
|
5228
|
+
* horizontally, top / bottom / top and bottom / centre / scale vertically.
|
|
5229
|
+
*/
|
|
5230
|
+
|
|
5231
|
+
/** A frame group (its `frame` set, and not a blend, live boolean or mask group). */
|
|
5232
|
+
type VectorFrameGroup = VectorGroupNode & {
|
|
5233
|
+
frame: VectorFrame;
|
|
5234
|
+
};
|
|
5235
|
+
/** Whether the node is a frame. */
|
|
5236
|
+
declare function isVectorFrame(node: VectorNode | null | undefined): node is VectorFrameGroup;
|
|
5237
|
+
/** The frame's rectangle as a closed four-anchor path (in the frame's own space). */
|
|
5238
|
+
declare function vectorFrameRectPath(frame: VectorFrame): VectorPathNode['subpaths'];
|
|
5239
|
+
/**
|
|
5240
|
+
* The frame as an equivalent plain group: a clip group (`mask: clip`) whose mask is the frame's
|
|
5241
|
+
* rectangle (`<id>~frame-clip`), then its fill (`<id>~frame-fill`) and its children; without the
|
|
5242
|
+
* clip, a group of the fill and the children. Same id, transform and appearance. Cached per node.
|
|
5243
|
+
*/
|
|
5244
|
+
declare function vectorFrameDrawn(node: VectorFrameGroup): VectorGroupNode;
|
|
5245
|
+
/** Whether `p` (in the frame's own space) lies in its rectangle, within `tolerance`. */
|
|
5246
|
+
declare function vectorFrameContains(frame: VectorFrame, p: {
|
|
5247
|
+
x: number;
|
|
5248
|
+
y: number;
|
|
5249
|
+
}, tolerance?: number): boolean;
|
|
5250
|
+
/**
|
|
5251
|
+
* The matrix (in the frame's own space) that takes a child with bounds `box` from frame rectangle
|
|
5252
|
+
* `from` to `to` by the child's `resizing` constraints: a scale and translation per axis.
|
|
5253
|
+
*/
|
|
5254
|
+
declare function vectorFrameChildMatrix(resizing: VectorResizing | null | undefined, box: VectorBounds, from: VectorFrame, to: VectorFrame): AffineMatrix;
|
|
5255
|
+
/** Reads a frame from untrusted data (JSON, agent input, SVG import), or null. */
|
|
5256
|
+
declare function sanitizeVectorFrame(value: unknown): VectorFrame | null;
|
|
5257
|
+
/** Reads resizing constraints from untrusted data, or null (unknown values dropped). */
|
|
5258
|
+
declare function sanitizeVectorResizing(value: unknown): VectorResizing | null;
|
|
5259
|
+
/** Labels for the resizing constraint pickers. */
|
|
5260
|
+
declare const VECTOR_HORIZONTAL_RESIZING_LABELS: Readonly<Record<VectorHorizontalResizing, string>>;
|
|
5261
|
+
declare const VECTOR_VERTICAL_RESIZING_LABELS: Readonly<Record<VectorVerticalResizing, string>>;
|
|
5262
|
+
/** Whether `inner` lies wholly in `outer` (false for a missing box). */
|
|
5263
|
+
declare function vectorBoundsInside(inner: VectorBounds | null, outer: VectorBounds): boolean;
|
|
5264
|
+
/** Top-level frames of a document (its artboards), bottom to top. */
|
|
5265
|
+
declare function vectorArtboards(doc: Pick<VectorDocument, 'nodes'>): VectorFrameGroup[];
|
|
5266
|
+
/**
|
|
5267
|
+
* A document of one frame on its own, sized to the frame with the frame's corner at the origin
|
|
5268
|
+
* (the frame's rotation undone), for exporting an artboard. Symbols, constraints' parameters and the
|
|
5269
|
+
* page background are carried over. Null when `id` is not a frame.
|
|
5270
|
+
*/
|
|
5271
|
+
declare function vectorFrameDocument(doc: VectorDocument, id: string, find: (nodes: readonly VectorNode[], id: string) => VectorNode | null | undefined): VectorDocument | null;
|
|
5272
|
+
/** What the frame panel shows for the selection. */
|
|
5273
|
+
interface VectorFramePanel {
|
|
5274
|
+
/** The selected frame (the first, when several are), or null. */
|
|
5275
|
+
frame: {
|
|
5276
|
+
id: string;
|
|
5277
|
+
name: string;
|
|
5278
|
+
artboard: boolean;
|
|
5279
|
+
frame: VectorFrame;
|
|
5280
|
+
} | null;
|
|
5281
|
+
/**
|
|
5282
|
+
* The resizing constraints of the selected objects that sit directly in a frame (null when none
|
|
5283
|
+
* does): each axis' value, or `mixed` when they differ.
|
|
5284
|
+
*/
|
|
5285
|
+
resizing: {
|
|
5286
|
+
ids: string[];
|
|
5287
|
+
horizontal: VectorHorizontalResizing | 'mixed';
|
|
5288
|
+
vertical: VectorVerticalResizing | 'mixed';
|
|
5289
|
+
} | null;
|
|
5290
|
+
}
|
|
5291
|
+
/** The frame panel's data for a selection. */
|
|
5292
|
+
declare function getVectorFramePanel(state: {
|
|
5293
|
+
document: Pick<VectorDocument, 'nodes'>;
|
|
5294
|
+
selection: readonly string[];
|
|
5295
|
+
}): VectorFramePanel;
|
|
5296
|
+
|
|
5297
|
+
/**
|
|
5298
|
+
* Framework-neutral data for a text panel (React and Svelte render it the same way): what it edits
|
|
5299
|
+
* (the selected characters of the text being edited, the selected text nodes, or the defaults for
|
|
5300
|
+
* new text), the current values (`null` where they differ), and the apply helpers.
|
|
5301
|
+
*/
|
|
5302
|
+
|
|
5303
|
+
interface VectorTextPanelData {
|
|
5304
|
+
/** `range`: the selected characters of the text being edited; `nodes`: whole text nodes; `defaults`: new text. */
|
|
5305
|
+
target: 'range' | 'nodes' | 'defaults';
|
|
5306
|
+
/** The text nodes edited (empty for defaults). */
|
|
5307
|
+
ids: string[];
|
|
5308
|
+
/** Character fields; `null` where the target mixes values (or, for leading, auto). */
|
|
5309
|
+
font: {
|
|
5310
|
+
[K in keyof Required<VectorCharacterStyle>]: VectorCharacterStyle[K] | null;
|
|
5311
|
+
};
|
|
5312
|
+
align: VectorTextAlign | null;
|
|
5313
|
+
/** The frame kind of a single text node. */
|
|
5314
|
+
frame: 'point' | 'area' | 'path' | null;
|
|
5315
|
+
/** Families the shaper can draw (always the generic ones too). */
|
|
5316
|
+
families: string[];
|
|
5317
|
+
/** Whether the shaper gives outlines (Create Outlines works). */
|
|
5318
|
+
outlines: boolean;
|
|
5319
|
+
/** One path is selected: Type on a Path can turn it into path text. */
|
|
5320
|
+
pathId: string | null;
|
|
5321
|
+
}
|
|
5322
|
+
declare const VECTOR_TEXT_ALIGN_LABELS: Readonly<Record<VectorTextAlign, string>>;
|
|
5323
|
+
declare const VECTOR_TEXT_ALIGN_OPTIONS: readonly {
|
|
5324
|
+
value: VectorTextAlign;
|
|
5325
|
+
label: string;
|
|
5326
|
+
}[];
|
|
5327
|
+
/** Weights a font menu offers. */
|
|
5328
|
+
declare const VECTOR_FONT_WEIGHTS: readonly {
|
|
5329
|
+
value: number;
|
|
5330
|
+
label: string;
|
|
5331
|
+
}[];
|
|
5332
|
+
/**
|
|
5333
|
+
* The text panel for `state`: shown while a Type tool is active or text is selected; null
|
|
5334
|
+
* otherwise.
|
|
5335
|
+
*/
|
|
5336
|
+
declare function getVectorTextPanel(state: Pick<VectorEditorState, 'document' | 'selection' | 'textEdit' | 'textDefaults' | 'tool'>): VectorTextPanelData | null;
|
|
5337
|
+
/**
|
|
5338
|
+
* Applies character fields (and `fill`) from the panel: to the selected characters, the selected
|
|
5339
|
+
* text nodes (one undo step) or the defaults for new text. `merge` folds slider drags into one step.
|
|
5340
|
+
*/
|
|
5341
|
+
declare function applyVectorTextStyle(controller: VectorEditorController, patch: Record<string, unknown>, options?: {
|
|
5342
|
+
merge?: string;
|
|
5343
|
+
}): void;
|
|
5344
|
+
/** Applies paragraph fields from the panel to the text being edited or selected, or to the defaults. */
|
|
5345
|
+
declare function applyVectorParagraphStyle(controller: VectorEditorController, patch: {
|
|
5346
|
+
align?: VectorTextAlign;
|
|
5347
|
+
} & Record<string, unknown>, options?: {
|
|
5348
|
+
merge?: string;
|
|
5349
|
+
}): void;
|
|
5350
|
+
|
|
5351
|
+
/**
|
|
5352
|
+
* Symbols and instances: reusable art (`VectorDocument.symbols`) drawn by `instance` nodes through
|
|
5353
|
+
* an affine transform that may scale and skew.
|
|
5354
|
+
*
|
|
5355
|
+
* The concepts follow vectorcraft's `Symbol { name, art }` and `SymbolInstance { symbol, xf }`
|
|
5356
|
+
* (`crates/doc/src/symbols.rs`, MIT OR Apache-2.0, © ArtCraft Team and contributors; see
|
|
5357
|
+
* THIRD_PARTY_NOTICES.md): instances measure and draw their symbol's art placed by their own
|
|
5358
|
+
* transform, nesting is bounded, and a symbol that would contain itself draws nothing. The
|
|
5359
|
+
* resolution and expansion here are our own.
|
|
5360
|
+
*
|
|
5361
|
+
* Instances carry their symbol's art resolved (`art`, the symbol's own `nodes` array) so that
|
|
5362
|
+
* geometry, rendering and export, which see one node at a time, can draw them. The editor resolves
|
|
5363
|
+
* after every change (`resolveVectorSymbols`); storage leaves it out (`stripVectorSymbolArt`).
|
|
5364
|
+
*/
|
|
5365
|
+
|
|
5366
|
+
/** Instances inside symbols nest at most this deep; deeper ones draw nothing. */
|
|
5367
|
+
declare const VECTOR_SYMBOL_MAX_DEPTH = 16;
|
|
5368
|
+
/** Ids of the symbols instances in `nodes` use (nested groups included, not through other symbols). */
|
|
5369
|
+
declare function vectorSymbolsUsedIn(nodes: readonly VectorNode[]): Set<string>;
|
|
5370
|
+
/** Whether symbol `symbolId`'s art reaches symbol `target` through its instances (a cycle when they are the same). */
|
|
5371
|
+
declare function vectorSymbolUses(symbols: readonly VectorSymbol[], symbolId: string, target: string): boolean;
|
|
5372
|
+
/**
|
|
5373
|
+
* The document with every instance's `art` set to its symbol's art (instances inside symbols
|
|
5374
|
+
* included), the same object when nothing changed. An instance of a missing symbol, or one that
|
|
5375
|
+
* would draw its own symbol, gets no art.
|
|
5376
|
+
*/
|
|
5377
|
+
declare function resolveVectorSymbols(doc: VectorDocument): VectorDocument;
|
|
5378
|
+
/** The document without resolved art on its instances (for storage). */
|
|
5379
|
+
declare function stripVectorSymbolArt(doc: VectorDocument): VectorDocument;
|
|
5380
|
+
/** A node's stroke widths (every stroke layer, the shorthand and profiles are relative) times `k`; groups pass it on. */
|
|
5381
|
+
declare function scaleVectorStrokeWidths<T extends VectorNode>(node: T, k: number): T;
|
|
5382
|
+
/** A node's fills and / or strokes all painted with the overrides' paints (groups pass them on). */
|
|
5383
|
+
declare function tintVectorNode<T extends VectorNode>(node: T, overrides: Pick<VectorInstanceOverrides, 'fill' | 'stroke'>): T;
|
|
5384
|
+
/** Copies of `nodes` with ids prefixed `<prefix>~` (all the way down). */
|
|
5385
|
+
declare function prefixVectorIds(nodes: readonly VectorNode[], prefix: string): VectorNode[];
|
|
5386
|
+
/**
|
|
5387
|
+
* What an instance draws, as a plain group in its parent's space: its art placed through its
|
|
5388
|
+
* transform (the rotation on the group, scale and skew baked into the art so transforms stay
|
|
5389
|
+
* rigid), strokes scaled unless `scaleStrokes` is false, overrides applied, ids `<instance>~<art>`.
|
|
5390
|
+
* `bake(node, m)` is `transformVectorNode` (passed in to keep this module below geometry).
|
|
5391
|
+
*/
|
|
5392
|
+
declare function vectorInstanceGroup(node: VectorInstanceNode, bake: (n: VectorNode, m: AffineMatrix) => VectorNode): VectorGroupNode;
|
|
5393
|
+
/** `a` then `b` (re-exported for callers that place art). */
|
|
5394
|
+
declare const composeVectorMatrices: (a: AffineMatrix, b: AffineMatrix) => AffineMatrix;
|
|
5395
|
+
|
|
5396
|
+
/**
|
|
5397
|
+
* Framework-neutral data for symbol UI: the symbols panel (each symbol with a preview, the selected
|
|
5398
|
+
* instance's options) and the dimmed document behind a symbol edited in isolation.
|
|
5399
|
+
*/
|
|
5400
|
+
|
|
5401
|
+
interface VectorSymbolsPanelItem {
|
|
5402
|
+
id: string;
|
|
5403
|
+
name: string;
|
|
5404
|
+
instances: number;
|
|
5405
|
+
/** A preview: draw `scene.nodes` (with its defs and filters) in an `<svg viewBox={viewBox}>`. */
|
|
5406
|
+
viewBox: string;
|
|
5407
|
+
scene: VectorSceneRenderData;
|
|
5408
|
+
/** Being edited in isolation. */
|
|
5409
|
+
editing: boolean;
|
|
5410
|
+
}
|
|
5411
|
+
interface VectorSymbolsPanelData {
|
|
5412
|
+
symbols: VectorSymbolsPanelItem[];
|
|
5413
|
+
/** The selection can become a symbol (objects selected, not one instance alone). */
|
|
5414
|
+
canMake: boolean;
|
|
5415
|
+
/** The one selected instance, with its options. */
|
|
5416
|
+
instance: {
|
|
5417
|
+
id: string;
|
|
5418
|
+
symbolId: string;
|
|
5419
|
+
scaleStrokes: boolean;
|
|
5420
|
+
fill: VectorPaint | null;
|
|
5421
|
+
stroke: VectorPaint | null;
|
|
5422
|
+
hidden: number;
|
|
5423
|
+
} | null;
|
|
5424
|
+
editing: {
|
|
5425
|
+
symbolId: string;
|
|
5426
|
+
name: string;
|
|
5427
|
+
} | null;
|
|
5428
|
+
}
|
|
5429
|
+
/** The symbols panel for `state`. */
|
|
5430
|
+
declare function getVectorSymbolsPanel(state: VectorEditorState, options?: {
|
|
5431
|
+
idPrefix?: string;
|
|
5432
|
+
}): VectorSymbolsPanelData;
|
|
5433
|
+
/**
|
|
5434
|
+
* The document behind a symbol edited in isolation, to draw dimmed under the art: its scene, placed
|
|
5435
|
+
* so the instance it was entered from lines up with the art (that instance left out). Null outside
|
|
5436
|
+
* isolation mode, or when the symbol was entered without an instance.
|
|
5437
|
+
*/
|
|
5438
|
+
declare function getVectorSymbolEditBackground(state: VectorEditorState, options?: {
|
|
5439
|
+
idPrefix?: string;
|
|
5440
|
+
}): (VectorSceneRenderData & {
|
|
5441
|
+
name: string;
|
|
5442
|
+
}) | null;
|
|
5443
|
+
|
|
5444
|
+
/**
|
|
5445
|
+
* Where to draw constraint glyphs (document space), the constraints panel's data and the actions the
|
|
5446
|
+
* current selection allows. Framework-neutral, so React and Svelte draw the same thing.
|
|
5447
|
+
*/
|
|
5448
|
+
|
|
5449
|
+
/** Short glyphs per kind. */
|
|
5450
|
+
declare const VECTOR_CONSTRAINT_GLYPHS: Readonly<Record<VectorConstraintKind, string>>;
|
|
5451
|
+
declare const VECTOR_CONSTRAINT_LABELS: Readonly<Record<VectorConstraintKind, string>>;
|
|
5452
|
+
/** A constraint's glyph in document space. */
|
|
5453
|
+
interface VectorConstraintGlyph {
|
|
5454
|
+
id: string;
|
|
5455
|
+
kind: VectorConstraintKind;
|
|
5456
|
+
/** The glyph, or `name = value` for dimensional constraints. */
|
|
5457
|
+
label: string;
|
|
5458
|
+
/** Where to draw it (near the middle of what it refers to). */
|
|
5459
|
+
at: Vec2$1;
|
|
5460
|
+
/** The points it refers to (for a highlight). */
|
|
5461
|
+
points: Vec2$1[];
|
|
5462
|
+
/** A dimension line between two points (distances). */
|
|
5463
|
+
dimension: {
|
|
5464
|
+
a: Vec2$1;
|
|
5465
|
+
b: Vec2$1;
|
|
5466
|
+
} | null;
|
|
5467
|
+
satisfied: boolean;
|
|
5468
|
+
}
|
|
5469
|
+
/** Glyphs of the constraints that touch `nodeIds` (all when null), document space. */
|
|
5470
|
+
declare function vectorConstraintGlyphs(doc: VectorDocument, nodeIds?: ReadonlySet<string> | null): VectorConstraintGlyph[];
|
|
5471
|
+
/** A constraint the selection allows, with its references ready for `addConstraint`. */
|
|
5472
|
+
interface VectorConstraintAction {
|
|
5473
|
+
kind: VectorConstraintKind;
|
|
5474
|
+
label: string;
|
|
5475
|
+
refs: {
|
|
5476
|
+
nodeId: string;
|
|
5477
|
+
subpath?: number;
|
|
5478
|
+
index?: number;
|
|
5479
|
+
segment?: boolean;
|
|
5480
|
+
circle?: boolean;
|
|
5481
|
+
}[];
|
|
5482
|
+
/** Dimensional: it asks for a value (the current measure is the default). */
|
|
5483
|
+
dimensional: boolean;
|
|
5484
|
+
}
|
|
5485
|
+
/**
|
|
5486
|
+
* Constraints the selected anchors (direct tool) or paths allow: one anchor (fix, tangent and
|
|
5487
|
+
* smooth at it), two anchors (a segment when they are neighbours: horizontal, vertical, length,
|
|
5488
|
+
* fix; else coincident, horizontal, vertical, distance), three (a point and a segment: on its
|
|
5489
|
+
* line), four as two segments (parallel, perpendicular, equal, collinear, angle); one or two round
|
|
5490
|
+
* paths (radius, diameter, fix; concentric, equal, tangent).
|
|
5491
|
+
*/
|
|
5492
|
+
declare function vectorConstraintActions(doc: VectorDocument, selection: {
|
|
5493
|
+
anchors: readonly VectorAnchorRef[];
|
|
5494
|
+
nodes: readonly string[];
|
|
5495
|
+
}): VectorConstraintAction[];
|
|
5496
|
+
/** The constraints panel: degrees of freedom, constraints of the selection (all without one), actions, parameters. */
|
|
5497
|
+
interface VectorConstraintPanelData {
|
|
5498
|
+
dof: VectorDofReport;
|
|
5499
|
+
constraints: {
|
|
5500
|
+
id: string;
|
|
5501
|
+
kind: VectorConstraintKind;
|
|
5502
|
+
label: string;
|
|
5503
|
+
name?: string;
|
|
5504
|
+
value?: string;
|
|
5505
|
+
satisfied: boolean;
|
|
5506
|
+
conflict: boolean;
|
|
5507
|
+
}[];
|
|
5508
|
+
actions: VectorConstraintAction[];
|
|
5509
|
+
parameters: {
|
|
5510
|
+
name: string;
|
|
5511
|
+
value: string;
|
|
5512
|
+
result: number | null;
|
|
5513
|
+
error: string | null;
|
|
5514
|
+
}[];
|
|
5515
|
+
}
|
|
5516
|
+
declare function vectorConstraintPanel(doc: VectorDocument, selection: {
|
|
5517
|
+
anchors: readonly VectorAnchorRef[];
|
|
5518
|
+
nodes: readonly string[];
|
|
5519
|
+
}, conflicts?: readonly string[]): VectorConstraintPanelData;
|
|
5520
|
+
/** The constraints panel for an editor state (selection: the direct tool's anchors, else the selected paths). */
|
|
5521
|
+
declare function getVectorConstraintPanel(state: {
|
|
5522
|
+
document: VectorDocument;
|
|
5523
|
+
selection: readonly string[];
|
|
5524
|
+
selectedAnchors: readonly VectorAnchorRef[];
|
|
5525
|
+
tool: string;
|
|
5526
|
+
constraintIssues: {
|
|
5527
|
+
conflicts: string[];
|
|
5528
|
+
} | null;
|
|
5529
|
+
}): VectorConstraintPanelData;
|
|
5530
|
+
|
|
5531
|
+
/**
|
|
5532
|
+
* A spatial index for hit-testing, marquee selection and snapping in large documents.
|
|
5533
|
+
*
|
|
5534
|
+
* After cadcraft's `crates/engine/src/spatial.rs` (MIT OR Apache-2.0, © ArtCraft Team and
|
|
5535
|
+
* contributors; see THIRD_PARTY_NOTICES.md): an R-tree over object bounds, built only above a
|
|
5536
|
+
* size where scanning costs more, reused while the content is the same (here: the same node array),
|
|
5537
|
+
* and rebuilt cheaply after an edit because each node's bounds are cached by node object, so only
|
|
5538
|
+
* the nodes an edit replaced are measured again (structural sharing). Queries return candidates in
|
|
5539
|
+
* draw order; callers then run exactly the same tests as a scan, so results are identical. The
|
|
5540
|
+
* tree itself is ours (sort-tile-recursive packing) since cadcraft uses the `rstar` crate.
|
|
5541
|
+
*/
|
|
5542
|
+
|
|
5543
|
+
/** Node lists shorter than this are scanned directly (building an index costs more). */
|
|
5544
|
+
declare const VECTOR_SPATIAL_MIN = 256;
|
|
5545
|
+
interface Box {
|
|
5546
|
+
minX: number;
|
|
5547
|
+
minY: number;
|
|
5548
|
+
maxX: number;
|
|
5549
|
+
maxY: number;
|
|
5550
|
+
}
|
|
5551
|
+
/** A static R-tree over boxes, packed sort-tile-recursive (items with no box are always candidates). */
|
|
5552
|
+
declare class VectorRTree {
|
|
5553
|
+
private readonly root;
|
|
5554
|
+
private readonly always;
|
|
5555
|
+
private readonly boxes;
|
|
5556
|
+
constructor(boxes: ReadonlyArray<Box | null>);
|
|
5557
|
+
private static pack;
|
|
5558
|
+
/** Indices of the items whose box meets `box` (and the unbounded ones), ascending. */
|
|
5559
|
+
search(box: Box): number[];
|
|
5560
|
+
}
|
|
5561
|
+
/** A top-level node's paint box in its parent's space (strokes and filters' reach included), cached per node object. */
|
|
5562
|
+
declare function vectorNodePaintBox(node: VectorNode): Box | null;
|
|
5563
|
+
/**
|
|
5564
|
+
* The index over a node list (cached per array; null below `VECTOR_SPATIAL_MIN` nodes). Nodes
|
|
5565
|
+
* without bounds (empty groups, unresolved instances) are always candidates.
|
|
5566
|
+
*/
|
|
5567
|
+
declare function vectorSpatialIndex(nodes: readonly VectorNode[]): VectorRTree | null;
|
|
5568
|
+
/**
|
|
5569
|
+
* Indices (ascending, draw order) of the nodes of `nodes` that may meet `rect` padded by `pad`
|
|
5570
|
+
* (document units): every index when the list is small enough to scan.
|
|
5571
|
+
*/
|
|
5572
|
+
declare function vectorNodesNear(nodes: readonly VectorNode[], rect: VectorBounds, pad?: number): number[];
|
|
5573
|
+
|
|
5574
|
+
export { type AddVectorNodeOptions, AffineMatrix$1 as AffineMatrix, DEFAULT_VECTOR_BLEND_DISTANCE, DEFAULT_VECTOR_BLEND_STEPS, DEFAULT_VECTOR_FONT, DEFAULT_VECTOR_PATH_EDIT, DEFAULT_VECTOR_SNAP, IDENTITY_MATRIX, KAPPA, LazyMouse, type MapVectorSubpathsOptions, type NearestSegment, type RecognizeInkOptions, TextFont, TextShaper, VECTOR_ARROWHEAD_LABELS, VECTOR_BLEND_MAX_SMOOTH_STEPS, VECTOR_BLEND_MAX_STEPS, VECTOR_BLEND_MODE_LABELS, VECTOR_BLEND_MODE_MENU, VECTOR_BLEND_SPACING_LABELS, VECTOR_BUILDER_HATCH_GAP, VECTOR_CHARACTER_STYLE_KEYS, VECTOR_CLIPBOARD_TYPE, VECTOR_CONNECTOR_ROUTE_LABELS, VECTOR_CONNECTOR_SIDE_LABELS, VECTOR_CONSTRAINT_GLYPHS, VECTOR_CONSTRAINT_LABELS, VECTOR_CONSTRUCTION_ANGLES, VECTOR_CORNER_KIND_LABELS, VECTOR_CORNER_WIDGET_INSET, VECTOR_DIMENSIONAL_KINDS, VECTOR_DISTORT_TOLERANCE, VECTOR_EDIT_TOGGLES, VECTOR_EFFECT_MENU, VECTOR_ENVELOPE_STYLE_OPTIONS, VECTOR_FILL_GAP, VECTOR_FONT_WEIGHTS, VECTOR_GRADIENT_INTERPOLATION_LABELS, VECTOR_GRADIENT_MIDPOINT_GAP, VECTOR_GRADIENT_OFF_BAR, VECTOR_GRADIENT_SPREAD_LABELS, VECTOR_GRADIENT_STOP_GAP, VECTOR_GRADIENT_TYPE_LABELS, VECTOR_HORIZONTAL_RESIZING_LABELS, VECTOR_INK_MAX_CORNERS, VECTOR_MASK_TYPE_LABELS, VECTOR_MASK_TYPE_OPTIONS, VECTOR_MAX_CONSTRAINTS, VECTOR_MAX_TRACKING_POINTS, VECTOR_OVERLAY_THEME, VECTOR_PARAGRAPH_STYLE_KEYS, VECTOR_PATHFINDER_ACTIONS, VECTOR_PATHFINDER_LABELS, VECTOR_PATH_ACTIONS, VECTOR_PENCIL_STRING_PX, VECTOR_PRESSURE_NOMINAL, VECTOR_ROTATE_HANDLE_OFFSET, VECTOR_SPATIAL_MIN, VECTOR_STROKE_ALIGN_LABELS, VECTOR_STROKE_GRADIENT_MODE_LABELS, VECTOR_STROKE_SETTING_KEYS, VECTOR_STYLE_KEYS, VECTOR_SYMBOL_MAX_DEPTH, VECTOR_TEXT_ALIGN_LABELS, VECTOR_TEXT_ALIGN_OPTIONS, VECTOR_TOOL_GLYPHS, VECTOR_TOOL_SHORTCUTS, VECTOR_VERTICAL_RESIZING_LABELS, VECTOR_WIDTH_PRESETS, VECTOR_WIDTH_PRESET_IDS, VECTOR_WIDTH_PROFILE_MAX_POINTS, VECTOR_WIDTH_PROFILE_MAX_SCALE, VECTOR_WIDTH_SAME_T, type VariableStrokeOptions, Vec2$1 as Vec2, type VectorActionResult, VectorAlign, VectorAnchor, VectorAnchorRef, VectorAnchorType, type VectorAppearancePanelData, type VectorAppearancePanelLayer, VectorAppearanceShape, VectorArrange, VectorArrowAlign, VectorArrowhead, type VectorArrowheadShape, VectorAverageAxis, VectorBlend, type VectorBlendControls, type VectorBlendInput, VectorBlendMode, VectorBlendOptions, type VectorBlendRail, VectorBlendSpacing, type VectorBlendStart, VectorBooleanOperation, VectorBounds, type VectorBuilderHit, type VectorBuilderLinePiece, type VectorBuilderPreview, type VectorBuilderReplacement, type VectorBuilderTouched, VectorCharacterStyle, type VectorCommandOptions, type VectorConnectionSite, VectorConnector, VectorConnectorEnd, type VectorConnectorListing, type VectorConnectorPanel, VectorConnectorRoute, type VectorConnectorRouting, VectorConnectorSide, VectorConstraint, type VectorConstraintAction, VectorConstraintError, type VectorConstraintGlyph, type VectorConstraintInput, VectorConstraintKind, type VectorConstraintPanelData, type VectorConstraintRefInput, type VectorCornerInfo, VectorCornerKind, type VectorCornerWidget, VectorDefaults, type VectorDistortMode, VectorDistribute, VectorDocument, type VectorDofReport, type VectorDofStatus, VectorEditorController, type VectorEditorOptions, type VectorEditorState, VectorEffect, VectorEffectParamSpec, VectorEffectParamsMap, VectorEffectType, type VectorEffectsPanelData, type VectorEffectsPanelItem, type VectorEnvelopePanelData, VectorEnvelopeParams, VectorExprEnv, VectorExprError, VectorFillRule, VectorFilter, VectorFilterParamSpec, VectorFilterType, type VectorFiltersPanelItem, VectorFrame, type VectorFrameGroup, type VectorFrameListing, type VectorFramePanel, VectorGradient, type VectorGradientAnnotator, type VectorGradientEditorData, VectorGradientHandle, VectorGradientInterpolation, type VectorGradientPart, VectorGradientPatch, VectorGradientSpread, VectorGradientStop, type VectorGradientTarget, VectorGradientType, VectorGroupNode, type VectorGuideKind, type VectorGuideLabel, type VectorGuideLine, VectorHandleRef, type VectorHitTestOptions, VectorHorizontalResizing, type VectorHover, type VectorInferOptions, type VectorInkShape, VectorInstanceNode, VectorInstanceOverrides, type VectorInteraction, type VectorKeyInput, VectorLineJoin, VectorMask, type VectorMaskClipShape, type VectorMaskGroup, type VectorMaskPanelData, type VectorMaskRegionShape, type VectorMaskRenderData, type VectorMaskResult, type VectorMaskSummary, VectorMaskType, VectorMatrix, VectorMergeMode, VectorModifiers, type VectorMorph, type VectorMorphContour, type VectorMorphCorrespondence, type VectorMorphOptions, VectorNode, type VectorNodeListing, type VectorOverlayRenderData, VectorPaint, VectorPaintDef, VectorPaintLayer, type VectorPaintLayerHit, type VectorPaintLayerNode, VectorParagraphStyle, VectorParameter, type VectorPathAction, type VectorPathEditOptions, type VectorPathEntry, type VectorPathKeyframe, type VectorPathMeasure, VectorPathNode, type VectorPathfinderAction, VectorPathfinderOperation, type VectorPathfinderPaint, type VectorPointMap, type VectorPointSnap, type VectorPointerInput, VectorRTree, type VectorRectSnap, type VectorRenderAnchor, type VectorRenderCornerWidget, VectorRenderFilter, type VectorRenderGradientAnnotator, type VectorRenderGroup, type VectorRenderGuideLabel, type VectorRenderGuideLine, type VectorRenderHandle, type VectorRenderMask, type VectorRenderNode, type VectorRenderPaintLayer, type VectorRenderPath, VectorRenderStrokeParts, type VectorRenderText, type VectorRenderTextSpan, type VectorRenderWidthPoint, type VectorRepeaterCopy, VectorResizing, type VectorResolvedRun, type VectorScaleSnap, type VectorSceneRenderData, VectorSegmentRef, type VectorSelectionBoxGeometry, type VectorSelectionFrame, type VectorSelectionStyle, type VectorShapeBuilderFace, type VectorShapeBuilderMap, type VectorShapeBuilderPlan, type VectorShapeBuilderResult, type VectorShapeInput, type VectorSnapGuides, type VectorSnapKind, type VectorSnapLeave, type VectorSnapOptions, VectorSnapTargets, type VectorSolveResult, VectorStrokeAlign, VectorStrokeGradientMode, VectorStrokeLayer, type VectorStrokeParts, VectorStrokeSettings, type VectorStrokeSpot, VectorStyle, VectorSubpath, VectorSvgExportOptions, VectorSymbol, type VectorSymbolsPanelData, type VectorSymbolsPanelItem, type VectorTaperOptions, VectorTextAlign, type VectorTextCaret, type VectorTextDefaults, type VectorTextEditState, VectorTextError, type VectorTextFragment, VectorTextFrame, type VectorTextGlyph, type VectorTextInput, type VectorTextLayout, VectorTextNode, type VectorTextPanelData, type VectorTextPaths, VectorTextRun, type VectorTextSpan, VectorTool, type VectorTrackingPath, type VectorTrackingPoint, VectorTransformHandle, VectorVerticalResizing, VectorViewport, VectorWarpMesh, type VectorWaveOptions, type VectorWidthHandle, VectorWidthPoint, type VectorWidthPointEdit, type VectorWidthPointRef, type VectorWidthPreset, type VectorWidthPresetInfo, addBuilderHit, addVectorConstraint, applyMatrix, applyMatrixLinear, applyVectorBlendOptions, applyVectorParagraphStyle, applyVectorTextStyle, arrowheadInset, arrowheadPath, arrowheadWeight, autoConstrainVector, bakeVectorTextGeometry, bendSegment, bezierToSubpaths, boundsFromPoints, boundsIntersect, checkVectorExpression, cloneAnchor, cloneSubpath, cloneVectorDocument, cloneVectorNode, collectPaintedNodes, collectPathNodes, composeVectorMatrices, constrainToLeave, convertAnchor, cornerBisectorPoint, cornerRadiusChange, cornerSetback, correspondMorphContours, createVectorCommands, createVectorMorph, curvatureMoveAnchor, cutSubpathAt, dashIntervals, decomposeRigid, distortVectorNode, effectPathLength, effectPathVertexCount, effectiveStrokeAlign, ellipseSubpath, eraseFromFill, eraseFromOutline, eraserRegion, evalVectorExpression, evaluateVectorPathKeyframes, expandVectorBlend, expandVectorCorners, expandVectorCornersOf, findVectorAnchorById, findVectorNode, fitCornerRadius, fitVectorTextRuns, formatVectorValue, generateVectorBlendChildren, generateWidthProfile, getAnchor, getAnchorWorld, getEditablePathIds, getTransformHandlePositions, getVectorAppearancePanel, getVectorBlendControls, getVectorConnectorPanel, getVectorConstraintPanel, getVectorCornerWidgets, getVectorEffectsPanel, getVectorEnteredGroups, getVectorEnvelopePanel, getVectorEnvelopeTarget, getVectorFramePanel, getVectorGradientAnnotator, getVectorGradientEditor, getVectorMaskPanel, getVectorOverlayRenderData, getVectorSceneRenderData, getVectorSelectionBoxGeometry, getVectorSelectionFrame, getVectorSelectionStyle, getVectorSymbolEditBackground, getVectorSymbolsPanel, getVectorTextPanel, getVectorTextShaper, getVectorWidthHandles, getVisibleAnchors, getVisibleHandles, glyphBox, hasPaint, hasStrokeExtras, hasVectorCorners, hasVectorPaintStacks, hitTestVectorNode, hitTestVectorNodes, hitTestVectorPaintLayer, hitTestVectorPaintStack, hitTestVectorStroke, hitVectorGradientAnnotator, inferAnchorType, inferVectorConstraints, insertAnchor, insertWidthPoint, interpolateMorphContours, interpolateRigidMatrix, interpolateVectorColor, interpolateVectorPaint, interpolateVectorPaths, interpolateVectorStyle, interpolateWidthProfiles, invertMatrix, isClosedBezierShape, isDrawnVectorPaintLayer, isIdentityMatrix, isPlainVectorPaintLayer, isUniformWidthProfile, isValidVectorParameterName, isVectorBlendGroup, isVectorBlendMode, isVectorConnector, isVectorFrame, isVectorMaskActive, isVectorMaskGroup, isVectorMaskType, isVectorTextTarget, joinSubpaths, knifePath, layoutVectorText, lineSubpath, locateVectorNode, mapBezierPath, mapVectorPoints, mapVectorSubpaths, matrixRotation, measureVectorConstraint, measureVectorPath, mergePaths, mirrorWidthProfile, morphContourToSubpath, morphPathsCross, moveAnchorHandle, multiplyMatrices, nearestSegment, nearestStrokePosition, nearestVectorConnectionSite, needsVectorPaintLayers, newVectorStrokeLayer, nextVectorConstraintName, nextVectorCornerKind, nodeMatrix, normalizeVectorPaintStacks, normalizeVectorTextRuns, offsetPaths, patchVectorCharacterStyle, patchVectorParagraphStyle, pathTextFrameFromBezier, pathsCenter, planShapeBuilder, polygonSubpath, polylineBounds, prefixVectorIds, pressureWidthProfile, puckerBloatPaths, purgeVectorConstraints, recognizeInkShape, rectSubpath, refineMorphContour, refreshVectorBlends, releaseVectorBlend, removeAnchorKeepingShape, removeAnchors, removeAnchorsKeepingShape, removeRedundantPoints, removeWidthPoints, repeatPaths, replaceVectorText, rerouteVectorConnectors, resampleGradientStops, resolveVectorBlendOptions, resolveVectorSymbols, reverseMorphContour, reverseSubpath, reverseWidthProfile, rotateMatrix, roundCornerPaths, roundSubpaths, routeVectorConnector, samplePolyline, sanitizeVectorConnector, sanitizeVectorFills, sanitizeVectorFrame, sanitizeVectorMask, sanitizeVectorResizing, sanitizeVectorStrokeSettings, sanitizeVectorStrokes, sanitizeVectorTextFields, sanitizeVectorTextFrame, sanitizeWidthProfile, scaleFor, scaleMatrix, scaleVectorStrokeWidths, setAnchorCorner, setSubpathCorners, setVectorTextShaper, setWidthPoint, simplifyPolyline, smoothSubpath, solveVectorConstraints, splitIntoFaces, splitSubpathAt, starSubpath, stripVectorSymbolArt, strokePositionPoint, strokeWidthProfileOf, styleVectorText, subpathEnclosesArea, subpathPointAt, subpathSegment, subpathSegmentCount, subpathToMorphContour, subpathsToBezier, taperWaveFactor, tintVectorNode, toVectorKeyInput, toVectorModifiers, toVectorPointerInput, transformVectorNode, translateAnchor, translateMatrix, trimIntervals, trimPaths, trimPathsIndividually, turnMorphContour, twistPaths, unionBounds, validateVectorConstraint, variableStrokeOutline, variableStrokeRings, vectorAngleDirection, vectorArtboards, vectorBlendColorDistance, vectorBlendKeyTargets, vectorBlendKeys, vectorBlendModeCss, vectorBlendModeFromCss, vectorBlendRail, vectorBlendRailAt, vectorBlendSpine, vectorBlendStepCount, vectorBoundsInside, vectorBoxCorners, vectorBuilderErasedEdges, vectorConnectionSites, vectorConnectorTargetAt, vectorConnectorWorldAnchors, vectorConstraintActions, vectorConstraintDof, vectorConstraintEnv, vectorConstraintGlyphs, vectorConstraintPanel, vectorConstraintResiduals, vectorConstraintValue, vectorCornerAt, vectorCorners, vectorDiamondPath, vectorDistortQuad, vectorExpressionNames, vectorFillMap, vectorFills, vectorFrameChildMatrix, vectorFrameContains, vectorFrameDocument, vectorFrameDrawn, vectorFrameRectPath, vectorGradientBarPosition, vectorGradientTargetPath, vectorInkShapeName, vectorInstanceGroup, vectorMaskContains, vectorMaskContentBounds, vectorMaskContents, vectorMaskOwner, vectorMaskRegion, vectorMaskRegionPath, vectorMaskRegionShapes, vectorMaskRenderData, vectorMaskSource, vectorMaskSummary, vectorMaskedGeometry, vectorMaskedLocalBounds, vectorMaskedShapes, vectorMeshFromOutline, vectorMeshOutline, vectorNodeBounds, vectorNodePaintBox, vectorNodeRotation, vectorNodeToBezier, vectorNodesNear, vectorPaintLayerNodes, vectorPaintSwatch, vectorPaintToHex, vectorParentMatrix, vectorPathAt, vectorPathCircle, vectorPathData, vectorPathEntries, vectorPathTextPositions, vectorPathWorldBezier, vectorPathfinderShape, vectorPolarAngles, vectorPolarIncrementOf, vectorRepeaterCopies, vectorResizeCursor, vectorResultStyle, vectorShapeBuilderHit, vectorShapeBuilderMap, vectorShearForSide, vectorSkewMatrix, vectorSpatialIndex, vectorStacksHaveGradient, vectorStrokeGradientDefs, vectorStrokeLineArea, vectorStrokeOutline, vectorStrokeOutlinePath, vectorStrokeParts, vectorStrokeReach, vectorStrokeSettings, vectorStrokeStackReach, vectorStrokeWidthGeometry, vectorStrokes, vectorSymbolUses, vectorSymbolsUsedIn, vectorTargetPaint, vectorTextBoxOutline, vectorTextCaret, vectorTextFamilies, vectorTextGeometryNode, vectorTextHasOutlines, vectorTextIndexAt, vectorTextName, vectorTextPaintSource, vectorTextPaths, vectorTextRange, vectorTextRuns, vectorTextSelectionQuads, vectorTextShaperGeneration, vectorTextSpanSvg, vectorTextSpans, vectorTextStyleAt, vectorToolLabel, vectorTrackingPaths, vectorWorldMatrix, walkVectorNodes, widthProfileAt, widthProfileMaxScale, widthProfilePreset, widthProfilePresetId, wigglePaths, withVectorAnchorIds, withVectorDocumentAnchorIds, withVectorFills, withVectorStrokes, withVectorTargetPaint, zigzagPaths };
|