@pixerate/editor 0.105.0 → 0.106.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.
@@ -442,6 +442,22 @@ declare function getControlPath(obj: unknown, path: string): unknown;
442
442
  declare function setControlPath<T>(obj: T, path: string, value: unknown): T;
443
443
  /** The base adjustment values the control table describes. */
444
444
  declare function readAdjustmentControls(adjustments: ImageAdjustments): Record<string, number>;
445
+ interface ImageFilterPreset {
446
+ id: string;
447
+ label: string;
448
+ adjustments: Partial<ImageAdjustments>;
449
+ }
450
+ /** Built-in colour-grade presets for quick one-click adjustment looks. */
451
+ declare const IMAGE_FILTER_PRESETS: readonly ImageFilterPreset[];
452
+ interface ImageCropPreset {
453
+ id: string;
454
+ label: string;
455
+ aspectRatio: number | null;
456
+ }
457
+ /** Standard aspect-ratio presets for cropping. */
458
+ declare const IMAGE_CROP_PRESETS: readonly ImageCropPreset[];
459
+ /** Numeric controls for depth-mask near/far threshold range. */
460
+ declare const DEPTH_MASK_CONTROLS: readonly ControlSpec[];
445
461
 
446
462
  interface ImageEditorToolProviderOptions {
447
463
  /** Provider id (unique per registry). Default `image-editor`. */
@@ -1086,6 +1102,23 @@ interface SmartFilterRow {
1086
1102
  }
1087
1103
  /** The filter rows of a smart object, top filter first (empty when it has none). */
1088
1104
  declare function smartFilterRows(layer: ImageLayer): SmartFilterRow[];
1105
+ interface NormalizedLayerItem {
1106
+ id: string;
1107
+ name: string;
1108
+ imageUrl: string;
1109
+ thumbnailUrl?: string;
1110
+ visible: boolean;
1111
+ opacity: number;
1112
+ x: number;
1113
+ y: number;
1114
+ width: number;
1115
+ height: number;
1116
+ }
1117
+ /**
1118
+ * Extracts a flat list of normalized layer metadata (0..1 bounds relative to document dimensions
1119
+ * and resolved PNG data-URL thumbnails) from the controller's current V3 layer state.
1120
+ */
1121
+ declare function extractNormalizedLayerItems(controller: ImageEditorController, fallbackImageUrl?: string): NormalizedLayerItem[];
1089
1122
 
1090
1123
  /**
1091
1124
  * The layer effects section's view model, shared by the React and Svelte panels: whether a layer
@@ -1701,4 +1734,4 @@ declare class FreeTransformTool {
1701
1734
  key(e: ShortcutEvent): boolean;
1702
1735
  }
1703
1736
 
1704
- export { ADJUSTMENT_KEYS, ADJUSTMENT_KINDS, ADJUSTMENT_LAYER_CONTROLS, ADJUSTMENT_LAYER_OPACITY_CONTROL, ADJUSTMENT_LUT_SIZE, AS_SHOT_KELVIN, AdjustmentKind, type AdjustmentKindInfo, AdjustmentLayer, AdjustmentLayerMask, AdjustmentLayerNode, AdjustmentLayerOf, AdjustmentParamsMap, Annotation, AnnotationLayer, BACKGROUND_LAYER_ID, BACKGROUND_LAYER_NAME, BLUR_FILTER_ID, BRUSH_OPTION_CONTROLS, BlendMode, type Chromaticity, ColorDistance, CompositorSources, type ControlSection, type ControlSpec, type ControlTrack, type ConvertOptions, CropBox, CurvePoint, D50, D65, DEFAULT_SELECTION_TOOL_OPTIONS, DEVELOP_FILTER_ID, DepthMaskOptions, type DescValue, type Descriptor, DevelopFilter, type DropZone, type EffectControl, EffectPattern, FREE_TRANSFORM_FIELDS, FREE_TRANSFORM_MODE_OPTIONS, type FreeTransformBar, type FreeTransformField, FreeTransformGeometry, FreeTransformInit, FreeTransformMode, FreeTransformResult, FreeTransformSession, FreeTransformTool, type FreeTransformToolOptions, type GestureModifiers, HUE_RANGE_LABELS, HueRange, IDENTITY_MATRIX3, IMAGE_ADJUSTMENT_CONTROLS, IMAGE_EDITOR_STATE_VERSION, ImageAdjustments, ImageEditorController, type ImageEditorDocumentLoad, type ImageEditorToolProviderOptions, ImageHistogram, ImageLayer, ImagePoint, type ImageProcessVersion, ImageProjection, ImageTransform, Interpolation, LATEST_PROCESS_VERSION, LAYER_EFFECT_MENU, LEGACY_PROCESS_VERSION, LUMA_709, LayerCompositor, LayerEffect, LayerEffectKind, type LayerEffectRow, LayerEffects, type LayerEffectsPanelModel, LayerFilter, type LayerMenuAction, type LayerMenuItem, type LayerPanelRow, LayerPlacement, type LayerStack, type LegacyParts, type LegacyViewResult, LevelsChannel, MAX_KELVIN, MIN_KELVIN, MIRED_PER_TEMPERATURE_UNIT, MIXER_MIXING_OPTIONS, MIXER_OPTION_CONTROLS, type Matrix3, MixerLoad, MixerSettings, type MosaicImageDataLike, type MosaicRegion, PAINT_TOOLS, PATTERN_BLOCK_KEYS, PSD_FILE_ACCEPT, PaintGesture, type PaintPointerSample, type PaintTool, type ParsedAdjustment, type ParsedLayerEffects, PixelLayer, type PixelOp, PixelSurface, type PlaneLayout, PsdError, type PsdPattern, Quad, type QuickMaskStyle, REFINE_EDGE_CONTROLS, RasterMask, RasterRect, type ReferenceItem, type RefineEdgeControl, RefineEdgeParams, type RouteInput, SELECTION_MODE_LABELS, SELECTION_TOOLS, SMART_RENDER_MARGIN, SUPPORTED_ADJUSTMENT_KEYS, SelectionGesture, SelectionMask, SelectionMode, type SelectionToolKind, type SelectionToolOptions, SerializedImageEditorState, type ShortcutEvent, type SmartCanvas, SmartContents, SmartDocument, SmartFilter, type SmartFilterRow, SmartFilterStack, SmartObjectLayer, SmartPlacement, type SmartRenderOptions, TINT_SCALE, TONE_LUT_SIZE, TransformAnchor, type TransformHandle, type TransformModifiers, type TransformOverlay, type UnitLevels, VIBRANCE_GREY, Vec2, WARP_GRID_OPTIONS, WARP_STYLE_OPTIONS, type WarpBar, WarpMesh, WarpStyle, XYZ_D50_TO_SRGB, activeAdjustmentLayers, activeSmartFilters, addSmartFilter, addToHistogram, adjustmentKindLabel, adjustmentLayersKey, adjustmentNodeFromLegacy, annotationLayerFor, annotationLayerName, applyAdjustmentLayers, applyAdjustments, applyBoxBlur, applyDepthMask, applyLegacyAdjustments, applyMatrix3, applyOutputStage, applyProcess2Adjustments, applyRegionBlur, applyRegionMosaic, applySmartFilters, backgroundLayer, baseProjection, blackWhiteGray, boxToCurvePoint, bradfordAdaptation, buildToneLut, clampControlValue, colorBalanceChannel, compileAdjustmentLayer, contentsBox, contentsSurface, controlPosition, controlTrackBackground, convertToSmartObject, copySmartObject, coveringRect, createAdjustmentLayer, createImageCaptureSurface, createImageEditTools, createImageEditorToolProvider, createImageEffectTools, createImageLayerTools, createImagePaintTools, createImagePsdTools, createImageSelectionTools, createImageSmartObjectTools, createImageTransformTools, curveLutFromLevels, curvePointToBox, curveSvgPath, decodePlanes, defaultAdjustmentParams, depthRasterMask, describeLayer, describeLayerEffects, describeSelection, developFromAdjustments, developTarget, documentContents, downloadPsd, dropPlacement, dropZone, effectControlChange, emptyHistogram, encodeRle, evaluateAdjustmentLayers, filterMaskCoverage, findAdjustmentControl, findLayerControl, formatControlValue, getControlPath, handlePaintShortcut, hasResampledLegacyMask, hexToRgb, hitTestCurvePoint, hslToRgb, hueRangeTables, hueRangeWeight, hueSaturation, identityCurve, identityLevels, imageEditorStateMigrations, insertCurvePoint, instancesOf, invertMatrix3, isAdjustmentKind, isContentsDecoded, isDefaultDepthMask, isLegacyShape, isPaintTool, isQuarterTurn, kelvinToTemperature, layerBadge, layerEffectControls, layerEffectsBadge, layerEffectsPanel, layerLabel, layerMenu, layerPanelRows, layersFromLegacy, legacyAdjustmentLayer, legacyMaskOf, legacyView, levelsValue, linearSrgbToXy, linearToSrgb, loadImageEditorDocument, maskSummary, mixerLoadResult, moveCurvePoint, moveSmartFilter, mulMatrix3, needsLegacyBase, neutralHueRange, newContentsId, normalizeAdjustmentLayer, normalizeAdjustmentLayers, normalizePlacement, normalizeProcessVersion, normalizeSmartFilter, offsetSmartObject, openPsdFile, parseAdjustmentBlock, parseLfx2, parseLrfx, parsePatternBlock, parseVersionedDescriptor, photoFilterMatrix, placeContents, placementAt, placementBounds, placementGeometry, pointerPressure, posterizeValue, projectQuarterTurn, psdBytesFromBase64, psdFileName, psdPatternToEffectPattern, quickMaskPixels, rangeLightness, rasterContents, rasterMaskFromLegacy, rasterizeSmartObject, readAdjustmentControls, removeAlpha, removeCurvePoint, removeSmartFilter, renderLayeredBase, renderSmartObject, replaceContents, requireSmartObject, rerender, resolveMosaicRegionBounds, rgbToGray, rgbToHsl, rgbUnitToHex, runLayerMenuAction, sampleLut, sampleToneLut, selectionModeFromModifiers, selectionOutline, setControlPath, setSmartFilterMask, setSmartFiltersEnabled, setSmartPlacement, smartFilterRows, splitOverlayAnnotations, srgbToLinear, sumHistograms, tempTintToXy, temperatureToKelvin, toneCurve, toneLuts, updateSmartFilter, uvToXy, versionedDescriptorBytes, vibranceLinear, vibrancePixel, wbMatrix, whiteBalanceFromSample, whiteBalanceMatrix, withFilterMaskSurface, writeAdjustmentBlock, writeLfx2, writePatternBlock, xyToTempTint, xyToUv };
1737
+ export { ADJUSTMENT_KEYS, ADJUSTMENT_KINDS, ADJUSTMENT_LAYER_CONTROLS, ADJUSTMENT_LAYER_OPACITY_CONTROL, ADJUSTMENT_LUT_SIZE, AS_SHOT_KELVIN, AdjustmentKind, type AdjustmentKindInfo, AdjustmentLayer, AdjustmentLayerMask, AdjustmentLayerNode, AdjustmentLayerOf, AdjustmentParamsMap, Annotation, AnnotationLayer, BACKGROUND_LAYER_ID, BACKGROUND_LAYER_NAME, BLUR_FILTER_ID, BRUSH_OPTION_CONTROLS, BlendMode, type Chromaticity, ColorDistance, CompositorSources, type ControlSection, type ControlSpec, type ControlTrack, type ConvertOptions, CropBox, CurvePoint, D50, D65, DEFAULT_SELECTION_TOOL_OPTIONS, DEPTH_MASK_CONTROLS, DEVELOP_FILTER_ID, DepthMaskOptions, type DescValue, type Descriptor, DevelopFilter, type DropZone, type EffectControl, EffectPattern, FREE_TRANSFORM_FIELDS, FREE_TRANSFORM_MODE_OPTIONS, type FreeTransformBar, type FreeTransformField, FreeTransformGeometry, FreeTransformInit, FreeTransformMode, FreeTransformResult, FreeTransformSession, FreeTransformTool, type FreeTransformToolOptions, type GestureModifiers, HUE_RANGE_LABELS, HueRange, IDENTITY_MATRIX3, IMAGE_ADJUSTMENT_CONTROLS, IMAGE_CROP_PRESETS, IMAGE_EDITOR_STATE_VERSION, IMAGE_FILTER_PRESETS, ImageAdjustments, type ImageCropPreset, ImageEditorController, type ImageEditorDocumentLoad, type ImageEditorToolProviderOptions, type ImageFilterPreset, ImageHistogram, ImageLayer, ImagePoint, type ImageProcessVersion, ImageProjection, ImageTransform, Interpolation, LATEST_PROCESS_VERSION, LAYER_EFFECT_MENU, LEGACY_PROCESS_VERSION, LUMA_709, LayerCompositor, LayerEffect, LayerEffectKind, type LayerEffectRow, LayerEffects, type LayerEffectsPanelModel, LayerFilter, type LayerMenuAction, type LayerMenuItem, type LayerPanelRow, LayerPlacement, type LayerStack, type LegacyParts, type LegacyViewResult, LevelsChannel, MAX_KELVIN, MIN_KELVIN, MIRED_PER_TEMPERATURE_UNIT, MIXER_MIXING_OPTIONS, MIXER_OPTION_CONTROLS, type Matrix3, MixerLoad, MixerSettings, type MosaicImageDataLike, type MosaicRegion, type NormalizedLayerItem, PAINT_TOOLS, PATTERN_BLOCK_KEYS, PSD_FILE_ACCEPT, PaintGesture, type PaintPointerSample, type PaintTool, type ParsedAdjustment, type ParsedLayerEffects, PixelLayer, type PixelOp, PixelSurface, type PlaneLayout, PsdError, type PsdPattern, Quad, type QuickMaskStyle, REFINE_EDGE_CONTROLS, RasterMask, RasterRect, type ReferenceItem, type RefineEdgeControl, RefineEdgeParams, type RouteInput, SELECTION_MODE_LABELS, SELECTION_TOOLS, SMART_RENDER_MARGIN, SUPPORTED_ADJUSTMENT_KEYS, SelectionGesture, SelectionMask, SelectionMode, type SelectionToolKind, type SelectionToolOptions, SerializedImageEditorState, type ShortcutEvent, type SmartCanvas, SmartContents, SmartDocument, SmartFilter, type SmartFilterRow, SmartFilterStack, SmartObjectLayer, SmartPlacement, type SmartRenderOptions, TINT_SCALE, TONE_LUT_SIZE, TransformAnchor, type TransformHandle, type TransformModifiers, type TransformOverlay, type UnitLevels, VIBRANCE_GREY, Vec2, WARP_GRID_OPTIONS, WARP_STYLE_OPTIONS, type WarpBar, WarpMesh, WarpStyle, XYZ_D50_TO_SRGB, activeAdjustmentLayers, activeSmartFilters, addSmartFilter, addToHistogram, adjustmentKindLabel, adjustmentLayersKey, adjustmentNodeFromLegacy, annotationLayerFor, annotationLayerName, applyAdjustmentLayers, applyAdjustments, applyBoxBlur, applyDepthMask, applyLegacyAdjustments, applyMatrix3, applyOutputStage, applyProcess2Adjustments, applyRegionBlur, applyRegionMosaic, applySmartFilters, backgroundLayer, baseProjection, blackWhiteGray, boxToCurvePoint, bradfordAdaptation, buildToneLut, clampControlValue, colorBalanceChannel, compileAdjustmentLayer, contentsBox, contentsSurface, controlPosition, controlTrackBackground, convertToSmartObject, copySmartObject, coveringRect, createAdjustmentLayer, createImageCaptureSurface, createImageEditTools, createImageEditorToolProvider, createImageEffectTools, createImageLayerTools, createImagePaintTools, createImagePsdTools, createImageSelectionTools, createImageSmartObjectTools, createImageTransformTools, curveLutFromLevels, curvePointToBox, curveSvgPath, decodePlanes, defaultAdjustmentParams, depthRasterMask, describeLayer, describeLayerEffects, describeSelection, developFromAdjustments, developTarget, documentContents, downloadPsd, dropPlacement, dropZone, effectControlChange, emptyHistogram, encodeRle, evaluateAdjustmentLayers, extractNormalizedLayerItems, filterMaskCoverage, findAdjustmentControl, findLayerControl, formatControlValue, getControlPath, handlePaintShortcut, hasResampledLegacyMask, hexToRgb, hitTestCurvePoint, hslToRgb, hueRangeTables, hueRangeWeight, hueSaturation, identityCurve, identityLevels, imageEditorStateMigrations, insertCurvePoint, instancesOf, invertMatrix3, isAdjustmentKind, isContentsDecoded, isDefaultDepthMask, isLegacyShape, isPaintTool, isQuarterTurn, kelvinToTemperature, layerBadge, layerEffectControls, layerEffectsBadge, layerEffectsPanel, layerLabel, layerMenu, layerPanelRows, layersFromLegacy, legacyAdjustmentLayer, legacyMaskOf, legacyView, levelsValue, linearSrgbToXy, linearToSrgb, loadImageEditorDocument, maskSummary, mixerLoadResult, moveCurvePoint, moveSmartFilter, mulMatrix3, needsLegacyBase, neutralHueRange, newContentsId, normalizeAdjustmentLayer, normalizeAdjustmentLayers, normalizePlacement, normalizeProcessVersion, normalizeSmartFilter, offsetSmartObject, openPsdFile, parseAdjustmentBlock, parseLfx2, parseLrfx, parsePatternBlock, parseVersionedDescriptor, photoFilterMatrix, placeContents, placementAt, placementBounds, placementGeometry, pointerPressure, posterizeValue, projectQuarterTurn, psdBytesFromBase64, psdFileName, psdPatternToEffectPattern, quickMaskPixels, rangeLightness, rasterContents, rasterMaskFromLegacy, rasterizeSmartObject, readAdjustmentControls, removeAlpha, removeCurvePoint, removeSmartFilter, renderLayeredBase, renderSmartObject, replaceContents, requireSmartObject, rerender, resolveMosaicRegionBounds, rgbToGray, rgbToHsl, rgbUnitToHex, runLayerMenuAction, sampleLut, sampleToneLut, selectionModeFromModifiers, selectionOutline, setControlPath, setSmartFilterMask, setSmartFiltersEnabled, setSmartPlacement, smartFilterRows, splitOverlayAnnotations, srgbToLinear, sumHistograms, tempTintToXy, temperatureToKelvin, toneCurve, toneLuts, updateSmartFilter, uvToXy, versionedDescriptorBytes, vibranceLinear, vibrancePixel, wbMatrix, whiteBalanceFromSample, whiteBalanceMatrix, withFilterMaskSurface, writeAdjustmentBlock, writeLfx2, writePatternBlock, xyToTempTint, xyToUv };
@@ -442,6 +442,22 @@ declare function getControlPath(obj: unknown, path: string): unknown;
442
442
  declare function setControlPath<T>(obj: T, path: string, value: unknown): T;
443
443
  /** The base adjustment values the control table describes. */
444
444
  declare function readAdjustmentControls(adjustments: ImageAdjustments): Record<string, number>;
445
+ interface ImageFilterPreset {
446
+ id: string;
447
+ label: string;
448
+ adjustments: Partial<ImageAdjustments>;
449
+ }
450
+ /** Built-in colour-grade presets for quick one-click adjustment looks. */
451
+ declare const IMAGE_FILTER_PRESETS: readonly ImageFilterPreset[];
452
+ interface ImageCropPreset {
453
+ id: string;
454
+ label: string;
455
+ aspectRatio: number | null;
456
+ }
457
+ /** Standard aspect-ratio presets for cropping. */
458
+ declare const IMAGE_CROP_PRESETS: readonly ImageCropPreset[];
459
+ /** Numeric controls for depth-mask near/far threshold range. */
460
+ declare const DEPTH_MASK_CONTROLS: readonly ControlSpec[];
445
461
 
446
462
  interface ImageEditorToolProviderOptions {
447
463
  /** Provider id (unique per registry). Default `image-editor`. */
@@ -1086,6 +1102,23 @@ interface SmartFilterRow {
1086
1102
  }
1087
1103
  /** The filter rows of a smart object, top filter first (empty when it has none). */
1088
1104
  declare function smartFilterRows(layer: ImageLayer): SmartFilterRow[];
1105
+ interface NormalizedLayerItem {
1106
+ id: string;
1107
+ name: string;
1108
+ imageUrl: string;
1109
+ thumbnailUrl?: string;
1110
+ visible: boolean;
1111
+ opacity: number;
1112
+ x: number;
1113
+ y: number;
1114
+ width: number;
1115
+ height: number;
1116
+ }
1117
+ /**
1118
+ * Extracts a flat list of normalized layer metadata (0..1 bounds relative to document dimensions
1119
+ * and resolved PNG data-URL thumbnails) from the controller's current V3 layer state.
1120
+ */
1121
+ declare function extractNormalizedLayerItems(controller: ImageEditorController, fallbackImageUrl?: string): NormalizedLayerItem[];
1089
1122
 
1090
1123
  /**
1091
1124
  * The layer effects section's view model, shared by the React and Svelte panels: whether a layer
@@ -1701,4 +1734,4 @@ declare class FreeTransformTool {
1701
1734
  key(e: ShortcutEvent): boolean;
1702
1735
  }
1703
1736
 
1704
- export { ADJUSTMENT_KEYS, ADJUSTMENT_KINDS, ADJUSTMENT_LAYER_CONTROLS, ADJUSTMENT_LAYER_OPACITY_CONTROL, ADJUSTMENT_LUT_SIZE, AS_SHOT_KELVIN, AdjustmentKind, type AdjustmentKindInfo, AdjustmentLayer, AdjustmentLayerMask, AdjustmentLayerNode, AdjustmentLayerOf, AdjustmentParamsMap, Annotation, AnnotationLayer, BACKGROUND_LAYER_ID, BACKGROUND_LAYER_NAME, BLUR_FILTER_ID, BRUSH_OPTION_CONTROLS, BlendMode, type Chromaticity, ColorDistance, CompositorSources, type ControlSection, type ControlSpec, type ControlTrack, type ConvertOptions, CropBox, CurvePoint, D50, D65, DEFAULT_SELECTION_TOOL_OPTIONS, DEVELOP_FILTER_ID, DepthMaskOptions, type DescValue, type Descriptor, DevelopFilter, type DropZone, type EffectControl, EffectPattern, FREE_TRANSFORM_FIELDS, FREE_TRANSFORM_MODE_OPTIONS, type FreeTransformBar, type FreeTransformField, FreeTransformGeometry, FreeTransformInit, FreeTransformMode, FreeTransformResult, FreeTransformSession, FreeTransformTool, type FreeTransformToolOptions, type GestureModifiers, HUE_RANGE_LABELS, HueRange, IDENTITY_MATRIX3, IMAGE_ADJUSTMENT_CONTROLS, IMAGE_EDITOR_STATE_VERSION, ImageAdjustments, ImageEditorController, type ImageEditorDocumentLoad, type ImageEditorToolProviderOptions, ImageHistogram, ImageLayer, ImagePoint, type ImageProcessVersion, ImageProjection, ImageTransform, Interpolation, LATEST_PROCESS_VERSION, LAYER_EFFECT_MENU, LEGACY_PROCESS_VERSION, LUMA_709, LayerCompositor, LayerEffect, LayerEffectKind, type LayerEffectRow, LayerEffects, type LayerEffectsPanelModel, LayerFilter, type LayerMenuAction, type LayerMenuItem, type LayerPanelRow, LayerPlacement, type LayerStack, type LegacyParts, type LegacyViewResult, LevelsChannel, MAX_KELVIN, MIN_KELVIN, MIRED_PER_TEMPERATURE_UNIT, MIXER_MIXING_OPTIONS, MIXER_OPTION_CONTROLS, type Matrix3, MixerLoad, MixerSettings, type MosaicImageDataLike, type MosaicRegion, PAINT_TOOLS, PATTERN_BLOCK_KEYS, PSD_FILE_ACCEPT, PaintGesture, type PaintPointerSample, type PaintTool, type ParsedAdjustment, type ParsedLayerEffects, PixelLayer, type PixelOp, PixelSurface, type PlaneLayout, PsdError, type PsdPattern, Quad, type QuickMaskStyle, REFINE_EDGE_CONTROLS, RasterMask, RasterRect, type ReferenceItem, type RefineEdgeControl, RefineEdgeParams, type RouteInput, SELECTION_MODE_LABELS, SELECTION_TOOLS, SMART_RENDER_MARGIN, SUPPORTED_ADJUSTMENT_KEYS, SelectionGesture, SelectionMask, SelectionMode, type SelectionToolKind, type SelectionToolOptions, SerializedImageEditorState, type ShortcutEvent, type SmartCanvas, SmartContents, SmartDocument, SmartFilter, type SmartFilterRow, SmartFilterStack, SmartObjectLayer, SmartPlacement, type SmartRenderOptions, TINT_SCALE, TONE_LUT_SIZE, TransformAnchor, type TransformHandle, type TransformModifiers, type TransformOverlay, type UnitLevels, VIBRANCE_GREY, Vec2, WARP_GRID_OPTIONS, WARP_STYLE_OPTIONS, type WarpBar, WarpMesh, WarpStyle, XYZ_D50_TO_SRGB, activeAdjustmentLayers, activeSmartFilters, addSmartFilter, addToHistogram, adjustmentKindLabel, adjustmentLayersKey, adjustmentNodeFromLegacy, annotationLayerFor, annotationLayerName, applyAdjustmentLayers, applyAdjustments, applyBoxBlur, applyDepthMask, applyLegacyAdjustments, applyMatrix3, applyOutputStage, applyProcess2Adjustments, applyRegionBlur, applyRegionMosaic, applySmartFilters, backgroundLayer, baseProjection, blackWhiteGray, boxToCurvePoint, bradfordAdaptation, buildToneLut, clampControlValue, colorBalanceChannel, compileAdjustmentLayer, contentsBox, contentsSurface, controlPosition, controlTrackBackground, convertToSmartObject, copySmartObject, coveringRect, createAdjustmentLayer, createImageCaptureSurface, createImageEditTools, createImageEditorToolProvider, createImageEffectTools, createImageLayerTools, createImagePaintTools, createImagePsdTools, createImageSelectionTools, createImageSmartObjectTools, createImageTransformTools, curveLutFromLevels, curvePointToBox, curveSvgPath, decodePlanes, defaultAdjustmentParams, depthRasterMask, describeLayer, describeLayerEffects, describeSelection, developFromAdjustments, developTarget, documentContents, downloadPsd, dropPlacement, dropZone, effectControlChange, emptyHistogram, encodeRle, evaluateAdjustmentLayers, filterMaskCoverage, findAdjustmentControl, findLayerControl, formatControlValue, getControlPath, handlePaintShortcut, hasResampledLegacyMask, hexToRgb, hitTestCurvePoint, hslToRgb, hueRangeTables, hueRangeWeight, hueSaturation, identityCurve, identityLevels, imageEditorStateMigrations, insertCurvePoint, instancesOf, invertMatrix3, isAdjustmentKind, isContentsDecoded, isDefaultDepthMask, isLegacyShape, isPaintTool, isQuarterTurn, kelvinToTemperature, layerBadge, layerEffectControls, layerEffectsBadge, layerEffectsPanel, layerLabel, layerMenu, layerPanelRows, layersFromLegacy, legacyAdjustmentLayer, legacyMaskOf, legacyView, levelsValue, linearSrgbToXy, linearToSrgb, loadImageEditorDocument, maskSummary, mixerLoadResult, moveCurvePoint, moveSmartFilter, mulMatrix3, needsLegacyBase, neutralHueRange, newContentsId, normalizeAdjustmentLayer, normalizeAdjustmentLayers, normalizePlacement, normalizeProcessVersion, normalizeSmartFilter, offsetSmartObject, openPsdFile, parseAdjustmentBlock, parseLfx2, parseLrfx, parsePatternBlock, parseVersionedDescriptor, photoFilterMatrix, placeContents, placementAt, placementBounds, placementGeometry, pointerPressure, posterizeValue, projectQuarterTurn, psdBytesFromBase64, psdFileName, psdPatternToEffectPattern, quickMaskPixels, rangeLightness, rasterContents, rasterMaskFromLegacy, rasterizeSmartObject, readAdjustmentControls, removeAlpha, removeCurvePoint, removeSmartFilter, renderLayeredBase, renderSmartObject, replaceContents, requireSmartObject, rerender, resolveMosaicRegionBounds, rgbToGray, rgbToHsl, rgbUnitToHex, runLayerMenuAction, sampleLut, sampleToneLut, selectionModeFromModifiers, selectionOutline, setControlPath, setSmartFilterMask, setSmartFiltersEnabled, setSmartPlacement, smartFilterRows, splitOverlayAnnotations, srgbToLinear, sumHistograms, tempTintToXy, temperatureToKelvin, toneCurve, toneLuts, updateSmartFilter, uvToXy, versionedDescriptorBytes, vibranceLinear, vibrancePixel, wbMatrix, whiteBalanceFromSample, whiteBalanceMatrix, withFilterMaskSurface, writeAdjustmentBlock, writeLfx2, writePatternBlock, xyToTempTint, xyToUv };
1737
+ export { ADJUSTMENT_KEYS, ADJUSTMENT_KINDS, ADJUSTMENT_LAYER_CONTROLS, ADJUSTMENT_LAYER_OPACITY_CONTROL, ADJUSTMENT_LUT_SIZE, AS_SHOT_KELVIN, AdjustmentKind, type AdjustmentKindInfo, AdjustmentLayer, AdjustmentLayerMask, AdjustmentLayerNode, AdjustmentLayerOf, AdjustmentParamsMap, Annotation, AnnotationLayer, BACKGROUND_LAYER_ID, BACKGROUND_LAYER_NAME, BLUR_FILTER_ID, BRUSH_OPTION_CONTROLS, BlendMode, type Chromaticity, ColorDistance, CompositorSources, type ControlSection, type ControlSpec, type ControlTrack, type ConvertOptions, CropBox, CurvePoint, D50, D65, DEFAULT_SELECTION_TOOL_OPTIONS, DEPTH_MASK_CONTROLS, DEVELOP_FILTER_ID, DepthMaskOptions, type DescValue, type Descriptor, DevelopFilter, type DropZone, type EffectControl, EffectPattern, FREE_TRANSFORM_FIELDS, FREE_TRANSFORM_MODE_OPTIONS, type FreeTransformBar, type FreeTransformField, FreeTransformGeometry, FreeTransformInit, FreeTransformMode, FreeTransformResult, FreeTransformSession, FreeTransformTool, type FreeTransformToolOptions, type GestureModifiers, HUE_RANGE_LABELS, HueRange, IDENTITY_MATRIX3, IMAGE_ADJUSTMENT_CONTROLS, IMAGE_CROP_PRESETS, IMAGE_EDITOR_STATE_VERSION, IMAGE_FILTER_PRESETS, ImageAdjustments, type ImageCropPreset, ImageEditorController, type ImageEditorDocumentLoad, type ImageEditorToolProviderOptions, type ImageFilterPreset, ImageHistogram, ImageLayer, ImagePoint, type ImageProcessVersion, ImageProjection, ImageTransform, Interpolation, LATEST_PROCESS_VERSION, LAYER_EFFECT_MENU, LEGACY_PROCESS_VERSION, LUMA_709, LayerCompositor, LayerEffect, LayerEffectKind, type LayerEffectRow, LayerEffects, type LayerEffectsPanelModel, LayerFilter, type LayerMenuAction, type LayerMenuItem, type LayerPanelRow, LayerPlacement, type LayerStack, type LegacyParts, type LegacyViewResult, LevelsChannel, MAX_KELVIN, MIN_KELVIN, MIRED_PER_TEMPERATURE_UNIT, MIXER_MIXING_OPTIONS, MIXER_OPTION_CONTROLS, type Matrix3, MixerLoad, MixerSettings, type MosaicImageDataLike, type MosaicRegion, type NormalizedLayerItem, PAINT_TOOLS, PATTERN_BLOCK_KEYS, PSD_FILE_ACCEPT, PaintGesture, type PaintPointerSample, type PaintTool, type ParsedAdjustment, type ParsedLayerEffects, PixelLayer, type PixelOp, PixelSurface, type PlaneLayout, PsdError, type PsdPattern, Quad, type QuickMaskStyle, REFINE_EDGE_CONTROLS, RasterMask, RasterRect, type ReferenceItem, type RefineEdgeControl, RefineEdgeParams, type RouteInput, SELECTION_MODE_LABELS, SELECTION_TOOLS, SMART_RENDER_MARGIN, SUPPORTED_ADJUSTMENT_KEYS, SelectionGesture, SelectionMask, SelectionMode, type SelectionToolKind, type SelectionToolOptions, SerializedImageEditorState, type ShortcutEvent, type SmartCanvas, SmartContents, SmartDocument, SmartFilter, type SmartFilterRow, SmartFilterStack, SmartObjectLayer, SmartPlacement, type SmartRenderOptions, TINT_SCALE, TONE_LUT_SIZE, TransformAnchor, type TransformHandle, type TransformModifiers, type TransformOverlay, type UnitLevels, VIBRANCE_GREY, Vec2, WARP_GRID_OPTIONS, WARP_STYLE_OPTIONS, type WarpBar, WarpMesh, WarpStyle, XYZ_D50_TO_SRGB, activeAdjustmentLayers, activeSmartFilters, addSmartFilter, addToHistogram, adjustmentKindLabel, adjustmentLayersKey, adjustmentNodeFromLegacy, annotationLayerFor, annotationLayerName, applyAdjustmentLayers, applyAdjustments, applyBoxBlur, applyDepthMask, applyLegacyAdjustments, applyMatrix3, applyOutputStage, applyProcess2Adjustments, applyRegionBlur, applyRegionMosaic, applySmartFilters, backgroundLayer, baseProjection, blackWhiteGray, boxToCurvePoint, bradfordAdaptation, buildToneLut, clampControlValue, colorBalanceChannel, compileAdjustmentLayer, contentsBox, contentsSurface, controlPosition, controlTrackBackground, convertToSmartObject, copySmartObject, coveringRect, createAdjustmentLayer, createImageCaptureSurface, createImageEditTools, createImageEditorToolProvider, createImageEffectTools, createImageLayerTools, createImagePaintTools, createImagePsdTools, createImageSelectionTools, createImageSmartObjectTools, createImageTransformTools, curveLutFromLevels, curvePointToBox, curveSvgPath, decodePlanes, defaultAdjustmentParams, depthRasterMask, describeLayer, describeLayerEffects, describeSelection, developFromAdjustments, developTarget, documentContents, downloadPsd, dropPlacement, dropZone, effectControlChange, emptyHistogram, encodeRle, evaluateAdjustmentLayers, extractNormalizedLayerItems, filterMaskCoverage, findAdjustmentControl, findLayerControl, formatControlValue, getControlPath, handlePaintShortcut, hasResampledLegacyMask, hexToRgb, hitTestCurvePoint, hslToRgb, hueRangeTables, hueRangeWeight, hueSaturation, identityCurve, identityLevels, imageEditorStateMigrations, insertCurvePoint, instancesOf, invertMatrix3, isAdjustmentKind, isContentsDecoded, isDefaultDepthMask, isLegacyShape, isPaintTool, isQuarterTurn, kelvinToTemperature, layerBadge, layerEffectControls, layerEffectsBadge, layerEffectsPanel, layerLabel, layerMenu, layerPanelRows, layersFromLegacy, legacyAdjustmentLayer, legacyMaskOf, legacyView, levelsValue, linearSrgbToXy, linearToSrgb, loadImageEditorDocument, maskSummary, mixerLoadResult, moveCurvePoint, moveSmartFilter, mulMatrix3, needsLegacyBase, neutralHueRange, newContentsId, normalizeAdjustmentLayer, normalizeAdjustmentLayers, normalizePlacement, normalizeProcessVersion, normalizeSmartFilter, offsetSmartObject, openPsdFile, parseAdjustmentBlock, parseLfx2, parseLrfx, parsePatternBlock, parseVersionedDescriptor, photoFilterMatrix, placeContents, placementAt, placementBounds, placementGeometry, pointerPressure, posterizeValue, projectQuarterTurn, psdBytesFromBase64, psdFileName, psdPatternToEffectPattern, quickMaskPixels, rangeLightness, rasterContents, rasterMaskFromLegacy, rasterizeSmartObject, readAdjustmentControls, removeAlpha, removeCurvePoint, removeSmartFilter, renderLayeredBase, renderSmartObject, replaceContents, requireSmartObject, rerender, resolveMosaicRegionBounds, rgbToGray, rgbToHsl, rgbUnitToHex, runLayerMenuAction, sampleLut, sampleToneLut, selectionModeFromModifiers, selectionOutline, setControlPath, setSmartFilterMask, setSmartFiltersEnabled, setSmartPlacement, smartFilterRows, splitOverlayAnnotations, srgbToLinear, sumHistograms, tempTintToXy, temperatureToKelvin, toneCurve, toneLuts, updateSmartFilter, uvToXy, versionedDescriptorBytes, vibranceLinear, vibrancePixel, wbMatrix, whiteBalanceFromSample, whiteBalanceMatrix, withFilterMaskSurface, writeAdjustmentBlock, writeLfx2, writePatternBlock, xyToTempTint, xyToUv };
@@ -6898,6 +6898,150 @@ function readAdjustmentControls(adjustments) {
6898
6898
  }
6899
6899
  return out;
6900
6900
  }
6901
+ var IMAGE_FILTER_PRESETS = [
6902
+ {
6903
+ id: "none",
6904
+ label: "Original",
6905
+ adjustments: {
6906
+ brightness: 0,
6907
+ contrast: 0,
6908
+ saturation: 0,
6909
+ exposure: 0,
6910
+ temperature: 0,
6911
+ tint: 0,
6912
+ blur: 0,
6913
+ opacity: 1
6914
+ }
6915
+ },
6916
+ {
6917
+ id: "dramatic",
6918
+ label: "Dramatic",
6919
+ adjustments: {
6920
+ brightness: -5,
6921
+ contrast: 45,
6922
+ saturation: 20,
6923
+ exposure: 5,
6924
+ temperature: -10,
6925
+ tint: 0
6926
+ }
6927
+ },
6928
+ {
6929
+ id: "cyberpunk",
6930
+ label: "Cyberpunk",
6931
+ adjustments: {
6932
+ brightness: 5,
6933
+ contrast: 35,
6934
+ saturation: 55,
6935
+ exposure: 0,
6936
+ temperature: -25,
6937
+ tint: 40
6938
+ }
6939
+ },
6940
+ {
6941
+ id: "vintage",
6942
+ label: "Vintage",
6943
+ adjustments: {
6944
+ brightness: 8,
6945
+ contrast: -15,
6946
+ saturation: -35,
6947
+ exposure: 5,
6948
+ temperature: 35,
6949
+ tint: 10
6950
+ }
6951
+ },
6952
+ {
6953
+ id: "warm",
6954
+ label: "Warm",
6955
+ adjustments: {
6956
+ brightness: 5,
6957
+ contrast: 10,
6958
+ saturation: 15,
6959
+ exposure: 0,
6960
+ temperature: 45,
6961
+ tint: 5
6962
+ }
6963
+ },
6964
+ {
6965
+ id: "cool",
6966
+ label: "Cool",
6967
+ adjustments: {
6968
+ brightness: 0,
6969
+ contrast: 15,
6970
+ saturation: 10,
6971
+ exposure: 0,
6972
+ temperature: -45,
6973
+ tint: -10
6974
+ }
6975
+ },
6976
+ {
6977
+ id: "grayscale",
6978
+ label: "B&W",
6979
+ adjustments: {
6980
+ brightness: 0,
6981
+ contrast: 20,
6982
+ saturation: -100,
6983
+ exposure: 0,
6984
+ temperature: 0,
6985
+ tint: 0
6986
+ }
6987
+ },
6988
+ {
6989
+ id: "noir",
6990
+ label: "Noir",
6991
+ adjustments: {
6992
+ brightness: -15,
6993
+ contrast: 65,
6994
+ saturation: -100,
6995
+ exposure: -5,
6996
+ temperature: 0,
6997
+ tint: 0
6998
+ }
6999
+ },
7000
+ {
7001
+ id: "fade",
7002
+ label: "Fade",
7003
+ adjustments: {
7004
+ brightness: 15,
7005
+ contrast: -25,
7006
+ saturation: -20,
7007
+ exposure: 10,
7008
+ temperature: 10,
7009
+ tint: 0
7010
+ }
7011
+ }
7012
+ ];
7013
+ var IMAGE_CROP_PRESETS = [
7014
+ { id: "free", label: "Free", aspectRatio: null },
7015
+ { id: "1:1", label: "1:1", aspectRatio: 1 },
7016
+ { id: "16:9", label: "16:9", aspectRatio: 16 / 9 },
7017
+ { id: "4:3", label: "4:3", aspectRatio: 4 / 3 },
7018
+ { id: "4:5", label: "4:5", aspectRatio: 4 / 5 },
7019
+ { id: "9:16", label: "9:16", aspectRatio: 9 / 16 }
7020
+ ];
7021
+ var DEPTH_MASK_CONTROLS = [
7022
+ {
7023
+ id: "near",
7024
+ label: "Near Threshold",
7025
+ section: "effects",
7026
+ min: 0,
7027
+ max: 255,
7028
+ step: 1,
7029
+ default: 0,
7030
+ decimals: 0,
7031
+ track: plain
7032
+ },
7033
+ {
7034
+ id: "far",
7035
+ label: "Far Threshold",
7036
+ section: "effects",
7037
+ min: 0,
7038
+ max: 255,
7039
+ step: 1,
7040
+ default: 255,
7041
+ decimals: 0,
7042
+ track: plain
7043
+ }
7044
+ ];
6901
7045
 
6902
7046
  // src/image-editor/selection/tool-options.ts
6903
7047
  var SELECTION_TOOLS = [
@@ -10087,6 +10231,49 @@ function smartFilterRows(layer) {
10087
10231
  }));
10088
10232
  return rows.reverse();
10089
10233
  }
10234
+ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
10235
+ const state = controller.getState();
10236
+ const ctrlLayers = controller.getLayers();
10237
+ if (!ctrlLayers || ctrlLayers.length === 0) return [];
10238
+ const serialized = controller.toJSON();
10239
+ const assets = serialized.assets ?? {};
10240
+ const allSerializedLayers = [];
10241
+ const collectSerialized = (list) => {
10242
+ for (const sl of list) {
10243
+ allSerializedLayers.push(sl);
10244
+ if (sl.children && Array.isArray(sl.children)) {
10245
+ collectSerialized(sl.children);
10246
+ }
10247
+ }
10248
+ };
10249
+ collectSerialized(serialized.layers ?? []);
10250
+ const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
10251
+ const imgW = state.imageDimensions?.width || 1;
10252
+ const imgH = state.imageDimensions?.height || 1;
10253
+ return ctrlLayers.map((l) => {
10254
+ const bounds = controller.getLayerBounds(l.id) || {
10255
+ x: 0,
10256
+ y: 0,
10257
+ width: imgW,
10258
+ height: imgH
10259
+ };
10260
+ const sLayer = sLayerMap.get(l.id);
10261
+ const assetKey = sLayer?.asset;
10262
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (sLayer?.source === "document" ? fallbackImageUrl : "");
10263
+ return {
10264
+ id: l.id,
10265
+ name: l.name || "Untitled Layer",
10266
+ imageUrl: layerDataUrl || fallbackImageUrl,
10267
+ thumbnailUrl: layerDataUrl || void 0,
10268
+ visible: l.visible !== false,
10269
+ opacity: l.opacity ?? 1,
10270
+ x: imgW ? bounds.x / imgW : 0,
10271
+ y: imgH ? bounds.y / imgH : 0,
10272
+ width: imgW ? bounds.width / imgW : 1,
10273
+ height: imgH ? bounds.height / imgH : 1
10274
+ };
10275
+ });
10276
+ }
10090
10277
 
10091
10278
  // src/image-editor/layers/effects-ui.ts
10092
10279
  function layerEffectsPanel(layer) {
@@ -10887,6 +11074,7 @@ export {
10887
11074
  DEFAULT_REFINE_EDGE_PARAMS,
10888
11075
  DEFAULT_SELECTION_TOOL_OPTIONS,
10889
11076
  DEFAULT_TRANSFORM,
11077
+ DEPTH_MASK_CONTROLS,
10890
11078
  DEVELOP_FILTER_ID,
10891
11079
  DIRECT_GAUSSIAN_MAX_SIGMA,
10892
11080
  DabWalker,
@@ -10903,8 +11091,10 @@ export {
10903
11091
  HUE_RANGE_LABELS,
10904
11092
  IDENTITY_MATRIX3,
10905
11093
  IMAGE_ADJUSTMENT_CONTROLS,
11094
+ IMAGE_CROP_PRESETS,
10906
11095
  IMAGE_EDITOR_SCHEMA_VERSION,
10907
11096
  IMAGE_EDITOR_STATE_VERSION,
11097
+ IMAGE_FILTER_PRESETS,
10908
11098
  INTERPOLATIONS,
10909
11099
  ImageEditorController,
10910
11100
  ImageEditorRenderer,
@@ -11117,6 +11307,7 @@ export {
11117
11307
  evaluateAdjustmentLayers,
11118
11308
  expandCoverage,
11119
11309
  exportPsd,
11310
+ extractNormalizedLayerItems,
11120
11311
  featherCoverage,
11121
11312
  fillRect,
11122
11313
  filterMaskCoverage,