@widgetic/creator 0.4.21 → 0.4.23

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.
@@ -12597,7 +12597,12 @@ Requirements:
12597
12597
  }
12598
12598
 
12599
12599
  function pushCodegenProgressToUi(op: OperationStatus, widgetId: string | null | undefined) {
12600
- const line = formatCodegenProgressStatus(op);
12600
+ // The preview is already on the canvas while the version is still saving.
12601
+ // The bar stays at 70 until that save ends, so show 100 for that pause.
12602
+ const stillRunning = String(op.status || '').toLowerCase() === 'running';
12603
+ const versionStillSaving = !!(widgetId && previewUnblockedByWidgetId[widgetId] && stillRunning);
12604
+ const shown = versionStillSaving ? { ...op, progress: 100 } : op;
12605
+ const line = formatCodegenProgressStatus(shown);
12601
12606
  freezeProbe('progress', line);
12602
12607
  // Feed the freeze watchdog the latest status so a [FreezeReport] names the
12603
12608
  // stage the UI was showing when the main thread stopped responding.
@@ -19183,7 +19188,10 @@ $: if (codeGenerationPrompt && selectedWidgetId && promptLoadedForWidgetId === s
19183
19188
  {@const statusText = isPanelFocused ? (generateCodeStatus ?? ps.generateCodeStatus) : ps.generateCodeStatus}
19184
19189
  {@const hourlyLimit = isHourlyLimitText(statusText) || isHourlyLimitText(ps.lastGenerationError)}
19185
19190
  <div class="generate-code-status-ct flex flex-col gap-2 shrink-0 {embedded && !canvasAdvancedFeatures ? 'border-0 bg-transparent' : 'border-b border-gray-200 bg-gray-50'}" style="padding: 10px; margin: 0px; border-radius: 0;">
19186
- <div class="flex items-center justify-between gap-2 min-w-0">
19191
+ <div class="generate-code-status-row flex items-center justify-between gap-2 min-w-0">
19192
+ {#if generatingWidgetIds[panelWidgetId] && previewUnblockedByWidgetId[panelWidgetId] && !ps.lastGenerationFailed}
19193
+ <span class="codegen-save-spinner inline-block h-3 w-3 shrink-0 animate-spin rounded-full border-2 border-gray-300 border-t-forest-green" aria-hidden="true"></span>
19194
+ {/if}
19187
19195
  <div class="generate-code-status-el text-xs flex-1 min-w-0 truncate {ps.lastGenerationFailed && !hourlyLimit ? 'text-red-600' : 'text-gray-500'}">
19188
19196
  {#if ps.lastGenerationFailed && !hourlyLimit}
19189
19197
  <span class="text-red-500 font-medium">{$t('creator.codegen.generationFailed')}</span>
@@ -830,6 +830,26 @@
830
830
  {/if}
831
831
  <span class="widget-shape-drag-grip shrink-0 text-xs leading-none text-gray-400" aria-hidden="true">⠿</span>
832
832
 
833
+ {#if !showChrome}
834
+ <div class="widget-shape-drag-bar-actions ms-auto flex shrink-0 items-center gap-0.5">
835
+ <HoverTooltip text={$t('creator.livePreviews.refreshPreview')} class="inline-flex shrink-0">
836
+ <button
837
+ type="button"
838
+ class="widget-shape-refresh-btn flex h-6 w-6 items-center justify-center rounded text-gray-500 hover:bg-gray-100 hover:text-forest-green cursor-pointer"
839
+ aria-label={$t('creator.livePreviews.refreshPreview')}
840
+ onclick={(e) => handleRefreshClick(e, overlay.widgetId)}
841
+ onpointerdown={(e) => e.stopPropagation()}
842
+ >
843
+ <svg class="widget-shape-refresh-icon h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
844
+ <polyline points="23 4 23 10 17 10"/>
845
+ <path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>
846
+ </svg>
847
+ <span class="sr-only">{$t('creator.livePreviews.refresh')}</span>
848
+ </button>
849
+ </HoverTooltip>
850
+ </div>
851
+ {/if}
852
+
833
853
  {#if showChrome}
834
854
  {#if showExpandedChrome}
835
855
  <span
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/creator",
3
- "version": "0.4.21",
3
+ "version": "0.4.23",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "peerDependencies": {