@vcad/mcp 0.10.0-main.100 → 0.10.0-main.105
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 +1 -1
- package/index.mjs +239 -186
- package/package.json +3 -3
- package/vcad_kernel_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -6,4 +6,4 @@ vcad's MCP server as a self-contained bundle (server + BRep kernel WASM).
|
|
|
6
6
|
{ "mcpServers": { "vcad": { "command": "npx", "args": ["-y", "@vcad/mcp"] } } }
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Built from
|
|
9
|
+
Built from ae48039994dc8149dae73f8a5fbeb73dd9012575 at 2026-10-20T20:00:38.184Z. Source: https://github.com/ecto/vcad
|
package/index.mjs
CHANGED
|
@@ -30736,6 +30736,90 @@ var init_esm2 = __esm({
|
|
|
30736
30736
|
}
|
|
30737
30737
|
});
|
|
30738
30738
|
|
|
30739
|
+
// ../core/dist/stores/engine-command.js
|
|
30740
|
+
function applyCommand(engine, command) {
|
|
30741
|
+
if (typeof engine.apply !== "function")
|
|
30742
|
+
return applyLegacy(engine, command);
|
|
30743
|
+
const envelope = JSON.parse(engine.apply(JSON.stringify(command)));
|
|
30744
|
+
if (!envelope.ok)
|
|
30745
|
+
throw new DocCommandError(command, envelope.error);
|
|
30746
|
+
for (const w of envelope.result.warnings ?? [])
|
|
30747
|
+
console.warn(`[vcad] ${w}`);
|
|
30748
|
+
return envelope.result;
|
|
30749
|
+
}
|
|
30750
|
+
function applyToolCall(engine, tool, args) {
|
|
30751
|
+
if (typeof engine.apply_tool !== "function")
|
|
30752
|
+
return null;
|
|
30753
|
+
const envelope = JSON.parse(engine.apply_tool(tool, JSON.stringify(args)));
|
|
30754
|
+
if (envelope.ok) {
|
|
30755
|
+
for (const w of envelope.result.warnings ?? [])
|
|
30756
|
+
console.warn(`[vcad] ${w}`);
|
|
30757
|
+
}
|
|
30758
|
+
return envelope;
|
|
30759
|
+
}
|
|
30760
|
+
function applyLegacy(engine, c) {
|
|
30761
|
+
switch (c.type) {
|
|
30762
|
+
case "add_feature": {
|
|
30763
|
+
const r = engine.add_feature(JSON.stringify(c.feature));
|
|
30764
|
+
if (c.name && r.createdFeatureId) {
|
|
30765
|
+
return { ...engine.rename_feature(r.createdFeatureId, c.name), createdFeatureId: r.createdFeatureId };
|
|
30766
|
+
}
|
|
30767
|
+
return r;
|
|
30768
|
+
}
|
|
30769
|
+
case "delete_feature":
|
|
30770
|
+
return engine.delete_feature_by_id(c.id);
|
|
30771
|
+
case "set_translation":
|
|
30772
|
+
return engine.set_translation(c.id, ...c.offset);
|
|
30773
|
+
case "set_rotation":
|
|
30774
|
+
return engine.set_rotation(c.id, ...c.angles);
|
|
30775
|
+
case "set_scale":
|
|
30776
|
+
return engine.set_scale(c.id, ...c.factor);
|
|
30777
|
+
case "set_material":
|
|
30778
|
+
return engine.set_material(c.id, c.material);
|
|
30779
|
+
case "set_visible":
|
|
30780
|
+
return engine.set_visible(c.id, c.visible);
|
|
30781
|
+
case "rename":
|
|
30782
|
+
return engine.rename_feature(c.id, c.name);
|
|
30783
|
+
case "set_joint_state":
|
|
30784
|
+
return engine.set_joint_state(c.id, c.state);
|
|
30785
|
+
case "import_ir":
|
|
30786
|
+
return { consumedPartIds: [], ...engine.import_ir(JSON.stringify(c.document)) };
|
|
30787
|
+
case "set_param":
|
|
30788
|
+
return { consumedPartIds: [], ...engine.set_param(c.id, c.key, JSON.stringify(c.value)) };
|
|
30789
|
+
case "create_feature":
|
|
30790
|
+
return { consumedPartIds: [], ...engine.create_feature(c.kind, JSON.stringify(c.params ?? {})) };
|
|
30791
|
+
case "reorder": {
|
|
30792
|
+
const others = JSON.parse(engine.get_ordered_features_json()).filter((f) => f.id !== c.id);
|
|
30793
|
+
const before = c.index > 0 ? others[c.index - 1]?.id ?? "" : "";
|
|
30794
|
+
const after = others[c.index]?.id ?? "";
|
|
30795
|
+
const position = engine.compute_position_between(before, after);
|
|
30796
|
+
return { consumedPartIds: [], ...engine.move_feature(c.id, position) };
|
|
30797
|
+
}
|
|
30798
|
+
case "undo":
|
|
30799
|
+
return { consumedPartIds: [], ...engine.undo() };
|
|
30800
|
+
case "redo":
|
|
30801
|
+
return { consumedPartIds: [], ...engine.redo() };
|
|
30802
|
+
default:
|
|
30803
|
+
throw new Error(`[vcad] ${c.type} needs a kernel WASM with WasmDocumentEngine.apply`);
|
|
30804
|
+
}
|
|
30805
|
+
}
|
|
30806
|
+
var DocCommandError;
|
|
30807
|
+
var init_engine_command = __esm({
|
|
30808
|
+
"../core/dist/stores/engine-command.js"() {
|
|
30809
|
+
"use strict";
|
|
30810
|
+
DocCommandError = class extends Error {
|
|
30811
|
+
command;
|
|
30812
|
+
error;
|
|
30813
|
+
constructor(command, error2) {
|
|
30814
|
+
super(`${command.type}: ${error2.message}`);
|
|
30815
|
+
this.command = command;
|
|
30816
|
+
this.error = error2;
|
|
30817
|
+
this.name = "DocCommandError";
|
|
30818
|
+
}
|
|
30819
|
+
};
|
|
30820
|
+
}
|
|
30821
|
+
});
|
|
30822
|
+
|
|
30739
30823
|
// ../core/dist/sketch-constraint-persist.js
|
|
30740
30824
|
function pointAnchor(node, ref) {
|
|
30741
30825
|
const seg = ref.index;
|
|
@@ -31472,7 +31556,7 @@ function getOrCreateAnalysisStudiesFeature(state) {
|
|
|
31472
31556
|
_analysisStudiesFeatureId = existing.id;
|
|
31473
31557
|
return existing.id;
|
|
31474
31558
|
}
|
|
31475
|
-
const result = engine
|
|
31559
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "analysis-studies" });
|
|
31476
31560
|
if (result.createdFeatureId) {
|
|
31477
31561
|
_analysisStudiesFeatureId = result.createdFeatureId;
|
|
31478
31562
|
return result.createdFeatureId;
|
|
@@ -31490,7 +31574,7 @@ function getOrCreateSceneFeature(state) {
|
|
|
31490
31574
|
_sceneSettingsFeatureId = existing.id;
|
|
31491
31575
|
return existing.id;
|
|
31492
31576
|
}
|
|
31493
|
-
const result = engine
|
|
31577
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "scene-settings" });
|
|
31494
31578
|
if (result.createdFeatureId) {
|
|
31495
31579
|
_sceneSettingsFeatureId = result.createdFeatureId;
|
|
31496
31580
|
return result.createdFeatureId;
|
|
@@ -31508,7 +31592,7 @@ function getOrCreateDrawingFeature(state) {
|
|
|
31508
31592
|
_drawingSettingsFeatureId = existing.id;
|
|
31509
31593
|
return existing.id;
|
|
31510
31594
|
}
|
|
31511
|
-
const result = engine
|
|
31595
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "drawing-settings" });
|
|
31512
31596
|
if (result.createdFeatureId) {
|
|
31513
31597
|
_drawingSettingsFeatureId = result.createdFeatureId;
|
|
31514
31598
|
return result.createdFeatureId;
|
|
@@ -31526,7 +31610,7 @@ function getOrCreateConstraintsFeature(state) {
|
|
|
31526
31610
|
_constraintsFeatureId = existing.id;
|
|
31527
31611
|
return existing.id;
|
|
31528
31612
|
}
|
|
31529
|
-
const result = engine
|
|
31613
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "design-constraints" });
|
|
31530
31614
|
if (result.createdFeatureId) {
|
|
31531
31615
|
_constraintsFeatureId = result.createdFeatureId;
|
|
31532
31616
|
return result.createdFeatureId;
|
|
@@ -31551,7 +31635,7 @@ function getOrCreateSchematicFeature(state) {
|
|
|
31551
31635
|
_schematicFeatureId = existing.id;
|
|
31552
31636
|
return existing.id;
|
|
31553
31637
|
}
|
|
31554
|
-
const result = engine
|
|
31638
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "schematic" });
|
|
31555
31639
|
if (result.createdFeatureId) {
|
|
31556
31640
|
_schematicFeatureId = result.createdFeatureId;
|
|
31557
31641
|
return result.createdFeatureId;
|
|
@@ -31587,7 +31671,7 @@ function addPcbToDocument(get, set, pcbBoard, boardName2) {
|
|
|
31587
31671
|
board: crdtStr(JSON.stringify(pcbBoard)),
|
|
31588
31672
|
material: crdtStr("__pcb_fr4__")
|
|
31589
31673
|
};
|
|
31590
|
-
const result = engine
|
|
31674
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "pcb-board", params });
|
|
31591
31675
|
set({ ...applyLegacyResult(result), isDirty: true });
|
|
31592
31676
|
const pcbPart = result.parts.find((p) => p.kind === "pcb-board");
|
|
31593
31677
|
return pcbPart ? pcbPart.boardNodeId : 0;
|
|
@@ -31598,6 +31682,7 @@ var init_document_store = __esm({
|
|
|
31598
31682
|
"use strict";
|
|
31599
31683
|
init_esm2();
|
|
31600
31684
|
init_wasm_singleton2();
|
|
31685
|
+
init_engine_command();
|
|
31601
31686
|
init_sketch_constraint_persist();
|
|
31602
31687
|
init_dist2();
|
|
31603
31688
|
init_dist2();
|
|
@@ -31703,7 +31788,7 @@ var init_document_store = __esm({
|
|
|
31703
31788
|
sphere: { type: "Sphere", radius: 10, segments: 32 }
|
|
31704
31789
|
};
|
|
31705
31790
|
try {
|
|
31706
|
-
const result = engine
|
|
31791
|
+
const result = applyCommand(engine, { type: "add_feature", feature: defaults[kind] });
|
|
31707
31792
|
set(applyApiResult(result));
|
|
31708
31793
|
return result.createdFeatureId ?? "";
|
|
31709
31794
|
} catch (e) {
|
|
@@ -31718,12 +31803,12 @@ var init_document_store = __esm({
|
|
|
31718
31803
|
return "";
|
|
31719
31804
|
}
|
|
31720
31805
|
try {
|
|
31721
|
-
const result = engine
|
|
31806
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
31722
31807
|
type: "PartInstance",
|
|
31723
31808
|
path,
|
|
31724
31809
|
version: version2,
|
|
31725
31810
|
params_json: JSON.stringify(params)
|
|
31726
|
-
})
|
|
31811
|
+
} });
|
|
31727
31812
|
set(applyApiResult(result));
|
|
31728
31813
|
return result.createdFeatureId ?? "";
|
|
31729
31814
|
} catch (e) {
|
|
@@ -31733,22 +31818,22 @@ var init_document_store = __esm({
|
|
|
31733
31818
|
},
|
|
31734
31819
|
removePart: (partId) => {
|
|
31735
31820
|
const engine = get()._crdtEngine;
|
|
31736
|
-
const result = engine
|
|
31821
|
+
const result = applyCommand(engine, { type: "delete_feature", id: partId });
|
|
31737
31822
|
set(applyApiResult(result));
|
|
31738
31823
|
},
|
|
31739
31824
|
setTranslation: (partId, offset) => {
|
|
31740
31825
|
const engine = get()._crdtEngine;
|
|
31741
|
-
const result = engine
|
|
31826
|
+
const result = applyCommand(engine, { type: "set_translation", id: partId, offset: [offset.x, offset.y, offset.z] });
|
|
31742
31827
|
set(applyApiResult(result));
|
|
31743
31828
|
},
|
|
31744
31829
|
setRotation: (partId, angles) => {
|
|
31745
31830
|
const engine = get()._crdtEngine;
|
|
31746
|
-
const result = engine
|
|
31831
|
+
const result = applyCommand(engine, { type: "set_rotation", id: partId, angles: [angles.x, angles.y, angles.z] });
|
|
31747
31832
|
set(applyApiResult(result));
|
|
31748
31833
|
},
|
|
31749
31834
|
setScale: (partId, factor) => {
|
|
31750
31835
|
const engine = get()._crdtEngine;
|
|
31751
|
-
const result = engine
|
|
31836
|
+
const result = applyCommand(engine, { type: "set_scale", id: partId, factor: [factor.x, factor.y, factor.z] });
|
|
31752
31837
|
set(applyApiResult(result));
|
|
31753
31838
|
},
|
|
31754
31839
|
updatePrimitiveOp: (partId, op) => {
|
|
@@ -31761,25 +31846,25 @@ var init_document_store = __esm({
|
|
|
31761
31846
|
let lastResult;
|
|
31762
31847
|
if (o.type === "Cube" && "size" in o) {
|
|
31763
31848
|
const size = o.size;
|
|
31764
|
-
engine
|
|
31765
|
-
engine
|
|
31766
|
-
lastResult = engine
|
|
31849
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "size_x", value: crdtF64(size.x) });
|
|
31850
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "size_y", value: crdtF64(size.y) });
|
|
31851
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "size_z", value: crdtF64(size.z) });
|
|
31767
31852
|
} else if (o.type === "Cylinder" && "radius" in o) {
|
|
31768
|
-
engine
|
|
31769
|
-
engine
|
|
31770
|
-
lastResult = engine
|
|
31853
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "radius", value: crdtF64(o.radius) });
|
|
31854
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "height", value: crdtF64(o.height) });
|
|
31855
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
|
|
31771
31856
|
} else if (o.type === "Sphere" && "radius" in o) {
|
|
31772
|
-
engine
|
|
31773
|
-
lastResult = engine
|
|
31857
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "radius", value: crdtF64(o.radius) });
|
|
31858
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
|
|
31774
31859
|
} else if (o.type === "Cone" && "radius_bottom" in o) {
|
|
31775
|
-
engine
|
|
31776
|
-
engine
|
|
31777
|
-
engine
|
|
31778
|
-
lastResult = engine
|
|
31860
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "radius_bottom", value: crdtF64(o.radius_bottom) });
|
|
31861
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "radius_top", value: crdtF64(o.radius_top) });
|
|
31862
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "height", value: crdtF64(o.height) });
|
|
31863
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
|
|
31779
31864
|
} else if (o.type === "Torus" && "major_radius" in o) {
|
|
31780
|
-
engine
|
|
31781
|
-
engine
|
|
31782
|
-
lastResult = engine
|
|
31865
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "major_radius", value: crdtF64(o.major_radius) });
|
|
31866
|
+
applyCommand(engine, { type: "set_param", id: partId, key: "minor_radius", value: crdtF64(o.minor_radius) });
|
|
31867
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
|
|
31783
31868
|
}
|
|
31784
31869
|
if (lastResult) {
|
|
31785
31870
|
set(applyLegacyResult(lastResult));
|
|
@@ -31789,25 +31874,25 @@ var init_document_store = __esm({
|
|
|
31789
31874
|
const engine = get()._crdtEngine;
|
|
31790
31875
|
let lastResult;
|
|
31791
31876
|
if (updates.twist_angle !== void 0) {
|
|
31792
|
-
lastResult = engine
|
|
31877
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "twist_angle", value: crdtF64(updates.twist_angle) });
|
|
31793
31878
|
}
|
|
31794
31879
|
if (updates.scale_start !== void 0) {
|
|
31795
|
-
lastResult = engine
|
|
31880
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "scale_start", value: crdtF64(updates.scale_start) });
|
|
31796
31881
|
}
|
|
31797
31882
|
if (updates.scale_end !== void 0) {
|
|
31798
|
-
lastResult = engine
|
|
31883
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "scale_end", value: crdtF64(updates.scale_end) });
|
|
31799
31884
|
}
|
|
31800
31885
|
if (updates.path !== void 0) {
|
|
31801
|
-
lastResult = engine
|
|
31886
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "path", value: crdtStr(JSON.stringify(updates.path)) });
|
|
31802
31887
|
}
|
|
31803
31888
|
if (updates.orientation !== void 0) {
|
|
31804
|
-
lastResult = engine
|
|
31889
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "orientation", value: crdtF64(updates.orientation) });
|
|
31805
31890
|
}
|
|
31806
31891
|
if (updates.path_segments !== void 0) {
|
|
31807
|
-
lastResult = engine
|
|
31892
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "path_segments", value: crdtF64(updates.path_segments) });
|
|
31808
31893
|
}
|
|
31809
31894
|
if (updates.arc_segments !== void 0) {
|
|
31810
|
-
lastResult = engine
|
|
31895
|
+
lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "arc_segments", value: crdtF64(updates.arc_segments) });
|
|
31811
31896
|
}
|
|
31812
31897
|
if (lastResult) {
|
|
31813
31898
|
set(applyLegacyResult(lastResult));
|
|
@@ -31815,22 +31900,22 @@ var init_document_store = __esm({
|
|
|
31815
31900
|
},
|
|
31816
31901
|
setFeatureParam: (partId, key3, value) => {
|
|
31817
31902
|
const engine = get()._crdtEngine;
|
|
31818
|
-
const result = engine
|
|
31903
|
+
const result = applyCommand(engine, { type: "set_param", id: partId, key: key3, value });
|
|
31819
31904
|
set(applyLegacyResult(result));
|
|
31820
31905
|
},
|
|
31821
31906
|
updateBooleanType: (partId, newType) => {
|
|
31822
31907
|
const engine = get()._crdtEngine;
|
|
31823
|
-
const result = engine
|
|
31908
|
+
const result = applyCommand(engine, { type: "set_param", id: partId, key: "boolean_type", value: crdtStr(newType) });
|
|
31824
31909
|
set(applyLegacyResult(result));
|
|
31825
31910
|
},
|
|
31826
31911
|
applyBoolean: (type, partIdA, partIdB) => {
|
|
31827
31912
|
const engine = get()._crdtEngine;
|
|
31828
|
-
const result = engine
|
|
31913
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
31829
31914
|
type: "Boolean",
|
|
31830
31915
|
boolean_type: type,
|
|
31831
31916
|
input_a: partIdA,
|
|
31832
31917
|
input_b: partIdB
|
|
31833
|
-
})
|
|
31918
|
+
} });
|
|
31834
31919
|
set(applyApiResult(result));
|
|
31835
31920
|
return result.createdFeatureId ?? null;
|
|
31836
31921
|
},
|
|
@@ -31855,7 +31940,7 @@ var init_document_store = __esm({
|
|
|
31855
31940
|
if (existingName && "String" in existingName) {
|
|
31856
31941
|
params.name = { String: existingName.String + " copy" };
|
|
31857
31942
|
}
|
|
31858
|
-
lastResult = engine
|
|
31943
|
+
lastResult = applyCommand(engine, { type: "create_feature", kind: feature.kind, params });
|
|
31859
31944
|
if (lastResult.createdFeatureId)
|
|
31860
31945
|
newIds.push(lastResult.createdFeatureId);
|
|
31861
31946
|
}
|
|
@@ -31942,7 +32027,7 @@ var init_document_store = __esm({
|
|
|
31942
32027
|
}
|
|
31943
32028
|
}
|
|
31944
32029
|
const irJson = JSON.stringify(generatedDoc);
|
|
31945
|
-
const result = engine.
|
|
32030
|
+
const result = applyCommand(engine, { type: "import_ir", document: JSON.parse(irJson) });
|
|
31946
32031
|
set({ ...applyLegacyResult(result), isDirty: true });
|
|
31947
32032
|
if (generatedDoc.parameters || generatedDoc.bindings) {
|
|
31948
32033
|
const store = useParametersStore.getState();
|
|
@@ -31979,7 +32064,7 @@ var init_document_store = __esm({
|
|
|
31979
32064
|
if (options?.scale_end != null)
|
|
31980
32065
|
input.scale_end = options.scale_end;
|
|
31981
32066
|
try {
|
|
31982
|
-
const result = engine
|
|
32067
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
31983
32068
|
set(applyApiResult(result));
|
|
31984
32069
|
return result.createdFeatureId ?? null;
|
|
31985
32070
|
} catch (e) {
|
|
@@ -31991,13 +32076,13 @@ var init_document_store = __esm({
|
|
|
31991
32076
|
if (segments.length === 0)
|
|
31992
32077
|
return null;
|
|
31993
32078
|
const engine = get()._crdtEngine;
|
|
31994
|
-
const result = engine
|
|
32079
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
31995
32080
|
type: "Revolve",
|
|
31996
32081
|
sketch: sketchJson(segments, plane, origin),
|
|
31997
32082
|
axis_origin: [axisOrigin.x, axisOrigin.y, axisOrigin.z],
|
|
31998
32083
|
axis_dir: [axisDir.x, axisDir.y, axisDir.z],
|
|
31999
32084
|
angle_deg: angleDeg
|
|
32000
|
-
})
|
|
32085
|
+
} });
|
|
32001
32086
|
set(applyApiResult(result));
|
|
32002
32087
|
return result.createdFeatureId ?? null;
|
|
32003
32088
|
},
|
|
@@ -32016,7 +32101,7 @@ var init_document_store = __esm({
|
|
|
32016
32101
|
input.scale_start = options.scale_start;
|
|
32017
32102
|
if (options.scale_end != null)
|
|
32018
32103
|
input.scale_end = options.scale_end;
|
|
32019
|
-
const result = engine
|
|
32104
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32020
32105
|
set(applyApiResult(result));
|
|
32021
32106
|
return result.createdFeatureId ?? null;
|
|
32022
32107
|
},
|
|
@@ -32031,7 +32116,7 @@ var init_document_store = __esm({
|
|
|
32031
32116
|
};
|
|
32032
32117
|
if (options.closed != null)
|
|
32033
32118
|
input.closed = options.closed;
|
|
32034
|
-
const result = engine
|
|
32119
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32035
32120
|
set(applyApiResult(result));
|
|
32036
32121
|
return result.createdFeatureId ?? null;
|
|
32037
32122
|
},
|
|
@@ -32046,7 +32131,7 @@ var init_document_store = __esm({
|
|
|
32046
32131
|
input.normals_json = JSON.stringify(Array.from(normals));
|
|
32047
32132
|
if (source)
|
|
32048
32133
|
input.source = source;
|
|
32049
|
-
const result = engine
|
|
32134
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32050
32135
|
set(applyApiResult(result));
|
|
32051
32136
|
return result.createdFeatureId ?? "";
|
|
32052
32137
|
},
|
|
@@ -32059,7 +32144,7 @@ var init_document_store = __esm({
|
|
|
32059
32144
|
};
|
|
32060
32145
|
if (source)
|
|
32061
32146
|
params.source = crdtStr(source);
|
|
32062
|
-
const result = engine
|
|
32147
|
+
const result = applyCommand(engine, { type: "create_feature", kind: "embroidery-pattern", params });
|
|
32063
32148
|
set(applyLegacyResult(result));
|
|
32064
32149
|
return result.createdFeatureId ?? "";
|
|
32065
32150
|
},
|
|
@@ -32107,7 +32192,7 @@ var init_document_store = __esm({
|
|
|
32107
32192
|
const d = structuredClone(design);
|
|
32108
32193
|
if (d.threads[threadIdx])
|
|
32109
32194
|
d.threads[threadIdx].color = color;
|
|
32110
|
-
const result = engine
|
|
32195
|
+
const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
|
|
32111
32196
|
set(applyLegacyResult(result));
|
|
32112
32197
|
},
|
|
32113
32198
|
setThreadName: (nodeId, threadIdx, name) => {
|
|
@@ -32122,7 +32207,7 @@ var init_document_store = __esm({
|
|
|
32122
32207
|
const d = structuredClone(design);
|
|
32123
32208
|
if (d.threads[threadIdx])
|
|
32124
32209
|
d.threads[threadIdx].name = name;
|
|
32125
|
-
const result = engine
|
|
32210
|
+
const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
|
|
32126
32211
|
set(applyLegacyResult(result));
|
|
32127
32212
|
},
|
|
32128
32213
|
setStitchGroupFillParams: (nodeId, groupIdx, params) => {
|
|
@@ -32139,7 +32224,7 @@ var init_document_store = __esm({
|
|
|
32139
32224
|
const group = d.stitch_groups[groupIdx];
|
|
32140
32225
|
group.fill_params = { ...group.fill_params ?? DEFAULT_FILL_PARAMS, ...params };
|
|
32141
32226
|
}
|
|
32142
|
-
const result = engine
|
|
32227
|
+
const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
|
|
32143
32228
|
set(applyLegacyResult(result));
|
|
32144
32229
|
},
|
|
32145
32230
|
optimizeJumpStitches: (nodeId) => {
|
|
@@ -32185,36 +32270,36 @@ var init_document_store = __esm({
|
|
|
32185
32270
|
}
|
|
32186
32271
|
}
|
|
32187
32272
|
d.stitch_groups = ordered;
|
|
32188
|
-
const result = engine
|
|
32273
|
+
const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
|
|
32189
32274
|
set(applyLegacyResult(result));
|
|
32190
32275
|
},
|
|
32191
32276
|
addFillet: (partId, radius) => {
|
|
32192
32277
|
const engine = get()._crdtEngine;
|
|
32193
|
-
const result = engine
|
|
32278
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
32194
32279
|
type: "Fillet",
|
|
32195
32280
|
input: partId,
|
|
32196
32281
|
radius
|
|
32197
|
-
})
|
|
32282
|
+
} });
|
|
32198
32283
|
set(applyApiResult(result));
|
|
32199
32284
|
return result.createdFeatureId ?? null;
|
|
32200
32285
|
},
|
|
32201
32286
|
addChamfer: (partId, distance) => {
|
|
32202
32287
|
const engine = get()._crdtEngine;
|
|
32203
|
-
const result = engine
|
|
32288
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
32204
32289
|
type: "Chamfer",
|
|
32205
32290
|
input: partId,
|
|
32206
32291
|
distance
|
|
32207
|
-
})
|
|
32292
|
+
} });
|
|
32208
32293
|
set(applyApiResult(result));
|
|
32209
32294
|
return result.createdFeatureId ?? null;
|
|
32210
32295
|
},
|
|
32211
32296
|
addShell: (partId, thickness) => {
|
|
32212
32297
|
const engine = get()._crdtEngine;
|
|
32213
|
-
const result = engine
|
|
32298
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
32214
32299
|
type: "Shell",
|
|
32215
32300
|
input: partId,
|
|
32216
32301
|
thickness
|
|
32217
|
-
})
|
|
32302
|
+
} });
|
|
32218
32303
|
set(applyApiResult(result));
|
|
32219
32304
|
return result.createdFeatureId ?? null;
|
|
32220
32305
|
},
|
|
@@ -32304,36 +32389,36 @@ var init_document_store = __esm({
|
|
|
32304
32389
|
},
|
|
32305
32390
|
addLinearPattern: (partId, direction, count, spacing) => {
|
|
32306
32391
|
const engine = get()._crdtEngine;
|
|
32307
|
-
const result = engine
|
|
32392
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
32308
32393
|
type: "LinearPattern",
|
|
32309
32394
|
input: partId,
|
|
32310
32395
|
direction: [direction.x, direction.y, direction.z],
|
|
32311
32396
|
count,
|
|
32312
32397
|
spacing
|
|
32313
|
-
})
|
|
32398
|
+
} });
|
|
32314
32399
|
set(applyApiResult(result));
|
|
32315
32400
|
return result.createdFeatureId ?? null;
|
|
32316
32401
|
},
|
|
32317
32402
|
addCircularPattern: (partId, axisOrigin, axisDir, count, angleDeg) => {
|
|
32318
32403
|
const engine = get()._crdtEngine;
|
|
32319
|
-
const result = engine
|
|
32404
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
32320
32405
|
type: "CircularPattern",
|
|
32321
32406
|
input: partId,
|
|
32322
32407
|
axis_origin: [axisOrigin.x, axisOrigin.y, axisOrigin.z],
|
|
32323
32408
|
axis_dir: [axisDir.x, axisDir.y, axisDir.z],
|
|
32324
32409
|
count,
|
|
32325
32410
|
angle_deg: angleDeg
|
|
32326
|
-
})
|
|
32411
|
+
} });
|
|
32327
32412
|
set(applyApiResult(result));
|
|
32328
32413
|
return result.createdFeatureId ?? null;
|
|
32329
32414
|
},
|
|
32330
32415
|
addMirror: (partId, plane) => {
|
|
32331
32416
|
const engine = get()._crdtEngine;
|
|
32332
|
-
const result = engine
|
|
32417
|
+
const result = applyCommand(engine, { type: "add_feature", feature: {
|
|
32333
32418
|
type: "Mirror",
|
|
32334
32419
|
input: partId,
|
|
32335
32420
|
plane
|
|
32336
|
-
})
|
|
32421
|
+
} });
|
|
32337
32422
|
set(applyApiResult(result));
|
|
32338
32423
|
return result.createdFeatureId ?? null;
|
|
32339
32424
|
},
|
|
@@ -32354,31 +32439,31 @@ var init_document_store = __esm({
|
|
|
32354
32439
|
input.letter_spacing = letterSpacing;
|
|
32355
32440
|
if (lineSpacing !== void 0)
|
|
32356
32441
|
input.line_spacing = lineSpacing;
|
|
32357
|
-
const result = engine
|
|
32442
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32358
32443
|
set(applyApiResult(result));
|
|
32359
32444
|
return result.createdFeatureId ?? null;
|
|
32360
32445
|
},
|
|
32361
32446
|
setPartMaterial: (partId, materialKey) => {
|
|
32362
32447
|
const engine = get()._crdtEngine;
|
|
32363
|
-
const result = engine
|
|
32448
|
+
const result = applyCommand(engine, { type: "set_material", id: partId, material: materialKey });
|
|
32364
32449
|
set(applyApiResult(result));
|
|
32365
32450
|
},
|
|
32366
32451
|
renamePart: (partId, name) => {
|
|
32367
32452
|
const engine = get()._crdtEngine;
|
|
32368
|
-
const result = engine
|
|
32453
|
+
const result = applyCommand(engine, { type: "rename", id: partId, name });
|
|
32369
32454
|
set(applyApiResult(result));
|
|
32370
32455
|
},
|
|
32371
32456
|
undo: () => {
|
|
32372
32457
|
const engine = get()._crdtEngine;
|
|
32373
32458
|
if (engine.can_undo()) {
|
|
32374
|
-
const result = engine
|
|
32459
|
+
const result = applyCommand(engine, { type: "undo" });
|
|
32375
32460
|
set(applyLegacyResult(result));
|
|
32376
32461
|
}
|
|
32377
32462
|
},
|
|
32378
32463
|
redo: () => {
|
|
32379
32464
|
const engine = get()._crdtEngine;
|
|
32380
32465
|
if (engine.can_redo()) {
|
|
32381
|
-
const result = engine
|
|
32466
|
+
const result = applyCommand(engine, { type: "redo" });
|
|
32382
32467
|
set(applyLegacyResult(result));
|
|
32383
32468
|
}
|
|
32384
32469
|
},
|
|
@@ -32396,17 +32481,17 @@ var init_document_store = __esm({
|
|
|
32396
32481
|
// Assembly operations
|
|
32397
32482
|
setInstanceTransform: (instanceId, transform2) => {
|
|
32398
32483
|
const engine = get()._crdtEngine;
|
|
32399
|
-
const result = engine
|
|
32484
|
+
const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "transform", value: crdtStr(JSON.stringify(transform2)) });
|
|
32400
32485
|
set(applyLegacyResult(result));
|
|
32401
32486
|
},
|
|
32402
32487
|
setInstanceMaterial: (instanceId, materialKey) => {
|
|
32403
32488
|
const engine = get()._crdtEngine;
|
|
32404
|
-
const result = engine
|
|
32489
|
+
const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "material", value: crdtStr(materialKey) });
|
|
32405
32490
|
set(applyLegacyResult(result));
|
|
32406
32491
|
},
|
|
32407
32492
|
setJointState: (jointId, jointState) => {
|
|
32408
32493
|
const engine = get()._crdtEngine;
|
|
32409
|
-
const result = engine
|
|
32494
|
+
const result = applyCommand(engine, { type: "set_joint_state", id: jointId, state: jointState });
|
|
32410
32495
|
set(applyApiResult(result));
|
|
32411
32496
|
},
|
|
32412
32497
|
createPartDef: (partId, name) => {
|
|
@@ -32417,7 +32502,7 @@ var init_document_store = __esm({
|
|
|
32417
32502
|
};
|
|
32418
32503
|
if (name)
|
|
32419
32504
|
input.name = name;
|
|
32420
|
-
const result = engine
|
|
32505
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32421
32506
|
set(applyApiResult(result));
|
|
32422
32507
|
return result.createdFeatureId ?? null;
|
|
32423
32508
|
},
|
|
@@ -32431,7 +32516,7 @@ var init_document_store = __esm({
|
|
|
32431
32516
|
input.name = name;
|
|
32432
32517
|
if (transform2)
|
|
32433
32518
|
input.transform = JSON.stringify(transform2);
|
|
32434
|
-
const result = engine
|
|
32519
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32435
32520
|
set(applyApiResult(result));
|
|
32436
32521
|
return result.createdFeatureId ?? "";
|
|
32437
32522
|
},
|
|
@@ -32453,7 +32538,7 @@ var init_document_store = __esm({
|
|
|
32453
32538
|
const axis = jk.axis;
|
|
32454
32539
|
input.axis = [axis.x, axis.y, axis.z];
|
|
32455
32540
|
}
|
|
32456
|
-
const result = engine
|
|
32541
|
+
const result = applyCommand(engine, { type: "add_feature", feature: input });
|
|
32457
32542
|
set(applyApiResult(result));
|
|
32458
32543
|
return result.createdFeatureId ?? "";
|
|
32459
32544
|
},
|
|
@@ -32466,16 +32551,16 @@ var init_document_store = __esm({
|
|
|
32466
32551
|
const pi = f.params.parent_instance;
|
|
32467
32552
|
const ci = f.params.child_instance;
|
|
32468
32553
|
if (pi && pi.FeatureRef === instanceId || ci && ci.FeatureRef === instanceId) {
|
|
32469
|
-
engine
|
|
32554
|
+
applyCommand(engine, { type: "delete_feature", id: f.id });
|
|
32470
32555
|
}
|
|
32471
32556
|
}
|
|
32472
32557
|
}
|
|
32473
|
-
const result = engine
|
|
32558
|
+
const result = applyCommand(engine, { type: "delete_feature", id: instanceId });
|
|
32474
32559
|
set(applyApiResult(result));
|
|
32475
32560
|
},
|
|
32476
32561
|
deleteJoint: (jointId) => {
|
|
32477
32562
|
const engine = get()._crdtEngine;
|
|
32478
|
-
const result = engine
|
|
32563
|
+
const result = applyCommand(engine, { type: "delete_feature", id: jointId });
|
|
32479
32564
|
set(applyApiResult(result));
|
|
32480
32565
|
},
|
|
32481
32566
|
setGroundInstance: (instanceId) => {
|
|
@@ -32486,15 +32571,15 @@ var init_document_store = __esm({
|
|
|
32486
32571
|
const features = JSON.parse(featuresJson);
|
|
32487
32572
|
const oldGround = features.find((f) => f.kind === "instance" && f.id !== instanceId);
|
|
32488
32573
|
if (oldGround) {
|
|
32489
|
-
engine
|
|
32574
|
+
applyCommand(engine, { type: "set_param", id: oldGround.id, key: "is_ground", value: crdtBool(false) });
|
|
32490
32575
|
}
|
|
32491
32576
|
}
|
|
32492
|
-
const result = engine
|
|
32577
|
+
const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "is_ground", value: crdtBool(true) });
|
|
32493
32578
|
set(applyLegacyResult(result));
|
|
32494
32579
|
},
|
|
32495
32580
|
renameInstance: (instanceId, name) => {
|
|
32496
32581
|
const engine = get()._crdtEngine;
|
|
32497
|
-
const result = engine
|
|
32582
|
+
const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "name", value: crdtStr(name) });
|
|
32498
32583
|
set(applyLegacyResult(result));
|
|
32499
32584
|
},
|
|
32500
32585
|
setDocumentMeta: (id, name) => {
|
|
@@ -32552,9 +32637,18 @@ var init_document_store = __esm({
|
|
|
32552
32637
|
setTransientEval: (active) => {
|
|
32553
32638
|
set({ isTransientEval: active });
|
|
32554
32639
|
},
|
|
32640
|
+
applyTool: (tool, args) => {
|
|
32641
|
+
const engine = get()._crdtEngine;
|
|
32642
|
+
if (!engine)
|
|
32643
|
+
return null;
|
|
32644
|
+
const envelope = applyToolCall(engine, tool, args);
|
|
32645
|
+
if (envelope?.ok)
|
|
32646
|
+
set(applyApiResult(envelope.result));
|
|
32647
|
+
return envelope;
|
|
32648
|
+
},
|
|
32555
32649
|
setPartVisible: (partId, visible) => {
|
|
32556
32650
|
const engine = get()._crdtEngine;
|
|
32557
|
-
const result = engine
|
|
32651
|
+
const result = applyCommand(engine, { type: "set_visible", id: partId, visible });
|
|
32558
32652
|
set(applyApiResult(result));
|
|
32559
32653
|
},
|
|
32560
32654
|
reorderPart: (partId, newIndex) => {
|
|
@@ -32566,13 +32660,7 @@ var init_document_store = __esm({
|
|
|
32566
32660
|
const oldIndex = state.parts.findIndex((p) => p.id === partId);
|
|
32567
32661
|
if (oldIndex === -1 || oldIndex === newIndex)
|
|
32568
32662
|
return;
|
|
32569
|
-
const
|
|
32570
|
-
const features = JSON.parse(featuresJson);
|
|
32571
|
-
const others = features.filter((f) => f.id !== partId);
|
|
32572
|
-
const beforeId = newIndex > 0 ? others[newIndex - 1]?.id ?? "" : "";
|
|
32573
|
-
const afterId = newIndex < others.length ? others[newIndex]?.id ?? "" : "";
|
|
32574
|
-
const positionJson = engine.compute_position_between(beforeId, afterId);
|
|
32575
|
-
const result = engine.move_feature(partId, positionJson);
|
|
32663
|
+
const result = applyCommand(engine, { type: "reorder", id: partId, index: newIndex });
|
|
32576
32664
|
set(applyLegacyResult(result));
|
|
32577
32665
|
},
|
|
32578
32666
|
// Analyze mode: studies live in a singleton "analysis-studies" CRDT
|
|
@@ -32582,7 +32670,7 @@ var init_document_store = __esm({
|
|
|
32582
32670
|
const state = get();
|
|
32583
32671
|
const engine = state._crdtEngine;
|
|
32584
32672
|
const fid = getOrCreateAnalysisStudiesFeature(state);
|
|
32585
|
-
engine
|
|
32673
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "studies", value: crdtStr(JSON.stringify(studies)) });
|
|
32586
32674
|
const doc = JSON.parse(engine.get_document_json());
|
|
32587
32675
|
set({ document: doc, isDirty: true });
|
|
32588
32676
|
},
|
|
@@ -32592,15 +32680,15 @@ var init_document_store = __esm({
|
|
|
32592
32680
|
const engine = state._crdtEngine;
|
|
32593
32681
|
const fid = getOrCreateSceneFeature(state);
|
|
32594
32682
|
if (settings.environment)
|
|
32595
|
-
engine
|
|
32683
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "environment", value: crdtStr(JSON.stringify(settings.environment)) });
|
|
32596
32684
|
if (settings.lights)
|
|
32597
|
-
engine
|
|
32685
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(settings.lights)) });
|
|
32598
32686
|
if (settings.background)
|
|
32599
|
-
engine
|
|
32687
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "background", value: crdtStr(JSON.stringify(settings.background)) });
|
|
32600
32688
|
if (settings.postProcessing)
|
|
32601
|
-
engine
|
|
32689
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "post_processing", value: crdtStr(JSON.stringify(settings.postProcessing)) });
|
|
32602
32690
|
if (settings.cameraPresets)
|
|
32603
|
-
engine
|
|
32691
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "camera_presets", value: crdtStr(JSON.stringify(settings.cameraPresets)) });
|
|
32604
32692
|
const doc = JSON.parse(engine.get_document_json());
|
|
32605
32693
|
set({ document: doc, isDirty: true });
|
|
32606
32694
|
},
|
|
@@ -32609,11 +32697,11 @@ var init_document_store = __esm({
|
|
|
32609
32697
|
const engine = state._crdtEngine;
|
|
32610
32698
|
const fid = getOrCreateDrawingFeature(state);
|
|
32611
32699
|
if (settings.titleBlock)
|
|
32612
|
-
engine
|
|
32700
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "title_block", value: crdtStr(JSON.stringify(settings.titleBlock)) });
|
|
32613
32701
|
if (settings.sections)
|
|
32614
|
-
engine
|
|
32702
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "sections", value: crdtStr(JSON.stringify(settings.sections)) });
|
|
32615
32703
|
if (settings.showBom !== void 0)
|
|
32616
|
-
engine
|
|
32704
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "show_bom", value: crdtStr(JSON.stringify(settings.showBom)) });
|
|
32617
32705
|
const doc = JSON.parse(engine.get_document_json());
|
|
32618
32706
|
set({ document: doc, isDirty: true });
|
|
32619
32707
|
},
|
|
@@ -32621,7 +32709,7 @@ var init_document_store = __esm({
|
|
|
32621
32709
|
const state = get();
|
|
32622
32710
|
const engine = state._crdtEngine;
|
|
32623
32711
|
const fid = getOrCreateSceneFeature(state);
|
|
32624
|
-
engine
|
|
32712
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "environment", value: crdtStr(JSON.stringify(environment)) });
|
|
32625
32713
|
const doc = JSON.parse(engine.get_document_json());
|
|
32626
32714
|
set({ document: doc, isDirty: true });
|
|
32627
32715
|
},
|
|
@@ -32629,7 +32717,7 @@ var init_document_store = __esm({
|
|
|
32629
32717
|
const state = get();
|
|
32630
32718
|
const engine = state._crdtEngine;
|
|
32631
32719
|
const fid = getOrCreateSceneFeature(state);
|
|
32632
|
-
engine
|
|
32720
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
|
|
32633
32721
|
const doc = JSON.parse(engine.get_document_json());
|
|
32634
32722
|
set({ document: doc, isDirty: true });
|
|
32635
32723
|
},
|
|
@@ -32638,7 +32726,7 @@ var init_document_store = __esm({
|
|
|
32638
32726
|
const engine = state._crdtEngine;
|
|
32639
32727
|
const lights = [...state.document.scene?.lights ?? [], light];
|
|
32640
32728
|
const fid = getOrCreateSceneFeature(state);
|
|
32641
|
-
engine
|
|
32729
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
|
|
32642
32730
|
const doc = JSON.parse(engine.get_document_json());
|
|
32643
32731
|
set({ document: doc, isDirty: true });
|
|
32644
32732
|
},
|
|
@@ -32647,7 +32735,7 @@ var init_document_store = __esm({
|
|
|
32647
32735
|
const engine = state._crdtEngine;
|
|
32648
32736
|
const lights = (state.document.scene?.lights ?? []).filter((l) => l.id !== lightId);
|
|
32649
32737
|
const fid = getOrCreateSceneFeature(state);
|
|
32650
|
-
engine
|
|
32738
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
|
|
32651
32739
|
const doc = JSON.parse(engine.get_document_json());
|
|
32652
32740
|
set({ document: doc, isDirty: true });
|
|
32653
32741
|
},
|
|
@@ -32656,7 +32744,7 @@ var init_document_store = __esm({
|
|
|
32656
32744
|
const engine = state._crdtEngine;
|
|
32657
32745
|
const lights = (state.document.scene?.lights ?? []).map((l) => l.id === lightId ? { ...l, ...updates } : l);
|
|
32658
32746
|
const fid = getOrCreateSceneFeature(state);
|
|
32659
|
-
engine
|
|
32747
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
|
|
32660
32748
|
const doc = JSON.parse(engine.get_document_json());
|
|
32661
32749
|
set({ document: doc, isDirty: true });
|
|
32662
32750
|
},
|
|
@@ -32664,7 +32752,7 @@ var init_document_store = __esm({
|
|
|
32664
32752
|
const state = get();
|
|
32665
32753
|
const engine = state._crdtEngine;
|
|
32666
32754
|
const fid = getOrCreateSceneFeature(state);
|
|
32667
|
-
engine
|
|
32755
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "background", value: crdtStr(JSON.stringify(background)) });
|
|
32668
32756
|
const doc = JSON.parse(engine.get_document_json());
|
|
32669
32757
|
set({ document: doc, isDirty: true });
|
|
32670
32758
|
},
|
|
@@ -32672,7 +32760,7 @@ var init_document_store = __esm({
|
|
|
32672
32760
|
const state = get();
|
|
32673
32761
|
const engine = state._crdtEngine;
|
|
32674
32762
|
const fid = getOrCreateSceneFeature(state);
|
|
32675
|
-
engine
|
|
32763
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "post_processing", value: crdtStr(JSON.stringify(postProcessing)) });
|
|
32676
32764
|
const doc = JSON.parse(engine.get_document_json());
|
|
32677
32765
|
set({ document: doc, isDirty: true });
|
|
32678
32766
|
},
|
|
@@ -32681,7 +32769,7 @@ var init_document_store = __esm({
|
|
|
32681
32769
|
const engine = state._crdtEngine;
|
|
32682
32770
|
const presets = [...state.document.scene?.cameraPresets ?? [], preset];
|
|
32683
32771
|
const fid = getOrCreateSceneFeature(state);
|
|
32684
|
-
engine
|
|
32772
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "camera_presets", value: crdtStr(JSON.stringify(presets)) });
|
|
32685
32773
|
const doc = JSON.parse(engine.get_document_json());
|
|
32686
32774
|
set({ document: doc, isDirty: true });
|
|
32687
32775
|
},
|
|
@@ -32690,7 +32778,7 @@ var init_document_store = __esm({
|
|
|
32690
32778
|
const engine = state._crdtEngine;
|
|
32691
32779
|
const presets = (state.document.scene?.cameraPresets ?? []).filter((p) => p.id !== presetId);
|
|
32692
32780
|
const fid = getOrCreateSceneFeature(state);
|
|
32693
|
-
engine
|
|
32781
|
+
applyCommand(engine, { type: "set_param", id: fid, key: "camera_presets", value: crdtStr(JSON.stringify(presets)) });
|
|
32694
32782
|
const doc = JSON.parse(engine.get_document_json());
|
|
32695
32783
|
set({ document: doc, isDirty: true });
|
|
32696
32784
|
},
|
|
@@ -34581,11 +34669,6 @@ var init_translations = __esm({
|
|
|
34581
34669
|
"modal.fork.description": "P\u0159ihlaste se a vytvo\u0159te si vlastn\xED upravitelnou kopii. Va\u0161e \xFApravy se nedotknou origin\xE1lu \u2014 z\xEDsk\xE1te \u010Derstvou kopii ve sv\xE9m \xFA\u010Dtu.",
|
|
34582
34670
|
"modal.fork.keep_viewing": "Pokra\u010Dovat v prohl\xED\u017Een\xED",
|
|
34583
34671
|
"modal.fork.signin": "P\u0159ihl\xE1sit se a vytvo\u0159it kopii",
|
|
34584
|
-
"modal.recents.title": "Ned\xE1vn\xE9 soubory",
|
|
34585
|
-
"modal.recents.clear": "Vymazat",
|
|
34586
|
-
"modal.recents.clear_tooltip": "Vymazat ned\xE1vn\xE9 soubory",
|
|
34587
|
-
"modal.recents.empty": "Zat\xEDm \u017E\xE1dn\xE9 ned\xE1vn\xE9 soubory.",
|
|
34588
|
-
"modal.recents.cant_open": "Nelze otev\u0159\xEDt {name}",
|
|
34589
34672
|
"palette.placeholder": "Zadejte p\u0159\xEDkaz nebo popi\u0161te, co vytvo\u0159it...",
|
|
34590
34673
|
"palette.title": "Paleta p\u0159\xEDkaz\u016F",
|
|
34591
34674
|
"palette.generating": "Generov\xE1n\xED...",
|
|
@@ -34928,11 +35011,6 @@ var init_translations = __esm({
|
|
|
34928
35011
|
"modal.fork.description": "Melde dich an, um eine eigene bearbeitbare Kopie zu erstellen. Deine \xC4nderungen wirken sich nicht auf das Original aus \u2014 du erh\xE4ltst einen neuen Fork in deinem Konto.",
|
|
34929
35012
|
"modal.fork.keep_viewing": "Weiter ansehen",
|
|
34930
35013
|
"modal.fork.signin": "Anmelden zum Forken",
|
|
34931
|
-
"modal.recents.title": "Zuletzt verwendete Dateien",
|
|
34932
|
-
"modal.recents.clear": "Leeren",
|
|
34933
|
-
"modal.recents.clear_tooltip": "Zuletzt verwendete Dateien leeren",
|
|
34934
|
-
"modal.recents.empty": "Noch keine zuletzt verwendeten Dateien.",
|
|
34935
|
-
"modal.recents.cant_open": "{name} konnte nicht ge\xF6ffnet werden",
|
|
34936
35014
|
"palette.placeholder": "Befehl eingeben oder beschreiben, was erstellt werden soll...",
|
|
34937
35015
|
"palette.title": "Befehlspalette",
|
|
34938
35016
|
"palette.generating": "Wird generiert...",
|
|
@@ -35277,11 +35355,6 @@ var init_translations = __esm({
|
|
|
35277
35355
|
"modal.fork.description": "Sign in to create your own editable copy. Your edits won't touch the original \u2014 you'll get a fresh fork in your account.",
|
|
35278
35356
|
"modal.fork.keep_viewing": "Keep viewing",
|
|
35279
35357
|
"modal.fork.signin": "Sign in to fork",
|
|
35280
|
-
"modal.recents.title": "Recent Files",
|
|
35281
|
-
"modal.recents.clear": "Clear",
|
|
35282
|
-
"modal.recents.clear_tooltip": "Clear recent files",
|
|
35283
|
-
"modal.recents.empty": "No recent files yet.",
|
|
35284
|
-
"modal.recents.cant_open": "Could not open {name}",
|
|
35285
35358
|
"palette.placeholder": "Type a command or describe what to create...",
|
|
35286
35359
|
"palette.title": "Command Palette",
|
|
35287
35360
|
"palette.generating": "Generating...",
|
|
@@ -35624,11 +35697,6 @@ var init_translations = __esm({
|
|
|
35624
35697
|
"modal.fork.description": "Inicia sesi\xF3n para crear tu propia copia editable. Tus cambios no afectar\xE1n al original \u2014 obtendr\xE1s una bifurcaci\xF3n nueva en tu cuenta.",
|
|
35625
35698
|
"modal.fork.keep_viewing": "Seguir viendo",
|
|
35626
35699
|
"modal.fork.signin": "Inicia sesi\xF3n para bifurcar",
|
|
35627
|
-
"modal.recents.title": "Archivos recientes",
|
|
35628
|
-
"modal.recents.clear": "Borrar",
|
|
35629
|
-
"modal.recents.clear_tooltip": "Borrar archivos recientes",
|
|
35630
|
-
"modal.recents.empty": "A\xFAn no hay archivos recientes.",
|
|
35631
|
-
"modal.recents.cant_open": "No se pudo abrir {name}",
|
|
35632
35700
|
"palette.placeholder": "Escribe un comando o describe qu\xE9 crear...",
|
|
35633
35701
|
"palette.title": "Paleta de comandos",
|
|
35634
35702
|
"palette.generating": "Generando...",
|
|
@@ -35971,11 +36039,6 @@ var init_translations = __esm({
|
|
|
35971
36039
|
"modal.fork.description": "Connectez-vous pour cr\xE9er votre propre copie modifiable. Vos modifications n'affecteront pas l'original \u2014 vous obtiendrez une nouvelle bifurcation dans votre compte.",
|
|
35972
36040
|
"modal.fork.keep_viewing": "Continuer \xE0 voir",
|
|
35973
36041
|
"modal.fork.signin": "Se connecter pour bifurquer",
|
|
35974
|
-
"modal.recents.title": "Fichiers r\xE9cents",
|
|
35975
|
-
"modal.recents.clear": "Effacer",
|
|
35976
|
-
"modal.recents.clear_tooltip": "Effacer les fichiers r\xE9cents",
|
|
35977
|
-
"modal.recents.empty": "Aucun fichier r\xE9cent.",
|
|
35978
|
-
"modal.recents.cant_open": "Impossible d'ouvrir {name}",
|
|
35979
36042
|
"palette.placeholder": "Tapez une commande ou d\xE9crivez ce que vous voulez cr\xE9er...",
|
|
35980
36043
|
"palette.title": "Palette de commandes",
|
|
35981
36044
|
"palette.generating": "G\xE9n\xE9ration en cours...",
|
|
@@ -36318,11 +36381,6 @@ var init_translations = __esm({
|
|
|
36318
36381
|
"modal.fork.description": "Accedi per creare la tua copia modificabile. Le tue modifiche non toccheranno l'originale \u2014 otterrai un nuovo fork nel tuo account.",
|
|
36319
36382
|
"modal.fork.keep_viewing": "Continua a visualizzare",
|
|
36320
36383
|
"modal.fork.signin": "Accedi per duplicare",
|
|
36321
|
-
"modal.recents.title": "File Recenti",
|
|
36322
|
-
"modal.recents.clear": "Cancella",
|
|
36323
|
-
"modal.recents.clear_tooltip": "Cancella file recenti",
|
|
36324
|
-
"modal.recents.empty": "Nessun file recente.",
|
|
36325
|
-
"modal.recents.cant_open": "Impossibile aprire {name}",
|
|
36326
36384
|
"palette.placeholder": "Digita un comando o descrivi cosa creare...",
|
|
36327
36385
|
"palette.title": "Tavolozza Comandi",
|
|
36328
36386
|
"palette.generating": "Generazione in corso...",
|
|
@@ -36665,11 +36723,6 @@ var init_translations = __esm({
|
|
|
36665
36723
|
"modal.fork.description": "\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u7DE8\u96C6\u53EF\u80FD\u306A\u30B3\u30D4\u30FC\u3092\u4F5C\u6210\u3057\u307E\u3057\u3087\u3046\u3002\u7DE8\u96C6\u5185\u5BB9\u306F\u5143\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u306F\u5F71\u97FF\u3057\u307E\u305B\u3093 \u2014 \u304A\u4F7F\u3044\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u65B0\u3057\u3044\u30D5\u30A9\u30FC\u30AF\u304C\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002",
|
|
36666
36724
|
"modal.fork.keep_viewing": "\u8868\u793A\u3092\u7D9A\u3051\u308B",
|
|
36667
36725
|
"modal.fork.signin": "\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u30D5\u30A9\u30FC\u30AF",
|
|
36668
|
-
"modal.recents.title": "\u6700\u8FD1\u306E\u30D5\u30A1\u30A4\u30EB",
|
|
36669
|
-
"modal.recents.clear": "\u30AF\u30EA\u30A2",
|
|
36670
|
-
"modal.recents.clear_tooltip": "\u6700\u8FD1\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30AF\u30EA\u30A2",
|
|
36671
|
-
"modal.recents.empty": "\u6700\u8FD1\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
36672
|
-
"modal.recents.cant_open": "{name} \u3092\u958B\u3051\u307E\u305B\u3093\u3067\u3057\u305F",
|
|
36673
36726
|
"palette.placeholder": "\u30B3\u30DE\u30F3\u30C9\u3092\u5165\u529B\u3059\u308B\u304B\u3001\u4F5C\u6210\u3059\u308B\u5185\u5BB9\u3092\u8A18\u8FF0...",
|
|
36674
36727
|
"palette.title": "\u30B3\u30DE\u30F3\u30C9\u30D1\u30EC\u30C3\u30C8",
|
|
36675
36728
|
"palette.generating": "\u751F\u6210\u4E2D...",
|
|
@@ -37012,11 +37065,6 @@ var init_translations = __esm({
|
|
|
37012
37065
|
"modal.fork.description": "\uB85C\uADF8\uC778\uD558\uC5EC \uD3B8\uC9D1 \uAC00\uB2A5\uD55C \uC0AC\uBCF8\uC744 \uB9CC\uB4DC\uC138\uC694. \uD3B8\uC9D1 \uB0B4\uC6A9\uC740 \uC6D0\uBCF8\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC73C\uBA70, \uACC4\uC815\uC5D0 \uC0C8 \uD3EC\uD06C\uAC00 \uC0DD\uC131\uB429\uB2C8\uB2E4.",
|
|
37013
37066
|
"modal.fork.keep_viewing": "\uACC4\uC18D \uBCF4\uAE30",
|
|
37014
37067
|
"modal.fork.signin": "\uD3EC\uD06C\uD558\uB824\uBA74 \uB85C\uADF8\uC778",
|
|
37015
|
-
"modal.recents.title": "\uCD5C\uADFC \uD30C\uC77C",
|
|
37016
|
-
"modal.recents.clear": "\uC9C0\uC6B0\uAE30",
|
|
37017
|
-
"modal.recents.clear_tooltip": "\uCD5C\uADFC \uD30C\uC77C \uC9C0\uC6B0\uAE30",
|
|
37018
|
-
"modal.recents.empty": "\uC544\uC9C1 \uCD5C\uADFC \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
37019
|
-
"modal.recents.cant_open": "{name}\uC744(\uB97C) \uC5F4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
37020
37068
|
"palette.placeholder": "\uBA85\uB839\uC744 \uC785\uB825\uD558\uAC70\uB098 \uB9CC\uB4E4 \uB0B4\uC6A9\uC744 \uC124\uBA85\uD558\uC138\uC694...",
|
|
37021
37069
|
"palette.title": "\uBA85\uB839 \uD314\uB808\uD2B8",
|
|
37022
37070
|
"palette.generating": "\uC0DD\uC131 \uC911...",
|
|
@@ -37359,11 +37407,6 @@ var init_translations = __esm({
|
|
|
37359
37407
|
"modal.fork.description": "Meld je aan om je eigen bewerkbare kopie te maken. Je wijzigingen raken het origineel niet \u2014 je krijgt een nieuwe fork in je account.",
|
|
37360
37408
|
"modal.fork.keep_viewing": "Blijven bekijken",
|
|
37361
37409
|
"modal.fork.signin": "Meld je aan om te forken",
|
|
37362
|
-
"modal.recents.title": "Recente bestanden",
|
|
37363
|
-
"modal.recents.clear": "Wissen",
|
|
37364
|
-
"modal.recents.clear_tooltip": "Recente bestanden wissen",
|
|
37365
|
-
"modal.recents.empty": "Nog geen recente bestanden.",
|
|
37366
|
-
"modal.recents.cant_open": "Kon {name} niet openen",
|
|
37367
37410
|
"palette.placeholder": "Typ een opdracht of beschrijf wat je wilt maken...",
|
|
37368
37411
|
"palette.title": "Opdrachtenpalet",
|
|
37369
37412
|
"palette.generating": "Bezig met genereren...",
|
|
@@ -37706,11 +37749,6 @@ var init_translations = __esm({
|
|
|
37706
37749
|
"modal.fork.description": "Zaloguj si\u0119, aby utworzy\u0107 w\u0142asn\u0105 edytowaln\u0105 kopi\u0119. Twoje zmiany nie wp\u0142yn\u0105 na orygina\u0142 \u2014 otrzymasz \u015Bwie\u017C\u0105 kopi\u0119 na swoim koncie.",
|
|
37707
37750
|
"modal.fork.keep_viewing": "Kontynuuj przegl\u0105danie",
|
|
37708
37751
|
"modal.fork.signin": "Zaloguj si\u0119, aby utworzy\u0107 kopi\u0119",
|
|
37709
|
-
"modal.recents.title": "Ostatnie pliki",
|
|
37710
|
-
"modal.recents.clear": "Wyczy\u015B\u0107",
|
|
37711
|
-
"modal.recents.clear_tooltip": "Wyczy\u015B\u0107 ostatnie pliki",
|
|
37712
|
-
"modal.recents.empty": "Brak ostatnich plik\xF3w.",
|
|
37713
|
-
"modal.recents.cant_open": "Nie mo\u017Cna otworzy\u0107 {name}",
|
|
37714
37752
|
"palette.placeholder": "Wpisz polecenie lub opisz, co utworzy\u0107...",
|
|
37715
37753
|
"palette.title": "Paleta polece\u0144",
|
|
37716
37754
|
"palette.generating": "Generowanie...",
|
|
@@ -38053,11 +38091,6 @@ var init_translations = __esm({
|
|
|
38053
38091
|
"modal.fork.description": "Entre para criar sua pr\xF3pria c\xF3pia edit\xE1vel. Suas edi\xE7\xF5es n\xE3o afetar\xE3o o original \u2014 voc\xEA ter\xE1 uma nova bifurca\xE7\xE3o em sua conta.",
|
|
38054
38092
|
"modal.fork.keep_viewing": "Continuar visualizando",
|
|
38055
38093
|
"modal.fork.signin": "Entre para bifurcar",
|
|
38056
|
-
"modal.recents.title": "Arquivos Recentes",
|
|
38057
|
-
"modal.recents.clear": "Limpar",
|
|
38058
|
-
"modal.recents.clear_tooltip": "Limpar arquivos recentes",
|
|
38059
|
-
"modal.recents.empty": "Nenhum arquivo recente ainda.",
|
|
38060
|
-
"modal.recents.cant_open": "N\xE3o foi poss\xEDvel abrir {name}",
|
|
38061
38094
|
"palette.placeholder": "Digite um comando ou descreva o que criar...",
|
|
38062
38095
|
"palette.title": "Paleta de Comandos",
|
|
38063
38096
|
"palette.generating": "Gerando...",
|
|
@@ -38400,11 +38433,6 @@ var init_translations = __esm({
|
|
|
38400
38433
|
"modal.fork.description": "\u0412\u043E\u0439\u0434\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u0443\u044E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u043C\u0443\u044E \u043A\u043E\u043F\u0438\u044E. \u0412\u0430\u0448\u0438 \u043F\u0440\u0430\u0432\u043A\u0438 \u043D\u0435 \u0437\u0430\u0442\u0440\u043E\u043D\u0443\u0442 \u043E\u0440\u0438\u0433\u0438\u043D\u0430\u043B \u2014 \u0432\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u043A\u043E\u043F\u0438\u044E \u0432 \u0441\u0432\u043E\u0451\u043C \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0435.",
|
|
38401
38434
|
"modal.fork.keep_viewing": "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",
|
|
38402
38435
|
"modal.fork.signin": "\u0412\u043E\u0439\u0442\u0438 \u0438 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043A\u043E\u043F\u0438\u044E",
|
|
38403
|
-
"modal.recents.title": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B",
|
|
38404
|
-
"modal.recents.clear": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
|
|
38405
|
-
"modal.recents.clear_tooltip": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B",
|
|
38406
|
-
"modal.recents.empty": "\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u043D\u0435\u0434\u0430\u0432\u043D\u0438\u0445 \u0444\u0430\u0439\u043B\u043E\u0432.",
|
|
38407
|
-
"modal.recents.cant_open": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C {name}",
|
|
38408
38436
|
"palette.placeholder": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0438\u043B\u0438 \u043E\u043F\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u043E\u0437\u0434\u0430\u0442\u044C...",
|
|
38409
38437
|
"palette.title": "\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u043A\u043E\u043C\u0430\u043D\u0434",
|
|
38410
38438
|
"palette.generating": "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F...",
|
|
@@ -38747,11 +38775,6 @@ var init_translations = __esm({
|
|
|
38747
38775
|
"modal.fork.description": "Kendi d\xFCzenlenebilir kopyan\u0131z\u0131 olu\u015Fturmak i\xE7in giri\u015F yap\u0131n. D\xFCzenlemeleriniz orijinali etkilemeyecek \u2014 hesab\u0131n\u0131zda yeni bir \xE7atal alacaks\u0131n\u0131z.",
|
|
38748
38776
|
"modal.fork.keep_viewing": "G\xF6r\xFCnt\xFClemeye devam et",
|
|
38749
38777
|
"modal.fork.signin": "\xC7atallamak i\xE7in giri\u015F yap",
|
|
38750
|
-
"modal.recents.title": "Son Dosyalar",
|
|
38751
|
-
"modal.recents.clear": "Temizle",
|
|
38752
|
-
"modal.recents.clear_tooltip": "Son dosyalar\u0131 temizle",
|
|
38753
|
-
"modal.recents.empty": "Hen\xFCz son dosya yok.",
|
|
38754
|
-
"modal.recents.cant_open": "{name} a\xE7\u0131lamad\u0131",
|
|
38755
38778
|
"palette.placeholder": "Bir komut yaz\u0131n veya ne olu\u015Fturmak istedi\u011Finizi tan\u0131mlay\u0131n...",
|
|
38756
38779
|
"palette.title": "Komut Paleti",
|
|
38757
38780
|
"palette.generating": "Olu\u015Fturuluyor...",
|
|
@@ -39094,11 +39117,6 @@ var init_translations = __esm({
|
|
|
39094
39117
|
"modal.fork.description": "\u767B\u5F55\u4EE5\u521B\u5EFA\u4F60\u81EA\u5DF1\u7684\u53EF\u7F16\u8F91\u526F\u672C\u3002\u4F60\u7684\u4FEE\u6539\u4E0D\u4F1A\u5F71\u54CD\u539F\u6587\u6863\u2014\u2014\u4F60\u5C06\u5728\u81EA\u5DF1\u7684\u8D26\u6237\u4E2D\u83B7\u5F97\u4E00\u4EFD\u65B0\u7684\u526F\u672C\u3002",
|
|
39095
39118
|
"modal.fork.keep_viewing": "\u7EE7\u7EED\u67E5\u770B",
|
|
39096
39119
|
"modal.fork.signin": "\u767B\u5F55\u4EE5\u521B\u5EFA\u526F\u672C",
|
|
39097
|
-
"modal.recents.title": "\u6700\u8FD1\u6587\u4EF6",
|
|
39098
|
-
"modal.recents.clear": "\u6E05\u9664",
|
|
39099
|
-
"modal.recents.clear_tooltip": "\u6E05\u9664\u6700\u8FD1\u6587\u4EF6",
|
|
39100
|
-
"modal.recents.empty": "\u6682\u65E0\u6700\u8FD1\u6587\u4EF6\u3002",
|
|
39101
|
-
"modal.recents.cant_open": "\u65E0\u6CD5\u6253\u5F00 {name}",
|
|
39102
39120
|
"palette.placeholder": "\u8F93\u5165\u547D\u4EE4\u6216\u63CF\u8FF0\u8981\u521B\u5EFA\u7684\u5185\u5BB9...",
|
|
39103
39121
|
"palette.title": "\u547D\u4EE4\u9762\u677F",
|
|
39104
39122
|
"palette.generating": "\u6B63\u5728\u751F\u6210...",
|
|
@@ -39441,11 +39459,6 @@ var init_translations = __esm({
|
|
|
39441
39459
|
"modal.fork.description": "\u767B\u5165\u4EE5\u5EFA\u7ACB\u60A8\u81EA\u5DF1\u7684\u53EF\u7DE8\u8F2F\u526F\u672C\u3002\u60A8\u7684\u7DE8\u8F2F\u4E0D\u6703\u5F71\u97FF\u539F\u59CB\u6587\u4EF6\uFF0C\u60A8\u5C07\u5728\u5E33\u6236\u4E2D\u53D6\u5F97\u5168\u65B0\u7684\u5206\u652F\u526F\u672C\u3002",
|
|
39442
39460
|
"modal.fork.keep_viewing": "\u7E7C\u7E8C\u6AA2\u8996",
|
|
39443
39461
|
"modal.fork.signin": "\u767B\u5165\u4EE5\u8907\u88FD\u5206\u652F",
|
|
39444
|
-
"modal.recents.title": "\u6700\u8FD1\u7684\u6A94\u6848",
|
|
39445
|
-
"modal.recents.clear": "\u6E05\u9664",
|
|
39446
|
-
"modal.recents.clear_tooltip": "\u6E05\u9664\u6700\u8FD1\u7684\u6A94\u6848",
|
|
39447
|
-
"modal.recents.empty": "\u5C1A\u7121\u6700\u8FD1\u7684\u6A94\u6848\u3002",
|
|
39448
|
-
"modal.recents.cant_open": "\u7121\u6CD5\u958B\u555F {name}",
|
|
39449
39462
|
"palette.placeholder": "\u8F38\u5165\u547D\u4EE4\u6216\u63CF\u8FF0\u8981\u5EFA\u7ACB\u7684\u5167\u5BB9\u2026",
|
|
39450
39463
|
"palette.title": "\u547D\u4EE4\u9762\u677F",
|
|
39451
39464
|
"palette.generating": "\u7522\u751F\u4E2D\u2026",
|
|
@@ -41878,6 +41891,34 @@ var init_CHANGELOG = __esm({
|
|
|
41878
41891
|
"run_erc"
|
|
41879
41892
|
]
|
|
41880
41893
|
},
|
|
41894
|
+
{
|
|
41895
|
+
id: "2026-10-20-remove-tauri-desktop",
|
|
41896
|
+
version: "0.10.0",
|
|
41897
|
+
date: "2026-10-20",
|
|
41898
|
+
category: "breaking",
|
|
41899
|
+
title: "Tauri desktop app removed",
|
|
41900
|
+
summary: "The Tauri desktop app (.dmg/.msi/.AppImage) is discontinued. Use vcad.io in the browser, or the native SwiftUI Mac app in apple/VcadApp on macOS.",
|
|
41901
|
+
features: [
|
|
41902
|
+
"desktop",
|
|
41903
|
+
"app"
|
|
41904
|
+
],
|
|
41905
|
+
breaking: {
|
|
41906
|
+
description: "No more desktop installers or auto-updates. Desktop-only features are gone: native menus, context menus, file dialogs and recent files, OS notifications, the vcad:// deep links and desktop magic-link sign-in, and the built-in Bambu printer bridge.",
|
|
41907
|
+
migration: "Use https://vcad.io (printing works through the local relay at 127.0.0.1:7878) or build apple/VcadApp with build-ffi.sh and bundle.sh."
|
|
41908
|
+
}
|
|
41909
|
+
},
|
|
41910
|
+
{
|
|
41911
|
+
id: "2026-10-20-pcb3d-kernel-ratsnest",
|
|
41912
|
+
version: "undefined",
|
|
41913
|
+
date: "2026-10-20",
|
|
41914
|
+
category: "fix",
|
|
41915
|
+
title: "3D PCB ratsnest matches the 2D view and autorouter",
|
|
41916
|
+
summary: "The 3D board view now draws the kernel's minimum-spanning-tree ratsnest instead of a TS approximation that hid a whole net once any trace on it existed.",
|
|
41917
|
+
features: [
|
|
41918
|
+
"electronics",
|
|
41919
|
+
"pcb"
|
|
41920
|
+
]
|
|
41921
|
+
},
|
|
41881
41922
|
{
|
|
41882
41923
|
id: "2026-10-20-live-part-stock-check",
|
|
41883
41924
|
version: "0.10.0",
|
|
@@ -41936,6 +41977,18 @@ var init_CHANGELOG = __esm({
|
|
|
41936
41977
|
"get_footprint"
|
|
41937
41978
|
]
|
|
41938
41979
|
},
|
|
41980
|
+
{
|
|
41981
|
+
id: "2026-10-20-ai-update-targets-owner",
|
|
41982
|
+
version: "undefined",
|
|
41983
|
+
date: "2026-10-20",
|
|
41984
|
+
category: "fix",
|
|
41985
|
+
title: "AI edits change the part you asked for",
|
|
41986
|
+
summary: "AI update calls now change the part that owns the given node instead of the first part in the document, and bulk material changes refuse unknown parts instead of half-applying.",
|
|
41987
|
+
features: [
|
|
41988
|
+
"ai",
|
|
41989
|
+
"chat"
|
|
41990
|
+
]
|
|
41991
|
+
},
|
|
41939
41992
|
{
|
|
41940
41993
|
id: "2026-10-19-plane-stub-drc-exemption",
|
|
41941
41994
|
version: "0.10.0",
|
|
@@ -86821,8 +86874,8 @@ var init_server3 = __esm({
|
|
|
86821
86874
|
init_order_feed();
|
|
86822
86875
|
init_animate();
|
|
86823
86876
|
PKG_VERSION = (() => {
|
|
86824
|
-
if ("0.10.0-main.
|
|
86825
|
-
return "0.10.0-main.
|
|
86877
|
+
if ("0.10.0-main.105") {
|
|
86878
|
+
return "0.10.0-main.105";
|
|
86826
86879
|
}
|
|
86827
86880
|
try {
|
|
86828
86881
|
const req = createRequire2(import.meta.url);
|
|
@@ -86831,8 +86884,8 @@ var init_server3 = __esm({
|
|
|
86831
86884
|
return "0.0.0";
|
|
86832
86885
|
}
|
|
86833
86886
|
})();
|
|
86834
|
-
BUILD_SHA = "
|
|
86835
|
-
BUILD_TIME = "2026-10-
|
|
86887
|
+
BUILD_SHA = "ae48039994dc8149dae73f8a5fbeb73dd9012575";
|
|
86888
|
+
BUILD_TIME = "2026-10-20T20:00:38.184Z";
|
|
86836
86889
|
SHORT_SHA = BUILD_SHA === "unknown" ? "unknown" : BUILD_SHA.slice(0, 7);
|
|
86837
86890
|
VERSION_WITH_BUILD = SHORT_SHA === "unknown" ? PKG_VERSION : `${PKG_VERSION}+${SHORT_SHA}`;
|
|
86838
86891
|
INSTANCE_ID = randomUUID7().slice(0, 8);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcad/mcp",
|
|
3
|
-
"version": "0.10.0-main.
|
|
3
|
+
"version": "0.10.0-main.105",
|
|
4
4
|
"description": "vcad MCP server — parametric CAD + PCB design tools for AI agents (self-contained: bundled server + kernel WASM)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://vcad.io",
|
|
21
21
|
"vcadBuild": {
|
|
22
|
-
"sha": "
|
|
23
|
-
"builtAt": "2026-10-
|
|
22
|
+
"sha": "ae48039994dc8149dae73f8a5fbeb73dd9012575",
|
|
23
|
+
"builtAt": "2026-10-20T20:00:38.184Z"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/vcad_kernel_wasm_bg.wasm
CHANGED
|
Binary file
|