@pinepaper.studio/mcp-server 1.0.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/LICENSE +21 -0
- package/README.md +406 -0
- package/dist/__tests__/fixtures/index.d.ts +8 -0
- package/dist/__tests__/fixtures/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/index.js +8 -0
- package/dist/__tests__/fixtures/index.js.map +1 -0
- package/dist/__tests__/fixtures/mock-animations.d.ts +213 -0
- package/dist/__tests__/fixtures/mock-animations.d.ts.map +1 -0
- package/dist/__tests__/fixtures/mock-animations.js +96 -0
- package/dist/__tests__/fixtures/mock-animations.js.map +1 -0
- package/dist/__tests__/fixtures/mock-generators.d.ts +147 -0
- package/dist/__tests__/fixtures/mock-generators.d.ts.map +1 -0
- package/dist/__tests__/fixtures/mock-generators.js +90 -0
- package/dist/__tests__/fixtures/mock-generators.js.map +1 -0
- package/dist/__tests__/fixtures/mock-items.d.ts +157 -0
- package/dist/__tests__/fixtures/mock-items.d.ts.map +1 -0
- package/dist/__tests__/fixtures/mock-items.js +74 -0
- package/dist/__tests__/fixtures/mock-items.js.map +1 -0
- package/dist/__tests__/fixtures/mock-relations.d.ts +147 -0
- package/dist/__tests__/fixtures/mock-relations.d.ts.map +1 -0
- package/dist/__tests__/fixtures/mock-relations.js +90 -0
- package/dist/__tests__/fixtures/mock-relations.js.map +1 -0
- package/dist/browser/bridge.d.ts +127 -0
- package/dist/browser/bridge.d.ts.map +1 -0
- package/dist/browser/bridge.js +320 -0
- package/dist/browser/bridge.js.map +1 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +8 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/puppeteer-controller.d.ts +93 -0
- package/dist/browser/puppeteer-controller.d.ts.map +1 -0
- package/dist/browser/puppeteer-controller.js +280 -0
- package/dist/browser/puppeteer-controller.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +109 -0
- package/dist/cli.js.map +1 -0
- package/dist/i18n/i18n-manager.d.ts +88 -0
- package/dist/i18n/i18n-manager.d.ts.map +1 -0
- package/dist/i18n/i18n-manager.js +209 -0
- package/dist/i18n/i18n-manager.js.map +1 -0
- package/dist/i18n/index.d.ts +10 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +10 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/locales/ar.d.ts +6 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -0
- package/dist/i18n/locales/ar.js +106 -0
- package/dist/i18n/locales/ar.js.map +1 -0
- package/dist/i18n/locales/base.d.ts +17 -0
- package/dist/i18n/locales/base.d.ts.map +1 -0
- package/dist/i18n/locales/base.js +213 -0
- package/dist/i18n/locales/base.js.map +1 -0
- package/dist/i18n/locales/bn.d.ts +6 -0
- package/dist/i18n/locales/bn.d.ts.map +1 -0
- package/dist/i18n/locales/bn.js +106 -0
- package/dist/i18n/locales/bn.js.map +1 -0
- package/dist/i18n/locales/chp.d.ts +8 -0
- package/dist/i18n/locales/chp.d.ts.map +1 -0
- package/dist/i18n/locales/chp.js +11 -0
- package/dist/i18n/locales/chp.js.map +1 -0
- package/dist/i18n/locales/cr.d.ts +8 -0
- package/dist/i18n/locales/cr.d.ts.map +1 -0
- package/dist/i18n/locales/cr.js +11 -0
- package/dist/i18n/locales/cr.js.map +1 -0
- package/dist/i18n/locales/crg.d.ts +8 -0
- package/dist/i18n/locales/crg.d.ts.map +1 -0
- package/dist/i18n/locales/crg.js +11 -0
- package/dist/i18n/locales/crg.js.map +1 -0
- package/dist/i18n/locales/cs.d.ts +6 -0
- package/dist/i18n/locales/cs.d.ts.map +1 -0
- package/dist/i18n/locales/cs.js +106 -0
- package/dist/i18n/locales/cs.js.map +1 -0
- package/dist/i18n/locales/da.d.ts +6 -0
- package/dist/i18n/locales/da.d.ts.map +1 -0
- package/dist/i18n/locales/da.js +106 -0
- package/dist/i18n/locales/da.js.map +1 -0
- package/dist/i18n/locales/de.d.ts +6 -0
- package/dist/i18n/locales/de.d.ts.map +1 -0
- package/dist/i18n/locales/de.js +106 -0
- package/dist/i18n/locales/de.js.map +1 -0
- package/dist/i18n/locales/el.d.ts +6 -0
- package/dist/i18n/locales/el.d.ts.map +1 -0
- package/dist/i18n/locales/el.js +106 -0
- package/dist/i18n/locales/el.js.map +1 -0
- package/dist/i18n/locales/en.d.ts +6 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +383 -0
- package/dist/i18n/locales/en.js.map +1 -0
- package/dist/i18n/locales/es.d.ts +6 -0
- package/dist/i18n/locales/es.d.ts.map +1 -0
- package/dist/i18n/locales/es.js +106 -0
- package/dist/i18n/locales/es.js.map +1 -0
- package/dist/i18n/locales/fa.d.ts +6 -0
- package/dist/i18n/locales/fa.d.ts.map +1 -0
- package/dist/i18n/locales/fa.js +106 -0
- package/dist/i18n/locales/fa.js.map +1 -0
- package/dist/i18n/locales/fi.d.ts +6 -0
- package/dist/i18n/locales/fi.d.ts.map +1 -0
- package/dist/i18n/locales/fi.js +106 -0
- package/dist/i18n/locales/fi.js.map +1 -0
- package/dist/i18n/locales/fil.d.ts +6 -0
- package/dist/i18n/locales/fil.d.ts.map +1 -0
- package/dist/i18n/locales/fil.js +383 -0
- package/dist/i18n/locales/fil.js.map +1 -0
- package/dist/i18n/locales/fr.d.ts +6 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -0
- package/dist/i18n/locales/fr.js +106 -0
- package/dist/i18n/locales/fr.js.map +1 -0
- package/dist/i18n/locales/gu.d.ts +6 -0
- package/dist/i18n/locales/gu.d.ts.map +1 -0
- package/dist/i18n/locales/gu.js +106 -0
- package/dist/i18n/locales/gu.js.map +1 -0
- package/dist/i18n/locales/he.d.ts +6 -0
- package/dist/i18n/locales/he.d.ts.map +1 -0
- package/dist/i18n/locales/he.js +106 -0
- package/dist/i18n/locales/he.js.map +1 -0
- package/dist/i18n/locales/hi.d.ts +6 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -0
- package/dist/i18n/locales/hi.js +106 -0
- package/dist/i18n/locales/hi.js.map +1 -0
- package/dist/i18n/locales/hu.d.ts +6 -0
- package/dist/i18n/locales/hu.d.ts.map +1 -0
- package/dist/i18n/locales/hu.js +106 -0
- package/dist/i18n/locales/hu.js.map +1 -0
- package/dist/i18n/locales/id.d.ts +6 -0
- package/dist/i18n/locales/id.d.ts.map +1 -0
- package/dist/i18n/locales/id.js +106 -0
- package/dist/i18n/locales/id.js.map +1 -0
- package/dist/i18n/locales/index.d.ts +110 -0
- package/dist/i18n/locales/index.d.ts.map +1 -0
- package/dist/i18n/locales/index.js +123 -0
- package/dist/i18n/locales/index.js.map +1 -0
- package/dist/i18n/locales/is.d.ts +6 -0
- package/dist/i18n/locales/is.d.ts.map +1 -0
- package/dist/i18n/locales/is.js +383 -0
- package/dist/i18n/locales/is.js.map +1 -0
- package/dist/i18n/locales/it.d.ts +6 -0
- package/dist/i18n/locales/it.d.ts.map +1 -0
- package/dist/i18n/locales/it.js +106 -0
- package/dist/i18n/locales/it.js.map +1 -0
- package/dist/i18n/locales/iu.d.ts +8 -0
- package/dist/i18n/locales/iu.d.ts.map +1 -0
- package/dist/i18n/locales/iu.js +11 -0
- package/dist/i18n/locales/iu.js.map +1 -0
- package/dist/i18n/locales/ja.d.ts +6 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -0
- package/dist/i18n/locales/ja.js +106 -0
- package/dist/i18n/locales/ja.js.map +1 -0
- package/dist/i18n/locales/kn.d.ts +6 -0
- package/dist/i18n/locales/kn.d.ts.map +1 -0
- package/dist/i18n/locales/kn.js +106 -0
- package/dist/i18n/locales/kn.js.map +1 -0
- package/dist/i18n/locales/ko.d.ts +6 -0
- package/dist/i18n/locales/ko.d.ts.map +1 -0
- package/dist/i18n/locales/ko.js +106 -0
- package/dist/i18n/locales/ko.js.map +1 -0
- package/dist/i18n/locales/mic.d.ts +8 -0
- package/dist/i18n/locales/mic.d.ts.map +1 -0
- package/dist/i18n/locales/mic.js +11 -0
- package/dist/i18n/locales/mic.js.map +1 -0
- package/dist/i18n/locales/ml.d.ts +6 -0
- package/dist/i18n/locales/ml.d.ts.map +1 -0
- package/dist/i18n/locales/ml.js +106 -0
- package/dist/i18n/locales/ml.js.map +1 -0
- package/dist/i18n/locales/moh.d.ts +8 -0
- package/dist/i18n/locales/moh.d.ts.map +1 -0
- package/dist/i18n/locales/moh.js +11 -0
- package/dist/i18n/locales/moh.js.map +1 -0
- package/dist/i18n/locales/mr.d.ts +6 -0
- package/dist/i18n/locales/mr.d.ts.map +1 -0
- package/dist/i18n/locales/mr.js +106 -0
- package/dist/i18n/locales/mr.js.map +1 -0
- package/dist/i18n/locales/ms.d.ts +6 -0
- package/dist/i18n/locales/ms.d.ts.map +1 -0
- package/dist/i18n/locales/ms.js +106 -0
- package/dist/i18n/locales/ms.js.map +1 -0
- package/dist/i18n/locales/nl.d.ts +6 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -0
- package/dist/i18n/locales/nl.js +106 -0
- package/dist/i18n/locales/nl.js.map +1 -0
- package/dist/i18n/locales/no.d.ts +6 -0
- package/dist/i18n/locales/no.d.ts.map +1 -0
- package/dist/i18n/locales/no.js +106 -0
- package/dist/i18n/locales/no.js.map +1 -0
- package/dist/i18n/locales/oj.d.ts +8 -0
- package/dist/i18n/locales/oj.d.ts.map +1 -0
- package/dist/i18n/locales/oj.js +11 -0
- package/dist/i18n/locales/oj.js.map +1 -0
- package/dist/i18n/locales/pa.d.ts +6 -0
- package/dist/i18n/locales/pa.d.ts.map +1 -0
- package/dist/i18n/locales/pa.js +106 -0
- package/dist/i18n/locales/pa.js.map +1 -0
- package/dist/i18n/locales/pl.d.ts +6 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -0
- package/dist/i18n/locales/pl.js +106 -0
- package/dist/i18n/locales/pl.js.map +1 -0
- package/dist/i18n/locales/pt-BR.d.ts +6 -0
- package/dist/i18n/locales/pt-BR.d.ts.map +1 -0
- package/dist/i18n/locales/pt-BR.js +106 -0
- package/dist/i18n/locales/pt-BR.js.map +1 -0
- package/dist/i18n/locales/pt.d.ts +6 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -0
- package/dist/i18n/locales/pt.js +106 -0
- package/dist/i18n/locales/pt.js.map +1 -0
- package/dist/i18n/locales/ro.d.ts +6 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -0
- package/dist/i18n/locales/ro.js +106 -0
- package/dist/i18n/locales/ro.js.map +1 -0
- package/dist/i18n/locales/ru.d.ts +6 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -0
- package/dist/i18n/locales/ru.js +106 -0
- package/dist/i18n/locales/ru.js.map +1 -0
- package/dist/i18n/locales/sv.d.ts +6 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -0
- package/dist/i18n/locales/sv.js +106 -0
- package/dist/i18n/locales/sv.js.map +1 -0
- package/dist/i18n/locales/ta.d.ts +6 -0
- package/dist/i18n/locales/ta.d.ts.map +1 -0
- package/dist/i18n/locales/ta.js +106 -0
- package/dist/i18n/locales/ta.js.map +1 -0
- package/dist/i18n/locales/te.d.ts +6 -0
- package/dist/i18n/locales/te.d.ts.map +1 -0
- package/dist/i18n/locales/te.js +106 -0
- package/dist/i18n/locales/te.js.map +1 -0
- package/dist/i18n/locales/th.d.ts +6 -0
- package/dist/i18n/locales/th.d.ts.map +1 -0
- package/dist/i18n/locales/th.js +106 -0
- package/dist/i18n/locales/th.js.map +1 -0
- package/dist/i18n/locales/tl.d.ts +6 -0
- package/dist/i18n/locales/tl.d.ts.map +1 -0
- package/dist/i18n/locales/tl.js +106 -0
- package/dist/i18n/locales/tl.js.map +1 -0
- package/dist/i18n/locales/tr.d.ts +6 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -0
- package/dist/i18n/locales/tr.js +106 -0
- package/dist/i18n/locales/tr.js.map +1 -0
- package/dist/i18n/locales/uk.d.ts +6 -0
- package/dist/i18n/locales/uk.d.ts.map +1 -0
- package/dist/i18n/locales/uk.js +106 -0
- package/dist/i18n/locales/uk.js.map +1 -0
- package/dist/i18n/locales/ur.d.ts +6 -0
- package/dist/i18n/locales/ur.d.ts.map +1 -0
- package/dist/i18n/locales/ur.js +383 -0
- package/dist/i18n/locales/ur.js.map +1 -0
- package/dist/i18n/locales/vi.d.ts +6 -0
- package/dist/i18n/locales/vi.d.ts.map +1 -0
- package/dist/i18n/locales/vi.js +106 -0
- package/dist/i18n/locales/vi.js.map +1 -0
- package/dist/i18n/locales/zh-CN.d.ts +6 -0
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -0
- package/dist/i18n/locales/zh-CN.js +106 -0
- package/dist/i18n/locales/zh-CN.js.map +1 -0
- package/dist/i18n/locales/zh-TW.d.ts +6 -0
- package/dist/i18n/locales/zh-TW.d.ts.map +1 -0
- package/dist/i18n/locales/zh-TW.js +106 -0
- package/dist/i18n/locales/zh-TW.js.map +1 -0
- package/dist/i18n/types.d.ts +101 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +65 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +472 -0
- package/dist/index.js.map +1 -0
- package/dist/server/index.d.ts +39 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +89 -0
- package/dist/server/index.js.map +1 -0
- package/dist/tools/definitions.d.ts +26 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +785 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers.d.ts +19 -0
- package/dist/tools/handlers.d.ts.map +1 -0
- package/dist/tools/handlers.js +477 -0
- package/dist/tools/handlers.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/code-generator.d.ts +97 -0
- package/dist/types/code-generator.d.ts.map +1 -0
- package/dist/types/code-generator.js +545 -0
- package/dist/types/code-generator.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/schemas.d.ts +707 -0
- package/dist/types/schemas.d.ts.map +1 -0
- package/dist/types/schemas.js +341 -0
- package/dist/types/schemas.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PinePaper Code Generator
|
|
3
|
+
*
|
|
4
|
+
* Converts MCP tool inputs to executable PinePaper JavaScript code.
|
|
5
|
+
* This code is designed to run in the browser context where window.PinePaper is available.
|
|
6
|
+
*/
|
|
7
|
+
import { ItemType, RelationType, CreateItemInputSchema, ModifyItemInputSchema, AddRelationInputSchema, AnimateItemInputSchema, KeyframeAnimateInputSchema, ExecuteGeneratorInputSchema, ApplyEffectInputSchema, SetBackgroundColorInputSchema, SetCanvasSizeInputSchema } from './schemas.js';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
export declare class PinePaperCodeGenerator {
|
|
10
|
+
/**
|
|
11
|
+
* Generate code for creating an item
|
|
12
|
+
*/
|
|
13
|
+
generateCreateItem(input: z.infer<typeof CreateItemInputSchema>): string;
|
|
14
|
+
/**
|
|
15
|
+
* Generate code for modifying an item
|
|
16
|
+
*/
|
|
17
|
+
generateModifyItem(input: z.infer<typeof ModifyItemInputSchema>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Generate code for deleting an item
|
|
20
|
+
*/
|
|
21
|
+
generateDeleteItem(itemId: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Generate code for adding a relation
|
|
24
|
+
*/
|
|
25
|
+
generateAddRelation(input: z.infer<typeof AddRelationInputSchema>): string;
|
|
26
|
+
/**
|
|
27
|
+
* Generate code for removing a relation
|
|
28
|
+
*/
|
|
29
|
+
generateRemoveRelation(sourceId: string, targetId: string, relationType?: RelationType): string;
|
|
30
|
+
/**
|
|
31
|
+
* Generate code for querying relations
|
|
32
|
+
*/
|
|
33
|
+
generateQueryRelations(itemId: string, relationType?: RelationType, direction?: 'outgoing' | 'incoming'): string;
|
|
34
|
+
/**
|
|
35
|
+
* Generate code for simple animation
|
|
36
|
+
*/
|
|
37
|
+
generateAnimate(input: z.infer<typeof AnimateItemInputSchema>): string;
|
|
38
|
+
/**
|
|
39
|
+
* Generate code for keyframe animation
|
|
40
|
+
*/
|
|
41
|
+
generateKeyframeAnimate(input: z.infer<typeof KeyframeAnimateInputSchema>): string;
|
|
42
|
+
/**
|
|
43
|
+
* Generate code for executing a generator
|
|
44
|
+
*/
|
|
45
|
+
generateExecuteGenerator(input: z.infer<typeof ExecuteGeneratorInputSchema>): string;
|
|
46
|
+
/**
|
|
47
|
+
* Generate code for applying an effect
|
|
48
|
+
*/
|
|
49
|
+
generateApplyEffect(input: z.infer<typeof ApplyEffectInputSchema>): string;
|
|
50
|
+
/**
|
|
51
|
+
* Generate code for getting items
|
|
52
|
+
*/
|
|
53
|
+
generateGetItems(filter?: {
|
|
54
|
+
type?: ItemType;
|
|
55
|
+
source?: string;
|
|
56
|
+
hasAnimation?: boolean;
|
|
57
|
+
hasRelation?: boolean;
|
|
58
|
+
}): string;
|
|
59
|
+
/**
|
|
60
|
+
* Generate code for timeline control
|
|
61
|
+
*/
|
|
62
|
+
generatePlayTimeline(action: 'play' | 'stop' | 'seek', duration?: number, loop?: boolean, time?: number): string;
|
|
63
|
+
/**
|
|
64
|
+
* Generate code for setting background color
|
|
65
|
+
*/
|
|
66
|
+
generateSetBackgroundColor(input: z.infer<typeof SetBackgroundColorInputSchema>): string;
|
|
67
|
+
/**
|
|
68
|
+
* Generate code for setting canvas size
|
|
69
|
+
*/
|
|
70
|
+
generateSetCanvasSize(input: z.infer<typeof SetCanvasSizeInputSchema>): string;
|
|
71
|
+
/**
|
|
72
|
+
* Generate code for SVG export
|
|
73
|
+
*/
|
|
74
|
+
generateExportSVG(): string;
|
|
75
|
+
/**
|
|
76
|
+
* Generate code for training data export
|
|
77
|
+
*/
|
|
78
|
+
generateExportTrainingData(format?: 'json' | 'jsonl', includeMetadata?: boolean): string;
|
|
79
|
+
/**
|
|
80
|
+
* Generate code for relation stats
|
|
81
|
+
*/
|
|
82
|
+
generateGetRelationStats(): string;
|
|
83
|
+
/**
|
|
84
|
+
* Generate code for listing generators
|
|
85
|
+
*/
|
|
86
|
+
generateListGenerators(): string;
|
|
87
|
+
/**
|
|
88
|
+
* Generate code for getting canvas size
|
|
89
|
+
*/
|
|
90
|
+
generateGetCanvasSize(): string;
|
|
91
|
+
/**
|
|
92
|
+
* Generate code for clearing all items from canvas
|
|
93
|
+
*/
|
|
94
|
+
generateClearCanvas(): string;
|
|
95
|
+
}
|
|
96
|
+
export declare const codeGenerator: PinePaperCodeGenerator;
|
|
97
|
+
//# sourceMappingURL=code-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-generator.d.ts","sourceRoot":"","sources":["../../src/types/code-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,EAEzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsexB,qBAAa,sBAAsB;IACjC;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAAG,MAAM;IASxE;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAAG,MAAM;IAQxE;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MA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AC,OAAO,6BAA6B,CAAC,GAAG,MAAM;IAKxF;;OAEG;IACH,qBAAqB,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAAG,MAAM;IAS9E;;OAEG;IACH,iBAAiB,IAAI,MAAM;IAI3B;;OAEG;IACH,0BAA0B,CACxB,MAAM,GAAE,MAAM,GAAG,OAAgB,EACjC,eAAe,GAAE,OAAc,GAC9B,MAAM;IAIT;;OAEG;IACH,wBAAwB,IAAI,MAAM;IAIlC;;OAEG;IACH,sBAAsB,IAAI,MAAM;IAIhC;;OAEG;IACH,qBAAqB,IAAI,MAAM;IAI/B;;OAEG;IACH,mBAAmB,IAAI,MAAM;CAG9B;AAGD,eAAO,MAAM,aAAa,wBAA+B,CAAC"}
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PinePaper Code Generator
|
|
3
|
+
*
|
|
4
|
+
* Converts MCP tool inputs to executable PinePaper JavaScript code.
|
|
5
|
+
* This code is designed to run in the browser context where window.PinePaper is available.
|
|
6
|
+
*/
|
|
7
|
+
import { CreateItemInputSchema, ModifyItemInputSchema, AddRelationInputSchema, AnimateItemInputSchema, KeyframeAnimateInputSchema, ExecuteGeneratorInputSchema, ApplyEffectInputSchema, SetBackgroundColorInputSchema, SetCanvasSizeInputSchema, } from './schemas.js';
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// CODE TEMPLATES
|
|
10
|
+
// =============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Template for creating items
|
|
13
|
+
*/
|
|
14
|
+
function generateCreateItemCode(itemType, position, properties) {
|
|
15
|
+
const params = {
|
|
16
|
+
x: position.x,
|
|
17
|
+
y: position.y,
|
|
18
|
+
...properties,
|
|
19
|
+
};
|
|
20
|
+
// Map generic properties to PinePaper-specific ones
|
|
21
|
+
if (itemType === 'text') {
|
|
22
|
+
if (params.color) {
|
|
23
|
+
params.color = params.color; // PinePaper uses 'color' for text
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return `
|
|
27
|
+
// Create ${itemType} item
|
|
28
|
+
const item = app.create('${itemType}', ${JSON.stringify(params, null, 2)});
|
|
29
|
+
const itemId = item.data.registryId;
|
|
30
|
+
app.historyManager.saveState();
|
|
31
|
+
|
|
32
|
+
// Return item info
|
|
33
|
+
({ itemId, type: '${itemType}', position: { x: ${position.x}, y: ${position.y} } });
|
|
34
|
+
`.trim();
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Template for modifying items
|
|
38
|
+
*/
|
|
39
|
+
function generateModifyItemCode(itemId, properties) {
|
|
40
|
+
return `
|
|
41
|
+
// Modify item ${itemId}
|
|
42
|
+
const item = app.getItemById('${itemId}');
|
|
43
|
+
if (!item) {
|
|
44
|
+
throw new Error('Item not found: ${itemId}');
|
|
45
|
+
}
|
|
46
|
+
app.modify(item, ${JSON.stringify(properties, null, 2)});
|
|
47
|
+
app.historyManager.saveState();
|
|
48
|
+
|
|
49
|
+
// Return success
|
|
50
|
+
({ success: true, itemId: '${itemId}' });
|
|
51
|
+
`.trim();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Template for deleting items
|
|
55
|
+
*/
|
|
56
|
+
function generateDeleteItemCode(itemId) {
|
|
57
|
+
return `
|
|
58
|
+
// Delete item ${itemId}
|
|
59
|
+
const item = app.getItemById('${itemId}');
|
|
60
|
+
if (!item) {
|
|
61
|
+
throw new Error('Item not found: ${itemId}');
|
|
62
|
+
}
|
|
63
|
+
item.remove();
|
|
64
|
+
app.itemRegistry.remove('${itemId}');
|
|
65
|
+
app.historyManager.saveState();
|
|
66
|
+
|
|
67
|
+
// Return success
|
|
68
|
+
({ success: true, itemId: '${itemId}' });
|
|
69
|
+
`.trim();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Template for adding relations
|
|
73
|
+
*/
|
|
74
|
+
function generateAddRelationCode(sourceId, targetId, relationType, params) {
|
|
75
|
+
return `
|
|
76
|
+
// Add ${relationType} relation: ${sourceId} -> ${targetId}
|
|
77
|
+
const success = app.addRelation('${sourceId}', '${targetId}', '${relationType}', ${JSON.stringify(params, null, 2)});
|
|
78
|
+
if (!success) {
|
|
79
|
+
throw new Error('Failed to add relation');
|
|
80
|
+
}
|
|
81
|
+
app.historyManager.saveState();
|
|
82
|
+
|
|
83
|
+
// Return success
|
|
84
|
+
({ success: true, sourceId: '${sourceId}', targetId: '${targetId}', relationType: '${relationType}' });
|
|
85
|
+
`.trim();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Template for removing relations
|
|
89
|
+
*/
|
|
90
|
+
function generateRemoveRelationCode(sourceId, targetId, relationType) {
|
|
91
|
+
const relationArg = relationType ? `'${relationType}'` : 'undefined';
|
|
92
|
+
return `
|
|
93
|
+
// Remove relation: ${sourceId} -> ${targetId}${relationType ? ` (${relationType})` : ''}
|
|
94
|
+
app.removeRelation('${sourceId}', '${targetId}', ${relationArg});
|
|
95
|
+
app.historyManager.saveState();
|
|
96
|
+
|
|
97
|
+
// Return success
|
|
98
|
+
({ success: true, sourceId: '${sourceId}', targetId: '${targetId}' });
|
|
99
|
+
`.trim();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Template for querying relations
|
|
103
|
+
*/
|
|
104
|
+
function generateQueryRelationsCode(itemId, relationType, direction = 'outgoing') {
|
|
105
|
+
if (direction === 'outgoing') {
|
|
106
|
+
const typeArg = relationType ? `'${relationType}'` : 'undefined';
|
|
107
|
+
return `
|
|
108
|
+
// Query outgoing relations for ${itemId}
|
|
109
|
+
const relations = app.getRelations('${itemId}', ${typeArg});
|
|
110
|
+
|
|
111
|
+
// Format results
|
|
112
|
+
const formatted = relations.map(r => ({
|
|
113
|
+
sourceId: r.sourceId || '${itemId}',
|
|
114
|
+
targetId: r.targetId,
|
|
115
|
+
relationType: r.relation || r.type,
|
|
116
|
+
params: r.params || {}
|
|
117
|
+
}));
|
|
118
|
+
|
|
119
|
+
({ relations: formatted });
|
|
120
|
+
`.trim();
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
const typeArg = relationType ? `'${relationType}'` : 'undefined';
|
|
124
|
+
return `
|
|
125
|
+
// Query incoming relations for ${itemId}
|
|
126
|
+
const results = app.queryByRelationTarget('${itemId}', ${typeArg});
|
|
127
|
+
|
|
128
|
+
// Format results
|
|
129
|
+
const relations = results.map(r => ({
|
|
130
|
+
sourceId: r.itemId,
|
|
131
|
+
targetId: '${itemId}',
|
|
132
|
+
relationType: '${relationType || 'unknown'}',
|
|
133
|
+
params: r.params || {}
|
|
134
|
+
}));
|
|
135
|
+
|
|
136
|
+
({ relations });
|
|
137
|
+
`.trim();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Template for simple animation
|
|
142
|
+
*/
|
|
143
|
+
function generateAnimateCode(itemId, animationType, speed) {
|
|
144
|
+
return `
|
|
145
|
+
// Apply ${animationType} animation to ${itemId}
|
|
146
|
+
const item = app.getItemById('${itemId}');
|
|
147
|
+
if (!item) {
|
|
148
|
+
throw new Error('Item not found: ${itemId}');
|
|
149
|
+
}
|
|
150
|
+
app.animate(item, {
|
|
151
|
+
animationType: '${animationType}',
|
|
152
|
+
animationSpeed: ${speed}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
({ success: true, itemId: '${itemId}', animationType: '${animationType}' });
|
|
156
|
+
`.trim();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Template for keyframe animation
|
|
160
|
+
*/
|
|
161
|
+
function generateKeyframeAnimateCode(itemId, keyframes, duration, loop = false) {
|
|
162
|
+
const keyframesJson = JSON.stringify(keyframes, null, 2);
|
|
163
|
+
const calculatedDuration = duration || Math.max(...keyframes.map(k => k.time));
|
|
164
|
+
return `
|
|
165
|
+
// Apply keyframe animation to ${itemId}
|
|
166
|
+
const item = app.getItemById('${itemId}');
|
|
167
|
+
if (!item) {
|
|
168
|
+
throw new Error('Item not found: ${itemId}');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
app.modify(item, {
|
|
172
|
+
animationType: 'keyframe',
|
|
173
|
+
keyframes: ${keyframesJson}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// Start playback
|
|
177
|
+
app.playKeyframeTimeline(${calculatedDuration}, ${loop});
|
|
178
|
+
|
|
179
|
+
({ success: true, itemId: '${itemId}', duration: ${calculatedDuration}, loop: ${loop} });
|
|
180
|
+
`.trim();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Template for executing generators
|
|
184
|
+
*/
|
|
185
|
+
function generateExecuteGeneratorCode(generatorName, params) {
|
|
186
|
+
return `
|
|
187
|
+
// Execute ${generatorName} generator
|
|
188
|
+
await app.executeGenerator('${generatorName}', ${JSON.stringify(params, null, 2)});
|
|
189
|
+
|
|
190
|
+
({ success: true, generator: '${generatorName}' });
|
|
191
|
+
`.trim();
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Template for applying effects
|
|
195
|
+
*/
|
|
196
|
+
function generateApplyEffectCode(itemId, effectType, params) {
|
|
197
|
+
return `
|
|
198
|
+
// Apply ${effectType} effect to ${itemId}
|
|
199
|
+
const item = app.getItemById('${itemId}');
|
|
200
|
+
if (!item) {
|
|
201
|
+
throw new Error('Item not found: ${itemId}');
|
|
202
|
+
}
|
|
203
|
+
app.applyEffect(item, '${effectType}', ${JSON.stringify(params, null, 2)});
|
|
204
|
+
|
|
205
|
+
({ success: true, itemId: '${itemId}', effectType: '${effectType}' });
|
|
206
|
+
`.trim();
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Template for getting items
|
|
210
|
+
*/
|
|
211
|
+
function generateGetItemsCode(filter) {
|
|
212
|
+
if (!filter || Object.keys(filter).length === 0) {
|
|
213
|
+
return `
|
|
214
|
+
// Get all items
|
|
215
|
+
const entries = app.itemRegistry.getAll();
|
|
216
|
+
const items = entries.map(entry => ({
|
|
217
|
+
id: entry.id || entry.itemId,
|
|
218
|
+
type: entry.type,
|
|
219
|
+
position: entry.item.position ? { x: entry.item.position.x, y: entry.item.position.y } : null,
|
|
220
|
+
hasAnimation: !!entry.item.data?.animationType,
|
|
221
|
+
relations: app.getRelations(entry.id || entry.itemId).map(r => r.relation || r.type)
|
|
222
|
+
}));
|
|
223
|
+
|
|
224
|
+
({ items, count: items.length });
|
|
225
|
+
`.trim();
|
|
226
|
+
}
|
|
227
|
+
const conditions = [];
|
|
228
|
+
if (filter.type) {
|
|
229
|
+
conditions.push(`entry.type === '${filter.type}'`);
|
|
230
|
+
}
|
|
231
|
+
if (filter.source) {
|
|
232
|
+
conditions.push(`entry.source === '${filter.source}'`);
|
|
233
|
+
}
|
|
234
|
+
if (filter.hasAnimation !== undefined) {
|
|
235
|
+
conditions.push(`!!entry.item.data?.animationType === ${filter.hasAnimation}`);
|
|
236
|
+
}
|
|
237
|
+
if (filter.hasRelation !== undefined) {
|
|
238
|
+
conditions.push(`(app.getRelations(entry.id || entry.itemId).length > 0) === ${filter.hasRelation}`);
|
|
239
|
+
}
|
|
240
|
+
return `
|
|
241
|
+
// Get items with filter
|
|
242
|
+
const entries = app.itemRegistry.getAll();
|
|
243
|
+
const filtered = entries.filter(entry => ${conditions.join(' && ')});
|
|
244
|
+
const items = filtered.map(entry => ({
|
|
245
|
+
id: entry.id || entry.itemId,
|
|
246
|
+
type: entry.type,
|
|
247
|
+
position: entry.item.position ? { x: entry.item.position.x, y: entry.item.position.y } : null,
|
|
248
|
+
hasAnimation: !!entry.item.data?.animationType,
|
|
249
|
+
relations: app.getRelations(entry.id || entry.itemId).map(r => r.relation || r.type)
|
|
250
|
+
}));
|
|
251
|
+
|
|
252
|
+
({ items, count: items.length });
|
|
253
|
+
`.trim();
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Template for timeline control
|
|
257
|
+
*/
|
|
258
|
+
function generatePlayTimelineCode(action, duration, loop, time) {
|
|
259
|
+
switch (action) {
|
|
260
|
+
case 'play':
|
|
261
|
+
return `
|
|
262
|
+
// Play keyframe timeline
|
|
263
|
+
app.playKeyframeTimeline(${duration || 5}, ${loop ?? false});
|
|
264
|
+
({ success: true, action: 'play', duration: ${duration || 5}, loop: ${loop ?? false} });
|
|
265
|
+
`.trim();
|
|
266
|
+
case 'stop':
|
|
267
|
+
return `
|
|
268
|
+
// Stop keyframe timeline
|
|
269
|
+
app.stopKeyframeTimeline();
|
|
270
|
+
({ success: true, action: 'stop' });
|
|
271
|
+
`.trim();
|
|
272
|
+
case 'seek':
|
|
273
|
+
return `
|
|
274
|
+
// Seek to time
|
|
275
|
+
app.setPlaybackTime(${time || 0});
|
|
276
|
+
({ success: true, action: 'seek', time: ${time || 0} });
|
|
277
|
+
`.trim();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Template for setting background color
|
|
282
|
+
*/
|
|
283
|
+
function generateSetBackgroundColorCode(color) {
|
|
284
|
+
return `
|
|
285
|
+
// Set background color
|
|
286
|
+
app.setBackgroundColor('${color}');
|
|
287
|
+
({ success: true, color: '${color}' });
|
|
288
|
+
`.trim();
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Template for canvas size
|
|
292
|
+
*/
|
|
293
|
+
function generateSetCanvasSizeCode(width, height, preset) {
|
|
294
|
+
return `
|
|
295
|
+
// Set canvas size
|
|
296
|
+
app.setCanvasSize(${width}, ${height}${preset ? `, '${preset}'` : ''});
|
|
297
|
+
app.historyManager.saveState();
|
|
298
|
+
({ success: true, width: ${width}, height: ${height} });
|
|
299
|
+
`.trim();
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Template for getting canvas size
|
|
303
|
+
*/
|
|
304
|
+
function generateGetCanvasSizeCode() {
|
|
305
|
+
return `
|
|
306
|
+
// Get current canvas size
|
|
307
|
+
const size = app.getCanvasSize();
|
|
308
|
+
({ width: size.width, height: size.height });
|
|
309
|
+
`.trim();
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Template for clearing all items from canvas
|
|
313
|
+
*/
|
|
314
|
+
function generateClearCanvasCode() {
|
|
315
|
+
return `
|
|
316
|
+
// Clear all items from canvas
|
|
317
|
+
const entries = app.itemRegistry.getAll();
|
|
318
|
+
const itemIds = entries.map(entry => entry.id || entry.itemId);
|
|
319
|
+
let removedCount = 0;
|
|
320
|
+
|
|
321
|
+
for (const itemId of itemIds) {
|
|
322
|
+
try {
|
|
323
|
+
const item = app.getItemById(itemId);
|
|
324
|
+
if (item) {
|
|
325
|
+
item.remove();
|
|
326
|
+
app.itemRegistry.remove(itemId);
|
|
327
|
+
removedCount++;
|
|
328
|
+
}
|
|
329
|
+
} catch (e) {
|
|
330
|
+
console.warn('Failed to remove item:', itemId, e);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Also clear any relations
|
|
335
|
+
if (app.clearAllRelations) {
|
|
336
|
+
app.clearAllRelations();
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
app.historyManager.saveState();
|
|
340
|
+
|
|
341
|
+
// Verify canvas is empty
|
|
342
|
+
const remaining = app.itemRegistry.getAll().length;
|
|
343
|
+
|
|
344
|
+
({ success: true, removedCount, remainingItems: remaining });
|
|
345
|
+
`.trim();
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Template for SVG export
|
|
349
|
+
*/
|
|
350
|
+
function generateExportSVGCode() {
|
|
351
|
+
return `
|
|
352
|
+
// Export animated SVG
|
|
353
|
+
const svgString = app.exportAnimatedSVG();
|
|
354
|
+
({ success: true, svgString, hasAnimations: svgString.includes('<animate') });
|
|
355
|
+
`.trim();
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Template for training data export
|
|
359
|
+
*/
|
|
360
|
+
function generateExportTrainingDataCode(format = 'json', includeMetadata = true) {
|
|
361
|
+
if (format === 'jsonl') {
|
|
362
|
+
return `
|
|
363
|
+
// Export training data as JSONL
|
|
364
|
+
const data = app.exportRelationTrainingData();
|
|
365
|
+
const jsonl = data.map(entry => JSON.stringify({
|
|
366
|
+
messages: [
|
|
367
|
+
{ role: 'user', content: entry.instruction },
|
|
368
|
+
{ role: 'assistant', content: entry.code }
|
|
369
|
+
]${includeMetadata ? `,
|
|
370
|
+
metadata: { relation: entry.relation, params: entry.params }` : ''}
|
|
371
|
+
})).join('\\n');
|
|
372
|
+
|
|
373
|
+
({ trainingData: jsonl, count: data.length, format: 'jsonl' });
|
|
374
|
+
`.trim();
|
|
375
|
+
}
|
|
376
|
+
return `
|
|
377
|
+
// Export training data as JSON
|
|
378
|
+
const trainingData = app.exportRelationTrainingData();
|
|
379
|
+
({ trainingData, count: trainingData.length, format: 'json' });
|
|
380
|
+
`.trim();
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Template for relation stats
|
|
384
|
+
*/
|
|
385
|
+
function generateGetRelationStatsCode() {
|
|
386
|
+
return `
|
|
387
|
+
// Get relation statistics
|
|
388
|
+
const stats = app.getRelationStats();
|
|
389
|
+
({ stats });
|
|
390
|
+
`.trim();
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Template for list generators
|
|
394
|
+
*/
|
|
395
|
+
function generateListGeneratorsCode() {
|
|
396
|
+
return `
|
|
397
|
+
// List available generators
|
|
398
|
+
const generators = app.getAvailableBackgroundGenerators();
|
|
399
|
+
const formatted = generators.map(g => ({
|
|
400
|
+
name: g.name,
|
|
401
|
+
displayName: g.displayName || g.name,
|
|
402
|
+
category: g.category || 'background',
|
|
403
|
+
description: g.description || ''
|
|
404
|
+
}));
|
|
405
|
+
|
|
406
|
+
({ generators: formatted });
|
|
407
|
+
`.trim();
|
|
408
|
+
}
|
|
409
|
+
// =============================================================================
|
|
410
|
+
// CODE GENERATOR CLASS
|
|
411
|
+
// =============================================================================
|
|
412
|
+
export class PinePaperCodeGenerator {
|
|
413
|
+
/**
|
|
414
|
+
* Generate code for creating an item
|
|
415
|
+
*/
|
|
416
|
+
generateCreateItem(input) {
|
|
417
|
+
const validated = CreateItemInputSchema.parse(input);
|
|
418
|
+
return generateCreateItemCode(validated.itemType, validated.position, validated.properties);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Generate code for modifying an item
|
|
422
|
+
*/
|
|
423
|
+
generateModifyItem(input) {
|
|
424
|
+
const validated = ModifyItemInputSchema.parse(input);
|
|
425
|
+
return generateModifyItemCode(validated.itemId, validated.properties);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Generate code for deleting an item
|
|
429
|
+
*/
|
|
430
|
+
generateDeleteItem(itemId) {
|
|
431
|
+
return generateDeleteItemCode(itemId);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Generate code for adding a relation
|
|
435
|
+
*/
|
|
436
|
+
generateAddRelation(input) {
|
|
437
|
+
const validated = AddRelationInputSchema.parse(input);
|
|
438
|
+
return generateAddRelationCode(validated.sourceId, validated.targetId, validated.relationType, validated.params);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Generate code for removing a relation
|
|
442
|
+
*/
|
|
443
|
+
generateRemoveRelation(sourceId, targetId, relationType) {
|
|
444
|
+
return generateRemoveRelationCode(sourceId, targetId, relationType);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Generate code for querying relations
|
|
448
|
+
*/
|
|
449
|
+
generateQueryRelations(itemId, relationType, direction = 'outgoing') {
|
|
450
|
+
return generateQueryRelationsCode(itemId, relationType, direction);
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Generate code for simple animation
|
|
454
|
+
*/
|
|
455
|
+
generateAnimate(input) {
|
|
456
|
+
const validated = AnimateItemInputSchema.parse(input);
|
|
457
|
+
return generateAnimateCode(validated.itemId, validated.animationType, validated.speed);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Generate code for keyframe animation
|
|
461
|
+
*/
|
|
462
|
+
generateKeyframeAnimate(input) {
|
|
463
|
+
const validated = KeyframeAnimateInputSchema.parse(input);
|
|
464
|
+
return generateKeyframeAnimateCode(validated.itemId, validated.keyframes, validated.duration, validated.loop);
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Generate code for executing a generator
|
|
468
|
+
*/
|
|
469
|
+
generateExecuteGenerator(input) {
|
|
470
|
+
const validated = ExecuteGeneratorInputSchema.parse(input);
|
|
471
|
+
return generateExecuteGeneratorCode(validated.generatorName, validated.params);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Generate code for applying an effect
|
|
475
|
+
*/
|
|
476
|
+
generateApplyEffect(input) {
|
|
477
|
+
const validated = ApplyEffectInputSchema.parse(input);
|
|
478
|
+
return generateApplyEffectCode(validated.itemId, validated.effectType, validated.params);
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Generate code for getting items
|
|
482
|
+
*/
|
|
483
|
+
generateGetItems(filter) {
|
|
484
|
+
return generateGetItemsCode(filter);
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Generate code for timeline control
|
|
488
|
+
*/
|
|
489
|
+
generatePlayTimeline(action, duration, loop, time) {
|
|
490
|
+
return generatePlayTimelineCode(action, duration, loop, time);
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Generate code for setting background color
|
|
494
|
+
*/
|
|
495
|
+
generateSetBackgroundColor(input) {
|
|
496
|
+
const validated = SetBackgroundColorInputSchema.parse(input);
|
|
497
|
+
return generateSetBackgroundColorCode(validated.color);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Generate code for setting canvas size
|
|
501
|
+
*/
|
|
502
|
+
generateSetCanvasSize(input) {
|
|
503
|
+
const validated = SetCanvasSizeInputSchema.parse(input);
|
|
504
|
+
return generateSetCanvasSizeCode(validated.width, validated.height, validated.preset);
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Generate code for SVG export
|
|
508
|
+
*/
|
|
509
|
+
generateExportSVG() {
|
|
510
|
+
return generateExportSVGCode();
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Generate code for training data export
|
|
514
|
+
*/
|
|
515
|
+
generateExportTrainingData(format = 'json', includeMetadata = true) {
|
|
516
|
+
return generateExportTrainingDataCode(format, includeMetadata);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Generate code for relation stats
|
|
520
|
+
*/
|
|
521
|
+
generateGetRelationStats() {
|
|
522
|
+
return generateGetRelationStatsCode();
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Generate code for listing generators
|
|
526
|
+
*/
|
|
527
|
+
generateListGenerators() {
|
|
528
|
+
return generateListGeneratorsCode();
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Generate code for getting canvas size
|
|
532
|
+
*/
|
|
533
|
+
generateGetCanvasSize() {
|
|
534
|
+
return generateGetCanvasSizeCode();
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Generate code for clearing all items from canvas
|
|
538
|
+
*/
|
|
539
|
+
generateClearCanvas() {
|
|
540
|
+
return generateClearCanvasCode();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
// Export singleton instance
|
|
544
|
+
export const codeGenerator = new PinePaperCodeGenerator();
|
|
545
|
+
//# sourceMappingURL=code-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-generator.js","sourceRoot":"","sources":["../../src/types/code-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAKL,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AAGtB,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF;;GAEG;AACH,SAAS,sBAAsB,CAC7B,QAAkB,EAClB,QAAkC,EAClC,UAAmC;IAEnC,MAAM,MAAM,GAA4B;QACtC,CAAC,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C,KAAK,EACf,SAAS,CAAC,MAAM,EAChB,SAAS,CAAC,MAAM,CACjB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,qBAAqB,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,0BAA0B,CACxB,SAA2B,MAAM,EACjC,kBAA2B,IAAI;QAE/B,OAAO,8BAA8B,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,wBAAwB;QACtB,OAAO,4BAA4B,EAAE,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,sBAAsB;QACpB,OAAO,0BAA0B,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,qBAAqB;QACnB,OAAO,yBAAyB,EAAE,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,mBAAmB;QACjB,OAAO,uBAAuB,EAAE,CAAC;IACnC,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
|