dsh-drawai 0.3.2 → 0.3.3

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/lib/client.js +3 -2
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -5750,7 +5750,7 @@ window.__ModuleLoader__.load({
5750
5750
  } catch (error) { invalid = error.message }
5751
5751
  return React.createElement('div', { ref: panelRef, tabIndex: props.inline ? undefined : -1, className: props.inline ? 'drawai-video-trace-inline' : 'drawai-video-preview', role: props.inline ? 'group' : 'dialog', 'aria-modal': props.inline ? undefined : true, 'aria-label': '视频分段复刻',
5752
5752
  style: props.inline ? undefined : { alignItems: 'center', justifyContent: 'center' },
5753
- onKeyDown: (event) => { event.stopPropagation(); if (event.key === 'Escape') { if (busy) props.onCancel(); else props.onClose() } },
5753
+ onKeyDown: (event) => { event.stopPropagation(); if (event.key === 'Escape') { if (busy) { if (props.onCancel) props.onCancel() } else props.onClose() } },
5754
5754
  onPointerDown: (event) => event.stopPropagation() },
5755
5755
  React.createElement('div', { className: 'drawai-export-panel', style: props.inline ? undefined : { padding: '20px', width: '360px', maxWidth: '100%', boxSizing: 'border-box', maxHeight: '100%', overflow: 'auto', borderRadius: '12px' } },
5756
5756
  React.createElement('div', { className: 'drawai-popover-title' }, '视频分段复刻'),
@@ -5771,7 +5771,8 @@ window.__ModuleLoader__.load({
5771
5771
  React.createElement('div', { className: 'drawai-export-info' }, '画质、帧率和范围由你决定。提高尺寸、帧率或时长会增加处理时间与文件大小;小视频不放大。原视频保留,结果不含音轨。'),
5772
5772
  job ? React.createElement('div', { role: job.error ? 'alert' : 'status', 'aria-live': 'polite' }, job.message) : null,
5773
5773
  submitError ? React.createElement('div', { role: 'alert', className: 'drawai-err' }, submitError) : null,
5774
- busy ? React.createElement('progress', { value: job.done || 0, max: job.total || 1, 'aria-label': '视频复刻进度', style: { width: '100%' } }) : null,
5774
+ // 排队模式只给 queued/onStart/onClose,提交中 busy=true 但还没有 job:进度条退化为不确定态。
5775
+ busy ? React.createElement('progress', { value: job ? job.done || 0 : undefined, max: job ? job.total || 1 : undefined, 'aria-label': '视频复刻进度', style: { width: '100%' } }) : null,
5775
5776
  job && job.svg ? React.createElement('img', { src: 'data:image/svg+xml,' + encodeURIComponent(job.svg), alt: '最近完成的 SVG 帧', style: { width: '100%', maxHeight: '180px', objectFit: 'contain' } }) : null,
5776
5777
  React.createElement('div', { className: 'drawai-layer-footer' },
5777
5778
  props.inline ? null : React.createElement('button', { type: 'button', className: 'drawai-btn', onClick: busy ? props.onCancel : props.onClose }, busy ? '取消复刻' : '关闭'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-drawai",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "description": "DSH 右侧栏的可编辑画布 + AI 语义绘图工具(diagram_apply / diagram_read),直接读写原生 .drawio 文件",
6
6
  "license": "MIT",