@widgetic/creator 0.4.0 → 0.4.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.
@@ -194,13 +194,13 @@ export declare const CREATOR_CATALOGS: {
194
194
  readonly 'creator.codegen.widgetCodeAtCommitRefreshing': "Widget code at commit {commit}. Refreshing preview…";
195
195
  readonly 'creator.codegen.gitRollbackMayNotHave': "Git rollback may not have applied. Try Rebuild from the preview panel.";
196
196
  readonly 'creator.codegen.codeGenerationCompleted': "Code generation completed";
197
- readonly 'creator.codegen.generationFinishedWhileYouWere': "Generation finished while you were away. Auto-saving to repo...";
198
197
  readonly 'creator.codegen.generationInProgress': "Generation in progress";
199
198
  readonly 'creator.codegen.reconnectedToAnActiveCode': "Reconnected to an active code generation. Please wait...";
200
- readonly 'creator.codegen.generationFinishedForADifferent': "Generation finished for a different widget.";
201
199
  readonly 'creator.codegen.codeSavedToGitlabAnd': "Code saved to GitLab and preview ready.";
202
200
  readonly 'creator.codegen.generationStopped': "Generation stopped";
203
201
  readonly 'creator.codegen.codeGenerationWasCancelledYou': "Code generation was cancelled. You can start a new generation.";
202
+ readonly 'creator.codegen.couldNotStopGeneration': "Could not stop the generation";
203
+ readonly 'creator.codegen.generationMayStillBeRunning': "The server did not confirm it, so the generation may still be running. Try Stop again in a moment.";
204
204
  readonly 'creator.codegen.imageAddedToYourPrompt': "Image added to your prompt.";
205
205
  readonly 'creator.codegen.generateCodeFirstToCapture': "Generate code first to capture a screenshot.";
206
206
  readonly 'creator.codegen.previewIsMissingTheCapture': "Preview is missing the capture library. Rebuild the widget preview, then try again.";
@@ -556,4 +556,4 @@ export declare const useCreatorLanguage: () => CANVAS_MESSAGES<import("./message
556
556
  * The English `t` of the creator, for code that has no component around it. The screens of the creator get their words, in
557
557
  * the page's language, from `useCreatorLanguage`.
558
558
  */
559
- export declare const translateEnglish: Translate<"creator.common.close" | "creator.common.new" | "creator.common.doubleClickToRename" | "creator.common.thisAppNeedsARefresh" | "creator.common.reload" | "creator.common.publish" | "creator.common.switchVersion" | "creator.common.live" | "creator.common.buildThisDraftVersionAnd" | "creator.common.setLive" | "creator.common.retry" | "creator.common.delete" | "creator.common.draft" | "creator.common.loading" | "creator.general.unknownError" | "creator.general.couldNotLoadUploadedImage" | "creator.general.tryUploadingTheImageAgain" | "creator.general.couldNotUpdateConversationStatus" | "creator.general.changeUndone" | "creator.general.failedToLoadEditorSettings" | "creator.general.setTo" | "creator.general.failedToUpdate" | "creator.general.failedToSaveDimensions" | "creator.general.nothingToSave" | "creator.general.serviceTemporarilyUnavailable" | "creator.general.retryingWhenTheApiIs" | "creator.general.invalidFileType" | "creator.general.pleaseSelectAnImageFile" | "creator.general.imageTooLarge" | "creator.general.maximumImageSizeIsMb" | "creator.general.tooManyImages" | "creator.general.maximumImagesAllowedRemoveAn" | "creator.general.failedToProcessImage" | "creator.general.couldNotReadTheImage" | "creator.general.imagePasted" | "creator.general.screenshotCaptureFailed" | "creator.general.missingOperationId" | "creator.general.switchToThatPanelTo" | "creator.general.limitReached" | "creator.general.rateLimited" | "creator.general.theApiRateLimitWas" | "creator.general.liveV" | "creator.general.anUnexpectedErrorOccurredPlease" | "creator.general.latestCommitIsAlreadyLive" | "creator.general.theServerRefusedTheRename" | "creator.general.checkYourConnectionAndTry" | "creator.general.unableToReachTheApi" | "creator.general.pleaseWaitForTheCurrent" | "creator.general.created" | "creator.general.saveBlocked" | "creator.general.keptALocalCopyCheck" | "creator.general.apiClientUnavailable" | "creator.general.screenshotCouldNotBeCaptured" | "creator.general.fixTheSelectionZoomOut" | "creator.general.checkConsoleForDetails" | "creator.general.retryLoad" | "creator.general.dismiss" | "creator.general.saving" | "creator.general.saved" | "creator.general.saveError" | "creator.general.loadingHistory" | "creator.general.upgrade" | "creator.general.fixInCreate" | "creator.general.fixInCreate2" | "creator.general.saving2" | "creator.general.save" | "creator.general.cancel" | "creator.general.noEditableSettingsAvailableYet" | "creator.general.dimensions" | "creator.general.w" | "creator.general.h" | "creator.general.px" | "creator.general.copy" | "creator.general.testPage" | "creator.general.zoomedReference" | "creator.general.keepInDatabase" | "creator.general.deleteFromDatabase" | "creator.general.checkingWhatWillBeDeleted" | "creator.general.describeWhatYouWant" | "creator.session.endedStartAgain" | "creator.session.canvasCannotOpen" | "creator.session.sessionEnded" | "creator.session.sessionExpiredSignInAgain" | "creator.session.sessionExpired" | "creator.session.authenticationExpired" | "creator.session.pleaseLoginAgainToContinue" | "creator.session.signInAgainToPublish" | "creator.session.loginRequiredToDuplicateWidget" | "creator.session.pleaseLoginFirst" | "creator.session.authenticationRequired" | "creator.session.pleaseLoginBeforeCreatingA" | "creator.session.thisWidgetReferencesARepository" | "creator.session.signInAgainThenRetry" | "creator.widget.notFound" | "creator.widget.fallbackName" | "creator.widget.noWidgetSelected" | "creator.widget.shapeRemoved" | "creator.widget.widgetKeptInDatabase" | "creator.widget.widgetDeletedFromDatabase" | "creator.widget.widgetWasAlreadyDeleted" | "creator.widget.failedToDeleteWidgetFrom" | "creator.widget.selectAWidgetFirst" | "creator.widget.duplicateFromTheHeaderCopies" | "creator.widget.failedToLoadWidgets" | "creator.widget.couldNotRestoreShapesYet" | "creator.widget.widgetRenamedTo" | "creator.widget.failedToRenameWidget" | "creator.widget.capturingWidgetScreenshot" | "creator.widget.fetchingWidgetComponent" | "creator.widget.creatingWidgetComponent" | "creator.widget.widgetsApiClientIsNot" | "creator.widget.unlinkedWidgetShape" | "creator.widget.duplicatingWidget" | "creator.widget.failedToDuplicateWidget" | "creator.widget.widgetDuplicated" | "creator.widget.widgetKeptInDatabase2" | "creator.widget.youCanKeepEditingWidgets" | "creator.widget.widgetDraftCreated" | "creator.widget.failedToPrepareWidgetDraft" | "creator.widget.failedToCreateWidgetFrom" | "creator.widget.widgetCreatedButNoId" | "creator.widget.widgetCreated" | "creator.widget.failedToFinalizeWidgetConversion" | "creator.widget.repoIdToDeleteUse" | "creator.widget.restoreShapes" | "creator.widget.directWidgetUrl" | "creator.widget.deleteWidgetShape" | "creator.widget.theseWidgetsBelongToMore" | "creator.canvas.appearsEmptyButWidgets" | "creator.canvas.restoredShapes" | "creator.canvas.removedTheLeftoverShapeFrom" | "creator.canvas.clickAWidgetOnThe" | "creator.canvas.canvasIsNotReadyYet" | "creator.canvas.failedToLoadCanvases" | "creator.canvas.couldNotDeleteThisCanvas" | "creator.canvas.noCanvasIdCannotLoad" | "creator.canvas.canvasMayStillBeLoading" | "creator.canvas.widgetPreviewUpdatedOnCanvas" | "creator.canvas.widgetCanvasAndRepositoryAre" | "creator.canvas.canvasIsRequiredBeforePublishing" | "creator.canvas.thisShapePointsToA" | "creator.canvas.shapeRemovedFromCanvas" | "creator.canvas.canvasIsTakingLongerThan" | "creator.canvas.canvasShapesFailedToRender" | "creator.canvas.failedToLoadCanvasFrom" | "creator.canvas.canvasLoadFailedCheckSupabase" | "creator.canvas.apiMayBeThrottledOr" | "creator.canvas.canvasSnapshotLookedEmptyRefresh" | "creator.canvas.canvasSaved" | "creator.canvas.canvasSaveFailed" | "creator.canvas.canvasSavedLocally" | "creator.canvas.noCanvasIdYet" | "creator.canvas.canvasUnavailable" | "creator.canvas.canvasShapesFailedToLoad" | "creator.canvas.shapeDataMayBeMissing" | "creator.canvas.deleteCanvas" | "creator.composition.compositionCreated" | "creator.composition.failedToCreateComposition" | "creator.composition.compositionSaved" | "creator.composition.compositionRenamed" | "creator.composition.failedToRenameComposition" | "creator.composition.compositionDeleted" | "creator.composition.failedToDeleteComposition" | "creator.composition.fixTheSyntaxErrorIn" | "creator.composition.compositions" | "creator.composition.selectComposition" | "creator.composition.deleteThisComposition" | "creator.composition.webComponentFormatRequiresA" | "creator.composition.compositionUrl" | "creator.codegen.referenceImages" | "creator.codegen.referenceNumber" | "creator.codegen.missingReferenceImage" | "creator.codegen.missingImageError" | "creator.codegen.visionModelNote" | "creator.codegen.noImageTitle" | "creator.codegen.repositoryCreated" | "creator.codegen.failedToCreateRepository" | "creator.codegen.noVisionNote" | "creator.codegen.codeRevertedToCommitRefreshing" | "creator.codegen.widgetCodeAtCommitRefreshing" | "creator.codegen.gitRollbackMayNotHave" | "creator.codegen.codeGenerationCompleted" | "creator.codegen.generationFinishedWhileYouWere" | "creator.codegen.generationInProgress" | "creator.codegen.reconnectedToAnActiveCode" | "creator.codegen.generationFinishedForADifferent" | "creator.codegen.codeSavedToGitlabAnd" | "creator.codegen.generationStopped" | "creator.codegen.codeGenerationWasCancelledYou" | "creator.codegen.imageAddedToYourPrompt" | "creator.codegen.generateCodeFirstToCapture" | "creator.codegen.previewIsMissingTheCapture" | "creator.codegen.promptTooShort" | "creator.codegen.pleaseProvideAPromptWith" | "creator.codegen.mockCodeGenerated" | "creator.codegen.thisIsASimulationNo" | "creator.codegen.missingRepository" | "creator.codegen.coderVision" | "creator.codegen.answeredWithoutGenerating" | "creator.codegen.noGenerationStarted" | "creator.codegen.cannotTrackCodeGenerationProgress" | "creator.codegen.aiGeneratedInvalidSvelteSyntax" | "creator.codegen.codeSavedRebuildingPreview" | "creator.codegen.generationCompleted" | "creator.codegen.codeSavedPreviewIsLoading" | "creator.codegen.generationAlreadyInProgress" | "creator.codegen.anotherCodeGenerationIsAlready" | "creator.codegen.codeGenerationError" | "creator.codegen.imagePastedToPrompt" | "creator.codegen.codeGenerationInProgressWait" | "creator.codegen.repositoryMissingUseRebuildCode" | "creator.codegen.buildFailedCheckLogsFor" | "creator.codegen.createdWithExistingCode" | "creator.codegen.editTheSketchFreelySending" | "creator.codegen.isReadyGenerationStarted" | "creator.codegen.repositoryIsNowLinkedTo" | "creator.codegen.repositoryExists" | "creator.codegen.repositoryOwnedByAnotherAccount" | "creator.codegen.repositoryFound" | "creator.codegen.linkedToRepository" | "creator.codegen.repositoryReferenceInvalid" | "creator.codegen.supabaseDoesNotHaveThis" | "creator.codegen.unableToVerifyRepositoryStatus" | "creator.codegen.repositoryVerificationFailed" | "creator.codegen.repositoryCreationFailed" | "creator.codegen.couldNotDetermineRepositoryId" | "creator.codegen.repositoryCreatedButNotPersisted" | "creator.codegen.repositoryExistsButFailedTo" | "creator.codegen.repositoryReadyForUse" | "creator.codegen.generationFailed" | "creator.codegen.previewBuilderIsUnavailable" | "creator.codegen.theWidgetCodeWasSaved" | "creator.codegen.rebuildInCreate" | "creator.codegen.codeDoesNotCompile" | "creator.codegen.latestCodeDoesNotCompile" | "creator.codegen.generateCodeFirstToCustomize" | "creator.codegen.noWidgetCodeYet" | "creator.codegen.goToStep1Create" | "creator.codegen.confirmCodeGeneration" | "creator.codegen.reviewThePromptAndReference" | "creator.codegen.describeTheWidgetYouWant" | "creator.codegen.prompt" | "creator.codegen.editPromptFirst" | "creator.codegen.generateNow" | "creator.preview.newerThanLive" | "creator.preview.mayShowLive" | "creator.preview.rebuilt" | "creator.preview.versionHasCodeError" | "creator.preview.versionCouldNotLoad" | "creator.preview.recompiledIn" | "creator.preview.commitRefreshed" | "creator.preview.noValidPreviewAvailable" | "creator.preview.theWidgetDidNotRespond" | "creator.preview.captureErrorRefreshThePreview" | "creator.preview.imageWaitsForGeneration" | "creator.preview.savingImage" | "creator.preview.imageSaved" | "creator.preview.couldNotSaveImage" | "creator.preview.imageNotReturned" | "creator.version.checkpointRestored" | "creator.version.restoreCompletedWithWarnings" | "creator.version.failedToRestoreCheckpoint" | "creator.version.versionIsNowLive" | "creator.version.version" | "creator.version.theSelectedDraftVersionWas" | "creator.version.thisIsADraftVersion" | "creator.version.thisVersionIsNowWhat" | "creator.version.versionRenamed" | "creator.version.versionTitleCleared" | "creator.version.couldNotRenameTheVersion" | "creator.version.closeVersionHistory" | "creator.publish.cannotPublish" | "creator.publish.noEditableSettingsFoundGenerate" | "creator.publish.publishingViaWidgetBuilder" | "creator.publish.widgetPublished" | "creator.publish.publishedAutomaticallyAfterCodeGeneration" | "creator.publish.publishFailed" | "creator.publish.publishing" | "creator.publish.publishingInProgress" | "creator.publish.anotherWidgetIsPublishingWait" | "creator.publish.publishIsRunningInAnother" | "creator.publish.thisVersionIsAlreadyPublished" | "creator.publish.thisDraftHasNoRecorded" | "creator.publish.generateWidgetCodeBeforePublishing" | "creator.publish.publishWidget" | "creator.publish.noNewVersionToPublish" | "creator.publish.publishNewV" | "creator.publish.generateOrRebuildSoWe" | "creator.publish.cannotPublishYet" | "creator.publish.publishedVSuccessfully" | "creator.publish.published" | "creator.publish.widgetPublishFailed" | "creator.publish.failedToLoadPublishHistory" | "creator.publish.pressPublishToMakeThe" | "creator.publish.failedToSetLiveVersion" | "creator.publish.publishTheLatestGeneratedCode" | "creator.publish.liveGenerateNewCodeTo" | "creator.publish.publishThisVersionSoVisitors" | "creator.publish.noHistoryRecordsYetGenerate" | "creator.publish.retryPublish" | "creator.publish.notPublishedYet" | "creator.publish.generateOnCreatePreviewThe" | "creator.publish.widgetNotPublishedYet" | "creator.publish.publishYourWidgetFromThe" | "creator.publish.publishYourWidgetFromTheCreate" | "creator.embed.codeTitle" | "creator.embed.formatIframe" | "creator.embed.formatWebComponent" | "creator.embed.copied" | "creator.embed.versionIsLiveAndReady" | "creator.embed.embedYourWidget" | "creator.embed.setDimensionsAndCopyThe" | "creator.embed.embedWidth" | "creator.embed.embedHeight" | "creator.embed.copyEmbedCode" | "creator.embed.embedFormat" | "creator.dialog.removeShape" | "creator.dialog.alsoDeleteWidget" | "creator.dialog.deleteCanvas" | "creator.dialog.alsoDeleteWidgets" | "creator.status.label" | "creator.status.preparingCodeGeneration" | "creator.status.ready" | "creator.status.completedPreviewReady" | "creator.status.completedAutoSaving" | "creator.status.completedSaved" | "creator.status.completedChangesSaved" | "creator.status.failed" | "creator.status.stoppedByUser" | "creator.status.fixingCompilationErrors" | "creator.status.generatingMockCode" | "creator.status.mockCodeComplete" | "creator.status.processingQueuedRequest" | "creator.status.sessionExpired" | "creator.status.repositoryRequired" | "creator.status.runningQueued" | "creator.status.repositoryReady" | "creator.status.answeredFromDetails" | "creator.status.needMoreDetail" | "creator.status.noGenerationNeeded" | "creator.status.authenticationExpired" | "creator.status.noOperationId" | "creator.status.processingQueued" | "creator.status.inProgress" | "creator.status.generating" | "creator.status.generatingProgress" | "creator.status.savedBuildingPreview" | "creator.status.savedLoadingPreview" | "creator.status.savedPreviewRebuilt" | "creator.status.alreadyRunning" | "creator.status.needsRefresh" | "creator.status.limitReached" | "creator.status.rateLimited" | "creator.status.failedWithReason" | "creator.status.reconnected" | "creator.conversation.version" | "creator.conversation.previousVersion" | "creator.conversation.restoredFromCommit" | "creator.conversation.completedCommitPreviewLoading" | "creator.conversation.completedCommitPreviewReady" | "creator.conversation.completedPreviewLoading" | "creator.conversation.codeSavedShaBuilding" | "creator.conversation.codeSavedShaLoading" | "creator.conversation.codeSavedShaRebuilt" | "creator.conversation.codeSavedCommitPreviewFailed" | "creator.conversation.stoppedRetryPrompt" | "creator.conversation.previewRecompiled" | "creator.conversation.previewRecompiledCommitPart" | "creator.conversation.previewRecompiledDurationPart" | "creator.conversation.alreadyDoneWithCommit" | "creator.conversation.alreadyDone" | "creator.conversation.alreadyDoneFilesSuffix" | "creator.conversation.convert" | "creator.conversation.widgetConversion" | "creator.error.generationFailedWhileYouWere" | "creator.error.generationTrackingLost" | "creator.error.unableToResolveRepositoryFor" | "creator.error.authenticationExpiredPleaseLoginAgain" | "creator.error.cannotTrackCodeGenerationProgress" | "creator.error.usageLimitExceeded" | "creator.error.tooManyRequestsPleaseTry" | "creator.error.codeGenerationFailed" | "creator.error.widgetBuilderIsNotReachable" | "creator.error.buildRequestFailed" | "creator.error.notAuthenticated" | "creator.error.apiClientIsNotConfigured" | "creator.error.publishedVersionIsNotAvailable" | "creator.error.failedToCompileWidgetCode" | "creator.error.previewNotReadyYetClick" | "creator.error.previewNotReadyYetClickRebuild" | "creator.error.previewLoadedButTheWidget" | "creator.error.previewTimedOutTheDev" | "creator.error.couldNotOpenPreviewUrl" | "creator.error.couldNotFetchThePreview" | "creator.error.widgetPreviewRuntimeErrorHttp" | "creator.error.previewBuildFailed" | "creator.error.couldNotReachThePreview" | "creator.error.previewRebuildIsUnavailableIn" | "creator.error.previewBuilderIsUnavailableThe" | "creator.error.previewBuilderReturnedAnUnexpected" | "creator.error.anUnknownErrorOccurred" | "creator.error.couldNotReachTheServer" | "creator.error.buildFailed" | "creator.details.fixThePromptOrAttachments" | "creator.details.codeGenerationWillStartShortly" | "creator.details.saveWillExecuteShortly" | "creator.details.codeGenerationQueued" | "creator.details.saveQueued" | "creator.details.closeWidgetDetails" | "creator.details.widgetDraft" | "creator.details.createWidgetCode" | "creator.details.create" | "creator.details.editComposition" | "creator.details.publishTheWidgetToEdit" | "creator.details.edit" | "creator.details.embedThePublishedWidget" | "creator.details.publishTheWidgetToGet" | "creator.details.embed" | "creator.details.openLivePreview" | "creator.details.closeLivePreview" | "creator.details.showLivePreview" | "creator.details.preview" | "creator.details.dragToResizeChatPreview" | "creator.details.livePreview" | "creator.details.recompileWidgetCodeForPreview" | "creator.details.rebuilding" | "creator.details.rebuild" | "creator.details.clickToFocusThisWidget" | "creator.details.livePreviewBelow" | "creator.details.generatingCode" | "creator.details.loadingPreview" | "creator.details.sketchDraft" | "creator.details.yourSketchIsStillOn" | "creator.details.sendThePromptInChat" | "creator.details.preparingWidget" | "creator.details.settingUpRepository" | "creator.details.widgetHasNoRepository" | "creator.details.repositoryCreationFailedPreviouslyClick" | "creator.details.createRepository" | "creator.details.noCodeYet" | "creator.details.writeAPromptAndGenerate" | "creator.details.generateNow" | "creator.details.previewUnavailable" | "creator.details.rebuildCode" | "creator.details.fixCompileError" | "creator.details.retryBuild" | "creator.details.retry" | "creator.details.buildingPreview" | "creator.details.compilingWidgetCode" | "creator.details.previewWillAppearAfterCode" | "creator.details.resizePanel" | "creator.details.resizeWidth" | "creator.details.resizeHeight" | "creator.brandKit.addFont" | "creator.brandKit.fontLabel" | "creator.brandKit.brandKit" | "creator.brandKit.languageIsFixedAfterThe" | "creator.brandKit.selectLanguage" | "creator.brandKit.libraries" | "creator.brandKit.addLibrary" | "creator.brandKit.uploadLibrary" | "creator.brandKit.removeLibrary" | "creator.brandKit.replacesTheWidgeticPaletteFor" | "creator.brandKit.colorPalette" | "creator.brandKit.primary" | "creator.brandKit.secondary" | "creator.brandKit.title" | "creator.brandKit.sub" | "creator.brandKit.fonts" | "creator.brandKit.font" | "creator.brandKit.removeFont" | "creator.brandKit.uploadFonts" | "creator.brandKit.uploadAFontFileOr" | "creator.brandKit.urlArchiveWoff2TtfOtf" | "creator.brandKit.removeUploadedFont" | "creator.brandKit.icons" | "creator.brandKit.addIconLibrary" | "creator.brandKit.removeIconLibrary" | "creator.brandKit.uploadCustomLibraryTooltip" | "creator.brandKit.uploadIconLibraryTooltip" | "creator.brandKit.urlLibraries" | "creator.brandKit.urlIcons" | "creator.livePreviews.dragWidget" | "creator.livePreviews.primaryWidget" | "creator.livePreviews.setPrimary" | "creator.livePreviews.publishLatest" | "creator.livePreviews.currentlyLive" | "creator.livePreviews.makeThisVersionLive" | "creator.livePreviews.publishThisDraft" | "creator.livePreviews.noCommitToPublish" | "creator.livePreviews.currentVersion" | "creator.livePreviews.editMode" | "creator.livePreviews.refreshPreview" | "creator.livePreviews.refresh" | "creator.livePreviews.openChat" | "creator.livePreviews.chat" | "creator.livePreviews.liveWidgetPreview" | "creator.livePreviews.building" | "creator.versions.addTitle" | "creator.versions.renameVersion" | "creator.versions.addVersionTitle" | "creator.versions.addATitleForThis" | "creator.versions.notPublishedPreviewOnly" | "creator.versions.live" | "creator.selector.select" | "creator.selector.doubleClickToRename" | "creator.selector.toggleList" | "creator.selector.noItemsFound" | "creator.name.unnamed" | "creator.name.saveName" | "creator.name.renameWidget" | "creator.designEdit.shownAsAppliedTheseControls" | "creator.designEdit.notAvailableInThisWidget" | "creator.fileSource.uploadFile" | "creator.fileSource.url">;
559
+ export declare const translateEnglish: Translate<"creator.common.close" | "creator.common.new" | "creator.common.doubleClickToRename" | "creator.common.thisAppNeedsARefresh" | "creator.common.reload" | "creator.common.publish" | "creator.common.switchVersion" | "creator.common.live" | "creator.common.buildThisDraftVersionAnd" | "creator.common.setLive" | "creator.common.retry" | "creator.common.delete" | "creator.common.draft" | "creator.common.loading" | "creator.general.unknownError" | "creator.general.couldNotLoadUploadedImage" | "creator.general.tryUploadingTheImageAgain" | "creator.general.couldNotUpdateConversationStatus" | "creator.general.changeUndone" | "creator.general.failedToLoadEditorSettings" | "creator.general.setTo" | "creator.general.failedToUpdate" | "creator.general.failedToSaveDimensions" | "creator.general.nothingToSave" | "creator.general.serviceTemporarilyUnavailable" | "creator.general.retryingWhenTheApiIs" | "creator.general.invalidFileType" | "creator.general.pleaseSelectAnImageFile" | "creator.general.imageTooLarge" | "creator.general.maximumImageSizeIsMb" | "creator.general.tooManyImages" | "creator.general.maximumImagesAllowedRemoveAn" | "creator.general.failedToProcessImage" | "creator.general.couldNotReadTheImage" | "creator.general.imagePasted" | "creator.general.screenshotCaptureFailed" | "creator.general.missingOperationId" | "creator.general.switchToThatPanelTo" | "creator.general.limitReached" | "creator.general.rateLimited" | "creator.general.theApiRateLimitWas" | "creator.general.liveV" | "creator.general.anUnexpectedErrorOccurredPlease" | "creator.general.latestCommitIsAlreadyLive" | "creator.general.theServerRefusedTheRename" | "creator.general.checkYourConnectionAndTry" | "creator.general.unableToReachTheApi" | "creator.general.pleaseWaitForTheCurrent" | "creator.general.created" | "creator.general.saveBlocked" | "creator.general.keptALocalCopyCheck" | "creator.general.apiClientUnavailable" | "creator.general.screenshotCouldNotBeCaptured" | "creator.general.fixTheSelectionZoomOut" | "creator.general.checkConsoleForDetails" | "creator.general.retryLoad" | "creator.general.dismiss" | "creator.general.saving" | "creator.general.saved" | "creator.general.saveError" | "creator.general.loadingHistory" | "creator.general.upgrade" | "creator.general.fixInCreate" | "creator.general.fixInCreate2" | "creator.general.saving2" | "creator.general.save" | "creator.general.cancel" | "creator.general.noEditableSettingsAvailableYet" | "creator.general.dimensions" | "creator.general.w" | "creator.general.h" | "creator.general.px" | "creator.general.copy" | "creator.general.testPage" | "creator.general.zoomedReference" | "creator.general.keepInDatabase" | "creator.general.deleteFromDatabase" | "creator.general.checkingWhatWillBeDeleted" | "creator.general.describeWhatYouWant" | "creator.session.endedStartAgain" | "creator.session.canvasCannotOpen" | "creator.session.sessionEnded" | "creator.session.sessionExpiredSignInAgain" | "creator.session.sessionExpired" | "creator.session.authenticationExpired" | "creator.session.pleaseLoginAgainToContinue" | "creator.session.signInAgainToPublish" | "creator.session.loginRequiredToDuplicateWidget" | "creator.session.pleaseLoginFirst" | "creator.session.authenticationRequired" | "creator.session.pleaseLoginBeforeCreatingA" | "creator.session.thisWidgetReferencesARepository" | "creator.session.signInAgainThenRetry" | "creator.widget.notFound" | "creator.widget.fallbackName" | "creator.widget.noWidgetSelected" | "creator.widget.shapeRemoved" | "creator.widget.widgetKeptInDatabase" | "creator.widget.widgetDeletedFromDatabase" | "creator.widget.widgetWasAlreadyDeleted" | "creator.widget.failedToDeleteWidgetFrom" | "creator.widget.selectAWidgetFirst" | "creator.widget.duplicateFromTheHeaderCopies" | "creator.widget.failedToLoadWidgets" | "creator.widget.couldNotRestoreShapesYet" | "creator.widget.widgetRenamedTo" | "creator.widget.failedToRenameWidget" | "creator.widget.capturingWidgetScreenshot" | "creator.widget.fetchingWidgetComponent" | "creator.widget.creatingWidgetComponent" | "creator.widget.widgetsApiClientIsNot" | "creator.widget.unlinkedWidgetShape" | "creator.widget.duplicatingWidget" | "creator.widget.failedToDuplicateWidget" | "creator.widget.widgetDuplicated" | "creator.widget.widgetKeptInDatabase2" | "creator.widget.youCanKeepEditingWidgets" | "creator.widget.widgetDraftCreated" | "creator.widget.failedToPrepareWidgetDraft" | "creator.widget.failedToCreateWidgetFrom" | "creator.widget.widgetCreatedButNoId" | "creator.widget.widgetCreated" | "creator.widget.failedToFinalizeWidgetConversion" | "creator.widget.repoIdToDeleteUse" | "creator.widget.restoreShapes" | "creator.widget.directWidgetUrl" | "creator.widget.deleteWidgetShape" | "creator.widget.theseWidgetsBelongToMore" | "creator.canvas.appearsEmptyButWidgets" | "creator.canvas.restoredShapes" | "creator.canvas.removedTheLeftoverShapeFrom" | "creator.canvas.clickAWidgetOnThe" | "creator.canvas.canvasIsNotReadyYet" | "creator.canvas.failedToLoadCanvases" | "creator.canvas.couldNotDeleteThisCanvas" | "creator.canvas.noCanvasIdCannotLoad" | "creator.canvas.canvasMayStillBeLoading" | "creator.canvas.widgetPreviewUpdatedOnCanvas" | "creator.canvas.widgetCanvasAndRepositoryAre" | "creator.canvas.canvasIsRequiredBeforePublishing" | "creator.canvas.thisShapePointsToA" | "creator.canvas.shapeRemovedFromCanvas" | "creator.canvas.canvasIsTakingLongerThan" | "creator.canvas.canvasShapesFailedToRender" | "creator.canvas.failedToLoadCanvasFrom" | "creator.canvas.canvasLoadFailedCheckSupabase" | "creator.canvas.apiMayBeThrottledOr" | "creator.canvas.canvasSnapshotLookedEmptyRefresh" | "creator.canvas.canvasSaved" | "creator.canvas.canvasSaveFailed" | "creator.canvas.canvasSavedLocally" | "creator.canvas.noCanvasIdYet" | "creator.canvas.canvasUnavailable" | "creator.canvas.canvasShapesFailedToLoad" | "creator.canvas.shapeDataMayBeMissing" | "creator.canvas.deleteCanvas" | "creator.composition.compositionCreated" | "creator.composition.failedToCreateComposition" | "creator.composition.compositionSaved" | "creator.composition.compositionRenamed" | "creator.composition.failedToRenameComposition" | "creator.composition.compositionDeleted" | "creator.composition.failedToDeleteComposition" | "creator.composition.fixTheSyntaxErrorIn" | "creator.composition.compositions" | "creator.composition.selectComposition" | "creator.composition.deleteThisComposition" | "creator.composition.webComponentFormatRequiresA" | "creator.composition.compositionUrl" | "creator.codegen.referenceImages" | "creator.codegen.referenceNumber" | "creator.codegen.missingReferenceImage" | "creator.codegen.missingImageError" | "creator.codegen.visionModelNote" | "creator.codegen.noImageTitle" | "creator.codegen.repositoryCreated" | "creator.codegen.failedToCreateRepository" | "creator.codegen.noVisionNote" | "creator.codegen.codeRevertedToCommitRefreshing" | "creator.codegen.widgetCodeAtCommitRefreshing" | "creator.codegen.gitRollbackMayNotHave" | "creator.codegen.codeGenerationCompleted" | "creator.codegen.generationInProgress" | "creator.codegen.reconnectedToAnActiveCode" | "creator.codegen.codeSavedToGitlabAnd" | "creator.codegen.generationStopped" | "creator.codegen.codeGenerationWasCancelledYou" | "creator.codegen.couldNotStopGeneration" | "creator.codegen.generationMayStillBeRunning" | "creator.codegen.imageAddedToYourPrompt" | "creator.codegen.generateCodeFirstToCapture" | "creator.codegen.previewIsMissingTheCapture" | "creator.codegen.promptTooShort" | "creator.codegen.pleaseProvideAPromptWith" | "creator.codegen.mockCodeGenerated" | "creator.codegen.thisIsASimulationNo" | "creator.codegen.missingRepository" | "creator.codegen.coderVision" | "creator.codegen.answeredWithoutGenerating" | "creator.codegen.noGenerationStarted" | "creator.codegen.cannotTrackCodeGenerationProgress" | "creator.codegen.aiGeneratedInvalidSvelteSyntax" | "creator.codegen.codeSavedRebuildingPreview" | "creator.codegen.generationCompleted" | "creator.codegen.codeSavedPreviewIsLoading" | "creator.codegen.generationAlreadyInProgress" | "creator.codegen.anotherCodeGenerationIsAlready" | "creator.codegen.codeGenerationError" | "creator.codegen.imagePastedToPrompt" | "creator.codegen.codeGenerationInProgressWait" | "creator.codegen.repositoryMissingUseRebuildCode" | "creator.codegen.buildFailedCheckLogsFor" | "creator.codegen.createdWithExistingCode" | "creator.codegen.editTheSketchFreelySending" | "creator.codegen.isReadyGenerationStarted" | "creator.codegen.repositoryIsNowLinkedTo" | "creator.codegen.repositoryExists" | "creator.codegen.repositoryOwnedByAnotherAccount" | "creator.codegen.repositoryFound" | "creator.codegen.linkedToRepository" | "creator.codegen.repositoryReferenceInvalid" | "creator.codegen.supabaseDoesNotHaveThis" | "creator.codegen.unableToVerifyRepositoryStatus" | "creator.codegen.repositoryVerificationFailed" | "creator.codegen.repositoryCreationFailed" | "creator.codegen.couldNotDetermineRepositoryId" | "creator.codegen.repositoryCreatedButNotPersisted" | "creator.codegen.repositoryExistsButFailedTo" | "creator.codegen.repositoryReadyForUse" | "creator.codegen.generationFailed" | "creator.codegen.previewBuilderIsUnavailable" | "creator.codegen.theWidgetCodeWasSaved" | "creator.codegen.rebuildInCreate" | "creator.codegen.codeDoesNotCompile" | "creator.codegen.latestCodeDoesNotCompile" | "creator.codegen.generateCodeFirstToCustomize" | "creator.codegen.noWidgetCodeYet" | "creator.codegen.goToStep1Create" | "creator.codegen.confirmCodeGeneration" | "creator.codegen.reviewThePromptAndReference" | "creator.codegen.describeTheWidgetYouWant" | "creator.codegen.prompt" | "creator.codegen.editPromptFirst" | "creator.codegen.generateNow" | "creator.preview.newerThanLive" | "creator.preview.mayShowLive" | "creator.preview.rebuilt" | "creator.preview.versionHasCodeError" | "creator.preview.versionCouldNotLoad" | "creator.preview.recompiledIn" | "creator.preview.commitRefreshed" | "creator.preview.noValidPreviewAvailable" | "creator.preview.theWidgetDidNotRespond" | "creator.preview.captureErrorRefreshThePreview" | "creator.preview.imageWaitsForGeneration" | "creator.preview.savingImage" | "creator.preview.imageSaved" | "creator.preview.couldNotSaveImage" | "creator.preview.imageNotReturned" | "creator.version.checkpointRestored" | "creator.version.restoreCompletedWithWarnings" | "creator.version.failedToRestoreCheckpoint" | "creator.version.versionIsNowLive" | "creator.version.version" | "creator.version.theSelectedDraftVersionWas" | "creator.version.thisIsADraftVersion" | "creator.version.thisVersionIsNowWhat" | "creator.version.versionRenamed" | "creator.version.versionTitleCleared" | "creator.version.couldNotRenameTheVersion" | "creator.version.closeVersionHistory" | "creator.publish.cannotPublish" | "creator.publish.noEditableSettingsFoundGenerate" | "creator.publish.publishingViaWidgetBuilder" | "creator.publish.widgetPublished" | "creator.publish.publishedAutomaticallyAfterCodeGeneration" | "creator.publish.publishFailed" | "creator.publish.publishing" | "creator.publish.publishingInProgress" | "creator.publish.anotherWidgetIsPublishingWait" | "creator.publish.publishIsRunningInAnother" | "creator.publish.thisVersionIsAlreadyPublished" | "creator.publish.thisDraftHasNoRecorded" | "creator.publish.generateWidgetCodeBeforePublishing" | "creator.publish.publishWidget" | "creator.publish.noNewVersionToPublish" | "creator.publish.publishNewV" | "creator.publish.generateOrRebuildSoWe" | "creator.publish.cannotPublishYet" | "creator.publish.publishedVSuccessfully" | "creator.publish.published" | "creator.publish.widgetPublishFailed" | "creator.publish.failedToLoadPublishHistory" | "creator.publish.pressPublishToMakeThe" | "creator.publish.failedToSetLiveVersion" | "creator.publish.publishTheLatestGeneratedCode" | "creator.publish.liveGenerateNewCodeTo" | "creator.publish.publishThisVersionSoVisitors" | "creator.publish.noHistoryRecordsYetGenerate" | "creator.publish.retryPublish" | "creator.publish.notPublishedYet" | "creator.publish.generateOnCreatePreviewThe" | "creator.publish.widgetNotPublishedYet" | "creator.publish.publishYourWidgetFromThe" | "creator.publish.publishYourWidgetFromTheCreate" | "creator.embed.codeTitle" | "creator.embed.formatIframe" | "creator.embed.formatWebComponent" | "creator.embed.copied" | "creator.embed.versionIsLiveAndReady" | "creator.embed.embedYourWidget" | "creator.embed.setDimensionsAndCopyThe" | "creator.embed.embedWidth" | "creator.embed.embedHeight" | "creator.embed.copyEmbedCode" | "creator.embed.embedFormat" | "creator.dialog.removeShape" | "creator.dialog.alsoDeleteWidget" | "creator.dialog.deleteCanvas" | "creator.dialog.alsoDeleteWidgets" | "creator.status.label" | "creator.status.preparingCodeGeneration" | "creator.status.ready" | "creator.status.completedPreviewReady" | "creator.status.completedAutoSaving" | "creator.status.completedSaved" | "creator.status.completedChangesSaved" | "creator.status.failed" | "creator.status.stoppedByUser" | "creator.status.fixingCompilationErrors" | "creator.status.generatingMockCode" | "creator.status.mockCodeComplete" | "creator.status.processingQueuedRequest" | "creator.status.sessionExpired" | "creator.status.repositoryRequired" | "creator.status.runningQueued" | "creator.status.repositoryReady" | "creator.status.answeredFromDetails" | "creator.status.needMoreDetail" | "creator.status.noGenerationNeeded" | "creator.status.authenticationExpired" | "creator.status.noOperationId" | "creator.status.processingQueued" | "creator.status.inProgress" | "creator.status.generating" | "creator.status.generatingProgress" | "creator.status.savedBuildingPreview" | "creator.status.savedLoadingPreview" | "creator.status.savedPreviewRebuilt" | "creator.status.alreadyRunning" | "creator.status.needsRefresh" | "creator.status.limitReached" | "creator.status.rateLimited" | "creator.status.failedWithReason" | "creator.status.reconnected" | "creator.conversation.version" | "creator.conversation.previousVersion" | "creator.conversation.restoredFromCommit" | "creator.conversation.completedCommitPreviewLoading" | "creator.conversation.completedCommitPreviewReady" | "creator.conversation.completedPreviewLoading" | "creator.conversation.codeSavedShaBuilding" | "creator.conversation.codeSavedShaLoading" | "creator.conversation.codeSavedShaRebuilt" | "creator.conversation.codeSavedCommitPreviewFailed" | "creator.conversation.stoppedRetryPrompt" | "creator.conversation.previewRecompiled" | "creator.conversation.previewRecompiledCommitPart" | "creator.conversation.previewRecompiledDurationPart" | "creator.conversation.alreadyDoneWithCommit" | "creator.conversation.alreadyDone" | "creator.conversation.alreadyDoneFilesSuffix" | "creator.conversation.convert" | "creator.conversation.widgetConversion" | "creator.error.generationFailedWhileYouWere" | "creator.error.generationTrackingLost" | "creator.error.unableToResolveRepositoryFor" | "creator.error.authenticationExpiredPleaseLoginAgain" | "creator.error.cannotTrackCodeGenerationProgress" | "creator.error.usageLimitExceeded" | "creator.error.tooManyRequestsPleaseTry" | "creator.error.codeGenerationFailed" | "creator.error.widgetBuilderIsNotReachable" | "creator.error.buildRequestFailed" | "creator.error.notAuthenticated" | "creator.error.apiClientIsNotConfigured" | "creator.error.publishedVersionIsNotAvailable" | "creator.error.failedToCompileWidgetCode" | "creator.error.previewNotReadyYetClick" | "creator.error.previewNotReadyYetClickRebuild" | "creator.error.previewLoadedButTheWidget" | "creator.error.previewTimedOutTheDev" | "creator.error.couldNotOpenPreviewUrl" | "creator.error.couldNotFetchThePreview" | "creator.error.widgetPreviewRuntimeErrorHttp" | "creator.error.previewBuildFailed" | "creator.error.couldNotReachThePreview" | "creator.error.previewRebuildIsUnavailableIn" | "creator.error.previewBuilderIsUnavailableThe" | "creator.error.previewBuilderReturnedAnUnexpected" | "creator.error.anUnknownErrorOccurred" | "creator.error.couldNotReachTheServer" | "creator.error.buildFailed" | "creator.details.fixThePromptOrAttachments" | "creator.details.codeGenerationWillStartShortly" | "creator.details.saveWillExecuteShortly" | "creator.details.codeGenerationQueued" | "creator.details.saveQueued" | "creator.details.closeWidgetDetails" | "creator.details.widgetDraft" | "creator.details.createWidgetCode" | "creator.details.create" | "creator.details.editComposition" | "creator.details.publishTheWidgetToEdit" | "creator.details.edit" | "creator.details.embedThePublishedWidget" | "creator.details.publishTheWidgetToGet" | "creator.details.embed" | "creator.details.openLivePreview" | "creator.details.closeLivePreview" | "creator.details.showLivePreview" | "creator.details.preview" | "creator.details.dragToResizeChatPreview" | "creator.details.livePreview" | "creator.details.recompileWidgetCodeForPreview" | "creator.details.rebuilding" | "creator.details.rebuild" | "creator.details.clickToFocusThisWidget" | "creator.details.livePreviewBelow" | "creator.details.generatingCode" | "creator.details.loadingPreview" | "creator.details.sketchDraft" | "creator.details.yourSketchIsStillOn" | "creator.details.sendThePromptInChat" | "creator.details.preparingWidget" | "creator.details.settingUpRepository" | "creator.details.widgetHasNoRepository" | "creator.details.repositoryCreationFailedPreviouslyClick" | "creator.details.createRepository" | "creator.details.noCodeYet" | "creator.details.writeAPromptAndGenerate" | "creator.details.generateNow" | "creator.details.previewUnavailable" | "creator.details.rebuildCode" | "creator.details.fixCompileError" | "creator.details.retryBuild" | "creator.details.retry" | "creator.details.buildingPreview" | "creator.details.compilingWidgetCode" | "creator.details.previewWillAppearAfterCode" | "creator.details.resizePanel" | "creator.details.resizeWidth" | "creator.details.resizeHeight" | "creator.brandKit.addFont" | "creator.brandKit.fontLabel" | "creator.brandKit.brandKit" | "creator.brandKit.languageIsFixedAfterThe" | "creator.brandKit.selectLanguage" | "creator.brandKit.libraries" | "creator.brandKit.addLibrary" | "creator.brandKit.uploadLibrary" | "creator.brandKit.removeLibrary" | "creator.brandKit.replacesTheWidgeticPaletteFor" | "creator.brandKit.colorPalette" | "creator.brandKit.primary" | "creator.brandKit.secondary" | "creator.brandKit.title" | "creator.brandKit.sub" | "creator.brandKit.fonts" | "creator.brandKit.font" | "creator.brandKit.removeFont" | "creator.brandKit.uploadFonts" | "creator.brandKit.uploadAFontFileOr" | "creator.brandKit.urlArchiveWoff2TtfOtf" | "creator.brandKit.removeUploadedFont" | "creator.brandKit.icons" | "creator.brandKit.addIconLibrary" | "creator.brandKit.removeIconLibrary" | "creator.brandKit.uploadCustomLibraryTooltip" | "creator.brandKit.uploadIconLibraryTooltip" | "creator.brandKit.urlLibraries" | "creator.brandKit.urlIcons" | "creator.livePreviews.dragWidget" | "creator.livePreviews.primaryWidget" | "creator.livePreviews.setPrimary" | "creator.livePreviews.publishLatest" | "creator.livePreviews.currentlyLive" | "creator.livePreviews.makeThisVersionLive" | "creator.livePreviews.publishThisDraft" | "creator.livePreviews.noCommitToPublish" | "creator.livePreviews.currentVersion" | "creator.livePreviews.editMode" | "creator.livePreviews.refreshPreview" | "creator.livePreviews.refresh" | "creator.livePreviews.openChat" | "creator.livePreviews.chat" | "creator.livePreviews.liveWidgetPreview" | "creator.livePreviews.building" | "creator.versions.addTitle" | "creator.versions.renameVersion" | "creator.versions.addVersionTitle" | "creator.versions.addATitleForThis" | "creator.versions.notPublishedPreviewOnly" | "creator.versions.live" | "creator.selector.select" | "creator.selector.doubleClickToRename" | "creator.selector.toggleList" | "creator.selector.noItemsFound" | "creator.name.unnamed" | "creator.name.saveName" | "creator.name.renameWidget" | "creator.designEdit.shownAsAppliedTheseControls" | "creator.designEdit.notAvailableInThisWidget" | "creator.fileSource.uploadFile" | "creator.fileSource.url">;
@@ -189,13 +189,13 @@ export declare const CREATOR_MESSAGES: {
189
189
  readonly 'creator.codegen.widgetCodeAtCommitRefreshing': "Widget code at commit {commit}. Refreshing preview…";
190
190
  readonly 'creator.codegen.gitRollbackMayNotHave': "Git rollback may not have applied. Try Rebuild from the preview panel.";
191
191
  readonly 'creator.codegen.codeGenerationCompleted': "Code generation completed";
192
- readonly 'creator.codegen.generationFinishedWhileYouWere': "Generation finished while you were away. Auto-saving to repo...";
193
192
  readonly 'creator.codegen.generationInProgress': "Generation in progress";
194
193
  readonly 'creator.codegen.reconnectedToAnActiveCode': "Reconnected to an active code generation. Please wait...";
195
- readonly 'creator.codegen.generationFinishedForADifferent': "Generation finished for a different widget.";
196
194
  readonly 'creator.codegen.codeSavedToGitlabAnd': "Code saved to GitLab and preview ready.";
197
195
  readonly 'creator.codegen.generationStopped': "Generation stopped";
198
196
  readonly 'creator.codegen.codeGenerationWasCancelledYou': "Code generation was cancelled. You can start a new generation.";
197
+ readonly 'creator.codegen.couldNotStopGeneration': "Could not stop the generation";
198
+ readonly 'creator.codegen.generationMayStillBeRunning': "The server did not confirm it, so the generation may still be running. Try Stop again in a moment.";
199
199
  readonly 'creator.codegen.imageAddedToYourPrompt': "Image added to your prompt.";
200
200
  readonly 'creator.codegen.generateCodeFirstToCapture': "Generate code first to capture a screenshot.";
201
201
  readonly 'creator.codegen.previewIsMissingTheCapture': "Preview is missing the capture library. Rebuild the widget preview, then try again.";
@@ -196,13 +196,13 @@ export const CREATOR_MESSAGES = {
196
196
  'creator.codegen.widgetCodeAtCommitRefreshing': 'Widget code at commit {commit}. Refreshing preview…',
197
197
  'creator.codegen.gitRollbackMayNotHave': 'Git rollback may not have applied. Try Rebuild from the preview panel.',
198
198
  'creator.codegen.codeGenerationCompleted': 'Code generation completed',
199
- 'creator.codegen.generationFinishedWhileYouWere': 'Generation finished while you were away. Auto-saving to repo...',
200
199
  'creator.codegen.generationInProgress': 'Generation in progress',
201
200
  'creator.codegen.reconnectedToAnActiveCode': 'Reconnected to an active code generation. Please wait...',
202
- 'creator.codegen.generationFinishedForADifferent': 'Generation finished for a different widget.',
203
201
  'creator.codegen.codeSavedToGitlabAnd': 'Code saved to GitLab and preview ready.',
204
202
  'creator.codegen.generationStopped': 'Generation stopped',
205
203
  'creator.codegen.codeGenerationWasCancelledYou': 'Code generation was cancelled. You can start a new generation.',
204
+ 'creator.codegen.couldNotStopGeneration': 'Could not stop the generation',
205
+ 'creator.codegen.generationMayStillBeRunning': 'The server did not confirm it, so the generation may still be running. Try Stop again in a moment.',
206
206
  'creator.codegen.imageAddedToYourPrompt': 'Image added to your prompt.',
207
207
  'creator.codegen.generateCodeFirstToCapture': 'Generate code first to capture a screenshot.',
208
208
  'creator.codegen.previewIsMissingTheCapture': 'Preview is missing the capture library. Rebuild the widget preview, then try again.',
@@ -0,0 +1,122 @@
1
+ /**
2
+ * generationSharing: how Stop reaches the server's job, and how the tabs of one browser share what a generation is doing.
3
+ *
4
+ * Two things the creator used to get wrong, both about a generation that runs on the server and outlives the click that
5
+ * started it:
6
+ *
7
+ * - Stop only walked away from the job. It stopped listening, and the server carried on writing (and billing) the whole
8
+ * run. `requestOperationStop` asks the server to stop it (`POST /operations/{id}/cancel`), which aborts the model call.
9
+ * - A second tab of the same customer never learned that the first was generating, so it offered Generate again and a
10
+ * widget could be generated twice at once. The tabs now tell each other which operation they are running
11
+ * (`openGenerationChannel`), and the one that hears it follows the operation by its status on the server, so what the
12
+ * server says is the state: no flag a closed tab left behind keeps a tab waiting.
13
+ *
14
+ * Why a channel and not only the browser's storage: in a partner's page the creator keeps what it remembers in memory (see
15
+ * `host/creatorHost.ts`), so two tabs share nothing there. A `BroadcastChannel` writes nothing anywhere: a message reaches
16
+ * the other tabs of the page's origin that are open right now and is gone. What travels is only a widget's id and an
17
+ * operation's id, and a tab that hears them checks with the server (with its own sign-in) whether the operation is one of
18
+ * its visitor's, so a message that reaches a tab of another visitor of the same browser changes nothing there.
19
+ *
20
+ * Kept free of Svelte and of the page so the rules are testable without a DOM.
21
+ */
22
+ /** The name of the channel. Namespaced so it cannot be taken for a channel of the partner's own page. */
23
+ export declare const GENERATION_CHANNEL_NAME = "widgetic-creator:generation";
24
+ /** What one tab tells the others. */
25
+ export type GenerationNote =
26
+ /** "This tab is running operation `operationId` on widget `widgetId`." */
27
+ {
28
+ kind: 'started';
29
+ widgetId: string;
30
+ operationId: string;
31
+ }
32
+ /** "Is anyone generating on widget `widgetId`?" A tab that is answers with `started`. */
33
+ | {
34
+ kind: 'ask';
35
+ widgetId: string;
36
+ };
37
+ /** The note a message carries, or null when it is not one of ours (the channel is shared by the whole origin). */
38
+ export declare function readGenerationNote(data: unknown): GenerationNote | null;
39
+ /** What a tab does when it hears the others. */
40
+ export interface GenerationChannelHandlers {
41
+ /** Another tab runs `operationId` on `widgetId`. */
42
+ onStarted: (widgetId: string, operationId: string) => void;
43
+ /** Another tab wants to know whether this one is generating on `widgetId`. */
44
+ onAsk: (widgetId: string) => void;
45
+ }
46
+ /** The two things a tab says, and the end of listening. */
47
+ export interface GenerationChannel {
48
+ announceStarted: (widgetId: string, operationId: string) => void;
49
+ ask: (widgetId: string) => void;
50
+ close: () => void;
51
+ }
52
+ /**
53
+ * Opens this tab's end of the channel. Returns null where the browser has no `BroadcastChannel` (the creator then works as
54
+ * before: the tabs do not hear each other, and the server's status is still what each tab follows once it knows the id).
55
+ * A handler that throws is logged and does not reach the channel.
56
+ */
57
+ export declare function openGenerationChannel(handlers: GenerationChannelHandlers, channelFactory?: ((name: string) => BroadcastChannel) | null): GenerationChannel | null;
58
+ /** Whether an operation has ended, whichever way. */
59
+ export declare function isFinishedOperationStatus(status: unknown): boolean;
60
+ /** An operation as the creator reads it: the fields it uses, from the answer of the API or a frame of its stream. */
61
+ export interface OperationSnapshot {
62
+ id?: string;
63
+ type?: string;
64
+ status: string;
65
+ progress?: number;
66
+ error?: string;
67
+ metadata?: Record<string, unknown>;
68
+ }
69
+ /**
70
+ * The operation inside an API answer. The API wraps what it answers in `{ success, data }`; a frame of the stream carries
71
+ * the operation itself. The generated client reads the first shape as an operation with every field empty, so the creator
72
+ * reads the raw body and takes the operation out of it here. Returns null for anything that is not an operation.
73
+ */
74
+ export declare function readOperationBody(body: unknown): OperationSnapshot | null;
75
+ /** The HTTP status of a failed call of the generated client (`ResponseError.response.status`), when it has one. */
76
+ export declare function httpStatusOfFailure(error: unknown): number | undefined;
77
+ /**
78
+ * Whether an operation is the code generation of this widget, finished or not (the operation names its widget once the
79
+ * generator has started, so an operation that does not name one yet is taken on the word of whoever pointed to it).
80
+ */
81
+ export declare function isGenerationOfWidget(snapshot: OperationSnapshot | null, widgetId: string): boolean;
82
+ /** What asking the server to stop an operation came to. */
83
+ export type StopOutcome =
84
+ /** The server marked it cancelled: the job stops at its next checkpoint, and a run that had not begun to write is not charged. */
85
+ {
86
+ outcome: 'stopped';
87
+ }
88
+ /** It had ended before the stop arrived (finished, failed, or already cancelled): nothing was left to stop. */
89
+ | {
90
+ outcome: 'already-ended';
91
+ status: string;
92
+ }
93
+ /** The server does not know the operation (its record expired, or it is not this visitor's): nothing to stop from here. */
94
+ | {
95
+ outcome: 'gone';
96
+ }
97
+ /** The server could not be told. The job may still be running. */
98
+ | {
99
+ outcome: 'failed';
100
+ error: unknown;
101
+ };
102
+ /** The part of the generated client that `requestOperationStop` uses. */
103
+ export interface OperationStopClient {
104
+ operationsIdCancelPostRaw: (requestParameters: {
105
+ id: string;
106
+ }) => Promise<{
107
+ raw: Response;
108
+ }>;
109
+ }
110
+ export interface StopOptions {
111
+ /** How many times to ask before giving up (a network blip should not leave a job running). Default 2. */
112
+ attempts?: number;
113
+ /** How long to wait between two asks, in milliseconds. Default 1200. */
114
+ retryAfterMs?: number;
115
+ /** Waits; replaced in tests. */
116
+ wait?: (milliseconds: number) => Promise<void>;
117
+ }
118
+ /**
119
+ * Asks the server to stop an operation. The call is safe to repeat (stopping a stopped operation changes nothing), so a
120
+ * failure that may pass is retried once.
121
+ */
122
+ export declare function requestOperationStop(client: OperationStopClient, operationId: string, options?: StopOptions): Promise<StopOutcome>;
@@ -0,0 +1,188 @@
1
+ /**
2
+ * generationSharing: how Stop reaches the server's job, and how the tabs of one browser share what a generation is doing.
3
+ *
4
+ * Two things the creator used to get wrong, both about a generation that runs on the server and outlives the click that
5
+ * started it:
6
+ *
7
+ * - Stop only walked away from the job. It stopped listening, and the server carried on writing (and billing) the whole
8
+ * run. `requestOperationStop` asks the server to stop it (`POST /operations/{id}/cancel`), which aborts the model call.
9
+ * - A second tab of the same customer never learned that the first was generating, so it offered Generate again and a
10
+ * widget could be generated twice at once. The tabs now tell each other which operation they are running
11
+ * (`openGenerationChannel`), and the one that hears it follows the operation by its status on the server, so what the
12
+ * server says is the state: no flag a closed tab left behind keeps a tab waiting.
13
+ *
14
+ * Why a channel and not only the browser's storage: in a partner's page the creator keeps what it remembers in memory (see
15
+ * `host/creatorHost.ts`), so two tabs share nothing there. A `BroadcastChannel` writes nothing anywhere: a message reaches
16
+ * the other tabs of the page's origin that are open right now and is gone. What travels is only a widget's id and an
17
+ * operation's id, and a tab that hears them checks with the server (with its own sign-in) whether the operation is one of
18
+ * its visitor's, so a message that reaches a tab of another visitor of the same browser changes nothing there.
19
+ *
20
+ * Kept free of Svelte and of the page so the rules are testable without a DOM.
21
+ */
22
+ /** The name of the channel. Namespaced so it cannot be taken for a channel of the partner's own page. */
23
+ export const GENERATION_CHANNEL_NAME = 'widgetic-creator:generation';
24
+ /** An id as the creator knows them (a UUID, or the temporary id of a widget being created): short, and without spaces. */
25
+ const ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_:.-]{0,119}$/;
26
+ /** The note a message carries, or null when it is not one of ours (the channel is shared by the whole origin). */
27
+ export function readGenerationNote(data) {
28
+ if (!data || typeof data !== 'object')
29
+ return null;
30
+ const note = data;
31
+ const widgetId = note.widgetId;
32
+ if (typeof widgetId !== 'string' || !ID_PATTERN.test(widgetId))
33
+ return null;
34
+ if (note.kind === 'ask')
35
+ return { kind: 'ask', widgetId };
36
+ if (note.kind === 'started') {
37
+ const operationId = note.operationId;
38
+ if (typeof operationId !== 'string' || !ID_PATTERN.test(operationId))
39
+ return null;
40
+ return { kind: 'started', widgetId, operationId };
41
+ }
42
+ return null;
43
+ }
44
+ /**
45
+ * Opens this tab's end of the channel. Returns null where the browser has no `BroadcastChannel` (the creator then works as
46
+ * before: the tabs do not hear each other, and the server's status is still what each tab follows once it knows the id).
47
+ * A handler that throws is logged and does not reach the channel.
48
+ */
49
+ export function openGenerationChannel(handlers, channelFactory = typeof BroadcastChannel === 'function'
50
+ ? (name) => new BroadcastChannel(name)
51
+ : null) {
52
+ if (!channelFactory)
53
+ return null;
54
+ let channel;
55
+ try {
56
+ channel = channelFactory(GENERATION_CHANNEL_NAME);
57
+ }
58
+ catch (error) {
59
+ console.warn('[GenerationSharing] The browser would not open the channel between tabs', error);
60
+ return null;
61
+ }
62
+ channel.onmessage = (event) => {
63
+ const note = readGenerationNote(event.data);
64
+ if (!note)
65
+ return;
66
+ try {
67
+ if (note.kind === 'started')
68
+ handlers.onStarted(note.widgetId, note.operationId);
69
+ else
70
+ handlers.onAsk(note.widgetId);
71
+ }
72
+ catch (error) {
73
+ console.error('[GenerationSharing] A handler of the channel between tabs threw', error);
74
+ }
75
+ };
76
+ const post = (note) => {
77
+ try {
78
+ channel.postMessage(note);
79
+ }
80
+ catch (error) {
81
+ // A closed channel, or a value the browser would not clone: the other tabs simply do not hear this one.
82
+ console.warn('[GenerationSharing] Could not tell the other tabs', error);
83
+ }
84
+ };
85
+ return {
86
+ announceStarted: (widgetId, operationId) => post({ kind: 'started', widgetId, operationId }),
87
+ ask: (widgetId) => post({ kind: 'ask', widgetId }),
88
+ close: () => {
89
+ channel.onmessage = null;
90
+ try {
91
+ channel.close();
92
+ }
93
+ catch {
94
+ /* already closed */
95
+ }
96
+ }
97
+ };
98
+ }
99
+ // ─── What the server says about an operation ──────────────────────────────────────────────────────────────────────────
100
+ /** The statuses after which nothing more happens to an operation. */
101
+ const FINISHED_STATUSES = new Set(['completed', 'failed', 'cancelled']);
102
+ /** Whether an operation has ended, whichever way. */
103
+ export function isFinishedOperationStatus(status) {
104
+ return typeof status === 'string' && FINISHED_STATUSES.has(status.toLowerCase());
105
+ }
106
+ /**
107
+ * The operation inside an API answer. The API wraps what it answers in `{ success, data }`; a frame of the stream carries
108
+ * the operation itself. The generated client reads the first shape as an operation with every field empty, so the creator
109
+ * reads the raw body and takes the operation out of it here. Returns null for anything that is not an operation.
110
+ */
111
+ export function readOperationBody(body) {
112
+ if (!body || typeof body !== 'object')
113
+ return null;
114
+ const record = body;
115
+ const inner = record.data && typeof record.data === 'object' && !Array.isArray(record.data) ? record.data : record;
116
+ if (typeof inner.status !== 'string')
117
+ return null;
118
+ return {
119
+ id: typeof inner.id === 'string' ? inner.id : undefined,
120
+ type: typeof inner.type === 'string' ? inner.type : undefined,
121
+ status: inner.status.toLowerCase(),
122
+ progress: typeof inner.progress === 'number' ? inner.progress : undefined,
123
+ error: typeof inner.error === 'string' ? inner.error : undefined,
124
+ metadata: inner.metadata && typeof inner.metadata === 'object' ? inner.metadata : undefined
125
+ };
126
+ }
127
+ /** The HTTP status of a failed call of the generated client (`ResponseError.response.status`), when it has one. */
128
+ export function httpStatusOfFailure(error) {
129
+ const status = error?.response?.status;
130
+ return typeof status === 'number' ? status : undefined;
131
+ }
132
+ /**
133
+ * Whether an operation is the code generation of this widget, finished or not (the operation names its widget once the
134
+ * generator has started, so an operation that does not name one yet is taken on the word of whoever pointed to it).
135
+ */
136
+ export function isGenerationOfWidget(snapshot, widgetId) {
137
+ if (!snapshot)
138
+ return false;
139
+ if (snapshot.type && snapshot.type !== 'code-generate')
140
+ return false;
141
+ const namedWidget = snapshot.metadata?.widgetId;
142
+ if (typeof namedWidget === 'string' && namedWidget.length > 0 && namedWidget !== widgetId)
143
+ return false;
144
+ return true;
145
+ }
146
+ /** A refusal that asking again cannot change (the request itself is wrong or not allowed); a timeout or a busy server can change. */
147
+ function refusalIsFinal(httpStatus) {
148
+ return httpStatus !== undefined && httpStatus >= 400 && httpStatus < 500 && httpStatus !== 408 && httpStatus !== 429;
149
+ }
150
+ /**
151
+ * Asks the server to stop an operation. The call is safe to repeat (stopping a stopped operation changes nothing), so a
152
+ * failure that may pass is retried once.
153
+ */
154
+ export async function requestOperationStop(client, operationId, options = {}) {
155
+ const attempts = Math.max(1, options.attempts ?? 2);
156
+ const retryAfterMs = options.retryAfterMs ?? 1200;
157
+ const wait = options.wait ?? ((milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds)));
158
+ let lastError = null;
159
+ for (let attempt = 1; attempt <= attempts; attempt += 1) {
160
+ try {
161
+ const response = await client.operationsIdCancelPostRaw({ id: operationId });
162
+ let body = null;
163
+ try {
164
+ body = await response.raw.json();
165
+ }
166
+ catch {
167
+ // An answer without a readable body still says the server took the stop (it answered 2xx).
168
+ }
169
+ const snapshot = readOperationBody(body);
170
+ // The answer is the operation as it stands: `cancelled` when this stop did it, or whatever it had already become.
171
+ if (snapshot && isFinishedOperationStatus(snapshot.status) && snapshot.status !== 'cancelled') {
172
+ return { outcome: 'already-ended', status: snapshot.status };
173
+ }
174
+ return { outcome: 'stopped' };
175
+ }
176
+ catch (error) {
177
+ const httpStatus = httpStatusOfFailure(error);
178
+ if (httpStatus === 404)
179
+ return { outcome: 'gone' };
180
+ lastError = error;
181
+ if (refusalIsFinal(httpStatus))
182
+ break;
183
+ if (attempt < attempts)
184
+ await wait(retryAfterMs);
185
+ }
186
+ }
187
+ return { outcome: 'failed', error: lastError };
188
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/creator",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "peerDependencies": {
6
6
  "@sveltejs/kit": "^2.20.0",