@mulmoclaude/shapescript-plugin 2.3.0 → 2.4.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.
@@ -3,7 +3,7 @@ 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## 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 {\n position (i * 2 - 6) 0 0\n size 1\n }\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\nCalls: C-like max(0 (j - 1)) with NO space before the parenthesis, or bare max 0 (j - 1) / sqrt 9 as upstream.\nSeparate arguments with spaces. Commas work here but not in the upstream app.\nCustom functions return a value (define hyp(a b) { sqrt(a * a + b * b) }) or the shapes they build (define face(d) { polygon { \u2026 } }).\nOne statement per line; the upstream app rejects two statements on one line.\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 {\n position (x * 0.3) y (z * 0.3)\n size 0.2\n }\n }\n}\n\n### Primitives & CSG:\nShapes: cube, sphere, icosphere, cylinder, cone, torus, circle, square, roundrect, polygon\nCSG: union, difference, intersection, xor, stencil\nProperties: position, orientation (alias rotation), size, detail, smoothing, name\nMaterials: color (1\u20134 values, hex #FF0000, names like red/orange/gray, hsb(...)), opacity, metallicity, roughness, glow,\nmaterial NAME (from define NAME material { \u2026 }); background R G B sets the scene colour.\nScope: shape blocks, groups, builders and custom blocks reset transforms/materials at their closing brace;\nfor / if / switch bodies do not (a translate in a loop carries on after it).\n\n### Units (upstream ShapeScript conventions):\n- size = DIAMETER for sphere/cylinder/cone/circle/polygon/torus, edge length for cube/square. A bare sphere fits the unit cube.\n- orientation / rotate = HALF-TURNS as roll yaw pitch (Z, Y, X): 0.5 = 90\u00B0. A lone value is a roll. Trig functions still use radians.\n- Path point/curve coordinates are absolute; curve is a B\u00E9zier control point; rotate/translate/scale inside a path move the frame.\n- A path can carry its own position/orientation/size; give loft/extrude path children (not fill{}), as the upstream app requires.\n\nBuilders: extrude, fill, lathe, loft, hull. Example:\nloft {\n square\n translate 0 0 2\n circle\n}\nStencil preserves the first shape's volume and paints the intersecting surface.\nConstants: pi, true, false (avoid tau, upstream lacks it; write 2 * pi). Tuple/string access: values[0], values[-1], vector.x, value.count.\nRanges are values (define r 1 to 5 step 2; for i in r; if 3 in r). A bare path draws as a line; fill/extrude it for a surface.\nPolygon supports sides (3\u2013256). String literals and join/split/trim are supported. print records output for you.\nUse the tool schema for exact syntax and builder limits. This is a modeling subset of upstream ShapeScript;\nimports, text/fonts, svgpath and object values are refused by name;\nminkowski { a b } sums shapes, inset(mesh d) offsets a mesh value's faces (together they round edges),\nextrude { section along path } sweeps a section, and an open extrude path makes a wall (close it for a solid);\nshapes are values (define ico icosphere { detail 0 }; ico.polygons, .bounds, .volume), for/if work as expressions,\nfunctions may build shapes, and mesh { polygon { point \u2026 } } builds a mesh from explicit faces;\ntextures, cameras and lights are accepted but not drawn (the result reports them).\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.";
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 {\n position (i * 2 - 6) 0 0\n size 1\n }\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\nCalls: C-like max(0 (j - 1)) with NO space before the parenthesis, or bare max 0 (j - 1) / sqrt 9 as upstream.\nSeparate arguments with spaces. Commas work here but not in the upstream app.\nCustom functions return a value (define hyp(a b) { sqrt(a * a + b * b) }) or the shapes they build (define face(d) { polygon { \u2026 } }).\nOne statement per line; the upstream app rejects two statements on one line.\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 {\n position (x * 0.3) y (z * 0.3)\n size 0.2\n }\n }\n}\n\n### Primitives & CSG:\nShapes: cube, sphere, icosphere, cylinder, cone, torus, circle, square, roundrect, polygon\nCSG: union, difference, intersection, xor, stencil\nProperties: position, orientation (alias rotation), size, detail, smoothing, name\nMaterials: color (1\u20134 values, hex #FF0000, names like red/orange/gray, hsb(...)), opacity, metallicity, roughness, glow,\nmaterial NAME (from define NAME material { \u2026 }); background R G B sets the scene colour.\nScope: shape blocks, groups, builders and custom blocks reset transforms/materials at their closing brace;\nfor / if / switch bodies do not (a translate in a loop carries on after it).\n\n### Units (upstream ShapeScript conventions):\n- size = DIAMETER for sphere/cylinder/cone/circle/polygon/torus, edge length for cube/square. A bare sphere fits the unit cube.\n- orientation / rotate = HALF-TURNS as roll yaw pitch (Z, Y, X): 0.5 = 90\u00B0. A lone value is a roll. Trig functions still use radians.\n- Path point/curve coordinates are absolute; curve is a B\u00E9zier control point; rotate/translate/scale inside a path move the frame.\n- A path can carry its own position/orientation/size; give loft/extrude path children (not fill{}), as the upstream app requires.\n\nBuilders: extrude, fill, lathe, loft, hull. Example:\nloft {\n square\n translate 0 0 2\n circle\n}\nStencil preserves the first shape's volume and paints the intersecting surface.\nConstants: pi, true, false (avoid tau, upstream lacks it; write 2 * pi). Tuple/string access: values[0], values[-1], vector.x, value.count.\nRanges are values (define r 1 to 5 step 2; for i in r; if 3 in r). A bare path draws as a line; fill/extrude it for a surface.\nPolygon supports sides (3\u2013256). String literals and join/split/trim are supported. print records output for you.\nUse the tool schema for exact syntax and builder limits. This is a modeling subset of upstream ShapeScript;\nimports, svgpath and object values are refused by name;\ntext \"Hello\" makes glyph outlines (built-in font; font is ignored) from x 0 on baseline y 0, one unit per line \u2014 fill or\nextrude it for faces/solids, text { size 0.3 \"Two\" \"lines\" } for size and lines, t.bounds.width to centre it;\nminkowski { a b } sums shapes, inset(mesh d) offsets a mesh value's faces (together they round edges),\nextrude { section along path } sweeps a section, and an open extrude path makes a wall (close it for a solid);\nshapes are values (define ico icosphere { detail 0 }; ico.polygons, .bounds, .volume), for/if work as expressions,\nfunctions may build shapes, and mesh { polygon { point \u2026 } } builds a mesh from explicit faces;\ntextures, cameras and lights are accepted but not drawn (the result reports them).\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
8
  export type { PresentShapeScriptData, PresentShapeScriptArgs, PresentShapeScriptResult, PresentShapeScriptRenderedResult, PresentShapeScriptErrorResult, PresentShapeScriptExecutionResult, ShapeScriptDiagnostic, } from "../core/types";
9
9
  export { TOOL_NAME, TOOL_DEFINITION } from "../core/definition";
@@ -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,mgKAqHuD,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,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvG,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAGzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;;;;AAEtD,wBAA0B"}
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,2uKAuHuD,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,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvG,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAGzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;;;;AAEtD,wBAA0B"}
package/dist/vue.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./samples-D2_jOmoh.cjs"),t=require("./toThreeJS-Cs0UJm82.cjs");let n=require("vue"),r=require("gui-chat-protocol/vue");function i(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&e!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e!==null&&e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function a(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(typeof Float16Array<`u`&&r instanceof Float16Array)s=e.HALF_FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let n=a[t],r=a[e];r.start<=n.start+n.count+1?n.count=Math.max(n.count,r.start+r.count-n.start):(++t,a[t]=r)}a.length=t+1;for(let t=0,n=a.length;t<n;t++){let n=a[t];e.bufferSubData(r,n.start*i.BYTES_PER_ELEMENT,i,n.start,n.count)}n.clearUpdateRanges()}n.onUploadCallback()}function i(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)}function a(n){n.isInterleavedBufferAttribute&&(n=n.data);let r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))}function o(e,i){if(e.isInterleavedBufferAttribute&&(e=e.data),e.isGLBufferAttribute){let n=t.get(e);(!n||n.version<e.version)&&t.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version});return}let a=t.get(e);if(a===void 0)t.set(e,n(e,i));else if(a.version<e.version){if(a.size!==e.array.byteLength)throw Error(`THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.`);r(a.buffer,e,i),a.version=e.version}}return{get:i,remove:a,update:o}}var o={alphahash_fragment:`#ifdef USE_ALPHAHASH
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./samples-BrJ4z8v-.cjs"),t=require("./toThreeJS-CaZGJjfO.cjs");let n=require("vue"),r=require("gui-chat-protocol/vue");function i(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&e!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e!==null&&e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function a(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(typeof Float16Array<`u`&&r instanceof Float16Array)s=e.HALF_FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let n=a[t],r=a[e];r.start<=n.start+n.count+1?n.count=Math.max(n.count,r.start+r.count-n.start):(++t,a[t]=r)}a.length=t+1;for(let t=0,n=a.length;t<n;t++){let n=a[t];e.bufferSubData(r,n.start*i.BYTES_PER_ELEMENT,i,n.start,n.count)}n.clearUpdateRanges()}n.onUploadCallback()}function i(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)}function a(n){n.isInterleavedBufferAttribute&&(n=n.data);let r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))}function o(e,i){if(e.isInterleavedBufferAttribute&&(e=e.data),e.isGLBufferAttribute){let n=t.get(e);(!n||n.version<e.version)&&t.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version});return}let a=t.get(e);if(a===void 0)t.set(e,n(e,i));else if(a.version<e.version){if(a.size!==e.array.byteLength)throw Error(`THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.`);r(a.buffer,e,i),a.version=e.version}}return{get:i,remove:a,update:o}}var o={alphahash_fragment:`#ifdef USE_ALPHAHASH
2
2
  if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
3
3
  #endif`,alphahash_pars_fragment:`#ifdef USE_ALPHAHASH
4
4
  const float ALPHA_HASH_SCALE = 0.05;
@@ -4211,7 +4211,9 @@ Constants: pi, true, false (avoid tau, upstream lacks it; write 2 * pi). Tuple/s
4211
4211
  Ranges are values (define r 1 to 5 step 2; for i in r; if 3 in r). A bare path draws as a line; fill/extrude it for a surface.
4212
4212
  Polygon supports sides (3–256). String literals and join/split/trim are supported. print records output for you.
4213
4213
  Use the tool schema for exact syntax and builder limits. This is a modeling subset of upstream ShapeScript;
4214
- imports, text/fonts, svgpath and object values are refused by name;
4214
+ imports, svgpath and object values are refused by name;
4215
+ text "Hello" makes glyph outlines (built-in font; font is ignored) from x 0 on baseline y 0, one unit per line — fill or
4216
+ extrude it for faces/solids, text { size 0.3 "Two" "lines" } for size and lines, t.bounds.width to centre it;
4215
4217
  minkowski { a b } sums shapes, inset(mesh d) offsets a mesh value's faces (together they round edges),
4216
4218
  extrude { section along path } sweeps a section, and an open extrude path makes a wall (close it for a solid);
4217
4219
  shapes are values (define ico icosphere { detail 0 }; ico.polygons, .bounds, .volume), for/if work as expressions,
package/dist/vue.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as e, h as t, n, o as r, r as i, s as a, t as o, v as s, y as c } from "./samples-CT-c9o1S.js";
2
- import { $ as l, A as u, An as d, B as f, Bn as p, C as m, Cn as h, D as g, Dn as _, E as v, En as y, F as b, Fn as x, G as S, Gt as C, H as w, Hn as T, I as E, In as D, J as O, K as k, Kt as A, Ln as j, M, Mn as N, N as ee, Nn as te, O as P, On as ne, Pn as F, Q as re, R as ie, S as ae, Sn as I, T as oe, Tn as se, U as L, V as R, Vn as z, W as B, Wt as V, X as ce, Xt as le, Y as ue, Yt as de, Z as fe, Zt as pe, _ as H, _n as me, a as he, an as ge, at as _e, b as ve, bn as ye, cn as be, d as xe, dn as Se, et as Ce, f as we, fn as Te, g as U, h as Ee, hn as De, i as Oe, in as ke, it as Ae, j as je, jn as W, k as Me, kn as Ne, l as Pe, ln as G, lt as Fe, mt as Ie, nn as Le, nt as K, o as q, p as Re, pn as ze, pt as Be, q as Ve, qt as He, r as Ue, rn as We, rt as Ge, s as Ke, sn as qe, st as Je, tt as Ye, u as Xe, un as Ze, v as Qe, vn as $e, w as et, wn as tt, x as nt, xn as J, y as rt, yn as it, z as at } from "./toThreeJS-CKjSbEnA.js";
1
+ import { a as e, h as t, n, o as r, r as i, s as a, t as o, v as s, y as c } from "./samples-y59fsGq8.js";
2
+ import { $ as l, A as u, An as d, B as f, Bn as p, C as m, Cn as h, D as g, Dn as _, E as v, En as y, F as b, Fn as x, G as S, Gt as C, H as w, Hn as T, I as E, In as D, J as O, K as k, Kt as A, Ln as j, M, Mn as N, N as ee, Nn as te, O as P, On as ne, Pn as F, Q as re, R as ie, S as ae, Sn as I, T as oe, Tn as se, U as L, V as R, Vn as z, W as B, Wt as V, X as ce, Xt as le, Y as ue, Yt as de, Z as fe, Zt as pe, _ as H, _n as me, a as he, an as ge, at as _e, b as ve, bn as ye, cn as be, d as xe, dn as Se, et as Ce, f as we, fn as Te, g as U, h as Ee, hn as De, i as Oe, in as ke, it as Ae, j as je, jn as W, k as Me, kn as Ne, l as Pe, ln as G, lt as Fe, mt as Ie, nn as Le, nt as K, o as q, p as Re, pn as ze, pt as Be, q as Ve, qt as He, r as Ue, rn as We, rt as Ge, s as Ke, sn as qe, st as Je, tt as Ye, u as Xe, un as Ze, v as Qe, vn as $e, w as et, wn as tt, x as nt, xn as J, y as rt, yn as it, z as at } from "./toThreeJS-OGEAi4zV.js";
3
3
  import { computed as Y, createCommentVNode as ot, createElementBlock as st, createElementVNode as X, createTextVNode as ct, defineComponent as lt, nextTick as ut, onMounted as dt, onUnmounted as ft, openBlock as pt, ref as mt, toDisplayString as ht, unref as gt, vModelText as _t, watch as vt, withDirectives as yt } from "vue";
4
4
  import { createUseT as bt, useRuntime as xt } from "gui-chat-protocol/vue";
5
5
  //#region ../../../node_modules/three/build/three.module.js
@@ -6887,7 +6887,9 @@ Constants: pi, true, false (avoid tau, upstream lacks it; write 2 * pi). Tuple/s
6887
6887
  Ranges are values (define r 1 to 5 step 2; for i in r; if 3 in r). A bare path draws as a line; fill/extrude it for a surface.
6888
6888
  Polygon supports sides (3–256). String literals and join/split/trim are supported. print records output for you.
6889
6889
  Use the tool schema for exact syntax and builder limits. This is a modeling subset of upstream ShapeScript;
6890
- imports, text/fonts, svgpath and object values are refused by name;
6890
+ imports, svgpath and object values are refused by name;
6891
+ text "Hello" makes glyph outlines (built-in font; font is ignored) from x 0 on baseline y 0, one unit per line — fill or
6892
+ extrude it for faces/solids, text { size 0.3 "Two" "lines" } for size and lines, t.bounds.width to centre it;
6891
6893
  minkowski { a b } sums shapes, inset(mesh d) offsets a mesh value's faces (together they round edges),
6892
6894
  extrude { section along path } sweeps a section, and an open extrude path makes a wall (close it for a solid);
6893
6895
  shapes are values (define ico icosphere { detail 0 }; ico.polygons, .bounds, .volume), for/if work as expressions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mulmoclaude/shapescript-plugin",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "presentShapeScript \u2014 interactive 3D visualizations authored in the ShapeScript language (parser + Three.js renderer). Core (tool definition + execute) on `.`, Vue View/Preview on `./vue`.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",