@motion-proto/live-tokens 0.6.0 → 0.6.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.
@@ -12,6 +12,7 @@
12
12
  import { scrollSectionIntoView } from '../lib/scrollSection';
13
13
  import { editorState } from '../lib/editorStore';
14
14
  import { editorView, sidebarCondensed, selectedComponent } from '../lib/editorViewStore';
15
+ import { componentDirty } from '../lib/editorStore';
15
16
  import { componentRegistryEntries, validateRegistryAgainstServerScan } from '../component-editor/registry';
16
17
  import { listComponents } from '../lib/componentConfigService';
17
18
 
@@ -170,12 +171,16 @@
170
171
  <button
171
172
  class="nav-item"
172
173
  class:active={$selectedComponent === item.id}
174
+ class:dirty={$componentDirty[item.id]}
173
175
  onmouseenter={(e) => showHint(item.label, e.currentTarget)}
174
176
  onmouseleave={hideHint}
175
177
  onclick={() => selectComponent(item.id)}
176
178
  >
177
179
  <i class={item.icon}></i>
178
180
  <span class="nav-label">{item.label}</span>
181
+ {#if $componentDirty[item.id]}
182
+ <span class="dirty-dot" aria-label="Unsaved changes" title="Unsaved changes"></span>
183
+ {/if}
179
184
  </button>
180
185
  {/each}
181
186
  </div>
@@ -262,6 +267,7 @@
262
267
  }
263
268
 
264
269
  .nav-item {
270
+ position: relative;
265
271
  display: grid;
266
272
  grid-template-columns: 48px 1fr;
267
273
  align-items: center;
@@ -286,6 +292,25 @@
286
292
  opacity: 0.85;
287
293
  }
288
294
 
295
+ /* Amber dot indicating unsaved changes. Anchored to the top-right of the
296
+ icon column so it stays visible whether the sidebar is condensed
297
+ (icon-only) or expanded (icon + label). */
298
+ .dirty-dot {
299
+ position: absolute;
300
+ top: 8px;
301
+ left: 30px;
302
+ width: 7px;
303
+ height: 7px;
304
+ border-radius: 50%;
305
+ background: var(--ui-highlight);
306
+ box-shadow: 0 0 0 2px black;
307
+ pointer-events: none;
308
+ }
309
+
310
+ .nav-item.dirty {
311
+ color: var(--ui-text-secondary);
312
+ }
313
+
289
314
  .nav-label {
290
315
  white-space: nowrap;
291
316
  overflow: hidden;