@tylertech/forge-ai 0.15.3-dev.1 → 0.16.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/MIGRATION.md +192 -0
- package/README.md +76 -2
- package/custom-elements.json +5442 -15097
- package/dist/_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorate.mjs +9 -0
- package/dist/ai-agent-info/ai-agent-info.mjs +4 -78
- package/dist/ai-agent-info/ai-agent-info2.mjs +55 -0
- package/dist/ai-agent-info/index.d.ts +1 -1
- package/dist/ai-agent-info/index.mjs +1 -5
- package/dist/ai-agent-selector/ai-agent-selector.d.ts +2 -2
- package/dist/ai-agent-selector/ai-agent-selector.mjs +4 -439
- package/dist/ai-agent-selector/ai-agent-selector2.mjs +344 -0
- package/dist/ai-agent-selector/index.mjs +1 -5
- package/dist/ai-artifact/ai-artifact.mjs +4 -39
- package/dist/ai-artifact/ai-artifact2.mjs +31 -0
- package/dist/ai-artifact/index.d.ts +1 -1
- package/dist/ai-artifact/index.mjs +1 -5
- package/dist/ai-artifact-card/ai-artifact-card.mjs +4 -142
- package/dist/ai-artifact-card/ai-artifact-card2.mjs +103 -0
- package/dist/ai-artifact-card/index.d.ts +1 -1
- package/dist/ai-artifact-card/index.mjs +1 -5
- package/dist/ai-artifact-card-group/ai-artifact-card-group.mjs +4 -137
- package/dist/ai-artifact-card-group/ai-artifact-card-group2.mjs +100 -0
- package/dist/ai-artifact-card-group/index.d.ts +1 -1
- package/dist/ai-artifact-card-group/index.mjs +1 -5
- package/dist/ai-assistant-response/ai-assistant-response.d.ts +1 -2
- package/dist/ai-assistant-response/ai-assistant-response.mjs +4 -236
- package/dist/ai-assistant-response/ai-assistant-response2.mjs +137 -0
- package/dist/ai-assistant-response/index.d.ts +1 -1
- package/dist/ai-assistant-response/index.mjs +1 -5
- package/dist/ai-canvas/ai-canvas.d.ts +3 -3
- package/dist/ai-canvas/ai-canvas.mjs +4 -95
- package/dist/ai-canvas/ai-canvas2.mjs +74 -0
- package/dist/ai-canvas/index.d.ts +1 -1
- package/dist/ai-canvas/index.mjs +1 -5
- package/dist/ai-chain-of-thought/ai-chain-of-thought.mjs +4 -45
- package/dist/ai-chain-of-thought/ai-chain-of-thought2.mjs +35 -0
- package/dist/ai-chain-of-thought/index.d.ts +5 -5
- package/dist/ai-chain-of-thought/index.mjs +6 -17
- package/dist/ai-chain-of-thought/thought-base/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-base/thought-base.mjs +4 -43
- package/dist/ai-chain-of-thought/thought-base/thought-base2.mjs +31 -0
- package/dist/ai-chain-of-thought/thought-detail/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.mjs +4 -34
- package/dist/ai-chain-of-thought/thought-detail/thought-detail2.mjs +26 -0
- package/dist/ai-chain-of-thought/thought-image/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-image/thought-image.mjs +4 -43
- package/dist/ai-chain-of-thought/thought-image/thought-image2.mjs +30 -0
- package/dist/ai-chain-of-thought/thought-search-result/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.mjs +4 -62
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result2.mjs +45 -0
- package/dist/ai-chat-header/ai-chat-header.d.ts +7 -5
- package/dist/ai-chat-header/ai-chat-header.mjs +4 -439
- package/dist/ai-chat-header/ai-chat-header2.mjs +319 -0
- package/dist/ai-chat-header/index.d.ts +2 -2
- package/dist/ai-chat-header/index.mjs +1 -5
- package/dist/ai-chat-interface/ai-chat-interface.d.ts +1 -0
- package/dist/ai-chat-interface/ai-chat-interface.mjs +4 -103
- package/dist/ai-chat-interface/ai-chat-interface2.mjs +73 -0
- package/dist/ai-chat-interface/index.mjs +1 -5
- package/dist/ai-client-message/ai-client-message.d.ts +5 -6
- package/dist/ai-client-message/ai-client-message.mjs +4 -112
- package/dist/ai-client-message/ai-client-message2.mjs +76 -0
- package/dist/ai-client-message/index.mjs +1 -5
- package/dist/ai-context-chip/ai-context-chip.d.ts +1 -1
- package/dist/ai-context-chip/ai-context-chip.mjs +4 -169
- package/dist/ai-context-chip/ai-context-chip2.mjs +113 -0
- package/dist/ai-context-chip/index.mjs +1 -5
- package/dist/ai-context-items/ai-context-items.d.ts +11 -5
- package/dist/ai-context-items/ai-context-items.mjs +4 -78
- package/dist/ai-context-items/ai-context-items2.mjs +53 -0
- package/dist/ai-context-items/index.d.ts +1 -1
- package/dist/ai-context-items/index.mjs +1 -5
- package/dist/ai-conversations-panel/ai-conversations-panel.d.ts +2 -2
- package/dist/ai-conversations-panel/ai-conversations-panel.mjs +4 -632
- package/dist/ai-conversations-panel/ai-conversations-panel2.mjs +531 -0
- package/dist/ai-conversations-panel/index.mjs +1 -5
- package/dist/ai-copy-button/ai-copy-button.mjs +4 -116
- package/dist/ai-copy-button/ai-copy-button2.mjs +88 -0
- package/dist/ai-copy-button/index.mjs +1 -5
- package/dist/ai-dialog/ai-dialog.mjs +4 -304
- package/dist/ai-dialog/ai-dialog2.mjs +237 -0
- package/dist/ai-dialog/index.d.ts +1 -1
- package/dist/ai-dialog/index.mjs +1 -5
- package/dist/ai-disclaimer/ai-disclaimer.mjs +4 -70
- package/dist/ai-disclaimer/ai-disclaimer2.mjs +46 -0
- package/dist/ai-disclaimer/index.d.ts +1 -1
- package/dist/ai-disclaimer/index.mjs +1 -5
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.mjs +4 -80
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group2.mjs +51 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.d.ts +5 -1
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.mjs +4 -330
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item2.mjs +280 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.mjs +4 -26
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator2.mjs +19 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.d.ts +5 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.mjs +4 -351
- package/dist/ai-dropdown-menu/ai-dropdown-menu2.mjs +268 -0
- package/dist/ai-dropdown-menu/index.d.ts +1 -0
- package/dist/ai-dropdown-menu/index.mjs +5 -10
- package/dist/ai-dropdown-menu/navigation-controller.d.ts +9 -1
- package/dist/ai-dropdown-menu/navigation-controller.mjs +214 -204
- package/dist/ai-dropdown-menu/selection-manager.mjs +202 -182
- package/dist/ai-edit-thread/ai-edit-thread.d.ts +1 -1
- package/dist/ai-edit-thread/ai-edit-thread.mjs +4 -137
- package/dist/ai-edit-thread/ai-edit-thread2.mjs +96 -0
- package/dist/ai-edit-thread/index.d.ts +1 -1
- package/dist/ai-edit-thread/index.mjs +1 -5
- package/dist/ai-empty-state/ai-empty-state.mjs +4 -38
- package/dist/ai-empty-state/ai-empty-state2.mjs +28 -0
- package/dist/ai-empty-state/index.d.ts +1 -1
- package/dist/ai-empty-state/index.mjs +1 -5
- package/dist/ai-error-message/ai-error-message.mjs +4 -80
- package/dist/ai-error-message/ai-error-message2.mjs +62 -0
- package/dist/ai-error-message/index.mjs +1 -5
- package/dist/ai-fab/ai-fab.mjs +4 -81
- package/dist/ai-fab/ai-fab2.mjs +54 -0
- package/dist/ai-fab/index.d.ts +1 -1
- package/dist/ai-fab/index.mjs +1 -5
- package/dist/ai-file-picker/ai-file-picker.d.ts +1 -0
- package/dist/ai-file-picker/ai-file-picker.mjs +4 -224
- package/dist/ai-file-picker/ai-file-picker2.mjs +172 -0
- package/dist/ai-file-picker/index.mjs +1 -4
- package/dist/ai-gradient-container/ai-gradient-container.mjs +4 -61
- package/dist/ai-gradient-container/ai-gradient-container2.mjs +38 -0
- package/dist/ai-gradient-container/index.d.ts +1 -1
- package/dist/ai-gradient-container/index.mjs +1 -5
- package/dist/ai-icon/ai-icon.d.ts +3 -0
- package/dist/ai-icon/ai-icon.mjs +4 -71
- package/dist/ai-icon/ai-icon2.mjs +41 -0
- package/dist/ai-icon/index.d.ts +1 -1
- package/dist/ai-icon/index.mjs +1 -5
- package/dist/ai-message-thread/ai-message-thread.d.ts +4 -3
- package/dist/ai-message-thread/ai-message-thread.mjs +4 -360
- package/dist/ai-message-thread/ai-message-thread2.mjs +279 -0
- package/dist/ai-message-thread/index.mjs +1 -5
- package/dist/ai-modal/ai-modal.mjs +4 -178
- package/dist/ai-modal/ai-modal2.mjs +141 -0
- package/dist/ai-modal/index.mjs +1 -4
- package/dist/ai-prompt/ai-prompt.d.ts +10 -6
- package/dist/ai-prompt/ai-prompt.mjs +4 -534
- package/dist/ai-prompt/ai-prompt2.mjs +438 -0
- package/dist/ai-prompt/index.mjs +1 -5
- package/dist/ai-reasoning/ai-reasoning.mjs +4 -44
- package/dist/ai-reasoning/ai-reasoning2.mjs +35 -0
- package/dist/ai-reasoning/index.d.ts +2 -2
- package/dist/ai-reasoning/index.mjs +4 -8
- package/dist/ai-reasoning/reasoning-content/index.d.ts +1 -1
- package/dist/ai-reasoning/reasoning-content/index.mjs +1 -5
- package/dist/ai-reasoning/reasoning-content/reasoning-content.mjs +4 -90
- package/dist/ai-reasoning/reasoning-content/reasoning-content2.mjs +68 -0
- package/dist/ai-reasoning-header/ai-reasoning-header.d.ts +7 -1
- package/dist/ai-reasoning-header/ai-reasoning-header.mjs +4 -68
- package/dist/ai-reasoning-header/ai-reasoning-header2.mjs +51 -0
- package/dist/ai-reasoning-header/index.d.ts +1 -1
- package/dist/ai-reasoning-header/index.mjs +1 -5
- package/dist/ai-response-message/ai-response-message.mjs +4 -25
- package/dist/ai-response-message/ai-response-message2.mjs +17 -0
- package/dist/ai-response-message/index.mjs +1 -5
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar.d.ts +1 -1
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar.mjs +4 -230
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar2.mjs +171 -0
- package/dist/ai-response-message-toolbar/index.mjs +1 -5
- package/dist/ai-sidebar/ai-sidebar.d.ts +4 -4
- package/dist/ai-sidebar/ai-sidebar.mjs +4 -256
- package/dist/ai-sidebar/ai-sidebar2.mjs +211 -0
- package/dist/ai-sidebar/index.d.ts +2 -2
- package/dist/ai-sidebar/index.mjs +1 -5
- package/dist/ai-slash-command-menu/ai-slash-command-menu.d.ts +2 -1
- package/dist/ai-slash-command-menu/ai-slash-command-menu.mjs +4 -200
- package/dist/ai-slash-command-menu/ai-slash-command-menu2.mjs +160 -0
- package/dist/ai-slash-command-menu/index.mjs +1 -5
- package/dist/ai-spinner/ai-spinner.mjs +4 -41
- package/dist/ai-spinner/ai-spinner2.mjs +29 -0
- package/dist/ai-spinner/index.d.ts +1 -1
- package/dist/ai-spinner/index.mjs +1 -5
- package/dist/ai-steps/ai-steps.mjs +4 -163
- package/dist/ai-steps/ai-steps2.mjs +133 -0
- package/dist/ai-steps/index.d.ts +1 -1
- package/dist/ai-steps/index.mjs +1 -5
- package/dist/ai-suggestions/ai-suggestions.d.ts +2 -5
- package/dist/ai-suggestions/ai-suggestions.mjs +4 -164
- package/dist/ai-suggestions/ai-suggestions2.mjs +125 -0
- package/dist/ai-suggestions/index.d.ts +2 -1
- package/dist/ai-suggestions/index.mjs +1 -5
- package/dist/ai-thinking-indicator/ai-thinking-indicator.d.ts +2 -1
- package/dist/ai-thinking-indicator/ai-thinking-indicator.mjs +4 -160
- package/dist/ai-thinking-indicator/ai-thinking-indicator2.mjs +143 -0
- package/dist/ai-thinking-indicator/index.d.ts +1 -1
- package/dist/ai-thinking-indicator/index.mjs +1 -5
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.d.ts +2 -2
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.mjs +4 -152
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu2.mjs +109 -0
- package/dist/ai-thread-actions-menu/index.d.ts +1 -1
- package/dist/ai-thread-actions-menu/index.mjs +1 -5
- package/dist/ai-threads-search/ai-threads-search.d.ts +3 -4
- package/dist/ai-threads-search/ai-threads-search.mjs +4 -602
- package/dist/ai-threads-search/ai-threads-search2.mjs +495 -0
- package/dist/ai-threads-search/index.d.ts +1 -1
- package/dist/ai-threads-search/index.mjs +1 -5
- package/dist/ai-tool-call/ai-tool-call.d.ts +21 -0
- package/dist/ai-tool-call/ai-tool-call.mjs +4 -0
- package/dist/ai-tool-call/ai-tool-call2.mjs +132 -0
- package/dist/{ai-chatbot → ai-tool-call}/create-tool-renderer.d.ts +1 -1
- package/dist/ai-tool-call/create-tool-renderer.mjs +10 -0
- package/dist/ai-tool-call/index.d.ts +6 -0
- package/dist/ai-tool-call/index.mjs +5 -0
- package/dist/{ai-chatbot → ai-tool-call}/tool-canvas.d.ts +1 -1
- package/dist/ai-tool-call/tool-canvas.mjs +135 -0
- package/dist/ai-tool-call/utils.d.ts +12 -0
- package/dist/ai-tool-call/utils.mjs +20 -0
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.d.ts +1 -1
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.mjs +4 -331
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator2.mjs +225 -0
- package/dist/ai-tool-call-indicator/index.mjs +1 -5
- package/dist/ai-user-message/ai-user-message.mjs +4 -151
- package/dist/ai-user-message/ai-user-message2.mjs +105 -0
- package/dist/ai-user-message/index.mjs +1 -5
- package/dist/ai-user-message-toolbar/ai-user-message-toolbar.mjs +4 -160
- package/dist/ai-user-message-toolbar/ai-user-message-toolbar2.mjs +102 -0
- package/dist/ai-user-message-toolbar/index.mjs +1 -5
- package/dist/ai-voice-input/ai-voice-input.d.ts +1 -1
- package/dist/ai-voice-input/ai-voice-input.mjs +4 -113
- package/dist/ai-voice-input/ai-voice-input2.mjs +92 -0
- package/dist/ai-voice-input/index.d.ts +1 -1
- package/dist/ai-voice-input/index.mjs +1 -5
- package/dist/core/drag-controller.mjs +196 -221
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.mjs +7 -8
- package/dist/core/overlay/index.mjs +1 -4
- package/dist/core/overlay/overlay.d.ts +1 -1
- package/dist/core/overlay/overlay.mjs +4 -180
- package/dist/core/overlay/overlay2.mjs +146 -0
- package/dist/core/popover/index.mjs +1 -4
- package/dist/core/popover/popover.mjs +4 -98
- package/dist/core/popover/popover2.mjs +71 -0
- package/dist/core/resize-controller.mjs +132 -154
- package/dist/core/tooltip/index.mjs +1 -4
- package/dist/core/tooltip/tooltip.mjs +4 -279
- package/dist/core/tooltip/tooltip2.mjs +213 -0
- package/dist/index.d.ts +45 -53
- package/dist/index.mjs +100 -214
- package/dist/jsx.d.ts +895 -0
- package/dist/tools/ai-data-table/ai-data-table.d.ts +1 -2
- package/dist/tools/ai-data-table/ai-data-table.mjs +4 -257
- package/dist/tools/ai-data-table/ai-data-table2.mjs +185 -0
- package/dist/tools/ai-data-table/index.d.ts +0 -1
- package/dist/tools/ai-data-table/index.mjs +1 -6
- package/dist/tools/ai-paginator/ai-paginator.d.ts +14 -0
- package/dist/tools/ai-paginator/ai-paginator.mjs +4 -115
- package/dist/tools/ai-paginator/ai-paginator2.mjs +90 -0
- package/dist/tools/ai-paginator/index.mjs +1 -4
- package/dist/tools/ai-steps/ai-steps.d.ts +2 -3
- package/dist/tools/ai-steps/ai-steps.mjs +4 -49
- package/dist/tools/ai-steps/ai-steps2.mjs +30 -0
- package/dist/tools/ai-steps/index.d.ts +0 -1
- package/dist/tools/ai-steps/index.mjs +1 -6
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.mjs +7 -12
- package/dist/types/chat.d.ts +102 -0
- package/dist/types/feature.d.ts +1 -0
- package/dist/types/file.d.ts +36 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.mjs +0 -0
- package/dist/types/thread.d.ts +14 -0
- package/dist/types/tool.d.ts +197 -0
- package/dist/utils/csv-utils.mjs +37 -57
- package/dist/utils/delete-thread-controller.d.ts +1 -1
- package/dist/utils/delete-thread-controller.mjs +48 -71
- package/dist/utils/dom.d.ts +14 -0
- package/dist/utils/dom.mjs +30 -0
- package/dist/utils/format.d.ts +9 -0
- package/dist/utils/format.mjs +27 -0
- package/dist/utils/index.d.ts +9 -6
- package/dist/utils/index.mjs +6 -16
- package/dist/utils/infinite-scroll-controller.mjs +88 -94
- package/dist/utils/keyboard-navigation-controller.mjs +62 -70
- package/dist/utils/markdown-stream-controller.mjs +48 -0
- package/dist/utils/markdown.d.ts +10 -1
- package/dist/utils/markdown.mjs +261 -40
- package/dist/utils/storage-utils.mjs +30 -24
- package/package.json +40 -104
- package/dist/ai-agent-info/ai-agent-info.scss.mjs +0 -4
- package/dist/ai-agent-selector/ai-agent-selector.scss.mjs +0 -4
- package/dist/ai-artifact/ai-artifact.scss.mjs +0 -4
- package/dist/ai-artifact-card/ai-artifact-card.scss.mjs +0 -283
- package/dist/ai-artifact-card-group/ai-artifact-card-group.scss.mjs +0 -173
- package/dist/ai-assistant-response/ai-assistant-response.scss.mjs +0 -4
- package/dist/ai-attachment/ai-attachment.d.ts +0 -39
- package/dist/ai-attachment/ai-attachment.mjs +0 -130
- package/dist/ai-attachment/ai-attachment.scss.mjs +0 -4
- package/dist/ai-attachment/index.d.ts +0 -1
- package/dist/ai-attachment/index.mjs +0 -5
- package/dist/ai-button/ai-button.d.ts +0 -21
- package/dist/ai-button/ai-button.mjs +0 -68
- package/dist/ai-button/ai-button.scss.mjs +0 -4
- package/dist/ai-button/index.d.ts +0 -1
- package/dist/ai-button/index.mjs +0 -5
- package/dist/ai-canvas/ai-canvas.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/ai-chain-of-thought.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-base/thought-base.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-image/thought-image.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.scss.mjs +0 -4
- package/dist/ai-chat-header/ai-chat-header.scss.mjs +0 -4
- package/dist/ai-chat-interface/ai-chat-interface.scss.mjs +0 -4
- package/dist/ai-chatbot/ag-ui-adapter.d.ts +0 -24
- package/dist/ai-chatbot/ag-ui-adapter.mjs +0 -388
- package/dist/ai-chatbot/agent-adapter.d.ts +0 -310
- package/dist/ai-chatbot/agent-adapter.mjs +0 -221
- package/dist/ai-chatbot/agent-runner.d.ts +0 -41
- package/dist/ai-chatbot/agent-runner.mjs +0 -265
- package/dist/ai-chatbot/ai-chatbot-base.d.ts +0 -179
- package/dist/ai-chatbot/ai-chatbot-base.mjs +0 -684
- package/dist/ai-chatbot/ai-chatbot-tool-call.d.ts +0 -19
- package/dist/ai-chatbot/ai-chatbot-tool-call.mjs +0 -182
- package/dist/ai-chatbot/ai-chatbot-tool-call.scss.mjs +0 -4
- package/dist/ai-chatbot/ai-chatbot.d.ts +0 -196
- package/dist/ai-chatbot/ai-chatbot.mjs +0 -502
- package/dist/ai-chatbot/ai-chatbot.scss.mjs +0 -4
- package/dist/ai-chatbot/create-tool-renderer.mjs +0 -16
- package/dist/ai-chatbot/event-emitter.d.ts +0 -43
- package/dist/ai-chatbot/event-emitter.mjs +0 -81
- package/dist/ai-chatbot/file-upload-manager.d.ts +0 -27
- package/dist/ai-chatbot/file-upload-manager.mjs +0 -106
- package/dist/ai-chatbot/http-agent-with-credentials.d.ts +0 -8
- package/dist/ai-chatbot/http-agent-with-credentials.mjs +0 -14
- package/dist/ai-chatbot/index.d.ts +0 -18
- package/dist/ai-chatbot/index.mjs +0 -40
- package/dist/ai-chatbot/markdown-stream-controller.mjs +0 -50
- package/dist/ai-chatbot/message-state-controller.d.ts +0 -72
- package/dist/ai-chatbot/message-state-controller.mjs +0 -392
- package/dist/ai-chatbot/request-serialization.d.ts +0 -33
- package/dist/ai-chatbot/request-serialization.mjs +0 -31
- package/dist/ai-chatbot/tool-canvas.mjs +0 -128
- package/dist/ai-chatbot/types.d.ts +0 -582
- package/dist/ai-chatbot/utils.d.ts +0 -49
- package/dist/ai-chatbot/utils.mjs +0 -114
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.d.ts +0 -190
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.mjs +0 -986
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.scss.mjs +0 -4
- package/dist/ai-chatbot-launcher/index.d.ts +0 -1
- package/dist/ai-chatbot-launcher/index.mjs +0 -5
- package/dist/ai-client-message/ai-client-message.scss.mjs +0 -4
- package/dist/ai-confirmation-prompt/ai-confirmation-prompt.d.ts +0 -34
- package/dist/ai-confirmation-prompt/ai-confirmation-prompt.mjs +0 -134
- package/dist/ai-confirmation-prompt/ai-confirmation-prompt.scss.mjs +0 -4
- package/dist/ai-confirmation-prompt/index.d.ts +0 -1
- package/dist/ai-confirmation-prompt/index.mjs +0 -5
- package/dist/ai-context-chip/ai-context-chip.scss.mjs +0 -4
- package/dist/ai-context-items/ai-context-items.scss.mjs +0 -4
- package/dist/ai-conversations-panel/ai-conversations-panel.scss.mjs +0 -4
- package/dist/ai-copy-button/ai-copy-button.scss.mjs +0 -4
- package/dist/ai-dialog/ai-dialog.scss.mjs +0 -4
- package/dist/ai-disclaimer/ai-disclaimer.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu.scss.mjs +0 -4
- package/dist/ai-edit-thread/ai-edit-thread.scss.mjs +0 -4
- package/dist/ai-embedded-chat/ai-embedded-chat.d.ts +0 -64
- package/dist/ai-embedded-chat/ai-embedded-chat.mjs +0 -173
- package/dist/ai-embedded-chat/ai-embedded-chat.scss.mjs +0 -4
- package/dist/ai-embedded-chat/index.d.ts +0 -1
- package/dist/ai-embedded-chat/index.mjs +0 -5
- package/dist/ai-empty-state/ai-empty-state.scss.mjs +0 -4
- package/dist/ai-error-message/ai-error-message.scss.mjs +0 -4
- package/dist/ai-fab/ai-fab.scss.mjs +0 -4
- package/dist/ai-file-picker/ai-file-picker.scss.mjs +0 -4
- package/dist/ai-floating-chat/ai-floating-chat.d.ts +0 -53
- package/dist/ai-floating-chat/ai-floating-chat.mjs +0 -147
- package/dist/ai-floating-chat/ai-floating-chat.scss.mjs +0 -4
- package/dist/ai-floating-chat/index.d.ts +0 -1
- package/dist/ai-floating-chat/index.mjs +0 -5
- package/dist/ai-gradient-container/ai-gradient-container.scss.mjs +0 -4
- package/dist/ai-icon/ai-icon.scss.mjs +0 -4
- package/dist/ai-icon-button/ai-icon-button.d.ts +0 -19
- package/dist/ai-icon-button/ai-icon-button.mjs +0 -66
- package/dist/ai-icon-button/ai-icon-button.scss.mjs +0 -4
- package/dist/ai-icon-button/index.d.ts +0 -1
- package/dist/ai-icon-button/index.mjs +0 -5
- package/dist/ai-message-thread/ai-message-thread.scss.mjs +0 -4
- package/dist/ai-modal/ai-modal.scss.mjs +0 -4
- package/dist/ai-prompt/ai-prompt.scss.mjs +0 -4
- package/dist/ai-prompt/prompt-button/index.d.ts +0 -1
- package/dist/ai-prompt/prompt-button/index.mjs +0 -5
- package/dist/ai-prompt/prompt-button/prompt-button.d.ts +0 -16
- package/dist/ai-prompt/prompt-button/prompt-button.mjs +0 -40
- package/dist/ai-prompt/prompt-button/prompt-button.scss.mjs +0 -4
- package/dist/ai-reasoning/ai-reasoning.scss.mjs +0 -4
- package/dist/ai-reasoning/reasoning-content/reasoning-content.scss.mjs +0 -4
- package/dist/ai-reasoning-header/ai-reasoning-header.scss.mjs +0 -4
- package/dist/ai-response-message/ai-response-message.scss.mjs +0 -4
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar.scss.mjs +0 -4
- package/dist/ai-sidebar/ai-sidebar.scss.mjs +0 -4
- package/dist/ai-sidebar-chat/ai-sidebar-chat.d.ts +0 -54
- package/dist/ai-sidebar-chat/ai-sidebar-chat.mjs +0 -163
- package/dist/ai-sidebar-chat/ai-sidebar-chat.scss.mjs +0 -4
- package/dist/ai-sidebar-chat/index.d.ts +0 -1
- package/dist/ai-sidebar-chat/index.mjs +0 -5
- package/dist/ai-slash-command-menu/ai-slash-command-menu.scss.mjs +0 -4
- package/dist/ai-spinner/ai-spinner.scss.mjs +0 -4
- package/dist/ai-steps/ai-steps.scss.mjs +0 -4
- package/dist/ai-suggestions/ai-suggestions.scss.mjs +0 -500
- package/dist/ai-thinking-indicator/ai-thinking-indicator.scss.mjs +0 -143
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.scss.mjs +0 -4
- package/dist/ai-threads/ai-threads.d.ts +0 -82
- package/dist/ai-threads/ai-threads.mjs +0 -343
- package/dist/ai-threads/ai-threads.scss.mjs +0 -4
- package/dist/ai-threads/index.d.ts +0 -1
- package/dist/ai-threads/index.mjs +0 -5
- package/dist/ai-threads-search/ai-threads-search.scss.mjs +0 -4
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.scss.mjs +0 -4
- package/dist/ai-user-message/ai-user-message.scss.mjs +0 -4
- package/dist/ai-user-message-toolbar/ai-user-message-toolbar.scss.mjs +0 -4
- package/dist/ai-voice-input/ai-voice-input.scss.mjs +0 -4
- package/dist/core/canvas-controller.d.ts +0 -81
- package/dist/core/canvas-controller.mjs +0 -221
- package/dist/core/chatbot-core-controller.d.ts +0 -57
- package/dist/core/chatbot-core-controller.mjs +0 -545
- package/dist/core/overlay/overlay.scss.mjs +0 -4
- package/dist/core/popover/popover.scss.mjs +0 -4
- package/dist/core/tooltip/tooltip.scss.mjs +0 -4
- package/dist/tools/ai-data-table/ai-data-table-definition.d.ts +0 -2
- package/dist/tools/ai-data-table/ai-data-table-definition.mjs +0 -43
- package/dist/tools/ai-data-table/ai-data-table.scss.mjs +0 -4
- package/dist/tools/ai-mcp-app/ai-mcp-app.d.ts +0 -70
- package/dist/tools/ai-mcp-app/ai-mcp-app.mjs +0 -589
- package/dist/tools/ai-mcp-app/ai-mcp-app.scss.mjs +0 -4
- package/dist/tools/ai-mcp-app/index.d.ts +0 -3
- package/dist/tools/ai-mcp-app/index.mjs +0 -6
- package/dist/tools/ai-mcp-app/mcp-app-bridge-controller.d.ts +0 -60
- package/dist/tools/ai-mcp-app/mcp-app-bridge-controller.mjs +0 -147
- package/dist/tools/ai-mcp-app/mcp-app-bridge-types.d.ts +0 -124
- package/dist/tools/ai-mcp-app/mcp-app-bridge.d.ts +0 -41
- package/dist/tools/ai-mcp-app/mcp-app-bridge.mjs +0 -293
- package/dist/tools/ai-mcp-app/mcp-app-context.d.ts +0 -46
- package/dist/tools/ai-mcp-app/mcp-app-context.mjs +0 -5
- package/dist/tools/ai-paginator/ai-paginator.scss.mjs +0 -4
- package/dist/tools/ai-steps/ai-steps-definition.d.ts +0 -2
- package/dist/tools/ai-steps/ai-steps-definition.mjs +0 -51
- package/dist/tools/ai-steps/ai-steps.scss.mjs +0 -4
- package/dist/utils/inert-outside.d.ts +0 -7
- package/dist/utils/inert-outside.mjs +0 -28
- package/dist/utils.d.ts +0 -32
- package/dist/utils.mjs +0 -57
- /package/dist/{ai-chatbot → utils}/markdown-stream-controller.d.ts +0 -0
|
@@ -1,222 +1,197 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const match = currentTransform.match(/translate\((-?\d+(?:\.\d+)?)px,\s*(-?\d+(?:\.\d+)?)px\)/);
|
|
196
|
-
if (match) {
|
|
197
|
-
this._currentTransformX = parseFloat(match[1]);
|
|
198
|
-
this._currentTransformY = parseFloat(match[2]);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
_addDragListeners() {
|
|
203
|
-
if (!this._dragAbortController) {
|
|
204
|
-
this._dragAbortController = new AbortController();
|
|
205
|
-
document.addEventListener("pointermove", this._handlePointerMove, {
|
|
206
|
-
signal: this._dragAbortController.signal
|
|
207
|
-
});
|
|
208
|
-
document.addEventListener("pointerup", this._handlePointerUp, {
|
|
209
|
-
signal: this._dragAbortController.signal
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
_removeDragListeners() {
|
|
214
|
-
if (this._dragAbortController) {
|
|
215
|
-
this._dragAbortController.abort();
|
|
216
|
-
this._dragAbortController = void 0;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
export {
|
|
221
|
-
DragController
|
|
1
|
+
//#region src/lib/core/drag-controller.ts
|
|
2
|
+
var DragController = class {
|
|
3
|
+
constructor(host, options) {
|
|
4
|
+
this._isDragging = false;
|
|
5
|
+
this._currentTransformX = 0;
|
|
6
|
+
this._currentTransformY = 0;
|
|
7
|
+
this._dragOffsetX = 0;
|
|
8
|
+
this._dragOffsetY = 0;
|
|
9
|
+
this.handlePointerDown = (event) => {
|
|
10
|
+
if (event.button !== 0) return;
|
|
11
|
+
event.preventDefault();
|
|
12
|
+
const targetElement = this._options.targetElementRef.value;
|
|
13
|
+
const dragHandle = this._options.dragHandleRef.value;
|
|
14
|
+
if (!targetElement || !dragHandle) return;
|
|
15
|
+
dragHandle.setPointerCapture(event.pointerId);
|
|
16
|
+
this._getCurrentTransform(targetElement);
|
|
17
|
+
const targetRect = targetElement.getBoundingClientRect();
|
|
18
|
+
this._dragOffsetX = event.clientX - targetRect.left;
|
|
19
|
+
this._dragOffsetY = event.clientY - targetRect.top;
|
|
20
|
+
this._isDragging = true;
|
|
21
|
+
this._host.requestUpdate();
|
|
22
|
+
this._addDragListeners();
|
|
23
|
+
};
|
|
24
|
+
this.handleKeyDown = (event) => {
|
|
25
|
+
const step = this._options.keyboardStep;
|
|
26
|
+
let deltaX = 0;
|
|
27
|
+
let deltaY = 0;
|
|
28
|
+
switch (event.key) {
|
|
29
|
+
case "ArrowUp":
|
|
30
|
+
deltaY = -step;
|
|
31
|
+
break;
|
|
32
|
+
case "ArrowDown":
|
|
33
|
+
deltaY = step;
|
|
34
|
+
break;
|
|
35
|
+
case "ArrowLeft":
|
|
36
|
+
deltaX = -step;
|
|
37
|
+
break;
|
|
38
|
+
case "ArrowRight":
|
|
39
|
+
deltaX = step;
|
|
40
|
+
break;
|
|
41
|
+
default: return;
|
|
42
|
+
}
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
const targetElement = this._options.targetElementRef.value;
|
|
45
|
+
if (!targetElement) return;
|
|
46
|
+
this._getCurrentTransform(targetElement);
|
|
47
|
+
const newX = this._currentTransformX + deltaX;
|
|
48
|
+
const newY = this._currentTransformY + deltaY;
|
|
49
|
+
if (this._options.constrainKeyboardNavigation) {
|
|
50
|
+
const constrainedPosition = this._constrainToViewport(targetElement, newX, newY);
|
|
51
|
+
this._currentTransformX = constrainedPosition.x;
|
|
52
|
+
this._currentTransformY = constrainedPosition.y;
|
|
53
|
+
} else {
|
|
54
|
+
this._currentTransformX = newX;
|
|
55
|
+
this._currentTransformY = newY;
|
|
56
|
+
}
|
|
57
|
+
targetElement.style.transform = `translate(${this._currentTransformX}px, ${this._currentTransformY}px)`;
|
|
58
|
+
};
|
|
59
|
+
this._handlePointerMove = (event) => {
|
|
60
|
+
if (!this._isDragging) return;
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
const targetElement = this._options.targetElementRef.value;
|
|
63
|
+
if (!targetElement) return;
|
|
64
|
+
const desiredX = event.clientX - this._dragOffsetX;
|
|
65
|
+
const desiredY = event.clientY - this._dragOffsetY;
|
|
66
|
+
const { originalX, originalY } = this._getOriginalPosition(targetElement);
|
|
67
|
+
const newTransformX = desiredX - originalX;
|
|
68
|
+
const newTransformY = desiredY - originalY;
|
|
69
|
+
this._currentTransformX = newTransformX;
|
|
70
|
+
this._currentTransformY = newTransformY;
|
|
71
|
+
targetElement.style.transform = `translate(${newTransformX}px, ${newTransformY}px)`;
|
|
72
|
+
};
|
|
73
|
+
this._handlePointerUp = (event) => {
|
|
74
|
+
if (!this._isDragging) return;
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
const dragHandle = this._options.dragHandleRef.value;
|
|
77
|
+
if (dragHandle) dragHandle.releasePointerCapture(event.pointerId);
|
|
78
|
+
if (this._options.snapToViewport) this._snapToViewport();
|
|
79
|
+
this._isDragging = false;
|
|
80
|
+
this._host.requestUpdate();
|
|
81
|
+
this._removeDragListeners();
|
|
82
|
+
};
|
|
83
|
+
this._host = host;
|
|
84
|
+
this._options = {
|
|
85
|
+
snapToViewport: true,
|
|
86
|
+
constrainKeyboardNavigation: true,
|
|
87
|
+
keyboardStep: 10,
|
|
88
|
+
snapAnimationDuration: 200,
|
|
89
|
+
allowOutOfBounds: true,
|
|
90
|
+
...options
|
|
91
|
+
};
|
|
92
|
+
host.addController(this);
|
|
93
|
+
}
|
|
94
|
+
hostConnected() {}
|
|
95
|
+
hostDisconnected() {
|
|
96
|
+
this.cleanup();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Gets whether the element is currently being dragged
|
|
100
|
+
*/
|
|
101
|
+
get isDragging() {
|
|
102
|
+
return this._isDragging;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Gets the current transform values
|
|
106
|
+
*/
|
|
107
|
+
get currentTransform() {
|
|
108
|
+
return {
|
|
109
|
+
x: this._currentTransformX,
|
|
110
|
+
y: this._currentTransformY
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Resets the drag position to original location
|
|
115
|
+
*/
|
|
116
|
+
resetPosition() {
|
|
117
|
+
const targetElement = this._options.targetElementRef.value;
|
|
118
|
+
if (targetElement) {
|
|
119
|
+
targetElement.style.transform = "";
|
|
120
|
+
targetElement.style.transition = "";
|
|
121
|
+
this._currentTransformX = 0;
|
|
122
|
+
this._currentTransformY = 0;
|
|
123
|
+
this._dragOffsetX = 0;
|
|
124
|
+
this._dragOffsetY = 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Cleanup method for removing event listeners and resetting state
|
|
129
|
+
*/
|
|
130
|
+
cleanup() {
|
|
131
|
+
this._removeDragListeners();
|
|
132
|
+
this._isDragging = false;
|
|
133
|
+
}
|
|
134
|
+
_snapToViewport() {
|
|
135
|
+
const targetElement = this._options.targetElementRef.value;
|
|
136
|
+
if (!targetElement) return;
|
|
137
|
+
const constrainedPosition = this._constrainToViewport(targetElement, this._currentTransformX, this._currentTransformY);
|
|
138
|
+
if (constrainedPosition.x !== this._currentTransformX || constrainedPosition.y !== this._currentTransformY) {
|
|
139
|
+
this._currentTransformX = constrainedPosition.x;
|
|
140
|
+
this._currentTransformY = constrainedPosition.y;
|
|
141
|
+
targetElement.style.transition = `transform ${this._options.snapAnimationDuration}ms cubic-bezier(0.2, 0, 0, 1)`;
|
|
142
|
+
targetElement.style.transform = `translate(${constrainedPosition.x}px, ${constrainedPosition.y}px)`;
|
|
143
|
+
setTimeout(() => {
|
|
144
|
+
if (targetElement) targetElement.style.transition = "";
|
|
145
|
+
}, this._options.snapAnimationDuration);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
_constrainToViewport(targetElement, transformX, transformY) {
|
|
149
|
+
const targetWidth = targetElement.offsetWidth;
|
|
150
|
+
const targetHeight = targetElement.offsetHeight;
|
|
151
|
+
const { originalX, originalY } = this._getOriginalPosition(targetElement);
|
|
152
|
+
const maxTransformX = window.innerWidth - targetWidth - originalX;
|
|
153
|
+
const minTransformX = -originalX;
|
|
154
|
+
const maxTransformY = window.innerHeight - targetHeight - originalY;
|
|
155
|
+
const minTransformY = -originalY;
|
|
156
|
+
return {
|
|
157
|
+
x: Math.max(minTransformX, Math.min(transformX, maxTransformX)),
|
|
158
|
+
y: Math.max(minTransformY, Math.min(transformY, maxTransformY))
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
_getOriginalPosition(targetElement) {
|
|
162
|
+
const targetWidth = targetElement.offsetWidth;
|
|
163
|
+
const targetHeight = targetElement.offsetHeight;
|
|
164
|
+
const computedStyle = window.getComputedStyle(targetElement);
|
|
165
|
+
return {
|
|
166
|
+
originalX: parseFloat(computedStyle.right) ? window.innerWidth - parseFloat(computedStyle.right) - targetWidth : parseFloat(computedStyle.left) || 0,
|
|
167
|
+
originalY: parseFloat(computedStyle.bottom) ? window.innerHeight - parseFloat(computedStyle.bottom) - targetHeight : parseFloat(computedStyle.top) || 0
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
_getCurrentTransform(targetElement) {
|
|
171
|
+
const currentTransform = targetElement.style.transform;
|
|
172
|
+
this._currentTransformX = 0;
|
|
173
|
+
this._currentTransformY = 0;
|
|
174
|
+
if (currentTransform) {
|
|
175
|
+
const match = currentTransform.match(/translate\((-?\d+(?:\.\d+)?)px,\s*(-?\d+(?:\.\d+)?)px\)/);
|
|
176
|
+
if (match) {
|
|
177
|
+
this._currentTransformX = parseFloat(match[1]);
|
|
178
|
+
this._currentTransformY = parseFloat(match[2]);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
_addDragListeners() {
|
|
183
|
+
if (!this._dragAbortController) {
|
|
184
|
+
this._dragAbortController = new AbortController();
|
|
185
|
+
document.addEventListener("pointermove", this._handlePointerMove, { signal: this._dragAbortController.signal });
|
|
186
|
+
document.addEventListener("pointerup", this._handlePointerUp, { signal: this._dragAbortController.signal });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
_removeDragListeners() {
|
|
190
|
+
if (this._dragAbortController) {
|
|
191
|
+
this._dragAbortController.abort();
|
|
192
|
+
this._dragAbortController = void 0;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
222
195
|
};
|
|
196
|
+
//#endregion
|
|
197
|
+
export { DragController };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './overlay/index.js';
|
|
2
|
+
export * from './popover/index.js';
|
|
3
|
+
export * from './tooltip/index.js';
|
|
2
4
|
export { DragController, type DragControllerOptions } from './drag-controller.js';
|
|
3
5
|
export { ResizeController, type ResizeControllerOptions, type ResizeGrowDirection } from './resize-controller.js';
|
|
4
|
-
export { ChatbotCoreController, type ChatbotCoreCallbacks, type ChatbotCoreControllerConfig } from './chatbot-core-controller.js';
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ForgeAiOverlayComponent } from "./overlay/overlay2.mjs";
|
|
2
|
+
import { ForgeAiTooltipComponent } from "./tooltip/tooltip2.mjs";
|
|
3
|
+
import { ForgeAiPopoverComponent } from "./popover/popover2.mjs";
|
|
4
|
+
import "./tooltip/index.mjs";
|
|
2
5
|
import { DragController } from "./drag-controller.mjs";
|
|
3
6
|
import { ResizeController } from "./resize-controller.mjs";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ChatbotCoreController,
|
|
8
|
-
DragController,
|
|
9
|
-
ResizeController
|
|
10
|
-
};
|
|
7
|
+
import "./overlay/index.mjs";
|
|
8
|
+
import "./popover/index.mjs";
|
|
9
|
+
export { DragController, ForgeAiOverlayComponent, ForgeAiPopoverComponent, ForgeAiTooltipComponent, ResizeController };
|
|
@@ -19,7 +19,7 @@ export type OverlayOffset = number | {
|
|
|
19
19
|
alignmentAxis?: number;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* @summary A low-level overlay component
|
|
22
|
+
* @summary A low-level overlay component that positions content relative to an anchor. Used by `forge-ai-popover` and `forge-ai-tooltip`.
|
|
23
23
|
*
|
|
24
24
|
* @slot - The default slot for overlay content.
|
|
25
25
|
*
|
|
@@ -1,180 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
9
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
-
if (decorator = decorators[i])
|
|
11
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
-
if (kind && result) __defProp(target, key, result);
|
|
13
|
-
return result;
|
|
14
|
-
};
|
|
15
|
-
let ForgeAiOverlayComponent = class extends LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.anchor = null;
|
|
19
|
-
this.placement = "bottom-start";
|
|
20
|
-
this.flip = true;
|
|
21
|
-
this.shift = false;
|
|
22
|
-
this.autoSize = false;
|
|
23
|
-
this.open = false;
|
|
24
|
-
this.arrowElement = null;
|
|
25
|
-
this.offset = void 0;
|
|
26
|
-
this.dismissMode = "auto";
|
|
27
|
-
this._overlayElement = null;
|
|
28
|
-
this._cleanupAutoUpdate = null;
|
|
29
|
-
this._onToggle = (event) => {
|
|
30
|
-
this.open = event.newState === "open";
|
|
31
|
-
this.dispatchEvent(
|
|
32
|
-
new CustomEvent("forge-ai-overlay-toggle", {
|
|
33
|
-
detail: {
|
|
34
|
-
open: this.open,
|
|
35
|
-
newState: event.newState,
|
|
36
|
-
oldState: event.oldState
|
|
37
|
-
},
|
|
38
|
-
bubbles: true,
|
|
39
|
-
composed: true
|
|
40
|
-
})
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
disconnectedCallback() {
|
|
45
|
-
super.disconnectedCallback();
|
|
46
|
-
this._cleanup();
|
|
47
|
-
}
|
|
48
|
-
updated(changedProperties) {
|
|
49
|
-
if (changedProperties.has("open")) {
|
|
50
|
-
this._handleOpenChange();
|
|
51
|
-
}
|
|
52
|
-
if (changedProperties.has("anchor") || changedProperties.has("placement") || changedProperties.has("flip") || changedProperties.has("shift") || changedProperties.has("autoSize") || changedProperties.has("offset") || changedProperties.has("arrowElement")) {
|
|
53
|
-
if (this.open && this._overlayElement && this.anchor) {
|
|
54
|
-
this._updatePosition();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
_handleOpenChange() {
|
|
59
|
-
if (this.open) {
|
|
60
|
-
this._showOverlay();
|
|
61
|
-
} else {
|
|
62
|
-
this._hideOverlay();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
async _showOverlay() {
|
|
66
|
-
if (!this._overlayElement) {
|
|
67
|
-
await this.updateComplete;
|
|
68
|
-
this._overlayElement = this.shadowRoot?.querySelector(".ai-overlay");
|
|
69
|
-
}
|
|
70
|
-
if (this._overlayElement) {
|
|
71
|
-
this._overlayElement.showPopover();
|
|
72
|
-
if (this.anchor) {
|
|
73
|
-
this._updatePosition();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
_hideOverlay() {
|
|
78
|
-
this._overlayElement?.hidePopover();
|
|
79
|
-
this._cleanup();
|
|
80
|
-
}
|
|
81
|
-
_updatePosition() {
|
|
82
|
-
if (!this.anchor || !this._overlayElement) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
this._cleanup();
|
|
86
|
-
const middleware = [
|
|
87
|
-
...this.offset !== void 0 ? [offset(this.offset)] : [],
|
|
88
|
-
...this.flip ? [flip()] : [],
|
|
89
|
-
...this.shift ? [shift({ padding: 8 })] : [],
|
|
90
|
-
...this.autoSize ? [
|
|
91
|
-
size({
|
|
92
|
-
padding: 8,
|
|
93
|
-
apply: ({ availableWidth, availableHeight, elements }) => {
|
|
94
|
-
elements.floating.style.setProperty("--ai-overlay-available-width", `${availableWidth}px`);
|
|
95
|
-
elements.floating.style.setProperty("--ai-overlay-available-height", `${availableHeight}px`);
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
] : [],
|
|
99
|
-
...this.arrowElement ? [arrow({ element: this.arrowElement, padding: 8 })] : []
|
|
100
|
-
];
|
|
101
|
-
this._cleanupAutoUpdate = autoUpdate(this.anchor, this._overlayElement, () => this._computePosition(middleware));
|
|
102
|
-
}
|
|
103
|
-
async _computePosition(middleware) {
|
|
104
|
-
if (!this.anchor || !this._overlayElement) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
try {
|
|
108
|
-
const result = await computePosition(this.anchor, this._overlayElement, {
|
|
109
|
-
placement: this.placement,
|
|
110
|
-
strategy: "fixed",
|
|
111
|
-
middleware
|
|
112
|
-
});
|
|
113
|
-
Object.assign(this._overlayElement.style, {
|
|
114
|
-
left: "0",
|
|
115
|
-
top: "0",
|
|
116
|
-
translate: `${this._roundByDPR(result.x)}px ${this._roundByDPR(result.y)}px`
|
|
117
|
-
});
|
|
118
|
-
this.setAttribute("data-position-placement", result.placement);
|
|
119
|
-
if (this.arrowElement && result.middlewareData.arrow) {
|
|
120
|
-
const { x, y } = result.middlewareData.arrow;
|
|
121
|
-
Object.assign(this.arrowElement.style, {
|
|
122
|
-
left: x != null ? `${x}px` : "",
|
|
123
|
-
top: y != null ? `${y}px` : ""
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
} catch (error) {
|
|
127
|
-
console.error("Failed to compute overlay position:", error);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
_roundByDPR(value) {
|
|
131
|
-
const dpr = window.devicePixelRatio || 1;
|
|
132
|
-
return Math.round(value * dpr) / dpr;
|
|
133
|
-
}
|
|
134
|
-
_cleanup() {
|
|
135
|
-
this._cleanupAutoUpdate?.();
|
|
136
|
-
this._cleanupAutoUpdate = null;
|
|
137
|
-
this.removeAttribute("data-position-placement");
|
|
138
|
-
}
|
|
139
|
-
render() {
|
|
140
|
-
return html`
|
|
141
|
-
<div class="ai-overlay" popover=${this.dismissMode} @toggle=${this._onToggle}>
|
|
142
|
-
<slot></slot>
|
|
143
|
-
</div>
|
|
144
|
-
`;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
ForgeAiOverlayComponent.styles = unsafeCSS(styles);
|
|
148
|
-
__decorateClass([
|
|
149
|
-
property({ type: Object })
|
|
150
|
-
], ForgeAiOverlayComponent.prototype, "anchor", 2);
|
|
151
|
-
__decorateClass([
|
|
152
|
-
property()
|
|
153
|
-
], ForgeAiOverlayComponent.prototype, "placement", 2);
|
|
154
|
-
__decorateClass([
|
|
155
|
-
property({ type: Boolean })
|
|
156
|
-
], ForgeAiOverlayComponent.prototype, "flip", 2);
|
|
157
|
-
__decorateClass([
|
|
158
|
-
property({ type: Boolean })
|
|
159
|
-
], ForgeAiOverlayComponent.prototype, "shift", 2);
|
|
160
|
-
__decorateClass([
|
|
161
|
-
property({ type: Boolean, attribute: "auto-size" })
|
|
162
|
-
], ForgeAiOverlayComponent.prototype, "autoSize", 2);
|
|
163
|
-
__decorateClass([
|
|
164
|
-
property({ type: Boolean, reflect: true })
|
|
165
|
-
], ForgeAiOverlayComponent.prototype, "open", 2);
|
|
166
|
-
__decorateClass([
|
|
167
|
-
property({ type: Object })
|
|
168
|
-
], ForgeAiOverlayComponent.prototype, "arrowElement", 2);
|
|
169
|
-
__decorateClass([
|
|
170
|
-
property({ type: Object })
|
|
171
|
-
], ForgeAiOverlayComponent.prototype, "offset", 2);
|
|
172
|
-
__decorateClass([
|
|
173
|
-
property({ attribute: "dismiss-mode" })
|
|
174
|
-
], ForgeAiOverlayComponent.prototype, "dismissMode", 2);
|
|
175
|
-
ForgeAiOverlayComponent = __decorateClass([
|
|
176
|
-
customElement("forge-ai-overlay")
|
|
177
|
-
], ForgeAiOverlayComponent);
|
|
178
|
-
export {
|
|
179
|
-
ForgeAiOverlayComponent
|
|
180
|
-
};
|
|
1
|
+
//#region src/lib/core/overlay/overlay.scss?inline
|
|
2
|
+
var overlay_default = ":host {\n display: contents;\n}\n\n.ai-overlay {\n position: fixed;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n border: none;\n background: inherit;\n color: inherit;\n border-radius: inherit;\n overflow: visible;\n}\n.ai-overlay[popover] {\n inset: unset;\n}";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { overlay_default as default };
|