@epam/ai-dial-chat-hooks 1.3.0-dev.98 → 1.3.0-rc.1
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/api-error/api-error.d.ts +2 -0
- package/api-error/api-error.d.ts.map +1 -1
- package/api-error/api-error.js +31 -23
- package/api-transport/create-unauthorized-middleware.js +4 -1
- package/attachment/attach-constraints.d.ts +31 -0
- package/attachment/attach-constraints.d.ts.map +1 -0
- package/attachment/attach-constraints.js +18 -0
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
- package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
- package/attachment/useAttachmentAction/useAttachmentAction.js +25 -28
- package/attachments.js +2 -1
- package/catalog/application-credentials.d.ts +15 -0
- package/catalog/application-credentials.d.ts.map +1 -0
- package/catalog/application-credentials.js +28 -0
- package/catalog/catalog-derivations.d.ts +5 -3
- package/catalog/catalog-derivations.d.ts.map +1 -1
- package/catalog/catalog-derivations.js +13 -6
- package/catalog/catalog-entity-kind.d.ts +31 -0
- package/catalog/catalog-entity-kind.d.ts.map +1 -0
- package/catalog/catalog-entity-kind.js +21 -0
- package/catalog/catalog-preferences.d.ts +8 -0
- package/catalog/catalog-preferences.d.ts.map +1 -0
- package/catalog/catalog-preferences.js +5 -0
- package/catalog/create-publish-api.d.ts +3 -1
- package/catalog/create-publish-api.d.ts.map +1 -1
- package/catalog/create-publish-api.js +4 -0
- package/catalog/deployment-id.d.ts +13 -4
- package/catalog/deployment-id.d.ts.map +1 -1
- package/catalog/deployment-id.js +17 -3
- package/catalog/entity-details.d.ts +2 -0
- package/catalog/entity-details.d.ts.map +1 -1
- package/catalog/favorite-entity-type.d.ts +5 -0
- package/catalog/favorite-entity-type.d.ts.map +1 -0
- package/catalog/favorite-entity-type.js +10 -0
- package/catalog/map-deployment-limits-to-input.d.ts +4 -3
- package/catalog/map-deployment-limits-to-input.d.ts.map +1 -1
- package/catalog/map-deployment-limits-to-input.js +3 -4
- package/catalog/map-deployment-to-catalog-item.d.ts +12 -1
- package/catalog/map-deployment-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-deployment-to-catalog-item.js +22 -15
- package/catalog/map-entity-details-to-catalog.d.ts.map +1 -1
- package/catalog/map-entity-details-to-catalog.js +69 -24
- package/catalog/map-skill-to-catalog-item.d.ts +4 -5
- package/catalog/map-skill-to-catalog-item.d.ts.map +1 -1
- package/catalog/map-skill-to-catalog-item.js +29 -38
- package/catalog/publish.d.ts +1 -1
- package/catalog/publish.d.ts.map +1 -1
- package/catalog/resource-folder.d.ts +8 -0
- package/catalog/resource-folder.d.ts.map +1 -0
- package/catalog/resource-folder.js +13 -0
- package/catalog/resource-name-conflict.d.ts +22 -0
- package/catalog/resource-name-conflict.d.ts.map +1 -0
- package/catalog/resource-name-conflict.js +32 -0
- package/catalog/resource-save-adapter.d.ts +36 -0
- package/catalog/resource-save-adapter.d.ts.map +1 -0
- package/catalog/resource-save-adapter.js +4 -0
- package/catalog/resource-save-adapters.d.ts +93 -0
- package/catalog/resource-save-adapters.d.ts.map +1 -0
- package/catalog/resource-save-adapters.js +116 -0
- package/catalog/resource-save.d.ts +76 -0
- package/catalog/resource-save.d.ts.map +1 -0
- package/catalog/resource-save.js +52 -0
- package/catalog/unpublishable-folders.d.ts +21 -0
- package/catalog/unpublishable-folders.d.ts.map +1 -0
- package/catalog/unpublishable-folders.js +21 -0
- package/catalog/usage-limit-rows.d.ts +14 -0
- package/catalog/usage-limit-rows.d.ts.map +1 -0
- package/catalog/usage-limit-rows.js +19 -0
- package/catalog/use-publish-history.d.ts +19 -0
- package/catalog/use-publish-history.d.ts.map +1 -0
- package/catalog/use-publish-history.js +25 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts +57 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.d.ts.map +1 -0
- package/catalog/useApplicationCredentialActions/useApplicationCredentialActions.js +67 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts +15 -5
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.d.ts.map +1 -1
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +71 -89
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts +41 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.d.ts.map +1 -0
- package/catalog/useCatalogItemDelete/useCatalogItemDelete.js +37 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.d.ts.map +1 -1
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +72 -77
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +1 -1
- package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -0
- package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
- package/catalog/usePublishFolders/usePublishFolders.js +32 -29
- package/catalog/useResourceFolders/useResourceFolders.d.ts +33 -0
- package/catalog/useResourceFolders/useResourceFolders.d.ts.map +1 -0
- package/catalog/useResourceFolders/useResourceFolders.js +58 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +64 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -0
- package/catalog/useResourceSavePanel/useResourceSavePanel.js +173 -0
- package/catalog/useSkillItemDetails.js +3 -3
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts +43 -0
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.d.ts.map +1 -0
- package/catalog/useUnpublishConfirmation/useUnpublishConfirmation.js +46 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts +22 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.d.ts.map +1 -0
- package/catalog/useUnpublishableFolders/useUnpublishableFolders.js +53 -0
- package/catalog.js +41 -23
- package/conversation/conversation-data-source.d.ts +47 -0
- package/conversation/conversation-data-source.d.ts.map +1 -0
- package/conversation/conversation-data-source.js +11 -0
- package/conversation/conversation-draft/conversation-draft-store.js +40 -40
- package/conversation/conversation-list.d.ts +6 -0
- package/conversation/conversation-list.d.ts.map +1 -0
- package/conversation/conversation-list.js +5 -0
- package/conversation/conversation-title-stream.d.ts +33 -0
- package/conversation/conversation-title-stream.d.ts.map +1 -0
- package/conversation/conversation-title-stream.js +103 -0
- package/conversation/conversation-transfer/attachment-refs.d.ts +10 -2
- package/conversation/conversation-transfer/attachment-refs.d.ts.map +1 -1
- package/conversation/conversation-transfer/attachment-refs.js +31 -9
- package/conversation/conversation-transfer/export-conversation.d.ts +5 -1
- package/conversation/conversation-transfer/export-conversation.d.ts.map +1 -1
- package/conversation/conversation-transfer/export-conversation.js +19 -18
- package/conversation/conversation-transfer/import-conversation.d.ts +11 -6
- package/conversation/conversation-transfer/import-conversation.d.ts.map +1 -1
- package/conversation/conversation-transfer/import-conversation.js +65 -69
- package/conversation/conversation-transfer/progress.js +1 -1
- package/conversation/conversation-transfer/zip-export.js +1 -7
- package/conversation/conversation-transfer/zip-import.js +1 -1
- package/conversation/create-chat-stream-api.d.ts +19 -4
- package/conversation/create-chat-stream-api.d.ts.map +1 -1
- package/conversation/create-chat-stream-api.js +67 -61
- package/conversation/generation-registry.d.ts +30 -0
- package/conversation/generation-registry.d.ts.map +1 -0
- package/conversation/generation-registry.js +33 -0
- package/conversation/message-utils.d.ts +6 -0
- package/conversation/message-utils.d.ts.map +1 -1
- package/conversation/message-utils.js +14 -10
- package/conversation/scheduled-task-grouping.d.ts +53 -0
- package/conversation/scheduled-task-grouping.d.ts.map +1 -0
- package/conversation/scheduled-task-grouping.js +45 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts +4 -2
- package/conversation/useActiveConversationSync/useActiveConversationSync.d.ts.map +1 -1
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -12
- package/conversation/useAttachmentUpload/useAttachmentUpload.d.ts.map +1 -1
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +4 -1
- package/conversation/useConversationComposerDraft/useConversationComposerDraft.js +1 -5
- package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts +22 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.d.ts.map +1 -0
- package/conversation/useConversationDiscovery/useConversationDiscovery.js +60 -0
- package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
- package/conversation/useConversationExport/useConversationExport.js +113 -122
- package/conversation/useConversationHandlers/message-utils.js +2 -2
- package/conversation/useConversationHandlers/useConversationHandlers.js +41 -41
- package/conversation/useConversationImport/useConversationImport.js +24 -24
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts +18 -5
- package/conversation/useConversationPanelItems/useConversationPanelItems.d.ts.map +1 -1
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +34 -30
- package/conversation/useConversationScroll/useConversationScroll.d.ts.map +1 -1
- package/conversation/useConversationScroll/useConversationScroll.js +69 -72
- package/conversation/useConversationStream/conversation-path.js +2 -2
- package/conversation/useConversationStream/conversation-stream.types.d.ts +142 -0
- package/conversation/useConversationStream/conversation-stream.types.d.ts.map +1 -0
- package/conversation/useConversationStream/frame-scheduler.js +17 -17
- package/conversation/useConversationStream/generation-resume.d.ts +32 -2
- package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
- package/conversation/useConversationStream/generation-resume.js +114 -121
- package/conversation/useConversationStream/stream-errors.d.ts +10 -0
- package/conversation/useConversationStream/stream-errors.d.ts.map +1 -0
- package/conversation/useConversationStream/stream-errors.js +10 -0
- package/conversation/useConversationStream/stream-session.d.ts +51 -0
- package/conversation/useConversationStream/stream-session.d.ts.map +1 -0
- package/conversation/useConversationStream/stream-session.js +179 -0
- package/conversation/useConversationStream/useConversationReloadErrors.d.ts +25 -0
- package/conversation/useConversationStream/useConversationReloadErrors.d.ts.map +1 -0
- package/conversation/useConversationStream/useConversationReloadErrors.js +38 -0
- package/conversation/useConversationStream/useConversationStream.d.ts +3 -136
- package/conversation/useConversationStream/useConversationStream.d.ts.map +1 -1
- package/conversation/useConversationStream/useConversationStream.js +141 -339
- package/conversation/useConversationStream/useStopGeneration.d.ts +29 -0
- package/conversation/useConversationStream/useStopGeneration.d.ts.map +1 -0
- package/conversation/useConversationStream/useStopGeneration.js +48 -0
- package/conversation/useConversationStream/useStreamPathState.d.ts +39 -0
- package/conversation/useConversationStream/useStreamPathState.d.ts.map +1 -0
- package/conversation/useConversationStream/useStreamPathState.js +55 -0
- package/conversation/useConversationTitleEnrichmentController.d.ts +64 -0
- package/conversation/useConversationTitleEnrichmentController.d.ts.map +1 -0
- package/conversation/useConversationTitleEnrichmentController.js +155 -0
- package/conversation/useDeploymentChangeTracking.d.ts +14 -0
- package/conversation/useDeploymentChangeTracking.d.ts.map +1 -0
- package/conversation/useDeploymentChangeTracking.js +23 -0
- package/conversation/useEntityPreselection/useEntityPreselection.d.ts +108 -0
- package/conversation/useEntityPreselection/useEntityPreselection.d.ts.map +1 -0
- package/conversation/useEntityPreselection/useEntityPreselection.js +78 -0
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +4 -10
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts +8 -1
- package/conversation/useTranscribeAudio/useTranscribeAudio.d.ts.map +1 -1
- package/conversation/useTranscribeAudio/useTranscribeAudio.js +23 -17
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts +16 -0
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.d.ts.map +1 -0
- package/conversation/useVisibleConversationIdsReporter/useVisibleConversationIdsReporter.js +17 -0
- package/conversation-overlay.js +1 -2
- package/conversation-sources/stage-citations.d.ts +9 -0
- package/conversation-sources/stage-citations.d.ts.map +1 -0
- package/conversation-sources/stage-citations.js +8 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts +4 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.d.ts.map +1 -0
- package/conversation-sources/useConversationAnnotationPool/useConversationAnnotationPool.js +5 -0
- package/conversation-sources.js +3 -1
- package/conversation.js +45 -35
- package/entry-points/attachments.d.ts +1 -0
- package/entry-points/attachments.d.ts.map +1 -1
- package/entry-points/catalog.d.ts +17 -0
- package/entry-points/catalog.d.ts.map +1 -1
- package/entry-points/conversation-sources.d.ts +2 -0
- package/entry-points/conversation-sources.d.ts.map +1 -1
- package/entry-points/conversation.d.ts +10 -0
- package/entry-points/conversation.d.ts.map +1 -1
- package/entry-points/external-services.d.ts +6 -0
- package/entry-points/external-services.d.ts.map +1 -0
- package/entry-points/file-manager-canvas.d.ts +1 -0
- package/entry-points/file-manager-canvas.d.ts.map +1 -1
- package/entry-points/file-manager.d.ts +2 -0
- package/entry-points/file-manager.d.ts.map +1 -1
- package/entry-points/oauth.d.ts +1 -0
- package/entry-points/oauth.d.ts.map +1 -1
- package/entry-points/offline-credentials.d.ts +2 -0
- package/entry-points/offline-credentials.d.ts.map +1 -1
- package/entry-points/project.d.ts +20 -0
- package/entry-points/project.d.ts.map +1 -0
- package/entry-points/scheduled-tasks.d.ts +6 -0
- package/entry-points/scheduled-tasks.d.ts.map +1 -1
- package/entry-points/sharing.d.ts +4 -0
- package/entry-points/sharing.d.ts.map +1 -1
- package/entry-points/skill-editor.d.ts +2 -0
- package/entry-points/skill-editor.d.ts.map +1 -1
- package/entry-points/skills-state.d.ts +1 -0
- package/entry-points/skills-state.d.ts.map +1 -1
- package/entry-points/usage-limits.d.ts +1 -0
- package/entry-points/usage-limits.d.ts.map +1 -1
- package/entry-points/utils.d.ts +6 -0
- package/entry-points/utils.d.ts.map +1 -1
- package/entry-points/viewport-layout.d.ts +1 -0
- package/entry-points/viewport-layout.d.ts.map +1 -1
- package/external-services/useExternalServiceLogin.d.ts +99 -0
- package/external-services/useExternalServiceLogin.d.ts.map +1 -0
- package/external-services/useExternalServiceLogin.js +93 -0
- package/external-services.d.ts +2 -0
- package/external-services.js +5 -0
- package/file-manager-canvas.js +3 -2
- package/file-manager.js +32 -30
- package/files/attachment-canvas.d.ts +12 -0
- package/files/attachment-canvas.d.ts.map +1 -1
- package/files/attachment-canvas.js +18 -10
- package/files/attachment-dto-to-display.d.ts.map +1 -1
- package/files/attachment-dto-to-display.js +13 -12
- package/files/attachment-types.js +1 -1
- package/files/browser-download.d.ts +9 -0
- package/files/browser-download.d.ts.map +1 -0
- package/files/browser-download.js +23 -0
- package/files/create-files-api.d.ts +3 -4
- package/files/create-files-api.d.ts.map +1 -1
- package/files/create-files-api.js +1 -1
- package/files/create-upload-file-with-progress.d.ts +21 -1
- package/files/create-upload-file-with-progress.d.ts.map +1 -1
- package/files/create-upload-file-with-progress.js +50 -34
- package/files/dial-file-manager-copy-move.util.d.ts.map +1 -1
- package/files/dial-file-manager-copy-move.util.js +28 -28
- package/files/dial-file-manager-mapping.util.d.ts +6 -2
- package/files/dial-file-manager-mapping.util.d.ts.map +1 -1
- package/files/dial-file-manager-mapping.util.js +85 -72
- package/files/dial-file-manager.types.d.ts +15 -5
- package/files/dial-file-manager.types.d.ts.map +1 -1
- package/files/dial-file-to-attachment.js +3 -3
- package/files/dial-file.d.ts +19 -0
- package/files/dial-file.d.ts.map +1 -1
- package/files/dial-file.js +20 -12
- package/files/dial-files-api.d.ts +2 -2
- package/files/dial-files-api.d.ts.map +1 -1
- package/files/download-progress.d.ts +33 -0
- package/files/download-progress.d.ts.map +1 -0
- package/files/download-progress.js +28 -0
- package/files/source-content.js +1 -1
- package/files/useDialFileListing/useDialFileListing.js +51 -66
- package/files/useDialFileManager/useDialFileManager.d.ts.map +1 -1
- package/files/useDialFileManager/useDialFileManager.js +5 -2
- package/files/useDialFileManagerSections/useDialFileManagerSections.d.ts.map +1 -1
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +59 -68
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +1 -1
- package/files/useDialFileMetadata/useDialFileMetadata.js +3 -3
- package/files/useDialFileMutations/useDialFileMutations.d.ts +9 -0
- package/files/useDialFileMutations/useDialFileMutations.d.ts.map +1 -1
- package/files/useDialFileMutations/useDialFileMutations.js +232 -159
- package/files/useDialFilePreview/useDialFilePreview.d.ts +33 -0
- package/files/useDialFilePreview/useDialFilePreview.d.ts.map +1 -0
- package/files/useDialFilePreview/useDialFilePreview.js +45 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.d.ts.map +1 -1
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +114 -103
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts +25 -0
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.d.ts.map +1 -0
- package/files/useFileAttachmentModalState/useFileAttachmentModalState.js +19 -0
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +2 -2
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts +23 -0
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.d.ts.map +1 -0
- package/files/useUnshareConfirmationState/useUnshareConfirmationState.js +18 -0
- package/index.d.ts +81 -0
- package/index.d.ts.map +1 -1
- package/index.js +244 -163
- package/mcp-apps/mcp-apps-api-client.d.ts.map +1 -1
- package/mcp-apps/mcp-apps-api-client.js +18 -17
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts +3 -2
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.d.ts.map +1 -1
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +28 -10
- package/mcp-apps/useMcpAppTools/useMcpAppTools.d.ts.map +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +45 -45
- package/oauth/authorize-url.d.ts +7 -1
- package/oauth/authorize-url.d.ts.map +1 -1
- package/oauth/authorize-url.js +14 -4
- package/oauth/callback-exchange.d.ts +49 -0
- package/oauth/callback-exchange.d.ts.map +1 -0
- package/oauth/callback-exchange.js +29 -0
- package/oauth/handshake.js +3 -10
- package/oauth/models.d.ts +25 -0
- package/oauth/models.d.ts.map +1 -1
- package/oauth/toolset-id.d.ts +7 -0
- package/oauth/toolset-id.d.ts.map +1 -1
- package/oauth/toolset-id.js +9 -2
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +2 -5
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts +7 -1
- package/oauth/useToolsetLogin/useToolsetLogin.d.ts.map +1 -1
- package/oauth/useToolsetLogin/useToolsetLogin.js +51 -42
- package/oauth.js +9 -8
- package/offline-credentials/map-offline-credentials-response.d.ts +5 -2
- package/offline-credentials/map-offline-credentials-response.d.ts.map +1 -1
- package/offline-credentials/map-offline-credentials-response.js +9 -7
- package/offline-credentials/scheduled-tasks-login-banner.d.ts +31 -0
- package/offline-credentials/scheduled-tasks-login-banner.d.ts.map +1 -0
- package/offline-credentials/scheduled-tasks-login-banner.js +17 -0
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts +5 -1
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.d.ts.map +1 -1
- package/offline-credentials/useOfflineCredentialsGate/useOfflineCredentialsGate.js +25 -22
- package/offline-credentials/useOfflineCredentialsLogin/useOfflineCredentialsLogin.js +13 -13
- package/offline-credentials.js +6 -4
- package/package.json +36 -26
- package/project/create-project-chat.d.ts +34 -0
- package/project/create-project-chat.d.ts.map +1 -0
- package/project/create-project-chat.js +27 -0
- package/project/project-conversation-data-source.d.ts +36 -0
- package/project/project-conversation-data-source.d.ts.map +1 -0
- package/project/project-conversation-data-source.js +67 -0
- package/project/project-events.d.ts +14 -0
- package/project/project-events.d.ts.map +1 -0
- package/project/project-events.js +25 -0
- package/project/project-file-preview.d.ts +32 -0
- package/project/project-file-preview.d.ts.map +1 -0
- package/project/project-file-preview.js +25 -0
- package/project/project-form-errors.d.ts +23 -0
- package/project/project-form-errors.d.ts.map +1 -0
- package/project/project-form-errors.js +46 -0
- package/project/project-limits.d.ts +17 -0
- package/project/project-limits.d.ts.map +1 -0
- package/project/project-limits.js +11 -0
- package/project/project-mapping.d.ts +16 -0
- package/project/project-mapping.d.ts.map +1 -0
- package/project/project-mapping.js +43 -0
- package/project/project-refresh.d.ts +12 -0
- package/project/project-refresh.d.ts.map +1 -0
- package/project/project-refresh.js +6 -0
- package/project/project-viewed-marks.d.ts +9 -0
- package/project/project-viewed-marks.d.ts.map +1 -0
- package/project/project-viewed-marks.js +8 -0
- package/project/project-watch-stream.d.ts +26 -0
- package/project/project-watch-stream.d.ts.map +1 -0
- package/project/project-watch-stream.js +39 -0
- package/project/projects-api-client.d.ts +179 -0
- package/project/projects-api-client.d.ts.map +1 -0
- package/project/projects-api-client.js +90 -0
- package/project/use-pinned-project-chats.d.ts +58 -0
- package/project/use-pinned-project-chats.d.ts.map +1 -0
- package/project/use-pinned-project-chats.js +269 -0
- package/project/use-project-actions.d.ts +53 -0
- package/project/use-project-actions.d.ts.map +1 -0
- package/project/use-project-actions.js +92 -0
- package/project/use-project-artifacts.d.ts +24 -0
- package/project/use-project-artifacts.d.ts.map +1 -0
- package/project/use-project-artifacts.js +78 -0
- package/project/use-project-conversations.d.ts +32 -0
- package/project/use-project-conversations.d.ts.map +1 -0
- package/project/use-project-conversations.js +200 -0
- package/project/use-project-draft.d.ts +46 -0
- package/project/use-project-draft.d.ts.map +1 -0
- package/project/use-project-draft.js +54 -0
- package/project/use-project-file-preview.d.ts +47 -0
- package/project/use-project-file-preview.d.ts.map +1 -0
- package/project/use-project-file-preview.js +50 -0
- package/project/use-project-submit.d.ts +49 -0
- package/project/use-project-submit.d.ts.map +1 -0
- package/project/use-project-submit.js +73 -0
- package/project/use-project-watch.d.ts +24 -0
- package/project/use-project-watch.d.ts.map +1 -0
- package/project/use-project-watch.js +41 -0
- package/project/use-project.d.ts +23 -0
- package/project/use-project.d.ts.map +1 -0
- package/project/use-project.js +73 -0
- package/project/use-projects.d.ts +27 -0
- package/project/use-projects.d.ts.map +1 -0
- package/project/use-projects.js +92 -0
- package/project.d.ts +2 -0
- package/project.js +20 -0
- package/prompt/prompt.d.ts +11 -0
- package/prompt/prompt.d.ts.map +1 -1
- package/prompt/prompt.js +7 -3
- package/scheduled-task/active-scheduled-task.d.ts +58 -0
- package/scheduled-task/active-scheduled-task.d.ts.map +1 -0
- package/scheduled-task/active-scheduled-task.js +18 -0
- package/scheduled-task/scheduled-task-description.d.ts +2 -0
- package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-description.js +33 -24
- package/scheduled-task/scheduled-task-display.d.ts +106 -0
- package/scheduled-task/scheduled-task-display.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-display.js +69 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts +9 -0
- package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -0
- package/scheduled-task/scheduled-task-next-occurrence.js +20 -0
- package/scheduled-task/scheduled-task-preparation.d.ts +1 -1
- package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
- package/scheduled-task/scheduled-task-trigger.js +75 -48
- package/scheduled-task/use-scheduled-task-runs.js +19 -31
- package/scheduled-task/use-scheduled-tasks.d.ts +2 -2
- package/scheduled-task/use-scheduled-tasks.js +1 -1
- package/scheduled-task/useActiveScheduledTaskDetails.d.ts +18 -0
- package/scheduled-task/useActiveScheduledTaskDetails.d.ts.map +1 -0
- package/scheduled-task/useActiveScheduledTaskDetails.js +40 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts +17 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.d.ts.map +1 -0
- package/scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js +29 -0
- package/scheduled-task/useStartScheduledTask.d.ts +41 -0
- package/scheduled-task/useStartScheduledTask.d.ts.map +1 -0
- package/scheduled-task/useStartScheduledTask.js +169 -0
- package/scheduled-tasks.js +13 -7
- package/scroll-anchoring.js +1 -2
- package/share-invitation/models.d.ts +46 -0
- package/share-invitation/models.d.ts.map +1 -0
- package/share-invitation/share-invitation-error.d.ts +6 -0
- package/share-invitation/share-invitation-error.d.ts.map +1 -0
- package/share-invitation/share-invitation-error.js +37 -0
- package/share-invitation/types.d.ts +10 -0
- package/share-invitation/types.d.ts.map +1 -0
- package/share-invitation/types.js +6 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts +9 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.d.ts.map +1 -0
- package/share-invitation/useAcceptShareInvitation/useAcceptShareInvitation.js +26 -0
- package/shared/application-schema.js +3 -3
- package/shared/client-channel.d.ts +53 -0
- package/shared/client-channel.d.ts.map +1 -0
- package/shared/client-channel.js +6 -0
- package/shared/cron-day-of-month.js +10 -10
- package/shared/external-services.d.ts +1 -1
- package/shared/locale.d.ts +6 -2
- package/shared/locale.d.ts.map +1 -1
- package/shared/locale.js +4 -4
- package/shared/read-sse-events.d.ts +10 -0
- package/shared/read-sse-events.d.ts.map +1 -0
- package/shared/read-sse-events.js +33 -0
- package/shared/serialized-writer.d.ts +12 -0
- package/shared/serialized-writer.d.ts.map +1 -0
- package/shared/serialized-writer.js +44 -0
- package/shared/sleep.d.ts +3 -0
- package/shared/sleep.d.ts.map +1 -0
- package/shared/sleep.js +13 -0
- package/shared/theme-colors.d.ts +16 -0
- package/shared/theme-colors.d.ts.map +1 -0
- package/shared/theme-colors.js +14 -0
- package/shared/url-cleanup.d.ts +18 -0
- package/shared/url-cleanup.d.ts.map +1 -0
- package/shared/url-cleanup.js +18 -0
- package/shared/usage-stat.d.ts +3 -0
- package/shared/usage-stat.d.ts.map +1 -0
- package/shared/usage-stat.js +4 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.d.ts +22 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.d.ts.map +1 -0
- package/shared/useAppVersionCheck/useAppVersionCheck.js +36 -0
- package/shared/usePersistedState/usePersistedState.d.ts +28 -0
- package/shared/usePersistedState/usePersistedState.d.ts.map +1 -0
- package/shared/usePersistedState/usePersistedState.js +24 -0
- package/sharing.js +5 -2
- package/signin-interrupt/models.d.ts +48 -0
- package/signin-interrupt/models.d.ts.map +1 -0
- package/signin-interrupt/signin-row-info.d.ts +10 -0
- package/signin-interrupt/signin-row-info.d.ts.map +1 -0
- package/signin-interrupt/signin-row-info.js +21 -0
- package/signin-interrupt/types.d.ts +28 -0
- package/signin-interrupt/types.d.ts.map +1 -0
- package/signin-interrupt/types.js +10 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts +52 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.d.ts.map +1 -0
- package/signin-interrupt/useSigninInterrupt/useSigninInterrupt.js +270 -0
- package/skill/skill-file-batch-validation.d.ts +4 -0
- package/skill/skill-file-batch-validation.d.ts.map +1 -1
- package/skill/skill-file-batch-validation.js +34 -33
- package/skill/skill-lookup.d.ts +20 -0
- package/skill/skill-lookup.d.ts.map +1 -0
- package/skill/skill-lookup.js +12 -0
- package/skill/skill-types.js +1 -1
- package/skill/skill.d.ts +5 -1
- package/skill/skill.d.ts.map +1 -1
- package/skill/skill.js +27 -28
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +1 -7
- package/skill/useSkillEditorSubmit.d.ts +15 -1
- package/skill/useSkillEditorSubmit.d.ts.map +1 -1
- package/skill/useSkillEditorSubmit.js +164 -87
- package/skill/useSkillFileActions.d.ts +2 -0
- package/skill/useSkillFileActions.d.ts.map +1 -1
- package/skill/useSkillFileActions.js +36 -21
- package/skill-editor/useSkillFilePreviewSyncController.d.ts +41 -0
- package/skill-editor/useSkillFilePreviewSyncController.d.ts.map +1 -0
- package/skill-editor/useSkillFilePreviewSyncController.js +58 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts +23 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.d.ts.map +1 -0
- package/skill-editor/useSkillFileSystemPicker/useSkillFileSystemPicker.js +43 -0
- package/skill-editor.js +11 -9
- package/skills-state.js +3 -2
- package/source-content.js +1 -2
- package/usage/map-user-usage-to-model-limits.d.ts.map +1 -1
- package/usage/map-user-usage-to-model-limits.js +24 -24
- package/usage/usage-banner-source.d.ts +8 -7
- package/usage/usage-banner-source.d.ts.map +1 -1
- package/usage/usage-banner-source.js +46 -21
- package/usage/usage-gauge.d.ts +3 -0
- package/usage/usage-gauge.d.ts.map +1 -0
- package/usage/usage-gauge.js +4 -0
- package/usage/usage-reset-time.d.ts +12 -3
- package/usage/usage-reset-time.d.ts.map +1 -1
- package/usage/usage-reset-time.js +48 -38
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts +42 -18
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.d.ts.map +1 -1
- package/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js +23 -28
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts +10 -8
- package/usage/useUsageLimitBanner/useUsageLimitBanner.d.ts.map +1 -1
- package/usage/useUsageLimitBanner/useUsageLimitBanner.js +28 -25
- package/usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js +1 -1
- package/usage-limits.js +10 -8
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts +2 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.d.ts.map +1 -1
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +25 -21
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/useShareLink/useShareLink.js +18 -18
- package/utils.js +23 -17
- package/viewport-layout/canvas-width.d.ts +39 -0
- package/viewport-layout/canvas-width.d.ts.map +1 -0
- package/viewport-layout/canvas-width.js +23 -0
- package/viewport-layout.js +2 -1
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
import { useCallback as e, useEffect as t,
|
|
1
|
+
import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
|
|
2
2
|
//#region src/usage/useDeploymentUsageLimits/useDeploymentUsageLimits.ts
|
|
3
|
-
var
|
|
4
|
-
let [
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
3
|
+
var a = (a, o) => {
|
|
4
|
+
let [s, c] = i(), [l, u] = i(), [d, f] = i(!1), [p, m] = i(!1), [h, g] = i(0), _ = r(0), v = r(!1), y = r(void 0), b = r(o);
|
|
5
|
+
b.current = o;
|
|
6
|
+
let x = e(() => {
|
|
7
|
+
v.current || g((e) => e + 1);
|
|
8
8
|
}, []);
|
|
9
9
|
return t(() => {
|
|
10
|
-
let e =
|
|
11
|
-
if (
|
|
12
|
-
|
|
10
|
+
let e = y.current !== a;
|
|
11
|
+
if (y.current = a, !a) {
|
|
12
|
+
_.current += 1, c(void 0), f(!1), m(!1), v.current = !1;
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
e &&
|
|
16
|
-
let t = ++
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (n || t !== m.current) return;
|
|
21
|
-
s(e);
|
|
22
|
-
} catch {
|
|
23
|
-
if (n || t !== m.current) return;
|
|
24
|
-
d(!0);
|
|
25
|
-
} finally {
|
|
26
|
-
!n && t === m.current && (l(!1), h.current = !1);
|
|
27
|
-
}
|
|
15
|
+
e && c(void 0);
|
|
16
|
+
let t = ++_.current, n = !1, r = () => !n && t === _.current;
|
|
17
|
+
return f(!0), m(!1), v.current = !0, (async () => {
|
|
18
|
+
let [e, t] = await Promise.allSettled([b.current.getDeploymentUsage(a), b.current.getAccountUsage()]);
|
|
19
|
+
r() && (e.status === "fulfilled" && c(e.value), t.status === "fulfilled" && u(t.value), m(e.status === "rejected" || t.status === "rejected"), f(!1), v.current = !1);
|
|
28
20
|
})(), () => {
|
|
29
21
|
n = !0;
|
|
30
22
|
};
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
}, [a, h]), {
|
|
24
|
+
sources: n(() => ({
|
|
25
|
+
deployment: s,
|
|
26
|
+
account: l
|
|
27
|
+
}), [s, l]),
|
|
28
|
+
isLoading: d,
|
|
29
|
+
hasError: p,
|
|
30
|
+
refresh: x
|
|
36
31
|
};
|
|
37
32
|
};
|
|
38
33
|
//#endregion
|
|
39
|
-
export {
|
|
34
|
+
export { a as useDeploymentUsageLimits };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UsageLimitBannerViewProps } from '@epam/ai-dial-conversation-input';
|
|
2
2
|
import { TranslateFn } from '../usage-reset-time';
|
|
3
|
-
import {
|
|
3
|
+
import { UsageLimitsApi } from '../useDeploymentUsageLimits/useDeploymentUsageLimits';
|
|
4
4
|
/**
|
|
5
5
|
* i18n key strings the consuming app's translation bundle must define for
|
|
6
6
|
* `useUsageLimitBanner` to produce translated strings, in addition to
|
|
@@ -29,8 +29,10 @@ export interface UseUsageLimitBannerOptions {
|
|
|
29
29
|
deploymentId: string | undefined;
|
|
30
30
|
/** Whether the selected deployment is currently generating a response. Defaults to `false`. */
|
|
31
31
|
isGenerationInProgress?: boolean;
|
|
32
|
-
/** Host-configured call that fetches one deployment's
|
|
33
|
-
|
|
32
|
+
/** Host-configured call that fetches one deployment's own usage. */
|
|
33
|
+
getDeploymentUsage: UsageLimitsApi['getDeploymentUsage'];
|
|
34
|
+
/** Host-configured call that fetches the caller's account usage. */
|
|
35
|
+
getAccountUsage: UsageLimitsApi['getAccountUsage'];
|
|
34
36
|
/** Used percentage at or above which a not-yet-exhausted limit raises a warning. */
|
|
35
37
|
warningThresholdPercent: number;
|
|
36
38
|
/** Active UI locale, used to format the reset time. */
|
|
@@ -47,10 +49,10 @@ export interface UseUsageLimitBannerResult {
|
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* Everything the composer usage banner needs except its rendering: fetches the
|
|
50
|
-
* selected deployment's
|
|
51
|
-
* the limit worth reporting, formats its sentences, and
|
|
52
|
-
* dismissal. Spread `banner` onto `UsageLimitBannerView`
|
|
53
|
-
* `@epam/ai-dial-conversation-input`.
|
|
52
|
+
* selected deployment's own usage and the account usage, refreshes both after
|
|
53
|
+
* each generation, picks the limit worth reporting, formats its sentences, and
|
|
54
|
+
* tracks tab-lifetime dismissal. Spread `banner` onto `UsageLimitBannerView`
|
|
55
|
+
* from `@epam/ai-dial-conversation-input`.
|
|
54
56
|
*/
|
|
55
|
-
export declare const useUsageLimitBanner: ({ deploymentId, isGenerationInProgress,
|
|
57
|
+
export declare const useUsageLimitBanner: ({ deploymentId, isGenerationInProgress, getDeploymentUsage, getAccountUsage, warningThresholdPercent, activeLocale, t, }: UseUsageLimitBannerOptions) => UseUsageLimitBannerResult;
|
|
56
58
|
//# sourceMappingURL=useUsageLimitBanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUsageLimitBanner.d.ts","sourceRoot":"","sources":["../../../src/usage/useUsageLimitBanner/useUsageLimitBanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"useUsageLimitBanner.d.ts","sourceRoot":"","sources":["../../../src/usage/useUsageLimitBanner/useUsageLimitBanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,sDAAsD,CAAC;AAI9D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;IACjC,0EAA0E;;IAE1E,2EAA2E;;IAE3E,4EAA4E;;IAE5E,0EAA0E;;IAE1E,2EAA2E;;IAE3E,4EAA4E;;IAE5E,2CAA2C;;CAEnC,CAAC;AAkBX,6CAA6C;AAC7C,MAAM,WAAW,0BAA0B;IACzC,+CAA+C;IAC/C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,+FAA+F;IAC/F,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,oEAAoE;IACpE,kBAAkB,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;IACzD,oEAAoE;IACpE,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACnD,oFAAoF;IACpF,uBAAuB,EAAE,MAAM,CAAC;IAChC,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,CAAC,EAAE,WAAW,CAAC;CAChB;AAED,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,yBAAyB,EACzB,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,gBAAgB,CAClE,CAAC;AAEF,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC,wIAAwI;IACxI,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,0HAQjC,0BAA0B,KAAG,yBAqE/B,CAAC"}
|
|
@@ -26,41 +26,44 @@ var l = {
|
|
|
26
26
|
[e.Week]: l.reachedWeek,
|
|
27
27
|
[e.Month]: l.reachedMonth
|
|
28
28
|
}
|
|
29
|
-
}, d = ({ deploymentId: e, isGenerationInProgress: c = !1,
|
|
30
|
-
let
|
|
29
|
+
}, d = ({ deploymentId: e, isGenerationInProgress: c = !1, getDeploymentUsage: d, getAccountUsage: f, warningThresholdPercent: p, activeLocale: m, t: h }) => {
|
|
30
|
+
let g = s(() => ({
|
|
31
|
+
getDeploymentUsage: d,
|
|
32
|
+
getAccountUsage: f
|
|
33
|
+
}), [d, f]), { sources: _, isLoading: v, refresh: y } = r(e, g), { isDismissed: b, dismiss: x } = a();
|
|
31
34
|
i({
|
|
32
35
|
isGenerationInProgress: c,
|
|
33
|
-
isLoading:
|
|
34
|
-
refresh:
|
|
36
|
+
isLoading: v,
|
|
37
|
+
refresh: y
|
|
35
38
|
});
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
38
|
-
dismissalKey: `${e}:${
|
|
39
|
-
limitText:
|
|
40
|
-
reset: n(
|
|
39
|
+
let S = s(() => t(_, p), [_, p]), C = s(() => {
|
|
40
|
+
if (S != null && e) return {
|
|
41
|
+
dismissalKey: `${e}:${S.period}:${S.severity}`,
|
|
42
|
+
limitText: h(u[S.severity][S.period], { percent: S.usedPercent }),
|
|
43
|
+
reset: n(S.resetsAt, S.period, m, h)
|
|
41
44
|
};
|
|
42
45
|
}, [
|
|
43
|
-
|
|
46
|
+
S,
|
|
44
47
|
e,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]),
|
|
48
|
-
|
|
49
|
-
}, [
|
|
48
|
+
m,
|
|
49
|
+
h
|
|
50
|
+
]), w = C?.dismissalKey, T = o(() => {
|
|
51
|
+
w != null && x(w);
|
|
52
|
+
}, [x, w]), E = h(l.closeLabel);
|
|
50
53
|
return { banner: s(() => {
|
|
51
|
-
if (!(
|
|
52
|
-
severity:
|
|
53
|
-
limitText:
|
|
54
|
-
reset:
|
|
55
|
-
onClose:
|
|
56
|
-
closeAriaLabel:
|
|
54
|
+
if (!(S == null || C == null || b(C.dismissalKey))) return {
|
|
55
|
+
severity: S.severity,
|
|
56
|
+
limitText: C.limitText,
|
|
57
|
+
reset: C.reset,
|
|
58
|
+
onClose: T,
|
|
59
|
+
closeAriaLabel: E
|
|
57
60
|
};
|
|
58
61
|
}, [
|
|
59
|
-
|
|
60
|
-
x,
|
|
61
|
-
v,
|
|
62
|
+
S,
|
|
62
63
|
C,
|
|
63
|
-
|
|
64
|
+
b,
|
|
65
|
+
T,
|
|
66
|
+
E
|
|
64
67
|
]) };
|
|
65
68
|
};
|
|
66
69
|
//#endregion
|
|
@@ -9,7 +9,7 @@ var n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
|
9
9
|
return {
|
|
10
10
|
isDismissed: e((e) => r.has(e), [r]),
|
|
11
11
|
dismiss: e((e) => {
|
|
12
|
-
n.has(e) || i(new Set([...n, e]));
|
|
12
|
+
n.has(e) || i(/* @__PURE__ */ new Set([...n, e]));
|
|
13
13
|
}, [])
|
|
14
14
|
};
|
|
15
15
|
}, c = () => {
|
package/usage-limits.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { isCappedStat as e } from "./shared/usage-stat.js";
|
|
2
|
+
import { UsagePeriod as t } from "./usage/usage-period.js";
|
|
3
|
+
import { selectUsageBannerSource as n } from "./usage/usage-banner-source.js";
|
|
4
|
+
import { USAGE_RESET_I18N_KEYS as r, UsageResetOffsetPolicy as i, formatUsageResetShort as a, formatUsageResetTime as o } from "./usage/usage-reset-time.js";
|
|
5
|
+
import { getGaugeNeedleAngle as s } from "./usage/usage-gauge.js";
|
|
6
|
+
import { useDeploymentUsageLimits as c } from "./usage/useDeploymentUsageLimits/useDeploymentUsageLimits.js";
|
|
7
|
+
import { useRefreshUsageAfterGeneration as l } from "./usage/useRefreshUsageAfterGeneration/useRefreshUsageAfterGeneration.js";
|
|
8
|
+
import { resetUsageLimitBannerDismissals as u, useUsageLimitBannerDismissal as d } from "./usage/useUsageLimitBannerDismissal/useUsageLimitBannerDismissal.js";
|
|
9
|
+
import { USAGE_BANNER_I18N_KEYS as f, useUsageLimitBanner as p } from "./usage/useUsageLimitBanner/useUsageLimitBanner.js";
|
|
10
|
+
export { f as USAGE_BANNER_I18N_KEYS, r as USAGE_RESET_I18N_KEYS, t as UsagePeriod, i as UsageResetOffsetPolicy, a as formatUsageResetShort, o as formatUsageResetTime, s as getGaugeNeedleAngle, e as isCappedStat, u as resetUsageLimitBannerDismissals, n as selectUsageBannerSource, c as useDeploymentUsageLimits, l as useRefreshUsageAfterGeneration, p as useUsageLimitBanner, d as useUsageLimitBannerDismissal };
|
|
@@ -8,6 +8,8 @@ export interface ChatSettingsValues {
|
|
|
8
8
|
/** Updated temperature, present when the temperature field was shown. */
|
|
9
9
|
temperature?: number;
|
|
10
10
|
}
|
|
11
|
+
/** Chat settings a conversation starts with before the user changes any: Markdown, no system prompt, temperature `0.5`. */
|
|
12
|
+
export declare const DEFAULT_CHAT_SETTINGS: Readonly<Required<ChatSettingsValues>>;
|
|
11
13
|
/**
|
|
12
14
|
* Translatable strings the chat-settings form surfaces. Every field defaults
|
|
13
15
|
* to an English fallback inside the hook; pass translated values from the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatSettingsFormConfig.d.ts","sourceRoot":"","sources":["../../src/useChatSettingsFormConfig/useChatSettingsFormConfig.ts"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"useChatSettingsFormConfig.d.ts","sourceRoot":"","sources":["../../src/useChatSettingsFormConfig/useChatSettingsFormConfig.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,6 +2,10 @@ import { ResponseFormat as e } from "@epam/ai-dial-chat-shared";
|
|
|
2
2
|
import { useCallback as t, useMemo as n } from "react";
|
|
3
3
|
//#region src/useChatSettingsFormConfig/useChatSettingsFormConfig.ts
|
|
4
4
|
var r = {
|
|
5
|
+
responseFormat: e.Markdown,
|
|
6
|
+
systemPrompt: "",
|
|
7
|
+
temperature: .5
|
|
8
|
+
}, i = {
|
|
5
9
|
settings: "Settings",
|
|
6
10
|
savedNotification: "Chat settings have been saved",
|
|
7
11
|
responseFormatLabel: "Response format",
|
|
@@ -17,11 +21,11 @@ var r = {
|
|
|
17
21
|
temperatureHint: "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.",
|
|
18
22
|
saveLabel: "Apply changes",
|
|
19
23
|
saveDisabledTooltip: "Please select a response format"
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
...
|
|
24
|
+
}, a = (t) => (t ?? "").toLowerCase().replace(/[^a-z]/g, "") === "plaintext" ? e.PlainText : e.Markdown, o = (e) => {
|
|
25
|
+
let r = n(() => ({
|
|
26
|
+
...i,
|
|
23
27
|
...e.labels
|
|
24
|
-
}), [e.labels]), { onSaved: o } = e, s = e.mode === "local" ? e.values.responseFormat :
|
|
28
|
+
}), [e.labels]), { onSaved: o } = e, s = e.mode === "local" ? e.values.responseFormat : a(e.conversation.responseFormat), c = e.mode === "local" ? e.values.systemPrompt : e.conversation.prompt ?? "", l = e.mode === "local" ? e.values.temperature : e.conversation.temperature ?? .5, u = t((t) => {
|
|
25
29
|
e.mode === "local" ? e.onValuesChange({
|
|
26
30
|
responseFormat: t.responseFormat ?? e.values.responseFormat,
|
|
27
31
|
systemPrompt: t.systemPrompt ?? e.values.systemPrompt,
|
|
@@ -43,32 +47,32 @@ var r = {
|
|
|
43
47
|
systemPrompt: c,
|
|
44
48
|
temperature: l,
|
|
45
49
|
onSave: u,
|
|
46
|
-
menuItemLabel:
|
|
47
|
-
title:
|
|
48
|
-
responseFormatLabel:
|
|
49
|
-
responseFormatHint:
|
|
50
|
-
responseFormatMarkdownLabel:
|
|
51
|
-
responseFormatPlainTextLabel:
|
|
52
|
-
systemPromptLabel:
|
|
53
|
-
systemPromptTooltip:
|
|
54
|
-
temperatureLabel:
|
|
50
|
+
menuItemLabel: r.settings,
|
|
51
|
+
title: r.settings,
|
|
52
|
+
responseFormatLabel: r.responseFormatLabel,
|
|
53
|
+
responseFormatHint: r.responseFormatHint,
|
|
54
|
+
responseFormatMarkdownLabel: r.responseFormatMarkdown,
|
|
55
|
+
responseFormatPlainTextLabel: r.responseFormatPlainText,
|
|
56
|
+
systemPromptLabel: r.systemPromptLabel,
|
|
57
|
+
systemPromptTooltip: r.systemPromptTooltip,
|
|
58
|
+
temperatureLabel: r.temperatureLabel,
|
|
55
59
|
temperatureLabels: [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
r.temperaturePrecise,
|
|
61
|
+
r.temperatureNeutral,
|
|
62
|
+
r.temperatureCreative
|
|
59
63
|
],
|
|
60
|
-
temperatureHint:
|
|
61
|
-
saveLabel:
|
|
62
|
-
saveDisabledTooltip:
|
|
64
|
+
temperatureHint: r.temperatureHint,
|
|
65
|
+
saveLabel: r.saveLabel,
|
|
66
|
+
saveDisabledTooltip: r.saveDisabledTooltip
|
|
63
67
|
}), [
|
|
64
68
|
u,
|
|
65
69
|
d,
|
|
66
70
|
f,
|
|
67
|
-
|
|
71
|
+
r,
|
|
68
72
|
s,
|
|
69
73
|
c,
|
|
70
74
|
l
|
|
71
75
|
]);
|
|
72
76
|
};
|
|
73
77
|
//#endregion
|
|
74
|
-
export {
|
|
78
|
+
export { r as DEFAULT_CHAT_SETTINGS, o as useChatSettingsFormConfig };
|
|
@@ -10,13 +10,13 @@ var a = (a = !0, o = !0) => {
|
|
|
10
10
|
}, [l]);
|
|
11
11
|
return t(() => {
|
|
12
12
|
let e = (e) => !!e.dataTransfer?.types.includes("Files"), t = (t) => {
|
|
13
|
-
|
|
13
|
+
p.current && e(t) && (d.current += 1, c(!0));
|
|
14
14
|
}, n = (t) => {
|
|
15
|
-
|
|
15
|
+
p.current && e(t) && (--d.current, d.current <= 0 && (d.current = 0, c(!1)));
|
|
16
16
|
}, r = (t) => {
|
|
17
17
|
e(t) && (t.preventDefault(), p.current);
|
|
18
18
|
}, i = (t) => {
|
|
19
|
-
if (
|
|
19
|
+
if (e(t) && p.current && (t.preventDefault(), d.current = 0, c(!1), f.current)) {
|
|
20
20
|
let e = Array.from(t.dataTransfer?.files ?? []);
|
|
21
21
|
e.length > 0 && u((t) => [...t, ...e]);
|
|
22
22
|
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ShareLinkResponseDtoAccessEnum as e } from "@epam/ai-dial-chat-api-client";
|
|
2
|
+
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
3
3
|
import { ShareLinkAccess as a } from "@epam/ai-dial-share";
|
|
4
4
|
//#region src/useShareLink/useShareLink.ts
|
|
5
|
-
var o = (
|
|
5
|
+
var o = (t) => t.map((t) => t === e.Edit ? a.Edit : a.View), s = (e, t) => {
|
|
6
6
|
let n = new URL(e, t);
|
|
7
7
|
return `${t}${n.pathname}${n.search}${n.hash}`;
|
|
8
|
-
}, c = (
|
|
9
|
-
let [u, d] =
|
|
10
|
-
let
|
|
8
|
+
}, c = (e, c, l = window.location.origin) => {
|
|
9
|
+
let [u, d] = i(), [f, p] = i(!0), [m, h] = i(null), g = r(0), _ = t(async (t = [a.View]) => {
|
|
10
|
+
let n = ++g.current;
|
|
11
11
|
p(!0), h(null);
|
|
12
12
|
try {
|
|
13
|
-
let
|
|
13
|
+
let r = await e.createShareLink({ createShareLinkDto: {
|
|
14
14
|
itemId: c,
|
|
15
|
-
access:
|
|
15
|
+
access: t
|
|
16
16
|
} });
|
|
17
|
-
g.current ===
|
|
18
|
-
url: s(
|
|
19
|
-
expiresInDays:
|
|
20
|
-
expiresInHours:
|
|
21
|
-
access: o(
|
|
17
|
+
g.current === n && d({
|
|
18
|
+
url: s(r.url, l),
|
|
19
|
+
expiresInDays: r.expiresInDays,
|
|
20
|
+
expiresInHours: r.expiresInHours,
|
|
21
|
+
access: o(r.access)
|
|
22
22
|
});
|
|
23
23
|
} catch (e) {
|
|
24
|
-
g.current ===
|
|
24
|
+
g.current === n && h(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to create share link"));
|
|
25
25
|
} finally {
|
|
26
|
-
g.current ===
|
|
26
|
+
g.current === n && p(!1);
|
|
27
27
|
}
|
|
28
28
|
}, [
|
|
29
29
|
c,
|
|
30
30
|
l,
|
|
31
|
-
|
|
31
|
+
e
|
|
32
32
|
]);
|
|
33
|
-
return
|
|
33
|
+
return n(() => {
|
|
34
34
|
d(void 0), _();
|
|
35
35
|
}, [c, _]), {
|
|
36
36
|
data: u,
|
|
37
37
|
isLoading: f,
|
|
38
38
|
error: m,
|
|
39
|
-
setAccess:
|
|
39
|
+
setAccess: t((e) => {
|
|
40
40
|
_(e);
|
|
41
41
|
}, [_])
|
|
42
42
|
};
|
package/utils.js
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createCsrfMiddleware as
|
|
3
|
-
import { createUnauthorizedMiddleware as
|
|
4
|
-
import { includesIgnoreCase as
|
|
5
|
-
import { appendLocaleCode as
|
|
6
|
-
import { formatCalendarDate as
|
|
7
|
-
import { PromptSource as
|
|
8
|
-
import { getRunnerSchemas as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
1
|
+
import { getAcceptInvitationErrorItemName as e, getApiErrorDetails as t, getApiErrorMessage as n, getApiErrorStatus as r, isConversationNotFoundError as i } from "./api-error/api-error.js";
|
|
2
|
+
import { createCsrfMiddleware as a } from "./api-transport/create-csrf-middleware.js";
|
|
3
|
+
import { createUnauthorizedMiddleware as o } from "./api-transport/create-unauthorized-middleware.js";
|
|
4
|
+
import { includesIgnoreCase as s, safeDecodeURI as c, safeDecodeURIComponent as l, stripSurroundingSlashes as u, stripTrailingSlashes as d } from "./shared/string-utils.js";
|
|
5
|
+
import { appendLocaleCode as f, buildAdditionalLocaleOptions as p, composeLocalePayload as m, decomposeLocalizedFields as h, resolveLocalizedText as g, toBaseLocale as _ } from "./shared/locale.js";
|
|
6
|
+
import { formatCalendarDate as v, padTwoDigits as y } from "./shared/formatting.js";
|
|
7
|
+
import { PromptSource as b, parsePromptResourceUrl as x } from "./prompt/prompt-resource.js";
|
|
8
|
+
import { getRunnerSchemas as S, isCustomAppSchema as C, isQuickAppSchema as w } from "./shared/application-schema.js";
|
|
9
|
+
import { buildExternalServiceScopeId as T, getExternalServiceFallbackName as E, parseExternalServiceUrl as D } from "./shared/external-services.js";
|
|
10
|
+
import { buildPromptExportEnvelope as O, buildPromptExportFileName as k, serializePromptExport as A } from "./prompt/export-prompt.js";
|
|
11
|
+
import { PROMPT_CONTENT_MAX_LENGTH as j, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as M, PROMPT_DESCRIPTION_MAX_LENGTH as N, PROMPT_FIELD_VALIDATORS as P, PROMPT_NAME_MAX_LENGTH as F, PromptFieldError as I, buildPromptPath as L, getRemainingCharacters as R, validatePromptContent as z, validatePromptDescription as B, validatePromptName as V } from "./prompt/prompt.js";
|
|
12
|
+
import { usePromptsState as H } from "./prompt/usePromptsState/usePromptsState.js";
|
|
13
|
+
import { apSchedulerDayToJsDay as U, jsDayToApSchedulerDay as W } from "./shared/cron-weekday.js";
|
|
14
|
+
import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
|
|
15
|
+
import { isValidAbsoluteUrl as K, isValidFeaturesData as q, parseFeaturesData as J } from "./shared/custom-apps.js";
|
|
16
|
+
import { EXTERNAL_SERVICE_SIGNIN_METHOD as Y, PendingSigninEventKind as X, TOOLSET_SIGNIN_METHOD as Z } from "./shared/client-channel.js";
|
|
17
|
+
import { ColorScheme as Q, applyThemeColors as $, getOsPreferredTheme as ee } from "./shared/theme-colors.js";
|
|
18
|
+
import { useUsageData as te } from "./usage/useUsageData/useUsageData.js";
|
|
19
|
+
import { triggerBrowserDownload as ne } from "./files/browser-download.js";
|
|
20
|
+
import { usePersistedState as re } from "./shared/usePersistedState/usePersistedState.js";
|
|
21
|
+
import { useAppVersionCheck as ie } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
|
|
22
|
+
import { getCleanedLocationTarget as ae } from "./shared/url-cleanup.js";
|
|
23
|
+
export { Q as ColorScheme, Y as EXTERNAL_SERVICE_SIGNIN_METHOD, j as PROMPT_CONTENT_MAX_LENGTH, M as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, N as PROMPT_DESCRIPTION_MAX_LENGTH, P as PROMPT_FIELD_VALIDATORS, F as PROMPT_NAME_MAX_LENGTH, X as PendingSigninEventKind, I as PromptFieldError, b as PromptSource, Z as TOOLSET_SIGNIN_METHOD, U as apSchedulerDayToJsDay, f as appendLocaleCode, $ as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, O as buildPromptExportEnvelope, k as buildPromptExportFileName, L as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, ae as getCleanedLocationTarget, E as getExternalServiceFallbackName, ee as getOsPreferredTheme, R as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, K as isValidAbsoluteUrl, q as isValidFeaturesData, W as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, J as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, A as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, ne as triggerBrowserDownload, ie as useAppVersionCheck, re as usePersistedState, H as usePromptsState, te as useUsageData, z as validatePromptContent, B as validatePromptDescription, V as validatePromptName };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Canvas width calculation mode. */
|
|
2
|
+
export declare enum CanvasWidthMode {
|
|
3
|
+
BoundedPanel = "bounded-panel",
|
|
4
|
+
Conversation = "conversation"
|
|
5
|
+
}
|
|
6
|
+
/** Host-owned numeric layout policy. */
|
|
7
|
+
export interface CanvasWidthPolicy {
|
|
8
|
+
/** Bounded-panel minimum width. */
|
|
9
|
+
minWidth: number;
|
|
10
|
+
/** Bounded-panel preferred maximum width. */
|
|
11
|
+
defaultMaxWidth: number;
|
|
12
|
+
/** Bounded-panel viewport share. */
|
|
13
|
+
widthRatio: number;
|
|
14
|
+
/** Minimum content budget used by conversation mode. */
|
|
15
|
+
minContentWidth: number;
|
|
16
|
+
}
|
|
17
|
+
/** Inputs for canvas width calculation. */
|
|
18
|
+
export interface ResolveCanvasWidthParams {
|
|
19
|
+
/** Calculation mode. */
|
|
20
|
+
mode: CanvasWidthMode;
|
|
21
|
+
/** Whether the panel fills the viewport. */
|
|
22
|
+
isMobile: boolean;
|
|
23
|
+
/** Viewport width in pixels. */
|
|
24
|
+
viewportWidth: number;
|
|
25
|
+
/** Available width in pixels. */
|
|
26
|
+
maxWidth: number;
|
|
27
|
+
/** Host layout values. */
|
|
28
|
+
policy: CanvasWidthPolicy;
|
|
29
|
+
}
|
|
30
|
+
/** Initial and minimum canvas widths in pixels. */
|
|
31
|
+
export interface CanvasWidth {
|
|
32
|
+
/** Initial width. */
|
|
33
|
+
defaultWidth: number;
|
|
34
|
+
/** Bounded-panel minimum; undefined in conversation mode. */
|
|
35
|
+
minWidth: number | undefined;
|
|
36
|
+
}
|
|
37
|
+
/** Calculates canvas width using the supplied numeric policy. */
|
|
38
|
+
export declare const resolveCanvasWidth: ({ mode, isMobile, viewportWidth, maxWidth, policy, }: ResolveCanvasWidthParams) => CanvasWidth;
|
|
39
|
+
//# sourceMappingURL=canvas-width.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-width.d.ts","sourceRoot":"","sources":["../../src/viewport-layout/canvas-width.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,oBAAY,eAAe;IACzB,YAAY,kBAAkB;IAC9B,YAAY,iBAAiB;CAC9B;AACD,wCAAwC;AACxC,MAAM,WAAW,iBAAiB;IAChC,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,eAAe,EAAE,MAAM,CAAC;CACzB;AACD,2CAA2C;AAC3C,MAAM,WAAW,wBAAwB;IACvC,wBAAwB;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AACD,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AACD,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,GAAI,sDAMhC,wBAAwB,KAAG,WAmB7B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/viewport-layout/canvas-width.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.BoundedPanel = "bounded-panel", e.Conversation = "conversation", e;
|
|
4
|
+
}({}), t = ({ mode: e, isMobile: t, viewportWidth: n, maxWidth: r, policy: i }) => {
|
|
5
|
+
let a = e === "bounded-panel" ? i.minWidth : void 0;
|
|
6
|
+
if (t) return {
|
|
7
|
+
defaultWidth: n,
|
|
8
|
+
minWidth: a
|
|
9
|
+
};
|
|
10
|
+
if (e === "bounded-panel") {
|
|
11
|
+
let e = Math.round(n * i.widthRatio), t = Math.max(i.minWidth, Math.min(i.defaultMaxWidth, e));
|
|
12
|
+
return {
|
|
13
|
+
defaultWidth: Math.min(r, t),
|
|
14
|
+
minWidth: a
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
defaultWidth: Math.min(r, Math.round((r + i.minContentWidth) * .5)),
|
|
19
|
+
minWidth: a
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { e as CanvasWidthMode, t as resolveCanvasWidth };
|
package/viewport-layout.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { usePageFileDrag as e } from "./usePageFileDrag/usePageFileDrag.js";
|
|
2
2
|
import { useViewportWidth as t } from "./useViewportWidth/useViewportWidth.js";
|
|
3
3
|
import { usePanelMaxWidth as n } from "./usePanelMaxWidth/usePanelMaxWidth.js";
|
|
4
|
-
|
|
4
|
+
import { CanvasWidthMode as r, resolveCanvasWidth as i } from "./viewport-layout/canvas-width.js";
|
|
5
|
+
export { r as CanvasWidthMode, i as resolveCanvasWidth, e as usePageFileDrag, n as usePanelMaxWidth, t as useViewportWidth };
|