@svgsketch/core 2.0.0 → 2.1.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/dist/index.d.mts +315 -38
- package/dist/index.d.ts +315 -38
- package/dist/index.js +16 -16
- package/dist/index.mjs +16 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -604,9 +604,10 @@ declare enum PathPointType {
|
|
|
604
604
|
* History: this union previously existed twice — a strong form in the
|
|
605
605
|
* editor's `connection-manager.ts` and a `Record<string, unknown>`-typed
|
|
606
606
|
* mirror in the worker's `collab/types.ts`. Both now alias this one.
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
607
|
+
* `@svgsketch/shared` also carried generic versions of the `*Operation`
|
|
608
|
+
* sub-unions; they had drifted (no `animationKeyframe:*`, no
|
|
609
|
+
* guide/measurement `:move`) because nothing imported the drifted
|
|
610
|
+
* members, and they are deleted — this file is the only declaration.
|
|
610
611
|
*
|
|
611
612
|
* **Extra-quarantine contract (schema v5):** op state is always FLAT.
|
|
612
613
|
* `shape:add` / `shape:update` payloads carry unknown keys at the top
|
|
@@ -624,6 +625,29 @@ interface CollabClock {
|
|
|
624
625
|
updatedAt?: number;
|
|
625
626
|
clientId?: string;
|
|
626
627
|
}
|
|
628
|
+
/** A resolved last-writer-wins clock stored beside collaborative state. */
|
|
629
|
+
interface CollaborationStamp {
|
|
630
|
+
updatedAt: number;
|
|
631
|
+
clientId: string;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Operational conflict metadata for a collaborative document.
|
|
635
|
+
*
|
|
636
|
+
* This is deliberately separate from authored `HistorySnapshot` state.
|
|
637
|
+
* It travels with and is persisted beside the room snapshot so a restart
|
|
638
|
+
* cannot forget which write won, but document serializers do not write it
|
|
639
|
+
* into `.svgs` files.
|
|
640
|
+
*/
|
|
641
|
+
interface CollaborationState {
|
|
642
|
+
/** Per-shape, per-property clocks, including tombstones for removed props. */
|
|
643
|
+
shapeProps?: Record<string, Record<string, CollaborationStamp>>;
|
|
644
|
+
/** Clocks for id-keyed document resources and whole-value deltas. */
|
|
645
|
+
resources?: Record<string, CollaborationStamp>;
|
|
646
|
+
}
|
|
647
|
+
/** The collaboration wire/storage snapshot: authored state plus CRDT metadata. */
|
|
648
|
+
interface CollaborationSnapshot extends HistorySnapshot {
|
|
649
|
+
collaborationState?: CollaborationState;
|
|
650
|
+
}
|
|
627
651
|
/**
|
|
628
652
|
* The shape state a `shape:update` carries.
|
|
629
653
|
*
|
|
@@ -777,6 +801,44 @@ type MetadataDeltaOperation = {
|
|
|
777
801
|
patch: OpMetadataPatch;
|
|
778
802
|
removeKeys?: string[];
|
|
779
803
|
} & CollabClock;
|
|
804
|
+
/**
|
|
805
|
+
* Template variables (protocol v6).
|
|
806
|
+
*
|
|
807
|
+
* Keyed by `name`, not `id`: the name IS the CSS custom property
|
|
808
|
+
* (`--name`) and the `{{name}}` substitution token, so a synthetic id
|
|
809
|
+
* would be a second identity for one thing. `upsertResourceByName` /
|
|
810
|
+
* `removeResourceByName` in `model/resource-delta.ts` address that key.
|
|
811
|
+
*
|
|
812
|
+
* These carry a `TemplateVariable` verbatim rather than a patch: the
|
|
813
|
+
* record is four small fields and a whole-value upsert is what makes two
|
|
814
|
+
* clients editing DIFFERENT variables both survive.
|
|
815
|
+
*/
|
|
816
|
+
type TemplateVariableOperation = ({
|
|
817
|
+
type: 'templateVariables:set';
|
|
818
|
+
templateVariables: NonNullable<HistorySnapshot['templateVariables']>;
|
|
819
|
+
} & CollabClock) | ({
|
|
820
|
+
type: 'templateVariable:upsert';
|
|
821
|
+
templateVariable: TemplateVariable;
|
|
822
|
+
index?: number;
|
|
823
|
+
} & CollabClock) | ({
|
|
824
|
+
type: 'templateVariable:remove';
|
|
825
|
+
name: string;
|
|
826
|
+
} & CollabClock);
|
|
827
|
+
/**
|
|
828
|
+
* Export profile items (protocol v6). Id-keyed like every other document
|
|
829
|
+
* collection.
|
|
830
|
+
*/
|
|
831
|
+
type ExportItemOperation = ({
|
|
832
|
+
type: 'exportItems:set';
|
|
833
|
+
exportItems: NonNullable<HistorySnapshot['exportItems']>;
|
|
834
|
+
} & CollabClock) | ({
|
|
835
|
+
type: 'exportItem:upsert';
|
|
836
|
+
exportItem: SerializedExportItem;
|
|
837
|
+
index?: number;
|
|
838
|
+
} & CollabClock) | ({
|
|
839
|
+
type: 'exportItem:remove';
|
|
840
|
+
id: string;
|
|
841
|
+
} & CollabClock);
|
|
780
842
|
type ClipMaskOperation = ({
|
|
781
843
|
type: 'clipMask:upsert';
|
|
782
844
|
clipMaskGroup: SerializedClipMaskGroup;
|
|
@@ -908,7 +970,18 @@ type Operation = {
|
|
|
908
970
|
} | {
|
|
909
971
|
type: 'documentStyles:set';
|
|
910
972
|
documentStyles: NonNullable<HistorySnapshot['documentStyles']>;
|
|
911
|
-
} |
|
|
973
|
+
} | TemplateVariableOperation | ExportItemOperation
|
|
974
|
+
/**
|
|
975
|
+
* Authored color glyphs (protocol v6). Whole-value, unlike the two
|
|
976
|
+
* collections above: the library is a VERSIONED envelope
|
|
977
|
+
* (`{ version: 1, entries }`), so a granular entry op would have to
|
|
978
|
+
* carry the envelope version too and could interleave entries from two
|
|
979
|
+
* versions into one library. `null` clears it.
|
|
980
|
+
*/
|
|
981
|
+
| ({
|
|
982
|
+
type: 'colorGlyphLibrary:set';
|
|
983
|
+
colorGlyphLibrary: HistorySnapshot['colorGlyphLibrary'] | null;
|
|
984
|
+
} & CollabClock) | {
|
|
912
985
|
type: 'animation:set';
|
|
913
986
|
animationTimeline: HistorySnapshot['animationTimeline'];
|
|
914
987
|
} | AnimationOperation
|
|
@@ -1135,8 +1208,19 @@ interface RichTextLineSpan {
|
|
|
1135
1208
|
start: number;
|
|
1136
1209
|
end: number;
|
|
1137
1210
|
}
|
|
1138
|
-
/**
|
|
1139
|
-
*
|
|
1211
|
+
/**
|
|
1212
|
+
* The style every rich-text document starts from, and the source of
|
|
1213
|
+
* `RICH_TEXT_STYLE_KEYS`.
|
|
1214
|
+
*
|
|
1215
|
+
* FROZEN, nested objects included. This object is the single default for
|
|
1216
|
+
* every replica: core resolves against it, and the editor's
|
|
1217
|
+
* `DEFAULT_TEXT_STYLE` (apps/editor/src/typography/text-style.ts) IS this
|
|
1218
|
+
* object rather than a second copy of it, so a mutation here would reach
|
|
1219
|
+
* every consumer at once. Callers spread it (`createDefaultTextStyle`
|
|
1220
|
+
* deep-copies `textDecoration` for exactly this reason); nothing writes
|
|
1221
|
+
* through it, and the freeze makes that a guarantee rather than a
|
|
1222
|
+
* convention.
|
|
1223
|
+
*/
|
|
1140
1224
|
declare const DEFAULT_RICH_TEXT_STYLE: RichTextResolvedStyle;
|
|
1141
1225
|
/** Every field of a resolved rich-text style, in declaration order. */
|
|
1142
1226
|
declare const RICH_TEXT_STYLE_KEYS: readonly (keyof RichTextResolvedStyle)[];
|
|
@@ -1147,14 +1231,19 @@ declare const RICH_TEXT_STYLE_KEYS: readonly (keyof RichTextResolvedStyle)[];
|
|
|
1147
1231
|
*/
|
|
1148
1232
|
declare function mergeRichTextStyle(base: RichTextResolvedStyle, delta: RichTextStyleDelta): RichTextResolvedStyle;
|
|
1149
1233
|
/**
|
|
1150
|
-
* FIELD-COMPLETE style equality.
|
|
1234
|
+
* FIELD-COMPLETE style equality — the ONE implementation.
|
|
1235
|
+
*
|
|
1236
|
+
* Iterates `RICH_TEXT_STYLE_KEYS` rather than listing fields, so a field
|
|
1237
|
+
* added to `RichTextResolvedStyle` is compared without anyone remembering
|
|
1238
|
+
* to update this function. The editor's `areTextStylesEqual`
|
|
1239
|
+
* (apps/editor/src/typography/text-style.ts) is a re-export of this.
|
|
1151
1240
|
*
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
*
|
|
1157
|
-
*
|
|
1241
|
+
* It used to be a separate hand-written chain of `===` comparisons that
|
|
1242
|
+
* omitted `writingMode` and `fontVariationSettings`, so two styles
|
|
1243
|
+
* differing only in those compared EQUAL. That silently merged adjacent
|
|
1244
|
+
* layout segments and made an imported `<tspan>` override look like no
|
|
1245
|
+
* override at all. Comparing every field is required: a run whose only
|
|
1246
|
+
* override is a variation axis must survive derivation.
|
|
1158
1247
|
*/
|
|
1159
1248
|
declare function richTextStylesEqual(a: RichTextResolvedStyle, b: RichTextResolvedStyle): boolean;
|
|
1160
1249
|
/** Structural equality of two style deltas (same declared fields, same
|
|
@@ -2695,6 +2784,13 @@ interface CommonNodeProps extends CommonTransformNodeProps {
|
|
|
2695
2784
|
requiredExtensions?: string;
|
|
2696
2785
|
/** Passthrough inline CSS declarations the editor doesn't model. */
|
|
2697
2786
|
inlineStyle?: Record<string, string>;
|
|
2787
|
+
/**
|
|
2788
|
+
* XML attributes authored through the inspector that have no typed model
|
|
2789
|
+
* property. String values project the attribute verbatim; `null` is a
|
|
2790
|
+
* model-backed removal tombstone for attributes present at an ingest
|
|
2791
|
+
* boundary but not otherwise represented by the editor.
|
|
2792
|
+
*/
|
|
2793
|
+
authoredAttributes?: Record<string, string | null>;
|
|
2698
2794
|
/** Template-variable bindings: property name → variable name. */
|
|
2699
2795
|
bindings?: Record<string, string>;
|
|
2700
2796
|
/** Shape-scoped `<script>` elements (SVG 2 §15.9). Stored inert. */
|
|
@@ -3339,7 +3435,7 @@ interface SerializedShape {
|
|
|
3339
3435
|
type: string;
|
|
3340
3436
|
state: SerializedShapeState;
|
|
3341
3437
|
}
|
|
3342
|
-
declare const SERIALIZED_SHAPE_STATE_KEYS: readonly ["transformMatrix", "scaleX", "scaleY", "translateX", "translateY", "rotation", "skewX", "skewY", "customPivot", "rawTransform", "ancestorTransform", "layerName", "fillColor", "borderColor", "borderWidth", "opacity", "fillOpacity", "strokeOpacity", "locked", "visible", "fillType", "fillGradient", "strokeType", "strokeGradient", "fillRule", "strokeLinejoin", "strokeLinecap", "strokeMiterlimit", "lineStyle", "dashLength", "gapLength", "dashOffset", "strokeDasharray", "colorInterpolation", "filters", "filterColorInterpolation", "filterUnits", "primitiveUnits", "filterX", "filterY", "filterWidth", "filterHeight", "metadata", "cssClipPath", "cssMaskProperties", "groupId", "structural", "displayMode", "display", "visibility", "inheritFill", "inheritStroke", "preserveFillOpacity", "preserveStrokeOpacity", "fillLibraryId", "strokeLibraryId", "filterLibraryIds", "fillRuleExplicit", "paintOrder", "vectorEffect", "transformBox", "pathLength", "markerStart", "markerMid", "markerEnd", "blendMode", "shapeRendering", "textRendering", "imageRendering", "colorRendering", "systemLanguage", "requiredExtensions", "inlineStyle", "bindings", "scripts", "lastSolidFillColor", "lastSolidStrokeColor", "connectionPoints", "isRootSvg", "x", "y", "width", "height", "rx", "ry", "cornerRadius", "cornerShape", "cornerMode", "cornerRadiusTL", "cornerRadiusTR", "cornerRadiusBL", "cornerRadiusBR", "cornerShapeTL", "cornerShapeTR", "cornerShapeBL", "cornerShapeBR", "size", "radius", "cx", "cy", "shiftAngle", "x1", "y1", "x2", "y2", "startEndpoint", "endEndpoint", "routingMode", "sourceRef", "targetRef", "sourcePoint", "targetPoint", "waypoints", "label", "labelPosition", "labelOffset", "mermaidEdgeStyle", "textX", "textY", "fontSize", "text", "fontFamily", "fontWeight", "fontStyle", "fontVariant", "fontVariantLigatures", "fontVariantPosition", "fontVariantCaps", "fontVariantNumeric", "fontVariantEastAsian", "textDecoration", "textTransform", "baselineShift", "dominantBaseline", "writingMode", "textAnchor", "letterSpacing", "wordSpacing", "lineHeight", "inlineSize", "overflowWrap", "whiteSpace", "textDirection", "unicodeBidi", "useRichText", "richTextRuns", "richTextData", "charOffsets", "fontVariationSettings", "linePositions", "textLength", "lengthAdjust", "shapeInsideRef", "shapePadding", "isTextPath", "textPathPoints", "textPathStartOffset", "textPathStartOffsetUnit", "textPathSide", "textPathMethod", "textPathSpacing", "textPathLengthAdjust", "textPathLength", "textPathLengthUnit", "textPathPathLength", "textPathCurveType", "textPathInlineFormat", "textPathRefShapeId", "textPathImportRefId", "href", "originalWidth", "originalHeight", "preserveAspectRatio", "specPreserveAspectRatio", "imageOpacity", "pathPoints", "pathArcParams", "pathControlBounds", "pathCurveType", "pathClosed", "pathTension", "polylinePoints", "polylineClosed", "sides", "arms", "innerRadiusPercent", "armWidthPercent", "turns", "thicknessPercent", "spiralDirection", "teeth", "toothDepthPercent", "holeRadiusPercent", "headWidthPercent", "headLengthPercent", "shaftWidthPercent", "tailAngleDeg", "tailLengthPercent", "tailWidthPercent", "lobeRadiusPercent", "cleftDepthPercent", "boltSegments", "boltJaggednessPercent", "boltWidthPercent", "cloudBumps", "cloudPuffinessPercent", "slantPercent", "topWidthPercent", "capHeightPercent", "waveAmplitudePercent", "symbolId", "symbolOverrides", "variantKey", "instancePresentation", "scaleContentToViewport", "groupData", "mediaKind", "mediaMimeType", "naturalDuration", "begin", "trimStart", "trimEnd", "volume", "muted", "loop", "playbackRate", "mediaOpacity", "fadeInDuration", "fadeOutDuration", "posterHref", "sourceRect", "hrefXlink", "linkTarget", "linkRel", "linkDownload", "linkPing", "linkHreflang", "linkType", "linkReferrerPolicy", "targetShapeId", "offsetX", "offsetY", "targetWidth", "targetHeight", "broken", "switchSystemLanguage", "switchRequiredExtensions", "svgX", "svgY", "svgWidth", "svgHeight", "svgViewBoxX", "svgViewBoxY", "svgViewBoxWidth", "svgViewBoxHeight", "svgPreserveAspectRatio", "viewBoxX", "viewBoxY", "viewBoxWidth", "viewBoxHeight", "viewName", "viewPreserveAspectRatio", "viewZoomAndPan", "viewTarget", "isHomeView", "children", "viewLinkedSvgId"];
|
|
3438
|
+
declare const SERIALIZED_SHAPE_STATE_KEYS: readonly ["transformMatrix", "scaleX", "scaleY", "translateX", "translateY", "rotation", "skewX", "skewY", "customPivot", "rawTransform", "ancestorTransform", "layerName", "fillColor", "borderColor", "borderWidth", "opacity", "fillOpacity", "strokeOpacity", "locked", "visible", "fillType", "fillGradient", "strokeType", "strokeGradient", "fillRule", "strokeLinejoin", "strokeLinecap", "strokeMiterlimit", "lineStyle", "dashLength", "gapLength", "dashOffset", "strokeDasharray", "colorInterpolation", "filters", "filterColorInterpolation", "filterUnits", "primitiveUnits", "filterX", "filterY", "filterWidth", "filterHeight", "metadata", "cssClipPath", "cssMaskProperties", "groupId", "structural", "displayMode", "display", "visibility", "inheritFill", "inheritStroke", "preserveFillOpacity", "preserveStrokeOpacity", "fillLibraryId", "strokeLibraryId", "filterLibraryIds", "fillRuleExplicit", "paintOrder", "vectorEffect", "transformBox", "pathLength", "markerStart", "markerMid", "markerEnd", "blendMode", "shapeRendering", "textRendering", "imageRendering", "colorRendering", "systemLanguage", "requiredExtensions", "inlineStyle", "authoredAttributes", "bindings", "scripts", "lastSolidFillColor", "lastSolidStrokeColor", "connectionPoints", "isRootSvg", "x", "y", "width", "height", "rx", "ry", "cornerRadius", "cornerShape", "cornerMode", "cornerRadiusTL", "cornerRadiusTR", "cornerRadiusBL", "cornerRadiusBR", "cornerShapeTL", "cornerShapeTR", "cornerShapeBL", "cornerShapeBR", "size", "radius", "cx", "cy", "shiftAngle", "x1", "y1", "x2", "y2", "startEndpoint", "endEndpoint", "routingMode", "sourceRef", "targetRef", "sourcePoint", "targetPoint", "waypoints", "label", "labelPosition", "labelOffset", "mermaidEdgeStyle", "textX", "textY", "fontSize", "text", "fontFamily", "fontWeight", "fontStyle", "fontVariant", "fontVariantLigatures", "fontVariantPosition", "fontVariantCaps", "fontVariantNumeric", "fontVariantEastAsian", "textDecoration", "textTransform", "baselineShift", "dominantBaseline", "writingMode", "textAnchor", "letterSpacing", "wordSpacing", "lineHeight", "inlineSize", "overflowWrap", "whiteSpace", "textDirection", "unicodeBidi", "useRichText", "richTextRuns", "richTextData", "charOffsets", "fontVariationSettings", "linePositions", "textLength", "lengthAdjust", "shapeInsideRef", "shapePadding", "isTextPath", "textPathPoints", "textPathStartOffset", "textPathStartOffsetUnit", "textPathSide", "textPathMethod", "textPathSpacing", "textPathLengthAdjust", "textPathLength", "textPathLengthUnit", "textPathPathLength", "textPathCurveType", "textPathInlineFormat", "textPathRefShapeId", "textPathImportRefId", "href", "originalWidth", "originalHeight", "preserveAspectRatio", "specPreserveAspectRatio", "imageOpacity", "pathPoints", "pathArcParams", "pathControlBounds", "pathCurveType", "pathClosed", "pathTension", "polylinePoints", "polylineClosed", "sides", "arms", "innerRadiusPercent", "armWidthPercent", "turns", "thicknessPercent", "spiralDirection", "teeth", "toothDepthPercent", "holeRadiusPercent", "headWidthPercent", "headLengthPercent", "shaftWidthPercent", "tailAngleDeg", "tailLengthPercent", "tailWidthPercent", "lobeRadiusPercent", "cleftDepthPercent", "boltSegments", "boltJaggednessPercent", "boltWidthPercent", "cloudBumps", "cloudPuffinessPercent", "slantPercent", "topWidthPercent", "capHeightPercent", "waveAmplitudePercent", "symbolId", "symbolOverrides", "variantKey", "instancePresentation", "scaleContentToViewport", "groupData", "mediaKind", "mediaMimeType", "naturalDuration", "begin", "trimStart", "trimEnd", "volume", "muted", "loop", "playbackRate", "mediaOpacity", "fadeInDuration", "fadeOutDuration", "posterHref", "sourceRect", "hrefXlink", "linkTarget", "linkRel", "linkDownload", "linkPing", "linkHreflang", "linkType", "linkReferrerPolicy", "targetShapeId", "offsetX", "offsetY", "targetWidth", "targetHeight", "broken", "switchSystemLanguage", "switchRequiredExtensions", "svgX", "svgY", "svgWidth", "svgHeight", "svgViewBoxX", "svgViewBoxY", "svgViewBoxWidth", "svgViewBoxHeight", "svgPreserveAspectRatio", "viewBoxX", "viewBoxY", "viewBoxWidth", "viewBoxHeight", "viewName", "viewPreserveAspectRatio", "viewZoomAndPan", "viewTarget", "isHomeView", "children", "viewLinkedSvgId"];
|
|
3343
3439
|
type SerializedStateKeyListEntry = (typeof SERIALIZED_SHAPE_STATE_KEYS)[number];
|
|
3344
3440
|
type SerializedStateKey = Exclude<keyof SerializedShapeState, 'extra'>;
|
|
3345
3441
|
type StateKeyGate<T extends never> = T;
|
|
@@ -4034,7 +4130,11 @@ declare class SceneNode<P = Record<string, unknown>> {
|
|
|
4034
4130
|
* see the animated world, while `_props` always holds base values.
|
|
4035
4131
|
*/
|
|
4036
4132
|
private _overlay;
|
|
4037
|
-
/**
|
|
4133
|
+
/**
|
|
4134
|
+
* Optional ephemeral stamps for low-level consumers.
|
|
4135
|
+
* SVGSketch collaboration arbitration is owned by the persisted
|
|
4136
|
+
* `CollaborationSnapshot.collaborationState`, not this node-local map.
|
|
4137
|
+
*/
|
|
4038
4138
|
private _propTimestamps;
|
|
4039
4139
|
/**
|
|
4040
4140
|
* Raw constructor — stores `initialProps` exactly as given (no schema
|
|
@@ -4055,6 +4155,8 @@ declare class SceneNode<P = Record<string, unknown>> {
|
|
|
4055
4155
|
getBaseProp<T = unknown>(key: string): T;
|
|
4056
4156
|
/** Untyped property write — for use when the node's type parameter is unknown. */
|
|
4057
4157
|
setProp(key: string, value: unknown): void;
|
|
4158
|
+
/** Remove an untyped property while preserving write/dirty notifications. */
|
|
4159
|
+
deleteProp(key: string): void;
|
|
4058
4160
|
setMany(props: Partial<P>): void;
|
|
4059
4161
|
/**
|
|
4060
4162
|
* Write an animated overlay value for a prop. Purely ephemeral: no
|
|
@@ -4090,13 +4192,15 @@ declare class SceneNode<P = Record<string, unknown>> {
|
|
|
4090
4192
|
/** Get timestamps for specific keys (for inclusion in outgoing ops). */
|
|
4091
4193
|
getPropStampsForKeys(keys: string[]): Record<string, number>;
|
|
4092
4194
|
/**
|
|
4093
|
-
*
|
|
4094
|
-
*
|
|
4195
|
+
* Low-level helper that sets a property only if a supplied timestamp
|
|
4196
|
+
* wins over this node's optional ephemeral stamp.
|
|
4095
4197
|
*
|
|
4096
4198
|
* Comparison: higher timestamp wins. Equal timestamps: higher
|
|
4097
4199
|
* clientId wins (deterministic tie-breaking).
|
|
4098
4200
|
*
|
|
4099
4201
|
* @returns true if the remote value was accepted, false if rejected.
|
|
4202
|
+
* @deprecated Replica arbitration belongs in `applyOpToSnapshot` so it
|
|
4203
|
+
* survives serialization and is identical on every replica.
|
|
4100
4204
|
*/
|
|
4101
4205
|
setPropIfWins(key: string, value: unknown, remoteTs: number, remoteClientId: string): boolean;
|
|
4102
4206
|
/** Snapshot all property timestamps (for undo capture). */
|
|
@@ -4365,8 +4469,8 @@ declare class SceneGraph {
|
|
|
4365
4469
|
dispose(): void;
|
|
4366
4470
|
/**
|
|
4367
4471
|
* Inject a property-change notification for keys written WITHOUT
|
|
4368
|
-
* firing `onChange` (
|
|
4369
|
-
*
|
|
4472
|
+
* firing `onChange` (for example, low-level bulk import code).
|
|
4473
|
+
* Batch-aware: defers during an open
|
|
4370
4474
|
* batch, fires listeners immediately otherwise — either way the
|
|
4371
4475
|
* change flows through the same listener pipeline as local writes.
|
|
4372
4476
|
*/
|
|
@@ -4525,6 +4629,46 @@ declare function flattenShapeStateTree(shape: SerializedShape): SerializedShape;
|
|
|
4525
4629
|
*/
|
|
4526
4630
|
declare function flattenStateExtra(state: Record<string, unknown>): Record<string, unknown>;
|
|
4527
4631
|
|
|
4632
|
+
/**
|
|
4633
|
+
* Runtime validation for the collaboration operation protocol.
|
|
4634
|
+
*
|
|
4635
|
+
* `Operation` is the compile-time authority and this module is its runtime
|
|
4636
|
+
* boundary companion. The validator map is compile-gated against every
|
|
4637
|
+
* discriminant in the union, so adding an operation without defining its
|
|
4638
|
+
* wire requirements is a type error.
|
|
4639
|
+
*/
|
|
4640
|
+
|
|
4641
|
+
interface OperationValidationIssue {
|
|
4642
|
+
path: string;
|
|
4643
|
+
message: string;
|
|
4644
|
+
}
|
|
4645
|
+
type OperationValidationResult<T> = {
|
|
4646
|
+
valid: true;
|
|
4647
|
+
value: T;
|
|
4648
|
+
} | {
|
|
4649
|
+
valid: false;
|
|
4650
|
+
issues: OperationValidationIssue[];
|
|
4651
|
+
};
|
|
4652
|
+
declare function validateOperation(value: unknown, path?: string): OperationValidationResult<Operation>;
|
|
4653
|
+
declare function validateDocumentOperations(value: unknown, options?: {
|
|
4654
|
+
minItems?: number;
|
|
4655
|
+
maxItems?: number;
|
|
4656
|
+
}): OperationValidationResult<Operation[]>;
|
|
4657
|
+
declare function validatePresenceOperation(value: unknown): OperationValidationResult<Extract<Operation, {
|
|
4658
|
+
type: `presence:${string}`;
|
|
4659
|
+
}>>;
|
|
4660
|
+
declare function formatOperationValidationIssues(issues: readonly OperationValidationIssue[]): string;
|
|
4661
|
+
|
|
4662
|
+
type SceneTreeEntry$1 = NonNullable<HistorySnapshot['sceneTree']>[number];
|
|
4663
|
+
/**
|
|
4664
|
+
* Resolve the canonical order of one scene-tree sibling set.
|
|
4665
|
+
*
|
|
4666
|
+
* All-unkeyed parents use integer indexes. Once any sibling carries a
|
|
4667
|
+
* fractional key, unkeyed siblings receive deterministic effective keys and
|
|
4668
|
+
* the stable `(orderKey, id)` order becomes authoritative.
|
|
4669
|
+
*/
|
|
4670
|
+
declare function orderSiblings(siblings: SceneTreeEntry$1[]): SceneTreeEntry$1[];
|
|
4671
|
+
|
|
4528
4672
|
/**
|
|
4529
4673
|
* Pure reducer applying collab `Operation`s to a `HistorySnapshot`.
|
|
4530
4674
|
*
|
|
@@ -4548,22 +4692,13 @@ declare function flattenStateExtra(state: Record<string, unknown>): Record<strin
|
|
|
4548
4692
|
* persisted blob was stale.
|
|
4549
4693
|
*
|
|
4550
4694
|
* `applyOpToSnapshot` mutates the passed snapshot in place (same
|
|
4551
|
-
* contract as the original private method in `DocumentRoom`)
|
|
4552
|
-
*
|
|
4695
|
+
* contract as the original private method in `DocumentRoom`) and returns
|
|
4696
|
+
* the accepted operation, or `null` when its collaboration clock lost.
|
|
4697
|
+
* Clock filtering therefore happens at the same commit point as the
|
|
4698
|
+
* authored-state mutation and can be shared by server and live clients.
|
|
4553
4699
|
*/
|
|
4554
4700
|
|
|
4555
4701
|
type SceneTreeEntry = NonNullable<HistorySnapshot['sceneTree']>[number];
|
|
4556
|
-
/**
|
|
4557
|
-
* Sibling order for one parent. All-unkeyed parents keep integer-index
|
|
4558
|
-
* order (v2 behavior, byte-identical). Once ANY sibling carries a
|
|
4559
|
-
* fractional `orderKey`, the parent switches to effective-(key, id)
|
|
4560
|
-
* ordering: unkeyed siblings are assigned deterministic canonical-append
|
|
4561
|
-
* keys by their current index position (a placement FREEZES real keys
|
|
4562
|
-
* onto its siblings first — see freezeSiblingOrderKeys — so this
|
|
4563
|
-
* position-derived fallback only covers entries later re-unkeyed by a v2
|
|
4564
|
-
* `scene:move`).
|
|
4565
|
-
*/
|
|
4566
|
-
declare function orderSiblings(siblings: SceneTreeEntry[]): SceneTreeEntry[];
|
|
4567
4702
|
/**
|
|
4568
4703
|
* Materialize fractional keys onto every unkeyed sibling of `parentId`,
|
|
4569
4704
|
* preserving the current visual order (runs of unkeyed entries get
|
|
@@ -4618,9 +4753,8 @@ declare function removeTrackKeyframe(track: SerializedAnimationTrack, keyframeId
|
|
|
4618
4753
|
* serializer writes them too;
|
|
4619
4754
|
* - a shape the scene tree never mentions, or one the walk cannot reach,
|
|
4620
4755
|
* keeps its current inline placement, appended after the placed
|
|
4621
|
-
* siblings.
|
|
4622
|
-
*
|
|
4623
|
-
* subtree;
|
|
4756
|
+
* siblings. This preserves incomplete snapshots from older or drifted
|
|
4757
|
+
* writers without letting them override placements the tree does carry;
|
|
4624
4758
|
* - the walk does not descend past a shape whose type is not a known
|
|
4625
4759
|
* container, so its scene descendants fall to that keep-what-you-have
|
|
4626
4760
|
* rule. A replica running older code than the client that authored the
|
|
@@ -4668,13 +4802,17 @@ declare function projectSceneTreeOntoClipMaskGroups(snapshot: HistorySnapshot):
|
|
|
4668
4802
|
* before the reducer folds an incoming op in.
|
|
4669
4803
|
*/
|
|
4670
4804
|
declare function findShapeById(shapes: SerializedShape[], id: string): SerializedShape | null;
|
|
4671
|
-
declare function applyOpToSnapshot(snapshot: HistorySnapshot,
|
|
4805
|
+
declare function applyOpToSnapshot(snapshot: HistorySnapshot, incomingOp: Operation): Operation | null;
|
|
4672
4806
|
/**
|
|
4673
4807
|
* Fold `ops` into a deep clone of `snapshot` and return it — the
|
|
4674
4808
|
* receiving-side contract of the editor's collab manager (the original
|
|
4675
4809
|
* is never mutated). Semantically `ops.reduce(applyOpToSnapshot, clone)`.
|
|
4676
4810
|
*/
|
|
4677
|
-
declare function
|
|
4811
|
+
declare function applyOpsToSnapshotWithAccepted(snapshot: HistorySnapshot, ops: readonly Operation[]): {
|
|
4812
|
+
snapshot: CollaborationSnapshot;
|
|
4813
|
+
acceptedOps: Operation[];
|
|
4814
|
+
};
|
|
4815
|
+
declare function applyOpsToSnapshot(snapshot: HistorySnapshot, ops: readonly Operation[]): CollaborationSnapshot;
|
|
4678
4816
|
/**
|
|
4679
4817
|
* Materialize fractional keys onto every unkeyed sceneTree entry,
|
|
4680
4818
|
* preserving the current order (per-parent freeze). Runs once at room
|
|
@@ -4743,6 +4881,104 @@ declare function downTranslateTextFormatOps(ops: Operation[], shapes: Serialized
|
|
|
4743
4881
|
* unchanged (same reference) when nothing needs translation.
|
|
4744
4882
|
*/
|
|
4745
4883
|
declare function downTranslateCollectionMoveOps(ops: Operation[], collections: Pick<HistorySnapshot, 'guides' | 'measurements'>): Operation[];
|
|
4884
|
+
/**
|
|
4885
|
+
* The current op-vocabulary version — ONE declaration, shared by both
|
|
4886
|
+
* ends of the wire.
|
|
4887
|
+
*
|
|
4888
|
+
* The editor's `COLLAB_PROTOCOL_VERSION` and the DocumentRoom's
|
|
4889
|
+
* `CURRENT_PROTOCOL_VERSION` used to be independent literals, each with
|
|
4890
|
+
* its own copy of the version history, kept in step by a source-text
|
|
4891
|
+
* regex in a worker test. The justification was that the worker cannot
|
|
4892
|
+
* import the editor, which is true and beside the point: both already
|
|
4893
|
+
* depend on this package, which owns the `Operation` union and the
|
|
4894
|
+
* per-version down-translators the number selects between. It belongs
|
|
4895
|
+
* here, next to the vocabulary it versions.
|
|
4896
|
+
*
|
|
4897
|
+
* The prose had already drifted where the digits had not — the worker's
|
|
4898
|
+
* copy stopped describing at v5 and never mentioned v6.
|
|
4899
|
+
*
|
|
4900
|
+
* Bump when the vocabulary gains op types older clients cannot apply,
|
|
4901
|
+
* and add the matching down-translation guard in the DocumentRoom.
|
|
4902
|
+
*/
|
|
4903
|
+
declare const COLLAB_PROTOCOL_VERSION = 6;
|
|
4904
|
+
/**
|
|
4905
|
+
* Drop the protocol-v6 document-field ops for pv<6 sessions.
|
|
4906
|
+
*
|
|
4907
|
+
* Unlike the other down-translators there is nothing to translate INTO: a
|
|
4908
|
+
* pre-v6 client has no representation for these facts at all, so the
|
|
4909
|
+
* honest degradation is for it to keep what it has and pick the field up
|
|
4910
|
+
* on its next full snapshot. Dropping is inert; the alternative - letting
|
|
4911
|
+
* an unknown op reach an old client - is also inert (both the reducer's
|
|
4912
|
+
* switch and the editor's live handler ignore unknown types), so this
|
|
4913
|
+
* exists to make the boundary explicit rather than incidental, and to
|
|
4914
|
+
* keep the broadcast payload for old sessions free of ops they cannot
|
|
4915
|
+
* act on.
|
|
4916
|
+
*
|
|
4917
|
+
* Pure; returns `ops` unchanged (same reference) when nothing needs
|
|
4918
|
+
* translation - callers rely on that to skip re-serialization.
|
|
4919
|
+
*/
|
|
4920
|
+
declare function downTranslateDocumentFieldOps(ops: Operation[]): Operation[];
|
|
4921
|
+
|
|
4922
|
+
/**
|
|
4923
|
+
* Persisted collaboration-clock state and arbitration.
|
|
4924
|
+
*
|
|
4925
|
+
* Authored document values remain in `HistorySnapshot`.
|
|
4926
|
+
* This module owns the operational sidecar that makes LWW decisions survive
|
|
4927
|
+
* client refreshes, Durable Object hibernation, and D1 rehydration.
|
|
4928
|
+
* The reducer calls it before mutating authored state and returns the exact
|
|
4929
|
+
* accepted payload for live projection.
|
|
4930
|
+
*/
|
|
4931
|
+
|
|
4932
|
+
/**
|
|
4933
|
+
* Stable identity used by every granular document-resource LWW decision.
|
|
4934
|
+
* Returning `null` means the operation is unclocked, a composable delta,
|
|
4935
|
+
* or a compatibility whole-value op whose arrival-order behavior remains
|
|
4936
|
+
* unchanged.
|
|
4937
|
+
*/
|
|
4938
|
+
declare function collaborationResourceKey(op: Operation): string | null;
|
|
4939
|
+
/** Highest persisted collaboration timestamp in a snapshot. */
|
|
4940
|
+
declare function maxCollaborationTimestamp(snapshot: CollaborationSnapshot): number;
|
|
4941
|
+
/**
|
|
4942
|
+
* Give a server-rebased whole-value shape update a clock newer than every
|
|
4943
|
+
* value it merged.
|
|
4944
|
+
* The operation is mutated intentionally so persistence and broadcast use
|
|
4945
|
+
* the same promoted payload that the reducer accepts.
|
|
4946
|
+
*/
|
|
4947
|
+
declare function promoteRebasedShapeUpdateClock(snapshot: CollaborationSnapshot, op: Extract<Operation, {
|
|
4948
|
+
type: 'shape:update';
|
|
4949
|
+
}>): void;
|
|
4950
|
+
|
|
4951
|
+
/**
|
|
4952
|
+
* Keyed resource upsert / remove — the primitive under every granular
|
|
4953
|
+
* `*:upsert` / `*:remove` collab op.
|
|
4954
|
+
*
|
|
4955
|
+
* Most document collections identify their members by `id`, so
|
|
4956
|
+
* `upsertResourceById` / `removeResourceById` are the common entry points.
|
|
4957
|
+
* Template variables identify by `name` instead (the name IS the CSS
|
|
4958
|
+
* custom property and the `{{placeholder}}` token, so it cannot also carry
|
|
4959
|
+
* a synthetic id without two identities for one thing), which is why the
|
|
4960
|
+
* key is a parameter of the underlying implementation rather than a
|
|
4961
|
+
* hard-coded `'id'`.
|
|
4962
|
+
*
|
|
4963
|
+
* Deliberately duplicated from `@svgsketch/shared`: core has zero
|
|
4964
|
+
* dependencies, and the shared package keeps its own copy for consumers
|
|
4965
|
+
* that don't pull core. The two copies are held byte-identical below the
|
|
4966
|
+
* header comment by `packages/core/tests/model/resource-delta-parity.test.ts`
|
|
4967
|
+
* — a semantic change to one fails that gate until it lands in both.
|
|
4968
|
+
*/
|
|
4969
|
+
type ResourceKey = 'id' | 'name';
|
|
4970
|
+
interface IndexedResource {
|
|
4971
|
+
id?: unknown;
|
|
4972
|
+
}
|
|
4973
|
+
interface NamedResource {
|
|
4974
|
+
name?: unknown;
|
|
4975
|
+
}
|
|
4976
|
+
declare function upsertResourceByKey<T extends IndexedResource | NamedResource>(items: readonly T[] | undefined, item: T, key: ResourceKey, index?: number): T[];
|
|
4977
|
+
declare function removeResourceByKey<T extends IndexedResource | NamedResource>(items: readonly T[] | undefined, key: ResourceKey, identity: string): T[];
|
|
4978
|
+
declare function upsertResourceById<T extends IndexedResource>(items: readonly T[] | undefined, item: T, index?: number): T[];
|
|
4979
|
+
declare function removeResourceById<T extends IndexedResource>(items: readonly T[] | undefined, id: string): T[];
|
|
4980
|
+
declare function upsertResourceByName<T extends NamedResource>(items: readonly T[] | undefined, item: T, index?: number): T[];
|
|
4981
|
+
declare function removeResourceByName<T extends NamedResource>(items: readonly T[] | undefined, name: string): T[];
|
|
4746
4982
|
|
|
4747
4983
|
/**
|
|
4748
4984
|
* @svgsketch/core — Schema migrations.
|
|
@@ -4846,6 +5082,47 @@ declare function patternTileSize(pattern: Omit<PatternFill, 'id' | 'sourceId' |
|
|
|
4846
5082
|
*/
|
|
4847
5083
|
declare function patternLibraryDefToCustomPatternDef(def: PatternLibraryDef): CustomPatternDef | null;
|
|
4848
5084
|
|
|
5085
|
+
/**
|
|
5086
|
+
* What kind of string a payload slot holds.
|
|
5087
|
+
*
|
|
5088
|
+
* - `href` — the WHOLE value is a URI (a `data:` URI or an already
|
|
5089
|
+
* externalized asset URL). The rewriter decides whether to touch it.
|
|
5090
|
+
* - `svgMarkup` — SVG source that may EMBED URIs in `href` / `xlink:href`
|
|
5091
|
+
* attributes. The rewriter is handed the whole markup string and returns
|
|
5092
|
+
* the rewritten markup.
|
|
5093
|
+
*/
|
|
5094
|
+
type EmbeddedPayloadSlotKind = 'href' | 'svgMarkup';
|
|
5095
|
+
/**
|
|
5096
|
+
* Rewrites one slot's value. Returning the input unchanged is how a
|
|
5097
|
+
* rewriter declines a slot (too small to externalize, not an asset URL,
|
|
5098
|
+
* upload failed), so callers need no separate predicate hook.
|
|
5099
|
+
*/
|
|
5100
|
+
type EmbeddedPayloadRewriter = (value: string, kind: EmbeddedPayloadSlotKind) => Promise<string>;
|
|
5101
|
+
/**
|
|
5102
|
+
* Rewrite every payload slot in ONE serialized shape state, recursing into
|
|
5103
|
+
* inline `state.children`.
|
|
5104
|
+
*
|
|
5105
|
+
* Exported because the collab op paths rewrite a bare state object rather
|
|
5106
|
+
* than a document: `shape:add` carries `shape.state` and `shape:update`
|
|
5107
|
+
* carries a partial `state`, and both must cover the same slots as a save
|
|
5108
|
+
* or a peer receives a payload the document channel would have externalized.
|
|
5109
|
+
*/
|
|
5110
|
+
declare function rewriteShapeStateEmbeddedPayloads(state: unknown, rewrite: EmbeddedPayloadRewriter): Promise<void>;
|
|
5111
|
+
/**
|
|
5112
|
+
* Rewrite every payload slot in a whole serialized document, in place.
|
|
5113
|
+
*
|
|
5114
|
+
* Channels, in the order they are visited:
|
|
5115
|
+
* 1. `shapes[].state` — hrefs and paint-server markup, recursively
|
|
5116
|
+
* through inline `state.children`;
|
|
5117
|
+
* 2. `library[kind: 'pattern'].pattern.svgContent` — where user pattern
|
|
5118
|
+
* tiles live since they consolidated onto `LibraryRegistry`;
|
|
5119
|
+
* 3. `customPatterns[].svgContent` — the deprecated v1 tile channel.
|
|
5120
|
+
* `DocumentSerializer` no longer writes it, but the v1→v2 migration
|
|
5121
|
+
* still reads it, so a document written before the consolidation
|
|
5122
|
+
* round-trips.
|
|
5123
|
+
*/
|
|
5124
|
+
declare function rewriteDocumentEmbeddedPayloads(document: unknown, rewrite: EmbeddedPayloadRewriter): Promise<void>;
|
|
5125
|
+
|
|
4849
5126
|
/**
|
|
4850
5127
|
* @svgsketch/core — Document validation.
|
|
4851
5128
|
*
|
|
@@ -8421,4 +8698,4 @@ declare function lintWordSearchOptions(options: WordSearchOptions): WordSearchLi
|
|
|
8421
8698
|
declare function generateWordSearch(options: WordSearchOptions): GeneratedWordSearch;
|
|
8422
8699
|
declare function createWordSearchPrimitiveMask(width: number, height: number, primitive: WordSearchPrimitiveMask): boolean[][];
|
|
8423
8700
|
|
|
8424
|
-
export { type Affine2D, type AffineTransformMatrix, type AnimatablePropertyDescriptor, type AnimationKeyframe, type AnimationOperation, type AnimationTimeline, type AnimationTrack, type AnimationTrigger, type AnimationTriggerType, type AnyNodeProps, type ArcCenterParameterization, type ArcParams, type AriaRole, Arrow, type ArrowNodeProps, Audio, BUILTIN_MARKER_ID_MAP, type BaseFilter, type BaseFilterPrimitive, type BlackAndWhiteFilter, type BlurQuality, type BrightnessFilter, COMMON_PROP_DEFAULTS, COMMON_TRANSFORM_NODE_DEFAULTS, CURRENT_SCHEMA_VERSION, type ChannelPainterFilter, Circle, type CircleNodeProps, type ClipMaskOperation, Cloud, type CloudNodeProps, type CodeFormat, type CodegenOptions, type CollabClock, type CommonNodeProps, type CommonTransformNodeProps, type ConnectionDirection, type ConnectionDirectionValue, type ConnectionPoint, type ConnectionPointValue, type ConnectorEndpointRefValue, type ConnectorRoutingModeValue, Container, ContainerShapeBuilder, type ContouringDiscreteFilter, type ContouringTableFilter, type ContrastFilter, type CornerShapeValue, type CreateDocumentOptions, type CreateShapeOptions, Cross, type CrossNodeProps, type CrumpledPlasticFilter, type CustomPatternDef, type CycleBehavior, type CylinderNodeProps, DEFAULT_COORDINATE_PRECISION, DEFAULT_RICH_TEXT_STYLE, type DiamondNodeProps, type DiffuseLightingFilter, DocumentBuilder as Document, DocumentBuilder, type DocumentBuilderOptions, type DocumentMetadata, type DocumentNodeProps, type DocumentBuilderOptions as DocumentOptions, type DocumentResourceOperation, type DocumentScript, type DocumentShapeNodeProps, type DocumentStyle, type DropShadowFilter, type DuotoneFilter, EASING_CURVES, EasingType, Ellipse, type EllipseNodeProps, type EmbossFilter, type Extent1D, type ExtractedVariables, type FeBlendPrimitive, type FeColorMatrixPrimitive, type FeComponentTransferPrimitive, type FeCompositePrimitive, type FeConvolveMatrixPrimitive, type FeDiffuseLightingPrimitive, type FeDisplacementMapPrimitive, type FeDropShadowPrimitive, type FeFloodPrimitive, type FeGaussianBlurPrimitive, type FeImagePrimitive, type FeMergePrimitive, type FeMorphologyPrimitive, type FeOffsetPrimitive, type FeSpecularLightingPrimitive, type FeTilePrimitive, type FeTurbulencePrimitive, type FillType, type FilmGrainFilter, type FilterBlendMode, type FilterLibraryDef, type FilterLightSource, type FilterPrimitive, type FilterPrimitiveType, type FilterType, type FlowchartBoxNodeProps, type FlowchartBoxParams, type FlowchartBoxType, type FontVariantCssInput, type FusableTrack, type GaussianBlurFilter, Gear, type GearNodeProps, type GenerateSudokuOptions, type GeneratedSudokuPuzzle, type GeneratedWordSearch, type GlowFilter, type GouacheFilter, type GradientDefinition, type GradientSpreadMethod, type GradientStop, type GradientUnits, type GraphChangeListener, type GrayscaleFilter, type GroupNodeProps, type GroupPresentationData, type Guide, type GuideDeltaOperation, Heart, type HeartNodeProps, type HistorySnapshot, type HueRotateFilter, Hyperlink, type HyperlinkNodeProps, IDENTITY_AFFINE, type ImageAttribution, type ImageNodeProps, ImageShape, type InkBlotFilter, type InnerGlowFilter, type InnerShadowFilter, type InvertFilter, type JsonObject, type JsonPrimitive, type JsonValue, KNOWN_STATE_KEYS, type KeyedSerializedAnimationKeyframe, LIBRARY_EMIT_ORDER, type LibraryDef, type LibraryDefBase, type LibraryDefOfKind, type LibraryIndex, type LibraryKind, type LibrarySource, type LicenseType, type LightSource, Lightning, type LightningNodeProps, Line, type LineEndpointValue, type LineNodeProps, type LinearEasingPoint, type LinearGradient, LinearGradientBuilder, type LinearGradientLibraryDef, type LinkTarget, MARKER_HEIGHT, MARKER_VIEWBOX, MARKER_WIDTH, MAX_COORDINATE_PRECISION, MIGRATIONS, type MarkerDescriptor, type MarkerLibraryDef, type MarkerReferenceSets, type MatrixDecomposition2D, type Measurement, type MeasurementDeltaOperation, type MediaNodeProps, type MetadataDeltaOperation, type Migration, type MorphologyFilter, type MorphologyOperator, type MotionBlurFilter, NGon, type NGonNodeProps, NON_WIRE_PROP_KEYS, NUMERIC_SHAPE_TRANSFORM_STATE_KEYS, NestedSvg, type NodeChangeListener, type NodeFactoryMode, NodeSchemaRegistry, type NodeTypePropsMap, type NodeTypeSchema, type NoiseFilter, type OpMetadataPatch, type OpShapeState, type OpacityFilter, type Operation, type OutlineFilter, type OutlinePosition, PUZZLE_DEFAULTS, type ParallelogramNodeProps, type ParseOptions, Path, type PathBoundsRect, PathCurveType, type PathNodeProps, type PathPoint, PathPointType, PatternBuilder, type PatternElement, type PatternFill, type PatternLibraryDef, type PatternParams, type PatternSvgContentResult, type PatternType, type PixelateFilter, type Point, type PointLightFilter, type PolygonBaseNodeProps, Polyline, type PolylineNodeProps, type PreviousPlacement, type PropDef, type PropStamp, type PuzzleBounds, type PuzzleOptions, type PuzzlePiece, type PuzzleStyle, type PuzzleTabPattern, RICH_TEXT_STYLE_KEYS, type RadialGradient, RadialGradientBuilder, type RadialGradientLibraryDef, type RawSvgFilter, Rectangle, type RectangleNodeProps, type RejectedWordSearchWord, type RenderOptions, type RichTextData, type RichTextDecoration, type RichTextFormatRange, type RichTextLine, type RichTextLineSpan, type RichTextResolvedData, type RichTextResolvedLine, type RichTextResolvedSegment, type RichTextResolvedStyle, type RichTextRun, type RichTextRuns, type RichTextSegment, type RichTextSegmentStyle, type RichTextSegmentsInput, type RichTextStyleDelta, type RichTextTspanAttribute, type RiddledFilter, Ring, type RingNodeProps, type RoundEdgesFilter, SERIALIZED_SHAPE_STATE_KEYS, SHAPE_TRANSFORM_STATE_KEYS, type SaturateFilter, SceneGraph, SceneNode, type SegmentCurveType, type SepiaFilter, type SerializedAnimationKeyframe, type SerializedAnimationTimeline, type SerializedAnimationTrack, type SerializedClipMaskGroup, type SerializedColorGlyph, type SerializedColorGlyphLibrary, type SerializedExportItem, type SerializedGroup, type SerializedMarkerDef, type SerializedPaintServerDef, type SerializedSceneNodePlacement, type SerializedShape, type SerializedShapeState, type SerializedShapeStateKeyGates, type SerializedShapeTransformState, type SerializedSymbolDef, type SerializedVariantAxis, type SerializedViewbox, ShapeBuilder, type ShapeFilter, type ShapeMetadata, ShapeReference, type ShapeReferenceNodeProps, type ShapeTransformState, type SharpenFilter, type SmilCalcMode, type SmilKeyframeAttributes, type SmilKeyframeData, type SmilTimingTrack, type SmilValue, type SolveSudokuOptions, type SpecularLightingFilter, SpeechBubble, type SpeechBubbleNodeProps, Spiral, type SpiralNodeProps, type SplinePointInput, type SpotLightFilter, Square, type SquareNodeProps, Star, type StarNodeProps, type StepPosition, type StepsParams, type StringifyOptions, type StrokeType, type StructureChangeListener, type SudokuDifficulty, type SudokuGrid, type SudokuRating, type SudokuValidationResult, type SvgNodeProps, type SvgPrimitiveChainFilter, Switch, type SwitchNodeProps, type SymbolInstanceNodeProps, type SymbolLibraryDef, type TemplateVariable, type TemplateVariableMode, type TemplateVariableSource, type TemplateVariableType, type TerminatorNodeProps, Text, type TextFormatOperation, type TextNodeProps, type TextSplice, Timeline, Track, type TransferFunc, type TransformFusionPlan, type TransformStateLike, type TrapezoidNodeProps, Triangle, type TriangleNodeProps, type ValidationError, type ValidationResult, type VariableMap, Video, View, type ViewNodeProps, type Viewbox, type WarpFilter, type WarpType, type WatercolorFilter, type WireAliasShapeStateFields, type WireOnlyShapeStateFields, type WordSearchAxes, type WordSearchCellPath, type WordSearchDirection, type WordSearchLintResult, type WordSearchOptions, type WordSearchPlacement, type WordSearchPrimitiveMask, type XrayFilter, affine, affineFromArray, affineToArray, almostEqualAffine, applyAffineToPoint, applyAffineToVector, applyOpToSnapshot, applyOpsToSnapshot, applyRichTextFormat, applyTextSplice, applyTextTransform, arcEndpointToCenter, areTracksTimingEquivalent, around, buildCompoundTransformValues, buildSmilKeyframeData, canonicalPolygonTransformString, canonicalTransformString, collectMarkerReferences, collectReferencedLibraryDefs, collectReferencedMarkerIds, compareOrderKeys, composeLegacyTransformMatrix, computeArrowVertices, computeCloudPath, computeCrossVertices, computeDashArray, computeFlowchartBoxPath, computeGearPath, computeGearVertices, computeHeartPath, computeLightningVertices, computePolygonVertices, computeRectanglePath, computeRingPath, computeSpeechBubbleVertices, computeSpiralPath, computeSplinePath, computeStarVertices, createDocument, createSceneNode, createShape, createViewbox, createWordSearchPrimitiveMask, cubicBezierExtent1D, customPatternDefToLibraryDef, declaredRichTextDeltaKeys, decomposeAffine2D, defaultVariableMode, deriveRichTextFormatRanges, deriveSegments, deriveTextSplice, downTranslateAnimationKeyframeOps, downTranslateCollectionMoveOps, downTranslateScenePlaceOps, downTranslateTextFormatOps, ellipticalArcBounds, escXml, extractVariables, filterAttr, findShapeById, flattenShapeStateTree, flattenStateExtra, foldLegacyAncestorTransformIntoMatrix, forEachLibraryRefInState, forEachMarkerRefInState, forEachReachableShape, forEachShapeInLibraryDefs, formatSmilKeySpline, formatSmilKeyTime, freezeSiblingOrderKeys, generateCode, generateCssCode, generateD3Code, generateId, generatePatternSvgContent, generatePuzzlePieces, generateReactCode, generateSudokuPuzzle, generateSvgCode, generateVueCode, generateWordSearch, getBuiltInMarkerDefs, getEasingCubicBezier, getEffectivePrecision, getKeyframeCubicBezier, getMarkerDescriptors, getPatternElements, getSmilAdditive, getSmilBeginValue, getSmilFillMode, getSmilMotionKeyPoints, getSmilRepeatCount, getSmilSetBeginValue, getSmilTrackDuration, getWordSearchDirections, initialOrderKeys, invertAffine, isDefaultKeyPoints, isDefaultKeyTimes, isFiniteAffineArray, isIdentityAffine, isIdentityLinearSplines, isIndefiniteSetTrack, isReusablePatternTile, isSetSequenceTrack, isValidOrderKey, keyBetween, keysBetween, legacyEndpointMarkerId, linearGradient, lintWordSearchOptions, materializeSceneTreeOrderKeys, matrixTransformPart, mergeRichTextStyle, migrateSnapshot, moveResourceById, multiplyAffine, nodeSchemas, normalizeRichTextRuns, normalizeRichTextStyle, normalizeRichTextStyleDelta, orderSiblings, parseDocument, parseSvgTransformList, parseVariableArgs, parseWordSearchWords, partitionShapeStateTree, partitionStateExtra, pathDataBounds, pattern, patternLibraryDefToCustomPatternDef, patternTileSize, planTransformFusion, projectSceneTreeOntoClipMaskGroups, projectSceneTreeOntoShapes, quadraticBezierExtent1D, radialGradient, rebaseRichTextFormatRanges, rebaseRichTextRuns, reflectCubicBezier, removeTrackKeyframe, renderAnimationElements, renderBuiltinMarkerDefs, renderCircle, renderEllipse, renderFilterDefs, renderFilterLibraryDef, renderFilterPrimitive, renderFilterPrimitivesForType, renderFlowchartBox, renderImage, renderLibraryDef, renderLibraryDefs, renderLine, renderLinearGradientLibraryDef, renderMarkerLibraryDef, renderPatternLibraryDef, renderPolygonShape, renderPolyline, renderRadialGradientLibraryDef, renderRectangle, renderReferencedLibraryDefs, renderShape, renderSpline, renderSvgPrimitiveChainFilter, renderSymbolInstance, renderSymbolLibraryDef, renderText, renderToSvg, resolveRichTextStyleAt, resolveSymbolInstanceShapes, richTextFontVariantCss, richTextLineSpans, richTextRunsFromState, richTextStyleDelta, richTextStyleDeltasEqual, richTextStylesEqual, richTextTspanAttributes, rotateAffine, roundCoord, roundNumberString, roundSerializedShape, roundSnapshot, runsFromSegments, sanitizeRichTextFormatRanges, scaleAffine, skewXAffine, skewYAffine, smilKeyframeAttributes, solveCubicBezier, solveSudoku, splinePathBounds, stringifyDocument, substituteString, substituteVariables, symbolInstanceTargetId, transformSplice, translateAffine, tryParseSvgTransformList, upsertTrackKeyframe, validateSnapshot, validateSudokuPuzzle, verticesToPath };
|
|
8701
|
+
export { type Affine2D, type AffineTransformMatrix, type AnimatablePropertyDescriptor, type AnimationKeyframe, type AnimationOperation, type AnimationTimeline, type AnimationTrack, type AnimationTrigger, type AnimationTriggerType, type AnyNodeProps, type ArcCenterParameterization, type ArcParams, type AriaRole, Arrow, type ArrowNodeProps, Audio, BUILTIN_MARKER_ID_MAP, type BaseFilter, type BaseFilterPrimitive, type BlackAndWhiteFilter, type BlurQuality, type BrightnessFilter, COLLAB_PROTOCOL_VERSION, COMMON_PROP_DEFAULTS, COMMON_TRANSFORM_NODE_DEFAULTS, CURRENT_SCHEMA_VERSION, type ChannelPainterFilter, Circle, type CircleNodeProps, type ClipMaskOperation, Cloud, type CloudNodeProps, type CodeFormat, type CodegenOptions, type CollabClock, type CollaborationSnapshot, type CollaborationStamp, type CollaborationState, type CommonNodeProps, type CommonTransformNodeProps, type ConnectionDirection, type ConnectionDirectionValue, type ConnectionPoint, type ConnectionPointValue, type ConnectorEndpointRefValue, type ConnectorRoutingModeValue, Container, ContainerShapeBuilder, type ContouringDiscreteFilter, type ContouringTableFilter, type ContrastFilter, type CornerShapeValue, type CreateDocumentOptions, type CreateShapeOptions, Cross, type CrossNodeProps, type CrumpledPlasticFilter, type CustomPatternDef, type CycleBehavior, type CylinderNodeProps, DEFAULT_COORDINATE_PRECISION, DEFAULT_RICH_TEXT_STYLE, type DiamondNodeProps, type DiffuseLightingFilter, DocumentBuilder as Document, DocumentBuilder, type DocumentBuilderOptions, type DocumentMetadata, type DocumentNodeProps, type DocumentBuilderOptions as DocumentOptions, type DocumentResourceOperation, type DocumentScript, type DocumentShapeNodeProps, type DocumentStyle, type DropShadowFilter, type DuotoneFilter, EASING_CURVES, EasingType, Ellipse, type EllipseNodeProps, type EmbeddedPayloadRewriter, type EmbeddedPayloadSlotKind, type EmbossFilter, type ExportItemOperation, type Extent1D, type ExtractedVariables, type FeBlendPrimitive, type FeColorMatrixPrimitive, type FeComponentTransferPrimitive, type FeCompositePrimitive, type FeConvolveMatrixPrimitive, type FeDiffuseLightingPrimitive, type FeDisplacementMapPrimitive, type FeDropShadowPrimitive, type FeFloodPrimitive, type FeGaussianBlurPrimitive, type FeImagePrimitive, type FeMergePrimitive, type FeMorphologyPrimitive, type FeOffsetPrimitive, type FeSpecularLightingPrimitive, type FeTilePrimitive, type FeTurbulencePrimitive, type FillType, type FilmGrainFilter, type FilterBlendMode, type FilterLibraryDef, type FilterLightSource, type FilterPrimitive, type FilterPrimitiveType, type FilterType, type FlowchartBoxNodeProps, type FlowchartBoxParams, type FlowchartBoxType, type FontVariantCssInput, type FusableTrack, type GaussianBlurFilter, Gear, type GearNodeProps, type GenerateSudokuOptions, type GeneratedSudokuPuzzle, type GeneratedWordSearch, type GlowFilter, type GouacheFilter, type GradientDefinition, type GradientSpreadMethod, type GradientStop, type GradientUnits, type GraphChangeListener, type GrayscaleFilter, type GroupNodeProps, type GroupPresentationData, type Guide, type GuideDeltaOperation, Heart, type HeartNodeProps, type HistorySnapshot, type HueRotateFilter, Hyperlink, type HyperlinkNodeProps, IDENTITY_AFFINE, type ImageAttribution, type ImageNodeProps, ImageShape, type IndexedResource, type InkBlotFilter, type InnerGlowFilter, type InnerShadowFilter, type InvertFilter, type JsonObject, type JsonPrimitive, type JsonValue, KNOWN_STATE_KEYS, type KeyedSerializedAnimationKeyframe, LIBRARY_EMIT_ORDER, type LibraryDef, type LibraryDefBase, type LibraryDefOfKind, type LibraryIndex, type LibraryKind, type LibrarySource, type LicenseType, type LightSource, Lightning, type LightningNodeProps, Line, type LineEndpointValue, type LineNodeProps, type LinearEasingPoint, type LinearGradient, LinearGradientBuilder, type LinearGradientLibraryDef, type LinkTarget, MARKER_HEIGHT, MARKER_VIEWBOX, MARKER_WIDTH, MAX_COORDINATE_PRECISION, MIGRATIONS, type MarkerDescriptor, type MarkerLibraryDef, type MarkerReferenceSets, type MatrixDecomposition2D, type Measurement, type MeasurementDeltaOperation, type MediaNodeProps, type MetadataDeltaOperation, type Migration, type MorphologyFilter, type MorphologyOperator, type MotionBlurFilter, NGon, type NGonNodeProps, NON_WIRE_PROP_KEYS, NUMERIC_SHAPE_TRANSFORM_STATE_KEYS, type NamedResource, NestedSvg, type NodeChangeListener, type NodeFactoryMode, NodeSchemaRegistry, type NodeTypePropsMap, type NodeTypeSchema, type NoiseFilter, type OpMetadataPatch, type OpShapeState, type OpacityFilter, type Operation, type OperationValidationIssue, type OperationValidationResult, type OutlineFilter, type OutlinePosition, PUZZLE_DEFAULTS, type ParallelogramNodeProps, type ParseOptions, Path, type PathBoundsRect, PathCurveType, type PathNodeProps, type PathPoint, PathPointType, PatternBuilder, type PatternElement, type PatternFill, type PatternLibraryDef, type PatternParams, type PatternSvgContentResult, type PatternType, type PixelateFilter, type Point, type PointLightFilter, type PolygonBaseNodeProps, Polyline, type PolylineNodeProps, type PreviousPlacement, type PropDef, type PropStamp, type PuzzleBounds, type PuzzleOptions, type PuzzlePiece, type PuzzleStyle, type PuzzleTabPattern, RICH_TEXT_STYLE_KEYS, type RadialGradient, RadialGradientBuilder, type RadialGradientLibraryDef, type RawSvgFilter, Rectangle, type RectangleNodeProps, type RejectedWordSearchWord, type RenderOptions, type ResourceKey, type RichTextData, type RichTextDecoration, type RichTextFormatRange, type RichTextLine, type RichTextLineSpan, type RichTextResolvedData, type RichTextResolvedLine, type RichTextResolvedSegment, type RichTextResolvedStyle, type RichTextRun, type RichTextRuns, type RichTextSegment, type RichTextSegmentStyle, type RichTextSegmentsInput, type RichTextStyleDelta, type RichTextTspanAttribute, type RiddledFilter, Ring, type RingNodeProps, type RoundEdgesFilter, SERIALIZED_SHAPE_STATE_KEYS, SHAPE_TRANSFORM_STATE_KEYS, type SaturateFilter, SceneGraph, SceneNode, type SegmentCurveType, type SepiaFilter, type SerializedAnimationKeyframe, type SerializedAnimationTimeline, type SerializedAnimationTrack, type SerializedClipMaskGroup, type SerializedColorGlyph, type SerializedColorGlyphLibrary, type SerializedExportItem, type SerializedGroup, type SerializedMarkerDef, type SerializedPaintServerDef, type SerializedSceneNodePlacement, type SerializedShape, type SerializedShapeState, type SerializedShapeStateKeyGates, type SerializedShapeTransformState, type SerializedSymbolDef, type SerializedVariantAxis, type SerializedViewbox, ShapeBuilder, type ShapeFilter, type ShapeMetadata, ShapeReference, type ShapeReferenceNodeProps, type ShapeTransformState, type SharpenFilter, type SmilCalcMode, type SmilKeyframeAttributes, type SmilKeyframeData, type SmilTimingTrack, type SmilValue, type SolveSudokuOptions, type SpecularLightingFilter, SpeechBubble, type SpeechBubbleNodeProps, Spiral, type SpiralNodeProps, type SplinePointInput, type SpotLightFilter, Square, type SquareNodeProps, Star, type StarNodeProps, type StepPosition, type StepsParams, type StringifyOptions, type StrokeType, type StructureChangeListener, type SudokuDifficulty, type SudokuGrid, type SudokuRating, type SudokuValidationResult, type SvgNodeProps, type SvgPrimitiveChainFilter, Switch, type SwitchNodeProps, type SymbolInstanceNodeProps, type SymbolLibraryDef, type TemplateVariable, type TemplateVariableMode, type TemplateVariableOperation, type TemplateVariableSource, type TemplateVariableType, type TerminatorNodeProps, Text, type TextFormatOperation, type TextNodeProps, type TextSplice, Timeline, Track, type TransferFunc, type TransformFusionPlan, type TransformStateLike, type TrapezoidNodeProps, Triangle, type TriangleNodeProps, type ValidationError, type ValidationResult, type VariableMap, Video, View, type ViewNodeProps, type Viewbox, type WarpFilter, type WarpType, type WatercolorFilter, type WireAliasShapeStateFields, type WireOnlyShapeStateFields, type WordSearchAxes, type WordSearchCellPath, type WordSearchDirection, type WordSearchLintResult, type WordSearchOptions, type WordSearchPlacement, type WordSearchPrimitiveMask, type XrayFilter, affine, affineFromArray, affineToArray, almostEqualAffine, applyAffineToPoint, applyAffineToVector, applyOpToSnapshot, applyOpsToSnapshot, applyOpsToSnapshotWithAccepted, applyRichTextFormat, applyTextSplice, applyTextTransform, arcEndpointToCenter, areTracksTimingEquivalent, around, buildCompoundTransformValues, buildSmilKeyframeData, canonicalPolygonTransformString, canonicalTransformString, collaborationResourceKey, collectMarkerReferences, collectReferencedLibraryDefs, collectReferencedMarkerIds, compareOrderKeys, composeLegacyTransformMatrix, computeArrowVertices, computeCloudPath, computeCrossVertices, computeDashArray, computeFlowchartBoxPath, computeGearPath, computeGearVertices, computeHeartPath, computeLightningVertices, computePolygonVertices, computeRectanglePath, computeRingPath, computeSpeechBubbleVertices, computeSpiralPath, computeSplinePath, computeStarVertices, createDocument, createSceneNode, createShape, createViewbox, createWordSearchPrimitiveMask, cubicBezierExtent1D, customPatternDefToLibraryDef, declaredRichTextDeltaKeys, decomposeAffine2D, defaultVariableMode, deriveRichTextFormatRanges, deriveSegments, deriveTextSplice, downTranslateAnimationKeyframeOps, downTranslateCollectionMoveOps, downTranslateDocumentFieldOps, downTranslateScenePlaceOps, downTranslateTextFormatOps, ellipticalArcBounds, escXml, extractVariables, filterAttr, findShapeById, flattenShapeStateTree, flattenStateExtra, foldLegacyAncestorTransformIntoMatrix, forEachLibraryRefInState, forEachMarkerRefInState, forEachReachableShape, forEachShapeInLibraryDefs, formatOperationValidationIssues, formatSmilKeySpline, formatSmilKeyTime, freezeSiblingOrderKeys, generateCode, generateCssCode, generateD3Code, generateId, generatePatternSvgContent, generatePuzzlePieces, generateReactCode, generateSudokuPuzzle, generateSvgCode, generateVueCode, generateWordSearch, getBuiltInMarkerDefs, getEasingCubicBezier, getEffectivePrecision, getKeyframeCubicBezier, getMarkerDescriptors, getPatternElements, getSmilAdditive, getSmilBeginValue, getSmilFillMode, getSmilMotionKeyPoints, getSmilRepeatCount, getSmilSetBeginValue, getSmilTrackDuration, getWordSearchDirections, initialOrderKeys, invertAffine, isDefaultKeyPoints, isDefaultKeyTimes, isFiniteAffineArray, isIdentityAffine, isIdentityLinearSplines, isIndefiniteSetTrack, isReusablePatternTile, isSetSequenceTrack, isValidOrderKey, keyBetween, keysBetween, legacyEndpointMarkerId, linearGradient, lintWordSearchOptions, materializeSceneTreeOrderKeys, matrixTransformPart, maxCollaborationTimestamp, mergeRichTextStyle, migrateSnapshot, moveResourceById, multiplyAffine, nodeSchemas, normalizeRichTextRuns, normalizeRichTextStyle, normalizeRichTextStyleDelta, orderSiblings, parseDocument, parseSvgTransformList, parseVariableArgs, parseWordSearchWords, partitionShapeStateTree, partitionStateExtra, pathDataBounds, pattern, patternLibraryDefToCustomPatternDef, patternTileSize, planTransformFusion, projectSceneTreeOntoClipMaskGroups, projectSceneTreeOntoShapes, promoteRebasedShapeUpdateClock, quadraticBezierExtent1D, radialGradient, rebaseRichTextFormatRanges, rebaseRichTextRuns, reflectCubicBezier, removeResourceById, removeResourceByKey, removeResourceByName, removeTrackKeyframe, renderAnimationElements, renderBuiltinMarkerDefs, renderCircle, renderEllipse, renderFilterDefs, renderFilterLibraryDef, renderFilterPrimitive, renderFilterPrimitivesForType, renderFlowchartBox, renderImage, renderLibraryDef, renderLibraryDefs, renderLine, renderLinearGradientLibraryDef, renderMarkerLibraryDef, renderPatternLibraryDef, renderPolygonShape, renderPolyline, renderRadialGradientLibraryDef, renderRectangle, renderReferencedLibraryDefs, renderShape, renderSpline, renderSvgPrimitiveChainFilter, renderSymbolInstance, renderSymbolLibraryDef, renderText, renderToSvg, resolveRichTextStyleAt, resolveSymbolInstanceShapes, rewriteDocumentEmbeddedPayloads, rewriteShapeStateEmbeddedPayloads, richTextFontVariantCss, richTextLineSpans, richTextRunsFromState, richTextStyleDelta, richTextStyleDeltasEqual, richTextStylesEqual, richTextTspanAttributes, rotateAffine, roundCoord, roundNumberString, roundSerializedShape, roundSnapshot, runsFromSegments, sanitizeRichTextFormatRanges, scaleAffine, skewXAffine, skewYAffine, smilKeyframeAttributes, solveCubicBezier, solveSudoku, splinePathBounds, stringifyDocument, substituteString, substituteVariables, symbolInstanceTargetId, transformSplice, translateAffine, tryParseSvgTransformList, upsertResourceById, upsertResourceByKey, upsertResourceByName, upsertTrackKeyframe, validateDocumentOperations, validateOperation, validatePresenceOperation, validateSnapshot, validateSudokuPuzzle, verticesToPath };
|