dsh-cad-studio 0.2.6 → 0.2.8

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.
Files changed (2) hide show
  1. package/client.js +19 -11
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -69,7 +69,7 @@ window.__ModuleLoader__.load({
69
69
  // ── activity rail (VSCode's left bar, sized for a 1/3-screen pane) ──
70
70
  rail: { flex: 'none', width: 28, display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2, padding: '4px 0', borderRight: '1px solid' },
71
71
  railBtn: (active) => ({
72
- width: 24, height: 24, display: 'flex', alignItems: 'center', justifyContent: 'center',
72
+ width: 26, height: 26, display: 'flex', alignItems: 'center', justifyContent: 'center',
73
73
  border: 'none', borderRadius: 5, padding: 0, cursor: 'pointer', background: active ? 'rgba(77,107,254,0.16)' : 'transparent',
74
74
  color: active ? '#4d6bfe' : 'inherit', opacity: active ? 1 : 0.62,
75
75
  boxShadow: active ? 'inset 2px 0 0 #4d6bfe' : 'none',
@@ -367,7 +367,7 @@ window.__ModuleLoader__.load({
367
367
 
368
368
  /** Rail glyphs — 15px so the 28px rail stays a strip, not a column. */
369
369
  function RailIcon({ name }) {
370
- const common = { width: 15, height: 15, viewBox: '0 0 16 16', fill: 'none', stroke: 'currentColor', strokeWidth: 1.3, strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': 'true' }
370
+ const common = { width: 17, height: 17, viewBox: '0 0 16 16', fill: 'none', stroke: 'currentColor', strokeWidth: 1.25, strokeLinecap: 'round', strokeLinejoin: 'round', 'aria-hidden': 'true' }
371
371
  if (name === 'parts') {
372
372
  return h('svg', common, [
373
373
  h('path', { key: 'a', d: 'M8 1.6 13.7 4.9v6.2L8 14.4 2.3 11.1V4.9L8 1.6Z' }),
@@ -375,11 +375,19 @@ window.__ModuleLoader__.load({
375
375
  ])
376
376
  }
377
377
  if (name === 'view') {
378
+ // A camera: which angle am I looking from, and what gets drawn.
378
379
  return h('svg', common, [
379
- h('path', { key: 'x', d: 'M2.6 12.6 9 6.2' }),
380
- h('path', { key: 'y', d: 'M2.6 12.6h9.2' }),
381
- h('path', { key: 'z', d: 'M2.6 12.6V3.4' }),
382
- h('path', { key: 'xh', d: 'M9 6.2l-2.2.6 1.6 1.6' }),
380
+ h('path', { key: 'body', d: 'M2.3 5.9h11.4a1 1 0 0 1 1 1v5.4a1 1 0 0 1-1 1H2.3a1 1 0 0 1-1-1V6.9a1 1 0 0 1 1-1Z' }),
381
+ h('path', { key: 'bump', d: 'M5.5 5.9 6.5 4.2h3l1 1.7' }),
382
+ h('circle', { key: 'lens', cx: 8, cy: 9.6, r: 2.2 }),
383
+ ])
384
+ }
385
+ if (name === 'features') {
386
+ // A ziggurat: the shape as a stack of machining steps.
387
+ return h('svg', common, [
388
+ h('path', { key: 'b1', d: 'M2.4 10.2h11.2v3.3H2.4z' }),
389
+ h('path', { key: 'b2', d: 'M3.9 6.9h8.2v3.3H3.9z' }),
390
+ h('path', { key: 'b3', d: 'M5.4 3.6h5.2v3.3H5.4z' }),
383
391
  ])
384
392
  }
385
393
  if (name === 'models') {
@@ -397,12 +405,11 @@ window.__ModuleLoader__.load({
397
405
  ])
398
406
  }
399
407
  if (name === 'motion') {
400
- // A joint/pivot: an axis with an arc around it.
408
+ // A revolute joint: rotation axis with a circular arrow around it.
401
409
  return h('svg', common, [
402
- h('path', { key: 'a', d: 'M8 2.4v11.2' }),
403
- h('path', { key: 'b', d: 'M3.1 8a4.9 4.9 0 0 1 4.9-4.9' }),
404
- h('path', { key: 'c', d: 'M12.9 8A4.9 4.9 0 0 1 8 12.9' }),
405
- h('path', { key: 'd', d: 'M10.6 3.1 8 2.4l-.7 2.6M5.4 12.9 8 13.6l.7-2.6' }),
410
+ h('path', { key: 'a', d: 'M8 3.2v9.6' }),
411
+ h('path', { key: 'b', d: 'M8 5.1a2.9 2.9 0 1 1-2.8 3.6' }),
412
+ h('path', { key: 'c', d: 'M5.3 8.6 4.2 8l-.2 1.5' }),
406
413
  ])
407
414
  }
408
415
  return h('svg', common, [
@@ -2386,6 +2393,7 @@ const FILE_EXTS = ['step', 'stp', 'iges', 'igs', 'brep', 'stl']
2386
2393
  style: styles.railBtn(panel === item.id),
2387
2394
  'data-cad-rail': item.id,
2388
2395
  'aria-pressed': panel === item.id ? 'true' : 'false',
2396
+ 'aria-label': item.label,
2389
2397
  title: item.label,
2390
2398
  onClick: () => { setAddOpen(false); setPanel((p) => (p === item.id ? '' : item.id)) },
2391
2399
  }, h(RailIcon, { name: item.id })))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-cad-studio",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "description": "CAD Studio — FreeCAD 桥(给 AI 的 14 个工具)+ Web 右栏 3D 面板:建模/装配/关节运动/出图/多页签查看",
6
6
  "exports": {