@mulmoclaude/shapescript-plugin 1.0.0 → 1.1.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/README.md +110 -1
- package/dist/core/contract.d.ts +42 -0
- package/dist/core/contract.d.ts.map +1 -0
- package/dist/core/definition.d.ts +4 -0
- package/dist/core/definition.d.ts.map +1 -1
- package/dist/core/dispatch.d.ts +38 -0
- package/dist/core/dispatch.d.ts.map +1 -0
- package/dist/core/index.d.ts +7 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/paths.d.ts +40 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/plugin.d.ts +21 -4
- package/dist/core/plugin.d.ts.map +1 -1
- package/dist/core/types.d.ts +27 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/lang/de.d.ts.map +1 -1
- package/dist/lang/en.d.ts.map +1 -1
- package/dist/lang/es.d.ts.map +1 -1
- package/dist/lang/fr.d.ts.map +1 -1
- package/dist/lang/ja.d.ts.map +1 -1
- package/dist/lang/ko.d.ts.map +1 -1
- package/dist/lang/messages.d.ts +1 -0
- package/dist/lang/messages.d.ts.map +1 -1
- package/dist/lang/ptBR.d.ts.map +1 -1
- package/dist/lang/zh.d.ts.map +1 -1
- package/dist/samples-0PjcB6cu.cjs +195 -0
- package/dist/{toThreeJS-DjFysw4f.js → samples-N1JR7LKe.js} +2812 -2050
- package/dist/shapescript/builders.d.ts +7 -0
- package/dist/shapescript/builders.d.ts.map +1 -0
- package/dist/shapescript/evaluator.d.ts +12 -1
- package/dist/shapescript/evaluator.d.ts.map +1 -1
- package/dist/shapescript/parser.d.ts +30 -2
- package/dist/shapescript/parser.d.ts.map +1 -1
- package/dist/shapescript/toThreeJS.d.ts +51 -6
- package/dist/shapescript/toThreeJS.d.ts.map +1 -1
- package/dist/shapescript/types.d.ts +7 -2
- package/dist/shapescript/types.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/vue/View.vue.d.ts.map +1 -1
- package/dist/vue/index.d.ts +4 -2
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue.cjs +25 -17
- package/dist/vue.js +2170 -2108
- package/package.json +3 -1
- package/dist/toThreeJS-CtWReTrz.cjs +0 -169
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
/** Read an ordered perimeter from a triangulated planar profile. Interior
|
|
3
|
+
* vertices (e.g. the centre of CircleGeometry) must never enter a loft ring. */
|
|
4
|
+
export declare function profileOf(mesh: THREE.Mesh): THREE.Vector3[];
|
|
5
|
+
/** Straight interpolation between successive rings, with triangulated end caps. */
|
|
6
|
+
export declare function loftGeometry(profiles: THREE.Vector3[][]): THREE.BufferGeometry;
|
|
7
|
+
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/shapescript/builders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;gFACgF;AAChF,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAiD3D;AA0CD,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,cAAc,CAoE9E"}
|
|
@@ -9,9 +9,20 @@ export declare class SymbolTable {
|
|
|
9
9
|
get(name: string): Value | undefined;
|
|
10
10
|
has(name: string): boolean;
|
|
11
11
|
}
|
|
12
|
+
/** Seeds the generator behind `rnd` / `rand()` when a caller names none.
|
|
13
|
+
*
|
|
14
|
+
* The same script is evaluated TWICE for one visualization — once on the
|
|
15
|
+
* server, which validates it and reports the diagnostic, and again in the
|
|
16
|
+
* browser, which renders it. With `Math.random()` behind `rnd` those two runs
|
|
17
|
+
* can take different branches, so `if rnd < .5 { cube } else { … }` could
|
|
18
|
+
* validate clean and then fail in the viewport, which is exactly the failure
|
|
19
|
+
* the validation exists to prevent. A seeded generator makes both runs agree,
|
|
20
|
+
* and re-rendering a model on every keystroke stops reshuffling it. */
|
|
21
|
+
export declare const DEFAULT_RANDOM_SEED = 2654435769;
|
|
12
22
|
export declare class Evaluator {
|
|
13
23
|
private symbols;
|
|
14
|
-
|
|
24
|
+
private readonly random;
|
|
25
|
+
constructor(symbols?: SymbolTable, seed?: number);
|
|
15
26
|
getSymbols(): SymbolTable;
|
|
16
27
|
evaluate(expr: Expression | number | string | Vector3 | Color): Value;
|
|
17
28
|
evaluateToNumber(expr: Expression | number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../src/shapescript/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC;AAExD,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAA4B;;
|
|
1
|
+
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../src/shapescript/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC;AAExD,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAA4B;;IAO1C,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;IAMhB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAMrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAWpC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG3B;AAwHD;;;;;;;;wEAQwE;AACxE,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAc9C,qBAAa,SAAS;IACpB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,OAAO,CAAC,EAAE,WAAW,EAAE,IAAI,GAAE,MAA4B;IAKrE,UAAU,IAAI,WAAW;IAIzB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK;IA8MrE,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM;IAKnD,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAK5C,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO;IAmBtD,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK;CAkBjD"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Token, SceneNode } from "./types";
|
|
2
2
|
export declare class Parser {
|
|
3
|
+
/** Whether the expression being parsed is one value of a whitespace-separated
|
|
4
|
+
* list. See `withValueList`. */
|
|
5
|
+
private valueList;
|
|
3
6
|
private tokens;
|
|
4
7
|
private pos;
|
|
5
8
|
constructor(tokens: Token[]);
|
|
@@ -12,9 +15,23 @@ export declare class Parser {
|
|
|
12
15
|
private skipNewlines;
|
|
13
16
|
private parseExpression;
|
|
14
17
|
private parsePrimary;
|
|
18
|
+
/** The body of a `( … )`, with the opening paren already consumed.
|
|
19
|
+
*
|
|
20
|
+
* Both a grouped expression and a space- or comma-separated tuple live here,
|
|
21
|
+
* so its elements are read as a VALUE LIST: `(1 +2 +3)` is three components,
|
|
22
|
+
* the same as `1 +2 +3` written without the parens. */
|
|
23
|
+
private parseParenthesized;
|
|
24
|
+
/** `(1, 2, 3)` — a trailing comma before the `)` ends the list. */
|
|
25
|
+
private parseCommaSeparated;
|
|
26
|
+
/** `(1 2 3)` — components held apart by nothing but whitespace. */
|
|
27
|
+
private parseSpaceSeparated;
|
|
28
|
+
private parseAtom;
|
|
15
29
|
private getPrecedence;
|
|
16
30
|
private tokenTypeToOperator;
|
|
17
31
|
private parseVectorOrExpression;
|
|
32
|
+
/** One property value: `1 -2 3` is a vector, `max(1 2)` a single expression,
|
|
33
|
+
* and `wheel { … }` a custom shape invocation that belongs to no list. */
|
|
34
|
+
private parseValueList;
|
|
18
35
|
private parseProperties;
|
|
19
36
|
private parseBlockContents;
|
|
20
37
|
private parseBlock;
|
|
@@ -29,9 +46,20 @@ export declare class Parser {
|
|
|
29
46
|
private parseTexture;
|
|
30
47
|
private parseGroup;
|
|
31
48
|
private parseBuilder;
|
|
32
|
-
|
|
49
|
+
/** Run `parse` with the tuple-value break of `isStartOfNewValue` enabled or
|
|
50
|
+
* suppressed. Whitespace-separated value lists — property values, path
|
|
51
|
+
* values, the inside of a `( … )` — read ` -1` as the NEXT value; call
|
|
52
|
+
* arguments, subscripts and `for … to …` bounds are ordinary arithmetic. */
|
|
53
|
+
private withValueList;
|
|
54
|
+
/** Whether the current token can begin another value of a whitespace-separated
|
|
55
|
+
* list, so `point +1 +0`, `position 1 -2 3` and `(1 2 3)` each read as
|
|
56
|
+
* several values rather than one arithmetic expression. */
|
|
57
|
+
private startsValue;
|
|
58
|
+
/** As `startsValue`, but `name {` is a custom shape invocation rather than the
|
|
59
|
+
* next component of the list being read. */
|
|
60
|
+
private startsComponent;
|
|
33
61
|
private isStartOfNewValue;
|
|
34
|
-
private
|
|
62
|
+
private parsePathValue;
|
|
35
63
|
private parsePath;
|
|
36
64
|
private parseNode;
|
|
37
65
|
parse(): SceneNode[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/shapescript/parser.ts"],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AAO,CAAC,YAAY;IA8BpB;;;iFAG6E;IAC7E,OAAO,CAAC,aAAa;IAUrB;;gEAE4D;IAC5D,OAAO,CAAC,WAAW;IAKnB;iDAC6C;IAC7C,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,SAAS;IAiMjB,OAAO,CAAC,SAAS;IA2JjB,KAAK,IAAI,SAAS,EAAE;CAarB;AAGD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,CAmB5D"}
|
|
@@ -11,15 +11,21 @@ export interface ConversionOptions {
|
|
|
11
11
|
/** Hard ceiling on the vertices one script may allocate in total. See
|
|
12
12
|
* `DEFAULT_MAX_VERTICES`. */
|
|
13
13
|
maxVertices?: number;
|
|
14
|
+
/** Hard ceiling on the wall-clock time one conversion may spend. See
|
|
15
|
+
* `DEFAULT_MAX_DURATION_MS`. */
|
|
16
|
+
maxDurationMs?: number;
|
|
17
|
+
/** Seed for `rnd` / `rand()`. Defaults to `DEFAULT_RANDOM_SEED`, which is
|
|
18
|
+
* what keeps server validation and browser rendering on the same branch. */
|
|
19
|
+
randomSeed?: number;
|
|
14
20
|
}
|
|
15
|
-
export declare const DEFAULT_MAX_NODES =
|
|
21
|
+
export declare const DEFAULT_MAX_NODES = 100000;
|
|
16
22
|
export declare const DEFAULT_MAX_LOOP_ITERATIONS = 100000;
|
|
17
23
|
export declare const MIN_DETAIL = 3;
|
|
18
24
|
export declare const MAX_DETAIL = 256;
|
|
19
|
-
export declare const DEFAULT_MAX_VERTICES =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
25
|
+
export declare const DEFAULT_MAX_VERTICES = 5000000;
|
|
26
|
+
export declare const DEFAULT_MAX_DURATION_MS = 30000;
|
|
27
|
+
/** Distinguishes complexity refusals from syntax and geometry errors in the
|
|
28
|
+
* tool's diagnostic return value. */
|
|
23
29
|
export declare class ShapeScriptLimitError extends Error {
|
|
24
30
|
constructor(message: string);
|
|
25
31
|
}
|
|
@@ -27,17 +33,21 @@ export declare class Converter {
|
|
|
27
33
|
private options;
|
|
28
34
|
private evaluator;
|
|
29
35
|
private symbols;
|
|
36
|
+
private pathCommandCount;
|
|
30
37
|
private detailLevel;
|
|
31
38
|
/** Objects produced so far, checked against `maxNodes` on every node. */
|
|
32
39
|
private nodeCount;
|
|
33
40
|
/** Vertices allocated so far, checked against `maxVertices` on every mesh. */
|
|
34
41
|
private vertexCount;
|
|
42
|
+
/** When this conversion began, checked against `maxDurationMs` on every node. */
|
|
43
|
+
private readonly startedAt;
|
|
35
44
|
private transformStack;
|
|
36
45
|
constructor(options?: ConversionOptions);
|
|
37
46
|
convert(nodes: SceneNode[]): THREE.Group;
|
|
38
47
|
private get maxNodes();
|
|
39
48
|
private get maxLoopIterations();
|
|
40
49
|
private get maxVertices();
|
|
50
|
+
private get maxDurationMs();
|
|
41
51
|
/** Charge an ESTIMATE before the allocation happens.
|
|
42
52
|
*
|
|
43
53
|
* `makeMesh` charges what a geometry actually holds, which is too late for a
|
|
@@ -84,7 +94,16 @@ export declare class Converter {
|
|
|
84
94
|
* the loop is five too many. */
|
|
85
95
|
private addChildren;
|
|
86
96
|
private convertBlock;
|
|
97
|
+
private finishMesh;
|
|
87
98
|
private convertShape;
|
|
99
|
+
/** A solid whose extent is zero in any dimension draws nothing.
|
|
100
|
+
*
|
|
101
|
+
* `sphere { size 0 }` built a mesh with an empty bounding box, and
|
|
102
|
+
* validation reported success over a viewport with no visible model —
|
|
103
|
+
* the same blank result the diagnostics exist to replace. Planar
|
|
104
|
+
* primitives (`square`, `circle`, `polygon`) are exempt: they are flat by
|
|
105
|
+
* definition and fall back to a unit size of their own. */
|
|
106
|
+
private requireExtent;
|
|
88
107
|
private createGeometry;
|
|
89
108
|
private materialColor;
|
|
90
109
|
private createMaterial;
|
|
@@ -105,18 +124,44 @@ export declare class Converter {
|
|
|
105
124
|
private handleOrientationCommand;
|
|
106
125
|
private handleTranslateCommand;
|
|
107
126
|
private handleScaleCommand;
|
|
127
|
+
/** Refuse a contour that encloses nothing.
|
|
128
|
+
*
|
|
129
|
+
* `ShapeGeometry` over a single `point` triangulates to zero triangles, and
|
|
130
|
+
* `ExtrudeGeometry` over collinear points sweeps a ribbon with no volume —
|
|
131
|
+
* both used to pass validation as a successful visualization and then
|
|
132
|
+
* present an empty viewport, which is worse than a diagnostic naming the
|
|
133
|
+
* path. Sampled at the same resolution the geometry will use, so a curve
|
|
134
|
+
* that only looks flat at low detail is not rejected. */
|
|
135
|
+
private requireEnclosedArea;
|
|
108
136
|
private convertExtrude;
|
|
109
137
|
private buildPath;
|
|
110
138
|
private convertLathe;
|
|
139
|
+
/** A lathe profile is only a solid once it is SAMPLED.
|
|
140
|
+
*
|
|
141
|
+
* `getPoints` interpolates the curves, so a control point that overflowed
|
|
142
|
+
* reaches `LatheGeometry` as `NaN` however finite the commands looked, and a
|
|
143
|
+
* profile lying entirely on the axis of rotation (every `x` at 0) sweeps
|
|
144
|
+
* nothing at all — both validated clean and drew an empty viewport. */
|
|
145
|
+
private requireLatheProfile;
|
|
111
146
|
private buildLathe;
|
|
112
|
-
|
|
147
|
+
/** Build `children` into a throwaway group at the block's own origin and hand
|
|
148
|
+
* back every mesh in it, world matrices already resolved. The group stays
|
|
149
|
+
* owned by the caller, which disposes it. */
|
|
150
|
+
private buildOperands;
|
|
151
|
+
private buildFromChildren;
|
|
113
152
|
private convertLoft;
|
|
153
|
+
private planarShape;
|
|
114
154
|
private convertFill;
|
|
115
155
|
private convertHull;
|
|
116
156
|
private evaluateNumber;
|
|
117
157
|
private evaluateVector3;
|
|
118
158
|
private evaluateTranslateVector;
|
|
119
159
|
private evaluateColor;
|
|
160
|
+
/** Colour channels get the same treatment as sizes and translations.
|
|
161
|
+
* `new THREE.Color(Infinity, …)` throws nothing — it serialises as
|
|
162
|
+
* `[null, null, null]`, so validation reported success and the browser was
|
|
163
|
+
* handed a material it cannot draw. */
|
|
164
|
+
private requireFiniteColor;
|
|
120
165
|
private evaluateVector3OrColor;
|
|
121
166
|
private valuesEqual;
|
|
122
167
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toThreeJS.d.ts","sourceRoot":"","sources":["../../src/shapescript/toThreeJS.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"toThreeJS.d.ts","sourceRoot":"","sources":["../../src/shapescript/toThreeJS.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,SAAS,EAyBV,MAAM,SAAS,CAAC;AAIjB,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;+BAC2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;yCACqC;IACrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;kCAC8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;qCACiC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;iFAC6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAaD,eAAO,MAAM,iBAAiB,SAAU,CAAC;AACzC,eAAO,MAAM,2BAA2B,SAAU,CAAC;AASnD,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,UAAU,MAAM,CAAC;AAU9B,eAAO,MAAM,oBAAoB,UAAY,CAAC;AAe9C,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAkB9C;sCACsC;AACtC,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AASD,qBAAa,SAAS;IACpB,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,WAA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AkB/B,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,kBAAkB;IAO1B;;;;;;;8DAO0D;IAC1D,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,cAAc;IAqCtB,OAAO,CAAC,SAAS;IAsIjB,OAAO,CAAC,YAAY;IAMpB;;;;;4EAKwE;IACxE,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,UAAU;IAgDlB;;kDAE8C;IAC9C,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,WAAW;IA4BnB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,aAAa;IAQrB;;;4CAGwC;IACxC,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,sBAAsB;IAiC9B,OAAO,CAAC,WAAW;CAWpB;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,GAAE,iBAAsB,GAAG,KAAK,CAAC,KAAK,CAG7F"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
export type Vector3 = [number, number, number];
|
|
2
2
|
export type Color = [number, number, number];
|
|
3
|
-
export type Expression = NumberLiteral | IdentifierExpr | BinaryExpr | UnaryExpr | FunctionCall | MemberAccess | SubscriptExpr | TupleExpr;
|
|
3
|
+
export type Expression = NumberLiteral | StringLiteral | IdentifierExpr | BinaryExpr | UnaryExpr | FunctionCall | MemberAccess | SubscriptExpr | TupleExpr;
|
|
4
4
|
export interface NumberLiteral {
|
|
5
5
|
type: "number";
|
|
6
6
|
value: number;
|
|
7
7
|
}
|
|
8
|
+
export interface StringLiteral {
|
|
9
|
+
type: "string";
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
8
12
|
export interface IdentifierExpr {
|
|
9
13
|
type: "identifier";
|
|
10
14
|
name: string;
|
|
@@ -53,6 +57,7 @@ export interface ShapeProperties {
|
|
|
53
57
|
size?: Vector3 | Expression;
|
|
54
58
|
color?: Color | Expression;
|
|
55
59
|
opacity?: number | Expression;
|
|
60
|
+
sides?: number | Expression;
|
|
56
61
|
radiusTop?: number | Expression;
|
|
57
62
|
radiusBottom?: number | Expression;
|
|
58
63
|
height?: number | Expression;
|
|
@@ -180,7 +185,7 @@ export interface PathNode {
|
|
|
180
185
|
type: "path";
|
|
181
186
|
commands: PathCommand[];
|
|
182
187
|
}
|
|
183
|
-
export type PathCommand = PointCommand | CurveCommand | RotateCommand | TranslateCommand | DetailPathCommand | ForLoopPathCommand;
|
|
188
|
+
export type PathCommand = DefineNode | PointCommand | CurveCommand | RotateCommand | TranslateCommand | DetailPathCommand | ForLoopPathCommand;
|
|
184
189
|
export interface PointCommand {
|
|
185
190
|
type: "point";
|
|
186
191
|
x: number | Expression;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shapescript/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAG7C,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shapescript/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,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a;IACrB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;IAGf,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IAGjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,aAAa,kBAAkB;IAC/B,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,GAAG,QAAQ;IAGX,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;IAGf,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,qBAAa,UAAW,SAAQ,KAAK;IAG1B,IAAI,CAAC,EAAE,MAAM;IACb,MAAM,CAAC,EAAE,MAAM;gBAFtB,OAAO,EAAE,MAAM,EACR,IAAI,CAAC,EAAE,MAAM,YAAA,EACb,MAAM,CAAC,EAAE,MAAM,YAAA;CAKzB"}
|
package/dist/style.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.block{display:block}.flex{display:flex}.grid{display:grid}.inline{display:inline}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.border{border-style:var(--tw-border-style);border-width:1px}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}.present3d-container[data-v-c9f830ea]{color:#fff;background:#1a1a1a;flex-direction:column;width:100%;height:100%;display:flex}.header[data-v-c9f830ea]{background:#2a2a2a;border-bottom:1px solid #444;justify-content:space-between;align-items:center;padding:1rem;display:flex}.header h1[data-v-c9f830ea]{margin:0;font-size:1.5rem;font-weight:600}.controls[data-v-c9f830ea]{gap:.5rem;display:flex}.control-btn[data-v-c9f830ea]{color:#fff;cursor:pointer;background:#3a3a3a;border:1px solid #555;border-radius:4px;align-items:center;gap:.25rem;padding:.5rem 1rem;font-size:.9rem;transition:background .2s;display:flex}.control-btn[data-v-c9f830ea]:hover{background:#4a4a4a}.control-btn .material-icons[data-v-c9f830ea]{font-size:1.2rem}.viewport[data-v-c9f830ea]{flex:1;min-height:0;position:relative}.error[data-v-c9f830ea]{color:#f66;background:#ff000020;border-bottom:1px solid #ff000040;padding:1rem;font-family:monospace}.script-source[data-v-c9f830ea]{background:#00000040;border-top:1px solid #444;padding:.5rem;font-family:monospace;font-size:.85rem}.script-source summary[data-v-c9f830ea]{cursor:pointer;-webkit-user-select:none;user-select:none;background:#2a2a2a;border-radius:4px;padding:.5rem}.script-source[open] summary[data-v-c9f830ea]{margin-bottom:.5rem}.script-source summary[data-v-c9f830ea]:hover{background:#3a3a3a}.script-editor[data-v-c9f830ea]{color:#aaa;resize:vertical;background:#1a1a1a;border:1px solid #444;border-radius:4px;width:100%;min-height:150px;margin-bottom:.5rem;padding:1rem;font-family:Courier New,monospace;font-size:.9rem}.script-editor[data-v-c9f830ea]:focus{background:#222;border-color:#666;outline:none}.apply-btn[data-v-c9f830ea]{color:#fff;cursor:pointer;background:#4caf50;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.9rem;transition:background .2s}.apply-btn[data-v-c9f830ea]:hover{background:#45a049}.apply-btn[data-v-c9f830ea]:active{background:#3d8b40}.apply-btn[data-v-c9f830ea]:disabled{color:#666;cursor:not-allowed;opacity:.6;background:#ccc}.apply-btn[data-v-c9f830ea]:disabled:hover{background:#ccc}.preview-container[data-v-3df26806]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);border-radius:8px;width:100%;height:100%;min-height:150px;position:relative;overflow:hidden}.preview-viewport[data-v-3df26806]{width:100%;height:100%}.preview-title[data-v-3df26806]{color:#fff;text-align:center;white-space:nowrap;text-overflow:ellipsis;background:#000000b3;padding:.5rem;font-size:.75rem;font-weight:500;position:absolute;bottom:0;left:0;right:0;overflow:hidden}
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.block{display:block}.flex{display:flex}.grid{display:grid}.inline{display:inline}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.border{border-style:var(--tw-border-style);border-width:1px}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}.present3d-container[data-v-4e16e031]{color:#fff;background:#1a1a1a;flex-direction:column;width:100%;height:100%;display:flex}.header[data-v-4e16e031]{background:#2a2a2a;border-bottom:1px solid #444;justify-content:space-between;align-items:center;padding:1rem;display:flex}.header h1[data-v-4e16e031]{margin:0;font-size:1.5rem;font-weight:600}.controls[data-v-4e16e031]{gap:.5rem;display:flex}.control-btn[data-v-4e16e031]{color:#fff;cursor:pointer;background:#3a3a3a;border:1px solid #555;border-radius:4px;align-items:center;gap:.25rem;padding:.5rem 1rem;font-size:.9rem;transition:background .2s;display:flex}.control-btn[data-v-4e16e031]:hover{background:#4a4a4a}.control-btn .material-icons[data-v-4e16e031]{font-size:1.2rem}.viewport[data-v-4e16e031]{flex:1;min-height:0;position:relative}.error[data-v-4e16e031]{color:#f66;background:#ff000020;border-bottom:1px solid #ff000040;padding:1rem;font-family:monospace}.script-source[data-v-4e16e031]{background:#00000040;border-top:1px solid #444;padding:.5rem;font-family:monospace;font-size:.85rem}.script-source summary[data-v-4e16e031]{cursor:pointer;-webkit-user-select:none;user-select:none;background:#2a2a2a;border-radius:4px;padding:.5rem}.script-source[open] summary[data-v-4e16e031]{margin-bottom:.5rem}.script-source summary[data-v-4e16e031]:hover{background:#3a3a3a}.script-editor[data-v-4e16e031]{color:#aaa;resize:vertical;background:#1a1a1a;border:1px solid #444;border-radius:4px;width:100%;min-height:150px;margin-bottom:.5rem;padding:1rem;font-family:Courier New,monospace;font-size:.9rem}.script-editor[data-v-4e16e031]:focus{background:#222;border-color:#666;outline:none}.apply-btn[data-v-4e16e031]{color:#fff;cursor:pointer;background:#4caf50;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.9rem;transition:background .2s}.apply-btn[data-v-4e16e031]:hover{background:#45a049}.apply-btn[data-v-4e16e031]:active{background:#3d8b40}.apply-btn[data-v-4e16e031]:disabled{color:#666;cursor:not-allowed;opacity:.6;background:#ccc}.apply-btn[data-v-4e16e031]:disabled:hover{background:#ccc}.preview-container[data-v-3df26806]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);border-radius:8px;width:100%;height:100%;min-height:150px;position:relative;overflow:hidden}.preview-viewport[data-v-3df26806]{width:100%;height:100%}.preview-title[data-v-3df26806]{color:#fff;text-align:center;white-space:nowrap;text-overflow:ellipsis;background:#000000b3;padding:.5rem;font-size:.75rem;font-weight:500;position:absolute;bottom:0;left:0;right:0;overflow:hidden}
|
|
3
3
|
/*$vite$:1*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.vue.d.ts","sourceRoot":"","sources":["../../src/vue/View.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"View.vue.d.ts","sourceRoot":"","sources":["../../src/vue/View.vue"],"names":[],"mappings":"AAklBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAuB5D,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;CACpD,CAAC;AAkhBF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ import type { ToolPlugin } from "gui-chat-protocol/vue";
|
|
|
3
3
|
import type { PresentShapeScriptData, PresentShapeScriptArgs } from "../core/types";
|
|
4
4
|
import View from "./View.vue";
|
|
5
5
|
import Preview from "./Preview.vue";
|
|
6
|
-
export declare const SYSTEM_PROMPT = "Use the presentShapeScript tool to create interactive 3D visualizations when the user requests:\n- 3D models or shapes\n- Mathematical visualizations (surfaces, functions, geometric patterns)\n- Molecular or atomic structures\n- Data visualization in 3D (scatter plots, surface plots)\n- Architectural layouts\n- Game boards or 3D game states\n- Any spatial or geometric concepts\n\n## ShapeScript
|
|
6
|
+
export declare const SYSTEM_PROMPT = "Use the presentShapeScript tool to create interactive 3D visualizations when the user requests:\n- 3D models or shapes\n- Mathematical visualizations (surfaces, functions, geometric patterns)\n- Molecular or atomic structures\n- Data visualization in 3D (scatter plots, surface plots)\n- Architectural layouts\n- Game boards or 3D game states\n- Any spatial or geometric concepts\n\n## Supported ShapeScript Features:\n\n### Variables & Expressions:\n- Define variables: define radius 2, define spacing 1.5\n- Use expressions: position (i * 2) 0 0, size (radius * 1.5)\n- Math operators: +, -, *, /, % with proper precedence\n- Parentheses for grouping: (2 + 3) * 4\n\n### Control Flow:\n\nFor loops with variables (use loop variable in calculations):\nfor i in 1 to 5 {\n cube { position (i * 2 - 6) 0 0 size 1 }\n}\n\nFor loops with step:\nfor i in 0 to 10 step 2 {\n sphere { position 0 i 0 }\n}\n\nIf/else conditionals:\nif x > 0 {\n sphere\n} else {\n cube\n}\n\nSwitch statements for multiple cases\n\n### Built-in Functions:\n- Math: round, floor, ceil, abs, sign, sqrt, pow, min, max\n- Trig: sin, cos, tan, asin, acos, atan, atan2 (radians!)\n- Vector: dot, cross, length, normalize, sum\n\nCRITICAL: Function calls require NO space between name and (\n- sin(x) \u2713 correct\n- sin (x) \u2717 wrong - this is NOT a function call!\n\n### Best Practices:\n1. Use variables for repeated values\n2. Use loop variables (i) for positioning and calculations\n3. Use trig functions for circular/spiral patterns\n4. Use conditionals for parametric designs\n5. Keep code readable with meaningful variable names\n\n### Common Patterns:\n\nLinear arrangement:\nfor i in 1 to 5 {\n cube { position (i * 2) 0 0 }\n}\n\nCircular pattern:\ndefine count 12\nfor i in 1 to count {\n define angle ((i / count) * 6.283)\n cube { position (cos(angle) * 3) 0 (sin(angle) * 3) }\n}\n\nParametric surface:\nfor x in -5 to 5 {\n for z in -5 to 5 {\n define y (sin(x * 0.5) * cos(z * 0.5))\n cube { position (x * 0.3) y (z * 0.3) size 0.2 }\n }\n}\n\n### Primitives & CSG:\nShapes: cube, sphere, cylinder, cone, torus\nCSG: union, difference, intersection, xor, stencil\nProperties: position, rotation, size, color, opacity\n\nBuilders: extrude, fill, lathe, loft, hull. Example: loft { square translate 0 0 2 circle }.\nStencil preserves the first shape's volume and paints the intersecting surface.\nConstants: pi, tau, true, false. Tuple/string access: values[0], vector.x, value.count.\nPolygon supports sides (3\u2013256). String literals and join/trim are supported.\nUse the tool schema for exact syntax and builder limits. This is a modeling subset of upstream ShapeScript;\nimports, textures, text/fonts and general user-defined functions are not supported.\nIf presentShapeScript returns an error diagnostic, correct the script and retry; no visualization was created.\n\nKeep visualizations clear, well-organized, and use expressions and control flow.";
|
|
7
7
|
export declare const plugin: ToolPlugin<PresentShapeScriptData, unknown, PresentShapeScriptArgs>;
|
|
8
|
-
export type { PresentShapeScriptData, PresentShapeScriptArgs, PresentShapeScriptResult, PresentShapeScriptRenderedResult } from "../core/types";
|
|
8
|
+
export type { PresentShapeScriptData, PresentShapeScriptArgs, PresentShapeScriptResult, PresentShapeScriptRenderedResult, PresentShapeScriptErrorResult, PresentShapeScriptExecutionResult, ShapeScriptDiagnostic, } from "../core/types";
|
|
9
9
|
export { TOOL_NAME, TOOL_DEFINITION } from "../core/definition";
|
|
10
10
|
export { executePresentShapeScript, pluginCore } from "../core/plugin";
|
|
11
|
+
export { isShapeScriptDispatchArgs, readLoadShapeResult, readSaveShapeResult } from "../core/contract";
|
|
12
|
+
export type { ShapeScriptDispatchArgs } from "../core/contract";
|
|
11
13
|
export { samples } from "../core/samples";
|
|
12
14
|
export { View, Preview };
|
|
13
15
|
export { parseShapeScript } from "../shapescript/parser";
|
package/dist/vue/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAIpF,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vue/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAIpF,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,eAAO,MAAM,aAAa,i7FAyFuD,CAAC;AAElF,eAAO,MAAM,MAAM,EAAE,UAAU,CAAC,sBAAsB,EAAE,OAAO,EAAE,sBAAsB,CAMtF,CAAC;AAEF,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,mBAA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