@agent-native/core 0.84.56 → 0.84.58
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +14 -0
- package/corpus/core/docs/content/locales/ar-SA/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/de-DE/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/es-ES/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/fr-FR/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/hi-IN/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/ja-JP/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/ko-KR/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/pt-BR/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-CN/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-TW/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +2 -0
- package/corpus/core/docs/content/template-analytics.mdx +2 -0
- package/corpus/core/docs/content/template-clips.mdx +22 -10
- package/corpus/core/docs/content/tracking.mdx +2 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/action.ts +11 -0
- package/corpus/core/src/agent/production-agent.ts +24 -46
- package/corpus/core/src/client/AssistantChat.tsx +69 -12
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +1 -1
- package/corpus/core/src/client/conversation/use-near-bottom-autoscroll.ts +45 -2
- package/corpus/core/src/coding-tools/run-code.ts +1 -0
- package/corpus/core/src/integrations/webhook-handler.ts +10 -9
- package/corpus/core/src/server/action-discovery.ts +3 -0
- package/corpus/core/src/server/credential-provider.ts +11 -6
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +8 -0
- package/corpus/templates/analytics/AGENTS.md +5 -0
- package/corpus/templates/analytics/actions/create-session-replay-agent-link.ts +31 -0
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/analytics/app/i18n-data.ts +20 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +65 -3
- package/corpus/templates/analytics/changelog/2026-07-02-session-replays-can-be-copied-as-temporary-private-links-for-agents.md +6 -0
- package/corpus/templates/analytics/server/handlers/session-replay.ts +78 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +29 -0
- package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +313 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +198 -3
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +9 -1
- package/corpus/templates/analytics/server/routes/[...page].get.ts +104 -1
- package/corpus/templates/analytics/server/routes/api/session-replay/agent-context.json.get.ts +48 -0
- package/corpus/templates/analytics/server/routes/api/session-replay/agent-events.json.get.ts +63 -0
- package/corpus/templates/analytics/shared/session-replay-agent-access.ts +10 -0
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +14 -8
- package/corpus/templates/clips/AGENTS.md +3 -2
- package/corpus/templates/clips/actions/create-recording-agent-link.ts +90 -0
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +43 -46
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +5 -3
- package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -1
- package/corpus/templates/clips/app/i18n/de-DE.ts +1 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +1 -1
- package/corpus/templates/clips/app/i18n/es-ES.ts +1 -1
- package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -1
- package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -1
- package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -1
- package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -1
- package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -1
- package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -1
- package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -1
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +100 -46
- package/corpus/templates/clips/changelog/2026-07-02-private-recordings-can-be-shared-with-agents-through-temporary-links-without-making-them-public.md +6 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +26 -13
- package/corpus/templates/clips/server/routes/api/agent-context.json.get.ts +2 -1
- package/corpus/templates/clips/server/routes/api/agent-frame.jpg.get.ts +2 -1
- package/corpus/templates/clips/server/routes/api/agent-transcript.json.get.ts +2 -1
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +7 -2
- package/corpus/templates/clips/shared/agent-context.ts +5 -0
- package/corpus/templates/design/actions/list-design-extensions.ts +2 -2
- package/corpus/templates/design/app/components/design/CodeWorkbenchHost.tsx +11 -89
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +314 -181
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +92 -134
- package/corpus/templates/design/app/components/design/EditPanel.tsx +93 -19
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +18 -26
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +220 -192
- package/corpus/templates/design/app/components/design/code-workbench-theme.ts +150 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +5 -7
- package/corpus/templates/design/app/i18n-data.ts +61 -77
- package/corpus/templates/design/app/lib/design-import.ts +4 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +97 -48
- package/corpus/templates/design/changelog/2026-07-02-design-inspector-and-canvas-controls-stay-consistent-when-se.md +6 -0
- package/corpus/templates/design/changelog/2026-07-02-fixed-a-crash-when-opening-the-code-editor.md +6 -0
- package/corpus/templates/design/changelog/2026-07-02-fixed-motion-drawer-open-transition.md +6 -0
- package/corpus/templates/design/changelog/2026-07-02-improved-design-assets-panel.md +6 -0
- package/dist/action.d.ts +8 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +3 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +10 -11
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +21 -44
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +1 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +61 -11
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/conversation/use-near-bottom-autoscroll.d.ts.map +1 -1
- package/dist/client/conversation/use-near-bottom-autoscroll.js +43 -2
- package/dist/client/conversation/use-near-bottom-autoscroll.js.map +1 -1
- package/dist/coding-tools/run-code.d.ts.map +1 -1
- package/dist/coding-tools/run-code.js +1 -0
- package/dist/coding-tools/run-code.js.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/integrations/webhook-handler.d.ts +1 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +9 -9
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +3 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/credential-provider.d.ts +4 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +13 -7
- package/dist/server/credential-provider.js.map +1 -1
- package/docs/content/locales/ar-SA/template-analytics.mdx +2 -0
- package/docs/content/locales/ar-SA/template-clips.mdx +2 -0
- package/docs/content/locales/de-DE/template-analytics.mdx +2 -0
- package/docs/content/locales/de-DE/template-clips.mdx +2 -0
- package/docs/content/locales/es-ES/template-analytics.mdx +2 -0
- package/docs/content/locales/es-ES/template-clips.mdx +2 -0
- package/docs/content/locales/fr-FR/template-analytics.mdx +2 -0
- package/docs/content/locales/fr-FR/template-clips.mdx +2 -0
- package/docs/content/locales/hi-IN/template-analytics.mdx +2 -0
- package/docs/content/locales/hi-IN/template-clips.mdx +2 -0
- package/docs/content/locales/ja-JP/template-analytics.mdx +2 -0
- package/docs/content/locales/ja-JP/template-clips.mdx +2 -0
- package/docs/content/locales/ko-KR/template-analytics.mdx +2 -0
- package/docs/content/locales/ko-KR/template-clips.mdx +2 -0
- package/docs/content/locales/pt-BR/template-analytics.mdx +2 -0
- package/docs/content/locales/pt-BR/template-clips.mdx +2 -0
- package/docs/content/locales/zh-CN/template-analytics.mdx +2 -0
- package/docs/content/locales/zh-CN/template-clips.mdx +2 -0
- package/docs/content/locales/zh-TW/template-analytics.mdx +2 -0
- package/docs/content/locales/zh-TW/template-clips.mdx +2 -0
- package/docs/content/template-analytics.mdx +2 -0
- package/docs/content/template-clips.mdx +22 -10
- package/docs/content/tracking.mdx +2 -0
- 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
|
|
289
|
-
figmaPasteTarget: "Paste
|
|
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
|
|
304
|
-
localDescription: "Connect
|
|
303
|
+
localTitle: "Local app",
|
|
304
|
+
localDescription: "Connect any running local app with /visual-edit.",
|
|
305
305
|
visualEditGuidance:
|
|
306
|
-
"
|
|
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
|
|
10104
|
-
figmaPasteTarget: "
|
|
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
|
|
10118
|
-
localDescription: "使用 visual-edit
|
|
10115
|
+
localTitle: "本機 app",
|
|
10116
|
+
localDescription: "使用 /visual-edit 連接任何執行中的本機 app。",
|
|
10119
10117
|
visualEditGuidance:
|
|
10120
|
-
"
|
|
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: "
|
|
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
|
|
10160
|
-
localDescription: "使用 visual-edit
|
|
10155
|
+
localTitle: "本地 app",
|
|
10156
|
+
localDescription: "使用 /visual-edit 连接任何正在运行的本地 app。",
|
|
10161
10157
|
visualEditGuidance:
|
|
10162
|
-
"
|
|
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
|
|
10189
|
-
figmaPasteTarget: "Pega
|
|
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
|
|
10204
|
-
localDescription:
|
|
10197
|
+
localTitle: "App local",
|
|
10198
|
+
localDescription:
|
|
10199
|
+
"Conecta cualquier app local en ejecución con /visual-edit.",
|
|
10205
10200
|
visualEditGuidance:
|
|
10206
|
-
"
|
|
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,
|
|
10233
|
-
figmaPasteTarget: "Collez le
|
|
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
|
|
10240
|
+
localTitle: "App locale",
|
|
10248
10241
|
localDescription:
|
|
10249
|
-
"Connectez
|
|
10242
|
+
"Connectez n’importe quelle app locale en cours d’exécution avec /visual-edit.",
|
|
10250
10243
|
visualEditGuidance:
|
|
10251
|
-
"
|
|
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
|
|
10278
|
-
figmaPasteTarget: "
|
|
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
|
|
10293
|
-
localDescription: "Verbinde
|
|
10283
|
+
localTitle: "Lokale App",
|
|
10284
|
+
localDescription: "Verbinde jede laufende lokale App mit /visual-edit.",
|
|
10294
10285
|
visualEditGuidance:
|
|
10295
|
-
"
|
|
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
|
|
10322
|
-
figmaPasteTarget: "
|
|
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
|
|
10337
|
-
localDescription:
|
|
10325
|
+
localTitle: "ローカル app",
|
|
10326
|
+
localDescription:
|
|
10327
|
+
"/visual-edit で任意の実行中ローカル app に接続します。",
|
|
10338
10328
|
visualEditGuidance:
|
|
10339
|
-
"app
|
|
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에서 프레임이나 레이어를 복사한 뒤
|
|
10366
|
-
figmaPasteTarget: "
|
|
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
|
|
10381
|
-
localDescription:
|
|
10368
|
+
localTitle: "로컬 app",
|
|
10369
|
+
localDescription:
|
|
10370
|
+
"/visual-edit로 실행 중인 모든 로컬 app을 연결합니다.",
|
|
10382
10371
|
visualEditGuidance:
|
|
10383
|
-
"app을
|
|
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
|
|
10410
|
-
figmaPasteTarget: "Cole
|
|
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
|
|
10425
|
-
localDescription:
|
|
10411
|
+
localTitle: "App local",
|
|
10412
|
+
localDescription:
|
|
10413
|
+
"Conecte qualquer app local em execução com /visual-edit.",
|
|
10426
10414
|
visualEditGuidance:
|
|
10427
|
-
"
|
|
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 कॉपी करें, फिर
|
|
10454
|
-
figmaPasteTarget: "
|
|
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
|
|
10469
|
-
localDescription:
|
|
10454
|
+
localTitle: "स्थानीय app",
|
|
10455
|
+
localDescription:
|
|
10456
|
+
"/visual-edit से किसी भी चल रहे local app को connect करें।",
|
|
10470
10457
|
visualEditGuidance:
|
|
10471
|
-
"
|
|
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، ثم
|
|
10498
|
-
figmaPasteTarget: "الصق
|
|
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: "تطبيق محلي
|
|
10512
|
-
localDescription:
|
|
10496
|
+
localTitle: "تطبيق محلي",
|
|
10497
|
+
localDescription:
|
|
10498
|
+
"وصّل أي تطبيق محلي قيد التشغيل باستخدام /visual-edit.",
|
|
10513
10499
|
visualEditGuidance:
|
|
10514
|
-
"
|
|
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: <
|
|
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(
|
|
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
|
-
() => () =>
|
|
4858
|
-
|
|
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
|
-
<
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
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}
|