@overtone-art/canvas-editor-core 0.3.2 → 0.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 +127 -46
- package/dist/index.d.ts +127 -46
- package/dist/index.global.js +53 -52
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +464 -332
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +441 -305
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/{types-Dh1unrzT.d.mts → types-BNzE_X5M.d.mts} +16 -22
- package/dist/{types-Dh1unrzT.d.ts → types-BNzE_X5M.d.ts} +16 -22
- package/package.json +1 -1
package/dist/node.d.mts
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -74,8 +74,6 @@ interface EditorConfig {
|
|
|
74
74
|
preserveObjectStacking?: boolean;
|
|
75
75
|
unit?: Unit;
|
|
76
76
|
dpi?: number;
|
|
77
|
-
/** Resolve a non-CORS image through a trusted proxy or same-origin store for pattern rendering. */
|
|
78
|
-
patternSourceResolver?: PatternSourceResolver;
|
|
79
77
|
fonts?: FontDefinition[];
|
|
80
78
|
license?: LicenseConfig;
|
|
81
79
|
}
|
|
@@ -161,7 +159,6 @@ interface ImageAdjustments {
|
|
|
161
159
|
/** Range 0 to 1. */
|
|
162
160
|
blur?: number;
|
|
163
161
|
}
|
|
164
|
-
type PatternSourceResolver = (source: string) => Promise<string>;
|
|
165
162
|
interface FontDefinition {
|
|
166
163
|
family: string;
|
|
167
164
|
/** URL, data URL, or a complete CSS FontFace source such as `local(...)`. */
|
|
@@ -346,28 +343,25 @@ interface PatternLocks {
|
|
|
346
343
|
lockRotation: boolean;
|
|
347
344
|
hasControls: boolean;
|
|
348
345
|
}
|
|
349
|
-
/**
|
|
346
|
+
/**
|
|
347
|
+
* Persisted on a layer's meta while it is tiled across the print area.
|
|
348
|
+
*
|
|
349
|
+
* Current states carry `config` and nothing else: the layer keeps its real
|
|
350
|
+
* object and the tiling is drawn by a render proxy, so there is no "original"
|
|
351
|
+
* to remember. The `original*` fields belong to states written by the engine
|
|
352
|
+
* that baked the tiled bitmap into the layer; they are read once, on restore,
|
|
353
|
+
* to put the artwork back (see `PatternManager.rehydrateAll`).
|
|
354
|
+
*/
|
|
350
355
|
interface PatternState {
|
|
351
356
|
config: PatternConfig;
|
|
352
|
-
/**
|
|
353
|
-
originalSrc
|
|
354
|
-
/**
|
|
355
|
-
* Serialized `clipPath` the image carried before it became a pattern, or null
|
|
356
|
-
* if it had none. A pattern must fill the whole print area, so any pre-pattern
|
|
357
|
-
* clip (e.g. a template crop sized to the original box) is stripped while the
|
|
358
|
-
* pattern is on and re-applied when it is turned off. Persisted so it survives
|
|
359
|
-
* serialization / reload / undo.
|
|
360
|
-
*/
|
|
357
|
+
/** Legacy: pre-bake image source, as a durable data URL when possible. */
|
|
358
|
+
originalSrc?: string;
|
|
359
|
+
/** Legacy: serialized `clipPath` the image carried before it was baked. */
|
|
361
360
|
originalClip?: Record<string, unknown> | null;
|
|
362
|
-
/**
|
|
363
|
-
* Interaction flags the object carried before it became a pattern. A pattern
|
|
364
|
-
* fills the whole print area, so while it is on the object is locked in place
|
|
365
|
-
* (a drag/resize would slide the tiled bitmap off the area and leave a bare
|
|
366
|
-
* band); the captured flags are restored when the pattern is turned off.
|
|
367
|
-
*/
|
|
361
|
+
/** Legacy: interaction flags frozen while the baked bitmap was in place. */
|
|
368
362
|
originalLocks?: PatternLocks;
|
|
369
|
-
/**
|
|
370
|
-
original
|
|
363
|
+
/** Legacy: fabric transform to restore when un-baking. */
|
|
364
|
+
original?: {
|
|
371
365
|
left: number;
|
|
372
366
|
top: number;
|
|
373
367
|
scaleX: number;
|
|
@@ -485,4 +479,4 @@ interface EditorEvents {
|
|
|
485
479
|
};
|
|
486
480
|
}
|
|
487
481
|
|
|
488
|
-
export { type
|
|
482
|
+
export { type TextCurveConfig as $, type MockupOverlay as A, type BackgroundImageOptions as B, type CanvasSizePreset as C, DEFAULT_PATTERN_CONFIG as D, type EditorConfig as E, type FileAdapter as F, type MockupPrintArea as G, type PatternLocks as H, type ImageAdjustments as I, type PatternState as J, type PositioningAdapter as K, type LayerData as L, type MaskBrushOptions as M, type NormalizedLayerPosition as N, type PrintifyPositioning as O, type PatternConfig as P, type ProjectPage as Q, type ProjectState as R, type ResizeOptions as S, type SemanticExportOptions as T, type SerializedBackgroundImageOptions as U, type SerializedLayer as V, type ShapeMaskPresetId as W, type ShapePlugin as X, type SvgExportOptions as Y, type TemplateDefinition as Z, type TemplateParameter as _, type DpiIssue as a, type TextureMaskPresetId as a0, type TileMode as a1, type Unit as a2, type EditorEvents as b, type EditorState as c, type ExportFormat as d, type FontDefinition as e, type ImageAttribution as f, type ImageProvider as g, type ImageProviderResult as h, type ImageSearchOptions as i, type ImageSearchResult as j, type LayerMeta as k, type LayerShadowConfig as l, type LayerType as m, type LicenseConfig as n, type LicensePayload as o, type LicenseStatus as p, type MaskPoint as q, type MaskPresetId as r, type MaskRefinementPrompt as s, type MaskRefinementProvider as t, type MaskRefinementRequest as u, type MaskRefinementResult as v, type MockupBlendMode as w, type MockupConfig as x, type MockupDisplacement as y, type MockupDisplacementChannel as z };
|
|
@@ -74,8 +74,6 @@ interface EditorConfig {
|
|
|
74
74
|
preserveObjectStacking?: boolean;
|
|
75
75
|
unit?: Unit;
|
|
76
76
|
dpi?: number;
|
|
77
|
-
/** Resolve a non-CORS image through a trusted proxy or same-origin store for pattern rendering. */
|
|
78
|
-
patternSourceResolver?: PatternSourceResolver;
|
|
79
77
|
fonts?: FontDefinition[];
|
|
80
78
|
license?: LicenseConfig;
|
|
81
79
|
}
|
|
@@ -161,7 +159,6 @@ interface ImageAdjustments {
|
|
|
161
159
|
/** Range 0 to 1. */
|
|
162
160
|
blur?: number;
|
|
163
161
|
}
|
|
164
|
-
type PatternSourceResolver = (source: string) => Promise<string>;
|
|
165
162
|
interface FontDefinition {
|
|
166
163
|
family: string;
|
|
167
164
|
/** URL, data URL, or a complete CSS FontFace source such as `local(...)`. */
|
|
@@ -346,28 +343,25 @@ interface PatternLocks {
|
|
|
346
343
|
lockRotation: boolean;
|
|
347
344
|
hasControls: boolean;
|
|
348
345
|
}
|
|
349
|
-
/**
|
|
346
|
+
/**
|
|
347
|
+
* Persisted on a layer's meta while it is tiled across the print area.
|
|
348
|
+
*
|
|
349
|
+
* Current states carry `config` and nothing else: the layer keeps its real
|
|
350
|
+
* object and the tiling is drawn by a render proxy, so there is no "original"
|
|
351
|
+
* to remember. The `original*` fields belong to states written by the engine
|
|
352
|
+
* that baked the tiled bitmap into the layer; they are read once, on restore,
|
|
353
|
+
* to put the artwork back (see `PatternManager.rehydrateAll`).
|
|
354
|
+
*/
|
|
350
355
|
interface PatternState {
|
|
351
356
|
config: PatternConfig;
|
|
352
|
-
/**
|
|
353
|
-
originalSrc
|
|
354
|
-
/**
|
|
355
|
-
* Serialized `clipPath` the image carried before it became a pattern, or null
|
|
356
|
-
* if it had none. A pattern must fill the whole print area, so any pre-pattern
|
|
357
|
-
* clip (e.g. a template crop sized to the original box) is stripped while the
|
|
358
|
-
* pattern is on and re-applied when it is turned off. Persisted so it survives
|
|
359
|
-
* serialization / reload / undo.
|
|
360
|
-
*/
|
|
357
|
+
/** Legacy: pre-bake image source, as a durable data URL when possible. */
|
|
358
|
+
originalSrc?: string;
|
|
359
|
+
/** Legacy: serialized `clipPath` the image carried before it was baked. */
|
|
361
360
|
originalClip?: Record<string, unknown> | null;
|
|
362
|
-
/**
|
|
363
|
-
* Interaction flags the object carried before it became a pattern. A pattern
|
|
364
|
-
* fills the whole print area, so while it is on the object is locked in place
|
|
365
|
-
* (a drag/resize would slide the tiled bitmap off the area and leave a bare
|
|
366
|
-
* band); the captured flags are restored when the pattern is turned off.
|
|
367
|
-
*/
|
|
361
|
+
/** Legacy: interaction flags frozen while the baked bitmap was in place. */
|
|
368
362
|
originalLocks?: PatternLocks;
|
|
369
|
-
/**
|
|
370
|
-
original
|
|
363
|
+
/** Legacy: fabric transform to restore when un-baking. */
|
|
364
|
+
original?: {
|
|
371
365
|
left: number;
|
|
372
366
|
top: number;
|
|
373
367
|
scaleX: number;
|
|
@@ -485,4 +479,4 @@ interface EditorEvents {
|
|
|
485
479
|
};
|
|
486
480
|
}
|
|
487
481
|
|
|
488
|
-
export { type
|
|
482
|
+
export { type TextCurveConfig as $, type MockupOverlay as A, type BackgroundImageOptions as B, type CanvasSizePreset as C, DEFAULT_PATTERN_CONFIG as D, type EditorConfig as E, type FileAdapter as F, type MockupPrintArea as G, type PatternLocks as H, type ImageAdjustments as I, type PatternState as J, type PositioningAdapter as K, type LayerData as L, type MaskBrushOptions as M, type NormalizedLayerPosition as N, type PrintifyPositioning as O, type PatternConfig as P, type ProjectPage as Q, type ProjectState as R, type ResizeOptions as S, type SemanticExportOptions as T, type SerializedBackgroundImageOptions as U, type SerializedLayer as V, type ShapeMaskPresetId as W, type ShapePlugin as X, type SvgExportOptions as Y, type TemplateDefinition as Z, type TemplateParameter as _, type DpiIssue as a, type TextureMaskPresetId as a0, type TileMode as a1, type Unit as a2, type EditorEvents as b, type EditorState as c, type ExportFormat as d, type FontDefinition as e, type ImageAttribution as f, type ImageProvider as g, type ImageProviderResult as h, type ImageSearchOptions as i, type ImageSearchResult as j, type LayerMeta as k, type LayerShadowConfig as l, type LayerType as m, type LicenseConfig as n, type LicensePayload as o, type LicenseStatus as p, type MaskPoint as q, type MaskPresetId as r, type MaskRefinementPrompt as s, type MaskRefinementProvider as t, type MaskRefinementRequest as u, type MaskRefinementResult as v, type MockupBlendMode as w, type MockupConfig as x, type MockupDisplacement as y, type MockupDisplacementChannel as z };
|