@agent-native/core 0.109.3 → 0.110.0
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 +2 -2
- package/corpus/core/CHANGELOG.md +19 -0
- package/corpus/core/docs/content/actions.mdx +2 -4
- package/corpus/core/docs/content/agent-native-toolkit.mdx +46 -13
- package/corpus/core/docs/content/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/audit-log.mdx +1 -2
- package/corpus/core/docs/content/authentication.mdx +3 -2
- package/corpus/core/docs/content/client.mdx +19 -18
- package/corpus/core/docs/content/components.mdx +1 -1
- package/corpus/core/docs/content/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/doctor.mdx +27 -6
- package/corpus/core/docs/content/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/getting-started.mdx +4 -2
- package/corpus/core/docs/content/internationalization.mdx +9 -6
- package/corpus/core/docs/content/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ar-SA/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ar-SA/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ar-SA/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/de-DE/client.mdx +19 -18
- package/corpus/core/docs/content/locales/de-DE/components.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/de-DE/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/de-DE/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/de-DE/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/es-ES/client.mdx +19 -18
- package/corpus/core/docs/content/locales/es-ES/components.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/es-ES/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/es-ES/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
- package/corpus/core/docs/content/locales/es-ES/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/fr-FR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/fr-FR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/fr-FR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/hi-IN/client.mdx +19 -18
- package/corpus/core/docs/content/locales/hi-IN/components.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/hi-IN/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ja-JP/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ja-JP/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ja-JP/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ko-KR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ko-KR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ko-KR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/pt-BR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/pt-BR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/pt-BR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/zh-CN/client.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-CN/components.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/zh-CN/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/zh-TW/client.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-TW/components.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/zh-TW/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
- package/corpus/core/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
- package/corpus/core/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
- package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/observability.mdx +1 -2
- package/corpus/core/docs/content/package-lifecycle.mdx +29 -0
- package/corpus/core/docs/content/real-time-collaboration.mdx +8 -7
- package/corpus/core/docs/content/sharing.mdx +1 -2
- package/corpus/core/docs/content/template-chat.mdx +1 -2
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +3 -2
- package/corpus/core/docs/content/toolkit-capability-packages.mdx +52 -0
- package/corpus/core/docs/content/toolkit-context-knowledge.mdx +46 -0
- package/corpus/core/docs/content/toolkit-editors-canvases.mdx +55 -0
- package/corpus/core/docs/content/toolkit-observability.mdx +1 -2
- package/corpus/core/docs/content/toolkit-settings.mdx +2 -2
- package/corpus/core/docs/content/toolkit-sharing.mdx +5 -2
- package/corpus/core/docs/content/tracking.mdx +2 -4
- package/corpus/core/docs/content/what-is-agent-native.mdx +1 -2
- package/corpus/core/export-snapshot.json +324 -0
- package/corpus/core/migration-manifest.json +1353 -0
- package/corpus/core/package.json +54 -35
- package/corpus/core/src/cli/create.ts +39 -3
- package/corpus/core/src/cli/doctor.ts +77 -7
- package/corpus/core/src/cli/migration-codemod.ts +569 -0
- package/corpus/core/src/cli/package-lifecycle.ts +2 -0
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +2 -0
- package/corpus/core/src/cli/upgrade.ts +63 -7
- package/corpus/core/src/client/agent-chat/index.ts +279 -0
- package/corpus/core/src/client/agent-page/AgentContextTab.tsx +3 -1
- package/corpus/core/src/client/analytics/index.ts +40 -0
- package/corpus/core/src/client/api-path.ts +2 -2
- package/corpus/core/src/client/automation/index.ts +4 -0
- package/corpus/core/src/client/changelog/index.ts +1 -0
- package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +5 -84
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +52 -14
- package/corpus/core/src/client/chat/widgets/inline-extension-result.ts +86 -0
- package/corpus/core/src/client/client-bootstrap.ts +7 -0
- package/corpus/core/src/client/context-xray/ContextMeter.tsx +31 -111
- package/corpus/core/src/client/context-xray/ContextSegmentRow.tsx +8 -111
- package/corpus/core/src/client/context-xray/ContextTreemap.tsx +6 -111
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +31 -391
- package/corpus/core/src/client/context-xray/SegmentProvenancePopover.tsx +4 -52
- package/corpus/core/src/client/context-xray/format.ts +0 -33
- package/corpus/core/src/client/hooks/index.ts +46 -0
- package/corpus/core/src/client/host/index.ts +170 -0
- package/corpus/core/src/client/index.ts +20 -664
- package/corpus/core/src/client/navigation/index.ts +54 -0
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +1 -1
- package/corpus/core/src/client/resources/index.ts +2 -1
- package/corpus/core/src/client/resources/use-resources.ts +0 -20
- package/corpus/core/src/client/rich-markdown-editor/index.ts +42 -57
- package/corpus/core/src/client/rich-markdown-editor/uploadEditorImage.ts +2 -1
- package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
- package/corpus/core/src/client/ui/index.ts +55 -0
- package/corpus/core/src/client/uploads/index.ts +1 -0
- package/corpus/core/src/client/uploads/use-upload-resource.ts +24 -0
- package/corpus/core/src/client/visual-style-controls.tsx +1 -1088
- package/corpus/core/src/client/widgets/index.ts +41 -0
- package/corpus/core/src/collab/agent-identity.ts +5 -22
- package/corpus/core/src/collab/client.ts +1 -53
- package/corpus/core/src/localization/default-messages.ts +2 -1
- package/corpus/core/src/package-lifecycle/deprecated-imports.ts +179 -0
- package/corpus/core/src/package-lifecycle/index.ts +5 -0
- package/corpus/core/src/package-lifecycle/migration-manifest.ts +159 -0
- package/corpus/core/src/package-lifecycle/migration-message.ts +6 -0
- package/corpus/core/src/package-lifecycle/tombstone.ts +44 -0
- package/corpus/core/src/package-lifecycle/upgrade-error.ts +19 -0
- package/corpus/core/src/styles/rich-markdown-editor.css +1 -510
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/core/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/core/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/corpus/core/src/templates/default/app/i18n/index.ts +1 -1
- package/corpus/core/src/templates/default/app/lib/utils.ts +1 -1
- package/corpus/core/src/templates/default/app/root.tsx +8 -6
- package/corpus/core/src/templates/default/app/routes/_index.tsx +2 -1
- package/corpus/core/src/templates/default/app/routes/agent.tsx +2 -1
- package/corpus/core/src/templates/default/app/routes/settings.tsx +2 -3
- package/corpus/core/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/corpus/core/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/testing.ts +1 -1
- package/corpus/core/src/vite/action-types-plugin.ts +4 -0
- package/corpus/core/src/vite/client.ts +80 -62
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/analytics/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/analytics/app/components/Markdown.tsx +1 -1
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +2 -1
- package/corpus/templates/analytics/app/components/agents/FeatureFlagsFleetPanel.tsx +6 -4
- package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +1 -1
- package/corpus/templates/analytics/app/components/auth/AuthProvider.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +4 -6
- package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -2
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +4 -6
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +10 -10
- package/corpus/templates/analytics/app/entry.client.tsx +2 -4
- package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +4 -1
- package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +6 -4
- package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +4 -1
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +1 -1
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -4
- package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +1 -1
- package/corpus/templates/analytics/app/hooks/use-user-pref.ts +1 -1
- package/corpus/templates/analytics/app/i18n/index.ts +1 -1
- package/corpus/templates/analytics/app/i18n-data.ts +1 -1
- package/corpus/templates/analytics/app/lib/api-hooks.ts +1 -1
- package/corpus/templates/analytics/app/lib/item-popularity.ts +1 -1
- package/corpus/templates/analytics/app/lib/query-metrics.ts +1 -1
- package/corpus/templates/analytics/app/lib/sql-query.ts +1 -1
- package/corpus/templates/analytics/app/lib/tab-id.ts +1 -1
- package/corpus/templates/analytics/app/lib/track-metric.ts +1 -1
- package/corpus/templates/analytics/app/lib/user-info.ts +1 -1
- package/corpus/templates/analytics/app/lib/utils.ts +1 -1
- package/corpus/templates/analytics/app/pages/Agents.tsx +5 -6
- package/corpus/templates/analytics/app/pages/Ask.tsx +2 -2
- package/corpus/templates/analytics/app/pages/DataDictionary.tsx +3 -3
- package/corpus/templates/analytics/app/pages/DataSources.tsx +7 -5
- package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +5 -6
- package/corpus/templates/analytics/app/pages/adhoc/BlankDashboard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +8 -6
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +4 -6
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +9 -7
- package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +3 -6
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +4 -4
- package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +1 -11
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +1 -14
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +1 -8
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +4 -10
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +4 -8
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +4 -10
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +5 -6
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +5 -5
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +2 -2
- package/corpus/templates/analytics/app/pages/settings/settings-search.ts +1 -1
- package/corpus/templates/analytics/app/root.tsx +6 -6
- package/corpus/templates/analytics/app/routes/agent.tsx +1 -1
- package/corpus/templates/analytics/app/routes/catalog.tsx +2 -2
- package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
- package/corpus/templates/analytics/app/routes/status.$slug.tsx +1 -13
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/assets/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -1
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +3 -3
- package/corpus/templates/assets/app/components/layout/Header.tsx +3 -5
- package/corpus/templates/assets/app/components/layout/Layout.tsx +4 -4
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +6 -6
- package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +2 -2
- package/corpus/templates/assets/app/components/library/GenerationPresetsPanel.tsx +2 -1
- package/corpus/templates/assets/app/components/library/LibraryCard.tsx +1 -1
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
- package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +2 -2
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -3
- package/corpus/templates/assets/app/i18n/index.ts +1 -1
- package/corpus/templates/assets/app/i18n-data.ts +1 -1
- package/corpus/templates/assets/app/lib/asset-urls.ts +1 -1
- package/corpus/templates/assets/app/lib/utils.ts +1 -1
- package/corpus/templates/assets/app/root.tsx +10 -9
- package/corpus/templates/assets/app/routes/_index.tsx +3 -3
- package/corpus/templates/assets/app/routes/agent.tsx +1 -1
- package/corpus/templates/assets/app/routes/asset.$id.tsx +3 -3
- package/corpus/templates/assets/app/routes/asset.$id_.embed.tsx +1 -1
- package/corpus/templates/assets/app/routes/audit.tsx +2 -2
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +6 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +4 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id_.settings.tsx +3 -3
- package/corpus/templates/assets/app/routes/library.tsx +13 -9
- package/corpus/templates/assets/app/routes/run.$id_.embed.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +11 -12
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/brain/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +1 -1
- package/corpus/templates/brain/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +3 -6
- package/corpus/templates/brain/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/brain/app/i18n/index.ts +1 -1
- package/corpus/templates/brain/app/i18n-data.ts +1 -1
- package/corpus/templates/brain/app/lib/utils.ts +1 -1
- package/corpus/templates/brain/app/root.tsx +10 -9
- package/corpus/templates/brain/app/routes/_index.tsx +2 -2
- package/corpus/templates/brain/app/routes/agent.tsx +1 -1
- package/corpus/templates/brain/app/routes/knowledge.tsx +2 -2
- package/corpus/templates/brain/app/routes/ops.tsx +2 -2
- package/corpus/templates/brain/app/routes/review.tsx +2 -2
- package/corpus/templates/brain/app/routes/search.tsx +2 -1
- package/corpus/templates/brain/app/routes/settings.tsx +8 -7
- package/corpus/templates/brain/app/routes/sources.tsx +2 -2
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/calendar/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/calendar/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +1 -1
- package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -1
- package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +2 -1
- package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/ApolloPanel.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +3 -5
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDescription.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +3 -3
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -5
- package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/WorkingLocationEditor.tsx +1 -1
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/calendar/app/hooks/use-apollo.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-availability.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-booking-links.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-bookings.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-events.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-external-calendars.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-google-auth.ts +2 -2
- package/corpus/templates/calendar/app/hooks/use-integrations.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-navigation-state.ts +3 -2
- package/corpus/templates/calendar/app/hooks/use-overlay-people.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-people.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-settings.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +2 -1
- package/corpus/templates/calendar/app/hooks/use-zoom-auth.ts +2 -1
- package/corpus/templates/calendar/app/i18n/index.ts +1 -1
- package/corpus/templates/calendar/app/i18n-data.ts +1 -1
- package/corpus/templates/calendar/app/lib/api-path.ts +1 -1
- package/corpus/templates/calendar/app/lib/utils.ts +1 -1
- package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +1 -1
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +3 -1
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -3
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +1 -1
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +3 -5
- package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +1 -1
- package/corpus/templates/calendar/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/calendar/app/pages/Settings.tsx +9 -8
- package/corpus/templates/calendar/app/root.tsx +15 -9
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/calendar/app/routes/_app.settings.tsx +1 -1
- package/corpus/templates/calendar/app/routes/event.tsx +3 -3
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/chat/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/chat/app/i18n/index.ts +1 -1
- package/corpus/templates/chat/app/i18n-data.ts +1 -1
- package/corpus/templates/chat/app/lib/utils.ts +1 -1
- package/corpus/templates/chat/app/root.tsx +10 -9
- package/corpus/templates/chat/app/routes/_index.tsx +2 -2
- package/corpus/templates/chat/app/routes/agent.tsx +10 -3
- package/corpus/templates/chat/app/routes/database.tsx +1 -1
- package/corpus/templates/chat/app/routes/observability.tsx +2 -1
- package/corpus/templates/chat/app/routes/settings.tsx +4 -5
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/clips/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/clips/app/components/capture-install-options.tsx +2 -1
- package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +2 -2
- package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +4 -14
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/split-button.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +3 -3
- package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +1 -1
- package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -1
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +1 -1
- package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +6 -6
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +1 -1
- package/corpus/templates/clips/app/components/library/recording-card.tsx +1 -1
- package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -17
- package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -20
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +3 -1
- package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +1 -1
- package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +1 -1
- package/corpus/templates/clips/app/components/player/captions-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +2 -1
- package/corpus/templates/clips/app/components/player/insights-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/player/player-controls.tsx +1 -1
- package/corpus/templates/clips/app/components/player/settings-panel.tsx +2 -2
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +3 -3
- package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -1
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -6
- package/corpus/templates/clips/app/components/player/video-player.tsx +3 -5
- package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -13
- package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +3 -6
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
- package/corpus/templates/clips/app/components/sharing/viewed-by-popover.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +3 -5
- package/corpus/templates/clips/app/components/workspace/engagement-chart.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +3 -1
- package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/members-list.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +1 -1
- package/corpus/templates/clips/app/entry.client.tsx +2 -4
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +3 -17
- package/corpus/templates/clips/app/hooks/use-library.ts +4 -1
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/clips/app/hooks/use-video-storage-status.ts +1 -1
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +1 -1
- package/corpus/templates/clips/app/i18n/index.ts +5 -5
- package/corpus/templates/clips/app/lib/camera-blur.ts +1 -1
- package/corpus/templates/clips/app/lib/capture-install-options.ts +1 -1
- package/corpus/templates/clips/app/lib/thumbnail-capture.ts +1 -1
- package/corpus/templates/clips/app/lib/utils.ts +1 -1
- package/corpus/templates/clips/app/root.tsx +13 -9
- package/corpus/templates/clips/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.archive.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.extensions.$id.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.library.folder.$folderId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -5
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +7 -7
- package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.shared.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.folder.$folderId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.trash.tsx +2 -1
- package/corpus/templates/clips/app/routes/_index.tsx +1 -1
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +2 -1
- package/corpus/templates/clips/app/routes/bug-report.tsx +2 -1
- package/corpus/templates/clips/app/routes/download.tsx +2 -1
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -1
- package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +4 -5
- package/corpus/templates/clips/app/routes/record.tsx +4 -4
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +5 -6
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +3 -1
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/content/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +1 -1
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +1 -1
- package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
- package/corpus/templates/content/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/content/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -1
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +3 -1
- package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +7 -5
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +3 -6
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +7 -9
- package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +1 -1
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +1 -1
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +2 -1
- package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +1 -1
- package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +2 -1
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +10 -6
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -6
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +2 -2
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/CodeBlockNode.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/DragHandle.tsx +4 -4
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +1 -1
- package/corpus/templates/content/app/components/editor/image-upload.ts +1 -1
- package/corpus/templates/content/app/components/editor/registrySlashItems.ts +1 -1
- package/corpus/templates/content/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/content/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +9 -9
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +5 -1
- package/corpus/templates/content/app/entry.client.tsx +2 -4
- package/corpus/templates/content/app/hooks/use-comments.ts +4 -1
- package/corpus/templates/content/app/hooks/use-content-database.ts +4 -1
- package/corpus/templates/content/app/hooks/use-content-spaces.ts +4 -1
- package/corpus/templates/content/app/hooks/use-db-sync.ts +1 -1
- package/corpus/templates/content/app/hooks/use-document-properties.ts +4 -1
- package/corpus/templates/content/app/hooks/use-document-versions.ts +4 -1
- package/corpus/templates/content/app/hooks/use-documents.ts +4 -1
- package/corpus/templates/content/app/hooks/use-mention-members.ts +1 -1
- package/corpus/templates/content/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/content/app/hooks/use-notion.ts +2 -2
- package/corpus/templates/content/app/i18n/index.ts +1 -1
- package/corpus/templates/content/app/i18n-data.ts +1 -1
- package/corpus/templates/content/app/lib/local-control-resources.ts +1 -1
- package/corpus/templates/content/app/lib/utils.ts +1 -1
- package/corpus/templates/content/app/root.tsx +15 -9
- package/corpus/templates/content/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/content/app/routes/_app.local-files.tsx +2 -1
- package/corpus/templates/content/app/routes/_app.page.$id.tsx +1 -1
- package/corpus/templates/content/app/routes/_app.settings.tsx +4 -5
- package/corpus/templates/content/app/routes/p.$id.tsx +2 -1
- package/corpus/templates/content/package.json +25 -25
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/design/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/design/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/design/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +1 -1
- package/corpus/templates/design/app/components/design/BreakpointBar.tsx +1 -30
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +4 -3
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +4 -4
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +2 -5
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +2 -2
- package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +4 -1
- package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +1 -1
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1 -19
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2 -2
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +2 -2
- package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +1 -1
- package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +2 -2
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +1 -22
- package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +2 -2
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +4 -14
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +2 -17
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/editor/BufferSync.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/inline-provider.ts +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +1 -1
- package/corpus/templates/design/app/components/design/design-canvas/annotation-snapshot.ts +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +2 -2
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +1 -16
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +2 -34
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +2 -1
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +1 -25
- package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +1 -30
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +1 -1
- package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +1 -1
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Header.tsx +4 -4
- package/corpus/templates/design/app/components/layout/Layout.tsx +4 -5
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +2 -2
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +3 -4
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +1 -1
- package/corpus/templates/design/app/hooks/use-design-system.ts +1 -1
- package/corpus/templates/design/app/hooks/use-design-systems.ts +1 -1
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +2 -2
- package/corpus/templates/design/app/hooks/use-question-flow.ts +1 -1
- package/corpus/templates/design/app/i18n/index.ts +1 -1
- package/corpus/templates/design/app/i18n-data.ts +1 -1
- package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +1 -1
- package/corpus/templates/design/app/lib/agent-chat.ts +1 -1
- package/corpus/templates/design/app/lib/design-save-outbox.ts +1 -1
- package/corpus/templates/design/app/lib/desktop-design-preview.ts +1 -1
- package/corpus/templates/design/app/lib/figma-connection.ts +2 -1
- package/corpus/templates/design/app/lib/figma-svg-copy.ts +1 -1
- package/corpus/templates/design/app/lib/pending-generation.ts +1 -1
- package/corpus/templates/design/app/lib/utils.ts +1 -1
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +4 -6
- package/corpus/templates/design/app/pages/DesignSystems.tsx +4 -4
- package/corpus/templates/design/app/pages/Index.tsx +5 -5
- package/corpus/templates/design/app/pages/NotFound.tsx +3 -5
- package/corpus/templates/design/app/pages/Present.tsx +7 -6
- package/corpus/templates/design/app/pages/Templates.tsx +4 -4
- package/corpus/templates/design/app/pages/VisualEdit.tsx +3 -1
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +1 -1
- package/corpus/templates/design/app/root.tsx +10 -9
- package/corpus/templates/design/app/routes/agent.tsx +2 -1
- package/corpus/templates/design/app/routes/observability.tsx +1 -1
- package/corpus/templates/design/app/routes/settings.tsx +4 -5
- package/corpus/templates/design/package.json +1 -1
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/dispatch/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/dispatch/app/i18n/index.ts +1 -1
- package/corpus/templates/dispatch/app/i18n-data.ts +1 -1
- package/corpus/templates/dispatch/app/root.tsx +10 -9
- package/corpus/templates/dispatch/app/routes/agent.tsx +2 -1
- package/corpus/templates/dispatch/app/routes/integrations.tsx +3 -3
- package/corpus/templates/dispatch/app/routes/settings.tsx +4 -5
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/forms/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/forms/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/forms/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +1 -1
- package/corpus/templates/forms/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/forms/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/forms/app/hooks/use-forms.ts +2 -2
- package/corpus/templates/forms/app/hooks/use-navigation-state.ts +3 -3
- package/corpus/templates/forms/app/hooks/use-responses.ts +1 -1
- package/corpus/templates/forms/app/i18n/index.ts +1 -1
- package/corpus/templates/forms/app/lib/utils.ts +1 -1
- package/corpus/templates/forms/app/pages/AskPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +5 -6
- package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -1
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +3 -6
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +1 -1
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +1 -1
- package/corpus/templates/forms/app/root.tsx +15 -12
- package/corpus/templates/forms/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/forms/app/routes/_app.settings.tsx +4 -5
- package/corpus/templates/forms/app/routes/_index.tsx +1 -1
- package/corpus/templates/forms/app/routes/form-preview.tsx +5 -1
- package/corpus/templates/macros/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/AddMealDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/AddWeightDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +2 -1
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +1 -1
- package/corpus/templates/macros/app/components/MealCard.tsx +1 -1
- package/corpus/templates/macros/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/macros/app/components/VoiceDictation.tsx +2 -1
- package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightCard.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightTracker.tsx +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -8
- package/corpus/templates/macros/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/macros/app/i18n/index.ts +1 -1
- package/corpus/templates/macros/app/lib/api.ts +1 -1
- package/corpus/templates/macros/app/lib/utils.ts +1 -1
- package/corpus/templates/macros/app/root.tsx +10 -9
- package/corpus/templates/macros/app/routes/_index.tsx +2 -2
- package/corpus/templates/macros/app/routes/agent.tsx +2 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +2 -1
- package/corpus/templates/macros/app/routes/settings.tsx +4 -5
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/mail/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +3 -3
- package/corpus/templates/mail/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/mail/app/components/agent-engine-picker.tsx +2 -1
- package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +1 -1
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +2 -1
- package/corpus/templates/mail/app/components/email/ComposeSlashMenu.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailList.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +2 -1
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +2 -1
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +2 -1
- package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +1 -1
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +1 -1
- package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +1 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -6
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +2 -1
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
- package/corpus/templates/mail/app/entry.client.tsx +1 -6
- package/corpus/templates/mail/app/hooks/use-aliases.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-apollo.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-automations.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-compose-state.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-draft-queue.ts +4 -1
- package/corpus/templates/mail/app/hooks/use-emails.ts +3 -1
- package/corpus/templates/mail/app/hooks/use-gmail-filters.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-google-auth.ts +2 -1
- package/corpus/templates/mail/app/hooks/use-integrations.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-scheduled-jobs.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-snippets.ts +1 -1
- package/corpus/templates/mail/app/i18n/index.ts +1 -1
- package/corpus/templates/mail/app/lib/agent-generate.ts +1 -1
- package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +1 -10
- package/corpus/templates/mail/app/lib/mcp-chat-bridge.ts +1 -1
- package/corpus/templates/mail/app/lib/thread-cache.ts +1 -1
- package/corpus/templates/mail/app/lib/upload.ts +1 -1
- package/corpus/templates/mail/app/lib/utils.ts +1 -1
- package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +1 -1
- package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
- package/corpus/templates/mail/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +9 -8
- package/corpus/templates/mail/app/root.tsx +11 -8
- package/corpus/templates/mail/app/routes/agent.tsx +2 -1
- package/corpus/templates/mail/app/routes/email.tsx +5 -1
- package/corpus/templates/mail/package.json +9 -9
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/plan/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +2 -0
- package/corpus/templates/plan/app/components/editor/PlanBlockNode.tsx +2 -2
- package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +8 -8
- package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +7 -7
- package/corpus/templates/plan/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/plan/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +8 -9
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +3 -5
- package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +2 -1
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +7 -5
- package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +5 -7
- package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +7 -5
- package/corpus/templates/plan/app/components/plan/PlanMarkdownReader.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanTableOfContents.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +2 -2
- package/corpus/templates/plan/app/components/plan/PrototypeViewer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/VisualAnswerInline.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/planBlocks.tsx +3 -5
- package/corpus/templates/plan/app/components/plan/wireframe/LegacyRegionWireframe.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -3
- package/corpus/templates/plan/app/hooks/use-plan-presence.ts +2 -2
- package/corpus/templates/plan/app/hooks/use-plans.ts +4 -1
- package/corpus/templates/plan/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +4 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/plan/app/i18n/index.ts +1 -1
- package/corpus/templates/plan/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/plan/app/lib/local-codebase-context.ts +1 -1
- package/corpus/templates/plan/app/lib/local-control-resources.ts +1 -1
- package/corpus/templates/plan/app/lib/plan-comment-editor-helpers.ts +1 -1
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +1 -1
- package/corpus/templates/plan/app/lib/register-chat-renderers.tsx +1 -1
- package/corpus/templates/plan/app/lib/utils.ts +1 -1
- package/corpus/templates/plan/app/pages/PlanChatPage.tsx +2 -2
- package/corpus/templates/plan/app/pages/PlansPage.tsx +13 -14
- package/corpus/templates/plan/app/root.tsx +11 -10
- package/corpus/templates/plan/app/routes/agent.tsx +2 -1
- package/corpus/templates/plan/app/routes/settings.tsx +4 -5
- package/corpus/templates/plan/changelog/2026-07-18-visual-plans-now-open-on-wireframes-by-default-when-a-protot.md +6 -0
- package/corpus/templates/plan/package.json +3 -3
- package/corpus/templates/plan/shared/plan-doc.ts +2 -47
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/slides/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/slides/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemPreview.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/AssetLibraryPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +6 -8
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/GeneratingOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GoogleDocImportHint.tsx +3 -5
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -1
- package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +5 -1
- package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/MermaidToExcalidrawPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +3 -1
- package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +12 -8
- package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/SlideSlashMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +2 -2
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +2 -2
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Layout.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +2 -1
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +5 -3
- package/corpus/templates/slides/app/entry.client.tsx +2 -4
- package/corpus/templates/slides/app/hooks/use-agent-generating.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-presence.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-role.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-versions.ts +4 -1
- package/corpus/templates/slides/app/hooks/use-design-systems.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +2 -2
- package/corpus/templates/slides/app/i18n/index.ts +1 -1
- package/corpus/templates/slides/app/lib/utils.ts +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +5 -6
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -1
- package/corpus/templates/slides/app/pages/Index.tsx +4 -7
- package/corpus/templates/slides/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/slides/app/pages/Presentation.tsx +1 -1
- package/corpus/templates/slides/app/pages/SharedPresentation.tsx +2 -1
- package/corpus/templates/slides/app/root.tsx +13 -11
- package/corpus/templates/slides/app/routes/agent.tsx +2 -1
- package/corpus/templates/slides/app/routes/settings.tsx +4 -5
- package/corpus/templates/slides/app/routes/slide.tsx +3 -3
- package/corpus/templates/slides/package.json +13 -13
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/tasks/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +1 -1
- package/corpus/templates/tasks/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +4 -1
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +2 -1
- package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +1 -1
- package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +1 -1
- package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/tasks/app/hooks/use-tasks.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +4 -1
- package/corpus/templates/tasks/app/lib/utils.ts +1 -1
- package/corpus/templates/tasks/app/root.tsx +9 -7
- package/dist/catalog.json +39 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +32 -3
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/doctor.d.ts +4 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +57 -5
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/migration-codemod.d.ts +21 -0
- package/dist/cli/migration-codemod.d.ts.map +1 -0
- package/dist/cli/migration-codemod.js +363 -0
- package/dist/cli/migration-codemod.js.map +1 -0
- package/dist/cli/package-lifecycle.d.ts.map +1 -1
- package/dist/cli/package-lifecycle.js +2 -0
- package/dist/cli/package-lifecycle.js.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.js +2 -0
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
- package/dist/cli/upgrade.d.ts +7 -0
- package/dist/cli/upgrade.d.ts.map +1 -1
- package/dist/cli/upgrade.js +52 -7
- package/dist/cli/upgrade.js.map +1 -1
- package/dist/client/agent-chat/index.d.ts +40 -0
- package/dist/client/agent-chat/index.d.ts.map +1 -0
- package/dist/client/agent-chat/index.js +39 -0
- package/dist/client/agent-chat/index.js.map +1 -0
- package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -1
- package/dist/client/agent-page/AgentContextTab.js +3 -1
- package/dist/client/agent-page/AgentContextTab.js.map +1 -1
- package/dist/client/analytics/index.d.ts +3 -0
- package/dist/client/analytics/index.d.ts.map +1 -0
- package/dist/client/analytics/index.js +3 -0
- package/dist/client/analytics/index.js.map +1 -0
- package/dist/client/api-path.js +2 -2
- package/dist/client/api-path.js.map +1 -1
- package/dist/client/automation/index.d.ts +2 -0
- package/dist/client/automation/index.d.ts.map +1 -0
- package/dist/client/automation/index.js +2 -0
- package/dist/client/automation/index.js.map +1 -0
- package/dist/client/changelog/index.d.ts +2 -0
- package/dist/client/changelog/index.d.ts.map +1 -0
- package/dist/client/changelog/index.js +2 -0
- package/dist/client/changelog/index.js.map +1 -0
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts +1 -12
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.js +2 -66
- package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +21 -8
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/chat/widgets/inline-extension-result.d.ts +14 -0
- package/dist/client/chat/widgets/inline-extension-result.d.ts.map +1 -0
- package/dist/client/chat/widgets/inline-extension-result.js +67 -0
- package/dist/client/chat/widgets/inline-extension-result.js.map +1 -0
- package/dist/client/client-bootstrap.d.ts +2 -0
- package/dist/client/client-bootstrap.d.ts.map +1 -0
- package/dist/client/client-bootstrap.js +7 -0
- package/dist/client/client-bootstrap.js.map +1 -0
- package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +8 -23
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextSegmentRow.d.ts.map +1 -1
- package/dist/client/context-xray/ContextSegmentRow.js +3 -19
- package/dist/client/context-xray/ContextSegmentRow.js.map +1 -1
- package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
- package/dist/client/context-xray/ContextTreemap.js +3 -54
- package/dist/client/context-xray/ContextTreemap.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +21 -163
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/context-xray/SegmentProvenancePopover.d.ts.map +1 -1
- package/dist/client/context-xray/SegmentProvenancePopover.js +3 -4
- package/dist/client/context-xray/SegmentProvenancePopover.js.map +1 -1
- package/dist/client/context-xray/format.d.ts +0 -4
- package/dist/client/context-xray/format.d.ts.map +1 -1
- package/dist/client/context-xray/format.js +0 -49
- package/dist/client/context-xray/format.js.map +1 -1
- package/dist/client/hooks/index.d.ts +13 -0
- package/dist/client/hooks/index.d.ts.map +1 -0
- package/dist/client/hooks/index.js +13 -0
- package/dist/client/hooks/index.js.map +1 -0
- package/dist/client/host/index.d.ts +20 -0
- package/dist/client/host/index.d.ts.map +1 -0
- package/dist/client/host/index.js +18 -0
- package/dist/client/host/index.js.map +1 -0
- package/dist/client/index.d.ts +19 -100
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +19 -106
- package/dist/client/index.js.map +1 -1
- package/dist/client/navigation/index.d.ts +6 -0
- package/dist/client/navigation/index.d.ts.map +1 -0
- package/dist/client/navigation/index.js +6 -0
- package/dist/client/navigation/index.js.map +1 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +2 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/index.d.ts +2 -1
- package/dist/client/resources/index.d.ts.map +1 -1
- package/dist/client/resources/index.js +1 -0
- package/dist/client/resources/index.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +0 -1
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +0 -17
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/rich-markdown-editor/index.d.ts +1 -12
- package/dist/client/rich-markdown-editor/index.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/index.js +1 -12
- package/dist/client/rich-markdown-editor/index.js.map +1 -1
- package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts +1 -1
- package/dist/client/rich-markdown-editor/uploadEditorImage.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/uploadEditorImage.js.map +1 -1
- package/dist/client/route-chunk-recovery/index.d.ts +2 -0
- package/dist/client/route-chunk-recovery/index.d.ts.map +1 -0
- package/dist/client/route-chunk-recovery/index.js +2 -0
- package/dist/client/route-chunk-recovery/index.js.map +1 -0
- package/dist/client/ui/index.d.ts +18 -0
- package/dist/client/ui/index.d.ts.map +1 -0
- package/dist/client/ui/index.js +18 -0
- package/dist/client/ui/index.js.map +1 -0
- package/dist/client/uploads/index.d.ts +2 -0
- package/dist/client/uploads/index.d.ts.map +1 -0
- package/dist/client/uploads/index.js +2 -0
- package/dist/client/uploads/index.js.map +1 -0
- package/dist/client/uploads/use-upload-resource.d.ts +3 -0
- package/dist/client/uploads/use-upload-resource.d.ts.map +1 -0
- package/dist/client/uploads/use-upload-resource.js +20 -0
- package/dist/client/uploads/use-upload-resource.js.map +1 -0
- package/dist/client/visual-style-controls.d.ts +1 -89
- package/dist/client/visual-style-controls.d.ts.map +1 -1
- package/dist/client/visual-style-controls.js +1 -498
- package/dist/client/visual-style-controls.js.map +1 -1
- package/dist/client/widgets/index.d.ts +3 -0
- package/dist/client/widgets/index.d.ts.map +1 -0
- package/dist/client/widgets/index.js +3 -0
- package/dist/client/widgets/index.js.map +1 -0
- package/dist/collab/agent-identity.d.ts +1 -14
- package/dist/collab/agent-identity.d.ts.map +1 -1
- package/dist/collab/agent-identity.js +1 -13
- package/dist/collab/agent-identity.js.map +1 -1
- package/dist/collab/client.d.ts +1 -19
- package/dist/collab/client.d.ts.map +1 -1
- package/dist/collab/client.js +1 -53
- package/dist/collab/client.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +2 -1
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +2 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/package-lifecycle/deprecated-imports.d.ts +15 -0
- package/dist/package-lifecycle/deprecated-imports.d.ts.map +1 -0
- package/dist/package-lifecycle/deprecated-imports.js +141 -0
- package/dist/package-lifecycle/deprecated-imports.js.map +1 -0
- package/dist/package-lifecycle/index.d.ts +5 -0
- package/dist/package-lifecycle/index.d.ts.map +1 -1
- package/dist/package-lifecycle/index.js +5 -0
- package/dist/package-lifecycle/index.js.map +1 -1
- package/dist/package-lifecycle/migration-manifest.d.ts +28 -0
- package/dist/package-lifecycle/migration-manifest.d.ts.map +1 -0
- package/dist/package-lifecycle/migration-manifest.js +102 -0
- package/dist/package-lifecycle/migration-manifest.js.map +1 -0
- package/dist/package-lifecycle/migration-message.d.ts +3 -0
- package/dist/package-lifecycle/migration-message.d.ts.map +1 -0
- package/dist/package-lifecycle/migration-message.js +5 -0
- package/dist/package-lifecycle/migration-message.js.map +1 -0
- package/dist/package-lifecycle/tombstone.d.ts +10 -0
- package/dist/package-lifecycle/tombstone.d.ts.map +1 -0
- package/dist/package-lifecycle/tombstone.js +23 -0
- package/dist/package-lifecycle/tombstone.js.map +1 -0
- package/dist/package-lifecycle/upgrade-error.d.ts +11 -0
- package/dist/package-lifecycle/upgrade-error.d.ts.map +1 -0
- package/dist/package-lifecycle/upgrade-error.js +11 -0
- package/dist/package-lifecycle/upgrade-error.js.map +1 -0
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/rich-markdown-editor.css +1 -510
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/chat/app/components/layout/Header.tsx +2 -1
- package/dist/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/dist/templates/chat/app/i18n/index.ts +1 -1
- package/dist/templates/chat/app/i18n-data.ts +1 -1
- package/dist/templates/chat/app/lib/utils.ts +1 -1
- package/dist/templates/chat/app/root.tsx +10 -9
- package/dist/templates/chat/app/routes/_index.tsx +2 -2
- package/dist/templates/chat/app/routes/agent.tsx +10 -3
- package/dist/templates/chat/app/routes/database.tsx +1 -1
- package/dist/templates/chat/app/routes/observability.tsx +2 -1
- package/dist/templates/chat/app/routes/settings.tsx +4 -5
- package/dist/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/dist/templates/default/app/i18n/index.ts +1 -1
- package/dist/templates/default/app/lib/utils.ts +1 -1
- package/dist/templates/default/app/root.tsx +8 -6
- package/dist/templates/default/app/routes/_index.tsx +2 -1
- package/dist/templates/default/app/routes/agent.tsx +2 -1
- package/dist/templates/default/app/routes/settings.tsx +2 -3
- package/dist/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +35 -61
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.mdx +2 -4
- package/docs/content/agent-native-toolkit.mdx +46 -13
- package/docs/content/agent-surfaces.mdx +2 -4
- package/docs/content/audit-log.mdx +1 -2
- package/docs/content/authentication.mdx +3 -2
- package/docs/content/client.mdx +19 -18
- package/docs/content/components.mdx +1 -1
- package/docs/content/context-awareness.mdx +4 -7
- package/docs/content/creating-templates.mdx +7 -5
- package/docs/content/doctor.mdx +27 -6
- package/docs/content/drop-in-agent.mdx +6 -11
- package/docs/content/embedding-sdk.mdx +8 -10
- package/docs/content/getting-started.mdx +4 -2
- package/docs/content/internationalization.mdx +9 -6
- package/docs/content/key-concepts.mdx +2 -4
- package/docs/content/locales/ar-SA/actions.mdx +2 -4
- package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +79 -55
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ar-SA/audit-log.mdx +1 -2
- package/docs/content/locales/ar-SA/authentication.mdx +3 -2
- package/docs/content/locales/ar-SA/client.mdx +19 -18
- package/docs/content/locales/ar-SA/components.mdx +1 -1
- package/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
- package/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
- package/docs/content/locales/ar-SA/doctor.mdx +10 -0
- package/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ar-SA/internationalization.mdx +9 -6
- package/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
- package/docs/content/locales/ar-SA/observability.mdx +1 -2
- package/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ar-SA/sharing.mdx +1 -2
- package/docs/content/locales/ar-SA/template-chat.mdx +1 -2
- package/docs/content/locales/ar-SA/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/ar-SA/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/ar-SA/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/ar-SA/tracking.mdx +2 -4
- package/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/de-DE/actions.mdx +2 -4
- package/docs/content/locales/de-DE/agent-native-toolkit.mdx +82 -54
- package/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
- package/docs/content/locales/de-DE/audit-log.mdx +1 -2
- package/docs/content/locales/de-DE/authentication.mdx +3 -2
- package/docs/content/locales/de-DE/client.mdx +19 -18
- package/docs/content/locales/de-DE/components.mdx +1 -1
- package/docs/content/locales/de-DE/context-awareness.mdx +4 -7
- package/docs/content/locales/de-DE/creating-templates.mdx +7 -5
- package/docs/content/locales/de-DE/doctor.mdx +10 -0
- package/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
- package/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
- package/docs/content/locales/de-DE/internationalization.mdx +9 -6
- package/docs/content/locales/de-DE/key-concepts.mdx +2 -4
- package/docs/content/locales/de-DE/observability.mdx +1 -2
- package/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
- package/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/de-DE/sharing.mdx +1 -2
- package/docs/content/locales/de-DE/template-chat.mdx +1 -2
- package/docs/content/locales/de-DE/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/de-DE/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/de-DE/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/de-DE/tracking.mdx +2 -4
- package/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/es-ES/actions.mdx +2 -4
- package/docs/content/locales/es-ES/agent-native-toolkit.mdx +81 -52
- package/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
- package/docs/content/locales/es-ES/audit-log.mdx +1 -2
- package/docs/content/locales/es-ES/authentication.mdx +3 -2
- package/docs/content/locales/es-ES/client.mdx +19 -18
- package/docs/content/locales/es-ES/components.mdx +1 -1
- package/docs/content/locales/es-ES/context-awareness.mdx +4 -7
- package/docs/content/locales/es-ES/creating-templates.mdx +7 -5
- package/docs/content/locales/es-ES/doctor.mdx +10 -0
- package/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
- package/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
- package/docs/content/locales/es-ES/internationalization.mdx +9 -6
- package/docs/content/locales/es-ES/key-concepts.mdx +2 -4
- package/docs/content/locales/es-ES/observability.mdx +1 -2
- package/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
- package/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/es-ES/sharing.mdx +1 -2
- package/docs/content/locales/es-ES/template-chat.mdx +1 -2
- package/docs/content/locales/es-ES/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/es-ES/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/es-ES/toolkit-editors-canvases.mdx +21 -0
- package/docs/content/locales/es-ES/tracking.mdx +2 -4
- package/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/fr-FR/actions.mdx +2 -4
- package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +84 -54
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/fr-FR/audit-log.mdx +1 -2
- package/docs/content/locales/fr-FR/authentication.mdx +3 -2
- package/docs/content/locales/fr-FR/client.mdx +19 -18
- package/docs/content/locales/fr-FR/components.mdx +1 -1
- package/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
- package/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
- package/docs/content/locales/fr-FR/doctor.mdx +10 -0
- package/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/fr-FR/internationalization.mdx +9 -6
- package/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
- package/docs/content/locales/fr-FR/observability.mdx +1 -2
- package/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/fr-FR/sharing.mdx +1 -2
- package/docs/content/locales/fr-FR/template-chat.mdx +1 -2
- package/docs/content/locales/fr-FR/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/fr-FR/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/fr-FR/toolkit-editors-canvases.mdx +21 -0
- package/docs/content/locales/fr-FR/tracking.mdx +2 -4
- package/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/hi-IN/actions.mdx +2 -4
- package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
- package/docs/content/locales/hi-IN/audit-log.mdx +1 -2
- package/docs/content/locales/hi-IN/authentication.mdx +3 -2
- package/docs/content/locales/hi-IN/client.mdx +19 -18
- package/docs/content/locales/hi-IN/components.mdx +1 -1
- package/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
- package/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
- package/docs/content/locales/hi-IN/doctor.mdx +10 -0
- package/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
- package/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
- package/docs/content/locales/hi-IN/internationalization.mdx +9 -6
- package/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
- package/docs/content/locales/hi-IN/observability.mdx +1 -2
- package/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
- package/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/hi-IN/sharing.mdx +1 -2
- package/docs/content/locales/hi-IN/template-chat.mdx +1 -2
- package/docs/content/locales/hi-IN/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/hi-IN/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/hi-IN/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/hi-IN/tracking.mdx +2 -4
- package/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/ja-JP/actions.mdx +2 -4
- package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ja-JP/audit-log.mdx +1 -2
- package/docs/content/locales/ja-JP/authentication.mdx +3 -2
- package/docs/content/locales/ja-JP/client.mdx +19 -18
- package/docs/content/locales/ja-JP/components.mdx +1 -1
- package/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
- package/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
- package/docs/content/locales/ja-JP/doctor.mdx +10 -0
- package/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ja-JP/internationalization.mdx +9 -6
- package/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
- package/docs/content/locales/ja-JP/observability.mdx +1 -2
- package/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ja-JP/sharing.mdx +1 -2
- package/docs/content/locales/ja-JP/template-chat.mdx +1 -2
- package/docs/content/locales/ja-JP/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/ja-JP/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/ja-JP/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/ja-JP/tracking.mdx +2 -4
- package/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/ko-KR/actions.mdx +2 -4
- package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ko-KR/audit-log.mdx +1 -2
- package/docs/content/locales/ko-KR/authentication.mdx +3 -2
- package/docs/content/locales/ko-KR/client.mdx +19 -18
- package/docs/content/locales/ko-KR/components.mdx +1 -1
- package/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
- package/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
- package/docs/content/locales/ko-KR/doctor.mdx +10 -0
- package/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ko-KR/internationalization.mdx +9 -6
- package/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
- package/docs/content/locales/ko-KR/observability.mdx +1 -2
- package/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ko-KR/sharing.mdx +1 -2
- package/docs/content/locales/ko-KR/template-chat.mdx +1 -2
- package/docs/content/locales/ko-KR/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/ko-KR/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/ko-KR/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/ko-KR/tracking.mdx +2 -4
- package/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/pt-BR/actions.mdx +2 -4
- package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +82 -54
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/pt-BR/audit-log.mdx +1 -2
- package/docs/content/locales/pt-BR/authentication.mdx +3 -2
- package/docs/content/locales/pt-BR/client.mdx +19 -18
- package/docs/content/locales/pt-BR/components.mdx +1 -1
- package/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
- package/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
- package/docs/content/locales/pt-BR/doctor.mdx +10 -0
- package/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/pt-BR/internationalization.mdx +9 -6
- package/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
- package/docs/content/locales/pt-BR/observability.mdx +1 -2
- package/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/pt-BR/sharing.mdx +1 -2
- package/docs/content/locales/pt-BR/template-chat.mdx +1 -2
- package/docs/content/locales/pt-BR/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/pt-BR/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/pt-BR/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/pt-BR/tracking.mdx +2 -4
- package/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/zh-CN/actions.mdx +2 -4
- package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
- package/docs/content/locales/zh-CN/audit-log.mdx +1 -2
- package/docs/content/locales/zh-CN/authentication.mdx +3 -2
- package/docs/content/locales/zh-CN/client.mdx +19 -18
- package/docs/content/locales/zh-CN/components.mdx +1 -1
- package/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
- package/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
- package/docs/content/locales/zh-CN/doctor.mdx +10 -0
- package/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
- package/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
- package/docs/content/locales/zh-CN/internationalization.mdx +9 -6
- package/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
- package/docs/content/locales/zh-CN/observability.mdx +1 -2
- package/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
- package/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/zh-CN/sharing.mdx +1 -2
- package/docs/content/locales/zh-CN/template-chat.mdx +1 -2
- package/docs/content/locales/zh-CN/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/zh-CN/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/zh-CN/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/zh-CN/tracking.mdx +2 -4
- package/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/zh-TW/actions.mdx +2 -4
- package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +69 -62
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
- package/docs/content/locales/zh-TW/audit-log.mdx +1 -2
- package/docs/content/locales/zh-TW/authentication.mdx +3 -2
- package/docs/content/locales/zh-TW/client.mdx +19 -18
- package/docs/content/locales/zh-TW/components.mdx +1 -1
- package/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
- package/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
- package/docs/content/locales/zh-TW/doctor.mdx +10 -0
- package/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
- package/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
- package/docs/content/locales/zh-TW/internationalization.mdx +9 -6
- package/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
- package/docs/content/locales/zh-TW/observability.mdx +1 -2
- package/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
- package/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/zh-TW/sharing.mdx +1 -2
- package/docs/content/locales/zh-TW/template-chat.mdx +1 -2
- package/docs/content/locales/zh-TW/toolkit-capability-packages.mdx +21 -0
- package/docs/content/locales/zh-TW/toolkit-context-knowledge.mdx +12 -0
- package/docs/content/locales/zh-TW/toolkit-editors-canvases.mdx +17 -0
- package/docs/content/locales/zh-TW/tracking.mdx +2 -4
- package/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
- package/docs/content/observability.mdx +1 -2
- package/docs/content/package-lifecycle.mdx +29 -0
- package/docs/content/real-time-collaboration.mdx +8 -7
- package/docs/content/sharing.mdx +1 -2
- package/docs/content/template-chat.mdx +1 -2
- package/docs/content/toolkit-agent-ux.mdx +3 -2
- package/docs/content/toolkit-capability-packages.mdx +52 -0
- package/docs/content/toolkit-context-knowledge.mdx +46 -0
- package/docs/content/toolkit-editors-canvases.mdx +55 -0
- package/docs/content/toolkit-observability.mdx +1 -2
- package/docs/content/toolkit-settings.mdx +2 -2
- package/docs/content/toolkit-sharing.mdx +5 -2
- package/docs/content/tracking.mdx +2 -4
- package/docs/content/what-is-agent-native.mdx +1 -2
- package/migration-manifest.json +1353 -0
- package/package.json +46 -27
- package/src/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/chat/app/components/layout/Header.tsx +2 -1
- package/src/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/src/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/src/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/src/templates/chat/app/i18n/index.ts +1 -1
- package/src/templates/chat/app/i18n-data.ts +1 -1
- package/src/templates/chat/app/lib/utils.ts +1 -1
- package/src/templates/chat/app/root.tsx +10 -9
- package/src/templates/chat/app/routes/_index.tsx +2 -2
- package/src/templates/chat/app/routes/agent.tsx +10 -3
- package/src/templates/chat/app/routes/database.tsx +1 -1
- package/src/templates/chat/app/routes/observability.tsx +2 -1
- package/src/templates/chat/app/routes/settings.tsx +4 -5
- package/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/src/templates/default/app/i18n/index.ts +1 -1
- package/src/templates/default/app/lib/utils.ts +1 -1
- package/src/templates/default/app/root.tsx +8 -6
- package/src/templates/default/app/routes/_index.tsx +2 -1
- package/src/templates/default/app/routes/agent.tsx +2 -1
- package/src/templates/default/app/routes/settings.tsx +2 -3
- package/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/client/rich-markdown-editor/BubbleToolbar.tsx +0 -253
- package/corpus/core/src/client/rich-markdown-editor/CodeBlockNode.tsx +0 -258
- package/corpus/core/src/client/rich-markdown-editor/DragHandle.ts +0 -1437
- package/corpus/core/src/client/rich-markdown-editor/ImageExtension.ts +0 -306
- package/corpus/core/src/client/rich-markdown-editor/RichMarkdownEditor.tsx +0 -80
- package/corpus/core/src/client/rich-markdown-editor/RunId.ts +0 -61
- package/corpus/core/src/client/rich-markdown-editor/SharedRichEditor.tsx +0 -321
- package/corpus/core/src/client/rich-markdown-editor/SlashCommandMenu.tsx +0 -310
- package/corpus/core/src/client/rich-markdown-editor/extensions.ts +0 -402
- package/corpus/core/src/client/rich-markdown-editor/gfmDoc.ts +0 -92
- package/corpus/core/src/client/rich-markdown-editor/surgical-apply.ts +0 -192
- package/corpus/core/src/client/rich-markdown-editor/useCollabReconcile.ts +0 -590
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts +0 -37
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/BubbleToolbar.js +0 -171
- package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +0 -1
- package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts +0 -49
- package/dist/client/rich-markdown-editor/CodeBlockNode.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/CodeBlockNode.js +0 -127
- package/dist/client/rich-markdown-editor/CodeBlockNode.js.map +0 -1
- package/dist/client/rich-markdown-editor/DragHandle.d.ts +0 -97
- package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/DragHandle.js +0 -1066
- package/dist/client/rich-markdown-editor/DragHandle.js.map +0 -1
- package/dist/client/rich-markdown-editor/ImageExtension.d.ts +0 -63
- package/dist/client/rich-markdown-editor/ImageExtension.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/ImageExtension.js +0 -243
- package/dist/client/rich-markdown-editor/ImageExtension.js.map +0 -1
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts +0 -51
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.js +0 -37
- package/dist/client/rich-markdown-editor/RichMarkdownEditor.js.map +0 -1
- package/dist/client/rich-markdown-editor/RunId.d.ts +0 -28
- package/dist/client/rich-markdown-editor/RunId.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/RunId.js +0 -60
- package/dist/client/rich-markdown-editor/RunId.js.map +0 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +0 -110
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js +0 -144
- package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +0 -1
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +0 -41
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js +0 -221
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +0 -1
- package/dist/client/rich-markdown-editor/extensions.d.ts +0 -178
- package/dist/client/rich-markdown-editor/extensions.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/extensions.js +0 -224
- package/dist/client/rich-markdown-editor/extensions.js.map +0 -1
- package/dist/client/rich-markdown-editor/gfmDoc.d.ts +0 -24
- package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/gfmDoc.js +0 -83
- package/dist/client/rich-markdown-editor/gfmDoc.js.map +0 -1
- package/dist/client/rich-markdown-editor/surgical-apply.d.ts +0 -66
- package/dist/client/rich-markdown-editor/surgical-apply.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/surgical-apply.js +0 -147
- package/dist/client/rich-markdown-editor/surgical-apply.js.map +0 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +0 -110
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +0 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +0 -441
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DragHandle.js","sourceRoot":"","sources":["../../../src/client/rich-markdown-editor/DragHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,SAAS,EACT,aAAa,EACb,aAAa,GAEd,MAAM,kBAAkB,CAAC;AAG1B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,wBAAwB,CAAC;AAgD7E,MAAM,aAAa,GAAG,IAAI,SAAS,CAAC,YAAY,CAAC,CAAC;AAClD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,iFAAiF;AACjF,iFAAiF;AACjF,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,mFAAmF;AACnF,kFAAkF;AAClF,gFAAgF;AAChF,4EAA4E;AAC5E,wEAAwE;AACxE,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAClC,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AACjF,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAC/C,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AAChE,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AA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AAC,YAAY,CAAC,CAAC;4BAC7C,IAAI,sBAAsB,KAAK,YAAY,EAAE,CAAC;gCAC5C,sBAAsB,GAAG,IAAI,CAAC;4BAChC,CAAC;4BACD,IAAI,uBAAuB,KAAK,YAAY,EAAE,CAAC;gCAC7C,uBAAuB,GAAG,IAAI,CAAC;4BACjC,CAAC;4BACD,MAAM,EAAE,MAAM,EAAE,CAAC;4BACjB,MAAM,GAAG,IAAI,CAAC;4BACd,mBAAmB,GAAG,IAAI,CAAC;wBAC7B,CAAC;qBACF,CAAC;gBACJ,CAAC;gBACD,KAAK,EAAE;oBACL,eAAe,EAAE;wBACf,SAAS,CAAC,KAAK,EAAE,KAAK;4BACpB,qBAAqB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;4BACpD,OAAO,KAAK,CAAC;wBACf,CAAC;wBACD,IAAI;4BACF,SAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;4BAC9B,iBAAiB,CAAC,KAAK,CAAC,CAAC;4BACzB,UAAU,EAAE,CAAC;4BACb,OAAO,KAAK,CAAC;wBACf,CAAC;qBACF;iBACF;aACF,CAAC;SACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { Extension } from \"@tiptap/core\";\nimport type { Node as ProseMirrorNode } from \"@tiptap/pm/model\";\nimport {\n Plugin,\n PluginKey,\n NodeSelection,\n TextSelection,\n type Transaction,\n} from \"@tiptap/pm/state\";\nimport { type EditorView } from \"@tiptap/pm/view\";\n\n/**\n * Default editor-wrapper CSS selector the drag handle scopes itself to.\n *\n * The handle, the drop indicator, and the `position: relative` anchor are all\n * appended to / measured against the closest ancestor matching this selector.\n * Content's editor wraps its ProseMirror DOM in a `.visual-editor-wrapper`\n * element, so that is the historical default. Other apps (e.g. the plan editor)\n * pass their own wrapper selector via {@link DragHandleOptions.wrapperSelector}.\n */\nexport const DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR = \".visual-editor-wrapper\";\n\nexport interface DragHandleOptions {\n /**\n * CSS selector for the editor wrapper element the handle is anchored to.\n *\n * Must match an ancestor of the ProseMirror editor DOM. The wrapper gets\n * `position: relative` so the absolutely-positioned grip and drop indicator\n * can be placed relative to it. Defaults to\n * {@link DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR} so Content keeps working\n * unchanged.\n */\n wrapperSelector: string;\n /**\n * Optional source-side payload for a cross-editor block move. The editor doc\n * carries ProseMirror node content, but app-owned side-map data (for example a\n * plan `diagram` block's HTML/CSS) can live outside the doc; this lets the\n * host carry that data to the receiving editor before the node is inserted.\n */\n getDragTransferData?: (context: {\n view: EditorView;\n node: ProseMirrorNode;\n pos: number;\n }) => unknown;\n /**\n * Optional target-side receiver for cross-editor transfer data. Called before\n * the node is inserted into the target editor so the target's serializer can\n * resolve app-owned data during the synchronous ProseMirror update.\n */\n receiveDragTransferData?: (\n data: unknown,\n context: {\n view: EditorView;\n node: ProseMirrorNode;\n pos: number;\n sourceView: EditorView;\n },\n ) => void;\n /**\n * Optional host-level drop handler for document-specific structure changes.\n * Returning true tells the shared drag handle that the host fully handled the\n * move and no ProseMirror insert/delete should run. This is used for\n * Notion-style side drops where dropping a block to the left/right creates or\n * inserts into a column layout rather than inserting into the target editor.\n */\n handleDrop?: (data: unknown, context: DragHandleDropContext) => boolean;\n}\n\nconst dragHandleKey = new PluginKey(\"dragHandle\");\nconst HOVER_SIDE_OUTSET_REM = 8;\n// Notion-style side drop: drag a block to a neighbour's LEFT/RIGHT region and it\n// builds (or joins) a column layout instead of reordering. The activation region\n// has to be GENEROUS or the gesture is dead for a real human — a natural drag\n// releases somewhere over the block's body, nowhere near a thin edge sliver. The\n// old values (28% of width, capped at 140px, AND only the vertical middle 60%)\n// left a wide ~820px plan block with two ~17%-of-width edge slivers in a 35px-tall\n// band as the ONLY column targets — ~66% of the block (the whole centre) plus the\n// top/bottom only ever reordered, so \"drag side by side\" essentially never made\n// columns. Now each side claims ~a third of the width across the FULL block\n// height, with a middle band always preserved for before/after reorder.\nconst SIDE_DROP_ZONE_RATIO = 0.33;\nconst SIDE_DROP_ZONE_MIN_PX = 56;\nconst SIDE_DROP_ZONE_MAX_PX = 320;\n// Never let the two side zones swallow the whole block: keep at least the middle\n// ~10% of the width as the before/after reorder band so dropping over the centre\n// still moves the block above/below the target (Notion keeps reorder reachable).\nconst SIDE_DROP_ZONE_MAX_WIDTH_FRACTION = 0.45;\nconst DRAG_HANDLE_MENU_STYLE_ID = \"an-rich-md-drag-menu-styles\";\nconst DRAG_HANDLE_MENU_WIDTH = 220;\nconst DRAG_HANDLE_MENU_GAP = 6;\nconst DRAG_HANDLE_MENU_VIEWPORT_PADDING = 8;\n\n/**\n * Wraps Tabler outline icon path data in the standard 24×24 stroke SVG so the\n * DOM-based block menu renders the same icons the React UI uses (Tabler is the\n * framework-wide icon set). The editor is plain DOM, not React, so we inline the\n * markup instead of importing `@tabler/icons-react` components.\n */\nconst tablerIconSvg = (paths: string): string =>\n `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">${paths}</svg>`;\n\n// Tabler `copy`, `trash`, and `plus` (outline). Path data copied verbatim from\n// @tabler/icons so the glyphs stay pixel-identical to the React icon set.\nconst DRAG_HANDLE_MENU_ICON_DUPLICATE = tablerIconSvg(\n '<path d=\"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666\" /><path d=\"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1\" />',\n);\nconst DRAG_HANDLE_MENU_ICON_DELETE = tablerIconSvg(\n '<path d=\"M4 7l16 0\" /><path d=\"M10 11l0 6\" /><path d=\"M14 11l0 6\" /><path d=\"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12\" /><path d=\"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3\" />',\n);\nconst DRAG_HANDLE_MENU_ICON_INSERT = tablerIconSvg(\n '<path d=\"M12 5l0 14\" /><path d=\"M5 12l14 0\" />',\n);\n// Tabler `grip-vertical` (outline) for the left-margin drag grip.\nconst DRAG_HANDLE_GRIP_ICON = tablerIconSvg(\n '<path d=\"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" /><path d=\"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" /><path d=\"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" /><path d=\"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" /><path d=\"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" /><path d=\"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\" />',\n);\n\ntype DropTarget = {\n registration: DragHandleRegistration;\n view: EditorView;\n block: HTMLElement;\n placement: DragHandleDropPlacement;\n pos: number;\n targetPos: number;\n targetNodeSize: number;\n rect: DOMRect;\n};\n\nexport type DragHandleDropPlacement = \"before\" | \"after\" | \"left\" | \"right\";\n\nexport type DragHandleDropContext = {\n view: EditorView;\n sourceView: EditorView;\n sourceNode: ProseMirrorNode;\n sourcePos: number;\n sourceNodeSize: number;\n targetNode: ProseMirrorNode;\n targetPos: number;\n targetNodeSize: number;\n insertPos: number;\n placement: DragHandleDropPlacement;\n};\n\ntype DragSession = {\n view: EditorView;\n sourceBlock: HTMLElement;\n sourcePos: number;\n sourceNodeSize: number;\n startX: number;\n startY: number;\n dragging: boolean;\n preview: HTMLElement | null;\n dropLine: HTMLElement | null;\n dropTarget: DropTarget | null;\n};\n\ntype HoverBlock = {\n node: HTMLElement;\n pmPos: number;\n rect: DOMRect;\n};\n\ntype DragHandleMenuContext = {\n view: EditorView;\n sourceBlock: HTMLElement;\n sourcePos: number;\n sourceNodeSize: number;\n};\n\ntype DragHandleRegistration = {\n view: EditorView;\n wrapperSelector: string;\n getDragTransferData?: DragHandleOptions[\"getDragTransferData\"];\n receiveDragTransferData?: DragHandleOptions[\"receiveDragTransferData\"];\n handleDrop?: DragHandleOptions[\"handleDrop\"];\n canHover?: () => boolean;\n findHoverBlock?: (clientX: number, clientY: number) => HoverBlock | null;\n showHoverBlock?: (block: HoverBlock) => void;\n hideHover?: () => void;\n /** The currently displayed grip's bounding rect, or null when hidden. */\n gripRect?: () => DOMRect | null;\n};\n\nconst dragHandleRegistrations = new Set<DragHandleRegistration>();\nlet dragHandleGlobalHoverListeners = 0;\nlet activeDragRegistration: DragHandleRegistration | null = null;\n// The registration whose grip is currently shown. Used to keep that grip alive\n// while the cursor travels from a block's body to its grip, even when the grip\n// sits in a contested gap (an inter-column gap or a tab body's left offset)\n// where another editor's wide forgiving zone would otherwise re-win the hover\n// and hide the grip out from under the approaching cursor.\nlet activeHoverRegistration: DragHandleRegistration | null = null;\n\nconst clamp = (value: number, min: number, max: number) =>\n Math.min(Math.max(value, min), max);\n\nconst editorArea = (registration: DragHandleRegistration) => {\n const rect = registration.view.dom.getBoundingClientRect();\n return rect.width * rect.height;\n};\n\nconst updateRegisteredHover = (clientX: number, clientY: number) => {\n if (activeDragRegistration) {\n for (const registration of dragHandleRegistrations) {\n registration.hideHover?.();\n }\n activeHoverRegistration = null;\n return;\n }\n\n const candidates: Array<{\n registration: DragHandleRegistration;\n block: HoverBlock;\n }> = [];\n\n for (const registration of dragHandleRegistrations) {\n if (!registration.view.dom.isConnected || !registration.canHover?.()) {\n registration.hideHover?.();\n continue;\n }\n const block = registration.findHoverBlock?.(clientX, clientY);\n if (block) {\n candidates.push({ registration, block });\n } else {\n registration.hideHover?.();\n }\n }\n\n // Grip keepalive. Once a block's grip is showing, hold it while the cursor\n // travels LEFT of that block's content toward its grip glyph — within the\n // block's own vertical row and no further left than the glyph itself. This is\n // what makes grips grabbable for blocks that are NOT flush with the page's\n // left gutter (a right column, a tab body): their grip sits in a gap that the\n // neighbour's wide forgiving zone also claims, so the normal picker would flip\n // hover to the neighbour mid-approach and the grip would vanish before the\n // cursor reaches it. The keepalive only bridges the body→grip gap — it does\n // NOT fire while the cursor is over content (so the innermost/nested picking\n // and gutter-grab rules below still decide there) and the row guard stops it\n // from sticking the grip across vertical moves to another block's row.\n if (activeHoverRegistration) {\n const held = candidates.find(\n (candidate) => candidate.registration === activeHoverRegistration,\n );\n const grip = activeHoverRegistration.gripRect?.();\n if (\n held &&\n grip &&\n clientY >= held.block.rect.top &&\n clientY < held.block.rect.bottom &&\n clientX >= grip.left - 4 &&\n clientX < held.block.rect.left\n ) {\n for (const registration of dragHandleRegistrations) {\n if (registration !== held.registration) registration.hideHover?.();\n }\n held.registration.showHoverBlock?.(held.block);\n return;\n }\n }\n\n // Pick which editor owns the grip when several register a hover block at this\n // point. Nested region editors (e.g. each column inside a `columns` block) tile\n // their container's whole footprint AND extend a wide forgiving zone\n // (HOVER_SIDE_OUTSET_REM) into its left-margin gutter, so a pure\n // \"smallest editor wins\" rule lets an inner block beat the container everywhere\n // and leaves the container itself impossible to grab. Split candidates by where\n // the cursor sits relative to each block:\n // - Over a block's body (clientX at/after its left edge) the innermost\n // (smallest) editor wins, so nested blocks stay grabbable from their content.\n // - In the shared left-margin gutter (clientX left of every candidate's\n // content, where the grip lives) the outermost (largest) editor wins, so the\n // container block can be picked up and reordered.\n // Prefer the candidate whose block actually sits UNDER the cursor\n // horizontally. Without this, a left column's forgiving side zone reaches\n // across the inter-column gap, ties the right column's editor on area, and\n // wins — so hovering a right-column block shows the grip for the LEFT block\n // (and right-column blocks appear to have no grip at all). `overContent`\n // restricts to blocks the cursor is genuinely within; `rightOfLeftEdge` keeps\n // the gutter-grab behaviour; fully left of every block → the container wins.\n const overContent = candidates.filter(\n (candidate) =>\n clientX >= candidate.block.rect.left &&\n clientX <= candidate.block.rect.right,\n );\n // The grip renders in a narrow band just LEFT of each block (≈24px). A block\n // must OWN that band so moving the cursor onto its grip keeps showing (and\n // lets you press) that block's grip — otherwise, for a column block whose grip\n // sits in the gutter/inter-column gap, the \"gutter → largest editor\" rule\n // below would flip the hover to the columns container and the grip would\n // vanish out from under the cursor, making inner column blocks impossible to\n // drag. The band is narrow, so it does not collide with the neighbouring\n // column's content (the right column's grip lives in the inter-column gap,\n // left of its own content but right of the left column's content).\n const GRIP_HOVER_ZONE_PX = 28;\n const overGrip = candidates.filter(\n (candidate) =>\n clientX >= candidate.block.rect.left - GRIP_HOVER_ZONE_PX &&\n clientX < candidate.block.rect.left,\n );\n const rightOfLeftEdge = candidates.filter(\n (candidate) => clientX >= candidate.block.rect.left,\n );\n let active: {\n registration: DragHandleRegistration;\n block: HoverBlock;\n } | null;\n const innerPool =\n overContent.length > 0\n ? overContent\n : overGrip.length > 0\n ? overGrip\n : rightOfLeftEdge;\n if (innerPool.length > 0) {\n innerPool.sort(\n (a, b) => editorArea(a.registration) - editorArea(b.registration),\n );\n active = innerPool[0];\n } else {\n candidates.sort(\n (a, b) => editorArea(b.registration) - editorArea(a.registration),\n );\n active = candidates[0] ?? null;\n }\n\n for (const registration of dragHandleRegistrations) {\n if (registration !== active?.registration) registration.hideHover?.();\n }\n active?.registration.showHoverBlock?.(active.block);\n activeHoverRegistration = active?.registration ?? null;\n};\n\nconst handleGlobalHoverMove = (event: MouseEvent) => {\n updateRegisteredHover(event.clientX, event.clientY);\n};\n\nconst retainGlobalHoverListener = () => {\n dragHandleGlobalHoverListeners += 1;\n if (dragHandleGlobalHoverListeners === 1) {\n document.addEventListener(\"mousemove\", handleGlobalHoverMove);\n }\n};\n\nconst releaseGlobalHoverListener = () => {\n dragHandleGlobalHoverListeners = Math.max(\n 0,\n dragHandleGlobalHoverListeners - 1,\n );\n if (dragHandleGlobalHoverListeners === 0) {\n document.removeEventListener(\"mousemove\", handleGlobalHoverMove);\n }\n};\n\nconst ensureDragHandleMenuStyles = () => {\n if (document.getElementById(DRAG_HANDLE_MENU_STYLE_ID)) return;\n\n const style = document.createElement(\"style\");\n style.id = DRAG_HANDLE_MENU_STYLE_ID;\n style.textContent = `\n.an-rich-md-drag-menu {\n position: fixed;\n z-index: 9999;\n width: ${DRAG_HANDLE_MENU_WIDTH}px;\n padding: 4px;\n border: 1px solid hsl(var(--border, 214.3 31.8% 91.4%));\n border-radius: 7px;\n background: hsl(var(--popover, 0 0% 100%));\n color: hsl(var(--popover-foreground, var(--foreground, 222.2 84% 4.9%)));\n box-shadow:\n 0 12px 32px rgb(15 23 42 / 0.16),\n 0 2px 8px rgb(15 23 42 / 0.08);\n font-family: inherit;\n font-size: 13px;\n line-height: 1.35;\n}\n\n.an-rich-md-drag-menu__item {\n display: flex;\n width: 100%;\n align-items: center;\n gap: 9px;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n letter-spacing: 0;\n padding: 7px 8px;\n text-align: left;\n}\n\n.an-rich-md-drag-menu__item:hover,\n.an-rich-md-drag-menu__item:focus-visible {\n background: hsl(var(--accent, 210 40% 96.1%));\n color: hsl(var(--accent-foreground, var(--foreground, 222.2 84% 4.9%)));\n outline: none;\n}\n\n.an-rich-md-drag-menu__item[data-danger=\"true\"] {\n color: hsl(var(--destructive, 0 84.2% 60.2%));\n}\n\n.an-rich-md-drag-menu__item[data-danger=\"true\"]:hover,\n.an-rich-md-drag-menu__item[data-danger=\"true\"]:focus-visible {\n background: hsl(var(--destructive, 0 84.2% 60.2%) / 0.1);\n}\n\n.an-rich-md-drag-menu__icon {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n color: hsl(var(--muted-foreground, 215.4 16.3% 46.9%));\n}\n\n.an-rich-md-drag-menu__item[data-danger=\"true\"] .an-rich-md-drag-menu__icon {\n color: currentColor;\n}\n\n.an-rich-md-drag-menu__icon svg {\n width: 17px;\n height: 17px;\n}\n\n.an-rich-md-drag-menu__label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n`;\n document.head.appendChild(style);\n};\n\n/**\n * App-agnostic Tiptap extension providing a Notion-style left-margin drag grip\n * (the `::` handle), block selection, and drag-to-reorder over top-level block\n * nodes.\n *\n * Behavior:\n * - On hover over any top-level block, a `.drag-handle` grip appears in the left\n * margin (forgiving hit zone extends {@link HOVER_SIDE_OUTSET_REM}rem to the\n * sides and into the gap above/between blocks).\n * - Single-clicking the grip selects the block and opens a block action menu.\n * Dragging past a small threshold starts a reorder, showing a floating clone\n * preview (`.notion-drag-preview`) and a `.notion-drop-indicator` line.\n * `Escape` cancels.\n * - While dragging, the source block carries `.notion-block--dragging` and the\n * document element carries `.notion-editor-is-dragging` so apps can style the\n * in-flight state. Apps own all of these CSS class names.\n * - Works for ANY top-level node ProseMirror renders as a direct child of the\n * editor — including `group: \"block\"`, `draggable: true` atoms such as the\n * plan editor's `planBlock`.\n *\n * The only app-specific coupling — the editor wrapper element the handle and\n * drop indicator are anchored to — is configurable via\n * {@link DragHandleOptions.wrapperSelector}, defaulting to\n * {@link DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR} (`.visual-editor-wrapper`) so the\n * Content editor keeps working byte-identically. The plan editor passes its own\n * wrapper selector via `DragHandle.configure({ wrapperSelector })`.\n */\nexport const DragHandle = Extension.create<DragHandleOptions>({\n name: \"dragHandle\",\n\n addOptions() {\n return {\n wrapperSelector: DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR,\n getDragTransferData: undefined,\n receiveDragTransferData: undefined,\n };\n },\n\n addProseMirrorPlugins() {\n const editor = this.editor;\n const wrapperSelector = this.options.wrapperSelector;\n const getDragTransferData = this.options.getDragTransferData;\n const receiveDragTransferData = this.options.receiveDragTransferData;\n const handleDrop = this.options.handleDrop;\n let handle: HTMLElement | null = null;\n let menu: HTMLElement | null = null;\n let menuContext: DragHandleMenuContext | null = null;\n let currentBlock: HTMLElement | null = null;\n let dragStartPos: number | null = null;\n let dragSession: DragSession | null = null;\n let currentRegistration: DragHandleRegistration | null = null;\n\n const getHoverSideOutset = () => {\n const rootFontSize = Number.parseFloat(\n getComputedStyle(document.documentElement).fontSize,\n );\n return (\n (Number.isFinite(rootFontSize) ? rootFontSize : 16) *\n HOVER_SIDE_OUTSET_REM\n );\n };\n\n const getTopLevelBlocks = (editorView: EditorView): HoverBlock[] => {\n const blocks: HoverBlock[] = [];\n\n editorView.state.doc.forEach((_node, offset) => {\n const dom = editorView.nodeDOM(offset);\n if (!(dom instanceof HTMLElement)) return;\n\n blocks.push({\n node: dom,\n pmPos: offset,\n rect: dom.getBoundingClientRect(),\n });\n });\n\n return blocks;\n };\n\n const registrationForView = (\n editorView: EditorView,\n ): DragHandleRegistration | null => {\n for (const registration of dragHandleRegistrations) {\n if (registration.view === editorView) return registration;\n }\n return null;\n };\n\n const findForgivingBlock = (\n editorView: EditorView,\n clientX: number,\n clientY: number,\n ): HoverBlock | null => {\n const blocks = getTopLevelBlocks(editorView);\n if (blocks.length === 0) return null;\n\n const sideOutset = getHoverSideOutset();\n const pageLeft = 0;\n const pageRight = window.visualViewport?.width ?? window.innerWidth;\n\n for (let index = 0; index < blocks.length; index++) {\n const block = blocks[index];\n const nextBlock = blocks[index + 1];\n const blockBottomGap = nextBlock\n ? Math.max(0, nextBlock.rect.top - block.rect.bottom)\n : 0;\n const zoneLeft = Math.max(pageLeft, block.rect.left - sideOutset);\n const zoneRight = Math.min(pageRight, block.rect.right + sideOutset);\n const zoneTop =\n index === 0\n ? Math.max(0, block.rect.top - blockBottomGap)\n : block.rect.top;\n const zoneBottom = nextBlock ? nextBlock.rect.top : block.rect.bottom;\n\n if (\n clientX >= zoneLeft &&\n clientX <= zoneRight &&\n clientY >= zoneTop &&\n clientY < zoneBottom\n ) {\n return block;\n }\n }\n\n return null;\n };\n\n const showHandleForBlock = (editorView: EditorView, block: HoverBlock) => {\n if (!handle) return;\n currentBlock = block.node;\n dragStartPos = block.pmPos;\n\n const wrapper = editorView.dom.closest(wrapperSelector);\n if (!wrapper) return;\n\n // Lazily (re)attach the grip the first time a wrapper is actually\n // available. At plugin `view()` init the editor DOM may not yet be mounted\n // inside the wrapper (React mounts `EditorContent` after the EditorView is\n // constructed), so the init-time append can silently no-op and leave the\n // grip orphaned. Re-home it here once the wrapper exists.\n if (handle.parentElement !== wrapper) {\n (wrapper as HTMLElement).style.position = \"relative\";\n wrapper.appendChild(handle);\n }\n\n const wrapperRect = wrapper.getBoundingClientRect();\n const handleLeft = block.rect.left - wrapperRect.left - 24;\n\n handle.style.display = \"flex\";\n handle.style.top = `${block.rect.top - wrapperRect.top + 2}px`;\n handle.style.left = `${handleLeft}px`;\n };\n\n const selectBlockAt = (editorView: EditorView, pos: number) => {\n try {\n const sel = NodeSelection.create(editorView.state.doc, pos);\n editorView.dispatch(editorView.state.tr.setSelection(sel));\n editorView.focus();\n return sel;\n } catch {\n return null;\n }\n };\n\n const cleanupDragVisuals = () => {\n dragSession?.preview?.remove();\n dragSession?.dropLine?.remove();\n dragSession?.sourceBlock.classList.remove(\"notion-block--dragging\");\n document.documentElement.classList.remove(\"notion-editor-is-dragging\");\n };\n\n const createDragPreview = (block: HTMLElement): HTMLElement => {\n const blockRect = block.getBoundingClientRect();\n const preview = document.createElement(\"div\");\n const clone = block.cloneNode(true) as HTMLElement;\n\n clone.classList.remove(\n \"ProseMirror-selectednode\",\n \"notion-block--dragging\",\n );\n clone.removeAttribute(\"contenteditable\");\n clone.style.background = \"transparent\";\n clone.style.backgroundColor = \"transparent\";\n clone.querySelectorAll(\"[contenteditable]\").forEach((node) => {\n node.removeAttribute(\"contenteditable\");\n });\n clone.querySelectorAll<HTMLElement>(\"*\").forEach((node) => {\n node.style.background = \"transparent\";\n node.style.backgroundColor = \"transparent\";\n });\n\n preview.className = \"notion-drag-preview\";\n preview.style.width = `${blockRect.width}px`;\n preview.appendChild(clone);\n document.body.appendChild(preview);\n\n return preview;\n };\n\n const createDropLine = (\n registration: DragHandleRegistration,\n ): HTMLElement | null => {\n const wrapper = registration.view.dom.closest(\n registration.wrapperSelector,\n );\n if (!wrapper) return null;\n\n const line = document.createElement(\"div\");\n line.className = \"notion-drop-indicator\";\n wrapper.appendChild(line);\n return line;\n };\n\n const forceHideHandle = () => {\n if (handle) {\n handle.style.display = \"none\";\n handle.setAttribute(\"aria-expanded\", \"false\");\n }\n currentBlock = null;\n dragStartPos = null;\n };\n\n const closeMenu = ({ hideGrip = false }: { hideGrip?: boolean } = {}) => {\n menu?.remove();\n menu = null;\n menuContext = null;\n handle?.setAttribute(\"aria-expanded\", \"false\");\n document.removeEventListener(\"mousedown\", handleMenuDocumentMouseDown, {\n capture: true,\n });\n document.removeEventListener(\"keydown\", handleMenuKeyDown, {\n capture: true,\n });\n window.removeEventListener(\"resize\", handleMenuViewportChange);\n window.removeEventListener(\"scroll\", handleMenuViewportChange, {\n capture: true,\n });\n if (hideGrip) forceHideHandle();\n };\n\n const resolveMenuContext = (context: DragHandleMenuContext) => {\n const latestBlock = getTopLevelBlocks(context.view).find(\n (block) => block.node === context.sourceBlock,\n );\n const sourcePos = latestBlock?.pmPos ?? context.sourcePos;\n const sourceNode = context.view.state.doc.nodeAt(sourcePos);\n if (!sourceNode) return null;\n\n return {\n ...context,\n sourcePos,\n sourceNode,\n sourceNodeSize: sourceNode.nodeSize,\n };\n };\n\n const focusSelectionNear = (\n view: EditorView,\n tr: Transaction,\n pos: number,\n bias: -1 | 1,\n ) => {\n tr.setSelection(\n TextSelection.near(\n tr.doc.resolve(clamp(pos, 0, tr.doc.content.size)),\n bias,\n ),\n );\n view.dispatch(tr.scrollIntoView());\n view.focus();\n };\n\n const duplicateBlock = (context: DragHandleMenuContext) => {\n const resolved = resolveMenuContext(context);\n if (!resolved) return;\n\n const insertPos = resolved.sourcePos + resolved.sourceNodeSize;\n const tr = resolved.view.state.tr.insert(insertPos, resolved.sourceNode);\n\n try {\n tr.setSelection(NodeSelection.create(tr.doc, insertPos));\n resolved.view.dispatch(tr.scrollIntoView());\n resolved.view.focus();\n } catch {\n focusSelectionNear(resolved.view, tr, insertPos, 1);\n }\n };\n\n const deleteBlock = (context: DragHandleMenuContext) => {\n const resolved = resolveMenuContext(context);\n if (!resolved) return;\n\n const { view, sourcePos, sourceNodeSize } = resolved;\n const paragraph = view.state.schema.nodes.paragraph;\n const sourceEnd = sourcePos + sourceNodeSize;\n\n if (view.state.doc.childCount <= 1 && paragraph) {\n const replacement = paragraph.createAndFill() ?? paragraph.create();\n const tr = view.state.tr.replaceWith(sourcePos, sourceEnd, replacement);\n focusSelectionNear(view, tr, sourcePos + 1, 1);\n return;\n }\n\n const tr = view.state.tr.delete(sourcePos, sourceEnd);\n const selectionBias = sourcePos >= tr.doc.content.size ? -1 : 1;\n focusSelectionNear(view, tr, sourcePos, selectionBias);\n };\n\n const insertParagraphBelow = (context: DragHandleMenuContext) => {\n const resolved = resolveMenuContext(context);\n const paragraph = resolved?.view.state.schema.nodes.paragraph;\n if (!resolved || !paragraph) return;\n\n const insertPos = resolved.sourcePos + resolved.sourceNodeSize;\n const paragraphNode = paragraph.createAndFill() ?? paragraph.create();\n const tr = resolved.view.state.tr.insert(insertPos, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, insertPos + 1));\n resolved.view.dispatch(tr.scrollIntoView());\n resolved.view.focus();\n };\n\n const positionMenu = (anchorRect: DOMRect) => {\n if (!menu) return;\n\n const viewportWidth = window.visualViewport?.width ?? window.innerWidth;\n const viewportHeight =\n window.visualViewport?.height ?? window.innerHeight;\n const menuHeight = menu.offsetHeight || 118;\n const preferredLeft = anchorRect.right + DRAG_HANDLE_MENU_GAP;\n const alternateLeft =\n anchorRect.left - DRAG_HANDLE_MENU_WIDTH - DRAG_HANDLE_MENU_GAP;\n const left =\n preferredLeft +\n DRAG_HANDLE_MENU_WIDTH +\n DRAG_HANDLE_MENU_VIEWPORT_PADDING <=\n viewportWidth\n ? preferredLeft\n : alternateLeft;\n\n menu.style.left = `${clamp(\n left,\n DRAG_HANDLE_MENU_VIEWPORT_PADDING,\n viewportWidth -\n DRAG_HANDLE_MENU_WIDTH -\n DRAG_HANDLE_MENU_VIEWPORT_PADDING,\n )}px`;\n menu.style.top = `${clamp(\n anchorRect.top - 4,\n DRAG_HANDLE_MENU_VIEWPORT_PADDING,\n viewportHeight - menuHeight - DRAG_HANDLE_MENU_VIEWPORT_PADDING,\n )}px`;\n };\n\n const createMenuItem = (\n label: string,\n iconSvg: string,\n action: (context: DragHandleMenuContext) => void,\n options: { danger?: boolean } = {},\n ) => {\n const button = document.createElement(\"button\");\n button.type = \"button\";\n button.className = \"an-rich-md-drag-menu__item\";\n button.setAttribute(\"role\", \"menuitem\");\n button.setAttribute(\"data-plan-interactive\", \"true\");\n if (options.danger) button.setAttribute(\"data-danger\", \"true\");\n\n const icon = document.createElement(\"span\");\n icon.className = \"an-rich-md-drag-menu__icon\";\n icon.setAttribute(\"aria-hidden\", \"true\");\n icon.innerHTML = iconSvg;\n\n const labelElement = document.createElement(\"span\");\n labelElement.className = \"an-rich-md-drag-menu__label\";\n labelElement.textContent = label;\n\n button.append(icon, labelElement);\n button.addEventListener(\"mousedown\", (event) => {\n event.preventDefault();\n });\n button.addEventListener(\"click\", (event) => {\n event.preventDefault();\n event.stopPropagation();\n const context = menuContext;\n if (!context) return;\n closeMenu({ hideGrip: true });\n action(context);\n });\n\n return button;\n };\n\n const openMenu = (context: DragHandleMenuContext, anchorRect: DOMRect) => {\n const resolved = resolveMenuContext(context);\n if (!resolved) return;\n\n closeMenu();\n selectBlockAt(resolved.view, resolved.sourcePos);\n ensureDragHandleMenuStyles();\n\n const el = document.createElement(\"div\");\n el.className = \"an-rich-md-drag-menu\";\n el.setAttribute(\"role\", \"menu\");\n el.setAttribute(\"aria-label\", \"Block actions\");\n el.setAttribute(\"data-plan-interactive\", \"true\");\n\n el.append(\n createMenuItem(\n \"Duplicate\",\n DRAG_HANDLE_MENU_ICON_DUPLICATE,\n duplicateBlock,\n ),\n createMenuItem(\"Delete\", DRAG_HANDLE_MENU_ICON_DELETE, deleteBlock, {\n danger: true,\n }),\n createMenuItem(\n \"Insert block below\",\n DRAG_HANDLE_MENU_ICON_INSERT,\n insertParagraphBelow,\n ),\n );\n\n menu = el;\n menuContext = {\n view: resolved.view,\n sourceBlock: resolved.sourceBlock,\n sourcePos: resolved.sourcePos,\n sourceNodeSize: resolved.sourceNodeSize,\n };\n document.body.appendChild(el);\n positionMenu(anchorRect);\n handle?.setAttribute(\"aria-expanded\", \"true\");\n document.addEventListener(\"mousedown\", handleMenuDocumentMouseDown, {\n capture: true,\n });\n document.addEventListener(\"keydown\", handleMenuKeyDown, {\n capture: true,\n });\n window.addEventListener(\"resize\", handleMenuViewportChange);\n window.addEventListener(\"scroll\", handleMenuViewportChange, {\n capture: true,\n });\n\n el.querySelector<HTMLButtonElement>(\"button\")?.focus({\n preventScroll: true,\n });\n };\n\n const findDropTarget = (\n registration: DragHandleRegistration,\n clientX: number,\n clientY: number,\n ): DropTarget | null => {\n const view = registration.view;\n const block = findForgivingBlock(view, clientX, clientY);\n if (!block) return null;\n\n const node = view.state.doc.nodeAt(block.pmPos);\n if (!node) return null;\n\n let placement: DragHandleDropPlacement;\n const withinBlockY =\n clientY >= block.rect.top && clientY <= block.rect.bottom;\n // Side (column) zones span the FULL block height — only the horizontal\n // position decides column-vs-reorder. Restricting to the vertical middle\n // (the old 0.2 band) made the already-tiny edge slivers nearly unhittable.\n const sideZoneWidth = Math.min(\n clamp(\n block.rect.width * SIDE_DROP_ZONE_RATIO,\n SIDE_DROP_ZONE_MIN_PX,\n SIDE_DROP_ZONE_MAX_PX,\n ),\n block.rect.width * SIDE_DROP_ZONE_MAX_WIDTH_FRACTION,\n );\n\n if (\n registration.handleDrop &&\n withinBlockY &&\n clientX <= block.rect.left + sideZoneWidth\n ) {\n placement = \"left\";\n } else if (\n registration.handleDrop &&\n withinBlockY &&\n clientX >= block.rect.right - sideZoneWidth\n ) {\n placement = \"right\";\n } else {\n placement =\n clientY < block.rect.top ||\n (clientY <= block.rect.bottom &&\n clientY < block.rect.top + block.rect.height / 2)\n ? \"before\"\n : \"after\";\n }\n const before = placement === \"before\" || placement === \"left\";\n\n return {\n registration,\n view,\n block: block.node,\n placement,\n pos: before ? block.pmPos : block.pmPos + node.nodeSize,\n targetPos: block.pmPos,\n targetNodeSize: node.nodeSize,\n rect: block.rect,\n };\n };\n\n const findAnyDropTarget = (\n session: DragSession,\n clientX: number,\n clientY: number,\n ): DropTarget | null => {\n const candidates: DropTarget[] = [];\n\n for (const registration of dragHandleRegistrations) {\n if (!registration.view.dom.isConnected) continue;\n if (\n registration.view !== session.view &&\n session.sourceBlock.contains(registration.view.dom)\n ) {\n continue;\n }\n const target = findDropTarget(registration, clientX, clientY);\n if (target) candidates.push(target);\n }\n\n candidates.sort((a, b) => {\n const aRect = a.view.dom.getBoundingClientRect();\n const bRect = b.view.dom.getBoundingClientRect();\n return aRect.width * aRect.height - bRect.width * bRect.height;\n });\n\n return candidates[0] ?? null;\n };\n\n const positionDragPreview = (\n session: DragSession,\n clientX: number,\n clientY: number,\n ) => {\n if (!session.preview) return;\n\n session.preview.style.transform = `translate3d(${clientX + 12}px, ${clientY + 10}px, 0)`;\n };\n\n const updateDropLine = (\n session: DragSession,\n target: DropTarget | null,\n ) => {\n const sourceEnd = session.sourcePos + session.sourceNodeSize;\n const isSideDrop =\n target?.placement === \"left\" || target?.placement === \"right\";\n if (\n !target ||\n (target.view === session.view &&\n (isSideDrop\n ? // A side drop only ever builds columns; the ProseMirror seam\n // position is irrelevant. The only no-op is dropping a block on\n // ITS OWN side — adjacent *different* blocks must still form\n // columns (otherwise dropping onto an immediate neighbour's\n // facing edge silently does nothing, which reads as \"side drop\n // works sometimes\").\n target.targetPos === session.sourcePos\n : target.pos === session.sourcePos ||\n target.pos === sourceEnd ||\n (target.pos > session.sourcePos && target.pos < sourceEnd)))\n ) {\n session.dropTarget = null;\n session.dropLine?.remove();\n session.dropLine = null;\n return;\n }\n\n const wrapper = target.view.dom.closest(\n target.registration.wrapperSelector,\n );\n if (!wrapper) return;\n\n if (!session.dropLine || session.dropLine.parentElement !== wrapper) {\n session.dropLine?.remove();\n session.dropLine = createDropLine(target.registration);\n }\n if (!session.dropLine) return;\n\n const wrapperRect = wrapper.getBoundingClientRect();\n const editorRect = target.view.dom.getBoundingClientRect();\n\n session.dropTarget = target;\n // A column (side) drop and a reorder (before/after) drop both draw the\n // `.notion-drop-indicator`, but they mean very different things, so the\n // column case carries a modifier class apps style distinctly (a bolder,\n // glowing vertical bar) — without a clear cue a human can't tell they've\n // entered column-build mode before releasing.\n const isColumnDrop =\n target.placement === \"left\" || target.placement === \"right\";\n session.dropLine.classList.toggle(\n \"notion-drop-indicator--column\",\n isColumnDrop,\n );\n if (isColumnDrop) {\n // A vertical bar centred on the seam at the target's left/right edge,\n // spanning the block's full height.\n const SIDE_BAR_WIDTH = 4;\n const seam =\n target.placement === \"left\" ? target.rect.left : target.rect.right;\n session.dropLine.style.left = `${seam - wrapperRect.left - SIDE_BAR_WIDTH / 2}px`;\n session.dropLine.style.top = `${target.rect.top - wrapperRect.top}px`;\n session.dropLine.style.width = `${SIDE_BAR_WIDTH}px`;\n session.dropLine.style.height = `${target.rect.height}px`;\n return;\n }\n\n const top =\n target.placement === \"before\" ? target.rect.top : target.rect.bottom;\n session.dropLine.style.left = `${editorRect.left - wrapperRect.left}px`;\n session.dropLine.style.top = `${top - wrapperRect.top}px`;\n session.dropLine.style.width = `${editorRect.width}px`;\n session.dropLine.style.height = \"3px\";\n };\n\n const createHandle = () => {\n const el = document.createElement(\"div\");\n el.className = \"drag-handle\";\n el.contentEditable = \"false\";\n el.draggable = false;\n el.tabIndex = 0;\n el.setAttribute(\"role\", \"button\");\n el.setAttribute(\"aria-label\", \"Open block menu or drag to reorder\");\n el.setAttribute(\"aria-haspopup\", \"menu\");\n el.setAttribute(\"aria-expanded\", \"false\");\n el.title = \"Open block menu or drag to reorder\";\n // The icon must not be its own hit target: a real mouse-down inside a\n // nested editor (a column) lands on the SVG, and a container block's\n // capture-phase block-select handler (RegistryBlockNode) only spares the\n // grip DIV — so a press on the icon gets swallowed and the block can't be\n // dragged out of / between columns. `pointer-events:none` makes every\n // press in the grip area resolve to the DIV instead.\n // Tabler `grip-vertical` (the framework-wide icon set). `pointer-events:none`\n // keeps every press in the grip area resolving to the DIV, not the SVG.\n el.innerHTML = DRAG_HANDLE_GRIP_ICON;\n const gripSvg = el.querySelector(\"svg\");\n if (gripSvg) {\n gripSvg.setAttribute(\"width\", \"16\");\n gripSvg.setAttribute(\"height\", \"16\");\n gripSvg.style.pointerEvents = \"none\";\n }\n return el;\n };\n\n const hideHandle = () => {\n if (menu) return;\n forceHideHandle();\n };\n\n const removeDragListeners = () => {\n document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\n document.removeEventListener(\"mouseup\", handleDocumentMouseUp);\n document.removeEventListener(\"keydown\", handleDocumentKeyDown);\n };\n\n function handleMenuDocumentMouseDown(event: MouseEvent) {\n const target = event.target;\n if (!(target instanceof Node)) return;\n if (menu?.contains(target) || handle?.contains(target)) return;\n closeMenu({ hideGrip: true });\n }\n\n function handleMenuKeyDown(event: KeyboardEvent) {\n if (!menu) return;\n\n if (event.key === \"Escape\") {\n event.preventDefault();\n closeMenu({ hideGrip: true });\n return;\n }\n\n if (\n event.key !== \"ArrowDown\" &&\n event.key !== \"ArrowUp\" &&\n event.key !== \"Home\" &&\n event.key !== \"End\"\n ) {\n return;\n }\n\n const buttons = Array.from(\n menu.querySelectorAll<HTMLButtonElement>(\"button\"),\n );\n if (buttons.length === 0) return;\n\n event.preventDefault();\n const activeIndex = buttons.indexOf(\n document.activeElement as HTMLButtonElement,\n );\n let nextIndex = activeIndex < 0 ? 0 : activeIndex;\n\n if (event.key === \"ArrowDown\") {\n nextIndex = (nextIndex + 1) % buttons.length;\n } else if (event.key === \"ArrowUp\") {\n nextIndex = (nextIndex - 1 + buttons.length) % buttons.length;\n } else if (event.key === \"Home\") {\n nextIndex = 0;\n } else if (event.key === \"End\") {\n nextIndex = buttons.length - 1;\n }\n\n buttons[nextIndex]?.focus({ preventScroll: true });\n }\n\n function handleMenuViewportChange() {\n closeMenu({ hideGrip: true });\n }\n\n const finishDragSession = (commit: boolean, event?: MouseEvent) => {\n const session = dragSession;\n if (!session) return;\n\n removeDragListeners();\n\n if (commit && session.dragging && session.dropTarget) {\n const sourceStart = session.sourcePos;\n const sourceEnd = session.sourcePos + session.sourceNodeSize;\n const target = session.dropTarget;\n const dropPos = target.pos;\n const isSideDrop =\n target.placement === \"left\" || target.placement === \"right\";\n\n if (\n target.view !== session.view ||\n (isSideDrop\n ? // Side drop (column build): proceed for any block that isn't the\n // source itself, including the source's immediate neighbour.\n target.targetPos !== sourceStart\n : dropPos !== sourceStart &&\n dropPos !== sourceEnd &&\n !(dropPos > sourceStart && dropPos < sourceEnd))\n ) {\n const sourceNode = session.view.state.doc.nodeAt(sourceStart);\n if (sourceNode) {\n const sourceRegistration = registrationForView(session.view);\n const transferData = sourceRegistration?.getDragTransferData?.({\n view: session.view,\n node: sourceNode,\n pos: sourceStart,\n });\n const targetNode = target.view.state.doc.nodeAt(target.targetPos);\n const handled =\n !!targetNode &&\n (target.registration.handleDrop?.(transferData, {\n view: target.view,\n sourceView: session.view,\n sourceNode,\n sourcePos: sourceStart,\n sourceNodeSize: sourceNode.nodeSize,\n targetNode,\n targetPos: target.targetPos,\n targetNodeSize: target.targetNodeSize,\n insertPos: dropPos,\n placement: target.placement,\n }) ??\n false);\n\n if (handled) {\n target.view.focus();\n } else if (target.view === session.view) {\n const insertPos =\n dropPos > sourceStart ? dropPos - sourceNode.nodeSize : dropPos;\n const tr = session.view.state.tr\n .delete(sourceStart, sourceEnd)\n .insert(insertPos, sourceNode);\n\n tr.setSelection(NodeSelection.create(tr.doc, insertPos));\n\n session.view.dispatch(tr.scrollIntoView());\n session.view.focus();\n } else {\n try {\n const targetNode = target.view.state.schema.nodeFromJSON(\n sourceNode.toJSON(),\n );\n target.registration.receiveDragTransferData?.(transferData, {\n view: target.view,\n node: targetNode,\n pos: dropPos,\n sourceView: session.view,\n });\n const insertTr = target.view.state.tr.insert(\n dropPos,\n targetNode,\n );\n insertTr.setSelection(\n NodeSelection.create(insertTr.doc, dropPos),\n );\n target.view.dispatch(insertTr.scrollIntoView());\n\n const deleteTr = session.view.state.tr.delete(\n sourceStart,\n sourceEnd,\n );\n session.view.dispatch(deleteTr);\n target.view.focus();\n } catch {\n // If the target schema cannot accept this node, leave the\n // source document untouched.\n }\n }\n }\n }\n } else if (commit && !session.dragging && event) {\n openMenu(\n {\n view: session.view,\n sourceBlock: session.sourceBlock,\n sourcePos: session.sourcePos,\n sourceNodeSize: session.sourceNodeSize,\n },\n handle?.getBoundingClientRect() ??\n session.sourceBlock.getBoundingClientRect(),\n );\n }\n\n cleanupDragVisuals();\n dragSession = null;\n if (activeDragRegistration === currentRegistration) {\n activeDragRegistration = null;\n }\n if (session.dragging || !commit) hideHandle();\n };\n\n const beginDragSession = (session: DragSession, event: MouseEvent) => {\n session.dragging = true;\n session.preview = createDragPreview(session.sourceBlock);\n session.sourceBlock.classList.add(\"notion-block--dragging\");\n document.documentElement.classList.add(\"notion-editor-is-dragging\");\n positionDragPreview(session, event.clientX, event.clientY);\n updateDropLine(\n session,\n findAnyDropTarget(session, event.clientX, event.clientY),\n );\n };\n\n function handleDocumentMouseMove(event: MouseEvent) {\n if (!dragSession) return;\n event.preventDefault();\n\n const movedEnough =\n Math.hypot(\n event.clientX - dragSession.startX,\n event.clientY - dragSession.startY,\n ) > 4;\n\n if (!dragSession.dragging && movedEnough) {\n beginDragSession(dragSession, event);\n }\n\n if (!dragSession.dragging) return;\n\n positionDragPreview(dragSession, event.clientX, event.clientY);\n updateDropLine(\n dragSession,\n findAnyDropTarget(dragSession, event.clientX, event.clientY),\n );\n }\n\n function handleDocumentMouseUp(event: MouseEvent) {\n event.preventDefault();\n finishDragSession(true, event);\n }\n\n function handleDocumentKeyDown(event: KeyboardEvent) {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n finishDragSession(false);\n }\n\n return [\n new Plugin({\n key: dragHandleKey,\n view(editorView) {\n const registration: DragHandleRegistration = {\n view: editorView,\n wrapperSelector,\n getDragTransferData,\n receiveDragTransferData,\n handleDrop,\n canHover: () =>\n !!handle && !menu && !dragSession && editor.isEditable,\n findHoverBlock: (clientX, clientY) =>\n findForgivingBlock(editorView, clientX, clientY),\n showHoverBlock: (block) => showHandleForBlock(editorView, block),\n hideHover: () => hideHandle(),\n gripRect: () =>\n handle && handle.style.display !== \"none\"\n ? handle.getBoundingClientRect()\n : null,\n };\n currentRegistration = registration;\n dragHandleRegistrations.add(registration);\n retainGlobalHoverListener();\n handle = createHandle();\n const wrapper = editorView.dom.closest(wrapperSelector);\n if (wrapper) {\n (wrapper as HTMLElement).style.position = \"relative\";\n wrapper.appendChild(handle);\n }\n\n handle.addEventListener(\"mousedown\", (e) => {\n e.stopPropagation();\n if (e.button !== 0) return;\n closeMenu();\n if (!editor.isEditable) {\n e.preventDefault();\n return;\n }\n\n if (!currentBlock || dragStartPos === null) return;\n\n const sourceNode = editorView.state.doc.nodeAt(dragStartPos);\n if (!sourceNode) return;\n\n e.preventDefault();\n dragSession = {\n view: editorView,\n sourceBlock: currentBlock,\n sourcePos: dragStartPos,\n sourceNodeSize: sourceNode.nodeSize,\n startX: e.clientX,\n startY: e.clientY,\n dragging: false,\n preview: null,\n dropLine: null,\n dropTarget: null,\n };\n activeDragRegistration = registration;\n\n document.addEventListener(\"mousemove\", handleDocumentMouseMove);\n document.addEventListener(\"mouseup\", handleDocumentMouseUp);\n document.addEventListener(\"keydown\", handleDocumentKeyDown);\n });\n\n handle.addEventListener(\"keydown\", (e) => {\n if (e.key !== \"Enter\" && e.key !== \" \") return;\n e.preventDefault();\n e.stopPropagation();\n closeMenu();\n if (!editor.isEditable || !currentBlock || dragStartPos === null) {\n return;\n }\n\n const sourceNode = editorView.state.doc.nodeAt(dragStartPos);\n if (!sourceNode) return;\n\n openMenu(\n {\n view: editorView,\n sourceBlock: currentBlock,\n sourcePos: dragStartPos,\n sourceNodeSize: sourceNode.nodeSize,\n },\n handle?.getBoundingClientRect() ??\n currentBlock.getBoundingClientRect(),\n );\n });\n\n return {\n destroy() {\n closeMenu({ hideGrip: true });\n finishDragSession(false);\n releaseGlobalHoverListener();\n dragHandleRegistrations.delete(registration);\n if (activeDragRegistration === registration) {\n activeDragRegistration = null;\n }\n if (activeHoverRegistration === registration) {\n activeHoverRegistration = null;\n }\n handle?.remove();\n handle = null;\n currentRegistration = null;\n },\n };\n },\n props: {\n handleDOMEvents: {\n mousemove(_view, event) {\n updateRegisteredHover(event.clientX, event.clientY);\n return false;\n },\n drop() {\n closeMenu({ hideGrip: true });\n finishDragSession(false);\n hideHandle();\n return false;\n },\n },\n },\n }),\n ];\n },\n});\n"]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { type ImageOptions } from "@tiptap/extension-image";
|
|
2
|
-
import type { EditorView } from "@tiptap/pm/view";
|
|
3
|
-
/**
|
|
4
|
-
* The injectable async upload contract for the shared image block.
|
|
5
|
-
*
|
|
6
|
-
* An app provides this to turn a picked / pasted / dropped {@link File} into a
|
|
7
|
-
* hosted image. It returns the final `src` (a hosted URL) plus an optional
|
|
8
|
-
* `alt`. Plans wire it to the framework `upload-image` action; Content keeps its
|
|
9
|
-
* own richer image block and does not use this contract.
|
|
10
|
-
*
|
|
11
|
-
* When NO upload function is supplied, the shared block still renders images and
|
|
12
|
-
* round-trips `` markdown — it just cannot ingest local files (paste
|
|
13
|
-
* of an image URL / markdown still works via the base node's input rules).
|
|
14
|
-
*/
|
|
15
|
-
export type ImageUploadFn = (file: File) => Promise<{
|
|
16
|
-
src: string;
|
|
17
|
-
alt?: string;
|
|
18
|
-
}>;
|
|
19
|
-
export interface SharedImageOptions extends ImageOptions {
|
|
20
|
-
/**
|
|
21
|
-
* App-injected uploader. When present, the shared block accepts pasted /
|
|
22
|
-
* dropped image files and the `/image` slash command, uploading each file
|
|
23
|
-
* through this function and patching the node's `src` on resolve.
|
|
24
|
-
*/
|
|
25
|
-
onImageUpload?: ImageUploadFn | null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The SHARED block-level image node. Built on `@tiptap/extension-image` (a
|
|
29
|
-
* node named `image`), so:
|
|
30
|
-
*
|
|
31
|
-
* - **GFM serialization** emits pure `` markdown via a block-aware
|
|
32
|
-
* `addStorage().markdown.serialize` (it calls `closeBlock` so a block image
|
|
33
|
-
* keeps its blank-line separator, byte-stable). It emits NO `<img width>`
|
|
34
|
-
* HTML, so plans stay source-syncable under the GFM `html:false` contract.
|
|
35
|
-
* - **Paste / drop** of local image files is handled by a self-contained
|
|
36
|
-
* ProseMirror plugin that calls the injected {@link ImageUploadFn}. Pasting
|
|
37
|
-
* an image URL or `` markdown works through the base node's input
|
|
38
|
-
* rules even when no uploader is supplied.
|
|
39
|
-
*
|
|
40
|
-
* The node adds one transient `uploadId` attribute (never parsed/rendered to
|
|
41
|
-
* HTML, never serialized to markdown) used to track an in-flight upload.
|
|
42
|
-
*
|
|
43
|
-
* Content keeps its own richer `ImageNode` (Assets picker, AI alt-text, resize,
|
|
44
|
-
* NFM `{color}` serialization) and does NOT use this shared node — both nodes
|
|
45
|
-
* are named `image` but never coexist in the same editor because Content leaves
|
|
46
|
-
* `features.image` off and injects its own via `extraExtensions`.
|
|
47
|
-
*/
|
|
48
|
-
export declare const SharedImage: import("@tiptap/core").Node<SharedImageOptions, any>;
|
|
49
|
-
/**
|
|
50
|
-
* Build the shared image extension, optionally wired with an app uploader.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* createImageExtension({ onImageUpload: uploadEditorImage })
|
|
54
|
-
*/
|
|
55
|
-
export declare function createImageExtension(options?: {
|
|
56
|
-
onImageUpload?: ImageUploadFn | null;
|
|
57
|
-
}): import("@tiptap/core").Node<SharedImageOptions, any>;
|
|
58
|
-
/**
|
|
59
|
-
* Open a native file picker, then upload + insert the chosen image(s) through
|
|
60
|
-
* the same flow as paste/drop. Used by the `/image` slash command.
|
|
61
|
-
*/
|
|
62
|
-
export declare function pickAndInsertImage(view: EditorView, upload: ImageUploadFn): void;
|
|
63
|
-
//# sourceMappingURL=ImageExtension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageExtension.d.ts","sourceRoot":"","sources":["../../../src/client/rich-markdown-editor/ImageExtension.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,IAAI,EAAE,IAAI,KACP,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAoHD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,sDAqGtB,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;CAAO,wDAMvD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,aAAa,GACpB,IAAI,CAgBN"}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import Image from "@tiptap/extension-image";
|
|
2
|
-
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
|
3
|
-
const sharedImageUploadPluginKey = new PluginKey("an-shared-image-upload");
|
|
4
|
-
/** A monotonically increasing id so concurrent uploads patch the right node. */
|
|
5
|
-
let uploadCounter = 0;
|
|
6
|
-
function nextUploadId() {
|
|
7
|
-
uploadCounter += 1;
|
|
8
|
-
return `an-img-${Date.now()}-${uploadCounter}`;
|
|
9
|
-
}
|
|
10
|
-
/** Image files only — never ingest non-image clipboard/drop payloads. */
|
|
11
|
-
function imageFilesFrom(data) {
|
|
12
|
-
if (!data)
|
|
13
|
-
return [];
|
|
14
|
-
return Array.from(data.files ?? []).filter((file) => file.type.startsWith("image/"));
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Insert a placeholder `image` node (empty `src`, transient `uploadId`) at
|
|
18
|
-
* `pos` for every file, then resolve each upload and patch the matching node's
|
|
19
|
-
* `src`. Mirrors Content's optimistic upload flow but is self-contained in the
|
|
20
|
-
* shared extension so it works for ANY editor wrapper (the plan's
|
|
21
|
-
* `SharedRichEditor` and Content's hand-rolled `useEditor` alike) without a new
|
|
22
|
-
* `editorProps` seam.
|
|
23
|
-
*/
|
|
24
|
-
function uploadAndInsertImages(view, files, pos, upload) {
|
|
25
|
-
if (files.length === 0)
|
|
26
|
-
return;
|
|
27
|
-
const pending = [];
|
|
28
|
-
// Insert all placeholders first, top-down from `pos`, so multi-file
|
|
29
|
-
// paste/drop keeps source order.
|
|
30
|
-
let insertAt = pos;
|
|
31
|
-
for (const file of files) {
|
|
32
|
-
const uploadId = nextUploadId();
|
|
33
|
-
const node = view.state.schema.nodes.image?.create({
|
|
34
|
-
src: "",
|
|
35
|
-
alt: "",
|
|
36
|
-
uploadId,
|
|
37
|
-
});
|
|
38
|
-
if (!node)
|
|
39
|
-
continue;
|
|
40
|
-
const tr = view.state.tr.insert(insertAt, node);
|
|
41
|
-
view.dispatch(tr);
|
|
42
|
-
pending.push({ uploadId, file });
|
|
43
|
-
// Advance past the inserted atom for the next placeholder.
|
|
44
|
-
insertAt += node.nodeSize;
|
|
45
|
-
}
|
|
46
|
-
for (const item of pending) {
|
|
47
|
-
void (async () => {
|
|
48
|
-
try {
|
|
49
|
-
const { src, alt } = await upload(item.file);
|
|
50
|
-
if (!view.dom.isConnected || view.isDestroyed)
|
|
51
|
-
return;
|
|
52
|
-
patchUploadNode(view, item.uploadId, { src, alt: alt ?? "" });
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
console.error("Image upload failed:", error);
|
|
56
|
-
// Drop the placeholder so a failed upload does not leave an empty box.
|
|
57
|
-
if (view.dom.isConnected && !view.isDestroyed) {
|
|
58
|
-
removeUploadNode(view, item.uploadId);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
})();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/** Find a placeholder node by its transient `uploadId` and return its position. */
|
|
65
|
-
function findUploadNode(view, uploadId) {
|
|
66
|
-
let found = null;
|
|
67
|
-
view.state.doc.descendants((node, pos) => {
|
|
68
|
-
if (found)
|
|
69
|
-
return false;
|
|
70
|
-
if (node.type.name === "image" && node.attrs.uploadId === uploadId) {
|
|
71
|
-
found = { pos, nodeSize: node.nodeSize };
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
});
|
|
76
|
-
return found;
|
|
77
|
-
}
|
|
78
|
-
/** Patch the resolved `src`/`alt` onto the placeholder and clear `uploadId`. */
|
|
79
|
-
function patchUploadNode(view, uploadId, attrs) {
|
|
80
|
-
const target = findUploadNode(view, uploadId);
|
|
81
|
-
if (!target)
|
|
82
|
-
return;
|
|
83
|
-
const node = view.state.doc.nodeAt(target.pos);
|
|
84
|
-
if (!node)
|
|
85
|
-
return;
|
|
86
|
-
const tr = view.state.tr.setNodeMarkup(target.pos, undefined, {
|
|
87
|
-
...node.attrs,
|
|
88
|
-
src: attrs.src,
|
|
89
|
-
alt: attrs.alt,
|
|
90
|
-
uploadId: null,
|
|
91
|
-
});
|
|
92
|
-
view.dispatch(tr);
|
|
93
|
-
}
|
|
94
|
-
/** Remove a placeholder whose upload failed. */
|
|
95
|
-
function removeUploadNode(view, uploadId) {
|
|
96
|
-
const target = findUploadNode(view, uploadId);
|
|
97
|
-
if (!target)
|
|
98
|
-
return;
|
|
99
|
-
const tr = view.state.tr.delete(target.pos, target.pos + target.nodeSize);
|
|
100
|
-
view.dispatch(tr);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* The SHARED block-level image node. Built on `@tiptap/extension-image` (a
|
|
104
|
-
* node named `image`), so:
|
|
105
|
-
*
|
|
106
|
-
* - **GFM serialization** emits pure `` markdown via a block-aware
|
|
107
|
-
* `addStorage().markdown.serialize` (it calls `closeBlock` so a block image
|
|
108
|
-
* keeps its blank-line separator, byte-stable). It emits NO `<img width>`
|
|
109
|
-
* HTML, so plans stay source-syncable under the GFM `html:false` contract.
|
|
110
|
-
* - **Paste / drop** of local image files is handled by a self-contained
|
|
111
|
-
* ProseMirror plugin that calls the injected {@link ImageUploadFn}. Pasting
|
|
112
|
-
* an image URL or `` markdown works through the base node's input
|
|
113
|
-
* rules even when no uploader is supplied.
|
|
114
|
-
*
|
|
115
|
-
* The node adds one transient `uploadId` attribute (never parsed/rendered to
|
|
116
|
-
* HTML, never serialized to markdown) used to track an in-flight upload.
|
|
117
|
-
*
|
|
118
|
-
* Content keeps its own richer `ImageNode` (Assets picker, AI alt-text, resize,
|
|
119
|
-
* NFM `{color}` serialization) and does NOT use this shared node — both nodes
|
|
120
|
-
* are named `image` but never coexist in the same editor because Content leaves
|
|
121
|
-
* `features.image` off and injects its own via `extraExtensions`.
|
|
122
|
-
*/
|
|
123
|
-
export const SharedImage = Image.extend({
|
|
124
|
-
// Block-level atom (Content's image is also a block atom). The base extension
|
|
125
|
-
// is block when `inline:false`.
|
|
126
|
-
inline: false,
|
|
127
|
-
group: "block",
|
|
128
|
-
addOptions() {
|
|
129
|
-
return {
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
131
|
-
...this.parent(),
|
|
132
|
-
onImageUpload: null,
|
|
133
|
-
};
|
|
134
|
-
},
|
|
135
|
-
addAttributes() {
|
|
136
|
-
return {
|
|
137
|
-
...this.parent?.(),
|
|
138
|
-
// Transient: marks an in-flight upload so the plugin can patch `src` on
|
|
139
|
-
// resolve. Never written to HTML or markdown.
|
|
140
|
-
uploadId: {
|
|
141
|
-
default: null,
|
|
142
|
-
parseHTML: () => null,
|
|
143
|
-
renderHTML: () => ({}),
|
|
144
|
-
},
|
|
145
|
-
};
|
|
146
|
-
},
|
|
147
|
-
addStorage() {
|
|
148
|
-
return {
|
|
149
|
-
...this.parent?.(),
|
|
150
|
-
// A BLOCK-aware markdown serializer. tiptap-markdown's built-in fallback
|
|
151
|
-
// for the `image` node is prosemirror-markdown's INLINE image serializer,
|
|
152
|
-
// which omits the trailing block separator — so an image immediately
|
|
153
|
-
// followed by a paragraph loses its blank line on round-trip. This
|
|
154
|
-
// node-level spec (merged OVER the fallback by tiptap-markdown's
|
|
155
|
-
// `getMarkdownSpec`) emits the same pure `` markdown but calls
|
|
156
|
-
// `closeBlock`, so a block image stays byte-stable and source-syncable.
|
|
157
|
-
// No `<img width>` / HTML is emitted, so the GFM `html:false` contract and
|
|
158
|
-
// the plan round-trip corpus are preserved.
|
|
159
|
-
markdown: {
|
|
160
|
-
serialize(state, node) {
|
|
161
|
-
const src = node.attrs.src ?? "";
|
|
162
|
-
const alt = node.attrs.alt ?? "";
|
|
163
|
-
const title = node.attrs.title ?? "";
|
|
164
|
-
const titleSuffix = title ? ` "${title.replace(/"/g, '\\"')}"` : "";
|
|
165
|
-
state.write(`}${titleSuffix})`);
|
|
166
|
-
state.closeBlock(node);
|
|
167
|
-
},
|
|
168
|
-
parse: {
|
|
169
|
-
// Parsing `` is handled by markdown-it + the base node's
|
|
170
|
-
// markdown input rule.
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
},
|
|
175
|
-
addProseMirrorPlugins() {
|
|
176
|
-
const upload = this.options.onImageUpload;
|
|
177
|
-
const parentPlugins = this.parent?.() ?? [];
|
|
178
|
-
if (!upload)
|
|
179
|
-
return parentPlugins;
|
|
180
|
-
return [
|
|
181
|
-
...parentPlugins,
|
|
182
|
-
new Plugin({
|
|
183
|
-
key: sharedImageUploadPluginKey,
|
|
184
|
-
props: {
|
|
185
|
-
handlePaste(view, event) {
|
|
186
|
-
const files = imageFilesFrom(event.clipboardData);
|
|
187
|
-
if (files.length === 0)
|
|
188
|
-
return false;
|
|
189
|
-
event.preventDefault();
|
|
190
|
-
uploadAndInsertImages(view, files, view.state.selection.from, upload);
|
|
191
|
-
return true;
|
|
192
|
-
},
|
|
193
|
-
handleDrop(view, event) {
|
|
194
|
-
const files = imageFilesFrom(event.dataTransfer);
|
|
195
|
-
if (files.length === 0)
|
|
196
|
-
return false;
|
|
197
|
-
event.preventDefault();
|
|
198
|
-
const coords = view.posAtCoords({
|
|
199
|
-
left: event.clientX,
|
|
200
|
-
top: event.clientY,
|
|
201
|
-
});
|
|
202
|
-
const pos = coords?.pos ?? view.state.selection.from;
|
|
203
|
-
uploadAndInsertImages(view, files, pos, upload);
|
|
204
|
-
return true;
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
}),
|
|
208
|
-
];
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
/**
|
|
212
|
-
* Build the shared image extension, optionally wired with an app uploader.
|
|
213
|
-
*
|
|
214
|
-
* @example
|
|
215
|
-
* createImageExtension({ onImageUpload: uploadEditorImage })
|
|
216
|
-
*/
|
|
217
|
-
export function createImageExtension(options = {}) {
|
|
218
|
-
return SharedImage.configure({
|
|
219
|
-
onImageUpload: options.onImageUpload ?? null,
|
|
220
|
-
HTMLAttributes: { class: "an-rich-md-image" },
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Open a native file picker, then upload + insert the chosen image(s) through
|
|
225
|
-
* the same flow as paste/drop. Used by the `/image` slash command.
|
|
226
|
-
*/
|
|
227
|
-
export function pickAndInsertImage(view, upload) {
|
|
228
|
-
const input = document.createElement("input");
|
|
229
|
-
input.type = "file";
|
|
230
|
-
input.accept = "image/*";
|
|
231
|
-
input.multiple = true;
|
|
232
|
-
input.style.display = "none";
|
|
233
|
-
input.addEventListener("change", () => {
|
|
234
|
-
const files = Array.from(input.files ?? []).filter((file) => file.type.startsWith("image/"));
|
|
235
|
-
input.remove();
|
|
236
|
-
if (files.length === 0)
|
|
237
|
-
return;
|
|
238
|
-
uploadAndInsertImages(view, files, view.state.selection.from, upload);
|
|
239
|
-
});
|
|
240
|
-
document.body.appendChild(input);
|
|
241
|
-
input.click();
|
|
242
|
-
}
|
|
243
|
-
//# sourceMappingURL=ImageExtension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageExtension.js","sourceRoot":"","sources":["../../../src/client/rich-markdown-editor/ImageExtension.ts"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA4BrD,MAAM,0BAA0B,GAAG,IAAI,SAAS,CAAC,wBAAwB,CAAC,CAAC;AAE3E,gFAAgF;AAChF,IAAI,aAAa,GAAG,CAAC,CAAC;AACtB,SAAS,YAAY;IACnB,aAAa,IAAI,CAAC,CAAC;IACnB,OAAO,UAAU,IAAI,CAAC,GAAG,EAAE,IAAI,aAAa,EAAE,CAAC;AACjD,CAAC;AAED,yEAAyE;AACzE,SAAS,cAAc,CAAC,IAAqC;IAC3D,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAC5B,IAAgB,EAChB,KAAa,EACb,GAAW,EACX,MAAqB;IAErB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;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;IACpB,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;QACpC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAC1D,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC/B,CAAC;QACF,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAC/B,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,KAAK,CAAC,KAAK,EAAE,CAAC;AAChB,CAAC","sourcesContent":["import Image, { type ImageOptions } from \"@tiptap/extension-image\";\nimport { Plugin, PluginKey } from \"@tiptap/pm/state\";\nimport type { EditorView } from \"@tiptap/pm/view\";\n\n/**\n * The injectable async upload contract for the shared image block.\n *\n * An app provides this to turn a picked / pasted / dropped {@link File} into a\n * hosted image. It returns the final `src` (a hosted URL) plus an optional\n * `alt`. Plans wire it to the framework `upload-image` action; Content keeps its\n * own richer image block and does not use this contract.\n *\n * When NO upload function is supplied, the shared block still renders images and\n * round-trips `` markdown — it just cannot ingest local files (paste\n * of an image URL / markdown still works via the base node's input rules).\n */\nexport type ImageUploadFn = (\n file: File,\n) => Promise<{ src: string; alt?: string }>;\n\nexport interface SharedImageOptions extends ImageOptions {\n /**\n * App-injected uploader. When present, the shared block accepts pasted /\n * dropped image files and the `/image` slash command, uploading each file\n * through this function and patching the node's `src` on resolve.\n */\n onImageUpload?: ImageUploadFn | null;\n}\n\nconst sharedImageUploadPluginKey = new PluginKey(\"an-shared-image-upload\");\n\n/** A monotonically increasing id so concurrent uploads patch the right node. */\nlet uploadCounter = 0;\nfunction nextUploadId(): string {\n uploadCounter += 1;\n return `an-img-${Date.now()}-${uploadCounter}`;\n}\n\n/** Image files only — never ingest non-image clipboard/drop payloads. */\nfunction imageFilesFrom(data: DataTransfer | null | undefined): File[] {\n if (!data) return [];\n return Array.from(data.files ?? []).filter((file) =>\n file.type.startsWith(\"image/\"),\n );\n}\n\n/**\n * Insert a placeholder `image` node (empty `src`, transient `uploadId`) at\n * `pos` for every file, then resolve each upload and patch the matching node's\n * `src`. Mirrors Content's optimistic upload flow but is self-contained in the\n * shared extension so it works for ANY editor wrapper (the plan's\n * `SharedRichEditor` and Content's hand-rolled `useEditor` alike) without a new\n * `editorProps` seam.\n */\nfunction uploadAndInsertImages(\n view: EditorView,\n files: File[],\n pos: number,\n upload: ImageUploadFn,\n): void {\n if (files.length === 0) return;\n\n const pending: Array<{ uploadId: string; file: File }> = [];\n\n // Insert all placeholders first, top-down from `pos`, so multi-file\n // paste/drop keeps source order.\n let insertAt = pos;\n for (const file of files) {\n const uploadId = nextUploadId();\n const node = view.state.schema.nodes.image?.create({\n src: \"\",\n alt: \"\",\n uploadId,\n });\n if (!node) continue;\n const tr = view.state.tr.insert(insertAt, node);\n view.dispatch(tr);\n pending.push({ uploadId, file });\n // Advance past the inserted atom for the next placeholder.\n insertAt += node.nodeSize;\n }\n\n for (const item of pending) {\n void (async () => {\n try {\n const { src, alt } = await upload(item.file);\n if (!view.dom.isConnected || view.isDestroyed) return;\n patchUploadNode(view, item.uploadId, { src, alt: alt ?? \"\" });\n } catch (error) {\n console.error(\"Image upload failed:\", error);\n // Drop the placeholder so a failed upload does not leave an empty box.\n if (view.dom.isConnected && !view.isDestroyed) {\n removeUploadNode(view, item.uploadId);\n }\n }\n })();\n }\n}\n\n/** Find a placeholder node by its transient `uploadId` and return its position. */\nfunction findUploadNode(\n view: EditorView,\n uploadId: string,\n): { pos: number; nodeSize: number } | null {\n let found: { pos: number; nodeSize: number } | null = null;\n view.state.doc.descendants((node, pos) => {\n if (found) return false;\n if (node.type.name === \"image\" && node.attrs.uploadId === uploadId) {\n found = { pos, nodeSize: node.nodeSize };\n return false;\n }\n return true;\n });\n return found;\n}\n\n/** Patch the resolved `src`/`alt` onto the placeholder and clear `uploadId`. */\nfunction patchUploadNode(\n view: EditorView,\n uploadId: string,\n attrs: { src: string; alt: string },\n): void {\n const target = findUploadNode(view, uploadId);\n if (!target) return;\n const node = view.state.doc.nodeAt(target.pos);\n if (!node) return;\n const tr = view.state.tr.setNodeMarkup(target.pos, undefined, {\n ...node.attrs,\n src: attrs.src,\n alt: attrs.alt,\n uploadId: null,\n });\n view.dispatch(tr);\n}\n\n/** Remove a placeholder whose upload failed. */\nfunction removeUploadNode(view: EditorView, uploadId: string): void {\n const target = findUploadNode(view, uploadId);\n if (!target) return;\n const tr = view.state.tr.delete(target.pos, target.pos + target.nodeSize);\n view.dispatch(tr);\n}\n\n/**\n * The SHARED block-level image node. Built on `@tiptap/extension-image` (a\n * node named `image`), so:\n *\n * - **GFM serialization** emits pure `` markdown via a block-aware\n * `addStorage().markdown.serialize` (it calls `closeBlock` so a block image\n * keeps its blank-line separator, byte-stable). It emits NO `<img width>`\n * HTML, so plans stay source-syncable under the GFM `html:false` contract.\n * - **Paste / drop** of local image files is handled by a self-contained\n * ProseMirror plugin that calls the injected {@link ImageUploadFn}. Pasting\n * an image URL or `` markdown works through the base node's input\n * rules even when no uploader is supplied.\n *\n * The node adds one transient `uploadId` attribute (never parsed/rendered to\n * HTML, never serialized to markdown) used to track an in-flight upload.\n *\n * Content keeps its own richer `ImageNode` (Assets picker, AI alt-text, resize,\n * NFM `{color}` serialization) and does NOT use this shared node — both nodes\n * are named `image` but never coexist in the same editor because Content leaves\n * `features.image` off and injects its own via `extraExtensions`.\n */\nexport const SharedImage = Image.extend<SharedImageOptions>({\n // Block-level atom (Content's image is also a block atom). The base extension\n // is block when `inline:false`.\n inline: false,\n group: \"block\",\n\n addOptions() {\n return {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n ...this.parent!(),\n onImageUpload: null,\n };\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n // Transient: marks an in-flight upload so the plugin can patch `src` on\n // resolve. Never written to HTML or markdown.\n uploadId: {\n default: null,\n parseHTML: () => null,\n renderHTML: () => ({}),\n },\n };\n },\n\n addStorage() {\n return {\n ...this.parent?.(),\n // A BLOCK-aware markdown serializer. tiptap-markdown's built-in fallback\n // for the `image` node is prosemirror-markdown's INLINE image serializer,\n // which omits the trailing block separator — so an image immediately\n // followed by a paragraph loses its blank line on round-trip. This\n // node-level spec (merged OVER the fallback by tiptap-markdown's\n // `getMarkdownSpec`) emits the same pure `` markdown but calls\n // `closeBlock`, so a block image stays byte-stable and source-syncable.\n // No `<img width>` / HTML is emitted, so the GFM `html:false` contract and\n // the plan round-trip corpus are preserved.\n markdown: {\n serialize(\n state: {\n esc: (s: string) => string;\n write: (s: string) => void;\n closeBlock: (n: unknown) => void;\n },\n node: { attrs: { src?: string; alt?: string; title?: string } },\n ) {\n const src = node.attrs.src ?? \"\";\n const alt = node.attrs.alt ?? \"\";\n const title = node.attrs.title ?? \"\";\n const titleSuffix = title ? ` \"${title.replace(/\"/g, '\\\\\"')}\"` : \"\";\n state.write(`}${titleSuffix})`);\n state.closeBlock(node);\n },\n parse: {\n // Parsing `` is handled by markdown-it + the base node's\n // markdown input rule.\n },\n },\n };\n },\n\n addProseMirrorPlugins() {\n const upload = this.options.onImageUpload;\n const parentPlugins = this.parent?.() ?? [];\n if (!upload) return parentPlugins;\n\n return [\n ...parentPlugins,\n new Plugin({\n key: sharedImageUploadPluginKey,\n props: {\n handlePaste(view, event) {\n const files = imageFilesFrom(event.clipboardData);\n if (files.length === 0) return false;\n event.preventDefault();\n uploadAndInsertImages(\n view,\n files,\n view.state.selection.from,\n upload,\n );\n return true;\n },\n handleDrop(view, event) {\n const files = imageFilesFrom(event.dataTransfer);\n if (files.length === 0) return false;\n event.preventDefault();\n const coords = view.posAtCoords({\n left: event.clientX,\n top: event.clientY,\n });\n const pos = coords?.pos ?? view.state.selection.from;\n uploadAndInsertImages(view, files, pos, upload);\n return true;\n },\n },\n }),\n ];\n },\n});\n\n/**\n * Build the shared image extension, optionally wired with an app uploader.\n *\n * @example\n * createImageExtension({ onImageUpload: uploadEditorImage })\n */\nexport function createImageExtension(\n options: { onImageUpload?: ImageUploadFn | null } = {},\n) {\n return SharedImage.configure({\n onImageUpload: options.onImageUpload ?? null,\n HTMLAttributes: { class: \"an-rich-md-image\" },\n });\n}\n\n/**\n * Open a native file picker, then upload + insert the chosen image(s) through\n * the same flow as paste/drop. Used by the `/image` slash command.\n */\nexport function pickAndInsertImage(\n view: EditorView,\n upload: ImageUploadFn,\n): void {\n const input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = \"image/*\";\n input.multiple = true;\n input.style.display = \"none\";\n input.addEventListener(\"change\", () => {\n const files = Array.from(input.files ?? []).filter((file) =>\n file.type.startsWith(\"image/\"),\n );\n input.remove();\n if (files.length === 0) return;\n uploadAndInsertImages(view, files, view.state.selection.from, upload);\n });\n document.body.appendChild(input);\n input.click();\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { Awareness } from "y-protocols/awareness";
|
|
2
|
-
import type { Doc as YDoc } from "yjs";
|
|
3
|
-
/**
|
|
4
|
-
* Back-compat surface for the shared rich markdown editor.
|
|
5
|
-
*
|
|
6
|
-
* The editor core now lives in dedicated modules:
|
|
7
|
-
* - {@link createSharedEditorExtensions} — the ONE extension factory.
|
|
8
|
-
* - {@link useCollabReconcile} — seed / reconcile / lead-client logic.
|
|
9
|
-
* - {@link SlashCommandMenu} / {@link BubbleToolbar} — shared menus.
|
|
10
|
-
* - {@link SharedRichEditor} — the editor component.
|
|
11
|
-
*
|
|
12
|
-
* This file keeps the historical `RichMarkdownEditor` component name (aliased to
|
|
13
|
-
* {@link SharedRichEditor}) and the `createRichMarkdownExtensions` factory so
|
|
14
|
-
* existing embedders and the round-trip / collab specs keep working unchanged.
|
|
15
|
-
*/
|
|
16
|
-
import { type RichMarkdownDialect, type RichMarkdownEditorPreset, type RichMarkdownCollabUser } from "./extensions.js";
|
|
17
|
-
import { SharedRichEditor, type SharedRichEditorProps } from "./SharedRichEditor.js";
|
|
18
|
-
export type { RichMarkdownDialect, RichMarkdownEditorPreset, RichMarkdownCollabUser, };
|
|
19
|
-
/** @deprecated Prefer {@link CreateSharedEditorExtensionsOptions}. */
|
|
20
|
-
export interface CreateRichMarkdownExtensionsOptions {
|
|
21
|
-
dialect?: RichMarkdownDialect;
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Yjs document for collaborative editing. When present, the editor binds the
|
|
25
|
-
* shared Collaboration + CollaborationCaret extensions and StarterKit's
|
|
26
|
-
* built-in undo/redo is disabled (Yjs owns history).
|
|
27
|
-
*/
|
|
28
|
-
ydoc?: YDoc | null;
|
|
29
|
-
/** Shared awareness instance for live multi-user cursors. */
|
|
30
|
-
awareness?: Awareness | null;
|
|
31
|
-
/** Current user info for the collaborative cursor label. */
|
|
32
|
-
user?: RichMarkdownCollabUser | null;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Back-compat factory preserving today's GFM/plan behavior EXACTLY. Implemented
|
|
36
|
-
* in terms of {@link createSharedEditorExtensions}: it maps the flat
|
|
37
|
-
* `{ ydoc, awareness, user }` collab options into the nested `collab` shape the
|
|
38
|
-
* shared factory expects. The round-trip and collab specs build their `Editor`
|
|
39
|
-
* from this, so its output must stay byte-stable.
|
|
40
|
-
*/
|
|
41
|
-
export declare function createRichMarkdownExtensions({ dialect, placeholder, ydoc, awareness, user, }?: CreateRichMarkdownExtensionsOptions): (import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Mark<any, any> | import("@tiptap/core").Node<any, any>)[];
|
|
42
|
-
/** @deprecated Prefer {@link SharedRichEditorProps}. */
|
|
43
|
-
export type RichMarkdownEditorProps = SharedRichEditorProps;
|
|
44
|
-
/**
|
|
45
|
-
* Historical name for {@link SharedRichEditor}. Kept so existing imports
|
|
46
|
-
* (`import { RichMarkdownEditor } from "@agent-native/core/client"`) and the
|
|
47
|
-
* plan editor tests (which assert the source mentions `RichMarkdownEditor`)
|
|
48
|
-
* keep working. New code should import `SharedRichEditor`.
|
|
49
|
-
*/
|
|
50
|
-
export declare const RichMarkdownEditor: typeof SharedRichEditor;
|
|
51
|
-
//# sourceMappingURL=RichMarkdownEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichMarkdownEditor.d.ts","sourceRoot":"","sources":["../../../src/client/rich-markdown-editor/RichMarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,MAAM,KAAK,CAAC;AAEvC;;;;;;;;;;;;GAYG;AACH,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,GACvB,CAAC;AAEF,sEAAsE;AACtE,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,4DAA4D;IAC5D,IAAI,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,OAAe,EACf,WAAwC,EACxC,IAAW,EACX,SAAgB,EAChB,IAAW,GACZ,GAAE,mCAAwC,kIAM1C;AAED,wDAAwD;AACxD,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,yBAAmB,CAAC"}
|