@svgsketch/core 2.1.0 → 2.2.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 CHANGED
@@ -2881,7 +2881,21 @@ interface TextNodeProps extends CommonNodeProps {
2881
2881
  fontSize: number;
2882
2882
  text: string;
2883
2883
  fontFamily: string;
2884
- fontWeight: string;
2884
+ /**
2885
+ * CSS Fonts 4 §2.2: a keyword or a `<number>`. Declared as the parsed
2886
+ * form, matching `RichTextResolvedStyle.fontWeight` and the `Text`
2887
+ * accessor, both of which already said `number | 'normal' | 'bold'`.
2888
+ *
2889
+ * This said `string` while numbers flowed through it anyway — the
2890
+ * accessor cast the mismatch away. The cost was real: one import path
2891
+ * stored the raw attribute string and another the parsed number, so
2892
+ * `font-weight="400"` round-tripped as `400` on one generation and
2893
+ * `"400"` on the next, and `richTextStylesEqual` (which compares with
2894
+ * `!==`) read those as DIFFERENT styles — merging layout segments it
2895
+ * should have split and emitting `text:format` deltas for a change
2896
+ * nobody made.
2897
+ */
2898
+ fontWeight: number | 'normal' | 'bold';
2885
2899
  fontStyle: string;
2886
2900
  fontVariant: string;
2887
2901
  fontVariantLigatures: string;
@@ -4795,18 +4809,82 @@ declare function projectSceneTreeOntoShapes(snapshot: HistorySnapshot): void;
4795
4809
  * from, and its stored lists are the only membership record it has.
4796
4810
  */
4797
4811
  declare function projectSceneTreeOntoClipMaskGroups(snapshot: HistorySnapshot): void;
4812
+ declare function findShapeById(shapes: SerializedShape[], id: string): SerializedShape | null;
4798
4813
  /**
4799
- * Depth-first lookup of a serialized shape by id, descending container
4800
- * `state.children` trees. Exported for the DocumentRoom's text-splice
4801
- * rebase slot, which needs the shape's CURRENT authoritative `state.text`
4802
- * before the reducer folds an incoming op in.
4814
+ * THE CORRECTION A SENDER IS OWED.
4815
+ *
4816
+ * A client applies its own operation locally before sending it, then gets
4817
+ * an acknowledgement. The ack says the batch was processed; the client
4818
+ * reads it as "this is server state now" and drops the ops from the buffer
4819
+ * that exists to replay them. Those claims coincide only when the server's
4820
+ * projection of an operation matches what the sender applied — and it does
4821
+ * not always, because the sender's baseline can be missing a concurrent
4822
+ * edit the server already reduced.
4823
+ *
4824
+ * Most disagreements are self-healing: the operation that beat the sender
4825
+ * was itself accepted, so it is broadcast to the sender and the sender
4826
+ * adopts it. Deterministic rejections (a malformed order key, an unknown
4827
+ * op type, an absent target) heal too, because the sender's own copy of
4828
+ * this reducer reaches the same verdict. `replica-convergence.test.ts`
4829
+ * holds both classes down with running replicas.
4830
+ *
4831
+ * What does NOT heal is a projection the sender cannot derive:
4832
+ *
4833
+ * - a `shape:update` whose per-property clock lost, in whole or in part.
4834
+ * The sender keeps the value it wrote for every property that lost.
4835
+ * - a `text:format` whose clock the reducer PROMOTED past everything it
4836
+ * merged. Peers receive the promoted stamp; the sender is excluded
4837
+ * from its own broadcast, so it keeps the stamp it sent — and because
4838
+ * the run list is append-ordered, applying the two formats in the
4839
+ * opposite order leaves it holding a differently-ordered list.
4840
+ *
4841
+ * For those, the server states the answer: a `shape:update` carrying the
4842
+ * authoritative VALUE and the authoritative CLOCK for the affected keys.
4843
+ * Clocked, so it cannot clobber a newer edit the sender made in the
4844
+ * meantime, and idempotent, so it costs nothing if the broadcast that
4845
+ * would have healed it arrives first.
4846
+ *
4847
+ * Grouped by the clock's `clientId`, because one operation carries one
4848
+ * `clientId` for all of its `propTimestamps` — two keys last written by
4849
+ * different clients need two corrections to reproduce both stamps
4850
+ * exactly, and an inexact stamp is a future arbitration decided
4851
+ * differently on the two replicas.
4852
+ */
4853
+ declare function senderCorrectionsForOp(snapshot: CollaborationSnapshot, sent: Operation, accepted: Operation | null): Operation[];
4854
+ /**
4855
+ * Reduce one operation onto `snapshot`, MUTATING it, and return the
4856
+ * projected operation or `null`.
4857
+ *
4858
+ * A single-op batch: the batch context is created and settled around this
4859
+ * one call, so the inline projection runs exactly once, as it always did.
4860
+ * A caller folding several operations should reach for `applyOpsInPlace`
4861
+ * instead — that shares one index and one projection across the batch.
4803
4862
  */
4804
- declare function findShapeById(shapes: SerializedShape[], id: string): SerializedShape | null;
4805
4863
  declare function applyOpToSnapshot(snapshot: HistorySnapshot, incomingOp: Operation): Operation | null;
4806
4864
  /**
4807
- * Fold `ops` into a deep clone of `snapshot` and return it the
4808
- * receiving-side contract of the editor's collab manager (the original
4809
- * is never mutated). Semantically `ops.reduce(applyOpToSnapshot, clone)`.
4865
+ * Fold `ops` into `snapshot`, MUTATING it, and return what was accepted.
4866
+ *
4867
+ * The in-place form. One `ReduceContext` spans the batch, so the shape
4868
+ * index is built once and the inline projection is re-derived once at the
4869
+ * end rather than once per operation.
4870
+ *
4871
+ * Callers that need the input left intact — because something after the
4872
+ * reduce can throw and the snapshot has to survive it — want
4873
+ * `applyOpsToSnapshotWithAccepted`, which clones first. That clone is the
4874
+ * single most expensive thing in the reduce path (measured at ~99% of a
4875
+ * one-op batch on a 5,000-shape document), so it is charged only to the
4876
+ * callers that actually need the rollback.
4877
+ */
4878
+ declare function applyOpsInPlace(snapshot: CollaborationSnapshot, ops: readonly Operation[]): Operation[];
4879
+ /**
4880
+ * Fold `ops` into a deep CLONE of `snapshot` and return it — the original
4881
+ * is never mutated.
4882
+ *
4883
+ * The clone is not defensive housekeeping, it is the caller's rollback:
4884
+ * `CollabManager.handleRemoteOpsFlush` reduces, hands the result to the
4885
+ * canvas projector, and only then adopts it as the new baseline. If the
4886
+ * projection throws, the baseline has to be exactly what it was. Removing
4887
+ * the clone would turn that into a half-applied batch.
4810
4888
  */
4811
4889
  declare function applyOpsToSnapshotWithAccepted(snapshot: HistorySnapshot, ops: readonly Operation[]): {
4812
4890
  snapshot: CollaborationSnapshot;
@@ -8698,4 +8776,4 @@ declare function lintWordSearchOptions(options: WordSearchOptions): WordSearchLi
8698
8776
  declare function generateWordSearch(options: WordSearchOptions): GeneratedWordSearch;
8699
8777
  declare function createWordSearchPrimitiveMask(width: number, height: number, primitive: WordSearchPrimitiveMask): boolean[][];
8700
8778
 
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 };
8779
+ 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, applyOpsInPlace, 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, senderCorrectionsForOp, skewXAffine, skewYAffine, smilKeyframeAttributes, solveCubicBezier, solveSudoku, splinePathBounds, stringifyDocument, substituteString, substituteVariables, symbolInstanceTargetId, transformSplice, translateAffine, tryParseSvgTransformList, upsertResourceById, upsertResourceByKey, upsertResourceByName, upsertTrackKeyframe, validateDocumentOperations, validateOperation, validatePresenceOperation, validateSnapshot, validateSudokuPuzzle, verticesToPath };
package/dist/index.d.ts CHANGED
@@ -2881,7 +2881,21 @@ interface TextNodeProps extends CommonNodeProps {
2881
2881
  fontSize: number;
2882
2882
  text: string;
2883
2883
  fontFamily: string;
2884
- fontWeight: string;
2884
+ /**
2885
+ * CSS Fonts 4 §2.2: a keyword or a `<number>`. Declared as the parsed
2886
+ * form, matching `RichTextResolvedStyle.fontWeight` and the `Text`
2887
+ * accessor, both of which already said `number | 'normal' | 'bold'`.
2888
+ *
2889
+ * This said `string` while numbers flowed through it anyway — the
2890
+ * accessor cast the mismatch away. The cost was real: one import path
2891
+ * stored the raw attribute string and another the parsed number, so
2892
+ * `font-weight="400"` round-tripped as `400` on one generation and
2893
+ * `"400"` on the next, and `richTextStylesEqual` (which compares with
2894
+ * `!==`) read those as DIFFERENT styles — merging layout segments it
2895
+ * should have split and emitting `text:format` deltas for a change
2896
+ * nobody made.
2897
+ */
2898
+ fontWeight: number | 'normal' | 'bold';
2885
2899
  fontStyle: string;
2886
2900
  fontVariant: string;
2887
2901
  fontVariantLigatures: string;
@@ -4795,18 +4809,82 @@ declare function projectSceneTreeOntoShapes(snapshot: HistorySnapshot): void;
4795
4809
  * from, and its stored lists are the only membership record it has.
4796
4810
  */
4797
4811
  declare function projectSceneTreeOntoClipMaskGroups(snapshot: HistorySnapshot): void;
4812
+ declare function findShapeById(shapes: SerializedShape[], id: string): SerializedShape | null;
4798
4813
  /**
4799
- * Depth-first lookup of a serialized shape by id, descending container
4800
- * `state.children` trees. Exported for the DocumentRoom's text-splice
4801
- * rebase slot, which needs the shape's CURRENT authoritative `state.text`
4802
- * before the reducer folds an incoming op in.
4814
+ * THE CORRECTION A SENDER IS OWED.
4815
+ *
4816
+ * A client applies its own operation locally before sending it, then gets
4817
+ * an acknowledgement. The ack says the batch was processed; the client
4818
+ * reads it as "this is server state now" and drops the ops from the buffer
4819
+ * that exists to replay them. Those claims coincide only when the server's
4820
+ * projection of an operation matches what the sender applied — and it does
4821
+ * not always, because the sender's baseline can be missing a concurrent
4822
+ * edit the server already reduced.
4823
+ *
4824
+ * Most disagreements are self-healing: the operation that beat the sender
4825
+ * was itself accepted, so it is broadcast to the sender and the sender
4826
+ * adopts it. Deterministic rejections (a malformed order key, an unknown
4827
+ * op type, an absent target) heal too, because the sender's own copy of
4828
+ * this reducer reaches the same verdict. `replica-convergence.test.ts`
4829
+ * holds both classes down with running replicas.
4830
+ *
4831
+ * What does NOT heal is a projection the sender cannot derive:
4832
+ *
4833
+ * - a `shape:update` whose per-property clock lost, in whole or in part.
4834
+ * The sender keeps the value it wrote for every property that lost.
4835
+ * - a `text:format` whose clock the reducer PROMOTED past everything it
4836
+ * merged. Peers receive the promoted stamp; the sender is excluded
4837
+ * from its own broadcast, so it keeps the stamp it sent — and because
4838
+ * the run list is append-ordered, applying the two formats in the
4839
+ * opposite order leaves it holding a differently-ordered list.
4840
+ *
4841
+ * For those, the server states the answer: a `shape:update` carrying the
4842
+ * authoritative VALUE and the authoritative CLOCK for the affected keys.
4843
+ * Clocked, so it cannot clobber a newer edit the sender made in the
4844
+ * meantime, and idempotent, so it costs nothing if the broadcast that
4845
+ * would have healed it arrives first.
4846
+ *
4847
+ * Grouped by the clock's `clientId`, because one operation carries one
4848
+ * `clientId` for all of its `propTimestamps` — two keys last written by
4849
+ * different clients need two corrections to reproduce both stamps
4850
+ * exactly, and an inexact stamp is a future arbitration decided
4851
+ * differently on the two replicas.
4852
+ */
4853
+ declare function senderCorrectionsForOp(snapshot: CollaborationSnapshot, sent: Operation, accepted: Operation | null): Operation[];
4854
+ /**
4855
+ * Reduce one operation onto `snapshot`, MUTATING it, and return the
4856
+ * projected operation or `null`.
4857
+ *
4858
+ * A single-op batch: the batch context is created and settled around this
4859
+ * one call, so the inline projection runs exactly once, as it always did.
4860
+ * A caller folding several operations should reach for `applyOpsInPlace`
4861
+ * instead — that shares one index and one projection across the batch.
4803
4862
  */
4804
- declare function findShapeById(shapes: SerializedShape[], id: string): SerializedShape | null;
4805
4863
  declare function applyOpToSnapshot(snapshot: HistorySnapshot, incomingOp: Operation): Operation | null;
4806
4864
  /**
4807
- * Fold `ops` into a deep clone of `snapshot` and return it the
4808
- * receiving-side contract of the editor's collab manager (the original
4809
- * is never mutated). Semantically `ops.reduce(applyOpToSnapshot, clone)`.
4865
+ * Fold `ops` into `snapshot`, MUTATING it, and return what was accepted.
4866
+ *
4867
+ * The in-place form. One `ReduceContext` spans the batch, so the shape
4868
+ * index is built once and the inline projection is re-derived once at the
4869
+ * end rather than once per operation.
4870
+ *
4871
+ * Callers that need the input left intact — because something after the
4872
+ * reduce can throw and the snapshot has to survive it — want
4873
+ * `applyOpsToSnapshotWithAccepted`, which clones first. That clone is the
4874
+ * single most expensive thing in the reduce path (measured at ~99% of a
4875
+ * one-op batch on a 5,000-shape document), so it is charged only to the
4876
+ * callers that actually need the rollback.
4877
+ */
4878
+ declare function applyOpsInPlace(snapshot: CollaborationSnapshot, ops: readonly Operation[]): Operation[];
4879
+ /**
4880
+ * Fold `ops` into a deep CLONE of `snapshot` and return it — the original
4881
+ * is never mutated.
4882
+ *
4883
+ * The clone is not defensive housekeeping, it is the caller's rollback:
4884
+ * `CollabManager.handleRemoteOpsFlush` reduces, hands the result to the
4885
+ * canvas projector, and only then adopts it as the new baseline. If the
4886
+ * projection throws, the baseline has to be exactly what it was. Removing
4887
+ * the clone would turn that into a half-applied batch.
4810
4888
  */
4811
4889
  declare function applyOpsToSnapshotWithAccepted(snapshot: HistorySnapshot, ops: readonly Operation[]): {
4812
4890
  snapshot: CollaborationSnapshot;
@@ -8698,4 +8776,4 @@ declare function lintWordSearchOptions(options: WordSearchOptions): WordSearchLi
8698
8776
  declare function generateWordSearch(options: WordSearchOptions): GeneratedWordSearch;
8699
8777
  declare function createWordSearchPrimitiveMask(width: number, height: number, primitive: WordSearchPrimitiveMask): boolean[][];
8700
8778
 
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 };
8779
+ 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, applyOpsInPlace, 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, senderCorrectionsForOp, skewXAffine, skewYAffine, smilKeyframeAttributes, solveCubicBezier, solveSudoku, splinePathBounds, stringifyDocument, substituteString, substituteVariables, symbolInstanceTargetId, transformSplice, translateAffine, tryParseSvgTransformList, upsertResourceById, upsertResourceByKey, upsertResourceByName, upsertTrackKeyframe, validateDocumentOperations, validateOperation, validatePresenceOperation, validateSnapshot, validateSudokuPuzzle, verticesToPath };