@open-slide/core 2.0.0-beta.3 → 2.0.0-beta.6

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 (51) hide show
  1. package/README.md +1 -1
  2. package/dist/{build-Bzy-qlGc.js → build-Cu5_qRyE.js} +1 -1
  3. package/dist/cli/bin.js +3 -3
  4. package/dist/{config-nbSvY7z_.js → config-BQ6rD2iE.js} +226 -27
  5. package/dist/{config-DjWifhaA.d.ts → config-GMR1QUlM.d.ts} +1 -1
  6. package/dist/{dev-MXa5Tod4.js → dev-BK641O5e.js} +1 -1
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.js +1 -1
  9. package/dist/locale/index.d.ts +1 -1
  10. package/dist/locale/index.js +1 -1
  11. package/dist/{preview-DEpQcKz3.js → preview-BuCI-RMW.js} +1 -1
  12. package/dist/{types-BWg-Dtbg.d.ts → types-BcbaKTNY.d.ts} +60 -0
  13. package/dist/vite/index.d.ts +1 -1
  14. package/dist/vite/index.js +1 -1
  15. package/dist/{zh-tw-DlKyeNX7.js → zh-tw-DlZoAc2-.js} +271 -35
  16. package/package.json +6 -6
  17. package/src/app/components/asset-view.tsx +448 -0
  18. package/src/app/components/history-provider.tsx +68 -44
  19. package/src/app/components/icon-switcher-indicator.tsx +10 -0
  20. package/src/app/components/inspector/arrange-panel.tsx +449 -0
  21. package/src/app/components/inspector/inline-text-editor.tsx +170 -284
  22. package/src/app/components/inspector/inspect-overlay.tsx +642 -295
  23. package/src/app/components/inspector/inspector-panel.tsx +434 -427
  24. package/src/app/components/inspector/inspector-provider.tsx +564 -293
  25. package/src/app/components/inspector/save-bar.tsx +36 -0
  26. package/src/app/components/note-markdown.test.tsx +42 -0
  27. package/src/app/components/note-markdown.tsx +85 -0
  28. package/src/app/components/panel/editor-sidebar.tsx +50 -0
  29. package/src/app/components/panel/panel-fields.tsx +204 -16
  30. package/src/app/components/panel/panel-shell.tsx +3 -18
  31. package/src/app/components/style-panel/style-panel.tsx +4 -69
  32. package/src/app/lib/assets.ts +33 -0
  33. package/src/app/lib/export-html.ts +48 -5
  34. package/src/app/lib/inspector/geometry.test.ts +324 -0
  35. package/src/app/lib/inspector/geometry.ts +207 -0
  36. package/src/app/lib/inspector/text-edit-timeline.test.ts +121 -0
  37. package/src/app/lib/inspector/text-edit-timeline.ts +12 -0
  38. package/src/app/lib/inspector/text-selection.ts +117 -0
  39. package/src/app/lib/inspector/use-editor.ts +1 -1
  40. package/src/app/lib/inspector/use-visual-editor.ts +429 -0
  41. package/src/app/lib/inspector/visual-dom.ts +255 -0
  42. package/src/app/lib/keys.ts +9 -0
  43. package/src/app/lib/note-markdown.test.ts +147 -0
  44. package/src/app/lib/note-markdown.ts +116 -0
  45. package/src/app/routes/presenter.tsx +3 -2
  46. package/src/app/routes/slide.tsx +34 -9
  47. package/src/locale/en.ts +71 -9
  48. package/src/locale/ja.ts +73 -8
  49. package/src/locale/types.ts +60 -0
  50. package/src/locale/zh-cn.ts +69 -9
  51. package/src/locale/zh-tw.ts +69 -9
package/src/locale/en.ts CHANGED
@@ -197,6 +197,54 @@ export const en: Locale = {
197
197
  },
198
198
 
199
199
  inspector: {
200
+ format: 'Format',
201
+ editMode: 'Edit',
202
+ previewMode: 'Preview',
203
+ closeFormatPanel: 'Close Format panel',
204
+ editText: 'Edit on slide',
205
+ emptySelectionTitle: 'Select an object',
206
+ emptySelectionHint: 'Click an object to format it. Double-click text to edit.',
207
+ textSelectionHint: 'Formatting applies to the selected text.',
208
+ elementText: 'Text',
209
+ elementImage: 'Image',
210
+ elementShape: 'Shape',
211
+ sourceSection: 'Source',
212
+ rotateHandle: 'Rotate element',
213
+ resizeHandle: 'Resize {handle}',
214
+ arrangeSection: 'Arrange',
215
+ selectionCount: '{count} elements selected',
216
+ positionLabel: 'Position',
217
+ positionX: 'Horizontal position',
218
+ positionY: 'Vertical position',
219
+ widthLabel: 'Width',
220
+ heightLabel: 'Height',
221
+ rotationLabel: 'Rotation',
222
+ alignToLabel: 'Align to',
223
+ alignToSelection: 'Selection',
224
+ alignToSlide: 'Slide',
225
+ alignLeft: 'Align left',
226
+ alignCenter: 'Align horizontal centers',
227
+ alignRight: 'Align right',
228
+ alignTop: 'Align top',
229
+ alignMiddle: 'Align vertical centers',
230
+ alignBottom: 'Align bottom',
231
+ distributeLabel: 'Distribute',
232
+ distributeHorizontal: 'Distribute horizontally',
233
+ distributeVertical: 'Distribute vertically',
234
+ layerLabel: 'Layer',
235
+ bringToFront: 'Bring to front',
236
+ bringForward: 'Bring forward',
237
+ sendBackward: 'Send backward',
238
+ sendToBack: 'Send to back',
239
+ smartGuides: 'Smart guides',
240
+ selectParent: 'Select parent',
241
+ visualEditorHint:
242
+ 'Shift-click to select more. ⌘A selects all. Arrows move 1 px; Shift moves 10 px. Alt ignores guides. Shift constrains drag or keeps resize proportions.',
243
+ sharedLayoutHint:
244
+ 'This element shares its JSX definition with other instances. Select a unique parent container to arrange it independently.',
245
+ inlineLayoutHint: 'Select the parent container to move or resize inline content.',
246
+ layerLayoutHint:
247
+ 'Some nested content cannot be positioned independently. Select a positioned parent to change layers.',
200
248
  inspect: 'Inspect',
201
249
  deselect: 'Deselect',
202
250
  agentWatching: 'Agent is watching',
@@ -214,12 +262,12 @@ export const en: Locale = {
214
262
  elementTextPlaceholder: 'Element text',
215
263
  sizeLabel: 'Size',
216
264
  weightLabel: 'Weight',
217
- weightLight: 'Light · 300',
218
- weightRegular: 'Regular · 400',
219
- weightMedium: 'Medium · 500',
220
- weightSemibold: 'Semibold · 600',
221
- weightBold: 'Bold · 700',
222
- weightExtrabold: 'Extrabold · 800',
265
+ weightLight: 'Light',
266
+ weightRegular: 'Regular',
267
+ weightMedium: 'Medium',
268
+ weightSemibold: 'Semibold',
269
+ weightBold: 'Bold',
270
+ weightExtrabold: 'Extrabold',
223
271
  styleLabel: 'Style',
224
272
  boldAria: 'Bold',
225
273
  italicAria: 'Italic',
@@ -239,7 +287,7 @@ export const en: Locale = {
239
287
  cropFitCover: 'Fill',
240
288
  cropFitContain: 'Fit',
241
289
  cropApply: 'Apply',
242
- leaveComment: 'Leave a comment',
290
+ leaveComment: 'Comment',
243
291
  commentPlaceholder: 'Describe a change for the agent…',
244
292
  commentShortcutHint: '⌘/ to focus · ⌘↵ to add',
245
293
  addComment: 'Add comment',
@@ -252,7 +300,7 @@ export const en: Locale = {
252
300
  other: '{count} comments',
253
301
  },
254
302
  commentLineLabel: 'line {n}',
255
- commentsEmpty: 'No comments yet. Toggle Inspect and click a slide element.',
303
+ commentsEmpty: 'No comments yet. Select an object and open Comment in the Format panel.',
256
304
  commentsApplyHintPrefix: 'Run ',
257
305
  commentsApplyHintSuffix: ' in your agent to apply these.',
258
306
  commentDeleteAria: 'Delete',
@@ -321,6 +369,7 @@ export const en: Locale = {
321
369
  noMatchingAssetsHint: 'Try adjusting your search or filters.',
322
370
  clearFilters: 'Clear filters',
323
371
  searchLogos: 'Search logos',
372
+ searchFonts: 'Search fonts',
324
373
  upload: 'Upload',
325
374
  dropToUpload: 'Drop to upload',
326
375
  loading: 'Loading…',
@@ -358,6 +407,18 @@ export const en: Locale = {
358
407
  logoSearchEmptyHintSuffix: '.',
359
408
  logoVariantLight: 'Light',
360
409
  logoVariantDark: 'Dark',
410
+ fontSearchTitle: 'Search Google Fonts',
411
+ fontSearchPoweredByPrefix: 'Powered by ',
412
+ fontSearchPlaceholder: 'Search font families…',
413
+ fontSearchPreviewPlaceholder: 'Preview text',
414
+ fontSearchErrorTitle: "Couldn't reach Google Fonts",
415
+ fontSearchErrorBody: 'Check your connection and try again.',
416
+ fontSearchNoResults: 'No fonts for "{query}"',
417
+ fontSearchEmpty: 'No fonts available',
418
+ fontSearchEmptyHintPrefix: 'Try a different family name, or browse the full catalog at ',
419
+ fontSearchEmptyHintSuffix: '.',
420
+ fontWeightLabel: 'Weight',
421
+ fontPreviewSample: 'The quick brown fox jumps over the lazy dog 0123456789',
361
422
  toastUploadFailed: 'Upload failed ({status})',
362
423
  toastReplaced: 'Replaced {name}',
363
424
  toastUploadedAs: 'Uploaded as {name}',
@@ -367,6 +428,7 @@ export const en: Locale = {
367
428
  toastDeleteFailed: 'Delete failed ({status})',
368
429
  toastDeleted: 'Deleted {name}',
369
430
  toastDownloadFailed: 'Failed to download logo',
431
+ toastFontDownloadFailed: 'Failed to download font',
370
432
  toastSearchFailed: 'Search failed',
371
433
  },
372
434
 
@@ -451,7 +513,7 @@ export const en: Locale = {
451
513
  notesDrawer: {
452
514
  toggle: 'Notes',
453
515
  pageLabel: 'page {n}/{total}',
454
- placeholder: 'Write speaker notes for this slide…',
516
+ placeholder: 'Write speaker notes for this slide (Markdown supported)…',
455
517
  statusSaving: 'Saving…',
456
518
  statusSaved: 'Saved',
457
519
  statusError: 'Save failed: {msg}',
package/src/locale/ja.ts CHANGED
@@ -197,6 +197,56 @@ export const ja: Locale = {
197
197
  },
198
198
 
199
199
  inspector: {
200
+ format: 'フォーマット',
201
+ editMode: '編集',
202
+ previewMode: 'プレビュー',
203
+ closeFormatPanel: 'フォーマットパネルを閉じる',
204
+ editText: 'スライドで編集',
205
+ emptySelectionTitle: 'オブジェクトを選択',
206
+ emptySelectionHint:
207
+ 'オブジェクトをクリックして書式を設定します。テキストをダブルクリックして編集します。',
208
+ textSelectionHint: '選択したテキストに書式を適用します。',
209
+ elementText: 'テキスト',
210
+ elementImage: '画像',
211
+ elementShape: '図形',
212
+ sourceSection: 'ソース',
213
+ rotateHandle: '要素を回転',
214
+ resizeHandle: 'サイズ変更({handle})',
215
+ arrangeSection: '配置',
216
+ selectionCount: '{count} 個の要素を選択中',
217
+ positionLabel: '位置',
218
+ positionX: '水平位置',
219
+ positionY: '垂直位置',
220
+ widthLabel: '幅',
221
+ heightLabel: '高さ',
222
+ rotationLabel: '回転',
223
+ alignToLabel: '整列の基準',
224
+ alignToSelection: '選択範囲',
225
+ alignToSlide: 'スライド',
226
+ alignLeft: '左揃え',
227
+ alignCenter: '左右中央揃え',
228
+ alignRight: '右揃え',
229
+ alignTop: '上揃え',
230
+ alignMiddle: '上下中央揃え',
231
+ alignBottom: '下揃え',
232
+ distributeLabel: '均等配置',
233
+ distributeHorizontal: '左右に均等配置',
234
+ distributeVertical: '上下に均等配置',
235
+ layerLabel: '重なり順',
236
+ bringToFront: '最前面へ移動',
237
+ bringForward: '前面へ移動',
238
+ sendBackward: '背面へ移動',
239
+ sendToBack: '最背面へ移動',
240
+ smartGuides: 'スマートガイド',
241
+ selectParent: '親要素を選択',
242
+ visualEditorHint:
243
+ 'Shift クリックで複数選択、⌘A で全選択。矢印キーで 1 px、Shift を押すと 10 px 移動。Alt でスナップを無効化。Shift で移動方向や縦横比を固定。',
244
+ sharedLayoutHint:
245
+ 'この要素は他のインスタンスと JSX 定義を共有しています。個別に配置するには、固有の親コンテナを選択してください。',
246
+ inlineLayoutHint:
247
+ 'インライン要素を移動またはサイズ変更するには、親コンテナを選択してください。',
248
+ layerLayoutHint:
249
+ '一部の子要素は個別に配置できません。位置が設定された親コンテナを選択して重なり順を変更してください。',
200
250
  inspect: 'インスペクト',
201
251
  deselect: '選択解除',
202
252
  contentSection: 'コンテンツ',
@@ -209,12 +259,12 @@ export const ja: Locale = {
209
259
  elementTextPlaceholder: '要素のテキスト',
210
260
  sizeLabel: 'サイズ',
211
261
  weightLabel: 'ウェイト',
212
- weightLight: 'Light · 300',
213
- weightRegular: 'Regular · 400',
214
- weightMedium: 'Medium · 500',
215
- weightSemibold: 'Semibold · 600',
216
- weightBold: 'Bold · 700',
217
- weightExtrabold: 'Extrabold · 800',
262
+ weightLight: 'Light',
263
+ weightRegular: 'Regular',
264
+ weightMedium: 'Medium',
265
+ weightSemibold: 'Semibold',
266
+ weightBold: 'Bold',
267
+ weightExtrabold: 'Extrabold',
218
268
  styleLabel: 'スタイル',
219
269
  boldAria: '太字',
220
270
  italicAria: '斜体',
@@ -240,7 +290,7 @@ export const ja: Locale = {
240
290
  agentNotWatching: 'エージェント未接続',
241
291
  agentNotWatchingTooltip:
242
292
  'dev server との接続が切れたため、選択中の要素がエージェントに見えなくなっています。dev server を再起動して接続を復旧してください。',
243
- leaveComment: 'コメントを残す',
293
+ leaveComment: 'コメント',
244
294
  commentPlaceholder: 'エージェントに依頼する変更を記述…',
245
295
  commentShortcutHint: '⌘/ でフォーカス · ⌘↵ で追加',
246
296
  addComment: 'コメントを追加',
@@ -323,6 +373,7 @@ export const ja: Locale = {
323
373
  noMatchingAssetsHint: '検索条件またはフィルターを調整してください。',
324
374
  clearFilters: 'フィルターをクリア',
325
375
  searchLogos: 'ロゴを検索',
376
+ searchFonts: 'フォントを検索',
326
377
  upload: 'アップロード',
327
378
  dropToUpload: 'ドロップでアップロード',
328
379
  loading: '読み込み中…',
@@ -362,6 +413,19 @@ export const ja: Locale = {
362
413
  logoSearchEmptyHintSuffix: '。',
363
414
  logoVariantLight: 'ライト',
364
415
  logoVariantDark: 'ダーク',
416
+ fontSearchTitle: 'Google Fonts を検索',
417
+ fontSearchPoweredByPrefix: 'Powered by ',
418
+ fontSearchPlaceholder: 'フォントファミリーで検索…',
419
+ fontSearchPreviewPlaceholder: 'プレビューテキスト',
420
+ fontSearchErrorTitle: 'Google Fonts に接続できません',
421
+ fontSearchErrorBody: '接続を確認して再試行してください。',
422
+ fontSearchNoResults: '「{query}」のフォントは見つかりません',
423
+ fontSearchEmpty: '利用可能なフォントはありません',
424
+ fontSearchEmptyHintPrefix:
425
+ '別のファミリー名を試すか、次のサイトでカタログ全体を閲覧してください: ',
426
+ fontSearchEmptyHintSuffix: '。',
427
+ fontWeightLabel: 'ウェイト',
428
+ fontPreviewSample: 'いろはにほへと 永遠 ABCabc 0123456789',
365
429
  toastUploadFailed: 'アップロードに失敗しました ({status})',
366
430
  toastReplaced: '{name} を置き換えました',
367
431
  toastUploadedAs: '{name} としてアップロードしました',
@@ -371,6 +435,7 @@ export const ja: Locale = {
371
435
  toastDeleteFailed: '削除に失敗しました ({status})',
372
436
  toastDeleted: '{name} を削除しました',
373
437
  toastDownloadFailed: 'ロゴのダウンロードに失敗しました',
438
+ toastFontDownloadFailed: 'フォントのダウンロードに失敗しました',
374
439
  toastSearchFailed: '検索に失敗しました',
375
440
  },
376
441
 
@@ -455,7 +520,7 @@ export const ja: Locale = {
455
520
  notesDrawer: {
456
521
  toggle: '発表者ノート',
457
522
  pageLabel: '{n} / {total} ページ',
458
- placeholder: 'このスライドの発表者ノートを記入…',
523
+ placeholder: 'このスライドの発表者ノートを記入(Markdown 対応)…',
459
524
  statusSaving: '保存中…',
460
525
  statusSaved: '保存済み',
461
526
  statusError: '保存に失敗しました: {msg}',
@@ -200,6 +200,51 @@ export type Locale = {
200
200
  };
201
201
 
202
202
  inspector: {
203
+ format: string;
204
+ editMode: string;
205
+ previewMode: string;
206
+ closeFormatPanel: string;
207
+ editText: string;
208
+ emptySelectionTitle: string;
209
+ emptySelectionHint: string;
210
+ textSelectionHint: string;
211
+ elementText: string;
212
+ elementImage: string;
213
+ elementShape: string;
214
+ sourceSection: string;
215
+ rotateHandle: string;
216
+ resizeHandle: string;
217
+ arrangeSection: string;
218
+ selectionCount: string;
219
+ positionLabel: string;
220
+ positionX: string;
221
+ positionY: string;
222
+ widthLabel: string;
223
+ heightLabel: string;
224
+ rotationLabel: string;
225
+ alignToLabel: string;
226
+ alignToSelection: string;
227
+ alignToSlide: string;
228
+ alignLeft: string;
229
+ alignCenter: string;
230
+ alignRight: string;
231
+ alignTop: string;
232
+ alignMiddle: string;
233
+ alignBottom: string;
234
+ distributeLabel: string;
235
+ distributeHorizontal: string;
236
+ distributeVertical: string;
237
+ layerLabel: string;
238
+ bringToFront: string;
239
+ bringForward: string;
240
+ sendBackward: string;
241
+ sendToBack: string;
242
+ smartGuides: string;
243
+ selectParent: string;
244
+ visualEditorHint: string;
245
+ sharedLayoutHint: string;
246
+ inlineLayoutHint: string;
247
+ layerLayoutHint: string;
203
248
  inspect: string;
204
249
  deselect: string;
205
250
  agentWatching: string;
@@ -325,6 +370,7 @@ export type Locale = {
325
370
  noMatchingAssetsHint: string;
326
371
  clearFilters: string;
327
372
  searchLogos: string;
373
+ searchFonts: string;
328
374
  upload: string;
329
375
  dropToUpload: string;
330
376
  loading: string;
@@ -370,6 +416,19 @@ export type Locale = {
370
416
  logoSearchEmptyHintSuffix: string;
371
417
  logoVariantLight: string;
372
418
  logoVariantDark: string;
419
+ fontSearchTitle: string;
420
+ fontSearchPoweredByPrefix: string;
421
+ fontSearchPlaceholder: string;
422
+ fontSearchPreviewPlaceholder: string;
423
+ fontSearchErrorTitle: string;
424
+ fontSearchErrorBody: string;
425
+ /** template: 'No fonts for "{query}"' */
426
+ fontSearchNoResults: string;
427
+ fontSearchEmpty: string;
428
+ fontSearchEmptyHintPrefix: string;
429
+ fontSearchEmptyHintSuffix: string;
430
+ fontWeightLabel: string;
431
+ fontPreviewSample: string;
373
432
  /** template: "Upload failed ({status})" */
374
433
  toastUploadFailed: string;
375
434
  /** template: "Replaced {name}" */
@@ -387,6 +446,7 @@ export type Locale = {
387
446
  /** template: "Deleted {name}" */
388
447
  toastDeleted: string;
389
448
  toastDownloadFailed: string;
449
+ toastFontDownloadFailed: string;
390
450
  toastSearchFailed: string;
391
451
  };
392
452
 
@@ -196,6 +196,52 @@ export const zhCN: Locale = {
196
196
  },
197
197
 
198
198
  inspector: {
199
+ format: '格式',
200
+ editMode: '编辑',
201
+ previewMode: '预览',
202
+ closeFormatPanel: '关闭格式面板',
203
+ editText: '在幻灯片上编辑',
204
+ emptySelectionTitle: '选择一个对象',
205
+ emptySelectionHint: '单击对象即可调整格式。双击文字即可编辑。',
206
+ textSelectionHint: '格式将应用于选中的文字。',
207
+ elementText: '文字',
208
+ elementImage: '图片',
209
+ elementShape: '形状',
210
+ sourceSection: '源代码',
211
+ rotateHandle: '旋转元素',
212
+ resizeHandle: '调整尺寸({handle})',
213
+ arrangeSection: '排列',
214
+ selectionCount: '已选择 {count} 个元素',
215
+ positionLabel: '位置',
216
+ positionX: '水平位置',
217
+ positionY: '垂直位置',
218
+ widthLabel: '宽度',
219
+ heightLabel: '高度',
220
+ rotationLabel: '旋转',
221
+ alignToLabel: '对齐基准',
222
+ alignToSelection: '所选元素',
223
+ alignToSlide: '幻灯片',
224
+ alignLeft: '左对齐',
225
+ alignCenter: '水平居中',
226
+ alignRight: '右对齐',
227
+ alignTop: '顶部对齐',
228
+ alignMiddle: '垂直居中',
229
+ alignBottom: '底部对齐',
230
+ distributeLabel: '平均分布',
231
+ distributeHorizontal: '水平平均分布',
232
+ distributeVertical: '垂直平均分布',
233
+ layerLabel: '图层',
234
+ bringToFront: '置于顶层',
235
+ bringForward: '上移一层',
236
+ sendBackward: '下移一层',
237
+ sendToBack: '置于底层',
238
+ smartGuides: '智能参考线',
239
+ selectParent: '选择父级',
240
+ visualEditorHint:
241
+ '按住 Shift 点击可多选,⌘A 全选。方向键移动 1 px,按住 Shift 移动 10 px。Alt 暂停吸附。Shift 限制拖动方向或等比例缩放。',
242
+ sharedLayoutHint: '此元素与其他实例共用 JSX 定义。请选择独立的父级容器,以单独调整排列。',
243
+ inlineLayoutHint: '请选择父级容器,以移动行内内容或调整尺寸。',
244
+ layerLayoutHint: '部分内部内容无法独立定位。请选择已设置定位的父级容器,以调整图层。',
199
245
  inspect: '检查',
200
246
  deselect: '取消选择',
201
247
  contentSection: '内容',
@@ -208,12 +254,12 @@ export const zhCN: Locale = {
208
254
  elementTextPlaceholder: '元素文字',
209
255
  sizeLabel: '大小',
210
256
  weightLabel: '字重',
211
- weightLight: '细体 · 300',
212
- weightRegular: '常规 · 400',
213
- weightMedium: '中等 · 500',
214
- weightSemibold: '半粗 · 600',
215
- weightBold: '粗体 · 700',
216
- weightExtrabold: '特粗 · 800',
257
+ weightLight: '细体',
258
+ weightRegular: '常规',
259
+ weightMedium: '中等',
260
+ weightSemibold: '半粗',
261
+ weightBold: '粗体',
262
+ weightExtrabold: '特粗',
217
263
  styleLabel: '样式',
218
264
  boldAria: '粗体',
219
265
  italicAria: '斜体',
@@ -238,7 +284,7 @@ export const zhCN: Locale = {
238
284
  agentNotWatching: 'Agent 没在关注',
239
285
  agentNotWatchingTooltip:
240
286
  '已和 dev server 断开连接,agent 看不到你选的元素了。请重新启动 dev server 来恢复连接。',
241
- leaveComment: '留个 comment',
287
+ leaveComment: '评论',
242
288
  commentPlaceholder: '描述你希望代理执行的更改…',
243
289
  commentShortcutHint: '⌘/ 聚焦 · ⌘↵ 添加',
244
290
  addComment: '添加 comment',
@@ -251,7 +297,7 @@ export const zhCN: Locale = {
251
297
  other: '{count} 条评论',
252
298
  },
253
299
  commentLineLabel: '第 {n} 行',
254
- commentsEmpty: '暂无评论。开启「检查」并点击幻灯片元素。',
300
+ commentsEmpty: '还没有评论。选中对象后,在格式面板中打开“评论”。',
255
301
  commentsApplyHintPrefix: '在你的代理中运行 ',
256
302
  commentsApplyHintSuffix: ' 以应用这些更改。',
257
303
  commentDeleteAria: '删除',
@@ -320,6 +366,7 @@ export const zhCN: Locale = {
320
366
  noMatchingAssetsHint: '请调整搜索或筛选条件。',
321
367
  clearFilters: '清除筛选',
322
368
  searchLogos: '搜索 Logo',
369
+ searchFonts: '搜索字体',
323
370
  upload: '上传',
324
371
  dropToUpload: '拖入即可上传',
325
372
  loading: '加载中…',
@@ -357,6 +404,18 @@ export const zhCN: Locale = {
357
404
  logoSearchEmptyHintSuffix: '。',
358
405
  logoVariantLight: '浅色',
359
406
  logoVariantDark: '深色',
407
+ fontSearchTitle: '搜索 Google Fonts',
408
+ fontSearchPoweredByPrefix: '由 ',
409
+ fontSearchPlaceholder: '搜索字体家族…',
410
+ fontSearchPreviewPlaceholder: '预览文字',
411
+ fontSearchErrorTitle: '无法连接至 Google Fonts',
412
+ fontSearchErrorBody: '请检查网络连接后重试。',
413
+ fontSearchNoResults: '找不到「{query}」的字体',
414
+ fontSearchEmpty: '无可用字体',
415
+ fontSearchEmptyHintPrefix: '试试其他字体家族名,或在以下网站浏览完整目录: ',
416
+ fontSearchEmptyHintSuffix: '。',
417
+ fontWeightLabel: '字重',
418
+ fontPreviewSample: '永和九年 岁在癸丑 ABCabc 0123456789',
360
419
  toastUploadFailed: '上传失败 ({status})',
361
420
  toastReplaced: '已替换 {name}',
362
421
  toastUploadedAs: '已以 {name} 上传',
@@ -366,6 +425,7 @@ export const zhCN: Locale = {
366
425
  toastDeleteFailed: '删除失败 ({status})',
367
426
  toastDeleted: '已删除 {name}',
368
427
  toastDownloadFailed: '下载 Logo 失败',
428
+ toastFontDownloadFailed: '下载字体失败',
369
429
  toastSearchFailed: '搜索失败',
370
430
  },
371
431
 
@@ -450,7 +510,7 @@ export const zhCN: Locale = {
450
510
  notesDrawer: {
451
511
  toggle: '演讲备注',
452
512
  pageLabel: '第 {n} / {total} 页',
453
- placeholder: '为这一页撰写演讲备注…',
513
+ placeholder: '为这一页撰写演讲备注(支持 Markdown)…',
454
514
  statusSaving: '保存中…',
455
515
  statusSaved: '已保存',
456
516
  statusError: '保存失败:{msg}',
@@ -196,6 +196,52 @@ export const zhTW: Locale = {
196
196
  },
197
197
 
198
198
  inspector: {
199
+ format: '格式',
200
+ editMode: '編輯',
201
+ previewMode: '預覽',
202
+ closeFormatPanel: '關閉格式面板',
203
+ editText: '在投影片上編輯',
204
+ emptySelectionTitle: '選取一個物件',
205
+ emptySelectionHint: '按一下物件即可調整格式。按兩下文字即可編輯。',
206
+ textSelectionHint: '格式將套用至選取的文字。',
207
+ elementText: '文字',
208
+ elementImage: '圖片',
209
+ elementShape: '形狀',
210
+ sourceSection: '原始碼',
211
+ rotateHandle: '旋轉元素',
212
+ resizeHandle: '調整尺寸({handle})',
213
+ arrangeSection: '排列',
214
+ selectionCount: '已選取 {count} 個元素',
215
+ positionLabel: '位置',
216
+ positionX: '水平位置',
217
+ positionY: '垂直位置',
218
+ widthLabel: '寬度',
219
+ heightLabel: '高度',
220
+ rotationLabel: '旋轉',
221
+ alignToLabel: '對齊基準',
222
+ alignToSelection: '所選元素',
223
+ alignToSlide: '投影片',
224
+ alignLeft: '靠左對齊',
225
+ alignCenter: '水平置中',
226
+ alignRight: '靠右對齊',
227
+ alignTop: '靠上對齊',
228
+ alignMiddle: '垂直置中',
229
+ alignBottom: '靠下對齊',
230
+ distributeLabel: '平均分佈',
231
+ distributeHorizontal: '水平平均分佈',
232
+ distributeVertical: '垂直平均分佈',
233
+ layerLabel: '圖層',
234
+ bringToFront: '移到最上層',
235
+ bringForward: '上移一層',
236
+ sendBackward: '下移一層',
237
+ sendToBack: '移到最下層',
238
+ smartGuides: '智慧對齊線',
239
+ selectParent: '選取父層',
240
+ visualEditorHint:
241
+ 'Shift 點選可複選,⌘A 全選。方向鍵移動 1 px,按住 Shift 移動 10 px。Alt 暫停吸附。Shift 限制拖曳方向或等比例縮放。',
242
+ sharedLayoutHint: '此元素與其他實例共用 JSX 定義。請選取獨立的父層容器,以單獨調整排列。',
243
+ inlineLayoutHint: '請選取父層容器,以移動行內內容或調整尺寸。',
244
+ layerLayoutHint: '部分內部內容無法獨立定位。請選取已設定定位的父層容器,以調整圖層。',
199
245
  inspect: '檢視',
200
246
  deselect: '取消選取',
201
247
  contentSection: '內容',
@@ -208,12 +254,12 @@ export const zhTW: Locale = {
208
254
  elementTextPlaceholder: '元素文字',
209
255
  sizeLabel: '大小',
210
256
  weightLabel: '字重',
211
- weightLight: '細體 · 300',
212
- weightRegular: '一般 · 400',
213
- weightMedium: '中等 · 500',
214
- weightSemibold: '半粗體 · 600',
215
- weightBold: '粗體 · 700',
216
- weightExtrabold: '特粗 · 800',
257
+ weightLight: '細體',
258
+ weightRegular: '一般',
259
+ weightMedium: '中等',
260
+ weightSemibold: '半粗體',
261
+ weightBold: '粗體',
262
+ weightExtrabold: '特粗',
217
263
  styleLabel: '樣式',
218
264
  boldAria: '粗體',
219
265
  italicAria: '斜體',
@@ -238,7 +284,7 @@ export const zhTW: Locale = {
238
284
  agentNotWatching: 'Agent 沒在關注',
239
285
  agentNotWatchingTooltip:
240
286
  '已和 dev server 斷線,agent 看不到你選的元素了。請重新啟動 dev server 來恢復連線。',
241
- leaveComment: '留個 comment',
287
+ leaveComment: '留言',
242
288
  commentPlaceholder: '描述你希望代理進行的修改…',
243
289
  commentShortcutHint: '⌘/ 聚焦 · ⌘↵ 新增',
244
290
  addComment: '新增 comment',
@@ -251,7 +297,7 @@ export const zhTW: Locale = {
251
297
  other: '{count} 則留言',
252
298
  },
253
299
  commentLineLabel: '第 {n} 行',
254
- commentsEmpty: '尚無留言。開啟「檢視」並點選投影片元素。',
300
+ commentsEmpty: '還沒有留言。選取物件後,在格式面板中開啟「留言」。',
255
301
  commentsApplyHintPrefix: '在你的代理中執行 ',
256
302
  commentsApplyHintSuffix: ' 以套用這些變更。',
257
303
  commentDeleteAria: '刪除',
@@ -320,6 +366,7 @@ export const zhTW: Locale = {
320
366
  noMatchingAssetsHint: '請調整搜尋或篩選條件。',
321
367
  clearFilters: '清除篩選',
322
368
  searchLogos: '搜尋 Logo',
369
+ searchFonts: '搜尋字型',
323
370
  upload: '上傳',
324
371
  dropToUpload: '拖入即可上傳',
325
372
  loading: '載入中…',
@@ -357,6 +404,18 @@ export const zhTW: Locale = {
357
404
  logoSearchEmptyHintSuffix: '。',
358
405
  logoVariantLight: '淺色',
359
406
  logoVariantDark: '深色',
407
+ fontSearchTitle: '搜尋 Google Fonts',
408
+ fontSearchPoweredByPrefix: '由 ',
409
+ fontSearchPlaceholder: '搜尋字型家族…',
410
+ fontSearchPreviewPlaceholder: '預覽文字',
411
+ fontSearchErrorTitle: '無法連線至 Google Fonts',
412
+ fontSearchErrorBody: '請檢查網路連線後重試。',
413
+ fontSearchNoResults: '找不到「{query}」的字型',
414
+ fontSearchEmpty: '沒有可用的字型',
415
+ fontSearchEmptyHintPrefix: '試試其他字型家族名稱,或在以下網站瀏覽完整目錄: ',
416
+ fontSearchEmptyHintSuffix: '。',
417
+ fontWeightLabel: '字重',
418
+ fontPreviewSample: '永和九年 歲在癸丑 ABCabc 0123456789',
360
419
  toastUploadFailed: '上傳失敗 ({status})',
361
420
  toastReplaced: '已取代 {name}',
362
421
  toastUploadedAs: '已以 {name} 上傳',
@@ -366,6 +425,7 @@ export const zhTW: Locale = {
366
425
  toastDeleteFailed: '刪除失敗 ({status})',
367
426
  toastDeleted: '已刪除 {name}',
368
427
  toastDownloadFailed: '下載 Logo 失敗',
428
+ toastFontDownloadFailed: '下載字型失敗',
369
429
  toastSearchFailed: '搜尋失敗',
370
430
  },
371
431
 
@@ -450,7 +510,7 @@ export const zhTW: Locale = {
450
510
  notesDrawer: {
451
511
  toggle: '講稿',
452
512
  pageLabel: '第 {n} / {total} 頁',
453
- placeholder: '為這一頁撰寫演講備忘…',
513
+ placeholder: '為這一頁撰寫演講備忘(支援 Markdown)…',
454
514
  statusSaving: '儲存中…',
455
515
  statusSaved: '已儲存',
456
516
  statusError: '儲存失敗:{msg}',