@pixerate/editor 0.95.0 → 0.96.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.
@@ -60,7 +60,7 @@ import {
60
60
  validateEffectGradient,
61
61
  validateLayerEffect,
62
62
  validateLayerEffects
63
- } from "../chunk-E2ILRYTJ.js";
63
+ } from "../chunk-KFTQ2PKP.js";
64
64
  import {
65
65
  BLEND_MODES,
66
66
  SurfaceDraft,
@@ -190,4 +190,4 @@ declare function collectTiles(surface: TiledSurface, into: Set<Tile>): void;
190
190
  /** True when two surfaces hold the same pixels (cheap when they share tiles). */
191
191
  declare function surfacesEqual(a: TiledSurface, b: TiledSurface): boolean;
192
192
 
193
- export { readRegion as A, type BlendMode as B, setLum as C, solidSurface as D, surfaceBytes as E, surfaceFromPixels as F, surfacesEqual as G, tileCoord as H, tileKey as I, tileRect as J, tilesInRect as K, translateSurface as L, type MaskSurface as M, uniformTile as N, writeRegion as O, type PixelSurface as P, type RasterRect as R, SurfaceDraft as S, TILE as T, BLEND_MODES as a, type BlendModeInfo as b, type Rgb as c, type Rgba as d, TILE_SHIFT as e, type Tile as f, type TileKey as g, TiledSurface as h, blendChannel as i, blendImageData as j, blendLum as k, blendPixel as l, blendRgb as m, canvasCompositeOperation as n, collectTiles as o, contentBounds as p, emptySurface as q, fillRect as r, finishTile as s, isBlendMode as t, isSeparableBlendMode as u, mixPigment8 as v, mixPigmentRgb as w, normalizeBlendMode as x, packRgba as y, readPixel as z };
193
+ export { readRegion as A, type BlendMode as B, setLum as C, solidSurface as D, surfaceBytes as E, surfaceFromPixels as F, surfacesEqual as G, tileCoord as H, tileKey as I, tileRect as J, tilesInRect as K, translateSurface as L, type MaskSurface as M, uniformTile as N, writeRegion as O, type PixelSurface as P, type RasterRect as R, SurfaceDraft as S, TiledSurface as T, BLEND_MODES as a, type BlendModeInfo as b, type Rgb as c, type Rgba as d, TILE as e, TILE_SHIFT as f, type Tile as g, type TileKey as h, blendChannel as i, blendImageData as j, blendLum as k, blendPixel as l, blendRgb as m, canvasCompositeOperation as n, collectTiles as o, contentBounds as p, emptySurface as q, fillRect as r, finishTile as s, isBlendMode as t, isSeparableBlendMode as u, mixPigment8 as v, mixPigmentRgb as w, normalizeBlendMode as x, packRgba as y, readPixel as z };
@@ -190,4 +190,4 @@ declare function collectTiles(surface: TiledSurface, into: Set<Tile>): void;
190
190
  /** True when two surfaces hold the same pixels (cheap when they share tiles). */
191
191
  declare function surfacesEqual(a: TiledSurface, b: TiledSurface): boolean;
192
192
 
193
- export { readRegion as A, type BlendMode as B, setLum as C, solidSurface as D, surfaceBytes as E, surfaceFromPixels as F, surfacesEqual as G, tileCoord as H, tileKey as I, tileRect as J, tilesInRect as K, translateSurface as L, type MaskSurface as M, uniformTile as N, writeRegion as O, type PixelSurface as P, type RasterRect as R, SurfaceDraft as S, TILE as T, BLEND_MODES as a, type BlendModeInfo as b, type Rgb as c, type Rgba as d, TILE_SHIFT as e, type Tile as f, type TileKey as g, TiledSurface as h, blendChannel as i, blendImageData as j, blendLum as k, blendPixel as l, blendRgb as m, canvasCompositeOperation as n, collectTiles as o, contentBounds as p, emptySurface as q, fillRect as r, finishTile as s, isBlendMode as t, isSeparableBlendMode as u, mixPigment8 as v, mixPigmentRgb as w, normalizeBlendMode as x, packRgba as y, readPixel as z };
193
+ export { readRegion as A, type BlendMode as B, setLum as C, solidSurface as D, surfaceBytes as E, surfaceFromPixels as F, surfacesEqual as G, tileCoord as H, tileKey as I, tileRect as J, tilesInRect as K, translateSurface as L, type MaskSurface as M, uniformTile as N, writeRegion as O, type PixelSurface as P, type RasterRect as R, SurfaceDraft as S, TiledSurface as T, BLEND_MODES as a, type BlendModeInfo as b, type Rgb as c, type Rgba as d, TILE as e, TILE_SHIFT as f, type Tile as g, type TileKey as h, blendChannel as i, blendImageData as j, blendLum as k, blendPixel as l, blendRgb as m, canvasCompositeOperation as n, collectTiles as o, contentBounds as p, emptySurface as q, fillRect as r, finishTile as s, isBlendMode as t, isSeparableBlendMode as u, mixPigment8 as v, mixPigmentRgb as w, normalizeBlendMode as x, packRgba as y, readPixel as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.95.0",
3
+ "version": "0.96.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -124,17 +124,26 @@ batching.
124
124
 
125
125
  1. **Inspect before opening.** `inspect_psd` lists every layer with the type it would become and
126
126
  a status: `mapped` (held exactly), `approximated` (type, smart-object, fill and shape layers
127
- come in as their stored pixels; layer effects are not rendered; Dissolve becomes Normal) or
127
+ come in as their stored pixels; Dissolve becomes Normal; effects with gradient midpoints or
128
+ smoothness, noise gradients, glow jitter, legacy bevels or patterns missing from the file are
129
+ drawn approximately) or
128
130
  `dropped` (Brightness/Contrast, Exposure, Channel Mixer, Gradient Map, Selective Color and
129
131
  Color Lookup adjustments). Tell the user what would be lost before `import_psd` when anything
130
132
  is not `mapped`.
131
- 2. **`import_psd` replaces the document** (one undo step). CMYK, Lab, grayscale, indexed, 16-bit
133
+ 2. **Layer effects come in live**: every Photoshop layer style maps to an effect you can read
134
+ with `list_layer_effects` and change as usual, with the file's patterns (listed in
135
+ `list_layer_effects.patterns`) and its global light. An effects block the editor cannot read
136
+ is kept and written back by `export_psd`, but not drawn; the warnings say so.
137
+ 3. **`import_psd` replaces the document** (one undo step). CMYK, Lab, grayscale, indexed, 16-bit
132
138
  and 32-bit files are converted to 8-bit RGB, and ICC profiles are ignored; the warnings say
133
139
  so. Afterwards work with `list_layers` as usual: there is no Background source image, every
134
140
  pixel comes from the layers.
135
- 3. **`export_psd` writes the stack as it is**, in the source frame: crop and rotation are not
141
+ 4. **`export_psd` writes the stack as it is**, in the source frame: crop and rotation are not
136
142
  applied, layer filters and depth masks are baked, annotation layers are rasterized (only in
137
- a browser). Read its `warnings` and pass them on. The file comes back as base64 (`data`).
143
+ a browser). Effects are written as Photoshop layer styles: an effects block opened from a PSD
144
+ goes back byte for byte while its effects are unchanged, and the patterns effects use (the
145
+ built-in ones too) are embedded. Only the first outer glow, inner glow, bevel, satin and
146
+ pattern overlay of a layer fit in a PSD. Read its `warnings` and pass them on. The file comes back as base64 (`data`).
138
147
 
139
148
  ## Best practices
140
149