@svgsketch/core 6.3.0 → 6.4.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 +35 -33
- package/dist/index.d.ts +35 -33
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -685,7 +685,7 @@ interface AnimatablePropertyDescriptor {
|
|
|
685
685
|
* i18n key for the display label, resolved by the host at render time.
|
|
686
686
|
*
|
|
687
687
|
* The label cannot be derived from `key` alone - the same key means
|
|
688
|
-
* different things on different shapes (a circle's `x` is a
|
|
688
|
+
* different things on different shapes (a circle's `x` is a center, a
|
|
689
689
|
* rectangle's is a corner), so the descriptor is the only place that
|
|
690
690
|
* knows what to call it.
|
|
691
691
|
*/
|
|
@@ -1015,7 +1015,7 @@ interface PatternFill {
|
|
|
1015
1015
|
/** Per-preset tuneable geometry parameters (stroke width, dot radius …). */
|
|
1016
1016
|
patternParams?: PatternParams;
|
|
1017
1017
|
/**
|
|
1018
|
-
*
|
|
1018
|
+
* Serialized inner markup of the `<pattern>` tile.
|
|
1019
1019
|
* When present this is used **instead of** generating content from the
|
|
1020
1020
|
* preset helpers — it can contain arbitrary SVG (rects, paths, images …).
|
|
1021
1021
|
*/
|
|
@@ -1060,14 +1060,14 @@ interface PatternFill {
|
|
|
1060
1060
|
type GradientDefinition = LinearGradient | RadialGradient | PatternFill;
|
|
1061
1061
|
/**
|
|
1062
1062
|
* A user-defined custom pattern stored in the document.
|
|
1063
|
-
* Created by
|
|
1063
|
+
* Created by serializing selected shapes into a reusable pattern tile.
|
|
1064
1064
|
*/
|
|
1065
1065
|
interface CustomPatternDef {
|
|
1066
1066
|
/** Unique identifier for this pattern definition. */
|
|
1067
1067
|
id: string;
|
|
1068
1068
|
/** User-assigned name shown in the pattern picker. */
|
|
1069
1069
|
name: string;
|
|
1070
|
-
/**
|
|
1070
|
+
/** Serialized inner SVG markup of the pattern tile. */
|
|
1071
1071
|
svgContent: string;
|
|
1072
1072
|
/** Tile width in userSpaceOnUse coordinates. */
|
|
1073
1073
|
width: number;
|
|
@@ -1338,7 +1338,7 @@ interface InnerGlowFilter extends BaseFilter {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Passthrough for `<filter>` definitions the editor doesn't model as a preset.
|
|
1341
|
-
* The parser
|
|
1341
|
+
* The parser serializes the element's inner markup and authored region
|
|
1342
1342
|
* attributes verbatim; the filter manager re-emits them on render. Absent
|
|
1343
1343
|
* attributes stay `undefined` so the UA applies the SVG spec initial values
|
|
1344
1344
|
* (filterUnits=objectBoundingBox, primitiveUnits=userSpaceOnUse, filter region
|
|
@@ -3223,7 +3223,7 @@ interface CommonNodeProps extends CommonTransformNodeProps {
|
|
|
3223
3223
|
* clears the inline list, and detaching writes it back. The paint of the
|
|
3224
3224
|
* first fill layer and first stroke layer still comes from this shape's own
|
|
3225
3225
|
* base props either way, which is what keeps a shared style from flattening
|
|
3226
|
-
* every shape that wears it to the same
|
|
3226
|
+
* every shape that wears it to the same color.
|
|
3227
3227
|
*
|
|
3228
3228
|
* Absent, present-but-dangling, and present-and-resolvable are three
|
|
3229
3229
|
* different states and only the last changes what the shape paints: a link
|
|
@@ -3316,7 +3316,7 @@ interface CircleNodeProps extends CommonNodeProps {
|
|
|
3316
3316
|
radius: number;
|
|
3317
3317
|
}
|
|
3318
3318
|
/**
|
|
3319
|
-
* An ellipse's
|
|
3319
|
+
* An ellipse's center is `x` / `y`, matching CircleNodeProps and matching
|
|
3320
3320
|
* what the SVG importer writes (`svg-leaf-geometry.ts` normalizes the `cx` /
|
|
3321
3321
|
* `cy` ATTRIBUTES to these prop names for both shapes, and promotes an
|
|
3322
3322
|
* ellipse with equal radii to a circle by reusing the same state). The SVG
|
|
@@ -4263,7 +4263,7 @@ interface HistorySnapshot {
|
|
|
4263
4263
|
* not document state. Only the color-glyph artwork itself rides.
|
|
4264
4264
|
*
|
|
4265
4265
|
* Optional: documents that never opened the foundry have no entry,
|
|
4266
|
-
* and the field is omitted on
|
|
4266
|
+
* and the field is omitted on serialization when the library is empty.
|
|
4267
4267
|
*/
|
|
4268
4268
|
colorGlyphLibrary?: SerializedColorGlyphLibrary;
|
|
4269
4269
|
/**
|
|
@@ -4317,7 +4317,7 @@ interface SerializedExportItem {
|
|
|
4317
4317
|
* editor app.
|
|
4318
4318
|
*
|
|
4319
4319
|
* Versioned because the entry shape may evolve (e.g. when variable-axis
|
|
4320
|
-
* glyph deltas ever ride with the document). Readers
|
|
4320
|
+
* glyph deltas ever ride with the document). Readers honor `version: 1` only;
|
|
4321
4321
|
* future versions will get explicit migration code in `migrateSnapshot`.
|
|
4322
4322
|
*/
|
|
4323
4323
|
interface SerializedColorGlyphLibrary {
|
|
@@ -4325,7 +4325,7 @@ interface SerializedColorGlyphLibrary {
|
|
|
4325
4325
|
entries: SerializedColorGlyph[];
|
|
4326
4326
|
}
|
|
4327
4327
|
/**
|
|
4328
|
-
* One color glyph in the library. All fields are JSON-
|
|
4328
|
+
* One color glyph in the library. All fields are JSON-serializable;
|
|
4329
4329
|
* the SVG document is stored as a string, not parsed, so round-tripping
|
|
4330
4330
|
* preserves whatever DOM the user authored byte-for-byte.
|
|
4331
4331
|
*/
|
|
@@ -4860,8 +4860,8 @@ interface FilterLibraryDef extends LibraryDefBase {
|
|
|
4860
4860
|
* do for an unlinked shape (the mirroring contract in types/appearance.ts).
|
|
4861
4861
|
* The style therefore shares STRUCTURE - how many passes, in what order, with
|
|
4862
4862
|
* which extra paints and per-layer effects - while each shape keeps its own
|
|
4863
|
-
* core
|
|
4864
|
-
* style serve twelve differently-
|
|
4863
|
+
* core color and stroke width. That split is what lets one "Sticker Outline"
|
|
4864
|
+
* style serve twelve differently-colored icons.
|
|
4865
4865
|
*
|
|
4866
4866
|
* Deliberately NOT included: element opacity and blend mode. Those act on the
|
|
4867
4867
|
* composed result rather than on any one paint operation (the split declared by
|
|
@@ -4878,7 +4878,7 @@ interface AppearanceStyleLibraryDef extends LibraryDefBase {
|
|
|
4878
4878
|
* into the wearing shape's base props, so the shape looks like the style
|
|
4879
4879
|
* immediately; from then on the shape's own props answer for those two slots
|
|
4880
4880
|
* and the seed is inert. That is what lets one style serve twelve
|
|
4881
|
-
* differently-
|
|
4881
|
+
* differently-colored icons while still transferring its whole look on the
|
|
4882
4882
|
* click that applies it.
|
|
4883
4883
|
*/
|
|
4884
4884
|
layers: AppearanceLayer[];
|
|
@@ -4962,7 +4962,7 @@ declare function shapeAppearanceStyle(state: SerializedShapeState, styles: Appea
|
|
|
4962
4962
|
* In all three the first layer of each kind takes its paint from the base
|
|
4963
4963
|
* props, so the two homes cannot report different paint — and so a style shares
|
|
4964
4964
|
* the shape of an appearance without flattening every shape wearing it to one
|
|
4965
|
-
*
|
|
4965
|
+
* color. `styles` is what a caller passes to make the first case reachable;
|
|
4966
4966
|
* omitting it resolves the other two exactly as before graphic styles existed.
|
|
4967
4967
|
*
|
|
4968
4968
|
* `paint-order` is deliberately NOT applied here. It permutes the base fill
|
|
@@ -6023,7 +6023,7 @@ declare function findShapeById(shapes: SerializedShape[], id: string): Serialize
|
|
|
6023
6023
|
* THE CORRECTION A SENDER IS OWED.
|
|
6024
6024
|
*
|
|
6025
6025
|
* A client applies its own operation locally before sending it, then gets
|
|
6026
|
-
* an
|
|
6026
|
+
* an acknowledgment. The ack says the batch was processed; the client
|
|
6027
6027
|
* reads it as "this is server state now" and drops the ops from the buffer
|
|
6028
6028
|
* that exists to replay them. Those claims coincide only when the server's
|
|
6029
6029
|
* projection of an operation matches what the sender applied — and it does
|
|
@@ -6333,7 +6333,7 @@ declare function around(origin: Point, operation: Affine2D): Affine2D;
|
|
|
6333
6333
|
* ancestor chain, a `<use>` wrapper - must use this rather than
|
|
6334
6334
|
* {@link parseSvgTransformList} and drop only the invalid element's
|
|
6335
6335
|
* contribution. Each element's `transform` is its own CSS declaration, so
|
|
6336
|
-
* one element's invalid value must not invalidate its
|
|
6336
|
+
* one element's invalid value must not invalidate its neighbors'.
|
|
6337
6337
|
*/
|
|
6338
6338
|
declare function tryParseSvgTransformList(transform: string): Affine2D | null;
|
|
6339
6339
|
/**
|
|
@@ -9154,14 +9154,14 @@ declare function assertIngestPolicyRegistry(intents?: readonly IngressIntent[],
|
|
|
9154
9154
|
* - `collab`: the op kinds that carry the field over the collaboration
|
|
9155
9155
|
* wire, or a written-down exemption. Subsumes the FIELD_OPS /
|
|
9156
9156
|
* NOT_COLLABORATED tables that previously lived only in
|
|
9157
|
-
* tests/model/document-field-
|
|
9157
|
+
* tests/model/document-field-enrollment.test.ts.
|
|
9158
9158
|
* - `rendered`: the capability decision for every registered render
|
|
9159
9159
|
* target. Each cell names the consumer or records why the field is
|
|
9160
9160
|
* outside that target's contract.
|
|
9161
9161
|
*
|
|
9162
9162
|
* WHY: before this registry, the contract was re-enumerated by hand in the
|
|
9163
9163
|
* serializer's section list, the validation roster, the precision walker,
|
|
9164
|
-
* and the
|
|
9164
|
+
* and the enrollment test — and the serializer's copy had silently drifted
|
|
9165
9165
|
* (it omitted `exportItems`, so every `.svgs` save dropped the user's
|
|
9166
9166
|
* export profile; 2026-08 architectural review). The compile gates below
|
|
9167
9167
|
* make that class of drift a type error: adding a `HistorySnapshot` field
|
|
@@ -9264,9 +9264,9 @@ interface DocumentFieldDescriptor {
|
|
|
9264
9264
|
/** Deprecation note naming the successor; presence = deprecated. */
|
|
9265
9265
|
deprecated?: string;
|
|
9266
9266
|
/**
|
|
9267
|
-
* Collab
|
|
9267
|
+
* Collab enrollment: either the op kinds that carry this field (each
|
|
9268
9268
|
* spelling compile-checked against the Operation union, and checked
|
|
9269
|
-
* against the reducer by the
|
|
9269
|
+
* against the reducer by the enrollment test), or a written exemption
|
|
9270
9270
|
* whose reason must survive review (>= 40 chars, test-enforced).
|
|
9271
9271
|
*/
|
|
9272
9272
|
collab: {
|
|
@@ -9275,7 +9275,7 @@ interface DocumentFieldDescriptor {
|
|
|
9275
9275
|
exempt: string;
|
|
9276
9276
|
};
|
|
9277
9277
|
/**
|
|
9278
|
-
* Per-target render
|
|
9278
|
+
* Per-target render enrollment. Every cell either names the consumer or
|
|
9279
9279
|
* gives a permanent exemption reason (>= 40 chars, test-enforced).
|
|
9280
9280
|
* Before this facet, output targets independently omitted document
|
|
9281
9281
|
* fields without a complete, reviewable contract.
|
|
@@ -10855,7 +10855,7 @@ type VersionsBelow<N extends number, Acc extends number[] = []> = Acc['length']
|
|
|
10855
10855
|
* literal-typed, bumping it without registering the new step makes the
|
|
10856
10856
|
* `satisfies` gate below a COMPILE error (and registering a step for the
|
|
10857
10857
|
* current version before bumping is an excess-property error) — the
|
|
10858
|
-
* four-step
|
|
10858
|
+
* four-step enrollment checklist in the module header is no longer
|
|
10859
10859
|
* honor-system.
|
|
10860
10860
|
*/
|
|
10861
10861
|
type MigratableVersion = Exclude<VersionsBelow<typeof CURRENT_SCHEMA_VERSION>, 0>;
|
|
@@ -11497,7 +11497,7 @@ declare function dedupeFontFaces(faces: readonly FontFaceRequest[]): FontFaceReq
|
|
|
11497
11497
|
*
|
|
11498
11498
|
* CSS font matching falls back per glyph: name a family that has no glyph for a
|
|
11499
11499
|
* character and the browser silently substitutes one that does. That is correct
|
|
11500
|
-
*
|
|
11500
|
+
* behavior and it is invisible, so an editor whose font list cannot serve the
|
|
11501
11501
|
* user's script does not fail - it just stops responding to the font picker.
|
|
11502
11502
|
* Every family renders identically, because every family is being substituted
|
|
11503
11503
|
* by the same system fallback. This module exists so the editor can tell the
|
|
@@ -12060,7 +12060,7 @@ declare function createSvgDestinationIdAllocator(seed: SvgDestinationIdentityInd
|
|
|
12060
12060
|
* - the headless renderer, which emits the definition and the href;
|
|
12061
12061
|
* - the destination-identity registry, which reserves the id in the
|
|
12062
12062
|
* `shape-generated` channel so authored ids cannot collide with it;
|
|
12063
|
-
* - the SVG importer, which
|
|
12063
|
+
* - the SVG importer, which recognizes a parked path carrying this
|
|
12064
12064
|
* spelling (and referenced by exactly one `<textPath>`) as the text's
|
|
12065
12065
|
* own inline geometry rather than a shared library definition, so an
|
|
12066
12066
|
* exported document round-trips to the same inline text and its
|
|
@@ -12222,7 +12222,7 @@ interface VocabularyProjection {
|
|
|
12222
12222
|
/**
|
|
12223
12223
|
* Attribute local names this projection read into canonical state.
|
|
12224
12224
|
*
|
|
12225
|
-
* Must be non-empty. These stop
|
|
12225
|
+
* Must be non-empty. These stop traveling as inert `foreignAttrs` and are
|
|
12226
12226
|
* regenerated by `emit`, so canonical state becomes their single source. A
|
|
12227
12227
|
* projection that consumed nothing would leave the authored values in place
|
|
12228
12228
|
* to drift out of agreement with the geometry the user then edits.
|
|
@@ -15230,7 +15230,7 @@ declare function filterAttr(shapeId: string, filters: ShapeFilter[] | undefined,
|
|
|
15230
15230
|
* referenced element are *cloned* into the use-element shadow tree (SVG 2
|
|
15231
15231
|
* §5.5.3), and a cloned attribute beats an inherited one — so a `fill` left on
|
|
15232
15232
|
* the definition would be unoverridable by every `<use>` that references it,
|
|
15233
|
-
* and every layer would paint the same
|
|
15233
|
+
* and every layer would paint the same color. This is a correctness trap, not
|
|
15234
15234
|
* a style preference, and it is what {@link geometryState} exists to prevent.
|
|
15235
15235
|
*
|
|
15236
15236
|
* **Each layer states its whole paint, including what it does not paint.** A
|
|
@@ -15263,7 +15263,7 @@ declare const LAYER_PRESENTATION_IDS: ReadonlySet<PresentationSemanticId>;
|
|
|
15263
15263
|
declare const WRAPPER_PRESENTATION_IDS: ReadonlySet<PresentationSemanticId>;
|
|
15264
15264
|
/**
|
|
15265
15265
|
* Paint properties a shape authored through its inline style or its passthrough
|
|
15266
|
-
* attribute bag, which the stack cannot faithfully
|
|
15266
|
+
* attribute bag, which the stack cannot faithfully honor.
|
|
15267
15267
|
*
|
|
15268
15268
|
* A CSS declaration outranks a presentation attribute on the same element, so
|
|
15269
15269
|
* `style="stroke:red"` on a single-element shape overrides that shape's own
|
|
@@ -15653,7 +15653,7 @@ declare function pathNodeTracksAreSuperseded(tracks: readonly AnimationTrack[],
|
|
|
15653
15653
|
* Write one per-vertex channel's value into a point list, in place.
|
|
15654
15654
|
*
|
|
15655
15655
|
* This is what a per-vertex channel *means*: it moves the addressed
|
|
15656
|
-
* vertex's x or y and touches nothing else — not the
|
|
15656
|
+
* vertex's x or y and touches nothing else — not the neighboring
|
|
15657
15657
|
* vertices, and deliberately not the vertex's own handles, which are
|
|
15658
15658
|
* absolute coordinates that stay put so the adjacent curve deforms.
|
|
15659
15659
|
*
|
|
@@ -15818,7 +15818,7 @@ declare function getPatternElements(type: string, size: number, color: string, p
|
|
|
15818
15818
|
* Result of generating pattern SVG content from a preset.
|
|
15819
15819
|
*/
|
|
15820
15820
|
interface PatternSvgContentResult {
|
|
15821
|
-
/**
|
|
15821
|
+
/** Serialized SVG markup for the pattern tile (goes inside `<pattern>`). */
|
|
15822
15822
|
svgContent: string;
|
|
15823
15823
|
/** Tile width in user-space units. */
|
|
15824
15824
|
width: number;
|
|
@@ -17016,7 +17016,7 @@ declare abstract class ShapeBuilder<T extends ShapeBuilder<T>> {
|
|
|
17016
17016
|
/**
|
|
17017
17017
|
* Add another stroke on top of everything painted so far.
|
|
17018
17018
|
*
|
|
17019
|
-
* Widest first is the usual ordering: a stroke is
|
|
17019
|
+
* Widest first is the usual ordering: a stroke is centered on the edge, so a
|
|
17020
17020
|
* narrower one added afterwards paints over the middle of a wider one and
|
|
17021
17021
|
* leaves a band of it showing on each side.
|
|
17022
17022
|
*/
|
|
@@ -18604,7 +18604,7 @@ type AlphaMode = 'premultiplied' | 'straight';
|
|
|
18604
18604
|
declare function assertRasterImage(image: RasterImage, context: string): void;
|
|
18605
18605
|
|
|
18606
18606
|
/**
|
|
18607
|
-
* Color science for the raster quality metrics: sRGB
|
|
18607
|
+
* Color science for the raster quality metrics: sRGB linearization, CIE Lab
|
|
18608
18608
|
* under D65, and the CIEDE2000 color difference.
|
|
18609
18609
|
*
|
|
18610
18610
|
* Every formula follows the published definition (IEC 61966-2-1 for sRGB,
|
|
@@ -18683,7 +18683,7 @@ declare function ssimPlane(x: Float64Array, y: Float64Array, width: number, heig
|
|
|
18683
18683
|
*
|
|
18684
18684
|
* This scores spatial coherence instead. Pixels differing beyond a perceptual
|
|
18685
18685
|
* threshold are morphologically opened - a pixel survives only when enough of
|
|
18686
|
-
* its
|
|
18686
|
+
* its neighbors also differ - which deletes single-pixel edge filaments while
|
|
18687
18687
|
* leaving solid regions intact. Survivors are grouped into 4-connected
|
|
18688
18688
|
* clusters, and the penalty is driven by the sum of squared cluster areas, so
|
|
18689
18689
|
* one 400-pixel blob outweighs 400 scattered singles by a factor of 400
|
|
@@ -18696,10 +18696,12 @@ interface SeverityOptions {
|
|
|
18696
18696
|
*/
|
|
18697
18697
|
threshold?: number;
|
|
18698
18698
|
/**
|
|
18699
|
-
* How many of a differing pixel's 8
|
|
18699
|
+
* How many of a differing pixel's 8 neighbors must also differ for it to
|
|
18700
18700
|
* survive the open. Default 4: below that the pixel is an edge filament,
|
|
18701
18701
|
* not a region.
|
|
18702
18702
|
*/
|
|
18703
|
+
minNeighbors?: number;
|
|
18704
|
+
/** The option's former spelling; `minNeighbors` wins when both are given. */
|
|
18703
18705
|
minNeighbours?: number;
|
|
18704
18706
|
}
|
|
18705
18707
|
interface SeverityReport {
|
package/dist/index.d.ts
CHANGED
|
@@ -685,7 +685,7 @@ interface AnimatablePropertyDescriptor {
|
|
|
685
685
|
* i18n key for the display label, resolved by the host at render time.
|
|
686
686
|
*
|
|
687
687
|
* The label cannot be derived from `key` alone - the same key means
|
|
688
|
-
* different things on different shapes (a circle's `x` is a
|
|
688
|
+
* different things on different shapes (a circle's `x` is a center, a
|
|
689
689
|
* rectangle's is a corner), so the descriptor is the only place that
|
|
690
690
|
* knows what to call it.
|
|
691
691
|
*/
|
|
@@ -1015,7 +1015,7 @@ interface PatternFill {
|
|
|
1015
1015
|
/** Per-preset tuneable geometry parameters (stroke width, dot radius …). */
|
|
1016
1016
|
patternParams?: PatternParams;
|
|
1017
1017
|
/**
|
|
1018
|
-
*
|
|
1018
|
+
* Serialized inner markup of the `<pattern>` tile.
|
|
1019
1019
|
* When present this is used **instead of** generating content from the
|
|
1020
1020
|
* preset helpers — it can contain arbitrary SVG (rects, paths, images …).
|
|
1021
1021
|
*/
|
|
@@ -1060,14 +1060,14 @@ interface PatternFill {
|
|
|
1060
1060
|
type GradientDefinition = LinearGradient | RadialGradient | PatternFill;
|
|
1061
1061
|
/**
|
|
1062
1062
|
* A user-defined custom pattern stored in the document.
|
|
1063
|
-
* Created by
|
|
1063
|
+
* Created by serializing selected shapes into a reusable pattern tile.
|
|
1064
1064
|
*/
|
|
1065
1065
|
interface CustomPatternDef {
|
|
1066
1066
|
/** Unique identifier for this pattern definition. */
|
|
1067
1067
|
id: string;
|
|
1068
1068
|
/** User-assigned name shown in the pattern picker. */
|
|
1069
1069
|
name: string;
|
|
1070
|
-
/**
|
|
1070
|
+
/** Serialized inner SVG markup of the pattern tile. */
|
|
1071
1071
|
svgContent: string;
|
|
1072
1072
|
/** Tile width in userSpaceOnUse coordinates. */
|
|
1073
1073
|
width: number;
|
|
@@ -1338,7 +1338,7 @@ interface InnerGlowFilter extends BaseFilter {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Passthrough for `<filter>` definitions the editor doesn't model as a preset.
|
|
1341
|
-
* The parser
|
|
1341
|
+
* The parser serializes the element's inner markup and authored region
|
|
1342
1342
|
* attributes verbatim; the filter manager re-emits them on render. Absent
|
|
1343
1343
|
* attributes stay `undefined` so the UA applies the SVG spec initial values
|
|
1344
1344
|
* (filterUnits=objectBoundingBox, primitiveUnits=userSpaceOnUse, filter region
|
|
@@ -3223,7 +3223,7 @@ interface CommonNodeProps extends CommonTransformNodeProps {
|
|
|
3223
3223
|
* clears the inline list, and detaching writes it back. The paint of the
|
|
3224
3224
|
* first fill layer and first stroke layer still comes from this shape's own
|
|
3225
3225
|
* base props either way, which is what keeps a shared style from flattening
|
|
3226
|
-
* every shape that wears it to the same
|
|
3226
|
+
* every shape that wears it to the same color.
|
|
3227
3227
|
*
|
|
3228
3228
|
* Absent, present-but-dangling, and present-and-resolvable are three
|
|
3229
3229
|
* different states and only the last changes what the shape paints: a link
|
|
@@ -3316,7 +3316,7 @@ interface CircleNodeProps extends CommonNodeProps {
|
|
|
3316
3316
|
radius: number;
|
|
3317
3317
|
}
|
|
3318
3318
|
/**
|
|
3319
|
-
* An ellipse's
|
|
3319
|
+
* An ellipse's center is `x` / `y`, matching CircleNodeProps and matching
|
|
3320
3320
|
* what the SVG importer writes (`svg-leaf-geometry.ts` normalizes the `cx` /
|
|
3321
3321
|
* `cy` ATTRIBUTES to these prop names for both shapes, and promotes an
|
|
3322
3322
|
* ellipse with equal radii to a circle by reusing the same state). The SVG
|
|
@@ -4263,7 +4263,7 @@ interface HistorySnapshot {
|
|
|
4263
4263
|
* not document state. Only the color-glyph artwork itself rides.
|
|
4264
4264
|
*
|
|
4265
4265
|
* Optional: documents that never opened the foundry have no entry,
|
|
4266
|
-
* and the field is omitted on
|
|
4266
|
+
* and the field is omitted on serialization when the library is empty.
|
|
4267
4267
|
*/
|
|
4268
4268
|
colorGlyphLibrary?: SerializedColorGlyphLibrary;
|
|
4269
4269
|
/**
|
|
@@ -4317,7 +4317,7 @@ interface SerializedExportItem {
|
|
|
4317
4317
|
* editor app.
|
|
4318
4318
|
*
|
|
4319
4319
|
* Versioned because the entry shape may evolve (e.g. when variable-axis
|
|
4320
|
-
* glyph deltas ever ride with the document). Readers
|
|
4320
|
+
* glyph deltas ever ride with the document). Readers honor `version: 1` only;
|
|
4321
4321
|
* future versions will get explicit migration code in `migrateSnapshot`.
|
|
4322
4322
|
*/
|
|
4323
4323
|
interface SerializedColorGlyphLibrary {
|
|
@@ -4325,7 +4325,7 @@ interface SerializedColorGlyphLibrary {
|
|
|
4325
4325
|
entries: SerializedColorGlyph[];
|
|
4326
4326
|
}
|
|
4327
4327
|
/**
|
|
4328
|
-
* One color glyph in the library. All fields are JSON-
|
|
4328
|
+
* One color glyph in the library. All fields are JSON-serializable;
|
|
4329
4329
|
* the SVG document is stored as a string, not parsed, so round-tripping
|
|
4330
4330
|
* preserves whatever DOM the user authored byte-for-byte.
|
|
4331
4331
|
*/
|
|
@@ -4860,8 +4860,8 @@ interface FilterLibraryDef extends LibraryDefBase {
|
|
|
4860
4860
|
* do for an unlinked shape (the mirroring contract in types/appearance.ts).
|
|
4861
4861
|
* The style therefore shares STRUCTURE - how many passes, in what order, with
|
|
4862
4862
|
* which extra paints and per-layer effects - while each shape keeps its own
|
|
4863
|
-
* core
|
|
4864
|
-
* style serve twelve differently-
|
|
4863
|
+
* core color and stroke width. That split is what lets one "Sticker Outline"
|
|
4864
|
+
* style serve twelve differently-colored icons.
|
|
4865
4865
|
*
|
|
4866
4866
|
* Deliberately NOT included: element opacity and blend mode. Those act on the
|
|
4867
4867
|
* composed result rather than on any one paint operation (the split declared by
|
|
@@ -4878,7 +4878,7 @@ interface AppearanceStyleLibraryDef extends LibraryDefBase {
|
|
|
4878
4878
|
* into the wearing shape's base props, so the shape looks like the style
|
|
4879
4879
|
* immediately; from then on the shape's own props answer for those two slots
|
|
4880
4880
|
* and the seed is inert. That is what lets one style serve twelve
|
|
4881
|
-
* differently-
|
|
4881
|
+
* differently-colored icons while still transferring its whole look on the
|
|
4882
4882
|
* click that applies it.
|
|
4883
4883
|
*/
|
|
4884
4884
|
layers: AppearanceLayer[];
|
|
@@ -4962,7 +4962,7 @@ declare function shapeAppearanceStyle(state: SerializedShapeState, styles: Appea
|
|
|
4962
4962
|
* In all three the first layer of each kind takes its paint from the base
|
|
4963
4963
|
* props, so the two homes cannot report different paint — and so a style shares
|
|
4964
4964
|
* the shape of an appearance without flattening every shape wearing it to one
|
|
4965
|
-
*
|
|
4965
|
+
* color. `styles` is what a caller passes to make the first case reachable;
|
|
4966
4966
|
* omitting it resolves the other two exactly as before graphic styles existed.
|
|
4967
4967
|
*
|
|
4968
4968
|
* `paint-order` is deliberately NOT applied here. It permutes the base fill
|
|
@@ -6023,7 +6023,7 @@ declare function findShapeById(shapes: SerializedShape[], id: string): Serialize
|
|
|
6023
6023
|
* THE CORRECTION A SENDER IS OWED.
|
|
6024
6024
|
*
|
|
6025
6025
|
* A client applies its own operation locally before sending it, then gets
|
|
6026
|
-
* an
|
|
6026
|
+
* an acknowledgment. The ack says the batch was processed; the client
|
|
6027
6027
|
* reads it as "this is server state now" and drops the ops from the buffer
|
|
6028
6028
|
* that exists to replay them. Those claims coincide only when the server's
|
|
6029
6029
|
* projection of an operation matches what the sender applied — and it does
|
|
@@ -6333,7 +6333,7 @@ declare function around(origin: Point, operation: Affine2D): Affine2D;
|
|
|
6333
6333
|
* ancestor chain, a `<use>` wrapper - must use this rather than
|
|
6334
6334
|
* {@link parseSvgTransformList} and drop only the invalid element's
|
|
6335
6335
|
* contribution. Each element's `transform` is its own CSS declaration, so
|
|
6336
|
-
* one element's invalid value must not invalidate its
|
|
6336
|
+
* one element's invalid value must not invalidate its neighbors'.
|
|
6337
6337
|
*/
|
|
6338
6338
|
declare function tryParseSvgTransformList(transform: string): Affine2D | null;
|
|
6339
6339
|
/**
|
|
@@ -9154,14 +9154,14 @@ declare function assertIngestPolicyRegistry(intents?: readonly IngressIntent[],
|
|
|
9154
9154
|
* - `collab`: the op kinds that carry the field over the collaboration
|
|
9155
9155
|
* wire, or a written-down exemption. Subsumes the FIELD_OPS /
|
|
9156
9156
|
* NOT_COLLABORATED tables that previously lived only in
|
|
9157
|
-
* tests/model/document-field-
|
|
9157
|
+
* tests/model/document-field-enrollment.test.ts.
|
|
9158
9158
|
* - `rendered`: the capability decision for every registered render
|
|
9159
9159
|
* target. Each cell names the consumer or records why the field is
|
|
9160
9160
|
* outside that target's contract.
|
|
9161
9161
|
*
|
|
9162
9162
|
* WHY: before this registry, the contract was re-enumerated by hand in the
|
|
9163
9163
|
* serializer's section list, the validation roster, the precision walker,
|
|
9164
|
-
* and the
|
|
9164
|
+
* and the enrollment test — and the serializer's copy had silently drifted
|
|
9165
9165
|
* (it omitted `exportItems`, so every `.svgs` save dropped the user's
|
|
9166
9166
|
* export profile; 2026-08 architectural review). The compile gates below
|
|
9167
9167
|
* make that class of drift a type error: adding a `HistorySnapshot` field
|
|
@@ -9264,9 +9264,9 @@ interface DocumentFieldDescriptor {
|
|
|
9264
9264
|
/** Deprecation note naming the successor; presence = deprecated. */
|
|
9265
9265
|
deprecated?: string;
|
|
9266
9266
|
/**
|
|
9267
|
-
* Collab
|
|
9267
|
+
* Collab enrollment: either the op kinds that carry this field (each
|
|
9268
9268
|
* spelling compile-checked against the Operation union, and checked
|
|
9269
|
-
* against the reducer by the
|
|
9269
|
+
* against the reducer by the enrollment test), or a written exemption
|
|
9270
9270
|
* whose reason must survive review (>= 40 chars, test-enforced).
|
|
9271
9271
|
*/
|
|
9272
9272
|
collab: {
|
|
@@ -9275,7 +9275,7 @@ interface DocumentFieldDescriptor {
|
|
|
9275
9275
|
exempt: string;
|
|
9276
9276
|
};
|
|
9277
9277
|
/**
|
|
9278
|
-
* Per-target render
|
|
9278
|
+
* Per-target render enrollment. Every cell either names the consumer or
|
|
9279
9279
|
* gives a permanent exemption reason (>= 40 chars, test-enforced).
|
|
9280
9280
|
* Before this facet, output targets independently omitted document
|
|
9281
9281
|
* fields without a complete, reviewable contract.
|
|
@@ -10855,7 +10855,7 @@ type VersionsBelow<N extends number, Acc extends number[] = []> = Acc['length']
|
|
|
10855
10855
|
* literal-typed, bumping it without registering the new step makes the
|
|
10856
10856
|
* `satisfies` gate below a COMPILE error (and registering a step for the
|
|
10857
10857
|
* current version before bumping is an excess-property error) — the
|
|
10858
|
-
* four-step
|
|
10858
|
+
* four-step enrollment checklist in the module header is no longer
|
|
10859
10859
|
* honor-system.
|
|
10860
10860
|
*/
|
|
10861
10861
|
type MigratableVersion = Exclude<VersionsBelow<typeof CURRENT_SCHEMA_VERSION>, 0>;
|
|
@@ -11497,7 +11497,7 @@ declare function dedupeFontFaces(faces: readonly FontFaceRequest[]): FontFaceReq
|
|
|
11497
11497
|
*
|
|
11498
11498
|
* CSS font matching falls back per glyph: name a family that has no glyph for a
|
|
11499
11499
|
* character and the browser silently substitutes one that does. That is correct
|
|
11500
|
-
*
|
|
11500
|
+
* behavior and it is invisible, so an editor whose font list cannot serve the
|
|
11501
11501
|
* user's script does not fail - it just stops responding to the font picker.
|
|
11502
11502
|
* Every family renders identically, because every family is being substituted
|
|
11503
11503
|
* by the same system fallback. This module exists so the editor can tell the
|
|
@@ -12060,7 +12060,7 @@ declare function createSvgDestinationIdAllocator(seed: SvgDestinationIdentityInd
|
|
|
12060
12060
|
* - the headless renderer, which emits the definition and the href;
|
|
12061
12061
|
* - the destination-identity registry, which reserves the id in the
|
|
12062
12062
|
* `shape-generated` channel so authored ids cannot collide with it;
|
|
12063
|
-
* - the SVG importer, which
|
|
12063
|
+
* - the SVG importer, which recognizes a parked path carrying this
|
|
12064
12064
|
* spelling (and referenced by exactly one `<textPath>`) as the text's
|
|
12065
12065
|
* own inline geometry rather than a shared library definition, so an
|
|
12066
12066
|
* exported document round-trips to the same inline text and its
|
|
@@ -12222,7 +12222,7 @@ interface VocabularyProjection {
|
|
|
12222
12222
|
/**
|
|
12223
12223
|
* Attribute local names this projection read into canonical state.
|
|
12224
12224
|
*
|
|
12225
|
-
* Must be non-empty. These stop
|
|
12225
|
+
* Must be non-empty. These stop traveling as inert `foreignAttrs` and are
|
|
12226
12226
|
* regenerated by `emit`, so canonical state becomes their single source. A
|
|
12227
12227
|
* projection that consumed nothing would leave the authored values in place
|
|
12228
12228
|
* to drift out of agreement with the geometry the user then edits.
|
|
@@ -15230,7 +15230,7 @@ declare function filterAttr(shapeId: string, filters: ShapeFilter[] | undefined,
|
|
|
15230
15230
|
* referenced element are *cloned* into the use-element shadow tree (SVG 2
|
|
15231
15231
|
* §5.5.3), and a cloned attribute beats an inherited one — so a `fill` left on
|
|
15232
15232
|
* the definition would be unoverridable by every `<use>` that references it,
|
|
15233
|
-
* and every layer would paint the same
|
|
15233
|
+
* and every layer would paint the same color. This is a correctness trap, not
|
|
15234
15234
|
* a style preference, and it is what {@link geometryState} exists to prevent.
|
|
15235
15235
|
*
|
|
15236
15236
|
* **Each layer states its whole paint, including what it does not paint.** A
|
|
@@ -15263,7 +15263,7 @@ declare const LAYER_PRESENTATION_IDS: ReadonlySet<PresentationSemanticId>;
|
|
|
15263
15263
|
declare const WRAPPER_PRESENTATION_IDS: ReadonlySet<PresentationSemanticId>;
|
|
15264
15264
|
/**
|
|
15265
15265
|
* Paint properties a shape authored through its inline style or its passthrough
|
|
15266
|
-
* attribute bag, which the stack cannot faithfully
|
|
15266
|
+
* attribute bag, which the stack cannot faithfully honor.
|
|
15267
15267
|
*
|
|
15268
15268
|
* A CSS declaration outranks a presentation attribute on the same element, so
|
|
15269
15269
|
* `style="stroke:red"` on a single-element shape overrides that shape's own
|
|
@@ -15653,7 +15653,7 @@ declare function pathNodeTracksAreSuperseded(tracks: readonly AnimationTrack[],
|
|
|
15653
15653
|
* Write one per-vertex channel's value into a point list, in place.
|
|
15654
15654
|
*
|
|
15655
15655
|
* This is what a per-vertex channel *means*: it moves the addressed
|
|
15656
|
-
* vertex's x or y and touches nothing else — not the
|
|
15656
|
+
* vertex's x or y and touches nothing else — not the neighboring
|
|
15657
15657
|
* vertices, and deliberately not the vertex's own handles, which are
|
|
15658
15658
|
* absolute coordinates that stay put so the adjacent curve deforms.
|
|
15659
15659
|
*
|
|
@@ -15818,7 +15818,7 @@ declare function getPatternElements(type: string, size: number, color: string, p
|
|
|
15818
15818
|
* Result of generating pattern SVG content from a preset.
|
|
15819
15819
|
*/
|
|
15820
15820
|
interface PatternSvgContentResult {
|
|
15821
|
-
/**
|
|
15821
|
+
/** Serialized SVG markup for the pattern tile (goes inside `<pattern>`). */
|
|
15822
15822
|
svgContent: string;
|
|
15823
15823
|
/** Tile width in user-space units. */
|
|
15824
15824
|
width: number;
|
|
@@ -17016,7 +17016,7 @@ declare abstract class ShapeBuilder<T extends ShapeBuilder<T>> {
|
|
|
17016
17016
|
/**
|
|
17017
17017
|
* Add another stroke on top of everything painted so far.
|
|
17018
17018
|
*
|
|
17019
|
-
* Widest first is the usual ordering: a stroke is
|
|
17019
|
+
* Widest first is the usual ordering: a stroke is centered on the edge, so a
|
|
17020
17020
|
* narrower one added afterwards paints over the middle of a wider one and
|
|
17021
17021
|
* leaves a band of it showing on each side.
|
|
17022
17022
|
*/
|
|
@@ -18604,7 +18604,7 @@ type AlphaMode = 'premultiplied' | 'straight';
|
|
|
18604
18604
|
declare function assertRasterImage(image: RasterImage, context: string): void;
|
|
18605
18605
|
|
|
18606
18606
|
/**
|
|
18607
|
-
* Color science for the raster quality metrics: sRGB
|
|
18607
|
+
* Color science for the raster quality metrics: sRGB linearization, CIE Lab
|
|
18608
18608
|
* under D65, and the CIEDE2000 color difference.
|
|
18609
18609
|
*
|
|
18610
18610
|
* Every formula follows the published definition (IEC 61966-2-1 for sRGB,
|
|
@@ -18683,7 +18683,7 @@ declare function ssimPlane(x: Float64Array, y: Float64Array, width: number, heig
|
|
|
18683
18683
|
*
|
|
18684
18684
|
* This scores spatial coherence instead. Pixels differing beyond a perceptual
|
|
18685
18685
|
* threshold are morphologically opened - a pixel survives only when enough of
|
|
18686
|
-
* its
|
|
18686
|
+
* its neighbors also differ - which deletes single-pixel edge filaments while
|
|
18687
18687
|
* leaving solid regions intact. Survivors are grouped into 4-connected
|
|
18688
18688
|
* clusters, and the penalty is driven by the sum of squared cluster areas, so
|
|
18689
18689
|
* one 400-pixel blob outweighs 400 scattered singles by a factor of 400
|
|
@@ -18696,10 +18696,12 @@ interface SeverityOptions {
|
|
|
18696
18696
|
*/
|
|
18697
18697
|
threshold?: number;
|
|
18698
18698
|
/**
|
|
18699
|
-
* How many of a differing pixel's 8
|
|
18699
|
+
* How many of a differing pixel's 8 neighbors must also differ for it to
|
|
18700
18700
|
* survive the open. Default 4: below that the pixel is an edge filament,
|
|
18701
18701
|
* not a region.
|
|
18702
18702
|
*/
|
|
18703
|
+
minNeighbors?: number;
|
|
18704
|
+
/** The option's former spelling; `minNeighbors` wins when both are given. */
|
|
18703
18705
|
minNeighbours?: number;
|
|
18704
18706
|
}
|
|
18705
18707
|
interface SeverityReport {
|