@agent-native/core 0.84.57 → 0.84.59

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 (68) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +19 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/action.ts +87 -2
  5. package/corpus/core/src/agent/production-agent.ts +24 -46
  6. package/corpus/core/src/client/AssistantChat.tsx +69 -12
  7. package/corpus/core/src/client/MultiTabAssistantChat.tsx +1 -1
  8. package/corpus/core/src/client/conversation/use-near-bottom-autoscroll.ts +45 -2
  9. package/corpus/core/src/coding-tools/run-code.ts +1 -0
  10. package/corpus/core/src/integrations/webhook-handler.ts +10 -9
  11. package/corpus/core/src/server/action-discovery.ts +3 -0
  12. package/corpus/core/src/server/credential-provider.ts +11 -6
  13. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +29 -0
  14. package/corpus/templates/analytics/server/plugins/agent-chat.ts +9 -1
  15. package/corpus/templates/design/actions/list-design-extensions.ts +2 -2
  16. package/corpus/templates/design/app/components/design/CodeWorkbenchHost.tsx +11 -89
  17. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +314 -181
  18. package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +92 -134
  19. package/corpus/templates/design/app/components/design/EditPanel.tsx +93 -19
  20. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +18 -26
  21. package/corpus/templates/design/app/components/design/TokensPanel.tsx +220 -192
  22. package/corpus/templates/design/app/components/design/code-workbench-theme.ts +150 -0
  23. package/corpus/templates/design/app/i18n/zh-TW.ts +5 -7
  24. package/corpus/templates/design/app/i18n-data.ts +61 -77
  25. package/corpus/templates/design/app/lib/design-import.ts +4 -1
  26. package/corpus/templates/design/app/pages/DesignEditor.tsx +97 -48
  27. package/corpus/templates/design/changelog/2026-07-02-design-inspector-and-canvas-controls-stay-consistent-when-se.md +6 -0
  28. package/corpus/templates/design/changelog/2026-07-02-fixed-a-crash-when-opening-the-code-editor.md +6 -0
  29. package/corpus/templates/design/changelog/2026-07-02-fixed-motion-drawer-open-transition.md +6 -0
  30. package/corpus/templates/design/changelog/2026-07-02-improved-design-assets-panel.md +6 -0
  31. package/dist/action.d.ts +8 -0
  32. package/dist/action.d.ts.map +1 -1
  33. package/dist/action.js +79 -2
  34. package/dist/action.js.map +1 -1
  35. package/dist/agent/production-agent.d.ts +10 -11
  36. package/dist/agent/production-agent.d.ts.map +1 -1
  37. package/dist/agent/production-agent.js +21 -44
  38. package/dist/agent/production-agent.js.map +1 -1
  39. package/dist/client/AssistantChat.d.ts +1 -0
  40. package/dist/client/AssistantChat.d.ts.map +1 -1
  41. package/dist/client/AssistantChat.js +61 -11
  42. package/dist/client/AssistantChat.js.map +1 -1
  43. package/dist/client/MultiTabAssistantChat.js +1 -1
  44. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  45. package/dist/client/conversation/use-near-bottom-autoscroll.d.ts.map +1 -1
  46. package/dist/client/conversation/use-near-bottom-autoscroll.js +43 -2
  47. package/dist/client/conversation/use-near-bottom-autoscroll.js.map +1 -1
  48. package/dist/coding-tools/run-code.d.ts.map +1 -1
  49. package/dist/coding-tools/run-code.js +1 -0
  50. package/dist/coding-tools/run-code.js.map +1 -1
  51. package/dist/collab/awareness.d.ts +2 -2
  52. package/dist/collab/awareness.d.ts.map +1 -1
  53. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  54. package/dist/integrations/webhook-handler.d.ts +1 -0
  55. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  56. package/dist/integrations/webhook-handler.js +9 -9
  57. package/dist/integrations/webhook-handler.js.map +1 -1
  58. package/dist/notifications/routes.d.ts +3 -3
  59. package/dist/observability/routes.d.ts +4 -4
  60. package/dist/server/action-discovery.d.ts.map +1 -1
  61. package/dist/server/action-discovery.js +3 -0
  62. package/dist/server/action-discovery.js.map +1 -1
  63. package/dist/server/credential-provider.d.ts +4 -0
  64. package/dist/server/credential-provider.d.ts.map +1 -1
  65. package/dist/server/credential-provider.js +13 -7
  66. package/dist/server/credential-provider.js.map +1 -1
  67. package/dist/server/transcribe-voice.d.ts +1 -1
  68. package/package.json +1 -1
@@ -285,8 +285,8 @@ const enUS = {
285
285
  "Bring in Figma selections, .fig exports, or standalone HTML as Design screens.",
286
286
  figmaPasteTitle: "Paste from Figma",
287
287
  figmaPasteDescription:
288
- "Copy a frame or layer in Figma, then focus this target and paste. Figma metadata imports directly when available.",
289
- figmaPasteTarget: "Paste Figma content here",
288
+ "Copy a frame or layer in Figma, then paste into the Design canvas. Figma metadata imports directly when available.",
289
+ figmaPasteTarget: "Paste into the canvas",
290
290
  figUploadTitle: "Upload .fig",
291
291
  figUploadDescription:
292
292
  "Export only the frames you need. Large files with many embedded images may exceed the import limit.",
@@ -300,17 +300,15 @@ const enUS = {
300
300
  githubTitle: "GitHub",
301
301
  githubDescription:
302
302
  "Coming soon: import screens and components directly from a repository.",
303
- localTitle: "Local app / VS Code",
304
- localDescription: "Connect a running local app with visual-edit.",
303
+ localTitle: "Local app",
304
+ localDescription: "Connect any running local app with /visual-edit.",
305
305
  visualEditGuidance:
306
- "Start your app, run the command below from the app repo, then ask the agent to use the visual-edit skill to add URL-backed screens.",
307
- useVisualEditNow: "Use visual-edit now",
306
+ "Install the /visual-edit skill, start any local app, then run the bridge command from that app repo so your agent can add URL-backed screens.",
308
307
  comingSoon: "Coming soon",
309
308
  warningsToast: "Import completed with warnings",
310
309
  figmaSuccess: "Figma paste imported",
311
310
  htmlSuccess: "HTML imported",
312
311
  uploadSuccess: "File imported",
313
- visualEditSent: "Sent visual-edit request to the agent",
314
312
  lastImport: "Last import",
315
313
  errors: {
316
314
  notHtml: "Paste or choose valid HTML to import.",
@@ -10100,8 +10098,8 @@ const designImportOverrides = {
10100
10098
  "將 Figma 選取內容、.fig 匯出檔或獨立 HTML 帶入為 Design 螢幕。",
10101
10099
  figmaPasteTitle: "從 Figma 貼上",
10102
10100
  figmaPasteDescription:
10103
- "在 Figma 複製畫框或圖層,然後聚焦此目標並貼上。可用時會直接匯入 Figma 中繼資料。",
10104
- figmaPasteTarget: "在此貼上 Figma 內容",
10101
+ "在 Figma 複製畫框或圖層,然後貼到 Design 畫布。可用時會直接匯入 Figma 中繼資料。",
10102
+ figmaPasteTarget: "貼到畫布",
10105
10103
  figUploadTitle: "上傳 .fig",
10106
10104
  figUploadDescription:
10107
10105
  "只匯出需要的畫框。含有許多嵌入圖片的大型檔案可能超過匯入限制。",
@@ -10114,17 +10112,15 @@ const designImportOverrides = {
10114
10112
  chooseHtmlFile: "選擇 HTML 檔案",
10115
10113
  githubTitle: "GitHub",
10116
10114
  githubDescription: "即將推出:直接從儲存庫匯入螢幕和元件。",
10117
- localTitle: "本機 app / VS Code",
10118
- localDescription: "使用 visual-edit 連接執行中的本機 app。",
10115
+ localTitle: "本機 app",
10116
+ localDescription: "使用 /visual-edit 連接任何執行中的本機 app。",
10119
10117
  visualEditGuidance:
10120
- "啟動 app,在 app repo 中執行下方命令,然後請代理使用 visual-edit skill 新增 URL 螢幕。",
10121
- useVisualEditNow: "立即使用 visual-edit",
10118
+ "安裝 /visual-edit skill,啟動任意本機 app,然後在該 app repo 中執行橋接命令,讓代理新增 URL 螢幕。",
10122
10119
  comingSoon: "即將推出",
10123
10120
  warningsToast: "匯入完成但有警告",
10124
10121
  figmaSuccess: "已匯入 Figma 貼上內容",
10125
10122
  htmlSuccess: "已匯入 HTML",
10126
10123
  uploadSuccess: "已匯入檔案",
10127
- visualEditSent: "已將 visual-edit 請求傳送給代理",
10128
10124
  lastImport: "上次匯入",
10129
10125
  errors: {
10130
10126
  notHtml: "請貼上或選擇有效的 HTML 以匯入。",
@@ -10142,8 +10138,8 @@ const designImportOverrides = {
10142
10138
  description: "将 Figma 选区、.fig 导出或独立 HTML 导入为 Design 屏幕。",
10143
10139
  figmaPasteTitle: "从 Figma 粘贴",
10144
10140
  figmaPasteDescription:
10145
- "在 Figma 中复制画框或图层,然后聚焦此区域并粘贴。有可用元数据时会直接导入。",
10146
- figmaPasteTarget: "在此粘贴 Figma 内容",
10141
+ "在 Figma 中复制画框或图层,然后粘贴到 Design 画布。有可用元数据时会直接导入。",
10142
+ figmaPasteTarget: "粘贴到画布",
10147
10143
  figUploadTitle: "上传 .fig",
10148
10144
  figUploadDescription:
10149
10145
  "只导出需要的画框。包含大量嵌入图片的大文件可能超过导入限制。",
@@ -10156,17 +10152,15 @@ const designImportOverrides = {
10156
10152
  chooseHtmlFile: "选择 HTML 文件",
10157
10153
  githubTitle: "GitHub",
10158
10154
  githubDescription: "即将推出:直接从仓库导入屏幕和组件。",
10159
- localTitle: "本地 app / VS Code",
10160
- localDescription: "使用 visual-edit 连接正在运行的本地 app。",
10155
+ localTitle: "本地 app",
10156
+ localDescription: "使用 /visual-edit 连接任何正在运行的本地 app。",
10161
10157
  visualEditGuidance:
10162
- "启动 app,在 app repo 中运行下方命令,然后让代理使用 visual-edit skill 添加 URL 屏幕。",
10163
- useVisualEditNow: "立即使用 visual-edit",
10158
+ "安装 /visual-edit skill,启动任意本地 app,然后在该 app repo 中运行桥接命令,让代理添加 URL 屏幕。",
10164
10159
  comingSoon: "即将推出",
10165
10160
  warningsToast: "导入完成但有警告",
10166
10161
  figmaSuccess: "已导入 Figma 粘贴内容",
10167
10162
  htmlSuccess: "已导入 HTML",
10168
10163
  uploadSuccess: "已导入文件",
10169
- visualEditSent: "已将 visual-edit 请求发送给代理",
10170
10164
  lastImport: "上次导入",
10171
10165
  errors: {
10172
10166
  notHtml: "请粘贴或选择有效的 HTML 进行导入。",
@@ -10185,8 +10179,8 @@ const designImportOverrides = {
10185
10179
  "Trae selecciones de Figma, exportaciones .fig o HTML independiente como pantallas de Design.",
10186
10180
  figmaPasteTitle: "Pegar desde Figma",
10187
10181
  figmaPasteDescription:
10188
- "Copia un marco o capa en Figma, enfoca este destino y pega. Los metadatos de Figma se importan directamente cuando están disponibles.",
10189
- figmaPasteTarget: "Pega contenido de Figma aquí",
10182
+ "Copia un marco o capa en Figma y pégalo en el lienzo de Design. Los metadatos de Figma se importan directamente cuando están disponibles.",
10183
+ figmaPasteTarget: "Pega en el lienzo",
10190
10184
  figUploadTitle: "Subir .fig",
10191
10185
  figUploadDescription:
10192
10186
  "Exporta solo los marcos necesarios. Los archivos grandes con muchas imágenes incrustadas pueden superar el límite.",
@@ -10200,17 +10194,16 @@ const designImportOverrides = {
10200
10194
  githubTitle: "GitHub",
10201
10195
  githubDescription:
10202
10196
  "Próximamente: importar pantallas y componentes directamente desde un repositorio.",
10203
- localTitle: "App local / VS Code",
10204
- localDescription: "Conecta una app local en ejecución con visual-edit.",
10197
+ localTitle: "App local",
10198
+ localDescription:
10199
+ "Conecta cualquier app local en ejecución con /visual-edit.",
10205
10200
  visualEditGuidance:
10206
- "Inicia tu app, ejecuta el comando siguiente desde el repo de la app y luego pide al agente que use la skill visual-edit para añadir pantallas con URL.",
10207
- useVisualEditNow: "Usar visual-edit ahora",
10201
+ "Instala la skill /visual-edit, inicia cualquier app local y ejecuta el comando de puente desde ese repo para que tu agente añada pantallas con URL.",
10208
10202
  comingSoon: "Próximamente",
10209
10203
  warningsToast: "La importación terminó con advertencias",
10210
10204
  figmaSuccess: "Pegado de Figma importado",
10211
10205
  htmlSuccess: "HTML importado",
10212
10206
  uploadSuccess: "Archivo importado",
10213
- visualEditSent: "Solicitud de visual-edit enviada al agente",
10214
10207
  lastImport: "Última importación",
10215
10208
  errors: {
10216
10209
  notHtml: "Pega o elige HTML válido para importar.",
@@ -10229,8 +10222,8 @@ const designImportOverrides = {
10229
10222
  "Importez des sélections Figma, des exports .fig ou du HTML autonome comme écrans Design.",
10230
10223
  figmaPasteTitle: "Coller depuis Figma",
10231
10224
  figmaPasteDescription:
10232
- "Copiez un frame ou un calque dans Figma, ciblez cette zone puis collez. Les métadonnées Figma sont importées directement si disponibles.",
10233
- figmaPasteTarget: "Collez le contenu Figma ici",
10225
+ "Copiez un frame ou un calque dans Figma, puis collez-le dans le canevas Design. Les métadonnées Figma sont importées directement si disponibles.",
10226
+ figmaPasteTarget: "Collez dans le canevas",
10234
10227
  figUploadTitle: "Téléverser .fig",
10235
10228
  figUploadDescription:
10236
10229
  "Exportez seulement les frames nécessaires. Les gros fichiers avec beaucoup d’images intégrées peuvent dépasser la limite.",
@@ -10244,18 +10237,16 @@ const designImportOverrides = {
10244
10237
  githubTitle: "GitHub",
10245
10238
  githubDescription:
10246
10239
  "Bientôt : importer des écrans et composants directement depuis un dépôt.",
10247
- localTitle: "App locale / VS Code",
10240
+ localTitle: "App locale",
10248
10241
  localDescription:
10249
- "Connectez une app locale en cours d’exécution avec visual-edit.",
10242
+ "Connectez n’importe quelle app locale en cours d’exécution avec /visual-edit.",
10250
10243
  visualEditGuidance:
10251
- "Lancez votre app, exécutez la commande ci-dessous depuis le dépôt de l’app, puis demandez à l’agent d’utiliser la skill visual-edit pour ajouter des écrans par URL.",
10252
- useVisualEditNow: "Utiliser visual-edit maintenant",
10244
+ "Installez la skill /visual-edit, lancez n’importe quelle app locale, puis exécutez la commande de pont depuis ce dépôt pour que votre agent ajoute des écrans par URL.",
10253
10245
  comingSoon: "Bientôt",
10254
10246
  warningsToast: "Import terminé avec avertissements",
10255
10247
  figmaSuccess: "Collage Figma importé",
10256
10248
  htmlSuccess: "HTML importé",
10257
10249
  uploadSuccess: "Fichier importé",
10258
- visualEditSent: "Demande visual-edit envoyée à l’agent",
10259
10250
  lastImport: "Dernier import",
10260
10251
  errors: {
10261
10252
  notHtml: "Collez ou choisissez du HTML valide à importer.",
@@ -10274,8 +10265,8 @@ const designImportOverrides = {
10274
10265
  "Bringe Figma-Auswahlen, .fig-Exporte oder eigenständiges HTML als Design-Bildschirme hinein.",
10275
10266
  figmaPasteTitle: "Aus Figma einfügen",
10276
10267
  figmaPasteDescription:
10277
- "Kopiere einen Frame oder Layer in Figma, fokussiere dieses Ziel und füge ein. Figma-Metadaten werden direkt importiert, wenn sie verfügbar sind.",
10278
- figmaPasteTarget: "Figma-Inhalt hier einfügen",
10268
+ "Kopiere einen Frame oder Layer in Figma und füge ihn in die Design-Leinwand ein. Figma-Metadaten werden direkt importiert, wenn sie verfügbar sind.",
10269
+ figmaPasteTarget: "In die Leinwand einfügen",
10279
10270
  figUploadTitle: ".fig hochladen",
10280
10271
  figUploadDescription:
10281
10272
  "Exportiere nur die benötigten Frames. Große Dateien mit vielen eingebetteten Bildern können das Importlimit überschreiten.",
@@ -10289,17 +10280,15 @@ const designImportOverrides = {
10289
10280
  githubTitle: "GitHub",
10290
10281
  githubDescription:
10291
10282
  "Demnächst: Bildschirme und Komponenten direkt aus einem Repository importieren.",
10292
- localTitle: "Lokale App / VS Code",
10293
- localDescription: "Verbinde eine laufende lokale App mit visual-edit.",
10283
+ localTitle: "Lokale App",
10284
+ localDescription: "Verbinde jede laufende lokale App mit /visual-edit.",
10294
10285
  visualEditGuidance:
10295
- "Starte deine App, führe den folgenden Befehl im App-Repo aus und bitte den Agenten dann, die visual-edit-Skill zu verwenden, um URL-basierte Bildschirme hinzuzufügen.",
10296
- useVisualEditNow: "visual-edit jetzt verwenden",
10286
+ "Installiere die /visual-edit-Skill, starte eine lokale App und führe dann den Bridge-Befehl aus diesem App-Repo aus, damit dein Agent URL-basierte Bildschirme hinzufügen kann.",
10297
10287
  comingSoon: "Demnächst",
10298
10288
  warningsToast: "Import mit Warnungen abgeschlossen",
10299
10289
  figmaSuccess: "Figma-Einfügung importiert",
10300
10290
  htmlSuccess: "HTML importiert",
10301
10291
  uploadSuccess: "Datei importiert",
10302
- visualEditSent: "visual-edit-Anfrage an den Agenten gesendet",
10303
10292
  lastImport: "Letzter Import",
10304
10293
  errors: {
10305
10294
  notHtml: "Füge gültiges HTML ein oder wähle es zum Importieren aus.",
@@ -10318,8 +10307,8 @@ const designImportOverrides = {
10318
10307
  "Figma の選択範囲、.fig エクスポート、または単体 HTML を Design の画面として取り込みます。",
10319
10308
  figmaPasteTitle: "Figma から貼り付け",
10320
10309
  figmaPasteDescription:
10321
- "Figma でフレームまたはレイヤーをコピーし、この領域にフォーカスして貼り付けます。利用可能な場合は Figma メタデータを直接インポートします。",
10322
- figmaPasteTarget: "ここに Figma コンテンツを貼り付け",
10310
+ "Figma でフレームまたはレイヤーをコピーし、Design キャンバスに貼り付けます。利用可能な場合は Figma メタデータを直接インポートします。",
10311
+ figmaPasteTarget: "キャンバスに貼り付け",
10323
10312
  figUploadTitle: ".fig をアップロード",
10324
10313
  figUploadDescription:
10325
10314
  "必要なフレームだけを書き出してください。埋め込み画像が多い大きなファイルは制限を超える場合があります。",
@@ -10333,17 +10322,16 @@ const designImportOverrides = {
10333
10322
  githubTitle: "GitHub",
10334
10323
  githubDescription:
10335
10324
  "近日対応: リポジトリから画面とコンポーネントを直接インポートします。",
10336
- localTitle: "ローカル app / VS Code",
10337
- localDescription: "visual-edit で実行中のローカル app に接続します。",
10325
+ localTitle: "ローカル app",
10326
+ localDescription:
10327
+ "/visual-edit で任意の実行中ローカル app に接続します。",
10338
10328
  visualEditGuidance:
10339
- "app を起動し、app repo で下のコマンドを実行してから、エージェントに visual-edit skill で URL ベースの画面を追加するよう依頼してください。",
10340
- useVisualEditNow: "visual-edit を今すぐ使う",
10329
+ "/visual-edit skill をインストールし、任意のローカル app を起動してから、その app repo でブリッジコマンドを実行し、エージェントが URL ベースの画面を追加できるようにします。",
10341
10330
  comingSoon: "近日対応",
10342
10331
  warningsToast: "警告付きでインポートが完了しました",
10343
10332
  figmaSuccess: "Figma 貼り付けをインポートしました",
10344
10333
  htmlSuccess: "HTML をインポートしました",
10345
10334
  uploadSuccess: "ファイルをインポートしました",
10346
- visualEditSent: "visual-edit リクエストをエージェントに送信しました",
10347
10335
  lastImport: "前回のインポート",
10348
10336
  errors: {
10349
10337
  notHtml: "インポートする有効な HTML を貼り付けるか選択してください。",
@@ -10362,8 +10350,8 @@ const designImportOverrides = {
10362
10350
  "Figma 선택 영역, .fig 내보내기 또는 독립 HTML을 Design 화면으로 가져옵니다.",
10363
10351
  figmaPasteTitle: "Figma에서 붙여넣기",
10364
10352
  figmaPasteDescription:
10365
- "Figma에서 프레임이나 레이어를 복사한 뒤 영역에 포커스하고 붙여넣으세요. 가능한 경우 Figma 메타데이터를 바로 가져옵니다.",
10366
- figmaPasteTarget: "여기에 Figma 콘텐츠 붙여넣기",
10353
+ "Figma에서 프레임이나 레이어를 복사한 뒤 Design 캔버스에 붙여넣으세요. 가능한 경우 Figma 메타데이터를 바로 가져옵니다.",
10354
+ figmaPasteTarget: "캔버스에 붙여넣기",
10367
10355
  figUploadTitle: ".fig 업로드",
10368
10356
  figUploadDescription:
10369
10357
  "필요한 프레임만 내보내세요. 포함된 이미지가 많은 큰 파일은 가져오기 제한을 초과할 수 있습니다.",
@@ -10377,17 +10365,16 @@ const designImportOverrides = {
10377
10365
  githubTitle: "GitHub",
10378
10366
  githubDescription:
10379
10367
  "곧 제공: 저장소에서 화면과 컴포넌트를 직접 가져옵니다.",
10380
- localTitle: "로컬 app / VS Code",
10381
- localDescription: "visual-edit로 실행 중인 로컬 app을 연결합니다.",
10368
+ localTitle: "로컬 app",
10369
+ localDescription:
10370
+ "/visual-edit로 실행 중인 모든 로컬 app을 연결합니다.",
10382
10371
  visualEditGuidance:
10383
- "app을 시작하고 app repo에서 아래 명령을 실행한 다음, 에이전트에게 visual-edit skill로 URL 기반 화면을 추가해 달라고 요청하세요.",
10384
- useVisualEditNow: "지금 visual-edit 사용",
10372
+ "/visual-edit skill을 설치하고 로컬 app을 시작한 뒤, 해당 app repo에서 브리지 명령을 실행해 에이전트가 URL 기반 화면을 추가할 있게 하세요.",
10385
10373
  comingSoon: "곧 제공",
10386
10374
  warningsToast: "경고와 함께 가져오기가 완료되었습니다",
10387
10375
  figmaSuccess: "Figma 붙여넣기를 가져왔습니다",
10388
10376
  htmlSuccess: "HTML을 가져왔습니다",
10389
10377
  uploadSuccess: "파일을 가져왔습니다",
10390
- visualEditSent: "visual-edit 요청을 에이전트에 보냈습니다",
10391
10378
  lastImport: "최근 가져오기",
10392
10379
  errors: {
10393
10380
  notHtml: "가져올 유효한 HTML을 붙여넣거나 선택하세요.",
@@ -10406,8 +10393,8 @@ const designImportOverrides = {
10406
10393
  "Traga seleções do Figma, exportações .fig ou HTML independente como telas do Design.",
10407
10394
  figmaPasteTitle: "Colar do Figma",
10408
10395
  figmaPasteDescription:
10409
- "Copie um frame ou camada no Figma, foque este destino e cole. Os metadados do Figma são importados diretamente quando disponíveis.",
10410
- figmaPasteTarget: "Cole conteúdo do Figma aqui",
10396
+ "Copie um frame ou camada no Figma e cole na tela do Design. Os metadados do Figma são importados diretamente quando disponíveis.",
10397
+ figmaPasteTarget: "Cole na tela",
10411
10398
  figUploadTitle: "Enviar .fig",
10412
10399
  figUploadDescription:
10413
10400
  "Exporte apenas os frames necessários. Arquivos grandes com muitas imagens incorporadas podem exceder o limite.",
@@ -10421,17 +10408,16 @@ const designImportOverrides = {
10421
10408
  githubTitle: "GitHub",
10422
10409
  githubDescription:
10423
10410
  "Em breve: importe telas e componentes diretamente de um repositório.",
10424
- localTitle: "App local / VS Code",
10425
- localDescription: "Conecte um app local em execução com visual-edit.",
10411
+ localTitle: "App local",
10412
+ localDescription:
10413
+ "Conecte qualquer app local em execução com /visual-edit.",
10426
10414
  visualEditGuidance:
10427
- "Inicie seu app, execute o comando abaixo no repo do app e depois peça ao agente para usar a skill visual-edit para adicionar telas por URL.",
10428
- useVisualEditNow: "Usar visual-edit agora",
10415
+ "Instale a skill /visual-edit, inicie qualquer app local e execute o comando de ponte nesse repo para que seu agente adicione telas por URL.",
10429
10416
  comingSoon: "Em breve",
10430
10417
  warningsToast: "Importação concluída com avisos",
10431
10418
  figmaSuccess: "Colagem do Figma importada",
10432
10419
  htmlSuccess: "HTML importado",
10433
10420
  uploadSuccess: "Arquivo importado",
10434
- visualEditSent: "Solicitação de visual-edit enviada ao agente",
10435
10421
  lastImport: "Última importação",
10436
10422
  errors: {
10437
10423
  notHtml: "Cole ou escolha HTML válido para importar.",
@@ -10450,8 +10436,8 @@ const designImportOverrides = {
10450
10436
  "Figma selections, .fig exports या standalone HTML को Design screens के रूप में लाएँ।",
10451
10437
  figmaPasteTitle: "Figma से पेस्ट करें",
10452
10438
  figmaPasteDescription:
10453
- "Figma में frame या layer कॉपी करें, फिर इस target को focus करके paste करें। उपलब्ध होने पर Figma metadata सीधे import होता है।",
10454
- figmaPasteTarget: "Figma content यहाँ paste करें",
10439
+ "Figma में frame या layer कॉपी करें, फिर Design canvas में paste करें। उपलब्ध होने पर Figma metadata सीधे import होता है।",
10440
+ figmaPasteTarget: "canvas में paste करें",
10455
10441
  figUploadTitle: ".fig अपलोड करें",
10456
10442
  figUploadDescription:
10457
10443
  "सिर्फ ज़रूरी frames export करें। कई embedded images वाली बड़ी files import limit से ऊपर जा सकती हैं।",
@@ -10465,17 +10451,16 @@ const designImportOverrides = {
10465
10451
  githubTitle: "GitHub",
10466
10452
  githubDescription:
10467
10453
  "जल्द आ रहा है: repository से screens और components सीधे import करें।",
10468
- localTitle: "स्थानीय app / VS Code",
10469
- localDescription: "चल रहे local app को visual-edit से connect करें।",
10454
+ localTitle: "स्थानीय app",
10455
+ localDescription:
10456
+ "/visual-edit से किसी भी चल रहे local app को connect करें।",
10470
10457
  visualEditGuidance:
10471
- "अपना app शुरू करें, app repo से नीचे वाला command चलाएँ, फिर agent से visual-edit skill इस्तेमाल करके URL-backed screens जोड़ने को कहें।",
10472
- useVisualEditNow: "अभी visual-edit इस्तेमाल करें",
10458
+ "/visual-edit skill install करें, कोई भी local app शुरू करें, फिर उस app repo से bridge command चलाएँ ताकि आपका agent URL-backed screens जोड़ सके।",
10473
10459
  comingSoon: "जल्द आ रहा है",
10474
10460
  warningsToast: "Import warnings के साथ पूरा हुआ",
10475
10461
  figmaSuccess: "Figma paste import हो गया",
10476
10462
  htmlSuccess: "HTML import हो गया",
10477
10463
  uploadSuccess: "File import हो गई",
10478
- visualEditSent: "visual-edit request agent को भेजी गई",
10479
10464
  lastImport: "पिछला import",
10480
10465
  errors: {
10481
10466
  notHtml: "Import करने के लिए valid HTML paste करें या चुनें।",
@@ -10494,8 +10479,8 @@ const designImportOverrides = {
10494
10479
  "استورد تحديدات Figma أو ملفات .fig أو HTML مستقل كشاشات Design.",
10495
10480
  figmaPasteTitle: "لصق من Figma",
10496
10481
  figmaPasteDescription:
10497
- "انسخ إطارا أو طبقة في Figma، ثم ركز هذه المنطقة والصق. يتم استيراد بيانات Figma الوصفية مباشرة عند توفرها.",
10498
- figmaPasteTarget: "الصق محتوى Figma هنا",
10482
+ "انسخ إطارا أو طبقة في Figma، ثم الصقها في لوحة Design. يتم استيراد بيانات Figma الوصفية مباشرة عند توفرها.",
10483
+ figmaPasteTarget: "الصق في اللوحة",
10499
10484
  figUploadTitle: "رفع .fig",
10500
10485
  figUploadDescription:
10501
10486
  "صدّر الإطارات التي تحتاجها فقط. قد تتجاوز الملفات الكبيرة ذات الصور المضمنة الكثيرة حد الاستيراد.",
@@ -10508,17 +10493,16 @@ const designImportOverrides = {
10508
10493
  chooseHtmlFile: "اختر ملف HTML",
10509
10494
  githubTitle: "GitHub",
10510
10495
  githubDescription: "قريبا: استيراد الشاشات والمكونات مباشرة من مستودع.",
10511
- localTitle: "تطبيق محلي / VS Code",
10512
- localDescription: "وصّل تطبيقا محليا قيد التشغيل باستخدام visual-edit.",
10496
+ localTitle: "تطبيق محلي",
10497
+ localDescription:
10498
+ "وصّل أي تطبيق محلي قيد التشغيل باستخدام /visual-edit.",
10513
10499
  visualEditGuidance:
10514
- "شغّل التطبيق، ثم نفّذ الأمر أدناه من مستودع التطبيق، وبعدها اطلب من الوكيل استخدام مهارة visual-edit لإضافة شاشات مدعومة بروابط URL.",
10515
- useVisualEditNow: "استخدم visual-edit الآن",
10500
+ "ثبّت مهارة /visual-edit، وشغّل أي تطبيق محلي، ثم نفّذ أمر الجسر من مستودع ذلك التطبيق ليتمكن الوكيل من إضافة شاشات مدعومة بروابط URL.",
10516
10501
  comingSoon: "قريبا",
10517
10502
  warningsToast: "اكتمل الاستيراد مع تحذيرات",
10518
10503
  figmaSuccess: "تم استيراد لصق Figma",
10519
10504
  htmlSuccess: "تم استيراد HTML",
10520
10505
  uploadSuccess: "تم استيراد الملف",
10521
- visualEditSent: "تم إرسال طلب visual-edit إلى الوكيل",
10522
10506
  lastImport: "آخر استيراد",
10523
10507
  errors: {
10524
10508
  notHtml: "الصق أو اختر HTML صالحا للاستيراد.",
@@ -6,7 +6,10 @@ export interface ImportResult {
6
6
  }
7
7
 
8
8
  export const VISUAL_EDIT_CONNECT_COMMAND =
9
- "npx @agent-native/core@latest design connect";
9
+ "npx @agent-native/core@latest design connect --url 'http://localhost:<port>' --root . --daemon";
10
+
11
+ export const VISUAL_EDIT_INSTALL_COMMAND =
12
+ "npx @agent-native/core@latest skills add visual-edit";
10
13
 
11
14
  export function hasFigmaClipboardPayload(value: string): boolean {
12
15
  return /<[^>]+\sdata-(metadata|buffer)=["'][^"']*\((figmeta|figma)\)[^"']*["']/i.test(
@@ -120,6 +120,7 @@ import {
120
120
  IconTerminal2,
121
121
  IconLink,
122
122
  IconLock,
123
+ IconPuzzle,
123
124
  } from "@tabler/icons-react";
124
125
  import { useQueryClient } from "@tanstack/react-query";
125
126
  import {
@@ -170,6 +171,7 @@ import {
170
171
  EditPanel,
171
172
  type InspectCodeData,
172
173
  type InspectorTab,
174
+ type ScreenGeometrySelection,
173
175
  } from "@/components/design/EditPanel";
174
176
  import type { ExportSettingsValue } from "@/components/design/inspector";
175
177
  import { InspectorAiActions } from "@/components/design/inspector/InspectorAiActions";
@@ -188,6 +190,7 @@ import {
188
190
  type MotionDockTrack,
189
191
  } from "@/components/design/MotionDock";
190
192
  import {
193
+ getInitialFrameGeometry,
191
194
  MultiScreenCanvas,
192
195
  OVERVIEW_FRAME_WIDTH,
193
196
  type CanvasLayerMarqueeSelection,
@@ -435,6 +438,47 @@ export function getSelectedScreenIdsForEditorState(args: {
435
438
  return activeFileId ? [activeFileId] : [];
436
439
  }
437
440
 
441
+ export function getSelectedScreenGeometryForInspector(args: {
442
+ selectedInspectorElementCount: number;
443
+ selectedScreenIds: string[];
444
+ overviewScreens: Array<{
445
+ id: string;
446
+ filename: string;
447
+ title?: string;
448
+ width?: number;
449
+ height?: number;
450
+ }>;
451
+ canvasFrameGeometryById: CanvasFrameGeometryById;
452
+ }): ScreenGeometrySelection | null {
453
+ if (args.selectedInspectorElementCount > 0) return null;
454
+ if (args.selectedScreenIds.length !== 1) return null;
455
+ const screenId = args.selectedScreenIds[0];
456
+ if (!screenId) return null;
457
+ const screenIndex = args.overviewScreens.findIndex(
458
+ (screen) => screen.id === screenId,
459
+ );
460
+ if (screenIndex < 0) return null;
461
+ const screen = args.overviewScreens[screenIndex];
462
+ if (!screen) return null;
463
+ const fallbackGeometry = getInitialFrameGeometry(screenIndex, {
464
+ width: screen.width ?? 1280,
465
+ height: screen.height ?? 2560,
466
+ });
467
+ const persistedGeometry = args.canvasFrameGeometryById[screenId] ?? {};
468
+ const geometry = {
469
+ ...fallbackGeometry,
470
+ ...persistedGeometry,
471
+ };
472
+ return {
473
+ id: screen.id,
474
+ title: screen.title ?? prettyScreenName(screen.filename),
475
+ x: geometry.x,
476
+ y: geometry.y,
477
+ width: geometry.width,
478
+ height: geometry.height,
479
+ };
480
+ }
481
+
438
482
  function fileIdFromLayerSelectionId(
439
483
  layerId: string,
440
484
  fileIds: Set<string>,
@@ -1719,12 +1763,10 @@ function designEditorCommandFromSearchParams(
1719
1763
  if (editorView === "overview" || editorView === "single") {
1720
1764
  command.editorView = editorView;
1721
1765
  }
1722
- if (
1723
- inspector === "design" ||
1724
- inspector === "tweaks" ||
1725
- inspector === "extensions"
1726
- ) {
1766
+ if (inspector === "design" || inspector === "tweaks") {
1727
1767
  command.inspectorTab = inspector;
1768
+ } else if (inspector === "extensions") {
1769
+ command.leftPanel = "tools";
1728
1770
  }
1729
1771
  if (leftPanel) command.leftPanel = leftPanel;
1730
1772
  if (screen) command.screen = screen;
@@ -3605,7 +3647,7 @@ function DesignWorkspaceRail({
3605
3647
  {
3606
3648
  panel: "tools",
3607
3649
  label: t("designEditor.leftRail.tools"),
3608
- icon: <IconTerminal2 className="size-[15px]" />,
3650
+ icon: <IconPuzzle className="size-[15px]" />,
3609
3651
  },
3610
3652
  {
3611
3653
  panel: "tokens",
@@ -4790,6 +4832,7 @@ export default function DesignEditor() {
4790
4832
  const [motionDockOpen, setMotionDockOpen] = useState(false);
4791
4833
  const [motionDockMounted, setMotionDockMounted] = useState(false);
4792
4834
  const motionDockUnmountTimerRef = useRef<number | null>(null);
4835
+ const motionDockOpenAnimationFrameRef = useRef<number | null>(null);
4793
4836
  const [motionTimelineId, setMotionTimelineId] = useState<string | null>(null);
4794
4837
  const [motionTracks, setMotionTracks] = useState<MotionDockTrack[]>([]);
4795
4838
  const [motionDurationMs, setMotionDurationMs] = useState(1000);
@@ -4811,6 +4854,16 @@ export default function DesignEditor() {
4811
4854
  window.clearTimeout(motionDockUnmountTimerRef.current);
4812
4855
  motionDockUnmountTimerRef.current = null;
4813
4856
  }, []);
4857
+ const clearMotionDockOpenAnimationFrame = useCallback(() => {
4858
+ if (
4859
+ typeof window === "undefined" ||
4860
+ motionDockOpenAnimationFrameRef.current === null
4861
+ ) {
4862
+ return;
4863
+ }
4864
+ window.cancelAnimationFrame(motionDockOpenAnimationFrameRef.current);
4865
+ motionDockOpenAnimationFrameRef.current = null;
4866
+ }, []);
4814
4867
  const clearMotionAutosaveTimer = useCallback(() => {
4815
4868
  if (motionAutosaveTimerRef.current === null) return;
4816
4869
  window.clearTimeout(motionAutosaveTimerRef.current);
@@ -4819,13 +4872,22 @@ export default function DesignEditor() {
4819
4872
  const setMotionDockOpenAnimated = useCallback(
4820
4873
  (open: boolean) => {
4821
4874
  clearMotionDockUnmountTimer();
4875
+ clearMotionDockOpenAnimationFrame();
4822
4876
  if (open) {
4823
4877
  setMotionDockMounted(true);
4824
4878
  if (typeof window === "undefined") {
4825
4879
  setMotionDockOpen(true);
4826
4880
  return;
4827
4881
  }
4828
- window.requestAnimationFrame(() => setMotionDockOpen(true));
4882
+ motionDockOpenAnimationFrameRef.current = window.requestAnimationFrame(
4883
+ () => {
4884
+ motionDockOpenAnimationFrameRef.current =
4885
+ window.requestAnimationFrame(() => {
4886
+ setMotionDockOpen(true);
4887
+ motionDockOpenAnimationFrameRef.current = null;
4888
+ });
4889
+ },
4890
+ );
4829
4891
  return;
4830
4892
  }
4831
4893
 
@@ -4839,7 +4901,7 @@ export default function DesignEditor() {
4839
4901
  motionDockUnmountTimerRef.current = null;
4840
4902
  }, MOTION_DOCK_EXIT_FALLBACK_MS);
4841
4903
  },
4842
- [clearMotionDockUnmountTimer],
4904
+ [clearMotionDockOpenAnimationFrame, clearMotionDockUnmountTimer],
4843
4905
  );
4844
4906
  const handleMotionDockExitComplete = useCallback(() => {
4845
4907
  if (motionDockOpen) return;
@@ -4854,8 +4916,11 @@ export default function DesignEditor() {
4854
4916
  }, MOTION_DOCK_EXIT_SETTLE_MS);
4855
4917
  }, [clearMotionDockUnmountTimer, motionDockOpen]);
4856
4918
  useEffect(
4857
- () => () => clearMotionDockUnmountTimer(),
4858
- [clearMotionDockUnmountTimer],
4919
+ () => () => {
4920
+ clearMotionDockUnmountTimer();
4921
+ clearMotionDockOpenAnimationFrame();
4922
+ },
4923
+ [clearMotionDockOpenAnimationFrame, clearMotionDockUnmountTimer],
4859
4924
  );
4860
4925
  useEffect(() => () => clearMotionAutosaveTimer(), [clearMotionAutosaveTimer]);
4861
4926
  const [shaderFillPreview, setShaderFillPreview] = useState<{
@@ -4947,11 +5012,6 @@ export default function DesignEditor() {
4947
5012
  if (hasSelectedElement) focusDesignInspectorForSelection();
4948
5013
  }, [focusDesignInspectorForSelection, hasSelectedElement]);
4949
5014
 
4950
- useEffect(() => {
4951
- if (hasSelectedElement) return;
4952
- setActiveInspectorTab("tweaks");
4953
- }, [hasSelectedElement]);
4954
-
4955
5015
  const startSidebarResize = useCallback(
4956
5016
  (side: "left" | "right", event: ReactPointerEvent<HTMLDivElement>) => {
4957
5017
  event.preventDefault();
@@ -6655,13 +6715,9 @@ export default function DesignEditor() {
6655
6715
  if (target && !targetFile) return false;
6656
6716
 
6657
6717
  const inspectorTab =
6658
- command.inspectorTab === "design" ||
6659
- command.inspectorTab === "tweaks" ||
6660
- command.inspectorTab === "extensions"
6718
+ command.inspectorTab === "design" || command.inspectorTab === "tweaks"
6661
6719
  ? command.inspectorTab
6662
- : command.inspector === "design" ||
6663
- command.inspector === "tweaks" ||
6664
- command.inspector === "extensions"
6720
+ : command.inspector === "design" || command.inspector === "tweaks"
6665
6721
  ? command.inspector
6666
6722
  : undefined;
6667
6723
  if (inspectorTab) setActiveInspectorTab(inspectorTab);
@@ -8047,13 +8103,6 @@ export default function DesignEditor() {
8047
8103
  selectedElement?.sourceId,
8048
8104
  ]);
8049
8105
  useEffect(() => {
8050
- const urlParams = new URLSearchParams(location.search);
8051
- const urlKeepsExtensionsInspector =
8052
- urlParams.get("inspector") === "extensions" ||
8053
- urlParams.get("inspectorTab") === "extensions";
8054
- if (activeInspectorTab === "extensions" && urlKeepsExtensionsInspector) {
8055
- return;
8056
- }
8057
8106
  clearShaderFillPreview();
8058
8107
  }, [
8059
8108
  activeInspectorTab,
@@ -14615,6 +14664,19 @@ ${serializedHtml}
14615
14664
  : [],
14616
14665
  [selectedElement, selectedLayerTargets],
14617
14666
  );
14667
+ const selectedScreenGeometry = useMemo<ScreenGeometrySelection | null>(() => {
14668
+ return getSelectedScreenGeometryForInspector({
14669
+ selectedInspectorElementCount: selectedInspectorElements.length,
14670
+ selectedScreenIds,
14671
+ overviewScreens,
14672
+ canvasFrameGeometryById,
14673
+ });
14674
+ }, [
14675
+ canvasFrameGeometryById,
14676
+ overviewScreens,
14677
+ selectedInspectorElements.length,
14678
+ selectedScreenIds,
14679
+ ]);
14618
14680
 
14619
14681
  const layerPanelSelectedIds = useMemo(
14620
14682
  () =>
@@ -16993,19 +17055,12 @@ ${serializedHtml}
16993
17055
  )}
16994
17056
  >
16995
17057
  {id && canEditDesign ? (
16996
- <>
16997
- <div className="flex min-h-8 shrink-0 items-center border-b border-border/60 px-3">
16998
- <h3 className="min-w-0 flex-1 truncate text-xs font-semibold text-foreground">
16999
- {t("designEditor.tokens.title")}
17000
- </h3>
17001
- </div>
17002
- <div className="design-inspector-scroll min-h-0 flex-1 overflow-y-auto overscroll-contain">
17003
- <TokensPanel
17004
- designId={id}
17005
- onTokensApplied={handleTokensApplied}
17006
- />
17007
- </div>
17008
- </>
17058
+ <div className="design-inspector-scroll min-h-0 flex-1 overflow-y-auto overscroll-contain">
17059
+ <TokensPanel
17060
+ designId={id}
17061
+ onTokensApplied={handleTokensApplied}
17062
+ />
17063
+ </div>
17009
17064
  ) : (
17010
17065
  <ReadOnlyEditorPanel
17011
17066
  title={"Tokens require editor access" /* i18n-ignore */}
@@ -17925,6 +17980,7 @@ ${serializedHtml}
17925
17980
  <EditPanel
17926
17981
  selectedElement={selectedElement}
17927
17982
  selectedElements={selectedInspectorElements}
17983
+ selectedScreenGeometry={selectedScreenGeometry}
17928
17984
  pageStyles={pageStyles}
17929
17985
  zoom={zoom}
17930
17986
  headerTrailing={renderZoomControl("inspector")}
@@ -17945,13 +18001,6 @@ ${serializedHtml}
17945
18001
  })
17946
18002
  }
17947
18003
  onRequestTweaks={handleRequestTweaks}
17948
- extensionsPanel={
17949
- <DesignExtensionsPanel
17950
- context={designExtensionContext}
17951
- hideAssetLibrary
17952
- title={t("designEditor.extensions")}
17953
- />
17954
- }
17955
18004
  onStyleChange={handleStyleChange}
17956
18005
  onStylesChange={handleStylesChange}
17957
18006
  onExport={handleInspectorExport}