@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,1437 +0,0 @@
|
|
|
1
|
-
import { Extension } from "@tiptap/core";
|
|
2
|
-
import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
|
|
3
|
-
import {
|
|
4
|
-
Plugin,
|
|
5
|
-
PluginKey,
|
|
6
|
-
NodeSelection,
|
|
7
|
-
TextSelection,
|
|
8
|
-
type Transaction,
|
|
9
|
-
} from "@tiptap/pm/state";
|
|
10
|
-
import { type EditorView } from "@tiptap/pm/view";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Default editor-wrapper CSS selector the drag handle scopes itself to.
|
|
14
|
-
*
|
|
15
|
-
* The handle, the drop indicator, and the `position: relative` anchor are all
|
|
16
|
-
* appended to / measured against the closest ancestor matching this selector.
|
|
17
|
-
* Content's editor wraps its ProseMirror DOM in a `.visual-editor-wrapper`
|
|
18
|
-
* element, so that is the historical default. Other apps (e.g. the plan editor)
|
|
19
|
-
* pass their own wrapper selector via {@link DragHandleOptions.wrapperSelector}.
|
|
20
|
-
*/
|
|
21
|
-
export const DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR = ".visual-editor-wrapper";
|
|
22
|
-
|
|
23
|
-
export interface DragHandleOptions {
|
|
24
|
-
/**
|
|
25
|
-
* CSS selector for the editor wrapper element the handle is anchored to.
|
|
26
|
-
*
|
|
27
|
-
* Must match an ancestor of the ProseMirror editor DOM. The wrapper gets
|
|
28
|
-
* `position: relative` so the absolutely-positioned grip and drop indicator
|
|
29
|
-
* can be placed relative to it. Defaults to
|
|
30
|
-
* {@link DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR} so Content keeps working
|
|
31
|
-
* unchanged.
|
|
32
|
-
*/
|
|
33
|
-
wrapperSelector: string;
|
|
34
|
-
/**
|
|
35
|
-
* Optional source-side payload for a cross-editor block move. The editor doc
|
|
36
|
-
* carries ProseMirror node content, but app-owned side-map data (for example a
|
|
37
|
-
* plan `diagram` block's HTML/CSS) can live outside the doc; this lets the
|
|
38
|
-
* host carry that data to the receiving editor before the node is inserted.
|
|
39
|
-
*/
|
|
40
|
-
getDragTransferData?: (context: {
|
|
41
|
-
view: EditorView;
|
|
42
|
-
node: ProseMirrorNode;
|
|
43
|
-
pos: number;
|
|
44
|
-
}) => unknown;
|
|
45
|
-
/**
|
|
46
|
-
* Optional target-side receiver for cross-editor transfer data. Called before
|
|
47
|
-
* the node is inserted into the target editor so the target's serializer can
|
|
48
|
-
* resolve app-owned data during the synchronous ProseMirror update.
|
|
49
|
-
*/
|
|
50
|
-
receiveDragTransferData?: (
|
|
51
|
-
data: unknown,
|
|
52
|
-
context: {
|
|
53
|
-
view: EditorView;
|
|
54
|
-
node: ProseMirrorNode;
|
|
55
|
-
pos: number;
|
|
56
|
-
sourceView: EditorView;
|
|
57
|
-
},
|
|
58
|
-
) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Optional host-level drop handler for document-specific structure changes.
|
|
61
|
-
* Returning true tells the shared drag handle that the host fully handled the
|
|
62
|
-
* move and no ProseMirror insert/delete should run. This is used for
|
|
63
|
-
* Notion-style side drops where dropping a block to the left/right creates or
|
|
64
|
-
* inserts into a column layout rather than inserting into the target editor.
|
|
65
|
-
*/
|
|
66
|
-
handleDrop?: (data: unknown, context: DragHandleDropContext) => boolean;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const dragHandleKey = new PluginKey("dragHandle");
|
|
70
|
-
const HOVER_SIDE_OUTSET_REM = 8;
|
|
71
|
-
// Notion-style side drop: drag a block to a neighbour's LEFT/RIGHT region and it
|
|
72
|
-
// builds (or joins) a column layout instead of reordering. The activation region
|
|
73
|
-
// has to be GENEROUS or the gesture is dead for a real human — a natural drag
|
|
74
|
-
// releases somewhere over the block's body, nowhere near a thin edge sliver. The
|
|
75
|
-
// old values (28% of width, capped at 140px, AND only the vertical middle 60%)
|
|
76
|
-
// left a wide ~820px plan block with two ~17%-of-width edge slivers in a 35px-tall
|
|
77
|
-
// band as the ONLY column targets — ~66% of the block (the whole centre) plus the
|
|
78
|
-
// top/bottom only ever reordered, so "drag side by side" essentially never made
|
|
79
|
-
// columns. Now each side claims ~a third of the width across the FULL block
|
|
80
|
-
// height, with a middle band always preserved for before/after reorder.
|
|
81
|
-
const SIDE_DROP_ZONE_RATIO = 0.33;
|
|
82
|
-
const SIDE_DROP_ZONE_MIN_PX = 56;
|
|
83
|
-
const SIDE_DROP_ZONE_MAX_PX = 320;
|
|
84
|
-
// Never let the two side zones swallow the whole block: keep at least the middle
|
|
85
|
-
// ~10% of the width as the before/after reorder band so dropping over the centre
|
|
86
|
-
// still moves the block above/below the target (Notion keeps reorder reachable).
|
|
87
|
-
const SIDE_DROP_ZONE_MAX_WIDTH_FRACTION = 0.45;
|
|
88
|
-
const DRAG_HANDLE_MENU_STYLE_ID = "an-rich-md-drag-menu-styles";
|
|
89
|
-
const DRAG_HANDLE_MENU_WIDTH = 220;
|
|
90
|
-
const DRAG_HANDLE_MENU_GAP = 6;
|
|
91
|
-
const DRAG_HANDLE_MENU_VIEWPORT_PADDING = 8;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Wraps Tabler outline icon path data in the standard 24×24 stroke SVG so the
|
|
95
|
-
* DOM-based block menu renders the same icons the React UI uses (Tabler is the
|
|
96
|
-
* framework-wide icon set). The editor is plain DOM, not React, so we inline the
|
|
97
|
-
* markup instead of importing `@tabler/icons-react` components.
|
|
98
|
-
*/
|
|
99
|
-
const tablerIconSvg = (paths: string): string =>
|
|
100
|
-
`<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>`;
|
|
101
|
-
|
|
102
|
-
// Tabler `copy`, `trash`, and `plus` (outline). Path data copied verbatim from
|
|
103
|
-
// @tabler/icons so the glyphs stay pixel-identical to the React icon set.
|
|
104
|
-
const DRAG_HANDLE_MENU_ICON_DUPLICATE = tablerIconSvg(
|
|
105
|
-
'<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" />',
|
|
106
|
-
);
|
|
107
|
-
const DRAG_HANDLE_MENU_ICON_DELETE = tablerIconSvg(
|
|
108
|
-
'<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" />',
|
|
109
|
-
);
|
|
110
|
-
const DRAG_HANDLE_MENU_ICON_INSERT = tablerIconSvg(
|
|
111
|
-
'<path d="M12 5l0 14" /><path d="M5 12l14 0" />',
|
|
112
|
-
);
|
|
113
|
-
// Tabler `grip-vertical` (outline) for the left-margin drag grip.
|
|
114
|
-
const DRAG_HANDLE_GRIP_ICON = tablerIconSvg(
|
|
115
|
-
'<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" />',
|
|
116
|
-
);
|
|
117
|
-
|
|
118
|
-
type DropTarget = {
|
|
119
|
-
registration: DragHandleRegistration;
|
|
120
|
-
view: EditorView;
|
|
121
|
-
block: HTMLElement;
|
|
122
|
-
placement: DragHandleDropPlacement;
|
|
123
|
-
pos: number;
|
|
124
|
-
targetPos: number;
|
|
125
|
-
targetNodeSize: number;
|
|
126
|
-
rect: DOMRect;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export type DragHandleDropPlacement = "before" | "after" | "left" | "right";
|
|
130
|
-
|
|
131
|
-
export type DragHandleDropContext = {
|
|
132
|
-
view: EditorView;
|
|
133
|
-
sourceView: EditorView;
|
|
134
|
-
sourceNode: ProseMirrorNode;
|
|
135
|
-
sourcePos: number;
|
|
136
|
-
sourceNodeSize: number;
|
|
137
|
-
targetNode: ProseMirrorNode;
|
|
138
|
-
targetPos: number;
|
|
139
|
-
targetNodeSize: number;
|
|
140
|
-
insertPos: number;
|
|
141
|
-
placement: DragHandleDropPlacement;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
type DragSession = {
|
|
145
|
-
view: EditorView;
|
|
146
|
-
sourceBlock: HTMLElement;
|
|
147
|
-
sourcePos: number;
|
|
148
|
-
sourceNodeSize: number;
|
|
149
|
-
startX: number;
|
|
150
|
-
startY: number;
|
|
151
|
-
dragging: boolean;
|
|
152
|
-
preview: HTMLElement | null;
|
|
153
|
-
dropLine: HTMLElement | null;
|
|
154
|
-
dropTarget: DropTarget | null;
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
type HoverBlock = {
|
|
158
|
-
node: HTMLElement;
|
|
159
|
-
pmPos: number;
|
|
160
|
-
rect: DOMRect;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
type DragHandleMenuContext = {
|
|
164
|
-
view: EditorView;
|
|
165
|
-
sourceBlock: HTMLElement;
|
|
166
|
-
sourcePos: number;
|
|
167
|
-
sourceNodeSize: number;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
type DragHandleRegistration = {
|
|
171
|
-
view: EditorView;
|
|
172
|
-
wrapperSelector: string;
|
|
173
|
-
getDragTransferData?: DragHandleOptions["getDragTransferData"];
|
|
174
|
-
receiveDragTransferData?: DragHandleOptions["receiveDragTransferData"];
|
|
175
|
-
handleDrop?: DragHandleOptions["handleDrop"];
|
|
176
|
-
canHover?: () => boolean;
|
|
177
|
-
findHoverBlock?: (clientX: number, clientY: number) => HoverBlock | null;
|
|
178
|
-
showHoverBlock?: (block: HoverBlock) => void;
|
|
179
|
-
hideHover?: () => void;
|
|
180
|
-
/** The currently displayed grip's bounding rect, or null when hidden. */
|
|
181
|
-
gripRect?: () => DOMRect | null;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
const dragHandleRegistrations = new Set<DragHandleRegistration>();
|
|
185
|
-
let dragHandleGlobalHoverListeners = 0;
|
|
186
|
-
let activeDragRegistration: DragHandleRegistration | null = null;
|
|
187
|
-
// The registration whose grip is currently shown. Used to keep that grip alive
|
|
188
|
-
// while the cursor travels from a block's body to its grip, even when the grip
|
|
189
|
-
// sits in a contested gap (an inter-column gap or a tab body's left offset)
|
|
190
|
-
// where another editor's wide forgiving zone would otherwise re-win the hover
|
|
191
|
-
// and hide the grip out from under the approaching cursor.
|
|
192
|
-
let activeHoverRegistration: DragHandleRegistration | null = null;
|
|
193
|
-
|
|
194
|
-
const clamp = (value: number, min: number, max: number) =>
|
|
195
|
-
Math.min(Math.max(value, min), max);
|
|
196
|
-
|
|
197
|
-
const editorArea = (registration: DragHandleRegistration) => {
|
|
198
|
-
const rect = registration.view.dom.getBoundingClientRect();
|
|
199
|
-
return rect.width * rect.height;
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
const updateRegisteredHover = (clientX: number, clientY: number) => {
|
|
203
|
-
if (activeDragRegistration) {
|
|
204
|
-
for (const registration of dragHandleRegistrations) {
|
|
205
|
-
registration.hideHover?.();
|
|
206
|
-
}
|
|
207
|
-
activeHoverRegistration = null;
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const candidates: Array<{
|
|
212
|
-
registration: DragHandleRegistration;
|
|
213
|
-
block: HoverBlock;
|
|
214
|
-
}> = [];
|
|
215
|
-
|
|
216
|
-
for (const registration of dragHandleRegistrations) {
|
|
217
|
-
if (!registration.view.dom.isConnected || !registration.canHover?.()) {
|
|
218
|
-
registration.hideHover?.();
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
const block = registration.findHoverBlock?.(clientX, clientY);
|
|
222
|
-
if (block) {
|
|
223
|
-
candidates.push({ registration, block });
|
|
224
|
-
} else {
|
|
225
|
-
registration.hideHover?.();
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// Grip keepalive. Once a block's grip is showing, hold it while the cursor
|
|
230
|
-
// travels LEFT of that block's content toward its grip glyph — within the
|
|
231
|
-
// block's own vertical row and no further left than the glyph itself. This is
|
|
232
|
-
// what makes grips grabbable for blocks that are NOT flush with the page's
|
|
233
|
-
// left gutter (a right column, a tab body): their grip sits in a gap that the
|
|
234
|
-
// neighbour's wide forgiving zone also claims, so the normal picker would flip
|
|
235
|
-
// hover to the neighbour mid-approach and the grip would vanish before the
|
|
236
|
-
// cursor reaches it. The keepalive only bridges the body→grip gap — it does
|
|
237
|
-
// NOT fire while the cursor is over content (so the innermost/nested picking
|
|
238
|
-
// and gutter-grab rules below still decide there) and the row guard stops it
|
|
239
|
-
// from sticking the grip across vertical moves to another block's row.
|
|
240
|
-
if (activeHoverRegistration) {
|
|
241
|
-
const held = candidates.find(
|
|
242
|
-
(candidate) => candidate.registration === activeHoverRegistration,
|
|
243
|
-
);
|
|
244
|
-
const grip = activeHoverRegistration.gripRect?.();
|
|
245
|
-
if (
|
|
246
|
-
held &&
|
|
247
|
-
grip &&
|
|
248
|
-
clientY >= held.block.rect.top &&
|
|
249
|
-
clientY < held.block.rect.bottom &&
|
|
250
|
-
clientX >= grip.left - 4 &&
|
|
251
|
-
clientX < held.block.rect.left
|
|
252
|
-
) {
|
|
253
|
-
for (const registration of dragHandleRegistrations) {
|
|
254
|
-
if (registration !== held.registration) registration.hideHover?.();
|
|
255
|
-
}
|
|
256
|
-
held.registration.showHoverBlock?.(held.block);
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Pick which editor owns the grip when several register a hover block at this
|
|
262
|
-
// point. Nested region editors (e.g. each column inside a `columns` block) tile
|
|
263
|
-
// their container's whole footprint AND extend a wide forgiving zone
|
|
264
|
-
// (HOVER_SIDE_OUTSET_REM) into its left-margin gutter, so a pure
|
|
265
|
-
// "smallest editor wins" rule lets an inner block beat the container everywhere
|
|
266
|
-
// and leaves the container itself impossible to grab. Split candidates by where
|
|
267
|
-
// the cursor sits relative to each block:
|
|
268
|
-
// - Over a block's body (clientX at/after its left edge) the innermost
|
|
269
|
-
// (smallest) editor wins, so nested blocks stay grabbable from their content.
|
|
270
|
-
// - In the shared left-margin gutter (clientX left of every candidate's
|
|
271
|
-
// content, where the grip lives) the outermost (largest) editor wins, so the
|
|
272
|
-
// container block can be picked up and reordered.
|
|
273
|
-
// Prefer the candidate whose block actually sits UNDER the cursor
|
|
274
|
-
// horizontally. Without this, a left column's forgiving side zone reaches
|
|
275
|
-
// across the inter-column gap, ties the right column's editor on area, and
|
|
276
|
-
// wins — so hovering a right-column block shows the grip for the LEFT block
|
|
277
|
-
// (and right-column blocks appear to have no grip at all). `overContent`
|
|
278
|
-
// restricts to blocks the cursor is genuinely within; `rightOfLeftEdge` keeps
|
|
279
|
-
// the gutter-grab behaviour; fully left of every block → the container wins.
|
|
280
|
-
const overContent = candidates.filter(
|
|
281
|
-
(candidate) =>
|
|
282
|
-
clientX >= candidate.block.rect.left &&
|
|
283
|
-
clientX <= candidate.block.rect.right,
|
|
284
|
-
);
|
|
285
|
-
// The grip renders in a narrow band just LEFT of each block (≈24px). A block
|
|
286
|
-
// must OWN that band so moving the cursor onto its grip keeps showing (and
|
|
287
|
-
// lets you press) that block's grip — otherwise, for a column block whose grip
|
|
288
|
-
// sits in the gutter/inter-column gap, the "gutter → largest editor" rule
|
|
289
|
-
// below would flip the hover to the columns container and the grip would
|
|
290
|
-
// vanish out from under the cursor, making inner column blocks impossible to
|
|
291
|
-
// drag. The band is narrow, so it does not collide with the neighbouring
|
|
292
|
-
// column's content (the right column's grip lives in the inter-column gap,
|
|
293
|
-
// left of its own content but right of the left column's content).
|
|
294
|
-
const GRIP_HOVER_ZONE_PX = 28;
|
|
295
|
-
const overGrip = candidates.filter(
|
|
296
|
-
(candidate) =>
|
|
297
|
-
clientX >= candidate.block.rect.left - GRIP_HOVER_ZONE_PX &&
|
|
298
|
-
clientX < candidate.block.rect.left,
|
|
299
|
-
);
|
|
300
|
-
const rightOfLeftEdge = candidates.filter(
|
|
301
|
-
(candidate) => clientX >= candidate.block.rect.left,
|
|
302
|
-
);
|
|
303
|
-
let active: {
|
|
304
|
-
registration: DragHandleRegistration;
|
|
305
|
-
block: HoverBlock;
|
|
306
|
-
} | null;
|
|
307
|
-
const innerPool =
|
|
308
|
-
overContent.length > 0
|
|
309
|
-
? overContent
|
|
310
|
-
: overGrip.length > 0
|
|
311
|
-
? overGrip
|
|
312
|
-
: rightOfLeftEdge;
|
|
313
|
-
if (innerPool.length > 0) {
|
|
314
|
-
innerPool.sort(
|
|
315
|
-
(a, b) => editorArea(a.registration) - editorArea(b.registration),
|
|
316
|
-
);
|
|
317
|
-
active = innerPool[0];
|
|
318
|
-
} else {
|
|
319
|
-
candidates.sort(
|
|
320
|
-
(a, b) => editorArea(b.registration) - editorArea(a.registration),
|
|
321
|
-
);
|
|
322
|
-
active = candidates[0] ?? null;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
for (const registration of dragHandleRegistrations) {
|
|
326
|
-
if (registration !== active?.registration) registration.hideHover?.();
|
|
327
|
-
}
|
|
328
|
-
active?.registration.showHoverBlock?.(active.block);
|
|
329
|
-
activeHoverRegistration = active?.registration ?? null;
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
const handleGlobalHoverMove = (event: MouseEvent) => {
|
|
333
|
-
updateRegisteredHover(event.clientX, event.clientY);
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
const retainGlobalHoverListener = () => {
|
|
337
|
-
dragHandleGlobalHoverListeners += 1;
|
|
338
|
-
if (dragHandleGlobalHoverListeners === 1) {
|
|
339
|
-
document.addEventListener("mousemove", handleGlobalHoverMove);
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
const releaseGlobalHoverListener = () => {
|
|
344
|
-
dragHandleGlobalHoverListeners = Math.max(
|
|
345
|
-
0,
|
|
346
|
-
dragHandleGlobalHoverListeners - 1,
|
|
347
|
-
);
|
|
348
|
-
if (dragHandleGlobalHoverListeners === 0) {
|
|
349
|
-
document.removeEventListener("mousemove", handleGlobalHoverMove);
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
const ensureDragHandleMenuStyles = () => {
|
|
354
|
-
if (document.getElementById(DRAG_HANDLE_MENU_STYLE_ID)) return;
|
|
355
|
-
|
|
356
|
-
const style = document.createElement("style");
|
|
357
|
-
style.id = DRAG_HANDLE_MENU_STYLE_ID;
|
|
358
|
-
style.textContent = `
|
|
359
|
-
.an-rich-md-drag-menu {
|
|
360
|
-
position: fixed;
|
|
361
|
-
z-index: 9999;
|
|
362
|
-
width: ${DRAG_HANDLE_MENU_WIDTH}px;
|
|
363
|
-
padding: 4px;
|
|
364
|
-
border: 1px solid hsl(var(--border, 214.3 31.8% 91.4%));
|
|
365
|
-
border-radius: 7px;
|
|
366
|
-
background: hsl(var(--popover, 0 0% 100%));
|
|
367
|
-
color: hsl(var(--popover-foreground, var(--foreground, 222.2 84% 4.9%)));
|
|
368
|
-
box-shadow:
|
|
369
|
-
0 12px 32px rgb(15 23 42 / 0.16),
|
|
370
|
-
0 2px 8px rgb(15 23 42 / 0.08);
|
|
371
|
-
font-family: inherit;
|
|
372
|
-
font-size: 13px;
|
|
373
|
-
line-height: 1.35;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.an-rich-md-drag-menu__item {
|
|
377
|
-
display: flex;
|
|
378
|
-
width: 100%;
|
|
379
|
-
align-items: center;
|
|
380
|
-
gap: 9px;
|
|
381
|
-
border: 0;
|
|
382
|
-
border-radius: 5px;
|
|
383
|
-
background: transparent;
|
|
384
|
-
color: inherit;
|
|
385
|
-
cursor: pointer;
|
|
386
|
-
font: inherit;
|
|
387
|
-
letter-spacing: 0;
|
|
388
|
-
padding: 7px 8px;
|
|
389
|
-
text-align: left;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.an-rich-md-drag-menu__item:hover,
|
|
393
|
-
.an-rich-md-drag-menu__item:focus-visible {
|
|
394
|
-
background: hsl(var(--accent, 210 40% 96.1%));
|
|
395
|
-
color: hsl(var(--accent-foreground, var(--foreground, 222.2 84% 4.9%)));
|
|
396
|
-
outline: none;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.an-rich-md-drag-menu__item[data-danger="true"] {
|
|
400
|
-
color: hsl(var(--destructive, 0 84.2% 60.2%));
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.an-rich-md-drag-menu__item[data-danger="true"]:hover,
|
|
404
|
-
.an-rich-md-drag-menu__item[data-danger="true"]:focus-visible {
|
|
405
|
-
background: hsl(var(--destructive, 0 84.2% 60.2%) / 0.1);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.an-rich-md-drag-menu__icon {
|
|
409
|
-
display: flex;
|
|
410
|
-
flex: 0 0 auto;
|
|
411
|
-
align-items: center;
|
|
412
|
-
justify-content: center;
|
|
413
|
-
width: 18px;
|
|
414
|
-
height: 18px;
|
|
415
|
-
color: hsl(var(--muted-foreground, 215.4 16.3% 46.9%));
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.an-rich-md-drag-menu__item[data-danger="true"] .an-rich-md-drag-menu__icon {
|
|
419
|
-
color: currentColor;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.an-rich-md-drag-menu__icon svg {
|
|
423
|
-
width: 17px;
|
|
424
|
-
height: 17px;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.an-rich-md-drag-menu__label {
|
|
428
|
-
min-width: 0;
|
|
429
|
-
overflow: hidden;
|
|
430
|
-
text-overflow: ellipsis;
|
|
431
|
-
white-space: nowrap;
|
|
432
|
-
}
|
|
433
|
-
`;
|
|
434
|
-
document.head.appendChild(style);
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* App-agnostic Tiptap extension providing a Notion-style left-margin drag grip
|
|
439
|
-
* (the `::` handle), block selection, and drag-to-reorder over top-level block
|
|
440
|
-
* nodes.
|
|
441
|
-
*
|
|
442
|
-
* Behavior:
|
|
443
|
-
* - On hover over any top-level block, a `.drag-handle` grip appears in the left
|
|
444
|
-
* margin (forgiving hit zone extends {@link HOVER_SIDE_OUTSET_REM}rem to the
|
|
445
|
-
* sides and into the gap above/between blocks).
|
|
446
|
-
* - Single-clicking the grip selects the block and opens a block action menu.
|
|
447
|
-
* Dragging past a small threshold starts a reorder, showing a floating clone
|
|
448
|
-
* preview (`.notion-drag-preview`) and a `.notion-drop-indicator` line.
|
|
449
|
-
* `Escape` cancels.
|
|
450
|
-
* - While dragging, the source block carries `.notion-block--dragging` and the
|
|
451
|
-
* document element carries `.notion-editor-is-dragging` so apps can style the
|
|
452
|
-
* in-flight state. Apps own all of these CSS class names.
|
|
453
|
-
* - Works for ANY top-level node ProseMirror renders as a direct child of the
|
|
454
|
-
* editor — including `group: "block"`, `draggable: true` atoms such as the
|
|
455
|
-
* plan editor's `planBlock`.
|
|
456
|
-
*
|
|
457
|
-
* The only app-specific coupling — the editor wrapper element the handle and
|
|
458
|
-
* drop indicator are anchored to — is configurable via
|
|
459
|
-
* {@link DragHandleOptions.wrapperSelector}, defaulting to
|
|
460
|
-
* {@link DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR} (`.visual-editor-wrapper`) so the
|
|
461
|
-
* Content editor keeps working byte-identically. The plan editor passes its own
|
|
462
|
-
* wrapper selector via `DragHandle.configure({ wrapperSelector })`.
|
|
463
|
-
*/
|
|
464
|
-
export const DragHandle = Extension.create<DragHandleOptions>({
|
|
465
|
-
name: "dragHandle",
|
|
466
|
-
|
|
467
|
-
addOptions() {
|
|
468
|
-
return {
|
|
469
|
-
wrapperSelector: DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR,
|
|
470
|
-
getDragTransferData: undefined,
|
|
471
|
-
receiveDragTransferData: undefined,
|
|
472
|
-
};
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
addProseMirrorPlugins() {
|
|
476
|
-
const editor = this.editor;
|
|
477
|
-
const wrapperSelector = this.options.wrapperSelector;
|
|
478
|
-
const getDragTransferData = this.options.getDragTransferData;
|
|
479
|
-
const receiveDragTransferData = this.options.receiveDragTransferData;
|
|
480
|
-
const handleDrop = this.options.handleDrop;
|
|
481
|
-
let handle: HTMLElement | null = null;
|
|
482
|
-
let menu: HTMLElement | null = null;
|
|
483
|
-
let menuContext: DragHandleMenuContext | null = null;
|
|
484
|
-
let currentBlock: HTMLElement | null = null;
|
|
485
|
-
let dragStartPos: number | null = null;
|
|
486
|
-
let dragSession: DragSession | null = null;
|
|
487
|
-
let currentRegistration: DragHandleRegistration | null = null;
|
|
488
|
-
|
|
489
|
-
const getHoverSideOutset = () => {
|
|
490
|
-
const rootFontSize = Number.parseFloat(
|
|
491
|
-
getComputedStyle(document.documentElement).fontSize,
|
|
492
|
-
);
|
|
493
|
-
return (
|
|
494
|
-
(Number.isFinite(rootFontSize) ? rootFontSize : 16) *
|
|
495
|
-
HOVER_SIDE_OUTSET_REM
|
|
496
|
-
);
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
const getTopLevelBlocks = (editorView: EditorView): HoverBlock[] => {
|
|
500
|
-
const blocks: HoverBlock[] = [];
|
|
501
|
-
|
|
502
|
-
editorView.state.doc.forEach((_node, offset) => {
|
|
503
|
-
const dom = editorView.nodeDOM(offset);
|
|
504
|
-
if (!(dom instanceof HTMLElement)) return;
|
|
505
|
-
|
|
506
|
-
blocks.push({
|
|
507
|
-
node: dom,
|
|
508
|
-
pmPos: offset,
|
|
509
|
-
rect: dom.getBoundingClientRect(),
|
|
510
|
-
});
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
return blocks;
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
const registrationForView = (
|
|
517
|
-
editorView: EditorView,
|
|
518
|
-
): DragHandleRegistration | null => {
|
|
519
|
-
for (const registration of dragHandleRegistrations) {
|
|
520
|
-
if (registration.view === editorView) return registration;
|
|
521
|
-
}
|
|
522
|
-
return null;
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
const findForgivingBlock = (
|
|
526
|
-
editorView: EditorView,
|
|
527
|
-
clientX: number,
|
|
528
|
-
clientY: number,
|
|
529
|
-
): HoverBlock | null => {
|
|
530
|
-
const blocks = getTopLevelBlocks(editorView);
|
|
531
|
-
if (blocks.length === 0) return null;
|
|
532
|
-
|
|
533
|
-
const sideOutset = getHoverSideOutset();
|
|
534
|
-
const pageLeft = 0;
|
|
535
|
-
const pageRight = window.visualViewport?.width ?? window.innerWidth;
|
|
536
|
-
|
|
537
|
-
for (let index = 0; index < blocks.length; index++) {
|
|
538
|
-
const block = blocks[index];
|
|
539
|
-
const nextBlock = blocks[index + 1];
|
|
540
|
-
const blockBottomGap = nextBlock
|
|
541
|
-
? Math.max(0, nextBlock.rect.top - block.rect.bottom)
|
|
542
|
-
: 0;
|
|
543
|
-
const zoneLeft = Math.max(pageLeft, block.rect.left - sideOutset);
|
|
544
|
-
const zoneRight = Math.min(pageRight, block.rect.right + sideOutset);
|
|
545
|
-
const zoneTop =
|
|
546
|
-
index === 0
|
|
547
|
-
? Math.max(0, block.rect.top - blockBottomGap)
|
|
548
|
-
: block.rect.top;
|
|
549
|
-
const zoneBottom = nextBlock ? nextBlock.rect.top : block.rect.bottom;
|
|
550
|
-
|
|
551
|
-
if (
|
|
552
|
-
clientX >= zoneLeft &&
|
|
553
|
-
clientX <= zoneRight &&
|
|
554
|
-
clientY >= zoneTop &&
|
|
555
|
-
clientY < zoneBottom
|
|
556
|
-
) {
|
|
557
|
-
return block;
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
return null;
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
const showHandleForBlock = (editorView: EditorView, block: HoverBlock) => {
|
|
565
|
-
if (!handle) return;
|
|
566
|
-
currentBlock = block.node;
|
|
567
|
-
dragStartPos = block.pmPos;
|
|
568
|
-
|
|
569
|
-
const wrapper = editorView.dom.closest(wrapperSelector);
|
|
570
|
-
if (!wrapper) return;
|
|
571
|
-
|
|
572
|
-
// Lazily (re)attach the grip the first time a wrapper is actually
|
|
573
|
-
// available. At plugin `view()` init the editor DOM may not yet be mounted
|
|
574
|
-
// inside the wrapper (React mounts `EditorContent` after the EditorView is
|
|
575
|
-
// constructed), so the init-time append can silently no-op and leave the
|
|
576
|
-
// grip orphaned. Re-home it here once the wrapper exists.
|
|
577
|
-
if (handle.parentElement !== wrapper) {
|
|
578
|
-
(wrapper as HTMLElement).style.position = "relative";
|
|
579
|
-
wrapper.appendChild(handle);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
const wrapperRect = wrapper.getBoundingClientRect();
|
|
583
|
-
const handleLeft = block.rect.left - wrapperRect.left - 24;
|
|
584
|
-
|
|
585
|
-
handle.style.display = "flex";
|
|
586
|
-
handle.style.top = `${block.rect.top - wrapperRect.top + 2}px`;
|
|
587
|
-
handle.style.left = `${handleLeft}px`;
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
const selectBlockAt = (editorView: EditorView, pos: number) => {
|
|
591
|
-
try {
|
|
592
|
-
const sel = NodeSelection.create(editorView.state.doc, pos);
|
|
593
|
-
editorView.dispatch(editorView.state.tr.setSelection(sel));
|
|
594
|
-
editorView.focus();
|
|
595
|
-
return sel;
|
|
596
|
-
} catch {
|
|
597
|
-
return null;
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
const cleanupDragVisuals = () => {
|
|
602
|
-
dragSession?.preview?.remove();
|
|
603
|
-
dragSession?.dropLine?.remove();
|
|
604
|
-
dragSession?.sourceBlock.classList.remove("notion-block--dragging");
|
|
605
|
-
document.documentElement.classList.remove("notion-editor-is-dragging");
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
const createDragPreview = (block: HTMLElement): HTMLElement => {
|
|
609
|
-
const blockRect = block.getBoundingClientRect();
|
|
610
|
-
const preview = document.createElement("div");
|
|
611
|
-
const clone = block.cloneNode(true) as HTMLElement;
|
|
612
|
-
|
|
613
|
-
clone.classList.remove(
|
|
614
|
-
"ProseMirror-selectednode",
|
|
615
|
-
"notion-block--dragging",
|
|
616
|
-
);
|
|
617
|
-
clone.removeAttribute("contenteditable");
|
|
618
|
-
clone.style.background = "transparent";
|
|
619
|
-
clone.style.backgroundColor = "transparent";
|
|
620
|
-
clone.querySelectorAll("[contenteditable]").forEach((node) => {
|
|
621
|
-
node.removeAttribute("contenteditable");
|
|
622
|
-
});
|
|
623
|
-
clone.querySelectorAll<HTMLElement>("*").forEach((node) => {
|
|
624
|
-
node.style.background = "transparent";
|
|
625
|
-
node.style.backgroundColor = "transparent";
|
|
626
|
-
});
|
|
627
|
-
|
|
628
|
-
preview.className = "notion-drag-preview";
|
|
629
|
-
preview.style.width = `${blockRect.width}px`;
|
|
630
|
-
preview.appendChild(clone);
|
|
631
|
-
document.body.appendChild(preview);
|
|
632
|
-
|
|
633
|
-
return preview;
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
const createDropLine = (
|
|
637
|
-
registration: DragHandleRegistration,
|
|
638
|
-
): HTMLElement | null => {
|
|
639
|
-
const wrapper = registration.view.dom.closest(
|
|
640
|
-
registration.wrapperSelector,
|
|
641
|
-
);
|
|
642
|
-
if (!wrapper) return null;
|
|
643
|
-
|
|
644
|
-
const line = document.createElement("div");
|
|
645
|
-
line.className = "notion-drop-indicator";
|
|
646
|
-
wrapper.appendChild(line);
|
|
647
|
-
return line;
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
const forceHideHandle = () => {
|
|
651
|
-
if (handle) {
|
|
652
|
-
handle.style.display = "none";
|
|
653
|
-
handle.setAttribute("aria-expanded", "false");
|
|
654
|
-
}
|
|
655
|
-
currentBlock = null;
|
|
656
|
-
dragStartPos = null;
|
|
657
|
-
};
|
|
658
|
-
|
|
659
|
-
const closeMenu = ({ hideGrip = false }: { hideGrip?: boolean } = {}) => {
|
|
660
|
-
menu?.remove();
|
|
661
|
-
menu = null;
|
|
662
|
-
menuContext = null;
|
|
663
|
-
handle?.setAttribute("aria-expanded", "false");
|
|
664
|
-
document.removeEventListener("mousedown", handleMenuDocumentMouseDown, {
|
|
665
|
-
capture: true,
|
|
666
|
-
});
|
|
667
|
-
document.removeEventListener("keydown", handleMenuKeyDown, {
|
|
668
|
-
capture: true,
|
|
669
|
-
});
|
|
670
|
-
window.removeEventListener("resize", handleMenuViewportChange);
|
|
671
|
-
window.removeEventListener("scroll", handleMenuViewportChange, {
|
|
672
|
-
capture: true,
|
|
673
|
-
});
|
|
674
|
-
if (hideGrip) forceHideHandle();
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
const resolveMenuContext = (context: DragHandleMenuContext) => {
|
|
678
|
-
const latestBlock = getTopLevelBlocks(context.view).find(
|
|
679
|
-
(block) => block.node === context.sourceBlock,
|
|
680
|
-
);
|
|
681
|
-
const sourcePos = latestBlock?.pmPos ?? context.sourcePos;
|
|
682
|
-
const sourceNode = context.view.state.doc.nodeAt(sourcePos);
|
|
683
|
-
if (!sourceNode) return null;
|
|
684
|
-
|
|
685
|
-
return {
|
|
686
|
-
...context,
|
|
687
|
-
sourcePos,
|
|
688
|
-
sourceNode,
|
|
689
|
-
sourceNodeSize: sourceNode.nodeSize,
|
|
690
|
-
};
|
|
691
|
-
};
|
|
692
|
-
|
|
693
|
-
const focusSelectionNear = (
|
|
694
|
-
view: EditorView,
|
|
695
|
-
tr: Transaction,
|
|
696
|
-
pos: number,
|
|
697
|
-
bias: -1 | 1,
|
|
698
|
-
) => {
|
|
699
|
-
tr.setSelection(
|
|
700
|
-
TextSelection.near(
|
|
701
|
-
tr.doc.resolve(clamp(pos, 0, tr.doc.content.size)),
|
|
702
|
-
bias,
|
|
703
|
-
),
|
|
704
|
-
);
|
|
705
|
-
view.dispatch(tr.scrollIntoView());
|
|
706
|
-
view.focus();
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
const duplicateBlock = (context: DragHandleMenuContext) => {
|
|
710
|
-
const resolved = resolveMenuContext(context);
|
|
711
|
-
if (!resolved) return;
|
|
712
|
-
|
|
713
|
-
const insertPos = resolved.sourcePos + resolved.sourceNodeSize;
|
|
714
|
-
const tr = resolved.view.state.tr.insert(insertPos, resolved.sourceNode);
|
|
715
|
-
|
|
716
|
-
try {
|
|
717
|
-
tr.setSelection(NodeSelection.create(tr.doc, insertPos));
|
|
718
|
-
resolved.view.dispatch(tr.scrollIntoView());
|
|
719
|
-
resolved.view.focus();
|
|
720
|
-
} catch {
|
|
721
|
-
focusSelectionNear(resolved.view, tr, insertPos, 1);
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
const deleteBlock = (context: DragHandleMenuContext) => {
|
|
726
|
-
const resolved = resolveMenuContext(context);
|
|
727
|
-
if (!resolved) return;
|
|
728
|
-
|
|
729
|
-
const { view, sourcePos, sourceNodeSize } = resolved;
|
|
730
|
-
const paragraph = view.state.schema.nodes.paragraph;
|
|
731
|
-
const sourceEnd = sourcePos + sourceNodeSize;
|
|
732
|
-
|
|
733
|
-
if (view.state.doc.childCount <= 1 && paragraph) {
|
|
734
|
-
const replacement = paragraph.createAndFill() ?? paragraph.create();
|
|
735
|
-
const tr = view.state.tr.replaceWith(sourcePos, sourceEnd, replacement);
|
|
736
|
-
focusSelectionNear(view, tr, sourcePos + 1, 1);
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
const tr = view.state.tr.delete(sourcePos, sourceEnd);
|
|
741
|
-
const selectionBias = sourcePos >= tr.doc.content.size ? -1 : 1;
|
|
742
|
-
focusSelectionNear(view, tr, sourcePos, selectionBias);
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
const insertParagraphBelow = (context: DragHandleMenuContext) => {
|
|
746
|
-
const resolved = resolveMenuContext(context);
|
|
747
|
-
const paragraph = resolved?.view.state.schema.nodes.paragraph;
|
|
748
|
-
if (!resolved || !paragraph) return;
|
|
749
|
-
|
|
750
|
-
const insertPos = resolved.sourcePos + resolved.sourceNodeSize;
|
|
751
|
-
const paragraphNode = paragraph.createAndFill() ?? paragraph.create();
|
|
752
|
-
const tr = resolved.view.state.tr.insert(insertPos, paragraphNode);
|
|
753
|
-
tr.setSelection(TextSelection.create(tr.doc, insertPos + 1));
|
|
754
|
-
resolved.view.dispatch(tr.scrollIntoView());
|
|
755
|
-
resolved.view.focus();
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
const positionMenu = (anchorRect: DOMRect) => {
|
|
759
|
-
if (!menu) return;
|
|
760
|
-
|
|
761
|
-
const viewportWidth = window.visualViewport?.width ?? window.innerWidth;
|
|
762
|
-
const viewportHeight =
|
|
763
|
-
window.visualViewport?.height ?? window.innerHeight;
|
|
764
|
-
const menuHeight = menu.offsetHeight || 118;
|
|
765
|
-
const preferredLeft = anchorRect.right + DRAG_HANDLE_MENU_GAP;
|
|
766
|
-
const alternateLeft =
|
|
767
|
-
anchorRect.left - DRAG_HANDLE_MENU_WIDTH - DRAG_HANDLE_MENU_GAP;
|
|
768
|
-
const left =
|
|
769
|
-
preferredLeft +
|
|
770
|
-
DRAG_HANDLE_MENU_WIDTH +
|
|
771
|
-
DRAG_HANDLE_MENU_VIEWPORT_PADDING <=
|
|
772
|
-
viewportWidth
|
|
773
|
-
? preferredLeft
|
|
774
|
-
: alternateLeft;
|
|
775
|
-
|
|
776
|
-
menu.style.left = `${clamp(
|
|
777
|
-
left,
|
|
778
|
-
DRAG_HANDLE_MENU_VIEWPORT_PADDING,
|
|
779
|
-
viewportWidth -
|
|
780
|
-
DRAG_HANDLE_MENU_WIDTH -
|
|
781
|
-
DRAG_HANDLE_MENU_VIEWPORT_PADDING,
|
|
782
|
-
)}px`;
|
|
783
|
-
menu.style.top = `${clamp(
|
|
784
|
-
anchorRect.top - 4,
|
|
785
|
-
DRAG_HANDLE_MENU_VIEWPORT_PADDING,
|
|
786
|
-
viewportHeight - menuHeight - DRAG_HANDLE_MENU_VIEWPORT_PADDING,
|
|
787
|
-
)}px`;
|
|
788
|
-
};
|
|
789
|
-
|
|
790
|
-
const createMenuItem = (
|
|
791
|
-
label: string,
|
|
792
|
-
iconSvg: string,
|
|
793
|
-
action: (context: DragHandleMenuContext) => void,
|
|
794
|
-
options: { danger?: boolean } = {},
|
|
795
|
-
) => {
|
|
796
|
-
const button = document.createElement("button");
|
|
797
|
-
button.type = "button";
|
|
798
|
-
button.className = "an-rich-md-drag-menu__item";
|
|
799
|
-
button.setAttribute("role", "menuitem");
|
|
800
|
-
button.setAttribute("data-plan-interactive", "true");
|
|
801
|
-
if (options.danger) button.setAttribute("data-danger", "true");
|
|
802
|
-
|
|
803
|
-
const icon = document.createElement("span");
|
|
804
|
-
icon.className = "an-rich-md-drag-menu__icon";
|
|
805
|
-
icon.setAttribute("aria-hidden", "true");
|
|
806
|
-
icon.innerHTML = iconSvg;
|
|
807
|
-
|
|
808
|
-
const labelElement = document.createElement("span");
|
|
809
|
-
labelElement.className = "an-rich-md-drag-menu__label";
|
|
810
|
-
labelElement.textContent = label;
|
|
811
|
-
|
|
812
|
-
button.append(icon, labelElement);
|
|
813
|
-
button.addEventListener("mousedown", (event) => {
|
|
814
|
-
event.preventDefault();
|
|
815
|
-
});
|
|
816
|
-
button.addEventListener("click", (event) => {
|
|
817
|
-
event.preventDefault();
|
|
818
|
-
event.stopPropagation();
|
|
819
|
-
const context = menuContext;
|
|
820
|
-
if (!context) return;
|
|
821
|
-
closeMenu({ hideGrip: true });
|
|
822
|
-
action(context);
|
|
823
|
-
});
|
|
824
|
-
|
|
825
|
-
return button;
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
const openMenu = (context: DragHandleMenuContext, anchorRect: DOMRect) => {
|
|
829
|
-
const resolved = resolveMenuContext(context);
|
|
830
|
-
if (!resolved) return;
|
|
831
|
-
|
|
832
|
-
closeMenu();
|
|
833
|
-
selectBlockAt(resolved.view, resolved.sourcePos);
|
|
834
|
-
ensureDragHandleMenuStyles();
|
|
835
|
-
|
|
836
|
-
const el = document.createElement("div");
|
|
837
|
-
el.className = "an-rich-md-drag-menu";
|
|
838
|
-
el.setAttribute("role", "menu");
|
|
839
|
-
el.setAttribute("aria-label", "Block actions");
|
|
840
|
-
el.setAttribute("data-plan-interactive", "true");
|
|
841
|
-
|
|
842
|
-
el.append(
|
|
843
|
-
createMenuItem(
|
|
844
|
-
"Duplicate",
|
|
845
|
-
DRAG_HANDLE_MENU_ICON_DUPLICATE,
|
|
846
|
-
duplicateBlock,
|
|
847
|
-
),
|
|
848
|
-
createMenuItem("Delete", DRAG_HANDLE_MENU_ICON_DELETE, deleteBlock, {
|
|
849
|
-
danger: true,
|
|
850
|
-
}),
|
|
851
|
-
createMenuItem(
|
|
852
|
-
"Insert block below",
|
|
853
|
-
DRAG_HANDLE_MENU_ICON_INSERT,
|
|
854
|
-
insertParagraphBelow,
|
|
855
|
-
),
|
|
856
|
-
);
|
|
857
|
-
|
|
858
|
-
menu = el;
|
|
859
|
-
menuContext = {
|
|
860
|
-
view: resolved.view,
|
|
861
|
-
sourceBlock: resolved.sourceBlock,
|
|
862
|
-
sourcePos: resolved.sourcePos,
|
|
863
|
-
sourceNodeSize: resolved.sourceNodeSize,
|
|
864
|
-
};
|
|
865
|
-
document.body.appendChild(el);
|
|
866
|
-
positionMenu(anchorRect);
|
|
867
|
-
handle?.setAttribute("aria-expanded", "true");
|
|
868
|
-
document.addEventListener("mousedown", handleMenuDocumentMouseDown, {
|
|
869
|
-
capture: true,
|
|
870
|
-
});
|
|
871
|
-
document.addEventListener("keydown", handleMenuKeyDown, {
|
|
872
|
-
capture: true,
|
|
873
|
-
});
|
|
874
|
-
window.addEventListener("resize", handleMenuViewportChange);
|
|
875
|
-
window.addEventListener("scroll", handleMenuViewportChange, {
|
|
876
|
-
capture: true,
|
|
877
|
-
});
|
|
878
|
-
|
|
879
|
-
el.querySelector<HTMLButtonElement>("button")?.focus({
|
|
880
|
-
preventScroll: true,
|
|
881
|
-
});
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
const findDropTarget = (
|
|
885
|
-
registration: DragHandleRegistration,
|
|
886
|
-
clientX: number,
|
|
887
|
-
clientY: number,
|
|
888
|
-
): DropTarget | null => {
|
|
889
|
-
const view = registration.view;
|
|
890
|
-
const block = findForgivingBlock(view, clientX, clientY);
|
|
891
|
-
if (!block) return null;
|
|
892
|
-
|
|
893
|
-
const node = view.state.doc.nodeAt(block.pmPos);
|
|
894
|
-
if (!node) return null;
|
|
895
|
-
|
|
896
|
-
let placement: DragHandleDropPlacement;
|
|
897
|
-
const withinBlockY =
|
|
898
|
-
clientY >= block.rect.top && clientY <= block.rect.bottom;
|
|
899
|
-
// Side (column) zones span the FULL block height — only the horizontal
|
|
900
|
-
// position decides column-vs-reorder. Restricting to the vertical middle
|
|
901
|
-
// (the old 0.2 band) made the already-tiny edge slivers nearly unhittable.
|
|
902
|
-
const sideZoneWidth = Math.min(
|
|
903
|
-
clamp(
|
|
904
|
-
block.rect.width * SIDE_DROP_ZONE_RATIO,
|
|
905
|
-
SIDE_DROP_ZONE_MIN_PX,
|
|
906
|
-
SIDE_DROP_ZONE_MAX_PX,
|
|
907
|
-
),
|
|
908
|
-
block.rect.width * SIDE_DROP_ZONE_MAX_WIDTH_FRACTION,
|
|
909
|
-
);
|
|
910
|
-
|
|
911
|
-
if (
|
|
912
|
-
registration.handleDrop &&
|
|
913
|
-
withinBlockY &&
|
|
914
|
-
clientX <= block.rect.left + sideZoneWidth
|
|
915
|
-
) {
|
|
916
|
-
placement = "left";
|
|
917
|
-
} else if (
|
|
918
|
-
registration.handleDrop &&
|
|
919
|
-
withinBlockY &&
|
|
920
|
-
clientX >= block.rect.right - sideZoneWidth
|
|
921
|
-
) {
|
|
922
|
-
placement = "right";
|
|
923
|
-
} else {
|
|
924
|
-
placement =
|
|
925
|
-
clientY < block.rect.top ||
|
|
926
|
-
(clientY <= block.rect.bottom &&
|
|
927
|
-
clientY < block.rect.top + block.rect.height / 2)
|
|
928
|
-
? "before"
|
|
929
|
-
: "after";
|
|
930
|
-
}
|
|
931
|
-
const before = placement === "before" || placement === "left";
|
|
932
|
-
|
|
933
|
-
return {
|
|
934
|
-
registration,
|
|
935
|
-
view,
|
|
936
|
-
block: block.node,
|
|
937
|
-
placement,
|
|
938
|
-
pos: before ? block.pmPos : block.pmPos + node.nodeSize,
|
|
939
|
-
targetPos: block.pmPos,
|
|
940
|
-
targetNodeSize: node.nodeSize,
|
|
941
|
-
rect: block.rect,
|
|
942
|
-
};
|
|
943
|
-
};
|
|
944
|
-
|
|
945
|
-
const findAnyDropTarget = (
|
|
946
|
-
session: DragSession,
|
|
947
|
-
clientX: number,
|
|
948
|
-
clientY: number,
|
|
949
|
-
): DropTarget | null => {
|
|
950
|
-
const candidates: DropTarget[] = [];
|
|
951
|
-
|
|
952
|
-
for (const registration of dragHandleRegistrations) {
|
|
953
|
-
if (!registration.view.dom.isConnected) continue;
|
|
954
|
-
if (
|
|
955
|
-
registration.view !== session.view &&
|
|
956
|
-
session.sourceBlock.contains(registration.view.dom)
|
|
957
|
-
) {
|
|
958
|
-
continue;
|
|
959
|
-
}
|
|
960
|
-
const target = findDropTarget(registration, clientX, clientY);
|
|
961
|
-
if (target) candidates.push(target);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
candidates.sort((a, b) => {
|
|
965
|
-
const aRect = a.view.dom.getBoundingClientRect();
|
|
966
|
-
const bRect = b.view.dom.getBoundingClientRect();
|
|
967
|
-
return aRect.width * aRect.height - bRect.width * bRect.height;
|
|
968
|
-
});
|
|
969
|
-
|
|
970
|
-
return candidates[0] ?? null;
|
|
971
|
-
};
|
|
972
|
-
|
|
973
|
-
const positionDragPreview = (
|
|
974
|
-
session: DragSession,
|
|
975
|
-
clientX: number,
|
|
976
|
-
clientY: number,
|
|
977
|
-
) => {
|
|
978
|
-
if (!session.preview) return;
|
|
979
|
-
|
|
980
|
-
session.preview.style.transform = `translate3d(${clientX + 12}px, ${clientY + 10}px, 0)`;
|
|
981
|
-
};
|
|
982
|
-
|
|
983
|
-
const updateDropLine = (
|
|
984
|
-
session: DragSession,
|
|
985
|
-
target: DropTarget | null,
|
|
986
|
-
) => {
|
|
987
|
-
const sourceEnd = session.sourcePos + session.sourceNodeSize;
|
|
988
|
-
const isSideDrop =
|
|
989
|
-
target?.placement === "left" || target?.placement === "right";
|
|
990
|
-
if (
|
|
991
|
-
!target ||
|
|
992
|
-
(target.view === session.view &&
|
|
993
|
-
(isSideDrop
|
|
994
|
-
? // A side drop only ever builds columns; the ProseMirror seam
|
|
995
|
-
// position is irrelevant. The only no-op is dropping a block on
|
|
996
|
-
// ITS OWN side — adjacent *different* blocks must still form
|
|
997
|
-
// columns (otherwise dropping onto an immediate neighbour's
|
|
998
|
-
// facing edge silently does nothing, which reads as "side drop
|
|
999
|
-
// works sometimes").
|
|
1000
|
-
target.targetPos === session.sourcePos
|
|
1001
|
-
: target.pos === session.sourcePos ||
|
|
1002
|
-
target.pos === sourceEnd ||
|
|
1003
|
-
(target.pos > session.sourcePos && target.pos < sourceEnd)))
|
|
1004
|
-
) {
|
|
1005
|
-
session.dropTarget = null;
|
|
1006
|
-
session.dropLine?.remove();
|
|
1007
|
-
session.dropLine = null;
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
const wrapper = target.view.dom.closest(
|
|
1012
|
-
target.registration.wrapperSelector,
|
|
1013
|
-
);
|
|
1014
|
-
if (!wrapper) return;
|
|
1015
|
-
|
|
1016
|
-
if (!session.dropLine || session.dropLine.parentElement !== wrapper) {
|
|
1017
|
-
session.dropLine?.remove();
|
|
1018
|
-
session.dropLine = createDropLine(target.registration);
|
|
1019
|
-
}
|
|
1020
|
-
if (!session.dropLine) return;
|
|
1021
|
-
|
|
1022
|
-
const wrapperRect = wrapper.getBoundingClientRect();
|
|
1023
|
-
const editorRect = target.view.dom.getBoundingClientRect();
|
|
1024
|
-
|
|
1025
|
-
session.dropTarget = target;
|
|
1026
|
-
// A column (side) drop and a reorder (before/after) drop both draw the
|
|
1027
|
-
// `.notion-drop-indicator`, but they mean very different things, so the
|
|
1028
|
-
// column case carries a modifier class apps style distinctly (a bolder,
|
|
1029
|
-
// glowing vertical bar) — without a clear cue a human can't tell they've
|
|
1030
|
-
// entered column-build mode before releasing.
|
|
1031
|
-
const isColumnDrop =
|
|
1032
|
-
target.placement === "left" || target.placement === "right";
|
|
1033
|
-
session.dropLine.classList.toggle(
|
|
1034
|
-
"notion-drop-indicator--column",
|
|
1035
|
-
isColumnDrop,
|
|
1036
|
-
);
|
|
1037
|
-
if (isColumnDrop) {
|
|
1038
|
-
// A vertical bar centred on the seam at the target's left/right edge,
|
|
1039
|
-
// spanning the block's full height.
|
|
1040
|
-
const SIDE_BAR_WIDTH = 4;
|
|
1041
|
-
const seam =
|
|
1042
|
-
target.placement === "left" ? target.rect.left : target.rect.right;
|
|
1043
|
-
session.dropLine.style.left = `${seam - wrapperRect.left - SIDE_BAR_WIDTH / 2}px`;
|
|
1044
|
-
session.dropLine.style.top = `${target.rect.top - wrapperRect.top}px`;
|
|
1045
|
-
session.dropLine.style.width = `${SIDE_BAR_WIDTH}px`;
|
|
1046
|
-
session.dropLine.style.height = `${target.rect.height}px`;
|
|
1047
|
-
return;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
const top =
|
|
1051
|
-
target.placement === "before" ? target.rect.top : target.rect.bottom;
|
|
1052
|
-
session.dropLine.style.left = `${editorRect.left - wrapperRect.left}px`;
|
|
1053
|
-
session.dropLine.style.top = `${top - wrapperRect.top}px`;
|
|
1054
|
-
session.dropLine.style.width = `${editorRect.width}px`;
|
|
1055
|
-
session.dropLine.style.height = "3px";
|
|
1056
|
-
};
|
|
1057
|
-
|
|
1058
|
-
const createHandle = () => {
|
|
1059
|
-
const el = document.createElement("div");
|
|
1060
|
-
el.className = "drag-handle";
|
|
1061
|
-
el.contentEditable = "false";
|
|
1062
|
-
el.draggable = false;
|
|
1063
|
-
el.tabIndex = 0;
|
|
1064
|
-
el.setAttribute("role", "button");
|
|
1065
|
-
el.setAttribute("aria-label", "Open block menu or drag to reorder");
|
|
1066
|
-
el.setAttribute("aria-haspopup", "menu");
|
|
1067
|
-
el.setAttribute("aria-expanded", "false");
|
|
1068
|
-
el.title = "Open block menu or drag to reorder";
|
|
1069
|
-
// The icon must not be its own hit target: a real mouse-down inside a
|
|
1070
|
-
// nested editor (a column) lands on the SVG, and a container block's
|
|
1071
|
-
// capture-phase block-select handler (RegistryBlockNode) only spares the
|
|
1072
|
-
// grip DIV — so a press on the icon gets swallowed and the block can't be
|
|
1073
|
-
// dragged out of / between columns. `pointer-events:none` makes every
|
|
1074
|
-
// press in the grip area resolve to the DIV instead.
|
|
1075
|
-
// Tabler `grip-vertical` (the framework-wide icon set). `pointer-events:none`
|
|
1076
|
-
// keeps every press in the grip area resolving to the DIV, not the SVG.
|
|
1077
|
-
el.innerHTML = DRAG_HANDLE_GRIP_ICON;
|
|
1078
|
-
const gripSvg = el.querySelector("svg");
|
|
1079
|
-
if (gripSvg) {
|
|
1080
|
-
gripSvg.setAttribute("width", "16");
|
|
1081
|
-
gripSvg.setAttribute("height", "16");
|
|
1082
|
-
gripSvg.style.pointerEvents = "none";
|
|
1083
|
-
}
|
|
1084
|
-
return el;
|
|
1085
|
-
};
|
|
1086
|
-
|
|
1087
|
-
const hideHandle = () => {
|
|
1088
|
-
if (menu) return;
|
|
1089
|
-
forceHideHandle();
|
|
1090
|
-
};
|
|
1091
|
-
|
|
1092
|
-
const removeDragListeners = () => {
|
|
1093
|
-
document.removeEventListener("mousemove", handleDocumentMouseMove);
|
|
1094
|
-
document.removeEventListener("mouseup", handleDocumentMouseUp);
|
|
1095
|
-
document.removeEventListener("keydown", handleDocumentKeyDown);
|
|
1096
|
-
};
|
|
1097
|
-
|
|
1098
|
-
function handleMenuDocumentMouseDown(event: MouseEvent) {
|
|
1099
|
-
const target = event.target;
|
|
1100
|
-
if (!(target instanceof Node)) return;
|
|
1101
|
-
if (menu?.contains(target) || handle?.contains(target)) return;
|
|
1102
|
-
closeMenu({ hideGrip: true });
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
function handleMenuKeyDown(event: KeyboardEvent) {
|
|
1106
|
-
if (!menu) return;
|
|
1107
|
-
|
|
1108
|
-
if (event.key === "Escape") {
|
|
1109
|
-
event.preventDefault();
|
|
1110
|
-
closeMenu({ hideGrip: true });
|
|
1111
|
-
return;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
if (
|
|
1115
|
-
event.key !== "ArrowDown" &&
|
|
1116
|
-
event.key !== "ArrowUp" &&
|
|
1117
|
-
event.key !== "Home" &&
|
|
1118
|
-
event.key !== "End"
|
|
1119
|
-
) {
|
|
1120
|
-
return;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
const buttons = Array.from(
|
|
1124
|
-
menu.querySelectorAll<HTMLButtonElement>("button"),
|
|
1125
|
-
);
|
|
1126
|
-
if (buttons.length === 0) return;
|
|
1127
|
-
|
|
1128
|
-
event.preventDefault();
|
|
1129
|
-
const activeIndex = buttons.indexOf(
|
|
1130
|
-
document.activeElement as HTMLButtonElement,
|
|
1131
|
-
);
|
|
1132
|
-
let nextIndex = activeIndex < 0 ? 0 : activeIndex;
|
|
1133
|
-
|
|
1134
|
-
if (event.key === "ArrowDown") {
|
|
1135
|
-
nextIndex = (nextIndex + 1) % buttons.length;
|
|
1136
|
-
} else if (event.key === "ArrowUp") {
|
|
1137
|
-
nextIndex = (nextIndex - 1 + buttons.length) % buttons.length;
|
|
1138
|
-
} else if (event.key === "Home") {
|
|
1139
|
-
nextIndex = 0;
|
|
1140
|
-
} else if (event.key === "End") {
|
|
1141
|
-
nextIndex = buttons.length - 1;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
buttons[nextIndex]?.focus({ preventScroll: true });
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
function handleMenuViewportChange() {
|
|
1148
|
-
closeMenu({ hideGrip: true });
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
const finishDragSession = (commit: boolean, event?: MouseEvent) => {
|
|
1152
|
-
const session = dragSession;
|
|
1153
|
-
if (!session) return;
|
|
1154
|
-
|
|
1155
|
-
removeDragListeners();
|
|
1156
|
-
|
|
1157
|
-
if (commit && session.dragging && session.dropTarget) {
|
|
1158
|
-
const sourceStart = session.sourcePos;
|
|
1159
|
-
const sourceEnd = session.sourcePos + session.sourceNodeSize;
|
|
1160
|
-
const target = session.dropTarget;
|
|
1161
|
-
const dropPos = target.pos;
|
|
1162
|
-
const isSideDrop =
|
|
1163
|
-
target.placement === "left" || target.placement === "right";
|
|
1164
|
-
|
|
1165
|
-
if (
|
|
1166
|
-
target.view !== session.view ||
|
|
1167
|
-
(isSideDrop
|
|
1168
|
-
? // Side drop (column build): proceed for any block that isn't the
|
|
1169
|
-
// source itself, including the source's immediate neighbour.
|
|
1170
|
-
target.targetPos !== sourceStart
|
|
1171
|
-
: dropPos !== sourceStart &&
|
|
1172
|
-
dropPos !== sourceEnd &&
|
|
1173
|
-
!(dropPos > sourceStart && dropPos < sourceEnd))
|
|
1174
|
-
) {
|
|
1175
|
-
const sourceNode = session.view.state.doc.nodeAt(sourceStart);
|
|
1176
|
-
if (sourceNode) {
|
|
1177
|
-
const sourceRegistration = registrationForView(session.view);
|
|
1178
|
-
const transferData = sourceRegistration?.getDragTransferData?.({
|
|
1179
|
-
view: session.view,
|
|
1180
|
-
node: sourceNode,
|
|
1181
|
-
pos: sourceStart,
|
|
1182
|
-
});
|
|
1183
|
-
const targetNode = target.view.state.doc.nodeAt(target.targetPos);
|
|
1184
|
-
const handled =
|
|
1185
|
-
!!targetNode &&
|
|
1186
|
-
(target.registration.handleDrop?.(transferData, {
|
|
1187
|
-
view: target.view,
|
|
1188
|
-
sourceView: session.view,
|
|
1189
|
-
sourceNode,
|
|
1190
|
-
sourcePos: sourceStart,
|
|
1191
|
-
sourceNodeSize: sourceNode.nodeSize,
|
|
1192
|
-
targetNode,
|
|
1193
|
-
targetPos: target.targetPos,
|
|
1194
|
-
targetNodeSize: target.targetNodeSize,
|
|
1195
|
-
insertPos: dropPos,
|
|
1196
|
-
placement: target.placement,
|
|
1197
|
-
}) ??
|
|
1198
|
-
false);
|
|
1199
|
-
|
|
1200
|
-
if (handled) {
|
|
1201
|
-
target.view.focus();
|
|
1202
|
-
} else if (target.view === session.view) {
|
|
1203
|
-
const insertPos =
|
|
1204
|
-
dropPos > sourceStart ? dropPos - sourceNode.nodeSize : dropPos;
|
|
1205
|
-
const tr = session.view.state.tr
|
|
1206
|
-
.delete(sourceStart, sourceEnd)
|
|
1207
|
-
.insert(insertPos, sourceNode);
|
|
1208
|
-
|
|
1209
|
-
tr.setSelection(NodeSelection.create(tr.doc, insertPos));
|
|
1210
|
-
|
|
1211
|
-
session.view.dispatch(tr.scrollIntoView());
|
|
1212
|
-
session.view.focus();
|
|
1213
|
-
} else {
|
|
1214
|
-
try {
|
|
1215
|
-
const targetNode = target.view.state.schema.nodeFromJSON(
|
|
1216
|
-
sourceNode.toJSON(),
|
|
1217
|
-
);
|
|
1218
|
-
target.registration.receiveDragTransferData?.(transferData, {
|
|
1219
|
-
view: target.view,
|
|
1220
|
-
node: targetNode,
|
|
1221
|
-
pos: dropPos,
|
|
1222
|
-
sourceView: session.view,
|
|
1223
|
-
});
|
|
1224
|
-
const insertTr = target.view.state.tr.insert(
|
|
1225
|
-
dropPos,
|
|
1226
|
-
targetNode,
|
|
1227
|
-
);
|
|
1228
|
-
insertTr.setSelection(
|
|
1229
|
-
NodeSelection.create(insertTr.doc, dropPos),
|
|
1230
|
-
);
|
|
1231
|
-
target.view.dispatch(insertTr.scrollIntoView());
|
|
1232
|
-
|
|
1233
|
-
const deleteTr = session.view.state.tr.delete(
|
|
1234
|
-
sourceStart,
|
|
1235
|
-
sourceEnd,
|
|
1236
|
-
);
|
|
1237
|
-
session.view.dispatch(deleteTr);
|
|
1238
|
-
target.view.focus();
|
|
1239
|
-
} catch {
|
|
1240
|
-
// If the target schema cannot accept this node, leave the
|
|
1241
|
-
// source document untouched.
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
} else if (commit && !session.dragging && event) {
|
|
1247
|
-
openMenu(
|
|
1248
|
-
{
|
|
1249
|
-
view: session.view,
|
|
1250
|
-
sourceBlock: session.sourceBlock,
|
|
1251
|
-
sourcePos: session.sourcePos,
|
|
1252
|
-
sourceNodeSize: session.sourceNodeSize,
|
|
1253
|
-
},
|
|
1254
|
-
handle?.getBoundingClientRect() ??
|
|
1255
|
-
session.sourceBlock.getBoundingClientRect(),
|
|
1256
|
-
);
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
cleanupDragVisuals();
|
|
1260
|
-
dragSession = null;
|
|
1261
|
-
if (activeDragRegistration === currentRegistration) {
|
|
1262
|
-
activeDragRegistration = null;
|
|
1263
|
-
}
|
|
1264
|
-
if (session.dragging || !commit) hideHandle();
|
|
1265
|
-
};
|
|
1266
|
-
|
|
1267
|
-
const beginDragSession = (session: DragSession, event: MouseEvent) => {
|
|
1268
|
-
session.dragging = true;
|
|
1269
|
-
session.preview = createDragPreview(session.sourceBlock);
|
|
1270
|
-
session.sourceBlock.classList.add("notion-block--dragging");
|
|
1271
|
-
document.documentElement.classList.add("notion-editor-is-dragging");
|
|
1272
|
-
positionDragPreview(session, event.clientX, event.clientY);
|
|
1273
|
-
updateDropLine(
|
|
1274
|
-
session,
|
|
1275
|
-
findAnyDropTarget(session, event.clientX, event.clientY),
|
|
1276
|
-
);
|
|
1277
|
-
};
|
|
1278
|
-
|
|
1279
|
-
function handleDocumentMouseMove(event: MouseEvent) {
|
|
1280
|
-
if (!dragSession) return;
|
|
1281
|
-
event.preventDefault();
|
|
1282
|
-
|
|
1283
|
-
const movedEnough =
|
|
1284
|
-
Math.hypot(
|
|
1285
|
-
event.clientX - dragSession.startX,
|
|
1286
|
-
event.clientY - dragSession.startY,
|
|
1287
|
-
) > 4;
|
|
1288
|
-
|
|
1289
|
-
if (!dragSession.dragging && movedEnough) {
|
|
1290
|
-
beginDragSession(dragSession, event);
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
if (!dragSession.dragging) return;
|
|
1294
|
-
|
|
1295
|
-
positionDragPreview(dragSession, event.clientX, event.clientY);
|
|
1296
|
-
updateDropLine(
|
|
1297
|
-
dragSession,
|
|
1298
|
-
findAnyDropTarget(dragSession, event.clientX, event.clientY),
|
|
1299
|
-
);
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
function handleDocumentMouseUp(event: MouseEvent) {
|
|
1303
|
-
event.preventDefault();
|
|
1304
|
-
finishDragSession(true, event);
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
function handleDocumentKeyDown(event: KeyboardEvent) {
|
|
1308
|
-
if (event.key !== "Escape") return;
|
|
1309
|
-
event.preventDefault();
|
|
1310
|
-
finishDragSession(false);
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
return [
|
|
1314
|
-
new Plugin({
|
|
1315
|
-
key: dragHandleKey,
|
|
1316
|
-
view(editorView) {
|
|
1317
|
-
const registration: DragHandleRegistration = {
|
|
1318
|
-
view: editorView,
|
|
1319
|
-
wrapperSelector,
|
|
1320
|
-
getDragTransferData,
|
|
1321
|
-
receiveDragTransferData,
|
|
1322
|
-
handleDrop,
|
|
1323
|
-
canHover: () =>
|
|
1324
|
-
!!handle && !menu && !dragSession && editor.isEditable,
|
|
1325
|
-
findHoverBlock: (clientX, clientY) =>
|
|
1326
|
-
findForgivingBlock(editorView, clientX, clientY),
|
|
1327
|
-
showHoverBlock: (block) => showHandleForBlock(editorView, block),
|
|
1328
|
-
hideHover: () => hideHandle(),
|
|
1329
|
-
gripRect: () =>
|
|
1330
|
-
handle && handle.style.display !== "none"
|
|
1331
|
-
? handle.getBoundingClientRect()
|
|
1332
|
-
: null,
|
|
1333
|
-
};
|
|
1334
|
-
currentRegistration = registration;
|
|
1335
|
-
dragHandleRegistrations.add(registration);
|
|
1336
|
-
retainGlobalHoverListener();
|
|
1337
|
-
handle = createHandle();
|
|
1338
|
-
const wrapper = editorView.dom.closest(wrapperSelector);
|
|
1339
|
-
if (wrapper) {
|
|
1340
|
-
(wrapper as HTMLElement).style.position = "relative";
|
|
1341
|
-
wrapper.appendChild(handle);
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
handle.addEventListener("mousedown", (e) => {
|
|
1345
|
-
e.stopPropagation();
|
|
1346
|
-
if (e.button !== 0) return;
|
|
1347
|
-
closeMenu();
|
|
1348
|
-
if (!editor.isEditable) {
|
|
1349
|
-
e.preventDefault();
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
if (!currentBlock || dragStartPos === null) return;
|
|
1354
|
-
|
|
1355
|
-
const sourceNode = editorView.state.doc.nodeAt(dragStartPos);
|
|
1356
|
-
if (!sourceNode) return;
|
|
1357
|
-
|
|
1358
|
-
e.preventDefault();
|
|
1359
|
-
dragSession = {
|
|
1360
|
-
view: editorView,
|
|
1361
|
-
sourceBlock: currentBlock,
|
|
1362
|
-
sourcePos: dragStartPos,
|
|
1363
|
-
sourceNodeSize: sourceNode.nodeSize,
|
|
1364
|
-
startX: e.clientX,
|
|
1365
|
-
startY: e.clientY,
|
|
1366
|
-
dragging: false,
|
|
1367
|
-
preview: null,
|
|
1368
|
-
dropLine: null,
|
|
1369
|
-
dropTarget: null,
|
|
1370
|
-
};
|
|
1371
|
-
activeDragRegistration = registration;
|
|
1372
|
-
|
|
1373
|
-
document.addEventListener("mousemove", handleDocumentMouseMove);
|
|
1374
|
-
document.addEventListener("mouseup", handleDocumentMouseUp);
|
|
1375
|
-
document.addEventListener("keydown", handleDocumentKeyDown);
|
|
1376
|
-
});
|
|
1377
|
-
|
|
1378
|
-
handle.addEventListener("keydown", (e) => {
|
|
1379
|
-
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1380
|
-
e.preventDefault();
|
|
1381
|
-
e.stopPropagation();
|
|
1382
|
-
closeMenu();
|
|
1383
|
-
if (!editor.isEditable || !currentBlock || dragStartPos === null) {
|
|
1384
|
-
return;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
const sourceNode = editorView.state.doc.nodeAt(dragStartPos);
|
|
1388
|
-
if (!sourceNode) return;
|
|
1389
|
-
|
|
1390
|
-
openMenu(
|
|
1391
|
-
{
|
|
1392
|
-
view: editorView,
|
|
1393
|
-
sourceBlock: currentBlock,
|
|
1394
|
-
sourcePos: dragStartPos,
|
|
1395
|
-
sourceNodeSize: sourceNode.nodeSize,
|
|
1396
|
-
},
|
|
1397
|
-
handle?.getBoundingClientRect() ??
|
|
1398
|
-
currentBlock.getBoundingClientRect(),
|
|
1399
|
-
);
|
|
1400
|
-
});
|
|
1401
|
-
|
|
1402
|
-
return {
|
|
1403
|
-
destroy() {
|
|
1404
|
-
closeMenu({ hideGrip: true });
|
|
1405
|
-
finishDragSession(false);
|
|
1406
|
-
releaseGlobalHoverListener();
|
|
1407
|
-
dragHandleRegistrations.delete(registration);
|
|
1408
|
-
if (activeDragRegistration === registration) {
|
|
1409
|
-
activeDragRegistration = null;
|
|
1410
|
-
}
|
|
1411
|
-
if (activeHoverRegistration === registration) {
|
|
1412
|
-
activeHoverRegistration = null;
|
|
1413
|
-
}
|
|
1414
|
-
handle?.remove();
|
|
1415
|
-
handle = null;
|
|
1416
|
-
currentRegistration = null;
|
|
1417
|
-
},
|
|
1418
|
-
};
|
|
1419
|
-
},
|
|
1420
|
-
props: {
|
|
1421
|
-
handleDOMEvents: {
|
|
1422
|
-
mousemove(_view, event) {
|
|
1423
|
-
updateRegisteredHover(event.clientX, event.clientY);
|
|
1424
|
-
return false;
|
|
1425
|
-
},
|
|
1426
|
-
drop() {
|
|
1427
|
-
closeMenu({ hideGrip: true });
|
|
1428
|
-
finishDragSession(false);
|
|
1429
|
-
hideHandle();
|
|
1430
|
-
return false;
|
|
1431
|
-
},
|
|
1432
|
-
},
|
|
1433
|
-
},
|
|
1434
|
-
}),
|
|
1435
|
-
];
|
|
1436
|
-
},
|
|
1437
|
-
});
|