@mulmoclaude/shapescript-plugin 2.6.0 → 2.7.1
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 +24 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/publish.d.ts +145 -0
- package/dist/core/publish.d.ts.map +1 -0
- package/dist/core-B3GMdzSM.cjs +1 -0
- package/dist/core-Bt3MvxL7.js +186 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +4 -4
- package/dist/export/tool.d.ts +7 -0
- package/dist/export/tool.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/thumbnail.d.ts +6 -0
- package/dist/render/thumbnail.d.ts.map +1 -0
- package/dist/render.cjs +5 -5
- package/dist/render.js +26 -2
- package/dist/{samples-C8zn1JOi.cjs → samples-BO-oAFPZ.cjs} +2 -2
- package/dist/{samples-BZSbBJmx.js → samples-CfppG9Bk.js} +5 -2
- package/dist/style.css +1 -1
- package/dist/toThreeJS-CDRtoJt7.cjs +24 -0
- package/dist/{toThreeJS-Bo3j0vOj.js → toThreeJS-MMc_OzvN.js} +1570 -1510
- package/dist/vue.cjs +255 -143
- package/dist/vue.js +1371 -1319
- package/package.json +6 -6
- package/dist/core-D7oM42QN.js +0 -53
- package/dist/core-DTcqM4wC.cjs +0 -1
- package/dist/toThreeJS-BBwttw4K.cjs +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mulmoclaude/shapescript-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "presentShapeScript — 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",
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
"test": "tsx --test test/test_*.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"three": "^0.
|
|
45
|
+
"three": "^0.186.0",
|
|
46
46
|
"three-bvh-csg": "^0.0.18",
|
|
47
|
-
"three-mesh-bvh": "0.9.
|
|
47
|
+
"three-mesh-bvh": "0.9.15"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@mulmoclaude/core": "^4.9.
|
|
50
|
+
"@mulmoclaude/core": "^4.9.2",
|
|
51
51
|
"gui-chat-protocol": "^2.0.0",
|
|
52
52
|
"puppeteer": "^25.0.0",
|
|
53
53
|
"vue": "^3.5.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@eslint/js": "^10.0.1",
|
|
57
|
-
"@mulmoclaude/core": "^4.9.
|
|
57
|
+
"@mulmoclaude/core": "^4.9.2",
|
|
58
58
|
"@tailwindcss/vite": "^4.3.3",
|
|
59
59
|
"@types/node": "^26.4.1",
|
|
60
|
-
"@types/three": "^0.
|
|
60
|
+
"@types/three": "^0.186.0",
|
|
61
61
|
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
62
62
|
"@typescript-eslint/parser": "^8.70.0",
|
|
63
63
|
"@vitejs/plugin-vue": "^6.0.8",
|
package/dist/core-D7oM42QN.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { _ as e, a as t, u as n } from "./samples-BZSbBJmx.js";
|
|
2
|
-
import { t as r } from "./toThreeJS-Bo3j0vOj.js";
|
|
3
|
-
//#region src/export/tool.ts
|
|
4
|
-
var i = "exportShapeScriptUsdz", a = r + 3e4, o = "Export a ShapeScript model to a USDZ file (Apple's AR / 3D format, openable with AR Quick Look on iPhone, iPad and Mac) and save it under artifacts/shapes/. Returns the saved path. Takes the same source as presentShapeScript: inline `script`, or `path` to a saved .shape file. USDZ units are metres, so a `size 1` cube becomes a one-metre object in AR — scale the model in the script if that is not what the user wants.", s = "Use exportShapeScriptUsdz when the user wants to take a 3D model out of the chat — to view it in AR, open it in a 3D app, or share the file. It saves a .usdz next to the model's .shape file and returns the path; tell the user where it is. The user can also press \"Download USDZ\" in the model's view themselves.", c = {
|
|
5
|
-
type: "object",
|
|
6
|
-
properties: {
|
|
7
|
-
script: {
|
|
8
|
-
type: "string",
|
|
9
|
-
description: "ShapeScript source to export. Provide either this or `path`, not both."
|
|
10
|
-
},
|
|
11
|
-
path: {
|
|
12
|
-
type: "string",
|
|
13
|
-
description: "Path to an existing .shape file to export (e.g. one presentShapeScript saved under artifacts/shapes/)."
|
|
14
|
-
},
|
|
15
|
-
title: {
|
|
16
|
-
type: "string",
|
|
17
|
-
description: "Name for the exported file; it is slugified into the filename. Defaults to the .shape file's own name when `path` is given."
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
required: []
|
|
21
|
-
};
|
|
22
|
-
function l(e) {
|
|
23
|
-
return typeof e == "string" && e.trim() !== "" ? e : void 0;
|
|
24
|
-
}
|
|
25
|
-
function u(e) {
|
|
26
|
-
return (e.split(/[\\/]/).pop() ?? e).replace(/\.shape$/i, "");
|
|
27
|
-
}
|
|
28
|
-
async function d(e, t) {
|
|
29
|
-
let r = l(t.script), i = l(t.path), a = l(t.title);
|
|
30
|
-
if (r && i) throw Error("Provide either `script` or `path`, not both");
|
|
31
|
-
if (r) return {
|
|
32
|
-
script: r,
|
|
33
|
-
title: a
|
|
34
|
-
};
|
|
35
|
-
if (!i) throw Error("Provide either `script` (inline source) or `path` (an existing .shape file)");
|
|
36
|
-
let o = n(e, i);
|
|
37
|
-
if (!o) throw Error("`path` must name a .shape file, without `.` / `..` segments");
|
|
38
|
-
if (!await o.files.exists(o.rel)) throw Error(`No ShapeScript exists at ${i}`);
|
|
39
|
-
return {
|
|
40
|
-
script: await o.files.read(o.rel),
|
|
41
|
-
title: a ?? u(i)
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
async function f(n, r) {
|
|
45
|
-
let { script: i, title: a } = await d(n, r), o = await t(i), { relPath: s, filePath: c } = e(a);
|
|
46
|
-
return await n.files.artifacts.write(s, o), {
|
|
47
|
-
message: `Saved USDZ to ${c} (${o.byteLength} bytes). Open it with AR Quick Look or any USD viewer.`,
|
|
48
|
-
filePath: c,
|
|
49
|
-
bytes: o.byteLength
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { a, i, s as n, f as o, c as r, o as t };
|
package/dist/core-DTcqM4wC.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./samples-C8zn1JOi.cjs"),t=require("./toThreeJS-BBwttw4K.cjs");var n=`exportShapeScriptUsdz`,r=t.t+3e4,i="Export a ShapeScript model to a USDZ file (Apple's AR / 3D format, openable with AR Quick Look on iPhone, iPad and Mac) and save it under artifacts/shapes/. Returns the saved path. Takes the same source as presentShapeScript: inline `script`, or `path` to a saved .shape file. USDZ units are metres, so a `size 1` cube becomes a one-metre object in AR — scale the model in the script if that is not what the user wants.",a=`Use exportShapeScriptUsdz when the user wants to take a 3D model out of the chat — to view it in AR, open it in a 3D app, or share the file. It saves a .usdz next to the model's .shape file and returns the path; tell the user where it is. The user can also press "Download USDZ" in the model's view themselves.`,o={type:`object`,properties:{script:{type:`string`,description:"ShapeScript source to export. Provide either this or `path`, not both."},path:{type:`string`,description:`Path to an existing .shape file to export (e.g. one presentShapeScript saved under artifacts/shapes/).`},title:{type:`string`,description:"Name for the exported file; it is slugified into the filename. Defaults to the .shape file's own name when `path` is given."}},required:[]};function s(e){return typeof e==`string`&&e.trim()!==``?e:void 0}function c(e){return(e.split(/[\\/]/).pop()??e).replace(/\.shape$/i,``)}async function l(t,n){let r=s(n.script),i=s(n.path),a=s(n.title);if(r&&i)throw Error("Provide either `script` or `path`, not both");if(r)return{script:r,title:a};if(!i)throw Error("Provide either `script` (inline source) or `path` (an existing .shape file)");let o=e.u(t,i);if(!o)throw Error("`path` must name a .shape file, without `.` / `..` segments");if(!await o.files.exists(o.rel))throw Error(`No ShapeScript exists at ${i}`);return{script:await o.files.read(o.rel),title:a??c(i)}}async function u(t,n){let{script:r,title:i}=await l(t,n),a=await e.a(r),{relPath:o,filePath:s}=e._(i);return await t.files.artifacts.write(o,a),{message:`Saved USDZ to ${s} (${a.byteLength} bytes). Open it with AR Quick Look or any USD viewer.`,filePath:s,bytes:a.byteLength}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|