@pixerate/editor 0.127.0 → 0.129.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/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/index.d.cts +3 -3
- package/dist/animation-editor/index.d.ts +3 -3
- package/dist/{arrange-BlfgJ_wt.d.ts → arrange-BUREmgD9.d.ts} +1 -1
- package/dist/{arrange-CD6Gh-pd.d.cts → arrange-CKXK_hf7.d.cts} +1 -1
- package/dist/{bezier-DBz0IgEt.d.cts → bezier-CvgQiYRg.d.cts} +1 -1
- package/dist/{bezier-DWI5MEkI.d.ts → bezier-DP4NnJp3.d.ts} +1 -1
- package/dist/{brushTypes-IG7ZZjIN.d.cts → brushTypes-C7N3EBK7.d.cts} +56 -1
- package/dist/{brushTypes-IG7ZZjIN.d.ts → brushTypes-C7N3EBK7.d.ts} +56 -1
- package/dist/{brushstrokeRender-OW6ENCZG.cjs → brushstrokeRender-JNHVEUFG.cjs} +25 -6
- package/dist/brushstrokeRender-JNHVEUFG.cjs.map +1 -0
- package/dist/{brushstrokeRender-7RUITO42.js → brushstrokeRender-SII6MG4R.js} +24 -5
- package/dist/brushstrokeRender-SII6MG4R.js.map +1 -0
- package/dist/{builtins-DMIsnNst.d.cts → builtins-Cc-bH-3U.d.cts} +3 -2
- package/dist/{builtins-B5-ipm5u.d.ts → builtins-ZU1GJnUA.d.ts} +3 -2
- package/dist/canvas/index.cjs +18 -7
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +22 -10
- package/dist/canvas/index.d.ts +22 -10
- package/dist/canvas/index.js +14 -3
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-33SO3QWP.cjs → chunk-DDSO4HS7.cjs} +7 -3
- package/dist/chunk-DDSO4HS7.cjs.map +1 -0
- package/dist/{chunk-AKU2KQ47.cjs → chunk-DFSZO2B5.cjs} +70 -3
- package/dist/chunk-DFSZO2B5.cjs.map +1 -0
- package/dist/{chunk-2SDGZAJR.js → chunk-LSXXAJG3.js} +70 -3
- package/dist/chunk-LSXXAJG3.js.map +1 -0
- package/dist/{chunk-UABQTYQF.js → chunk-SVYE5HIM.js} +6 -2
- package/dist/chunk-SVYE5HIM.js.map +1 -0
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.d.cts +3 -3
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/index.js +1 -1
- package/dist/{export-CcldobdN.d.cts → export-DRzNhrdx.d.cts} +11 -4
- package/dist/{export-PGhOpDmz.d.ts → export-DotEEyXj.d.ts} +11 -4
- package/dist/image-editor/index.cjs +69 -18
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +9 -9
- package/dist/image-editor/index.d.ts +9 -9
- package/dist/image-editor/index.js +63 -12
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-BgqvmGT-.d.cts → opentype-BOewaGQx.d.cts} +1 -1
- package/dist/{opentype-01rMIuQR.d.ts → opentype-sQrF3Ry1.d.ts} +1 -1
- package/dist/paint/index.d.cts +2 -2
- package/dist/paint/index.d.ts +2 -2
- package/dist/paint-editor/index.d.cts +6 -6
- package/dist/paint-editor/index.d.ts +6 -6
- package/dist/{pathfinder-D-h0Imus.d.ts → pathfinder-BwJx0_zM.d.ts} +2 -2
- package/dist/{pathfinder-DgG0Z9Lr.d.cts → pathfinder-CnkW7zLI.d.cts} +2 -2
- package/dist/{rand-CfinE-1c.d.cts → rand-DTXAssW1.d.cts} +4 -4
- package/dist/{rand-DtazXGOB.d.ts → rand-pQQ2sJTk.d.ts} +4 -4
- package/dist/{svg-DLBBPQP9.d.cts → svg-C4LlFnEw.d.cts} +1 -1
- package/dist/{svg-BRLwcibA.d.ts → svg-CUzZa0EO.d.ts} +1 -1
- package/dist/vector/index.d.cts +8 -8
- package/dist/vector/index.d.ts +8 -8
- package/dist/{warp-q8FK5HHi.d.ts → warp-CIsO617e.d.ts} +1 -1
- package/dist/{warp-C13L_GRn.d.cts → warp-D62N_5VK.d.cts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +11 -2
- package/skills/pixerate-image-editor/SKILL.md +1 -1
- package/skills/pixerate-image-editor/references/color-management.md +4 -3
- package/skills/pixerate-vector/SKILL.md +1 -1
- package/skills/pixerate-vector/references/commands.md +1 -0
- package/dist/brushstrokeRender-7RUITO42.js.map +0 -1
- package/dist/brushstrokeRender-OW6ENCZG.cjs.map +0 -1
- package/dist/chunk-2SDGZAJR.js.map +0 -1
- package/dist/chunk-33SO3QWP.cjs.map +0 -1
- package/dist/chunk-AKU2KQ47.cjs.map +0 -1
- package/dist/chunk-UABQTYQF.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { H as Homography, V as Vec2, B as Box, Q as Quad, A as AffineMatrix } from './types-CwMPoRMU.cjs';
|
|
2
|
-
import { T as TextShaper, a as TextFont } from './warp-
|
|
2
|
+
import { T as TextShaper, a as TextFont } from './warp-D62N_5VK.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Perspective (projective) maps between quadrilaterals: Free Distort and Perspective in both the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { H as Homography, V as Vec2, B as Box, Q as Quad, A as AffineMatrix } from './types-CwMPoRMU.js';
|
|
2
|
-
import { T as TextShaper, a as TextFont } from './warp-
|
|
2
|
+
import { T as TextShaper, a as TextFont } from './warp-CIsO617e.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Perspective (projective) maps between quadrilaterals: Free Distort and Perspective in both the
|
package/dist/paint/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bc as PaintMedium, W as WetWorld, be as PaintSample, p as RgbTriple, B as BrushSettings, P as PaintSource, C as CoverageMap, D as Dab } from '../rand-
|
|
2
|
-
export { au as BlenderScratch, k as BlenderSettings, av as DEFAULT_BLENDER, aw as DEFAULT_BRUSH, v as DEFAULT_FLOW, ax as DEFAULT_MIXER, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, ay as DEFAULT_RETOUCH, az as DEFAULT_SMUDGE, aA as DEFAULT_WET_PAPER, y as DEFAULT_WET_PARAMS, aB as DRY_EPS, aC as DabWalker, aD as EMPTY_MIXER_LOAD, aE as EX, aF as EY, aG as ExchangeRates, aH as FLAG_ALIVE, aI as FLAG_BOTTOM, aJ as FLAG_LEFT, aK as FLAG_RIGHT, aL as FLAG_TOP, aM as FLAG_WET, aN as FLAT, aO as FREE_INTERVAL, aP as MAX_BATCH, z as MAX_BRUSH_SIZE, aQ as MAX_TILT_ACCEL, aR as MAX_WET_LANES, aS as MAX_WET_SLOTS, aT as MIXER_DRAIN, aU as MIXER_PICKUP_RATE, aV as MIXING_MODELS, a as MixerLoad, M as MixerSettings, c as MixerStroke, b as MixerTarget, j as MixingModel, aW as OPP, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, aX as PAPER_CAPACITY, aY as PARAM, aZ as PARAM_FLOATS, a_ as PIGMENT_CHANNELS, a$ as PLANE, b0 as PLANE_BYTES, b1 as P_D0, b2 as P_EDGE, b3 as P_FX, b4 as P_FY, b5 as P_H, b6 as P_P0, b7 as P_RHO, b8 as P_SW, b9 as P_UX, ba as P_UY, U as PaintColorSource, V as PaintDabParams, bb as PaintExchange, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, i as PaintGradientSource, a1 as PaintGradientSpace, a2 as PaintGradientStop, bd as PaintPixels, a3 as PaintRgb, a4 as PaintSourceError, g as PaintTileTarget, bf as PixelSource, bg as RETOUCH_SAMPLES, bh as RegionPixelSource, d as RetouchApply, bi as RetouchDabEffect, bj as RetouchDabStroke, f as RetouchPaint, bk as RetouchSample, R as RetouchSettings, bl as SET_PLANES, bm as SLOT_BYTES, bn as SLOT_PLANES, bo as SLOT_SIDE, bp as SPOT_HEAL_TYPES, bq as STRIP, br as SmudgeDab, l as SmudgeSettings, bs as SmudgeTip, bt as SpotHealType, h as StrokeApply, S as StrokeCoverage, e as StrokePoint, bu as TIP_GRADIENT_STEPS, bv as TONE_RANGES, T as TileMedium, bw as TileMediumOptions, bx as TilePixelSource, by as ToneRange, bz as U_MAX, bA as W9, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, bB as WET_TILE, s as WetBackendInfo, bC as WetFlowField, a7 as WetFlowKind, o as WetFlowSpec, bD as WetGpuEngine, bE as WetGpuJob, r as WetGpuProvider, bF as WetGpuSupport, bG as WetKernelKind, bH as WetLaneOptions, bI as WetLaneStats, bJ as WetPaper, u as WetPaperInput, n as WetParams, t as WetSnapshot, a8 as WetSupport, m as WetTilt, bK as WetWorkerLayout, bL as WetWorkerPool, bM as WetWorldError, q as WetWorldOptions, a9 as addPaintGradientStop, bN as applyRetouchToTile, bO as applyStrokeToDeepTile, bP as applyStrokeToTile, bQ as applyToneToDeepTile, bR as blendRadius, bS as blenderDab, bT as canShareMemory, bU as cleanMixer, bV as coverageTileCoord, bW as createBlenderScratch, bX as createWetGpuEngine, bY as dabCoverage, bZ as dabRect, b_ as dodgeBurn, b$ as dodgeBurnCurve, c0 as dsincos, c1 as edgeBits, c2 as exchangeRates, c3 as findWebGpu, c4 as flowField, c5 as gradientDabColor, aa as hash2, c6 as healPixels, ab as hexToPaintRgb, ac as isGradientPaint, c7 as latticeViscosity, c8 as loadMixer, c9 as loadWetKernel, ca as luma, ad as mix32, cb as mixerRates, cc as normalizeBlender, cd as normalizeBrush, ae as normalizeFlow, af as normalizeHexColor, ce as normalizeMixer, cf as normalizeRetouch, cg as normalizeSmudge, ch as normalizeTilt, ag as normalizeWetParams, ci as packWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, cj as perDabStrength, ck as put255, al as rand01, cl as rasterizeDab, am as readPaintSource, cm as readSourceRegion, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, cn as rgbaViewOfGrey, co as saturationOf, aq as scalePaintGradient, cp as smoothPoints, cq as smudgeEffect, ar as solidPaint, cr as sponge, cs as spongeEffect, ct as spotHealPixels, cu as spotHealWindow, cv as tipFalloff, cw as tipReach, cx as tipShape, cy as toneOf, as as updatePaintGradientStop, cz as walkDabs, cA as wetGpuSupport, cB as wetSimdSupported, at as wetSupport } from '../rand-
|
|
1
|
+
import { bc as PaintMedium, W as WetWorld, be as PaintSample, p as RgbTriple, B as BrushSettings, P as PaintSource, C as CoverageMap, D as Dab } from '../rand-DTXAssW1.cjs';
|
|
2
|
+
export { au as BlenderScratch, k as BlenderSettings, av as DEFAULT_BLENDER, aw as DEFAULT_BRUSH, v as DEFAULT_FLOW, ax as DEFAULT_MIXER, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, ay as DEFAULT_RETOUCH, az as DEFAULT_SMUDGE, aA as DEFAULT_WET_PAPER, y as DEFAULT_WET_PARAMS, aB as DRY_EPS, aC as DabWalker, aD as EMPTY_MIXER_LOAD, aE as EX, aF as EY, aG as ExchangeRates, aH as FLAG_ALIVE, aI as FLAG_BOTTOM, aJ as FLAG_LEFT, aK as FLAG_RIGHT, aL as FLAG_TOP, aM as FLAG_WET, aN as FLAT, aO as FREE_INTERVAL, aP as MAX_BATCH, z as MAX_BRUSH_SIZE, aQ as MAX_TILT_ACCEL, aR as MAX_WET_LANES, aS as MAX_WET_SLOTS, aT as MIXER_DRAIN, aU as MIXER_PICKUP_RATE, aV as MIXING_MODELS, a as MixerLoad, M as MixerSettings, c as MixerStroke, b as MixerTarget, j as MixingModel, aW as OPP, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, aX as PAPER_CAPACITY, aY as PARAM, aZ as PARAM_FLOATS, a_ as PIGMENT_CHANNELS, a$ as PLANE, b0 as PLANE_BYTES, b1 as P_D0, b2 as P_EDGE, b3 as P_FX, b4 as P_FY, b5 as P_H, b6 as P_P0, b7 as P_RHO, b8 as P_SW, b9 as P_UX, ba as P_UY, U as PaintColorSource, V as PaintDabParams, bb as PaintExchange, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, i as PaintGradientSource, a1 as PaintGradientSpace, a2 as PaintGradientStop, bd as PaintPixels, a3 as PaintRgb, a4 as PaintSourceError, g as PaintTileTarget, bf as PixelSource, bg as RETOUCH_SAMPLES, bh as RegionPixelSource, d as RetouchApply, bi as RetouchDabEffect, bj as RetouchDabStroke, f as RetouchPaint, bk as RetouchSample, R as RetouchSettings, bl as SET_PLANES, bm as SLOT_BYTES, bn as SLOT_PLANES, bo as SLOT_SIDE, bp as SPOT_HEAL_TYPES, bq as STRIP, br as SmudgeDab, l as SmudgeSettings, bs as SmudgeTip, bt as SpotHealType, h as StrokeApply, S as StrokeCoverage, e as StrokePoint, bu as TIP_GRADIENT_STEPS, bv as TONE_RANGES, T as TileMedium, bw as TileMediumOptions, bx as TilePixelSource, by as ToneRange, bz as U_MAX, bA as W9, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, bB as WET_TILE, s as WetBackendInfo, bC as WetFlowField, a7 as WetFlowKind, o as WetFlowSpec, bD as WetGpuEngine, bE as WetGpuJob, r as WetGpuProvider, bF as WetGpuSupport, bG as WetKernelKind, bH as WetLaneOptions, bI as WetLaneStats, bJ as WetPaper, u as WetPaperInput, n as WetParams, t as WetSnapshot, a8 as WetSupport, m as WetTilt, bK as WetWorkerLayout, bL as WetWorkerPool, bM as WetWorldError, q as WetWorldOptions, a9 as addPaintGradientStop, bN as applyRetouchToTile, bO as applyStrokeToDeepTile, bP as applyStrokeToTile, bQ as applyToneToDeepTile, bR as blendRadius, bS as blenderDab, bT as canShareMemory, bU as cleanMixer, bV as coverageTileCoord, bW as createBlenderScratch, bX as createWetGpuEngine, bY as dabCoverage, bZ as dabRect, b_ as dodgeBurn, b$ as dodgeBurnCurve, c0 as dsincos, c1 as edgeBits, c2 as exchangeRates, c3 as findWebGpu, c4 as flowField, c5 as gradientDabColor, aa as hash2, c6 as healPixels, ab as hexToPaintRgb, ac as isGradientPaint, c7 as latticeViscosity, c8 as loadMixer, c9 as loadWetKernel, ca as luma, ad as mix32, cb as mixerRates, cc as normalizeBlender, cd as normalizeBrush, ae as normalizeFlow, af as normalizeHexColor, ce as normalizeMixer, cf as normalizeRetouch, cg as normalizeSmudge, ch as normalizeTilt, ag as normalizeWetParams, ci as packWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, cj as perDabStrength, ck as put255, al as rand01, cl as rasterizeDab, am as readPaintSource, cm as readSourceRegion, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, cn as rgbaViewOfGrey, co as saturationOf, aq as scalePaintGradient, cp as smoothPoints, cq as smudgeEffect, ar as solidPaint, cr as sponge, cs as spongeEffect, ct as spotHealPixels, cu as spotHealWindow, cv as tipFalloff, cw as tipReach, cx as tipShape, cy as toneOf, as as updatePaintGradientStop, cz as walkDabs, cA as wetGpuSupport, cB as wetSimdSupported, at as wetSupport } from '../rand-DTXAssW1.cjs';
|
|
3
3
|
import { R as RasterRect, Y as Pigment, a as BlendMode, T as TiledSurface } from '../surface-1MRncXpF.cjs';
|
|
4
4
|
export { Z as PIGMENT_BANDS, _ as PIGMENT_LAMBDA_MIN, $ as PIGMENT_LAMBDA_STEP, a0 as PIGMENT_WAVELENGTHS, a1 as PigmentOptions, a2 as PigmentRgb, a3 as createPigment, a4 as lerpPigment, a5 as lerpPigmentInto, a6 as mixPigments, a7 as reflectanceToRgb, a8 as rgbToReflectance, a9 as setPigmentColor } from '../surface-1MRncXpF.cjs';
|
|
5
5
|
import { A as AgentTool } from '../registry-BqA1AZt0.cjs';
|
package/dist/paint/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bc as PaintMedium, W as WetWorld, be as PaintSample, p as RgbTriple, B as BrushSettings, P as PaintSource, C as CoverageMap, D as Dab } from '../rand-
|
|
2
|
-
export { au as BlenderScratch, k as BlenderSettings, av as DEFAULT_BLENDER, aw as DEFAULT_BRUSH, v as DEFAULT_FLOW, ax as DEFAULT_MIXER, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, ay as DEFAULT_RETOUCH, az as DEFAULT_SMUDGE, aA as DEFAULT_WET_PAPER, y as DEFAULT_WET_PARAMS, aB as DRY_EPS, aC as DabWalker, aD as EMPTY_MIXER_LOAD, aE as EX, aF as EY, aG as ExchangeRates, aH as FLAG_ALIVE, aI as FLAG_BOTTOM, aJ as FLAG_LEFT, aK as FLAG_RIGHT, aL as FLAG_TOP, aM as FLAG_WET, aN as FLAT, aO as FREE_INTERVAL, aP as MAX_BATCH, z as MAX_BRUSH_SIZE, aQ as MAX_TILT_ACCEL, aR as MAX_WET_LANES, aS as MAX_WET_SLOTS, aT as MIXER_DRAIN, aU as MIXER_PICKUP_RATE, aV as MIXING_MODELS, a as MixerLoad, M as MixerSettings, c as MixerStroke, b as MixerTarget, j as MixingModel, aW as OPP, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, aX as PAPER_CAPACITY, aY as PARAM, aZ as PARAM_FLOATS, a_ as PIGMENT_CHANNELS, a$ as PLANE, b0 as PLANE_BYTES, b1 as P_D0, b2 as P_EDGE, b3 as P_FX, b4 as P_FY, b5 as P_H, b6 as P_P0, b7 as P_RHO, b8 as P_SW, b9 as P_UX, ba as P_UY, U as PaintColorSource, V as PaintDabParams, bb as PaintExchange, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, i as PaintGradientSource, a1 as PaintGradientSpace, a2 as PaintGradientStop, bd as PaintPixels, a3 as PaintRgb, a4 as PaintSourceError, g as PaintTileTarget, bf as PixelSource, bg as RETOUCH_SAMPLES, bh as RegionPixelSource, d as RetouchApply, bi as RetouchDabEffect, bj as RetouchDabStroke, f as RetouchPaint, bk as RetouchSample, R as RetouchSettings, bl as SET_PLANES, bm as SLOT_BYTES, bn as SLOT_PLANES, bo as SLOT_SIDE, bp as SPOT_HEAL_TYPES, bq as STRIP, br as SmudgeDab, l as SmudgeSettings, bs as SmudgeTip, bt as SpotHealType, h as StrokeApply, S as StrokeCoverage, e as StrokePoint, bu as TIP_GRADIENT_STEPS, bv as TONE_RANGES, T as TileMedium, bw as TileMediumOptions, bx as TilePixelSource, by as ToneRange, bz as U_MAX, bA as W9, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, bB as WET_TILE, s as WetBackendInfo, bC as WetFlowField, a7 as WetFlowKind, o as WetFlowSpec, bD as WetGpuEngine, bE as WetGpuJob, r as WetGpuProvider, bF as WetGpuSupport, bG as WetKernelKind, bH as WetLaneOptions, bI as WetLaneStats, bJ as WetPaper, u as WetPaperInput, n as WetParams, t as WetSnapshot, a8 as WetSupport, m as WetTilt, bK as WetWorkerLayout, bL as WetWorkerPool, bM as WetWorldError, q as WetWorldOptions, a9 as addPaintGradientStop, bN as applyRetouchToTile, bO as applyStrokeToDeepTile, bP as applyStrokeToTile, bQ as applyToneToDeepTile, bR as blendRadius, bS as blenderDab, bT as canShareMemory, bU as cleanMixer, bV as coverageTileCoord, bW as createBlenderScratch, bX as createWetGpuEngine, bY as dabCoverage, bZ as dabRect, b_ as dodgeBurn, b$ as dodgeBurnCurve, c0 as dsincos, c1 as edgeBits, c2 as exchangeRates, c3 as findWebGpu, c4 as flowField, c5 as gradientDabColor, aa as hash2, c6 as healPixels, ab as hexToPaintRgb, ac as isGradientPaint, c7 as latticeViscosity, c8 as loadMixer, c9 as loadWetKernel, ca as luma, ad as mix32, cb as mixerRates, cc as normalizeBlender, cd as normalizeBrush, ae as normalizeFlow, af as normalizeHexColor, ce as normalizeMixer, cf as normalizeRetouch, cg as normalizeSmudge, ch as normalizeTilt, ag as normalizeWetParams, ci as packWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, cj as perDabStrength, ck as put255, al as rand01, cl as rasterizeDab, am as readPaintSource, cm as readSourceRegion, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, cn as rgbaViewOfGrey, co as saturationOf, aq as scalePaintGradient, cp as smoothPoints, cq as smudgeEffect, ar as solidPaint, cr as sponge, cs as spongeEffect, ct as spotHealPixels, cu as spotHealWindow, cv as tipFalloff, cw as tipReach, cx as tipShape, cy as toneOf, as as updatePaintGradientStop, cz as walkDabs, cA as wetGpuSupport, cB as wetSimdSupported, at as wetSupport } from '../rand-
|
|
1
|
+
import { bc as PaintMedium, W as WetWorld, be as PaintSample, p as RgbTriple, B as BrushSettings, P as PaintSource, C as CoverageMap, D as Dab } from '../rand-pQQ2sJTk.js';
|
|
2
|
+
export { au as BlenderScratch, k as BlenderSettings, av as DEFAULT_BLENDER, aw as DEFAULT_BRUSH, v as DEFAULT_FLOW, ax as DEFAULT_MIXER, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, ay as DEFAULT_RETOUCH, az as DEFAULT_SMUDGE, aA as DEFAULT_WET_PAPER, y as DEFAULT_WET_PARAMS, aB as DRY_EPS, aC as DabWalker, aD as EMPTY_MIXER_LOAD, aE as EX, aF as EY, aG as ExchangeRates, aH as FLAG_ALIVE, aI as FLAG_BOTTOM, aJ as FLAG_LEFT, aK as FLAG_RIGHT, aL as FLAG_TOP, aM as FLAG_WET, aN as FLAT, aO as FREE_INTERVAL, aP as MAX_BATCH, z as MAX_BRUSH_SIZE, aQ as MAX_TILT_ACCEL, aR as MAX_WET_LANES, aS as MAX_WET_SLOTS, aT as MIXER_DRAIN, aU as MIXER_PICKUP_RATE, aV as MIXING_MODELS, a as MixerLoad, M as MixerSettings, c as MixerStroke, b as MixerTarget, j as MixingModel, aW as OPP, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, aX as PAPER_CAPACITY, aY as PARAM, aZ as PARAM_FLOATS, a_ as PIGMENT_CHANNELS, a$ as PLANE, b0 as PLANE_BYTES, b1 as P_D0, b2 as P_EDGE, b3 as P_FX, b4 as P_FY, b5 as P_H, b6 as P_P0, b7 as P_RHO, b8 as P_SW, b9 as P_UX, ba as P_UY, U as PaintColorSource, V as PaintDabParams, bb as PaintExchange, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, i as PaintGradientSource, a1 as PaintGradientSpace, a2 as PaintGradientStop, bd as PaintPixels, a3 as PaintRgb, a4 as PaintSourceError, g as PaintTileTarget, bf as PixelSource, bg as RETOUCH_SAMPLES, bh as RegionPixelSource, d as RetouchApply, bi as RetouchDabEffect, bj as RetouchDabStroke, f as RetouchPaint, bk as RetouchSample, R as RetouchSettings, bl as SET_PLANES, bm as SLOT_BYTES, bn as SLOT_PLANES, bo as SLOT_SIDE, bp as SPOT_HEAL_TYPES, bq as STRIP, br as SmudgeDab, l as SmudgeSettings, bs as SmudgeTip, bt as SpotHealType, h as StrokeApply, S as StrokeCoverage, e as StrokePoint, bu as TIP_GRADIENT_STEPS, bv as TONE_RANGES, T as TileMedium, bw as TileMediumOptions, bx as TilePixelSource, by as ToneRange, bz as U_MAX, bA as W9, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, bB as WET_TILE, s as WetBackendInfo, bC as WetFlowField, a7 as WetFlowKind, o as WetFlowSpec, bD as WetGpuEngine, bE as WetGpuJob, r as WetGpuProvider, bF as WetGpuSupport, bG as WetKernelKind, bH as WetLaneOptions, bI as WetLaneStats, bJ as WetPaper, u as WetPaperInput, n as WetParams, t as WetSnapshot, a8 as WetSupport, m as WetTilt, bK as WetWorkerLayout, bL as WetWorkerPool, bM as WetWorldError, q as WetWorldOptions, a9 as addPaintGradientStop, bN as applyRetouchToTile, bO as applyStrokeToDeepTile, bP as applyStrokeToTile, bQ as applyToneToDeepTile, bR as blendRadius, bS as blenderDab, bT as canShareMemory, bU as cleanMixer, bV as coverageTileCoord, bW as createBlenderScratch, bX as createWetGpuEngine, bY as dabCoverage, bZ as dabRect, b_ as dodgeBurn, b$ as dodgeBurnCurve, c0 as dsincos, c1 as edgeBits, c2 as exchangeRates, c3 as findWebGpu, c4 as flowField, c5 as gradientDabColor, aa as hash2, c6 as healPixels, ab as hexToPaintRgb, ac as isGradientPaint, c7 as latticeViscosity, c8 as loadMixer, c9 as loadWetKernel, ca as luma, ad as mix32, cb as mixerRates, cc as normalizeBlender, cd as normalizeBrush, ae as normalizeFlow, af as normalizeHexColor, ce as normalizeMixer, cf as normalizeRetouch, cg as normalizeSmudge, ch as normalizeTilt, ag as normalizeWetParams, ci as packWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, cj as perDabStrength, ck as put255, al as rand01, cl as rasterizeDab, am as readPaintSource, cm as readSourceRegion, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, cn as rgbaViewOfGrey, co as saturationOf, aq as scalePaintGradient, cp as smoothPoints, cq as smudgeEffect, ar as solidPaint, cr as sponge, cs as spongeEffect, ct as spotHealPixels, cu as spotHealWindow, cv as tipFalloff, cw as tipReach, cx as tipShape, cy as toneOf, as as updatePaintGradientStop, cz as walkDabs, cA as wetGpuSupport, cB as wetSimdSupported, at as wetSupport } from '../rand-pQQ2sJTk.js';
|
|
3
3
|
import { R as RasterRect, Y as Pigment, a as BlendMode, T as TiledSurface } from '../surface-1MRncXpF.js';
|
|
4
4
|
export { Z as PIGMENT_BANDS, _ as PIGMENT_LAMBDA_MIN, $ as PIGMENT_LAMBDA_STEP, a0 as PIGMENT_WAVELENGTHS, a1 as PigmentOptions, a2 as PigmentRgb, a3 as createPigment, a4 as lerpPigment, a5 as lerpPigmentInto, a6 as mixPigments, a7 as reflectanceToRgb, a8 as rgbToReflectance, a9 as setPigmentColor } from '../surface-1MRncXpF.js';
|
|
5
5
|
import { A as AgentTool } from '../registry-D-4fit9C.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a1 as RasterLayer, a0 as RasterGroupLayer, a5 as RasterPixelLayer, C as CompositorLayer, a as RasterCompositor, R as RasterSources, U as LayerLocks } from '../deep-CcwHkQdb.cjs';
|
|
2
|
-
import { D as Dab, C as CoverageMap, B as BrushSettings, e as StrokePoint, g as PaintTileTarget, i as PaintGradientSource, T as TileMedium, M as MixerSettings, j as MixingModel, k as BlenderSettings, l as SmudgeSettings, P as PaintSource, a as MixerLoad, W as WetWorld, m as WetTilt, n as WetParams, o as WetFlowSpec, p as RgbTriple, q as WetWorldOptions, r as WetGpuProvider, s as WetBackendInfo, t as WetSnapshot, u as WetPaperInput } from '../rand-
|
|
3
|
-
export { v as DEFAULT_FLOW, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, y as DEFAULT_WET_PARAMS, z as MAX_BRUSH_SIZE, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, U as PaintColorSource, V as PaintDabParams, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, a1 as PaintGradientSpace, a2 as PaintGradientStop, a3 as PaintRgb, a4 as PaintSourceError, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, a7 as WetFlowKind, a8 as WetSupport, a9 as addPaintGradientStop, aa as hash2, ab as hexToPaintRgb, ac as isGradientPaint, ad as mix32, ae as normalizeFlow, af as normalizeHexColor, ag as normalizeWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, al as rand01, am as readPaintSource, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, aq as scalePaintGradient, ar as solidPaint, as as updatePaintGradientStop, at as wetSupport } from '../rand-
|
|
2
|
+
import { D as Dab, C as CoverageMap, B as BrushSettings, e as StrokePoint, g as PaintTileTarget, i as PaintGradientSource, T as TileMedium, M as MixerSettings, j as MixingModel, k as BlenderSettings, l as SmudgeSettings, P as PaintSource, a as MixerLoad, W as WetWorld, m as WetTilt, n as WetParams, o as WetFlowSpec, p as RgbTriple, q as WetWorldOptions, r as WetGpuProvider, s as WetBackendInfo, t as WetSnapshot, u as WetPaperInput } from '../rand-DTXAssW1.cjs';
|
|
3
|
+
export { v as DEFAULT_FLOW, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, y as DEFAULT_WET_PARAMS, z as MAX_BRUSH_SIZE, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, U as PaintColorSource, V as PaintDabParams, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, a1 as PaintGradientSpace, a2 as PaintGradientStop, a3 as PaintRgb, a4 as PaintSourceError, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, a7 as WetFlowKind, a8 as WetSupport, a9 as addPaintGradientStop, aa as hash2, ab as hexToPaintRgb, ac as isGradientPaint, ad as mix32, ae as normalizeFlow, af as normalizeHexColor, ag as normalizeWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, al as rand01, am as readPaintSource, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, aq as scalePaintGradient, ar as solidPaint, as as updatePaintGradientStop, at as wetSupport } from '../rand-DTXAssW1.cjs';
|
|
4
4
|
import { R as RasterRect, T as TiledSurface, a as BlendMode, b as BlendModeInfo } from '../surface-1MRncXpF.cjs';
|
|
5
5
|
export { B as BLEND_MODES, P as PAINTERLY_BLEND_MODES, i as Tile, v as isBlendMode, w as isPainterlyBlendMode, I as standardBlendMode } from '../surface-1MRncXpF.cjs';
|
|
6
6
|
import { e as EffectValue, E as EffectProvider, f as EffectDescription, a as EffectRenderRequest, b as EffectPixels, v as EffectsSlot } from '../helpers-C5aAd44p.cjs';
|
|
7
|
-
import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-
|
|
7
|
+
import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-DRzNhrdx.cjs';
|
|
8
8
|
import { V as VideoProject, D as VideoFfmpegExport } from '../export-Cbr9IqpJ.cjs';
|
|
9
9
|
import { g as PresenceStore, e as PresenceClock, d as PresenceActorInfo, c as PresenceActor, f as PresenceState } from '../presence-Cb6WhcrQ.cjs';
|
|
10
10
|
import { a as AgentToolProvider, A as AgentTool } from '../registry-BqA1AZt0.cjs';
|
|
@@ -13,9 +13,9 @@ import '../schema-Di0CS6Pe.cjs';
|
|
|
13
13
|
import '../evaluate-BsxYieLN.cjs';
|
|
14
14
|
import '../easing-lM0Xo9Ni.cjs';
|
|
15
15
|
import '../builtin-CY97ppKM.cjs';
|
|
16
|
-
import '../bezier-
|
|
17
|
-
import '../brushTypes-
|
|
18
|
-
import '../warp-
|
|
16
|
+
import '../bezier-CvgQiYRg.cjs';
|
|
17
|
+
import '../brushTypes-C7N3EBK7.cjs';
|
|
18
|
+
import '../warp-D62N_5VK.cjs';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Seeded, deterministic noise for paper grain and brush jitter (photocraft's counter-based
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a1 as RasterLayer, a0 as RasterGroupLayer, a5 as RasterPixelLayer, C as CompositorLayer, a as RasterCompositor, R as RasterSources, U as LayerLocks } from '../deep-wwJa7aR6.js';
|
|
2
|
-
import { D as Dab, C as CoverageMap, B as BrushSettings, e as StrokePoint, g as PaintTileTarget, i as PaintGradientSource, T as TileMedium, M as MixerSettings, j as MixingModel, k as BlenderSettings, l as SmudgeSettings, P as PaintSource, a as MixerLoad, W as WetWorld, m as WetTilt, n as WetParams, o as WetFlowSpec, p as RgbTriple, q as WetWorldOptions, r as WetGpuProvider, s as WetBackendInfo, t as WetSnapshot, u as WetPaperInput } from '../rand-
|
|
3
|
-
export { v as DEFAULT_FLOW, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, y as DEFAULT_WET_PARAMS, z as MAX_BRUSH_SIZE, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, U as PaintColorSource, V as PaintDabParams, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, a1 as PaintGradientSpace, a2 as PaintGradientStop, a3 as PaintRgb, a4 as PaintSourceError, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, a7 as WetFlowKind, a8 as WetSupport, a9 as addPaintGradientStop, aa as hash2, ab as hexToPaintRgb, ac as isGradientPaint, ad as mix32, ae as normalizeFlow, af as normalizeHexColor, ag as normalizeWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, al as rand01, am as readPaintSource, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, aq as scalePaintGradient, ar as solidPaint, as as updatePaintGradientStop, at as wetSupport } from '../rand-
|
|
2
|
+
import { D as Dab, C as CoverageMap, B as BrushSettings, e as StrokePoint, g as PaintTileTarget, i as PaintGradientSource, T as TileMedium, M as MixerSettings, j as MixingModel, k as BlenderSettings, l as SmudgeSettings, P as PaintSource, a as MixerLoad, W as WetWorld, m as WetTilt, n as WetParams, o as WetFlowSpec, p as RgbTriple, q as WetWorldOptions, r as WetGpuProvider, s as WetBackendInfo, t as WetSnapshot, u as WetPaperInput } from '../rand-pQQ2sJTk.js';
|
|
3
|
+
export { v as DEFAULT_FLOW, w as DEFAULT_PAINT_GRADIENT, x as DEFAULT_PAINT_GRADIENT_MAPPING, y as DEFAULT_WET_PARAMS, z as MAX_BRUSH_SIZE, A as PAINT_COLOR_JSON_SCHEMA, E as PAINT_GRADIENT_FULL_SPEED, F as PAINT_GRADIENT_JSON_SCHEMA, G as PAINT_GRADIENT_KIT, H as PAINT_GRADIENT_MAPPINGS, I as PAINT_GRADIENT_MAPPING_LABELS, J as PAINT_GRADIENT_PRESETS, K as PAINT_GRADIENT_REPEATS, L as PAINT_GRADIENT_REPEAT_LABELS, N as PAINT_GRADIENT_SPACES, O as PAINT_GRADIENT_SPACE_LABELS, Q as PAINT_SOURCE_JSON_SCHEMA, U as PaintColorSource, V as PaintDabParams, X as PaintGradientKit, Y as PaintGradientMapping, Z as PaintGradientMappingKind, _ as PaintGradientRepeat, $ as PaintGradientSample, a0 as PaintGradientSampler, a1 as PaintGradientSpace, a2 as PaintGradientStop, a3 as PaintRgb, a4 as PaintSourceError, a5 as WET_FLOW_KINDS, a6 as WET_PARAM_KEYS, a7 as WetFlowKind, a8 as WetSupport, a9 as addPaintGradientStop, aa as hash2, ab as hexToPaintRgb, ac as isGradientPaint, ad as mix32, ae as normalizeFlow, af as normalizeHexColor, ag as normalizeWetParams, ah as paintGradientMappingFor, ai as paintSourceColor, aj as paintSourceCss, ak as parsePaintSource, al as rand01, am as readPaintSource, an as removePaintGradientStop, ao as resolvePaintGradient, ap as reversePaintGradient, aq as scalePaintGradient, ar as solidPaint, as as updatePaintGradientStop, at as wetSupport } from '../rand-pQQ2sJTk.js';
|
|
4
4
|
import { R as RasterRect, T as TiledSurface, a as BlendMode, b as BlendModeInfo } from '../surface-1MRncXpF.js';
|
|
5
5
|
export { B as BLEND_MODES, P as PAINTERLY_BLEND_MODES, i as Tile, v as isBlendMode, w as isPainterlyBlendMode, I as standardBlendMode } from '../surface-1MRncXpF.js';
|
|
6
6
|
import { e as EffectValue, E as EffectProvider, f as EffectDescription, a as EffectRenderRequest, b as EffectPixels, v as EffectsSlot } from '../helpers-CPWcK504.js';
|
|
7
|
-
import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-
|
|
7
|
+
import { I as ImageEditorAssetStore, S as SerializedLayer, P as PsdExportResult } from '../export-DotEEyXj.js';
|
|
8
8
|
import { V as VideoProject, D as VideoFfmpegExport } from '../export-ClPKUB-v.js';
|
|
9
9
|
import { g as PresenceStore, e as PresenceClock, d as PresenceActorInfo, c as PresenceActor, f as PresenceState } from '../presence-Cb6WhcrQ.js';
|
|
10
10
|
import { a as AgentToolProvider, A as AgentTool } from '../registry-D-4fit9C.js';
|
|
@@ -13,9 +13,9 @@ import '../schema-Di0CS6Pe.js';
|
|
|
13
13
|
import '../evaluate-BbCeF6pt.js';
|
|
14
14
|
import '../easing-lM0Xo9Ni.js';
|
|
15
15
|
import '../builtin-CY97ppKM.js';
|
|
16
|
-
import '../bezier-
|
|
17
|
-
import '../brushTypes-
|
|
18
|
-
import '../warp-
|
|
16
|
+
import '../bezier-DP4NnJp3.js';
|
|
17
|
+
import '../brushTypes-C7N3EBK7.js';
|
|
18
|
+
import '../warp-CIsO617e.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Seeded, deterministic noise for paper grain and brush jitter (photocraft's counter-based
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Point } from './brushTypes-
|
|
2
|
-
import { B as BezierPath, P as PolygonBooleanOperation, a as BezierPathInput, b as PolygonFillRule, c as BezierSegment, d as BezierContour } from './bezier-
|
|
1
|
+
import { P as Point } from './brushTypes-C7N3EBK7.js';
|
|
2
|
+
import { B as BezierPath, P as PolygonBooleanOperation, a as BezierPathInput, b as PolygonFillRule, c as BezierSegment, d as BezierContour } from './bezier-DP4NnJp3.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Curve-preserving boolean operations (union, intersection, difference, xor and divide) on
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Point } from './brushTypes-
|
|
2
|
-
import { B as BezierPath, P as PolygonBooleanOperation, a as BezierPathInput, b as PolygonFillRule, c as BezierSegment, d as BezierContour } from './bezier-
|
|
1
|
+
import { P as Point } from './brushTypes-C7N3EBK7.cjs';
|
|
2
|
+
import { B as BezierPath, P as PolygonBooleanOperation, a as BezierPathInput, b as PolygonFillRule, c as BezierSegment, d as BezierContour } from './bezier-CvgQiYRg.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Curve-preserving boolean operations (union, intersection, difference, xor and divide) on
|
|
@@ -240,7 +240,7 @@ declare const PAINT_GRADIENT_JSON_SCHEMA: {
|
|
|
240
240
|
readonly properties: {
|
|
241
241
|
readonly by: {
|
|
242
242
|
readonly type: "string";
|
|
243
|
-
readonly enum: readonly ("direction" | "time" | "distance" | "
|
|
243
|
+
readonly enum: readonly ("direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity")[];
|
|
244
244
|
readonly description: "distance: px (or dabs) of stroke travelled; pressure: pen pressure 0..1; tilt: pen lean, upright 0 .. flat 1; velocity: pen speed, 0 .. 2.5 px/ms; direction: direction of travel, once round per 360°; time: ms since the stroke began (needs timed points); across-tip: left to right across the tip, looking along the stroke (a brush loaded with several colours); random: a random point per dab (seeded, so replays match).";
|
|
245
245
|
};
|
|
246
246
|
readonly length: {
|
|
@@ -381,7 +381,7 @@ declare const PAINT_SOURCE_JSON_SCHEMA: {
|
|
|
381
381
|
readonly properties: {
|
|
382
382
|
readonly by: {
|
|
383
383
|
readonly type: "string";
|
|
384
|
-
readonly enum: readonly ("direction" | "time" | "distance" | "
|
|
384
|
+
readonly enum: readonly ("direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity")[];
|
|
385
385
|
readonly description: "distance: px (or dabs) of stroke travelled; pressure: pen pressure 0..1; tilt: pen lean, upright 0 .. flat 1; velocity: pen speed, 0 .. 2.5 px/ms; direction: direction of travel, once round per 360°; time: ms since the stroke began (needs timed points); across-tip: left to right across the tip, looking along the stroke (a brush loaded with several colours); random: a random point per dab (seeded, so replays match).";
|
|
386
386
|
};
|
|
387
387
|
readonly length: {
|
|
@@ -459,8 +459,8 @@ declare function reversePaintGradient(g: PaintGradientSource): PaintGradientSour
|
|
|
459
459
|
declare function paintGradientMappingFor(by: PaintGradientMappingKind, current: PaintGradientMapping): PaintGradientMapping;
|
|
460
460
|
/** Everything a gradient-paint editor UI needs, in one object (framework bindings take it from their own entry). */
|
|
461
461
|
declare const PAINT_GRADIENT_KIT: {
|
|
462
|
-
readonly PAINT_GRADIENT_MAPPINGS: readonly ("direction" | "time" | "distance" | "
|
|
463
|
-
readonly PAINT_GRADIENT_MAPPING_LABELS: Readonly<Record<"direction" | "time" | "distance" | "
|
|
462
|
+
readonly PAINT_GRADIENT_MAPPINGS: readonly ("direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity")[];
|
|
463
|
+
readonly PAINT_GRADIENT_MAPPING_LABELS: Readonly<Record<"direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity", string>>;
|
|
464
464
|
readonly PAINT_GRADIENT_PRESETS: readonly {
|
|
465
465
|
name: string;
|
|
466
466
|
paint: PaintGradientSource;
|
|
@@ -240,7 +240,7 @@ declare const PAINT_GRADIENT_JSON_SCHEMA: {
|
|
|
240
240
|
readonly properties: {
|
|
241
241
|
readonly by: {
|
|
242
242
|
readonly type: "string";
|
|
243
|
-
readonly enum: readonly ("direction" | "time" | "distance" | "
|
|
243
|
+
readonly enum: readonly ("direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity")[];
|
|
244
244
|
readonly description: "distance: px (or dabs) of stroke travelled; pressure: pen pressure 0..1; tilt: pen lean, upright 0 .. flat 1; velocity: pen speed, 0 .. 2.5 px/ms; direction: direction of travel, once round per 360°; time: ms since the stroke began (needs timed points); across-tip: left to right across the tip, looking along the stroke (a brush loaded with several colours); random: a random point per dab (seeded, so replays match).";
|
|
245
245
|
};
|
|
246
246
|
readonly length: {
|
|
@@ -381,7 +381,7 @@ declare const PAINT_SOURCE_JSON_SCHEMA: {
|
|
|
381
381
|
readonly properties: {
|
|
382
382
|
readonly by: {
|
|
383
383
|
readonly type: "string";
|
|
384
|
-
readonly enum: readonly ("direction" | "time" | "distance" | "
|
|
384
|
+
readonly enum: readonly ("direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity")[];
|
|
385
385
|
readonly description: "distance: px (or dabs) of stroke travelled; pressure: pen pressure 0..1; tilt: pen lean, upright 0 .. flat 1; velocity: pen speed, 0 .. 2.5 px/ms; direction: direction of travel, once round per 360°; time: ms since the stroke began (needs timed points); across-tip: left to right across the tip, looking along the stroke (a brush loaded with several colours); random: a random point per dab (seeded, so replays match).";
|
|
386
386
|
};
|
|
387
387
|
readonly length: {
|
|
@@ -459,8 +459,8 @@ declare function reversePaintGradient(g: PaintGradientSource): PaintGradientSour
|
|
|
459
459
|
declare function paintGradientMappingFor(by: PaintGradientMappingKind, current: PaintGradientMapping): PaintGradientMapping;
|
|
460
460
|
/** Everything a gradient-paint editor UI needs, in one object (framework bindings take it from their own entry). */
|
|
461
461
|
declare const PAINT_GRADIENT_KIT: {
|
|
462
|
-
readonly PAINT_GRADIENT_MAPPINGS: readonly ("direction" | "time" | "distance" | "
|
|
463
|
-
readonly PAINT_GRADIENT_MAPPING_LABELS: Readonly<Record<"direction" | "time" | "distance" | "
|
|
462
|
+
readonly PAINT_GRADIENT_MAPPINGS: readonly ("direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity")[];
|
|
463
|
+
readonly PAINT_GRADIENT_MAPPING_LABELS: Readonly<Record<"direction" | "time" | "distance" | "pressure" | "tilt" | "across-tip" | "random" | "velocity", string>>;
|
|
464
464
|
readonly PAINT_GRADIENT_PRESETS: readonly {
|
|
465
465
|
name: string;
|
|
466
466
|
paint: PaintGradientSource;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BezierPath, A as AffineMatrix } from './bezier-
|
|
1
|
+
import { B as BezierPath, A as AffineMatrix } from './bezier-CvgQiYRg.cjs';
|
|
2
2
|
import { V as VectorEffectType, H as VectorEffectParamsMap, I as VectorPathNode, J as VectorFillRule, K as VectorBooleanOperation, L as VectorNode, M as VectorEffect, N as VectorGroupNode, O as VectorBounds, P as VectorWarpMesh, Q as VectorInstanceNode, R as VectorFilterType, T as VectorFilterParamsMap, U as VectorFilter, W as VectorGradient, X as Vec2, Y as VectorGradientUnits, S as SvgGradientDef, Z as VectorGradientSpread, _ as VectorGradientType, $ as VectorPaint, a0 as VectorMatrix, a1 as VectorGradientStop, a2 as VectorStrokeAlign, a3 as VectorSubpath, a4 as VectorDocument, a5 as VectorWidthPoint } from './helpers-C5aAd44p.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BezierPath, A as AffineMatrix } from './bezier-
|
|
1
|
+
import { B as BezierPath, A as AffineMatrix } from './bezier-DP4NnJp3.js';
|
|
2
2
|
import { V as VectorEffectType, H as VectorEffectParamsMap, I as VectorPathNode, J as VectorFillRule, K as VectorBooleanOperation, L as VectorNode, M as VectorEffect, N as VectorGroupNode, O as VectorBounds, P as VectorWarpMesh, Q as VectorInstanceNode, R as VectorFilterType, T as VectorFilterParamsMap, U as VectorFilter, W as VectorGradient, X as Vec2, Y as VectorGradientUnits, S as SvgGradientDef, Z as VectorGradientSpread, _ as VectorGradientType, $ as VectorPaint, a0 as VectorMatrix, a1 as VectorGradientStop, a2 as VectorStrokeAlign, a3 as VectorSubpath, a4 as VectorDocument, a5 as VectorWidthPoint } from './helpers-CPWcK504.js';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/vector/index.d.cts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { X as Vec2$1, a3 as VectorSubpath, O as VectorBounds, bp as VectorAnchor, a4 as VectorDocument, L as VectorNode, I as VectorPathNode, bq as VectorTextNode, br as VectorAnchorType, $ as VectorPaint, N as VectorGroupNode, bs as VectorCornerKind, a5 as VectorWidthPoint, W as VectorGradient, a1 as VectorGradientStop, bt as VectorViewport, bu as VectorConnectorRoute, bv as VectorConnectorSide, bw as VectorConnectorEnd, bx as VectorConnector, by as VectorConstraintKind, bz as VectorConstraint, bA as VectorCharacterStyle, bB as VectorTextRun, bC as VectorParagraphStyle, bD as VectorTextFrame, bE as VectorTransformHandle, bF as VectorAnchorRef, bG as VectorPathfinderOperation, bH as VectorTool, bI as VectorDefaults, bJ as VectorTextAlign, bK as VectorStyle, bL as VectorHandleRef, bM as VectorSegmentRef, bN as VectorBlendOptions, a0 as VectorMatrix, bO as VectorModifiers, v as EffectsSlot, E as EffectProvider, e as EffectValue, bP as VectorProviderEffect, bQ as VectorBlendMode, R as VectorFilterType, V as VectorEffectType, bR as VectorAlign, bS as VectorDistribute, bT as VectorArrange, K as VectorBooleanOperation, bU as VectorMaskType, bV as VectorSymmetryMode, bW as VectorSymmetry, bX as VectorFreeformPoint, bY as VectorMeshGradient, bZ as VectorFreeformGradient, b_ as VectorArrowhead, b$ as VectorResizing, c0 as VectorFrame, c1 as VectorHorizontalResizing, c2 as VectorVerticalResizing, c3 as VectorMask, c4 as VectorAverageAxis, c5 as VectorSymbol, c6 as VectorParameter, P as VectorWarpMesh, J as VectorFillRule, c7 as VectorBlendSpacing, c8 as VectorGradientInterpolation, Z as VectorGradientSpread, _ as VectorGradientType, a2 as VectorStrokeAlign, c9 as VectorStrokeGradientMode, ca as VectorArrowAlign, M as VectorEffect, cb as VectorPaintLayer, cc as VectorStrokeLayer, U as VectorFilter, cd as VectorBlend, ce as VectorMergeMode, cf as VectorLineJoin, H as VectorEffectParamsMap, cg as VectorStrokeSettings, ch as VectorInstanceOverrides, Q as VectorInstanceNode } from '../helpers-C5aAd44p.cjs';
|
|
2
2
|
export { S as SvgGradientDef, ci as VECTOR_ARROWHEADS, cj as VECTOR_BLEND_MODES, ck as VECTOR_BLEND_SPACINGS, cl as VECTOR_CONNECTOR_ROUTES, cm as VECTOR_CONNECTOR_SIDES, cn as VECTOR_CONSTRAINT_KINDS, co as VECTOR_CORNER_KINDS, cp as VECTOR_EFFECT_TYPES, cq as VECTOR_FILTER_TYPES, cr as VECTOR_GRADIENT_INTERPOLATIONS, cs as VECTOR_GRADIENT_SPREADS, ct as VECTOR_GRADIENT_TYPES, cu as VECTOR_HORIZONTAL_RESIZING, cv as VECTOR_MASK_TYPES, cw as VECTOR_MERGE_MODES, cx as VECTOR_PATHFINDER_OPERATIONS, cy as VECTOR_PATH_TEXT_BASELINES, cz as VECTOR_STROKE_GRADIENT_MODES, cA as VECTOR_SYMMETRY_MODES, cB as VECTOR_TEXT_ALIGNS, cC as VECTOR_TOOLS, cD as VECTOR_TRANSFORM_HANDLES, cE as VECTOR_VERTICAL_RESIZING, cF as VectorCorner, T as VectorFilterParamsMap, cG as VectorGeomRef, Y as VectorGradientUnits, cH as VectorLineCap, cI as VectorPathTextBaseline, cJ as VectorStrokeLayerKind, cK as VectorTextRunStyle, cL as VectorWarpStyle } from '../helpers-C5aAd44p.cjs';
|
|
3
|
-
import { P as Point } from '../brushTypes-
|
|
4
|
-
import { a as BezierPathInput, A as AffineMatrix$1, B as BezierPath, c as BezierSegment } from '../bezier-
|
|
5
|
-
import { a as VectorGradientHandle, V as VectorSvgExportOptions, b as VectorGradientPatch, c as VectorEnvelopeParams, d as VectorRenderFilter, e as VectorAppearanceShape, f as VectorFilterParamSpec, g as VectorEffectParamSpec, h as VectorRenderStrokeParts, i as VectorPaintDef, j as VectorRgba, k as VectorSvgPatternDef } from '../svg-
|
|
6
|
-
export { l as VECTOR_EFFECT_DEFAULTS, m as VECTOR_EFFECT_LABELS, n as VECTOR_EFFECT_PARAM_SPECS, o as VECTOR_FILTER_DEFAULTS, p as VECTOR_FILTER_LABELS, q as VECTOR_FILTER_MENU, r as VECTOR_FILTER_PARAM_SPECS, s as VECTOR_GRADIENT_MAX_PERIODS, t as VECTOR_GRADIENT_MIN_STOPS, u as VectorBooleanOperand, v as VectorFilterPrimitive, w as VectorGradientPoints, x as VectorGradientRamp, y as VectorGradientSvgOptions, z as VectorPaintSvgOptions, A as VectorSvgImportOptions, B as VectorSvgWrapper, C as activeVectorEffects, D as activeVectorFilters, E as applyVectorCornersAttribute, F as applyVectorEffects, G as applyVectorGradientPatch, H as applyVectorGradientSpread, I as clearVectorLiveBooleanCache, J as convertVectorGradient, K as createVectorEffect, L as createVectorFilter, M as defaultVectorGradient, N as expandVectorAppearance, O as expandVectorAppearances, P as expandVectorGradientSpread, Q as expandVectorGradientStops, R as explicitVectorGradient, S as foldVectorBooleanOperands, T as gradientMidpointRemap, U as hasExplicitGradientGeometry, W as hasOwnVectorAppearance, X as hasVectorAppearance, Y as insertVectorGradientStop, Z as isCentredVectorGradient, _ as isVectorFilterType, $ as isVectorGradient, a0 as isVectorLiveBoolean, a1 as mapVectorGradient, a2 as mapVectorPaint, a3 as moveVectorGradientHandle, a4 as moveVectorGradientStop, a5 as normalizeVectorEffectParams, a6 as normalizeVectorFilterParams, a7 as parseSvgTransform, a8 as parseVectorColor, a9 as parseVectorSvg, aa as patternAttrs, ab as periodicVectorGradientStops, ac as pinVectorGradient, ad as removeVectorGradientStop, ae as reverseVectorGradient, af as samplePlainStops, ag as sampleVectorGradient, ah as sampleVectorGradientAt, ai as sampleVectorPaintDefAt, aj as sanitizeVectorEffects, ak as sanitizeVectorFilters, al as sanitizeVectorGradient, am as setVectorGradientVector, an as sortedVectorGradientStops, ao as spanVectorGradientStops, ap as transformVectorEffects, aq as transformVectorGradient, ar as transformVectorPaint, as as vectorAppearanceNodes, at as vectorAppearanceOutline, au as vectorAppearanceShapes, av as vectorBoxMatrix, aw as vectorChildAppearanceShapes, ax as vectorCornersAttribute, ay as vectorDocumentToSvg, az as vectorEffectInputBounds, aA as vectorEffectInputPaths, aB as vectorEnteredGroups, aC as vectorEnvelopeFrame, aD as vectorEnvelopeMap, aE as vectorEnvelopeMesh, aF as vectorFilterMarkup, aG as vectorFilterParamKeys, aH as vectorFilterReach, aI as vectorFilterSvg, aJ as vectorGradientArea, aK as vectorGradientAspect, aL as vectorGradientFocalParam, aM as vectorGradientHandles, aN as vectorGradientMatrix, aO as vectorGradientMidpointFromPosition, aP as vectorGradientMidpointPosition, aQ as vectorGradientNeedsExpansion, aR as vectorGradientParam, aS as vectorGradientPoints, aT as vectorGradientRamp, aU as vectorGradientSvgDefs, aV as vectorGradientTAt, aW as vectorGradientUnitsMatrix, aX as vectorInstanceDrawn, aY as vectorLiveBooleanSteps, aZ as vectorNodeEnvelope, a_ as vectorNodeFilterSvg, a$ as vectorNodeLocalPaintBounds, b0 as vectorOperandOperation, b1 as vectorPaintToSvg, b2 as vectorPathLocalBounds, b3 as vectorStrokeSvgParts, b4 as widthProfileFromAttribute, b5 as widthProfileToAttribute } from '../svg-
|
|
3
|
+
import { P as Point } from '../brushTypes-C7N3EBK7.cjs';
|
|
4
|
+
import { a as BezierPathInput, A as AffineMatrix$1, B as BezierPath, c as BezierSegment } from '../bezier-CvgQiYRg.cjs';
|
|
5
|
+
import { a as VectorGradientHandle, V as VectorSvgExportOptions, b as VectorGradientPatch, c as VectorEnvelopeParams, d as VectorRenderFilter, e as VectorAppearanceShape, f as VectorFilterParamSpec, g as VectorEffectParamSpec, h as VectorRenderStrokeParts, i as VectorPaintDef, j as VectorRgba, k as VectorSvgPatternDef } from '../svg-C4LlFnEw.cjs';
|
|
6
|
+
export { l as VECTOR_EFFECT_DEFAULTS, m as VECTOR_EFFECT_LABELS, n as VECTOR_EFFECT_PARAM_SPECS, o as VECTOR_FILTER_DEFAULTS, p as VECTOR_FILTER_LABELS, q as VECTOR_FILTER_MENU, r as VECTOR_FILTER_PARAM_SPECS, s as VECTOR_GRADIENT_MAX_PERIODS, t as VECTOR_GRADIENT_MIN_STOPS, u as VectorBooleanOperand, v as VectorFilterPrimitive, w as VectorGradientPoints, x as VectorGradientRamp, y as VectorGradientSvgOptions, z as VectorPaintSvgOptions, A as VectorSvgImportOptions, B as VectorSvgWrapper, C as activeVectorEffects, D as activeVectorFilters, E as applyVectorCornersAttribute, F as applyVectorEffects, G as applyVectorGradientPatch, H as applyVectorGradientSpread, I as clearVectorLiveBooleanCache, J as convertVectorGradient, K as createVectorEffect, L as createVectorFilter, M as defaultVectorGradient, N as expandVectorAppearance, O as expandVectorAppearances, P as expandVectorGradientSpread, Q as expandVectorGradientStops, R as explicitVectorGradient, S as foldVectorBooleanOperands, T as gradientMidpointRemap, U as hasExplicitGradientGeometry, W as hasOwnVectorAppearance, X as hasVectorAppearance, Y as insertVectorGradientStop, Z as isCentredVectorGradient, _ as isVectorFilterType, $ as isVectorGradient, a0 as isVectorLiveBoolean, a1 as mapVectorGradient, a2 as mapVectorPaint, a3 as moveVectorGradientHandle, a4 as moveVectorGradientStop, a5 as normalizeVectorEffectParams, a6 as normalizeVectorFilterParams, a7 as parseSvgTransform, a8 as parseVectorColor, a9 as parseVectorSvg, aa as patternAttrs, ab as periodicVectorGradientStops, ac as pinVectorGradient, ad as removeVectorGradientStop, ae as reverseVectorGradient, af as samplePlainStops, ag as sampleVectorGradient, ah as sampleVectorGradientAt, ai as sampleVectorPaintDefAt, aj as sanitizeVectorEffects, ak as sanitizeVectorFilters, al as sanitizeVectorGradient, am as setVectorGradientVector, an as sortedVectorGradientStops, ao as spanVectorGradientStops, ap as transformVectorEffects, aq as transformVectorGradient, ar as transformVectorPaint, as as vectorAppearanceNodes, at as vectorAppearanceOutline, au as vectorAppearanceShapes, av as vectorBoxMatrix, aw as vectorChildAppearanceShapes, ax as vectorCornersAttribute, ay as vectorDocumentToSvg, az as vectorEffectInputBounds, aA as vectorEffectInputPaths, aB as vectorEnteredGroups, aC as vectorEnvelopeFrame, aD as vectorEnvelopeMap, aE as vectorEnvelopeMesh, aF as vectorFilterMarkup, aG as vectorFilterParamKeys, aH as vectorFilterReach, aI as vectorFilterSvg, aJ as vectorGradientArea, aK as vectorGradientAspect, aL as vectorGradientFocalParam, aM as vectorGradientHandles, aN as vectorGradientMatrix, aO as vectorGradientMidpointFromPosition, aP as vectorGradientMidpointPosition, aQ as vectorGradientNeedsExpansion, aR as vectorGradientParam, aS as vectorGradientPoints, aT as vectorGradientRamp, aU as vectorGradientSvgDefs, aV as vectorGradientTAt, aW as vectorGradientUnitsMatrix, aX as vectorInstanceDrawn, aY as vectorLiveBooleanSteps, aZ as vectorNodeEnvelope, a_ as vectorNodeFilterSvg, a$ as vectorNodeLocalPaintBounds, b0 as vectorOperandOperation, b1 as vectorPaintToSvg, b2 as vectorPathLocalBounds, b3 as vectorStrokeSvgParts, b4 as widthProfileFromAttribute, b5 as widthProfileToAttribute } from '../svg-C4LlFnEw.cjs';
|
|
7
7
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
8
|
-
import { a as TextFont, L as LaidFragment, f as LaidLine, e as TextLayout, T as TextShaper } from '../warp-
|
|
9
|
-
export { g as VECTOR_WARP_STYLES, h as VECTOR_WARP_STYLE_LABELS, W as VectorWarpPreset, i as dragVectorMeshPoint, j as evalVectorMesh, k as fitVectorMesh, l as isValidVectorMesh, m as mapVectorMeshPoints, p as pullVectorMesh, r as removeVectorMeshSplitU, n as removeVectorMeshSplitV, o as resizeVectorMesh, s as splitVectorMeshU, q as splitVectorMeshV, t as vectorIdentityMesh, w as vectorMeshColumns, u as vectorMeshControlBounds, v as vectorMeshEditPoints, x as vectorMeshGridCurves, y as vectorMeshParamAt, z as vectorMeshRows, A as vectorWarpPresetGrid, B as vectorWarpPresetMesh } from '../warp-
|
|
8
|
+
import { a as TextFont, L as LaidFragment, f as LaidLine, e as TextLayout, T as TextShaper } from '../warp-D62N_5VK.cjs';
|
|
9
|
+
export { g as VECTOR_WARP_STYLES, h as VECTOR_WARP_STYLE_LABELS, W as VectorWarpPreset, i as dragVectorMeshPoint, j as evalVectorMesh, k as fitVectorMesh, l as isValidVectorMesh, m as mapVectorMeshPoints, p as pullVectorMesh, r as removeVectorMeshSplitU, n as removeVectorMeshSplitV, o as resizeVectorMesh, s as splitVectorMeshU, q as splitVectorMeshV, t as vectorIdentityMesh, w as vectorMeshColumns, u as vectorMeshControlBounds, v as vectorMeshEditPoints, x as vectorMeshGridCurves, y as vectorMeshParamAt, z as vectorMeshRows, A as vectorWarpPresetGrid, B as vectorWarpPresetMesh } from '../warp-D62N_5VK.cjs';
|
|
10
10
|
import { A as AffineMatrix, V as Vec2 } from '../types-CwMPoRMU.cjs';
|
|
11
11
|
export { H as VectorHomography } from '../types-CwMPoRMU.cjs';
|
|
12
12
|
import { C as CommandSpec } from '../registry-CaR7LC6W.cjs';
|
|
13
|
-
import { S as StrokeJoin, a as StrokeCap, P as PlanarMap, b as PathfinderOperation, c as PathfinderShape } from '../pathfinder-
|
|
13
|
+
import { S as StrokeJoin, a as StrokeCap, P as PlanarMap, b as PathfinderOperation, c as PathfinderShape } from '../pathfinder-CnkW7zLI.cjs';
|
|
14
14
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
15
|
-
export { C as CanvasTextShaperOptions, O as OpenTypeFont, a as OutlineFontEntry, b as OutlineFontFace, c as OutlinePathCommand, d as applyVectorHomography, e as createCanvasTextShaper, f as createMetricTextShaper, g as createOutlineTextShaper, h as cssFontFamily, l as loadOpenTypeFont, o as orderVectorQuad, p as parseOpenTypeFont, s as solve8, i as vectorHomography, j as vectorHomographyKeepsQuad } from '../opentype-
|
|
15
|
+
export { C as CanvasTextShaperOptions, O as OpenTypeFont, a as OutlineFontEntry, b as OutlineFontFace, c as OutlinePathCommand, d as applyVectorHomography, e as createCanvasTextShaper, f as createMetricTextShaper, g as createOutlineTextShaper, h as cssFontFamily, l as loadOpenTypeFont, o as orderVectorQuad, p as parseOpenTypeFont, s as solve8, i as vectorHomography, j as vectorHomographyKeepsQuad } from '../opentype-BOewaGQx.cjs';
|
|
16
16
|
import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
|
|
17
17
|
import '../schema-Di0CS6Pe.cjs';
|
|
18
18
|
import '../evaluate-BsxYieLN.cjs';
|
package/dist/vector/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { X as Vec2$1, a3 as VectorSubpath, O as VectorBounds, bp as VectorAnchor, a4 as VectorDocument, L as VectorNode, I as VectorPathNode, bq as VectorTextNode, br as VectorAnchorType, $ as VectorPaint, N as VectorGroupNode, bs as VectorCornerKind, a5 as VectorWidthPoint, W as VectorGradient, a1 as VectorGradientStop, bt as VectorViewport, bu as VectorConnectorRoute, bv as VectorConnectorSide, bw as VectorConnectorEnd, bx as VectorConnector, by as VectorConstraintKind, bz as VectorConstraint, bA as VectorCharacterStyle, bB as VectorTextRun, bC as VectorParagraphStyle, bD as VectorTextFrame, bE as VectorTransformHandle, bF as VectorAnchorRef, bG as VectorPathfinderOperation, bH as VectorTool, bI as VectorDefaults, bJ as VectorTextAlign, bK as VectorStyle, bL as VectorHandleRef, bM as VectorSegmentRef, bN as VectorBlendOptions, a0 as VectorMatrix, bO as VectorModifiers, v as EffectsSlot, E as EffectProvider, e as EffectValue, bP as VectorProviderEffect, bQ as VectorBlendMode, R as VectorFilterType, V as VectorEffectType, bR as VectorAlign, bS as VectorDistribute, bT as VectorArrange, K as VectorBooleanOperation, bU as VectorMaskType, bV as VectorSymmetryMode, bW as VectorSymmetry, bX as VectorFreeformPoint, bY as VectorMeshGradient, bZ as VectorFreeformGradient, b_ as VectorArrowhead, b$ as VectorResizing, c0 as VectorFrame, c1 as VectorHorizontalResizing, c2 as VectorVerticalResizing, c3 as VectorMask, c4 as VectorAverageAxis, c5 as VectorSymbol, c6 as VectorParameter, P as VectorWarpMesh, J as VectorFillRule, c7 as VectorBlendSpacing, c8 as VectorGradientInterpolation, Z as VectorGradientSpread, _ as VectorGradientType, a2 as VectorStrokeAlign, c9 as VectorStrokeGradientMode, ca as VectorArrowAlign, M as VectorEffect, cb as VectorPaintLayer, cc as VectorStrokeLayer, U as VectorFilter, cd as VectorBlend, ce as VectorMergeMode, cf as VectorLineJoin, H as VectorEffectParamsMap, cg as VectorStrokeSettings, ch as VectorInstanceOverrides, Q as VectorInstanceNode } from '../helpers-CPWcK504.js';
|
|
2
2
|
export { S as SvgGradientDef, ci as VECTOR_ARROWHEADS, cj as VECTOR_BLEND_MODES, ck as VECTOR_BLEND_SPACINGS, cl as VECTOR_CONNECTOR_ROUTES, cm as VECTOR_CONNECTOR_SIDES, cn as VECTOR_CONSTRAINT_KINDS, co as VECTOR_CORNER_KINDS, cp as VECTOR_EFFECT_TYPES, cq as VECTOR_FILTER_TYPES, cr as VECTOR_GRADIENT_INTERPOLATIONS, cs as VECTOR_GRADIENT_SPREADS, ct as VECTOR_GRADIENT_TYPES, cu as VECTOR_HORIZONTAL_RESIZING, cv as VECTOR_MASK_TYPES, cw as VECTOR_MERGE_MODES, cx as VECTOR_PATHFINDER_OPERATIONS, cy as VECTOR_PATH_TEXT_BASELINES, cz as VECTOR_STROKE_GRADIENT_MODES, cA as VECTOR_SYMMETRY_MODES, cB as VECTOR_TEXT_ALIGNS, cC as VECTOR_TOOLS, cD as VECTOR_TRANSFORM_HANDLES, cE as VECTOR_VERTICAL_RESIZING, cF as VectorCorner, T as VectorFilterParamsMap, cG as VectorGeomRef, Y as VectorGradientUnits, cH as VectorLineCap, cI as VectorPathTextBaseline, cJ as VectorStrokeLayerKind, cK as VectorTextRunStyle, cL as VectorWarpStyle } from '../helpers-CPWcK504.js';
|
|
3
|
-
import { P as Point } from '../brushTypes-
|
|
4
|
-
import { a as BezierPathInput, A as AffineMatrix$1, B as BezierPath, c as BezierSegment } from '../bezier-
|
|
5
|
-
import { a as VectorGradientHandle, V as VectorSvgExportOptions, b as VectorGradientPatch, c as VectorEnvelopeParams, d as VectorRenderFilter, e as VectorAppearanceShape, f as VectorFilterParamSpec, g as VectorEffectParamSpec, h as VectorRenderStrokeParts, i as VectorPaintDef, j as VectorRgba, k as VectorSvgPatternDef } from '../svg-
|
|
6
|
-
export { l as VECTOR_EFFECT_DEFAULTS, m as VECTOR_EFFECT_LABELS, n as VECTOR_EFFECT_PARAM_SPECS, o as VECTOR_FILTER_DEFAULTS, p as VECTOR_FILTER_LABELS, q as VECTOR_FILTER_MENU, r as VECTOR_FILTER_PARAM_SPECS, s as VECTOR_GRADIENT_MAX_PERIODS, t as VECTOR_GRADIENT_MIN_STOPS, u as VectorBooleanOperand, v as VectorFilterPrimitive, w as VectorGradientPoints, x as VectorGradientRamp, y as VectorGradientSvgOptions, z as VectorPaintSvgOptions, A as VectorSvgImportOptions, B as VectorSvgWrapper, C as activeVectorEffects, D as activeVectorFilters, E as applyVectorCornersAttribute, F as applyVectorEffects, G as applyVectorGradientPatch, H as applyVectorGradientSpread, I as clearVectorLiveBooleanCache, J as convertVectorGradient, K as createVectorEffect, L as createVectorFilter, M as defaultVectorGradient, N as expandVectorAppearance, O as expandVectorAppearances, P as expandVectorGradientSpread, Q as expandVectorGradientStops, R as explicitVectorGradient, S as foldVectorBooleanOperands, T as gradientMidpointRemap, U as hasExplicitGradientGeometry, W as hasOwnVectorAppearance, X as hasVectorAppearance, Y as insertVectorGradientStop, Z as isCentredVectorGradient, _ as isVectorFilterType, $ as isVectorGradient, a0 as isVectorLiveBoolean, a1 as mapVectorGradient, a2 as mapVectorPaint, a3 as moveVectorGradientHandle, a4 as moveVectorGradientStop, a5 as normalizeVectorEffectParams, a6 as normalizeVectorFilterParams, a7 as parseSvgTransform, a8 as parseVectorColor, a9 as parseVectorSvg, aa as patternAttrs, ab as periodicVectorGradientStops, ac as pinVectorGradient, ad as removeVectorGradientStop, ae as reverseVectorGradient, af as samplePlainStops, ag as sampleVectorGradient, ah as sampleVectorGradientAt, ai as sampleVectorPaintDefAt, aj as sanitizeVectorEffects, ak as sanitizeVectorFilters, al as sanitizeVectorGradient, am as setVectorGradientVector, an as sortedVectorGradientStops, ao as spanVectorGradientStops, ap as transformVectorEffects, aq as transformVectorGradient, ar as transformVectorPaint, as as vectorAppearanceNodes, at as vectorAppearanceOutline, au as vectorAppearanceShapes, av as vectorBoxMatrix, aw as vectorChildAppearanceShapes, ax as vectorCornersAttribute, ay as vectorDocumentToSvg, az as vectorEffectInputBounds, aA as vectorEffectInputPaths, aB as vectorEnteredGroups, aC as vectorEnvelopeFrame, aD as vectorEnvelopeMap, aE as vectorEnvelopeMesh, aF as vectorFilterMarkup, aG as vectorFilterParamKeys, aH as vectorFilterReach, aI as vectorFilterSvg, aJ as vectorGradientArea, aK as vectorGradientAspect, aL as vectorGradientFocalParam, aM as vectorGradientHandles, aN as vectorGradientMatrix, aO as vectorGradientMidpointFromPosition, aP as vectorGradientMidpointPosition, aQ as vectorGradientNeedsExpansion, aR as vectorGradientParam, aS as vectorGradientPoints, aT as vectorGradientRamp, aU as vectorGradientSvgDefs, aV as vectorGradientTAt, aW as vectorGradientUnitsMatrix, aX as vectorInstanceDrawn, aY as vectorLiveBooleanSteps, aZ as vectorNodeEnvelope, a_ as vectorNodeFilterSvg, a$ as vectorNodeLocalPaintBounds, b0 as vectorOperandOperation, b1 as vectorPaintToSvg, b2 as vectorPathLocalBounds, b3 as vectorStrokeSvgParts, b4 as widthProfileFromAttribute, b5 as widthProfileToAttribute } from '../svg-
|
|
3
|
+
import { P as Point } from '../brushTypes-C7N3EBK7.js';
|
|
4
|
+
import { a as BezierPathInput, A as AffineMatrix$1, B as BezierPath, c as BezierSegment } from '../bezier-DP4NnJp3.js';
|
|
5
|
+
import { a as VectorGradientHandle, V as VectorSvgExportOptions, b as VectorGradientPatch, c as VectorEnvelopeParams, d as VectorRenderFilter, e as VectorAppearanceShape, f as VectorFilterParamSpec, g as VectorEffectParamSpec, h as VectorRenderStrokeParts, i as VectorPaintDef, j as VectorRgba, k as VectorSvgPatternDef } from '../svg-CUzZa0EO.js';
|
|
6
|
+
export { l as VECTOR_EFFECT_DEFAULTS, m as VECTOR_EFFECT_LABELS, n as VECTOR_EFFECT_PARAM_SPECS, o as VECTOR_FILTER_DEFAULTS, p as VECTOR_FILTER_LABELS, q as VECTOR_FILTER_MENU, r as VECTOR_FILTER_PARAM_SPECS, s as VECTOR_GRADIENT_MAX_PERIODS, t as VECTOR_GRADIENT_MIN_STOPS, u as VectorBooleanOperand, v as VectorFilterPrimitive, w as VectorGradientPoints, x as VectorGradientRamp, y as VectorGradientSvgOptions, z as VectorPaintSvgOptions, A as VectorSvgImportOptions, B as VectorSvgWrapper, C as activeVectorEffects, D as activeVectorFilters, E as applyVectorCornersAttribute, F as applyVectorEffects, G as applyVectorGradientPatch, H as applyVectorGradientSpread, I as clearVectorLiveBooleanCache, J as convertVectorGradient, K as createVectorEffect, L as createVectorFilter, M as defaultVectorGradient, N as expandVectorAppearance, O as expandVectorAppearances, P as expandVectorGradientSpread, Q as expandVectorGradientStops, R as explicitVectorGradient, S as foldVectorBooleanOperands, T as gradientMidpointRemap, U as hasExplicitGradientGeometry, W as hasOwnVectorAppearance, X as hasVectorAppearance, Y as insertVectorGradientStop, Z as isCentredVectorGradient, _ as isVectorFilterType, $ as isVectorGradient, a0 as isVectorLiveBoolean, a1 as mapVectorGradient, a2 as mapVectorPaint, a3 as moveVectorGradientHandle, a4 as moveVectorGradientStop, a5 as normalizeVectorEffectParams, a6 as normalizeVectorFilterParams, a7 as parseSvgTransform, a8 as parseVectorColor, a9 as parseVectorSvg, aa as patternAttrs, ab as periodicVectorGradientStops, ac as pinVectorGradient, ad as removeVectorGradientStop, ae as reverseVectorGradient, af as samplePlainStops, ag as sampleVectorGradient, ah as sampleVectorGradientAt, ai as sampleVectorPaintDefAt, aj as sanitizeVectorEffects, ak as sanitizeVectorFilters, al as sanitizeVectorGradient, am as setVectorGradientVector, an as sortedVectorGradientStops, ao as spanVectorGradientStops, ap as transformVectorEffects, aq as transformVectorGradient, ar as transformVectorPaint, as as vectorAppearanceNodes, at as vectorAppearanceOutline, au as vectorAppearanceShapes, av as vectorBoxMatrix, aw as vectorChildAppearanceShapes, ax as vectorCornersAttribute, ay as vectorDocumentToSvg, az as vectorEffectInputBounds, aA as vectorEffectInputPaths, aB as vectorEnteredGroups, aC as vectorEnvelopeFrame, aD as vectorEnvelopeMap, aE as vectorEnvelopeMesh, aF as vectorFilterMarkup, aG as vectorFilterParamKeys, aH as vectorFilterReach, aI as vectorFilterSvg, aJ as vectorGradientArea, aK as vectorGradientAspect, aL as vectorGradientFocalParam, aM as vectorGradientHandles, aN as vectorGradientMatrix, aO as vectorGradientMidpointFromPosition, aP as vectorGradientMidpointPosition, aQ as vectorGradientNeedsExpansion, aR as vectorGradientParam, aS as vectorGradientPoints, aT as vectorGradientRamp, aU as vectorGradientSvgDefs, aV as vectorGradientTAt, aW as vectorGradientUnitsMatrix, aX as vectorInstanceDrawn, aY as vectorLiveBooleanSteps, aZ as vectorNodeEnvelope, a_ as vectorNodeFilterSvg, a$ as vectorNodeLocalPaintBounds, b0 as vectorOperandOperation, b1 as vectorPaintToSvg, b2 as vectorPathLocalBounds, b3 as vectorStrokeSvgParts, b4 as widthProfileFromAttribute, b5 as widthProfileToAttribute } from '../svg-CUzZa0EO.js';
|
|
7
7
|
import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
|
|
8
|
-
import { a as TextFont, L as LaidFragment, f as LaidLine, e as TextLayout, T as TextShaper } from '../warp-
|
|
9
|
-
export { g as VECTOR_WARP_STYLES, h as VECTOR_WARP_STYLE_LABELS, W as VectorWarpPreset, i as dragVectorMeshPoint, j as evalVectorMesh, k as fitVectorMesh, l as isValidVectorMesh, m as mapVectorMeshPoints, p as pullVectorMesh, r as removeVectorMeshSplitU, n as removeVectorMeshSplitV, o as resizeVectorMesh, s as splitVectorMeshU, q as splitVectorMeshV, t as vectorIdentityMesh, w as vectorMeshColumns, u as vectorMeshControlBounds, v as vectorMeshEditPoints, x as vectorMeshGridCurves, y as vectorMeshParamAt, z as vectorMeshRows, A as vectorWarpPresetGrid, B as vectorWarpPresetMesh } from '../warp-
|
|
8
|
+
import { a as TextFont, L as LaidFragment, f as LaidLine, e as TextLayout, T as TextShaper } from '../warp-CIsO617e.js';
|
|
9
|
+
export { g as VECTOR_WARP_STYLES, h as VECTOR_WARP_STYLE_LABELS, W as VectorWarpPreset, i as dragVectorMeshPoint, j as evalVectorMesh, k as fitVectorMesh, l as isValidVectorMesh, m as mapVectorMeshPoints, p as pullVectorMesh, r as removeVectorMeshSplitU, n as removeVectorMeshSplitV, o as resizeVectorMesh, s as splitVectorMeshU, q as splitVectorMeshV, t as vectorIdentityMesh, w as vectorMeshColumns, u as vectorMeshControlBounds, v as vectorMeshEditPoints, x as vectorMeshGridCurves, y as vectorMeshParamAt, z as vectorMeshRows, A as vectorWarpPresetGrid, B as vectorWarpPresetMesh } from '../warp-CIsO617e.js';
|
|
10
10
|
import { A as AffineMatrix, V as Vec2 } from '../types-CwMPoRMU.js';
|
|
11
11
|
export { H as VectorHomography } from '../types-CwMPoRMU.js';
|
|
12
12
|
import { C as CommandSpec } from '../registry-rVtFJjRM.js';
|
|
13
|
-
import { S as StrokeJoin, a as StrokeCap, P as PlanarMap, b as PathfinderOperation, c as PathfinderShape } from '../pathfinder-
|
|
13
|
+
import { S as StrokeJoin, a as StrokeCap, P as PlanarMap, b as PathfinderOperation, c as PathfinderShape } from '../pathfinder-BwJx0_zM.js';
|
|
14
14
|
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
|
|
15
|
-
export { C as CanvasTextShaperOptions, O as OpenTypeFont, a as OutlineFontEntry, b as OutlineFontFace, c as OutlinePathCommand, d as applyVectorHomography, e as createCanvasTextShaper, f as createMetricTextShaper, g as createOutlineTextShaper, h as cssFontFamily, l as loadOpenTypeFont, o as orderVectorQuad, p as parseOpenTypeFont, s as solve8, i as vectorHomography, j as vectorHomographyKeepsQuad } from '../opentype-
|
|
15
|
+
export { C as CanvasTextShaperOptions, O as OpenTypeFont, a as OutlineFontEntry, b as OutlineFontFace, c as OutlinePathCommand, d as applyVectorHomography, e as createCanvasTextShaper, f as createMetricTextShaper, g as createOutlineTextShaper, h as cssFontFamily, l as loadOpenTypeFont, o as orderVectorQuad, p as parseOpenTypeFont, s as solve8, i as vectorHomography, j as vectorHomographyKeepsQuad } from '../opentype-sQrF3Ry1.js';
|
|
16
16
|
import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
|
|
17
17
|
import '../schema-Di0CS6Pe.js';
|
|
18
18
|
import '../evaluate-BbCeF6pt.js';
|
package/package.json
CHANGED
|
@@ -167,11 +167,12 @@ are kept exactly). They need unlocked shapes; other selected nodes are ignored.
|
|
|
167
167
|
|
|
168
168
|
Freehand strokes are `path` shape nodes, so they select, move, group, erase and export like any
|
|
169
169
|
shape. A stroke with `data.shape.brush` is painted with a dry paint brush instead of an SVG stroke
|
|
170
|
-
(the path stays the data; the paint is rendered from it).
|
|
170
|
+
(the path stays the data; the paint is rendered from it); `brush.paint` gives it gradient paint, sampled dab by dab
|
|
171
|
+
along the path, instead of the stroke colour).
|
|
171
172
|
|
|
172
173
|
| Command | Use it to |
|
|
173
174
|
| --- | --- |
|
|
174
|
-
| `canvas.drawFreehand` | Draw a pen or highlighter stroke through `points` (`[x, y]` pairs in canvas units, in drawing order; one undo step). `tool` picks the defaults (`pen`: blue, width 3; `highlighter`: yellow, width 24, opacity 0.35); `color`, `width`, `opacity` override them. Pass `brush` (a preset id from `canvas.listBrushes`, or tip settings) to paint it with a dry brush, plus `pressure` / `tiltX` / `tiltY` profiles spread along its length (`[0.2, 1, 0.3]` swells in the middle). Returns the node `id`, its `bounds` and the stored `brush
|
|
175
|
+
| `canvas.drawFreehand` | Draw a pen or highlighter stroke through `points` (`[x, y]` pairs in canvas units, in drawing order; one undo step). `tool` picks the defaults (`pen`: blue, width 3; `highlighter`: yellow, width 24, opacity 0.35); `color`, `width`, `opacity` override them. Pass `brush` (a preset id from `canvas.listBrushes`, or tip settings) to paint it with a dry brush, plus `pressure` / `tiltX` / `tiltY` profiles spread along its length (`[0.2, 1, 0.3]` swells in the middle). Add `paint` (only with `brush`) for gradient paint that changes colour along the stroke: `{ "type": "gradient", "stops": [...], "map": { "by": "distance", "length": 200 } }` (length in canvas units), or `by` `pressure`, `tilt`, `direction`, `across-tip`, `random`. Returns the node `id`, its `bounds` and the stored `brush` (with `paint` normalised: defaults filled in, colours lowercased). |
|
|
175
176
|
| `canvas.listBrushes` | Read-only: the dry paint presets `canvas.drawFreehand` accepts as `brush` (`id`, `name`, `category`, the preset's own `size`). Call it before the first brushed stroke instead of guessing ids. |
|
|
176
177
|
|
|
177
178
|
### Components (command form)
|
|
@@ -249,6 +250,14 @@ effects provider (for example Flair); without one the read tools say so and the
|
|
|
249
250
|
- **Brushes are dry only.** Wet presets (watercolour, gouache, wet oils), mixer, blender, smudge and
|
|
250
251
|
eraser presets are refused: wet paint needs an area to flow in, and the others need paint under
|
|
251
252
|
them. `pressure` and tilt without a `brush` are refused too.
|
|
253
|
+
- **Gradient paint needs a brush, and no timing.** `paint` without `brush` is refused; use
|
|
254
|
+
`color` for a plain stroke. Canvas strokes record no timing, so `velocity` and `time` mappings
|
|
255
|
+
are refused: use `distance` for colour that changes along the stroke. The stroke `color` still
|
|
256
|
+
sets the alpha and fills `"paint"` stops (`"secondary"` is white). A distance `length` shorter
|
|
257
|
+
than the stroke with `repeat: "mirror"` (the default) runs back and forth; use `clamp` and a
|
|
258
|
+
length near the stroke's to go from one end to the other once.
|
|
259
|
+
- A canvas gradient in `color` does not reach the brush: a brushed stroke with a gradient
|
|
260
|
+
`color` and no `paint` uses its first stop. Pass `paint` instead.
|
|
252
261
|
- **Shape operations drop the brush.** Unite, subtract, offset path and outline stroke turn
|
|
253
262
|
brushed strokes into plain filled or stroked paths.
|
|
254
263
|
- `canvas_*` tools validate ids against the current state; an "Unknown node id" error means call
|
|
@@ -385,7 +385,7 @@ in the source frame at the document's bit depth, colour mode and profile. Read
|
|
|
385
385
|
| `clean_mixer_brush` | Empty the Mixer Brush pickup well (`emptyReservoir: true` also drops the loaded paint, so it only smears). View state, not an undo step. Returns the load. |
|
|
386
386
|
| `get_color_profile` | Read-only. The document's profile (`name`, `builtin` id or null, `colorSpace`, `srgb`), the Proof Setup or null, and the built-in profiles. |
|
|
387
387
|
| `assign_profile` | Make the document's numbers mean colours in `profile` (built-in id or `icc:<base64>`; RGB only). The look changes, pixels do not. One undo step. Returns the profile. |
|
|
388
|
-
| `convert_to_profile` | Convert
|
|
388
|
+
| `convert_to_profile` | Convert the document into `profile` keeping its look (`intent`, `bpc`): pixel layers, shape and text colours, effect and annotation colours. Then assign it. One undo step. Returns the profile, `convertedLayerIds` and `unconvertedLayerIds` (smart objects). |
|
|
389
389
|
| `set_proof_setup` | Soft-proof the viewport through `profile` (`intent`, `bpc`, `simulatePaper`, `gamutWarning`), or `off: true`. View state. Returns the setup. |
|
|
390
390
|
| `set_color_mode` | Image › Mode: `rgb`, `cmyk` (with the press `profile`, default coated-cmyk, and the separation `intent`) or `lab`. Pixels stay RGB; CMYK documents proof through their profile and `export_psd` writes CMYK / Lab channels. One undo step. Returns the profile summary with `mode`. |
|
|
391
391
|
| `convert_colors` | Read-only. `colors` #rrggbb from the document's profile (or `from`) to `to`: channel `values` 0..1 (CMYK, RGB, grey), `hex` for RGB, and `lab`. |
|
|
@@ -32,9 +32,10 @@ means sRGB. The viewport assumes an sRGB display and converts other working spac
|
|
|
32
32
|
- The working space must be RGB: CMYK and Lab are document modes (`set_color_mode`) for
|
|
33
33
|
output, not spaces you edit numbers in. Adjustment layers keep their RGB settings in a CMYK or
|
|
34
34
|
Lab PSD, where Photoshop applies them to its own channels; `export_psd` warns.
|
|
35
|
-
- `convert_to_profile` converts pixel layers (and the source image)
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
- `convert_to_profile` converts pixel layers (and the source image), shape fills and strokes,
|
|
36
|
+
text colours, layer-effect colours (gradient stops included) and annotation colours, and
|
|
37
|
+
re-renders shape and type layers. Smart objects keep their contents' numbers and are listed in
|
|
38
|
+
`unconvertedLayerIds`: convert inside them (`edit_smart_object_contents`) if the look matters.
|
|
38
39
|
- Images opened from a URL or file in the browser arrive already converted to sRGB by the
|
|
39
40
|
browser, so their own profile is not kept; PSDs keep theirs (resource 1039).
|
|
40
41
|
- `export_psd` always embeds the profile; PNG and JPEG exports embed it when it is not sRGB.
|
|
@@ -343,7 +343,7 @@ contents whole while you work, without losing the mask.
|
|
|
343
343
|
|
|
344
344
|
| Command | Use it to |
|
|
345
345
|
| --- | --- |
|
|
346
|
-
| `vector.addEffect` | Add a live path effect `type` (trim, roundCorners, puckerBloat, twist, zigzag, wiggle, offset, merge, repeater, envelope, contour: concentric steps blending to end colours, blockShadow: the shape swept along an angle under it, a long shadow when endOpacity fades) with `params` to `ids`, at `index` in the stack (default last). Effects apply top to bottom. Returns `{ effects: [{ nodeId, effectId }] }`. |
|
|
346
|
+
| `vector.addEffect` | Add a live path effect `type` (trim, roundCorners, puckerBloat, twist, zigzag, wiggle, offset, merge, repeater, envelope, contour: concentric steps blending to end colours, blockShadow: the shape swept along an angle under it, a long shadow when endOpacity fades, extrude: shaded side faces making the shape a solid, parallel or toward a vanishing point) with `params` to `ids`, at `index` in the stack (default last). Effects apply top to bottom. Returns `{ effects: [{ nodeId, effectId }] }`. |
|
|
347
347
|
| `vector.updateEffect` | Change effect `effectId` on `nodeId`: `params` (merged), `enabled`, or move it to `index` (0 applies first). Returns the node's effect stack. |
|
|
348
348
|
| `vector.removeEffect` | Remove effect `effectId` from `nodeId`. |
|
|
349
349
|
| `vector.envelope` | Warp with a live envelope: a `preset` (arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist) with `bend`, `horizontal`, `vertical` (percent, -100 to 100) and `orientation`; or a `mesh` of `rows` x `columns` (1 to 16, optional control `points`); or `topObject: true` (top closed path becomes the envelope), `release: true`, `expand: true`. Reapplying changes an existing envelope. |
|
|
@@ -112,6 +112,7 @@ default below. Lengths are in the node's own units, angles degrees, percentages
|
|
|
112
112
|
| repeater | copies 3, offset 0, position {x 100, y 0}, anchor {x 0, y 0}, rotation 0, scale {x 100, y 100} (%), startOpacity 100, endOpacity 100 (%), composite `below` | Copy i is moved, rotated and scaled k = i + offset times about the anchor; fractional copies fade the last one. Radial patterns: position {0, 0}, rotation 360 / copies. |
|
|
113
113
|
| contour | direction `inside`, steps 4, offset 6, fillColor `#ffffff`, strokeColor null, acceleration 0, join `round`, miterLimit 4 | CorelDRAW's Contour: each shape plus `steps` concentric copies `offset` apart (`center`: inward until the shape is used up), their fill and stroke blending to the end colours (null keeps the shape's colour); inside steps draw over the shape, outside ones under it. Acceleration −100…100 holds the colour back (positive) or rushes it (negative). Use for embossed badges, topographic lines and soft glows. |
|
|
114
114
|
| blockShadow | angle 45 (degrees, 0 right, 90 down), distance 20, color `#1e293b` (null: the shape's own fill), opacity 100, endOpacity 100 (%) | CorelDRAW's Block Shadow: each shape swept `distance` along `angle` as one solid shape drawn under all of them. Set endOpacity below opacity (e.g. 0) with a long distance for a flat-design long shadow. The direction is in the node's own space, so it turns with the node. Put it last in the stack so it shadows the final shapes. |
|
|
115
|
+
| extrude | mode `parallel`, angle 45, depth 30, vanishingPoint {x 0, y -300} (offset from the middle), toward 30 (%), color null (the shape's own fill), lightAngle -135 (light from the top left), shading 60 (%) | CorelDRAW's Extrude: one side face per edge (curves flattened), back to front, under the shape. Parallel moves the back `depth` along `angle`; perspective pulls it `toward` percent to the vanishing point. Faces lighten as they face the light and darken facing away. Use for 3D lettering, isometric blocks and buttons; put it last in the stack. |
|
|
115
116
|
| envelope | style `arc`, bend 50, horizontal 0, vertical 0, orientation `horizontal`, rows 2, columns 2, mesh null | Prefer `vector.envelope`. |
|
|
116
117
|
|
|
117
118
|
Effects apply in stack order (index 0 first) to everything above them; effects after a repeater
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/canvas/brushstrokeRender.ts"],"sourcesContent":["/**\n * The lazily loaded half of brushed freehand strokes (`./brushstroke.ts` imports it on first use):\n * the paint engine's dry brushstroke renderer, the paint presets and a CSS colour parser. Keep\n * every import of the paint engine in this file, so the canvas entry never reaches it statically.\n */\nimport { BrushstrokeCache, brushstrokeDataUrl, isBrushstrokeBrush, type BrushstrokeBrush, type BrushstrokeImage } from '../paint/brushstroke.js';\nimport { BUILTIN_BRUSHES } from '../paint-editor/brushes.js';\nimport { parseCssColor } from '../image-editor/layers/css-color.js';\nimport { resolveCanvasGradient } from './gradient.js';\nimport { formatNumber, getShapeSvg, type ShapeSize } from './shapeGeometry.js';\nimport { pathDataToPolyline, type BrushedPathShape, type CanvasBrush, type CanvasBrushPreset, type CanvasBrushstrokeImage } from './brushstroke.js';\n\nconst DRY = BUILTIN_BRUSHES.filter((b) => isBrushstrokeBrush(b));\n\nexport function listCanvasBrushes(): CanvasBrushPreset[] {\n\treturn DRY.map((b) => ({ id: b.id, name: b.name, category: b.category, size: b.tip.size }));\n}\n\n/** The paint engine brush for a canvas brush at stroke width `width`; throws with the usable ids. */\nexport function resolveCanvasBrush(brush: CanvasBrush, width: number): BrushstrokeBrush {\n\tconst size = Math.max(1, Number.isFinite(width) ? width : 1);\n\tif (typeof brush === 'string') {\n\t\tconst preset = BUILTIN_BRUSHES.find((b) => b.id === brush);\n\t\tconst ids = DRY.map((b) => b.id).join(', ');\n\t\tif (!preset) throw new Error(`Unknown brush '${brush}'. Use one of the dry paint presets (${ids}) or tip settings ({ hardness, spacing, flow, … }).`);\n\t\tif (!isBrushstrokeBrush(preset)) {\n\t\t\tthrow new Error(`Brush '${brush}' (${preset.name}) is not a dry brush: brushed canvas strokes use dry media only (wet paint needs an area to flow in; mixer, blender, smudge and eraser brushes need paint under them). Use one of: ${ids}.`);\n\t\t}\n\t\treturn { ...preset, tip: { ...preset.tip, size } };\n\t}\n\tif (!brush || typeof brush !== 'object' || Array.isArray(brush)) {\n\t\tthrow new Error('A brush is a dry paint preset id (see listCanvasBrushes / canvas.listBrushes) or an object of tip settings.');\n\t}\n\treturn { size, ...brush };\n}\n\n/** RGBA of a shape's stroke paint. Gradients use their first stop until gradient paint (`PaintSource`) reaches the brush engine. */\nfunction strokeColor(shape: BrushedPathShape): [number, number, number, number] {\n\tconst gradient = resolveCanvasGradient(shape.strokeGradient ?? shape.stroke);\n\tconst css = gradient ? (gradient.stops[0]?.color ?? '#000') : typeof shape.stroke === 'string' && shape.stroke !== 'none' ? shape.stroke : '#000';\n\tconst parsed = parseCssColor(css) ?? { hex: '#000000', alpha: 1 };\n\tconst n = parseInt(parsed.hex.slice(1), 16);\n\treturn [(n >> 16) & 255, (n >> 8) & 255, n & 255, Math.round(parsed.alpha * 255)];\n}\n\nconst cache = new BrushstrokeCache(128);\nconst urls = new WeakMap<BrushstrokeImage, string>();\n\nexport function renderShapeBrushstrokeNow(shape: BrushedPathShape, scale: number): CanvasBrushstrokeImage | null {\n\tconst brush = resolveCanvasBrush(shape.brush.brush, shape.strokeWidth ?? 3);\n\tconst points = pathDataToPolyline(shape.d);\n\tif (!points.length) return null;\n\tconst { pressure, tiltX, tiltY } = shape.brush;\n\tconst input = {\n\t\tpoints: points.map(([x, y]) => ({ x, y })),\n\t\t...(pressure?.length ? { pressure } : {}),\n\t\t...(tiltX?.length ? { tiltX } : {}),\n\t\t...(tiltY?.length ? { tiltY } : {})\n\t};\n\tconst stroke = cache.render(input, brush, { scale, color: strokeColor(shape) });\n\tif (!stroke.bounds) return null;\n\tlet href = urls.get(stroke);\n\tif (href === undefined) {\n\t\thref = brushstrokeDataUrl(stroke);\n\t\turls.set(stroke, href);\n\t}\n\treturn { href, ...stroke.bounds, scale: stroke.scale };\n}\n\nconst escapeAttr = (s: string) => s.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<');\n\nexport function brushedShapeSvgNow(shape: BrushedPathShape, size: ShapeSize, scale: number): string {\n\tconst f = (n: number) => formatNumber(n, 3);\n\tconst image = renderShapeBrushstrokeNow(shape, scale);\n\tconst svg = getShapeSvg(shape, size);\n\tconst body = image\n\t\t? `<image href=\"${escapeAttr(image.href)}\" x=\"${f(image.x)}\" y=\"${f(image.y)}\" width=\"${f(image.width)}\" height=\"${f(image.height)}\" preserveAspectRatio=\"none\"${shape.opacity !== undefined ? ` opacity=\"${f(shape.opacity)}\"` : ''}/>`\n\t\t: '';\n\tconst content = svg.transform && body ? `<g transform=\"${svg.transform}\">${body}</g>` : body;\n\treturn `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${f(size.width)}\" height=\"${f(size.height)}\" viewBox=\"0 0 ${f(size.width)} ${f(size.height)}\">${content}</svg>`;\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/brushstrokeRender-OW6ENCZG.cjs","../src/canvas/brushstrokeRender.ts"],"names":[],"mappings":"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","file":"/home/runner/work/editor/editor/packages/core/dist/brushstrokeRender-OW6ENCZG.cjs","sourcesContent":[null,"/**\n * The lazily loaded half of brushed freehand strokes (`./brushstroke.ts` imports it on first use):\n * the paint engine's dry brushstroke renderer, the paint presets and a CSS colour parser. Keep\n * every import of the paint engine in this file, so the canvas entry never reaches it statically.\n */\nimport { BrushstrokeCache, brushstrokeDataUrl, isBrushstrokeBrush, type BrushstrokeBrush, type BrushstrokeImage } from '../paint/brushstroke.js';\nimport { BUILTIN_BRUSHES } from '../paint-editor/brushes.js';\nimport { parseCssColor } from '../image-editor/layers/css-color.js';\nimport { resolveCanvasGradient } from './gradient.js';\nimport { formatNumber, getShapeSvg, type ShapeSize } from './shapeGeometry.js';\nimport { pathDataToPolyline, type BrushedPathShape, type CanvasBrush, type CanvasBrushPreset, type CanvasBrushstrokeImage } from './brushstroke.js';\n\nconst DRY = BUILTIN_BRUSHES.filter((b) => isBrushstrokeBrush(b));\n\nexport function listCanvasBrushes(): CanvasBrushPreset[] {\n\treturn DRY.map((b) => ({ id: b.id, name: b.name, category: b.category, size: b.tip.size }));\n}\n\n/** The paint engine brush for a canvas brush at stroke width `width`; throws with the usable ids. */\nexport function resolveCanvasBrush(brush: CanvasBrush, width: number): BrushstrokeBrush {\n\tconst size = Math.max(1, Number.isFinite(width) ? width : 1);\n\tif (typeof brush === 'string') {\n\t\tconst preset = BUILTIN_BRUSHES.find((b) => b.id === brush);\n\t\tconst ids = DRY.map((b) => b.id).join(', ');\n\t\tif (!preset) throw new Error(`Unknown brush '${brush}'. Use one of the dry paint presets (${ids}) or tip settings ({ hardness, spacing, flow, … }).`);\n\t\tif (!isBrushstrokeBrush(preset)) {\n\t\t\tthrow new Error(`Brush '${brush}' (${preset.name}) is not a dry brush: brushed canvas strokes use dry media only (wet paint needs an area to flow in; mixer, blender, smudge and eraser brushes need paint under them). Use one of: ${ids}.`);\n\t\t}\n\t\treturn { ...preset, tip: { ...preset.tip, size } };\n\t}\n\tif (!brush || typeof brush !== 'object' || Array.isArray(brush)) {\n\t\tthrow new Error('A brush is a dry paint preset id (see listCanvasBrushes / canvas.listBrushes) or an object of tip settings.');\n\t}\n\treturn { size, ...brush };\n}\n\n/** RGBA of a shape's stroke paint. Gradients use their first stop until gradient paint (`PaintSource`) reaches the brush engine. */\nfunction strokeColor(shape: BrushedPathShape): [number, number, number, number] {\n\tconst gradient = resolveCanvasGradient(shape.strokeGradient ?? shape.stroke);\n\tconst css = gradient ? (gradient.stops[0]?.color ?? '#000') : typeof shape.stroke === 'string' && shape.stroke !== 'none' ? shape.stroke : '#000';\n\tconst parsed = parseCssColor(css) ?? { hex: '#000000', alpha: 1 };\n\tconst n = parseInt(parsed.hex.slice(1), 16);\n\treturn [(n >> 16) & 255, (n >> 8) & 255, n & 255, Math.round(parsed.alpha * 255)];\n}\n\nconst cache = new BrushstrokeCache(128);\nconst urls = new WeakMap<BrushstrokeImage, string>();\n\nexport function renderShapeBrushstrokeNow(shape: BrushedPathShape, scale: number): CanvasBrushstrokeImage | null {\n\tconst brush = resolveCanvasBrush(shape.brush.brush, shape.strokeWidth ?? 3);\n\tconst points = pathDataToPolyline(shape.d);\n\tif (!points.length) return null;\n\tconst { pressure, tiltX, tiltY } = shape.brush;\n\tconst input = {\n\t\tpoints: points.map(([x, y]) => ({ x, y })),\n\t\t...(pressure?.length ? { pressure } : {}),\n\t\t...(tiltX?.length ? { tiltX } : {}),\n\t\t...(tiltY?.length ? { tiltY } : {})\n\t};\n\tconst stroke = cache.render(input, brush, { scale, color: strokeColor(shape) });\n\tif (!stroke.bounds) return null;\n\tlet href = urls.get(stroke);\n\tif (href === undefined) {\n\t\thref = brushstrokeDataUrl(stroke);\n\t\turls.set(stroke, href);\n\t}\n\treturn { href, ...stroke.bounds, scale: stroke.scale };\n}\n\nconst escapeAttr = (s: string) => s.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<');\n\nexport function brushedShapeSvgNow(shape: BrushedPathShape, size: ShapeSize, scale: number): string {\n\tconst f = (n: number) => formatNumber(n, 3);\n\tconst image = renderShapeBrushstrokeNow(shape, scale);\n\tconst svg = getShapeSvg(shape, size);\n\tconst body = image\n\t\t? `<image href=\"${escapeAttr(image.href)}\" x=\"${f(image.x)}\" y=\"${f(image.y)}\" width=\"${f(image.width)}\" height=\"${f(image.height)}\" preserveAspectRatio=\"none\"${shape.opacity !== undefined ? ` opacity=\"${f(shape.opacity)}\"` : ''}/>`\n\t\t: '';\n\tconst content = svg.transform && body ? `<g transform=\"${svg.transform}\">${body}</g>` : body;\n\treturn `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${f(size.width)}\" height=\"${f(size.height)}\" viewBox=\"0 0 ${f(size.width)} ${f(size.height)}\">${content}</svg>`;\n}\n"]}
|