@pinepaper.studio/mcp-server 1.5.1 → 1.5.4
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/README.md +6 -4
- package/dist/agent/types.d.ts +16 -16
- package/dist/browser/puppeteer-controller.d.ts +5 -1
- package/dist/browser/puppeteer-controller.d.ts.map +1 -1
- package/dist/browser/puppeteer-controller.js +11 -3
- package/dist/browser/puppeteer-controller.js.map +1 -1
- package/dist/browser/url-target.d.ts +26 -0
- package/dist/browser/url-target.d.ts.map +1 -0
- package/dist/browser/url-target.js +50 -0
- package/dist/browser/url-target.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +128 -109
- package/dist/index.js.map +1 -1
- package/dist/ontology/design-graph.d.ts +85 -0
- package/dist/ontology/design-graph.d.ts.map +1 -0
- package/dist/ontology/design-graph.js +944 -0
- package/dist/ontology/design-graph.js.map +1 -0
- package/dist/ontology/hints.d.ts +71 -0
- package/dist/ontology/hints.d.ts.map +1 -0
- package/dist/ontology/hints.js +189 -0
- package/dist/ontology/hints.js.map +1 -0
- package/dist/ontology/index.d.ts +11 -0
- package/dist/ontology/index.d.ts.map +1 -0
- package/dist/ontology/index.js +14 -0
- package/dist/ontology/index.js.map +1 -0
- package/dist/ontology/semantic-vocabulary.d.ts +12 -0
- package/dist/ontology/semantic-vocabulary.d.ts.map +1 -0
- package/dist/ontology/semantic-vocabulary.js +26 -0
- package/dist/ontology/semantic-vocabulary.js.map +1 -0
- package/dist/ontology/types.d.ts +255 -0
- package/dist/ontology/types.d.ts.map +1 -0
- package/dist/ontology/types.js +10 -0
- package/dist/ontology/types.js.map +1 -0
- package/dist/ontology/validator.d.ts +36 -0
- package/dist/ontology/validator.d.ts.map +1 -0
- package/dist/ontology/validator.js +374 -0
- package/dist/ontology/validator.js.map +1 -0
- package/dist/ontology/vocabulary.d.ts +34 -0
- package/dist/ontology/vocabulary.d.ts.map +1 -0
- package/dist/ontology/vocabulary.js +429 -0
- package/dist/ontology/vocabulary.js.map +1 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +146 -0
- package/dist/prompts/index.js.map +1 -1
- package/dist/tools/compact-descriptions.d.ts +5 -2
- package/dist/tools/compact-descriptions.d.ts.map +1 -1
- package/dist/tools/compact-descriptions.js +56 -235
- package/dist/tools/compact-descriptions.js.map +1 -1
- package/dist/tools/definitions.d.ts +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +1842 -1784
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers/camera.d.ts +19 -0
- package/dist/tools/handlers/camera.d.ts.map +1 -0
- package/dist/tools/handlers/camera.js +94 -0
- package/dist/tools/handlers/camera.js.map +1 -0
- package/dist/tools/handlers/export.d.ts +12 -0
- package/dist/tools/handlers/export.d.ts.map +1 -0
- package/dist/tools/handlers/export.js +30 -0
- package/dist/tools/handlers/export.js.map +1 -0
- package/dist/tools/handlers/font.d.ts +12 -0
- package/dist/tools/handlers/font.d.ts.map +1 -0
- package/dist/tools/handlers/font.js +135 -0
- package/dist/tools/handlers/font.js.map +1 -0
- package/dist/tools/handlers/maps.d.ts +19 -0
- package/dist/tools/handlers/maps.d.ts.map +1 -0
- package/dist/tools/handlers/maps.js +184 -0
- package/dist/tools/handlers/maps.js.map +1 -0
- package/dist/tools/handlers/ontology.d.ts +20 -0
- package/dist/tools/handlers/ontology.d.ts.map +1 -0
- package/dist/tools/handlers/ontology.js +185 -0
- package/dist/tools/handlers/ontology.js.map +1 -0
- package/dist/tools/handlers/tool-guide.d.ts +14 -0
- package/dist/tools/handlers/tool-guide.d.ts.map +1 -0
- package/dist/tools/handlers/tool-guide.js +52 -0
- package/dist/tools/handlers/tool-guide.js.map +1 -0
- package/dist/tools/handlers.d.ts +18 -0
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +321 -574
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/minimal-descriptions.d.ts +4 -0
- package/dist/tools/minimal-descriptions.d.ts.map +1 -1
- package/dist/tools/minimal-descriptions.js +65 -54
- package/dist/tools/minimal-descriptions.js.map +1 -1
- package/dist/tools/toolkits.d.ts.map +1 -1
- package/dist/tools/toolkits.js +67 -46
- package/dist/tools/toolkits.js.map +1 -1
- package/dist/types/code-generator.d.ts +49 -2
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +1456 -39
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +1381 -404
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +426 -20
- package/dist/types/schemas.js.map +1 -1
- package/package.json +2 -2
package/dist/types/schemas.js
CHANGED
|
@@ -11,10 +11,19 @@ import { z } from 'zod';
|
|
|
11
11
|
// =============================================================================
|
|
12
12
|
// COMMON SCHEMAS
|
|
13
13
|
// =============================================================================
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
14
|
+
/**
|
|
15
|
+
* Position on canvas. Accepts either the object form {x, y} or the array
|
|
16
|
+
* form [x, y] (matches FxTool's PinePaper.create() normalization, fix
|
|
17
|
+
* 3574992). Both forms normalize to {x, y} after parse, so downstream code
|
|
18
|
+
* that reads position.x / position.y is unaffected.
|
|
19
|
+
*/
|
|
20
|
+
export const PositionSchema = z.union([
|
|
21
|
+
z.object({
|
|
22
|
+
x: z.number().describe('X coordinate on canvas'),
|
|
23
|
+
y: z.number().describe('Y coordinate on canvas'),
|
|
24
|
+
}),
|
|
25
|
+
z.tuple([z.number(), z.number()]).transform(([x, y]) => ({ x, y })),
|
|
26
|
+
]);
|
|
18
27
|
export const PointArraySchema = z.tuple([z.number(), z.number()]);
|
|
19
28
|
// =============================================================================
|
|
20
29
|
// GRADIENT SCHEMAS
|
|
@@ -91,6 +100,10 @@ export const TextPropertiesSchema = z.object({
|
|
|
91
100
|
fontFamily: z.string().optional().default('Arial, sans-serif').describe('Font family'),
|
|
92
101
|
color: ColorSchema.optional().default('#ffffff').describe('Text color'),
|
|
93
102
|
fontWeight: z.string().optional().describe('Font weight (normal, bold, etc.)'),
|
|
103
|
+
contentType: z.enum(['clock', 'timer', 'countdown', 'stopwatch']).optional().describe('Dynamic content type — makes text auto-update. clock: current time, timer: elapsed time, countdown: counts down from countdownTarget, stopwatch: pauseable timer'),
|
|
104
|
+
contentFormat: z.string().optional().describe('Time format for dynamic content (HH:MM:SS, MM:SS, SS, SS.ms). Default: HH:MM:SS'),
|
|
105
|
+
countdownTarget: z.number().optional().describe('Countdown duration in seconds (countdown contentType only). Default: 60'),
|
|
106
|
+
countdownEndText: z.string().optional().describe('Text shown when countdown reaches zero. Default: 00:00'),
|
|
94
107
|
});
|
|
95
108
|
// Base visual properties shared by all shapes (shadow, blend mode, opacity)
|
|
96
109
|
export const BaseVisualPropertiesSchema = z.object({
|
|
@@ -200,6 +213,10 @@ export const RelationTypeSchema = z.enum([
|
|
|
200
213
|
'camera_follows',
|
|
201
214
|
'camera_animates',
|
|
202
215
|
'morphs_to',
|
|
216
|
+
// Pair-by-index group morph; same call shape works for any two paper.Groups
|
|
217
|
+
'group_morphs_to',
|
|
218
|
+
// Self-relation; item moves along a custom-drawn path stored in params
|
|
219
|
+
'moves_along_path',
|
|
203
220
|
]).describe('Type of relationship between items');
|
|
204
221
|
// Relation parameter schemas
|
|
205
222
|
export const OrbitsParamsSchema = z.object({
|
|
@@ -288,6 +305,20 @@ export const CameraFollowsParamsSchema = z.object({
|
|
|
288
305
|
maxY: z.number().optional(),
|
|
289
306
|
}).optional().describe('Camera bounds'),
|
|
290
307
|
});
|
|
308
|
+
export const CameraAnimatesParamsSchema = z.object({
|
|
309
|
+
keyframes: z.array(z.object({
|
|
310
|
+
time: z.number().describe('Time in seconds'),
|
|
311
|
+
zoom: z.number().optional().describe('Zoom level (1=normal)'),
|
|
312
|
+
center: PointArraySchema.optional().describe('View center [x, y]'),
|
|
313
|
+
pitch: z.number().optional().describe('3D tilt in degrees (0=flat, positive=forward tilt)'),
|
|
314
|
+
yaw: z.number().optional().describe('3D rotation in degrees'),
|
|
315
|
+
easing: z.string().optional().describe('Easing function'),
|
|
316
|
+
})).optional().describe('Camera keyframes'),
|
|
317
|
+
duration: z.number().optional().default(2).describe('Total animation duration in seconds'),
|
|
318
|
+
loop: z.boolean().optional().default(false).describe('Loop animation'),
|
|
319
|
+
delay: z.number().optional().default(0).describe('Delay before starting'),
|
|
320
|
+
fov: z.number().optional().default(60).describe('Field of view in degrees for 3D perspective'),
|
|
321
|
+
});
|
|
291
322
|
export const MorphsToParamsSchema = z.object({
|
|
292
323
|
duration: z.number().optional().default(1.5).describe('Morph duration in seconds'),
|
|
293
324
|
delay: z.number().optional().default(0).describe('Delay before starting'),
|
|
@@ -295,6 +326,30 @@ export const MorphsToParamsSchema = z.object({
|
|
|
295
326
|
morphColor: z.boolean().optional().default(true).describe('Also morph color'),
|
|
296
327
|
morphSize: z.boolean().optional().default(true).describe('Also morph size'),
|
|
297
328
|
});
|
|
329
|
+
// Pair-by-index group morph. Source paper.Group's children migrate into target
|
|
330
|
+
// Group's children's positions; Path.Line endpoints deform; excess children fade.
|
|
331
|
+
// Generic — any two groups (graph vertices+edges, letter collages, dashboard
|
|
332
|
+
// clusters, etc.) work with the same call shape.
|
|
333
|
+
export const GroupMorphsToParamsSchema = z.object({
|
|
334
|
+
duration: z.number().optional().default(1.5).describe('Morph duration each direction (seconds)'),
|
|
335
|
+
hold: z.number().optional().default(1.0).describe('Hold time on each end before reversing (seconds)'),
|
|
336
|
+
loop: z.boolean().optional().default(true).describe('Cycle source ↔ target indefinitely'),
|
|
337
|
+
easing: z.enum(['linear', 'easeIn', 'easeOut', 'easeInOut']).optional().default('easeInOut').describe('Easing for the position interpolation'),
|
|
338
|
+
deformLines: z.boolean().optional().default(true).describe('Path.Line children deform via segment endpoints instead of rigid translation'),
|
|
339
|
+
});
|
|
340
|
+
// Self-relation: item is driven along a custom-drawn path stored in params.
|
|
341
|
+
// In the editor the Relations picker offers a drag-to-draw capture mode; via
|
|
342
|
+
// MCP / agent code, pass the points array explicitly.
|
|
343
|
+
export const MovesAlongPathParamsSchema = z.object({
|
|
344
|
+
path: z.array(z.union([
|
|
345
|
+
z.object({ x: z.number(), y: z.number() }),
|
|
346
|
+
z.tuple([z.number(), z.number()]),
|
|
347
|
+
])).describe('Path points: array of {x,y} objects or [x,y] tuples'),
|
|
348
|
+
speed: z.number().optional().default(1).describe('Speed multiplier (1 ≈ 150 px/s)'),
|
|
349
|
+
closed: z.boolean().optional().default(true).describe('Loop back to start at end of path'),
|
|
350
|
+
phase: z.number().optional().default(0).describe('Starting position along path (0–1)'),
|
|
351
|
+
easing: z.enum(['linear', 'easeIn', 'easeOut', 'easeInOut', 'sine', 'bounce', 'pingpong']).optional().default('linear').describe('Motion curve mapping normalized time → progress along path'),
|
|
352
|
+
});
|
|
298
353
|
// =============================================================================
|
|
299
354
|
// CUSTOM RELATION REGISTRATION
|
|
300
355
|
// =============================================================================
|
|
@@ -327,7 +382,7 @@ export const ExecuteCustomCodeInputSchema = z.object({
|
|
|
327
382
|
// GENERATOR TYPES
|
|
328
383
|
// =============================================================================
|
|
329
384
|
export const GeneratorNameSchema = z.enum([
|
|
330
|
-
//
|
|
385
|
+
// Classic generators
|
|
331
386
|
'drawSunburst',
|
|
332
387
|
'drawSunsetScene',
|
|
333
388
|
'drawGrid',
|
|
@@ -335,7 +390,7 @@ export const GeneratorNameSchema = z.enum([
|
|
|
335
390
|
'drawCircuit',
|
|
336
391
|
'drawWaves',
|
|
337
392
|
'drawPattern',
|
|
338
|
-
//
|
|
393
|
+
// Visual generators
|
|
339
394
|
'drawBokeh',
|
|
340
395
|
'drawGradientMesh',
|
|
341
396
|
'drawGeometricAbstract',
|
|
@@ -343,6 +398,47 @@ export const GeneratorNameSchema = z.enum([
|
|
|
343
398
|
'drawFluidFlow',
|
|
344
399
|
'drawOrganicFlow',
|
|
345
400
|
'drawNoiseTexture',
|
|
401
|
+
'drawGlobeWireframe',
|
|
402
|
+
// Scene generators
|
|
403
|
+
'drawPerspectiveGrid',
|
|
404
|
+
'drawPoissonDisk',
|
|
405
|
+
'drawPoissonShapesAsync',
|
|
406
|
+
'drawGoldenSpiral',
|
|
407
|
+
'drawFibonacci',
|
|
408
|
+
'createShape',
|
|
409
|
+
'createGradientCircle',
|
|
410
|
+
'drawStarfield',
|
|
411
|
+
'drawSolarSystem',
|
|
412
|
+
'drawDayNightCycle',
|
|
413
|
+
'drawCosmosSpace',
|
|
414
|
+
'drawTadpoles',
|
|
415
|
+
'drawMetaballs',
|
|
416
|
+
'drawKaleidoscope',
|
|
417
|
+
'drawFlowField',
|
|
418
|
+
'drawNeonGrid',
|
|
419
|
+
'drawConstellation',
|
|
420
|
+
'drawTessellation',
|
|
421
|
+
// Decorative generators
|
|
422
|
+
'drawSunburstLines',
|
|
423
|
+
'drawGlowOrbs',
|
|
424
|
+
'drawConcentricRings',
|
|
425
|
+
'drawCornerAccents',
|
|
426
|
+
'drawFlowCurves',
|
|
427
|
+
'drawFallingPetals',
|
|
428
|
+
'drawFireflies',
|
|
429
|
+
'drawFloatingLeaves',
|
|
430
|
+
'drawVoronoi',
|
|
431
|
+
// Map generators
|
|
432
|
+
'drawWorldMap',
|
|
433
|
+
'drawUSAMap',
|
|
434
|
+
'drawCountryMap',
|
|
435
|
+
'drawChoroplethMap',
|
|
436
|
+
// PineMath generators
|
|
437
|
+
'drawFunctionPlot',
|
|
438
|
+
'drawParametricCurve',
|
|
439
|
+
'drawSimulation',
|
|
440
|
+
'drawSpectrumAnalyzer',
|
|
441
|
+
'draw3DSurface',
|
|
346
442
|
]).describe('Background generator name');
|
|
347
443
|
// ---------------------------------------------------------------------------
|
|
348
444
|
// Generator parameter schemas — Phase 1 (enhanced existing)
|
|
@@ -350,7 +446,7 @@ export const GeneratorNameSchema = z.enum([
|
|
|
350
446
|
export const SunburstParamsSchema = z.object({
|
|
351
447
|
rayCount: z.number().optional().default(16).describe('Number of rays'),
|
|
352
448
|
colors: z.array(ColorSchema).optional().default(['#FF6B6B', '#4ECDC4']).describe('Ray colors'),
|
|
353
|
-
bgColor: ColorSchema.optional().default('#1a1a2e').describe('Background color'),
|
|
449
|
+
bgColor: ColorSchema.optional().default('#1a1a2e').describe('Background color (use "none" or "transparent" for no background)'),
|
|
354
450
|
animated: z.boolean().optional().default(true).describe('Enable rotation animation'),
|
|
355
451
|
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
356
452
|
rayGap: z.number().optional().describe('Gap between rays in degrees'),
|
|
@@ -360,7 +456,7 @@ export const GridParamsSchema = z.object({
|
|
|
360
456
|
gridType: z.enum(['lines', 'dots', 'squares']).optional().default('lines'),
|
|
361
457
|
spacing: z.number().optional().default(40).describe('Grid cell size'),
|
|
362
458
|
lineColor: ColorSchema.optional().default('#374151').describe('Line/dot color'),
|
|
363
|
-
bgColor: ColorSchema.optional().default('#1f2937').describe('Background color'),
|
|
459
|
+
bgColor: ColorSchema.optional().default('#1f2937').describe('Background color (use "none" or "transparent" for no background)'),
|
|
364
460
|
lineWidth: z.number().optional().default(1).describe('Line thickness'),
|
|
365
461
|
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
366
462
|
gap: z.number().optional().describe('Pixel gap between cells'),
|
|
@@ -374,7 +470,7 @@ export const WavesParamsSchema = z.object({
|
|
|
374
470
|
colors: z.array(ColorSchema).optional().describe('Wave colors'),
|
|
375
471
|
amplitude: z.number().optional().default(50).describe('Wave height'),
|
|
376
472
|
frequency: z.number().optional().default(2).describe('Wave frequency'),
|
|
377
|
-
bgColor: ColorSchema.optional().default('#0f172a').describe('Background color'),
|
|
473
|
+
bgColor: ColorSchema.optional().default('#0f172a').describe('Background color (use "none" or "transparent" for no background)'),
|
|
378
474
|
animated: z.boolean().optional().default(true).describe('Animate waves'),
|
|
379
475
|
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
380
476
|
fill: z.boolean().optional().describe('Fill between adjacent waves'),
|
|
@@ -385,7 +481,7 @@ export const WavesParamsSchema = z.object({
|
|
|
385
481
|
export const CircuitParamsSchema = z.object({
|
|
386
482
|
lineColor: ColorSchema.optional().default('#60a5fa').describe('Circuit line color'),
|
|
387
483
|
nodeColor: ColorSchema.optional().default('#3b82f6').describe('Node/junction color'),
|
|
388
|
-
bgColor: ColorSchema.optional().default('#0f172a').describe('Background color'),
|
|
484
|
+
bgColor: ColorSchema.optional().default('#0f172a').describe('Background color (use "none" or "transparent" for no background)'),
|
|
389
485
|
density: z.number().min(0).max(1).optional().default(0.5).describe('Circuit complexity'),
|
|
390
486
|
animated: z.boolean().optional().default(true).describe('Enable bolt animation'),
|
|
391
487
|
boltColor: ColorSchema.optional().default('#fbbf24').describe('Animated bolt color'),
|
|
@@ -420,7 +516,7 @@ export const PatternParamsSchema = z.object({
|
|
|
420
516
|
patternType: z.string().optional().describe('Pattern type (e.g. hexagon)'),
|
|
421
517
|
size: z.number().optional().describe('Pattern element size'),
|
|
422
518
|
color: ColorSchema.optional().describe('Pattern color'),
|
|
423
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
519
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
424
520
|
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
425
521
|
blendMode: z.string().optional().describe('CSS blend mode'),
|
|
426
522
|
layers: z.number().min(1).max(5).optional().describe('Concentric orbit ring count (1-5)'),
|
|
@@ -432,7 +528,7 @@ export const PatternParamsSchema = z.object({
|
|
|
432
528
|
export const BokehParamsSchema = z.object({
|
|
433
529
|
count: z.number().optional().describe('Number of bokeh circles'),
|
|
434
530
|
colors: z.array(ColorSchema).optional().describe('Circle colors'),
|
|
435
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
531
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
436
532
|
minRadius: z.number().optional().describe('Minimum circle radius'),
|
|
437
533
|
maxRadius: z.number().optional().describe('Maximum circle radius'),
|
|
438
534
|
shadowBlur: z.number().optional().describe('Soft-focus blur amount'),
|
|
@@ -442,7 +538,7 @@ export const BokehParamsSchema = z.object({
|
|
|
442
538
|
});
|
|
443
539
|
export const GradientMeshParamsSchema = z.object({
|
|
444
540
|
colors: z.array(ColorSchema).optional().describe('Gradient blob colors'),
|
|
445
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
541
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
446
542
|
blobCount: z.number().optional().describe('Number of gradient blobs'),
|
|
447
543
|
blendMode: z.string().optional().describe('CSS blend mode (default: screen)'),
|
|
448
544
|
drift: z.boolean().optional().describe('Enable slow drift animation'),
|
|
@@ -450,7 +546,7 @@ export const GradientMeshParamsSchema = z.object({
|
|
|
450
546
|
});
|
|
451
547
|
export const GeometricAbstractParamsSchema = z.object({
|
|
452
548
|
colors: z.array(ColorSchema).optional().describe('Shape colors'),
|
|
453
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
549
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
454
550
|
shapeCount: z.number().optional().describe('Number of shapes'),
|
|
455
551
|
blendMode: z.string().optional().describe('CSS blend mode'),
|
|
456
552
|
rotation: z.boolean().optional().describe('Enable rotation animation'),
|
|
@@ -459,7 +555,7 @@ export const GeometricAbstractParamsSchema = z.object({
|
|
|
459
555
|
export const WindFieldParamsSchema = z.object({
|
|
460
556
|
particleCount: z.number().optional().describe('Number of wind particles'),
|
|
461
557
|
colors: z.array(ColorSchema).optional().describe('Particle colors'),
|
|
462
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
558
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
463
559
|
direction: z.number().optional().describe('Wind direction in degrees'),
|
|
464
560
|
turbulence: z.number().optional().describe('Noise turbulence amount'),
|
|
465
561
|
trailLength: z.number().optional().describe('Particle trail length'),
|
|
@@ -469,7 +565,7 @@ export const WindFieldParamsSchema = z.object({
|
|
|
469
565
|
export const FluidFlowParamsSchema = z.object({
|
|
470
566
|
streamCount: z.number().optional().describe('Number of fluid streams'),
|
|
471
567
|
colors: z.array(ColorSchema).optional().describe('Stream colors'),
|
|
472
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
568
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
473
569
|
depthLayers: z.number().optional().describe('Number of depth layers'),
|
|
474
570
|
speed: z.number().optional().describe('Flow animation speed'),
|
|
475
571
|
opacity: z.number().min(0).max(1).optional().describe('Overall opacity'),
|
|
@@ -477,7 +573,7 @@ export const FluidFlowParamsSchema = z.object({
|
|
|
477
573
|
export const OrganicFlowParamsSchema = z.object({
|
|
478
574
|
layerCount: z.number().optional().describe('Number of aurora/silk layers'),
|
|
479
575
|
colors: z.array(ColorSchema).optional().describe('Layer colors'),
|
|
480
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
576
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
481
577
|
blendMode: z.string().optional().describe('CSS blend mode (default: screen)'),
|
|
482
578
|
fillToBottom: z.boolean().optional().describe('Fill layers to bottom edge'),
|
|
483
579
|
animated: z.boolean().optional().describe('Enable flow animation'),
|
|
@@ -486,7 +582,7 @@ export const OrganicFlowParamsSchema = z.object({
|
|
|
486
582
|
export const NoiseTextureParamsSchema = z.object({
|
|
487
583
|
noiseType: z.enum(['perlin', 'grain', 'stipple']).optional().describe('Noise algorithm'),
|
|
488
584
|
colors: z.array(ColorSchema).optional().describe('Noise colors'),
|
|
489
|
-
bgColor: ColorSchema.optional().describe('Background color'),
|
|
585
|
+
bgColor: ColorSchema.optional().describe('Background color (use "none" or "transparent" for no background)'),
|
|
490
586
|
scale: z.number().optional().describe('Noise scale'),
|
|
491
587
|
density: z.number().optional().describe('Noise density'),
|
|
492
588
|
animated: z.boolean().optional().describe('Enable animated opacity shift'),
|
|
@@ -498,6 +594,19 @@ export const NoiseTextureParamsSchema = z.object({
|
|
|
498
594
|
export const EffectTypeSchema = z.enum([
|
|
499
595
|
'sparkle',
|
|
500
596
|
'blast',
|
|
597
|
+
'smoke',
|
|
598
|
+
'fire',
|
|
599
|
+
'rain',
|
|
600
|
+
'snow',
|
|
601
|
+
'confetti',
|
|
602
|
+
'ripple',
|
|
603
|
+
'glow',
|
|
604
|
+
'electric',
|
|
605
|
+
'bubbles',
|
|
606
|
+
'dust',
|
|
607
|
+
'fireflies',
|
|
608
|
+
'shockwave',
|
|
609
|
+
'trail',
|
|
501
610
|
]).describe('Visual effect type');
|
|
502
611
|
export const SparkleParamsSchema = z.object({
|
|
503
612
|
color: ColorSchema.optional().default('#fbbf24').describe('Sparkle color'),
|
|
@@ -538,6 +647,21 @@ export const ImportSVGInputSchema = z.object({
|
|
|
538
647
|
position: PositionSchema.optional().default({ x: 400, y: 300 }),
|
|
539
648
|
scale: z.number().optional().default(1.0).describe('Scale factor'),
|
|
540
649
|
});
|
|
650
|
+
// Import Mermaid (flowchart, stateDiagram, sequenceDiagram, erDiagram, classDiagram)
|
|
651
|
+
export const ImportMermaidInputSchema = z.object({
|
|
652
|
+
mermaidText: z.string().min(1).describe('Mermaid diagram source. First line determines type: "flowchart"/"graph", "stateDiagram(-v2)", "sequenceDiagram", "erDiagram", "classDiagram".'),
|
|
653
|
+
autoLayout: z.boolean().optional().default(true).describe('Run auto-layout after import (default: true). Disable to keep nodes at parsed coordinates only.'),
|
|
654
|
+
clearExisting: z.boolean().optional().default(false).describe('Remove existing canvas items before importing (default: false — additive).'),
|
|
655
|
+
});
|
|
656
|
+
// Capture current canvas as pp: ontology — wraps FxTool's
|
|
657
|
+
// app.exportCanvasOntology() (PinePaper.js, post-promotion) so an LLM can
|
|
658
|
+
// reason about composition from a compact triples block + structured items
|
|
659
|
+
// list rather than a raw paper.js dump.
|
|
660
|
+
export const GetCanvasOntologyInputSchema = z.object({
|
|
661
|
+
maxItems: z.number().int().positive().max(500).optional().default(50).describe('Cap on item summaries (default 50). Larger scenes are truncated, not paginated.'),
|
|
662
|
+
maxChildren: z.number().int().positive().max(50).optional().default(10).describe('Cap on per-group child summaries (default 10).'),
|
|
663
|
+
includeViewport: z.boolean().optional().default(false).describe('Include current view zoom/center + camera-animation flag (default false).'),
|
|
664
|
+
});
|
|
541
665
|
// Add Filter
|
|
542
666
|
export const AddFilterInputSchema = z.object({
|
|
543
667
|
filterType: FilterTypeSchema,
|
|
@@ -548,6 +672,9 @@ export const CreateItemInputSchema = z.object({
|
|
|
548
672
|
itemType: ItemTypeSchema,
|
|
549
673
|
position: PositionSchema.optional().default({ x: 400, y: 300 }),
|
|
550
674
|
properties: z.record(z.unknown()).optional().default({}),
|
|
675
|
+
animationType: z.string().optional().describe('Inline animation to apply on creation. Loop presets (pulse, rotate, bounce, fade, wobble, slide, typewriter) or "keyframe" with keyframes array. Equivalent to a follow-up pinepaper_animate / pinepaper_keyframe_animate call.'),
|
|
676
|
+
animationSpeed: z.number().optional().describe('Speed multiplier for loop animations (default: 1.0). Ignored when animationType is "keyframe".'),
|
|
677
|
+
keyframes: z.array(KeyframeSchema).optional().describe('Required when animationType is "keyframe". Inline keyframe array attached at creation.'),
|
|
551
678
|
});
|
|
552
679
|
// Light direction for 3D effects
|
|
553
680
|
export const LightDirectionSchema = z.enum([
|
|
@@ -620,6 +747,9 @@ export const KeyframeAnimateInputSchema = z.object({
|
|
|
620
747
|
keyframes: z.array(KeyframeSchema),
|
|
621
748
|
duration: z.number().optional().describe('Total animation duration'),
|
|
622
749
|
loop: z.boolean().optional().default(false),
|
|
750
|
+
timeOffset: z.number().optional().describe('Shift the whole clip in canvas time (seconds). The animation only runs while canvas time is in [timeOffset, timeOffset + (clipOutPoint - clipInPoint)].'),
|
|
751
|
+
clipInPoint: z.number().optional().describe('Skip the first N seconds of keyframe data — clip head trim.'),
|
|
752
|
+
clipOutPoint: z.number().optional().describe('Stop at N seconds into the keyframe data — clip tail trim. Default: lastKeyframeTime.'),
|
|
623
753
|
});
|
|
624
754
|
// Execute Generator
|
|
625
755
|
export const ExecuteGeneratorInputSchema = z.object({
|
|
@@ -643,7 +773,7 @@ export const GetItemsInputSchema = z.object({
|
|
|
643
773
|
});
|
|
644
774
|
// Play Timeline
|
|
645
775
|
export const PlayTimelineInputSchema = z.object({
|
|
646
|
-
action: z.enum(['play', 'stop', 'seek']),
|
|
776
|
+
action: z.enum(['play', 'pause', 'stop', 'seek']),
|
|
647
777
|
duration: z.number().optional().describe('Duration for play action'),
|
|
648
778
|
loop: z.boolean().optional(),
|
|
649
779
|
time: z.number().optional().describe('Time to seek to'),
|
|
@@ -1060,12 +1190,18 @@ export const ErrorCodes = {
|
|
|
1060
1190
|
ITEM_NOT_FOUND: 'ITEM_NOT_FOUND',
|
|
1061
1191
|
INVALID_RELATION: 'INVALID_RELATION',
|
|
1062
1192
|
INVALID_PARAMS: 'INVALID_PARAMS',
|
|
1193
|
+
INVALID_INPUT: 'INVALID_INPUT',
|
|
1194
|
+
INVALID_PROPERTIES: 'INVALID_PROPERTIES',
|
|
1063
1195
|
GENERATOR_NOT_FOUND: 'GENERATOR_NOT_FOUND',
|
|
1064
1196
|
EXPORT_FAILED: 'EXPORT_FAILED',
|
|
1065
1197
|
EXECUTION_ERROR: 'EXECUTION_ERROR',
|
|
1066
1198
|
VALIDATION_ERROR: 'VALIDATION_ERROR',
|
|
1067
1199
|
AGENT_JOB_ERROR: 'AGENT_JOB_ERROR',
|
|
1068
1200
|
BATCH_EXECUTION_ERROR: 'BATCH_EXECUTION_ERROR',
|
|
1201
|
+
UNKNOWN_TOOL: 'UNKNOWN_TOOL',
|
|
1202
|
+
BROWSER_NOT_CONNECTED: 'BROWSER_NOT_CONNECTED',
|
|
1203
|
+
REFRESH_FAILED: 'REFRESH_FAILED',
|
|
1204
|
+
SCREENSHOT_FAILED: 'SCREENSHOT_FAILED',
|
|
1069
1205
|
};
|
|
1070
1206
|
// =============================================================================
|
|
1071
1207
|
// MASK TOOL SCHEMAS
|
|
@@ -1164,7 +1300,7 @@ export const AgentScreenshotPolicySchema = z.enum([
|
|
|
1164
1300
|
*/
|
|
1165
1301
|
export const AgentStartJobInputSchema = z.object({
|
|
1166
1302
|
name: z.string().optional().describe('Optional job name for tracking'),
|
|
1167
|
-
description: z.string().optional().describe('User prompt or task description
|
|
1303
|
+
description: z.string().optional().describe('User prompt or task description for creative direction'),
|
|
1168
1304
|
headless: z.boolean().optional().default(true).describe('Run browser in headless mode'),
|
|
1169
1305
|
screenshotPolicy: AgentScreenshotPolicySchema.optional().default('on_complete'),
|
|
1170
1306
|
canvasPreset: AgentPlatformSchema.optional().describe('Canvas size preset to apply'),
|
|
@@ -1174,6 +1310,7 @@ export const AgentStartJobInputSchema = z.object({
|
|
|
1174
1310
|
}).optional().describe('Custom canvas dimensions'),
|
|
1175
1311
|
backgroundColor: z.string().optional().describe('Background color to set'),
|
|
1176
1312
|
clearCanvas: z.boolean().optional().default(true).describe('Clear canvas when starting job'),
|
|
1313
|
+
includeOntology: z.boolean().optional().default(true).describe('Include canvas ontology snapshot in the result. Tiny payload when clearCanvas is true (empty canvas) — captures existing state when clearCanvas is false. Set false to skip; reset to true if rerunning against an older FxTool that lacks exportCanvasOntology.'),
|
|
1177
1314
|
}).describe('Options for starting an agent job');
|
|
1178
1315
|
/**
|
|
1179
1316
|
* End job input schema
|
|
@@ -1257,6 +1394,7 @@ export const AgentBatchOperationSchema = z.object({
|
|
|
1257
1394
|
export const AgentBatchExecuteInputSchema = z.object({
|
|
1258
1395
|
operations: z.array(AgentBatchOperationSchema).min(1).describe('Array of operations to execute'),
|
|
1259
1396
|
atomic: z.boolean().optional().default(true).describe('Rollback all operations on any failure'),
|
|
1397
|
+
skipValidation: z.boolean().optional().default(false).describe('Skip the ontology preflight that catches typos in itemType/relationType/effectType/generatorName before browser execution. Use only when intentionally passing experimental vocabulary values.'),
|
|
1260
1398
|
}).describe('Batch execution input');
|
|
1261
1399
|
/**
|
|
1262
1400
|
* Smart export input schema
|
|
@@ -1266,6 +1404,7 @@ export const AgentExportInputSchema = z.object({
|
|
|
1266
1404
|
format: z.union([AgentExportFormatSchema, z.literal('auto')]).optional().default('auto').describe('Export format'),
|
|
1267
1405
|
quality: z.enum(['draft', 'standard', 'high']).optional().default('standard').describe('Export quality level'),
|
|
1268
1406
|
includeRecommendations: z.boolean().optional().default(true).describe('Include alternative format recommendations'),
|
|
1407
|
+
framing: z.enum(['canvas', 'camera']).optional().default('canvas').describe('Output framing: "canvas" (full canvas, default) or "camera" (camera_animates first-keyframe viewport — fails if no walkthrough exists). Camera animation still drives motion within the fixed output frame.'),
|
|
1269
1408
|
}).describe('Smart export options');
|
|
1270
1409
|
/**
|
|
1271
1410
|
* Analyze content input schema
|
|
@@ -1684,4 +1823,271 @@ export const ImportImageInputSchema = z.object({
|
|
|
1684
1823
|
maxHeight: z.number().optional().describe('Maximum height constraint in pixels'),
|
|
1685
1824
|
mask: ImageMaskSchema.optional().describe('Optional mask shape to apply to the image'),
|
|
1686
1825
|
}).describe('Import image input');
|
|
1826
|
+
// =============================================================================
|
|
1827
|
+
// ONTOLOGY SCHEMAS
|
|
1828
|
+
// =============================================================================
|
|
1829
|
+
export const AnalyzeDesignInputSchema = z.object({
|
|
1830
|
+
definition: z.object({}).passthrough().describe('A template or scene definition object (same shape as batch_execute operations or template definitions with id, name, category, data: {items, relations})'),
|
|
1831
|
+
}).describe('Analyze design input');
|
|
1832
|
+
export const ValidateDesignInputSchema = z.object({
|
|
1833
|
+
definition: z.object({}).passthrough().describe('A template or scene definition object to validate and score'),
|
|
1834
|
+
}).describe('Validate design input');
|
|
1835
|
+
export const QueryOntologyInputSchema = z.object({
|
|
1836
|
+
query: z.enum([
|
|
1837
|
+
'list_types', 'list_edges', 'list_generators', 'list_effects',
|
|
1838
|
+
'list_patterns', 'list_math_functions',
|
|
1839
|
+
'type_hierarchy', 'type_children', 'type_properties', 'animatable_properties',
|
|
1840
|
+
'is_subtype', 'edge_info', 'node_type', 'edge_type',
|
|
1841
|
+
]),
|
|
1842
|
+
ppType: z.string().optional(),
|
|
1843
|
+
itemType: z.string().optional(),
|
|
1844
|
+
relationName: z.string().optional(),
|
|
1845
|
+
typeA: z.string().optional(),
|
|
1846
|
+
typeB: z.string().optional(),
|
|
1847
|
+
category: z.string().optional(),
|
|
1848
|
+
includeAbstract: z.boolean().optional().default(false),
|
|
1849
|
+
});
|
|
1850
|
+
// =============================================================================
|
|
1851
|
+
// SCENE MANAGEMENT SCHEMAS
|
|
1852
|
+
// =============================================================================
|
|
1853
|
+
export const ManageScenesInputSchema = z.object({
|
|
1854
|
+
action: z.enum(['save', 'load', 'list', 'delete', 'rename', 'duplicate', 'reorder', 'info', 'export', 'import']),
|
|
1855
|
+
name: z.string().optional(),
|
|
1856
|
+
sceneId: z.string().optional(),
|
|
1857
|
+
transition: z.enum(['none', 'fade', 'zoom-in', 'zoom-out']).optional(),
|
|
1858
|
+
sceneIds: z.array(z.string()).optional(),
|
|
1859
|
+
scenesJson: z.string().optional(),
|
|
1860
|
+
merge: z.boolean().optional(),
|
|
1861
|
+
});
|
|
1862
|
+
export const ScenePlaybackInputSchema = z.object({
|
|
1863
|
+
action: z.enum(['create_chain', 'play', 'pause', 'resume', 'stop', 'toggle_loop', 'jump']),
|
|
1864
|
+
sceneIds: z.array(z.string()).optional(),
|
|
1865
|
+
loop: z.boolean().optional(),
|
|
1866
|
+
autoPlay: z.boolean().optional(),
|
|
1867
|
+
defaultDuration: z.number().optional(),
|
|
1868
|
+
defaultTransition: z.enum(['none', 'fade', 'zoom-in', 'zoom-out']).optional(),
|
|
1869
|
+
transitionDuration: z.number().optional(),
|
|
1870
|
+
enabled: z.boolean().optional(),
|
|
1871
|
+
index: z.number().optional(),
|
|
1872
|
+
});
|
|
1873
|
+
// =============================================================================
|
|
1874
|
+
// SELECTION, TRANSFORM & HISTORY TOOLS
|
|
1875
|
+
// =============================================================================
|
|
1876
|
+
export const SelectionInputSchema = z.object({
|
|
1877
|
+
action: z.enum(['select', 'select_all', 'deselect_all', 'get', 'delete_selected']),
|
|
1878
|
+
itemIds: z.array(z.string()).optional(),
|
|
1879
|
+
mode: z.enum(['replace', 'add', 'remove']).optional(),
|
|
1880
|
+
});
|
|
1881
|
+
export const TransformInputSchema = z.object({
|
|
1882
|
+
action: z.enum(['nudge', 'flip', 'reorder']),
|
|
1883
|
+
itemId: z.string().optional(),
|
|
1884
|
+
dx: z.number().optional(),
|
|
1885
|
+
dy: z.number().optional(),
|
|
1886
|
+
direction: z.enum(['horizontal', 'vertical']).optional(),
|
|
1887
|
+
order: z.enum(['bringToFront', 'sendToBack', 'moveUp', 'moveDown']).optional(),
|
|
1888
|
+
});
|
|
1889
|
+
export const HistoryInputSchema = z.object({
|
|
1890
|
+
action: z.enum(['undo', 'redo', 'get_state']),
|
|
1891
|
+
});
|
|
1892
|
+
// =============================================================================
|
|
1893
|
+
// IMAGE PROCESSING TOOLS
|
|
1894
|
+
// =============================================================================
|
|
1895
|
+
export const ImageFilterInputSchema = z.object({
|
|
1896
|
+
action: z.enum(['apply', 'chain']),
|
|
1897
|
+
itemId: z.string(),
|
|
1898
|
+
filterName: z.string().optional(),
|
|
1899
|
+
params: z.record(z.unknown()).optional(),
|
|
1900
|
+
filters: z.array(z.object({
|
|
1901
|
+
name: z.string(),
|
|
1902
|
+
params: z.record(z.unknown()).optional(),
|
|
1903
|
+
})).optional(),
|
|
1904
|
+
});
|
|
1905
|
+
export const LassoInputSchema = z.object({
|
|
1906
|
+
action: z.enum(['activate', 'apply']),
|
|
1907
|
+
itemId: z.string().optional(),
|
|
1908
|
+
});
|
|
1909
|
+
export const CutoutStyleInputSchema = z.object({
|
|
1910
|
+
action: z.enum(['apply', 'list']),
|
|
1911
|
+
itemId: z.string().optional(),
|
|
1912
|
+
preset: z.string().optional(),
|
|
1913
|
+
options: z.record(z.unknown()).optional(),
|
|
1914
|
+
});
|
|
1915
|
+
// =============================================================================
|
|
1916
|
+
// COMPOSITION & VIEW TOOLS
|
|
1917
|
+
// =============================================================================
|
|
1918
|
+
export const PrecompInputSchema = z.object({
|
|
1919
|
+
action: z.enum(['create', 'add', 'remove']),
|
|
1920
|
+
itemIds: z.array(z.string()).optional(),
|
|
1921
|
+
name: z.string().optional(),
|
|
1922
|
+
loop: z.boolean().optional(),
|
|
1923
|
+
duration: z.number().optional(),
|
|
1924
|
+
precompId: z.string().optional(),
|
|
1925
|
+
itemId: z.string().optional(),
|
|
1926
|
+
});
|
|
1927
|
+
export const ViewInputSchema = z.object({
|
|
1928
|
+
action: z.enum(['fit', 'get_state']),
|
|
1929
|
+
mode: z.enum(['content', 'canvas']).optional(),
|
|
1930
|
+
padding: z.number().optional(),
|
|
1931
|
+
});
|
|
1932
|
+
export const BackgroundInputSchema = z.object({
|
|
1933
|
+
action: z.enum(['set', 'clear', 'get']),
|
|
1934
|
+
mode: z.enum(['color', 'pattern', 'generator']).optional(),
|
|
1935
|
+
color: z.string().optional(),
|
|
1936
|
+
pattern: z.string().optional(),
|
|
1937
|
+
generator: z.string().optional(),
|
|
1938
|
+
generatorParams: z.record(z.unknown()).optional(),
|
|
1939
|
+
});
|
|
1940
|
+
// =============================================================================
|
|
1941
|
+
// CANVAS QUERY TOOLS
|
|
1942
|
+
// =============================================================================
|
|
1943
|
+
export const QueryInputSchema = z.object({
|
|
1944
|
+
action: z.enum(['get_by_id', 'hit_test', 'is_empty']),
|
|
1945
|
+
itemId: z.string().optional(),
|
|
1946
|
+
x: z.number().optional(),
|
|
1947
|
+
y: z.number().optional(),
|
|
1948
|
+
all: z.boolean().optional(),
|
|
1949
|
+
tolerance: z.number().optional(),
|
|
1950
|
+
});
|
|
1951
|
+
// =============================================================================
|
|
1952
|
+
// DEFORMATION TOOLS
|
|
1953
|
+
// =============================================================================
|
|
1954
|
+
export const DeformInputSchema = z.object({
|
|
1955
|
+
action: z.enum(['apply', 'trigger', 'remove']),
|
|
1956
|
+
itemId: z.string().optional(),
|
|
1957
|
+
preset: z.enum([
|
|
1958
|
+
'fold', 'squeeze', 'squash', 'pinch', 'bulge', 'twist',
|
|
1959
|
+
'ripple', 'wave', 'breathe', 'melt', 'shear', 'inflate', 'wobble',
|
|
1960
|
+
]).optional(),
|
|
1961
|
+
frequency: z.number().optional(),
|
|
1962
|
+
amplitude: z.number().min(0).max(1).optional(),
|
|
1963
|
+
phase: z.enum(['sin', 'blink', 'linear', 'pingpong', 'once', 'elastic', 'heartbeat', 'stepped']).optional(),
|
|
1964
|
+
loop: z.boolean().optional(),
|
|
1965
|
+
axis: z.enum(['horizontal', 'vertical']).optional(),
|
|
1966
|
+
turns: z.number().optional(),
|
|
1967
|
+
waves: z.number().optional(),
|
|
1968
|
+
maxDisplacement: z.number().optional(),
|
|
1969
|
+
speed: z.number().optional(),
|
|
1970
|
+
steps: z.number().optional(),
|
|
1971
|
+
});
|
|
1972
|
+
// =============================================================================
|
|
1973
|
+
// SPRITE SHEET TOOLS
|
|
1974
|
+
// =============================================================================
|
|
1975
|
+
export const SpriteSheetInputSchema = z.object({
|
|
1976
|
+
action: z.enum(['generate', 'play', 'export']),
|
|
1977
|
+
skeletonId: z.string().optional(),
|
|
1978
|
+
spriteSheetId: z.string().optional(),
|
|
1979
|
+
name: z.string().optional(),
|
|
1980
|
+
poses: z.array(z.object({ name: z.string(), poseId: z.string() })).optional(),
|
|
1981
|
+
transition: z.object({
|
|
1982
|
+
poseIdA: z.string(),
|
|
1983
|
+
poseIdB: z.string(),
|
|
1984
|
+
frameCount: z.number(),
|
|
1985
|
+
name: z.string().optional(),
|
|
1986
|
+
}).optional(),
|
|
1987
|
+
bakedAnimation: z.object({
|
|
1988
|
+
duration: z.number(),
|
|
1989
|
+
fps: z.number().optional(),
|
|
1990
|
+
name: z.string().optional(),
|
|
1991
|
+
}).optional(),
|
|
1992
|
+
animations: z.record(z.object({
|
|
1993
|
+
frames: z.array(z.string()),
|
|
1994
|
+
fps: z.number().optional(),
|
|
1995
|
+
loop: z.boolean().optional(),
|
|
1996
|
+
})).optional(),
|
|
1997
|
+
padding: z.number().optional(),
|
|
1998
|
+
x: z.number().optional(),
|
|
1999
|
+
y: z.number().optional(),
|
|
2000
|
+
animation: z.string().optional(),
|
|
2001
|
+
fps: z.number().optional(),
|
|
2002
|
+
scale: z.number().optional(),
|
|
2003
|
+
format: z.enum(['png', 'webp']).optional(),
|
|
2004
|
+
});
|
|
2005
|
+
// =============================================================================
|
|
2006
|
+
// STORAGE TOOLS
|
|
2007
|
+
// =============================================================================
|
|
2008
|
+
export const StorageInputSchema = z.object({
|
|
2009
|
+
action: z.enum(['save', 'load', 'list', 'delete']),
|
|
2010
|
+
projectId: z.string().optional(),
|
|
2011
|
+
name: z.string().optional(),
|
|
2012
|
+
thumbnail: z.boolean().optional(),
|
|
2013
|
+
});
|
|
2014
|
+
// =============================================================================
|
|
2015
|
+
// INTERACTION TOOLS
|
|
2016
|
+
// =============================================================================
|
|
2017
|
+
export const InteractionInputSchema = z.object({
|
|
2018
|
+
action: z.enum(['add_behavior', 'remove_behavior', 'trigger_action', 'get_state']),
|
|
2019
|
+
itemId: z.string().optional(),
|
|
2020
|
+
behaviorType: z.enum([
|
|
2021
|
+
'repel', 'attract', 'follow', 'orbit',
|
|
2022
|
+
'slingshot', 'physics_body', 'draggable_constrained',
|
|
2023
|
+
]).optional(),
|
|
2024
|
+
behaviorId: z.string().optional(),
|
|
2025
|
+
actionType: z.enum([
|
|
2026
|
+
'navigate', 'show', 'hide', 'animate', 'stopAnimation',
|
|
2027
|
+
'setState', 'incrementScore', 'playTimeline', 'pauseTimeline',
|
|
2028
|
+
'seekTimeline', 'showFeedback', 'complete',
|
|
2029
|
+
]).optional(),
|
|
2030
|
+
params: z.record(z.unknown()).optional(),
|
|
2031
|
+
});
|
|
2032
|
+
// =============================================================================
|
|
2033
|
+
// WIDGET EXPORT TOOLS
|
|
2034
|
+
// =============================================================================
|
|
2035
|
+
export const ExportWidgetInputSchema = z.object({
|
|
2036
|
+
download: z.boolean().optional(),
|
|
2037
|
+
filename: z.string().optional(),
|
|
2038
|
+
includeInteractions: z.boolean().optional(),
|
|
2039
|
+
minify: z.boolean().optional(),
|
|
2040
|
+
});
|
|
2041
|
+
export const ExportWidgetHtmlInputSchema = z.object({
|
|
2042
|
+
title: z.string().optional(),
|
|
2043
|
+
download: z.boolean().optional(),
|
|
2044
|
+
});
|
|
2045
|
+
// =============================================================================
|
|
2046
|
+
// DATA VISUALIZATION (CHARTS)
|
|
2047
|
+
// =============================================================================
|
|
2048
|
+
export const CreateChartInputSchema = z.object({
|
|
2049
|
+
action: z.enum(['create', 'update', 'reconfigure', 'remove']),
|
|
2050
|
+
chartType: z.enum(['bar', 'line', 'scatter', 'area']).optional(),
|
|
2051
|
+
chartId: z.string().optional(),
|
|
2052
|
+
data: z.array(z.record(z.unknown())).optional(),
|
|
2053
|
+
options: z.record(z.unknown()).optional(),
|
|
2054
|
+
});
|
|
2055
|
+
// =============================================================================
|
|
2056
|
+
// MAGIC SYSTEM (AUTO-ANIMATE + REMIX)
|
|
2057
|
+
// =============================================================================
|
|
2058
|
+
export const MagicInputSchema = z.object({
|
|
2059
|
+
action: z.enum(['animate', 'remix']),
|
|
2060
|
+
mood: z.enum(['calm', 'professional', 'energetic', 'dramatic', 'whimsical']).optional(),
|
|
2061
|
+
selectionOnly: z.boolean().optional(),
|
|
2062
|
+
});
|
|
2063
|
+
// =============================================================================
|
|
2064
|
+
// PHYSICS (RIGID BODY SIMULATION)
|
|
2065
|
+
// =============================================================================
|
|
2066
|
+
export const PhysicsInputSchema = z.object({
|
|
2067
|
+
action: z.enum(['init', 'add_body', 'remove_body', 'apply_force', 'apply_impulse', 'set_velocity', 'get_state', 'create_ground', 'create_joint']),
|
|
2068
|
+
itemId: z.string().optional(),
|
|
2069
|
+
gravity: z.object({ x: z.number(), y: z.number() }).optional(),
|
|
2070
|
+
bodyType: z.enum(['static', 'dynamic', 'kinematic']).optional(),
|
|
2071
|
+
mass: z.number().optional(),
|
|
2072
|
+
friction: z.number().optional(),
|
|
2073
|
+
restitution: z.number().optional(),
|
|
2074
|
+
fixedRotation: z.boolean().optional(),
|
|
2075
|
+
shape: z.enum(['auto', 'circle', 'rect']).optional(),
|
|
2076
|
+
force: z.object({ x: z.number(), y: z.number() }).optional(),
|
|
2077
|
+
impulse: z.object({ x: z.number(), y: z.number() }).optional(),
|
|
2078
|
+
velocity: z.object({ x: z.number(), y: z.number() }).optional(),
|
|
2079
|
+
y: z.number().optional(),
|
|
2080
|
+
width: z.number().optional(),
|
|
2081
|
+
targetItemId: z.string().optional(),
|
|
2082
|
+
jointType: z.enum(['revolute', 'distance', 'weld', 'prismatic']).optional(),
|
|
2083
|
+
jointParams: z.record(z.unknown()).optional(),
|
|
2084
|
+
});
|
|
2085
|
+
// =============================================================================
|
|
2086
|
+
// MEASUREMENT SYSTEM (RULERS, GRID, DIMENSIONS)
|
|
2087
|
+
// =============================================================================
|
|
2088
|
+
export const MeasurementInputSchema = z.object({
|
|
2089
|
+
action: z.enum(['set_rulers', 'set_grid', 'get_dimensions', 'set_snap']),
|
|
2090
|
+
enabled: z.boolean().optional(),
|
|
2091
|
+
itemId: z.string().optional(),
|
|
2092
|
+
});
|
|
1687
2093
|
//# sourceMappingURL=schemas.js.map
|