@happyvertical/smrt-content 0.34.4 → 0.34.6

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.
Files changed (54) hide show
  1. package/dist/manifest.json +2 -2
  2. package/dist/smrt-knowledge.json +4 -4
  3. package/dist/svelte/components/ContentAgentChat.svelte +10 -19
  4. package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
  5. package/dist/svelte/components/ContentBodyEditor.svelte +52 -38
  6. package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
  7. package/dist/svelte/components/ContentClaimAuditTool.svelte +10 -24
  8. package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
  9. package/dist/svelte/components/ContentContributionForm.svelte +4 -3
  10. package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
  11. package/dist/svelte/components/ContentContributionInbox.svelte +11 -8
  12. package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
  13. package/dist/svelte/components/ContentContributionPortal.svelte +4 -2
  14. package/dist/svelte/components/ContentContributionPortal.svelte.d.ts.map +1 -1
  15. package/dist/svelte/components/ContentContributionTypeManager.svelte +5 -4
  16. package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
  17. package/dist/svelte/components/ContentContributorManager.svelte +5 -4
  18. package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
  19. package/dist/svelte/components/ContentCorrectionsTool.svelte +4 -17
  20. package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
  21. package/dist/svelte/components/ContentEditor.svelte +66 -60
  22. package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
  23. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +4 -3
  24. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
  25. package/dist/svelte/components/ContentGovernanceManager.svelte +21 -20
  26. package/dist/svelte/components/ContentGovernanceManager.svelte.d.ts.map +1 -1
  27. package/dist/svelte/components/ContentGovernancePanel.svelte +44 -58
  28. package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
  29. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +4 -3
  30. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
  31. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +8 -7
  32. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
  33. package/dist/svelte/components/ContentImageBrowser.svelte +11 -10
  34. package/dist/svelte/components/ContentImageBrowser.svelte.d.ts.map +1 -1
  35. package/dist/svelte/components/ContentImageChooser.svelte +19 -12
  36. package/dist/svelte/components/ContentImageChooser.svelte.d.ts.map +1 -1
  37. package/dist/svelte/components/ContentList.svelte +48 -34
  38. package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
  39. package/dist/svelte/components/ContentReferencesPanel.svelte +14 -5
  40. package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
  41. package/dist/svelte/components/ContentReviewStatusTray.svelte +17 -13
  42. package/dist/svelte/components/ContentReviewStatusTray.svelte.d.ts.map +1 -1
  43. package/dist/svelte/components/ContentVersionsTool.svelte +7 -21
  44. package/dist/svelte/components/ContentVersionsTool.svelte.d.ts.map +1 -1
  45. package/dist/svelte/i18n.editor.d.ts +1 -0
  46. package/dist/svelte/i18n.editor.d.ts.map +1 -1
  47. package/dist/svelte/i18n.editor.js +1 -0
  48. package/dist/svelte/routes/ContentContributionsRoute.svelte +6 -5
  49. package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
  50. package/dist/svelte/routes/ContentFactsRoute.svelte +4 -3
  51. package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
  52. package/dist/svelte/routes/ContentWorkspaceRoute.svelte +6 -4
  53. package/dist/svelte/routes/ContentWorkspaceRoute.svelte.d.ts.map +1 -1
  54. package/package.json +15 -14
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { ConfirmDialog } from '@happyvertical/smrt-ui/feedback';
3
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
+ import { Button } from '@happyvertical/smrt-ui/ui';
4
5
  import type { Snippet } from 'svelte';
5
6
  import { untrack } from 'svelte';
6
7
  import { M } from '../i18n.contribution.js';
@@ -176,10 +177,14 @@ function cancelDelete() {
176
177
 
177
178
  <div class="actions-group">
178
179
  <div class="view-toggles">
179
- <button
180
+ <Button
181
+ variant="ghost"
182
+ size="sm"
180
183
  type="button"
181
- class:active={viewMode === 'grid'}
184
+ class={`view-toggle-btn${viewMode === 'grid' ? ' view-toggle-btn--active' : ''}`}
185
+ aria-pressed={viewMode === 'grid'}
182
186
  onclick={() => viewMode = 'grid'}
187
+ aria-label={t(M['content.content_list.grid_view'])}
183
188
  title={t(M['content.content_list.grid_view'])}
184
189
  >
185
190
  <svg viewBox="0 0 24 24" width="18" height="18" stroke="currentColor" stroke-width="2" fill="none">
@@ -188,11 +193,15 @@ function cancelDelete() {
188
193
  <rect x="14" y="14" width="7" height="7"></rect>
189
194
  <rect x="3" y="14" width="7" height="7"></rect>
190
195
  </svg>
191
- </button>
192
- <button
196
+ </Button>
197
+ <Button
198
+ variant="ghost"
199
+ size="sm"
193
200
  type="button"
194
- class:active={viewMode === 'detailed'}
201
+ class={`view-toggle-btn${viewMode === 'detailed' ? ' view-toggle-btn--active' : ''}`}
202
+ aria-pressed={viewMode === 'detailed'}
195
203
  onclick={() => viewMode = 'detailed'}
204
+ aria-label={t(M['content.content_list.detailed_list'])}
196
205
  title={t(M['content.content_list.detailed_list'])}
197
206
  >
198
207
  <svg viewBox="0 0 24 24" width="18" height="18" stroke="currentColor" stroke-width="2" fill="none">
@@ -203,11 +212,15 @@ function cancelDelete() {
203
212
  <line x1="3" y1="12" x2="3.01" y2="12"></line>
204
213
  <line x1="3" y1="18" x2="3.01" y2="18"></line>
205
214
  </svg>
206
- </button>
207
- <button
215
+ </Button>
216
+ <Button
217
+ variant="ghost"
218
+ size="sm"
208
219
  type="button"
209
- class:active={viewMode === 'compact'}
220
+ class={`view-toggle-btn${viewMode === 'compact' ? ' view-toggle-btn--active' : ''}`}
221
+ aria-pressed={viewMode === 'compact'}
210
222
  onclick={() => viewMode = 'compact'}
223
+ aria-label={t(M['content.content_list.compact_list'])}
211
224
  title={t(M['content.content_list.compact_list'])}
212
225
  >
213
226
  <svg viewBox="0 0 24 24" width="18" height="18" stroke="currentColor" stroke-width="2" fill="none">
@@ -215,16 +228,16 @@ function cancelDelete() {
215
228
  <line x1="3" y1="12" x2="21" y2="12"></line>
216
229
  <line x1="3" y1="18" x2="21" y2="18"></line>
217
230
  </svg>
218
- </button>
231
+ </Button>
219
232
  </div>
220
-
221
- <button class="add-button" type="button" onclick={() => onAdd()}>
233
+
234
+ <Button variant="ghost" class="add-button" type="button" onclick={() => onAdd()}>
222
235
  <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none">
223
236
  <line x1="12" y1="5" x2="12" y2="19"></line>
224
237
  <line x1="5" y1="12" x2="19" y2="12"></line>
225
238
  </svg>
226
239
  {t(M['content.content_list.add_content'])}
227
- </button>
240
+ </Button>
228
241
  </div>
229
242
  </div>
230
243
 
@@ -261,8 +274,8 @@ function cancelDelete() {
261
274
  {#if getViewHref?.(content)}
262
275
  <a class="icon-btn" href={getViewHref(content) || '#'} title={t(M['content.content_list.view_published_article'])} aria-label={t(M['content.content_list.view_published_article'])}>🔎</a>
263
276
  {/if}
264
- <button class="icon-btn" type="button" onclick={() => onEdit(content)} title={t(M['content.content_list.edit'])} aria-label={t(M['content.content_list.edit'])}>✏️</button>
265
- <button class="icon-btn delete-icon" type="button" onclick={() => handleDeleteContent(content)} title={t(M['content.content_list.delete'])} aria-label={t(M['content.content_list.delete'])}>🗑️</button>
277
+ <Button variant="ghost" size="sm" class="icon-btn" type="button" onclick={() => onEdit(content)} title={t(M['content.content_list.edit'])} aria-label={t(M['content.content_list.edit'])}>✏️</Button>
278
+ <Button variant="ghost" size="sm" class="icon-btn delete-icon" type="button" onclick={() => handleDeleteContent(content)} title={t(M['content.content_list.delete'])} aria-label={t(M['content.content_list.delete'])}>🗑️</Button>
266
279
  </td>
267
280
  </tr>
268
281
  {/each}
@@ -314,14 +327,15 @@ function cancelDelete() {
314
327
  {#if getViewHref?.(content)}
315
328
  <a href={getViewHref(content) || '#'} class="quiet-action">{t(M['content.content_list.view_article'])}</a>
316
329
  {/if}
317
- <button type="button" class="quiet-action" onclick={() => onEdit(content)}>{t(M['content.content_list.edit'])}</button>
318
- <button
330
+ <Button variant="ghost" type="button" class="quiet-action" onclick={() => onEdit(content)}>{t(M['content.content_list.edit'])}</Button>
331
+ <Button
332
+ variant="ghost"
319
333
  type="button"
320
334
  class="quiet-action quiet-action--danger"
321
335
  onclick={() => handleDeleteContent(content)}
322
336
  >
323
337
  {t(M['content.content_list.delete'])}
324
- </button>
338
+ </Button>
325
339
  </div>
326
340
  </article>
327
341
  {/each}
@@ -374,8 +388,8 @@ function cancelDelete() {
374
388
  {#if getViewHref?.(content)}
375
389
  <a href={getViewHref(content) || '#'} class="view-btn">{t(M['content.content_list.view_article_button'])}</a>
376
390
  {/if}
377
- <button onclick={() => onEdit(content)}>{t(M['content.content_list.edit'])}</button>
378
- <button onclick={() => handleDeleteContent(content)} class="delete-btn">{t(M['content.content_list.delete'])}</button>
391
+ <Button variant="ghost" type="button" class="content-action-btn" onclick={() => onEdit(content)}>{t(M['content.content_list.edit'])}</Button>
392
+ <Button variant="ghost" type="button" class="content-action-btn delete-btn" onclick={() => handleDeleteContent(content)}>{t(M['content.content_list.delete'])}</Button>
379
393
  </div>
380
394
  </div>
381
395
  </div>
@@ -457,7 +471,7 @@ function cancelDelete() {
457
471
  border: 1px solid var(--smrt-color-outline-variant);
458
472
  }
459
473
 
460
- .view-toggles button {
474
+ .view-toggles :global(.view-toggle-btn) {
461
475
  background: transparent;
462
476
  border: none;
463
477
  padding: 0.4rem;
@@ -470,18 +484,18 @@ function cancelDelete() {
470
484
  transition: all 0.2s;
471
485
  }
472
486
 
473
- .view-toggles button:hover {
487
+ .view-toggles :global(.view-toggle-btn:hover) {
474
488
  color: var(--smrt-color-on-surface);
475
489
  background: color-mix(in srgb, var(--smrt-color-shadow) 5%, transparent);
476
490
  }
477
491
 
478
- .view-toggles button.active {
492
+ .view-toggles :global(.view-toggle-btn.view-toggle-btn--active) {
479
493
  background: var(--smrt-color-surface);
480
494
  color: var(--smrt-color-on-surface);
481
495
  box-shadow: var(--smrt-elevation-1, 0 1px 2px rgba(0,0,0,0.1));
482
496
  }
483
497
 
484
- .add-button {
498
+ .actions-group :global(.add-button) {
485
499
  display: flex;
486
500
  align-items: center;
487
501
  gap: 0.5rem;
@@ -500,7 +514,7 @@ function cancelDelete() {
500
514
  transition: transform 0.2s, box-shadow 0.2s;
501
515
  }
502
516
 
503
- .add-button:hover {
517
+ .actions-group :global(.add-button:hover) {
504
518
  transform: translateY(-1px);
505
519
  box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--smrt-color-primary) 50%, transparent);
506
520
  }
@@ -660,7 +674,7 @@ function cancelDelete() {
660
674
  padding-top: 1rem;
661
675
  }
662
676
 
663
- .content-actions button,
677
+ .content-actions :global(.content-action-btn),
664
678
  .content-actions a {
665
679
  flex: 1;
666
680
  padding: 0.5rem 1rem;
@@ -676,7 +690,7 @@ function cancelDelete() {
676
690
  text-decoration: none;
677
691
  }
678
692
 
679
- .content-actions button:hover,
693
+ .content-actions :global(.content-action-btn:hover),
680
694
  .content-actions a:hover {
681
695
  background: var(--smrt-color-surface-variant);
682
696
  border-color: var(--smrt-color-outline);
@@ -686,11 +700,11 @@ function cancelDelete() {
686
700
  color: var(--smrt-color-primary) !important;
687
701
  }
688
702
 
689
- .delete-btn {
703
+ .content-actions :global(.delete-btn) {
690
704
  color: var(--smrt-color-error) !important;
691
705
  }
692
706
 
693
- .delete-btn:hover {
707
+ .content-actions :global(.delete-btn:hover) {
694
708
  background: var(--smrt-color-error-container) !important;
695
709
  border-color: var(--smrt-color-error) !important;
696
710
  }
@@ -754,7 +768,7 @@ function cancelDelete() {
754
768
  min-width: 8.5rem;
755
769
  }
756
770
 
757
- .quiet-action {
771
+ .content-row__actions :global(.quiet-action) {
758
772
  display: inline-flex;
759
773
  align-items: center;
760
774
  justify-content: center;
@@ -769,11 +783,11 @@ function cancelDelete() {
769
783
  cursor: pointer;
770
784
  }
771
785
 
772
- .quiet-action:hover {
786
+ .content-row__actions :global(.quiet-action:hover) {
773
787
  background: var(--smrt-color-surface-container-low);
774
788
  }
775
789
 
776
- .quiet-action--danger {
790
+ .content-row__actions :global(.quiet-action--danger) {
777
791
  color: var(--smrt-color-error);
778
792
  }
779
793
 
@@ -855,7 +869,7 @@ function cancelDelete() {
855
869
  white-space: nowrap;
856
870
  }
857
871
 
858
- .icon-btn {
872
+ .actions-cell :global(.icon-btn) {
859
873
  background: transparent;
860
874
  border: none;
861
875
  cursor: pointer;
@@ -866,12 +880,12 @@ function cancelDelete() {
866
880
  opacity: 0.7;
867
881
  }
868
882
 
869
- .icon-btn:hover {
883
+ .actions-cell :global(.icon-btn:hover) {
870
884
  background: var(--smrt-color-surface-variant);
871
885
  opacity: 1;
872
886
  }
873
887
 
874
- .delete-icon:hover {
888
+ .actions-cell :global(.delete-icon:hover) {
875
889
  background: var(--smrt-color-error-container);
876
890
  }
877
891
 
@@ -1 +1 @@
1
- {"version":3,"file":"ContentList.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentList.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKrC,KAAK,gBAAgB,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C,CAAC;AA4WF,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ContentList.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentList.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKrC,KAAK,gBAAgB,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C,CAAC;AA6WF,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
4
  import type { Snippet } from 'svelte';
4
5
  import type { ContentEditorReference } from '../content-editor-form';
5
6
  import { M } from '../i18n.editor.js';
@@ -99,7 +100,11 @@ function removeReference(id: string) {
99
100
  {/if}
100
101
  </div>
101
102
  {#if referenceId}
102
- <button type="button" onclick={() => removeReference(referenceId)}>Remove</button>
103
+ <Button
104
+ variant="ghost"
105
+ type="button"
106
+ class="reference-button"
107
+ onclick={() => removeReference(referenceId)}>Remove</Button>
103
108
  {/if}
104
109
  </div>
105
110
  {/each}
@@ -121,7 +126,11 @@ function removeReference(id: string) {
121
126
  }
122
127
  }}
123
128
  />
124
- <button type="button" onclick={addReference}>Add</button>
129
+ <Button
130
+ variant="ghost"
131
+ type="button"
132
+ class="reference-button"
133
+ onclick={addReference}>Add</Button>
125
134
  </div>
126
135
 
127
136
  {#if children}
@@ -199,7 +208,7 @@ function removeReference(id: string) {
199
208
  }
200
209
 
201
210
  input,
202
- button {
211
+ .content-references-panel :global(.reference-button) {
203
212
  min-height: 2.5rem;
204
213
  border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 50%, transparent);
205
214
  border-radius: 0.5rem;
@@ -209,13 +218,13 @@ function removeReference(id: string) {
209
218
  padding: 0.55rem 0.875rem;
210
219
  }
211
220
 
212
- button {
221
+ .content-references-panel :global(.reference-button) {
213
222
  background: var(--smrt-color-surface-container);
214
223
  cursor: pointer;
215
224
  font-weight: var(--smrt-typography-weight-semibold, 600);
216
225
  }
217
226
 
218
- button:hover {
227
+ .content-references-panel :global(.reference-button:hover) {
219
228
  background: var(--smrt-color-surface-container-high);
220
229
  }
221
230
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentReferencesPanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReferencesPanel.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAsHD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ContentReferencesPanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReferencesPanel.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuHD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
+
2
4
  export type ContentReviewStatusTone =
3
5
  | 'neutral'
4
6
  | 'danger'
@@ -64,18 +66,20 @@ let {
64
66
  {#if items.length > 0}
65
67
  <div class="content-review-status-tray" role="group" aria-label={label}>
66
68
  {#each items as item (item.id)}
67
- <button
69
+ <Button
70
+ variant="ghost"
68
71
  type="button"
69
72
  aria-pressed={activeId === item.id && open}
70
- class={`tray-button tray-button--${item.tone}`}
71
- class:active={activeId === item.id && open}
73
+ class={`tray-button tray-button--${item.tone}${
74
+ activeId === item.id && open ? ' tray-button--active' : ''
75
+ }`}
72
76
  title={`${item.label}: ${item.status}`}
73
77
  onclick={() => onSelect?.(item)}
74
78
  >
75
79
  {@render trayIcon(item.icon)}
76
80
  <span class="tray-button__indicator" aria-hidden="true"></span>
77
81
  <span class="sr-only">{item.label}: {item.status}</span>
78
- </button>
82
+ </Button>
79
83
  {/each}
80
84
  </div>
81
85
  {/if}
@@ -88,7 +92,7 @@ let {
88
92
  min-height: 2.5rem;
89
93
  }
90
94
 
91
- .tray-button {
95
+ .content-review-status-tray :global(.tray-button) {
92
96
  position: relative;
93
97
  display: inline-grid;
94
98
  place-items: center;
@@ -102,13 +106,13 @@ let {
102
106
  padding: 0;
103
107
  }
104
108
 
105
- .tray-button:hover,
106
- .tray-button.active {
109
+ .content-review-status-tray :global(.tray-button:hover),
110
+ .content-review-status-tray :global(.tray-button.tray-button--active) {
107
111
  background: var(--smrt-color-surface-container);
108
112
  color: var(--smrt-color-on-surface);
109
113
  }
110
114
 
111
- .tray-button svg {
115
+ .content-review-status-tray :global(.tray-button svg) {
112
116
  width: 1.15rem;
113
117
  height: 1.15rem;
114
118
  fill: none;
@@ -118,7 +122,7 @@ let {
118
122
  stroke-linejoin: round;
119
123
  }
120
124
 
121
- .tray-button__indicator {
125
+ .content-review-status-tray :global(.tray-button__indicator) {
122
126
  position: absolute;
123
127
  right: 0.35rem;
124
128
  bottom: 0.35rem;
@@ -128,19 +132,19 @@ let {
128
132
  background: var(--smrt-color-outline);
129
133
  }
130
134
 
131
- .tray-button--danger .tray-button__indicator {
135
+ .content-review-status-tray :global(.tray-button--danger .tray-button__indicator) {
132
136
  background: var(--smrt-color-error);
133
137
  }
134
138
 
135
- .tray-button--warning .tray-button__indicator {
139
+ .content-review-status-tray :global(.tray-button--warning .tray-button__indicator) {
136
140
  background: var(--smrt-color-tertiary, #d97706);
137
141
  }
138
142
 
139
- .tray-button--success .tray-button__indicator {
143
+ .content-review-status-tray :global(.tray-button--success .tray-button__indicator) {
140
144
  background: var(--smrt-color-primary);
141
145
  }
142
146
 
143
- .sr-only {
147
+ .content-review-status-tray :global(.sr-only) {
144
148
  position: absolute;
145
149
  width: 1px;
146
150
  height: 1px;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentReviewStatusTray.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReviewStatusTray.svelte.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AACd,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,uBAAuB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;CACxD;AA8DD,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ContentReviewStatusTray.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReviewStatusTray.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AACd,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,uBAAuB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;CACxD;AAiED,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { ConfirmDialog } from '@happyvertical/smrt-ui/feedback';
3
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
+ import { Button } from '@happyvertical/smrt-ui/ui';
4
5
  import type { ContentVersionData } from '../../mock-smrt-client';
5
6
  import { createClient } from '../../mock-smrt-client';
6
7
  import { normalizeApiBaseUrl } from '../api';
@@ -165,14 +166,14 @@ async function restoreVersion(versionNumber: number) {
165
166
 
166
167
  <div class="governance-tool">
167
168
  <div class="tool-toolbar">
168
- <button
169
+ <Button
170
+ variant="secondary"
169
171
  type="button"
170
- class="secondary-button"
171
172
  disabled={busy || !savedContentId}
172
173
  onclick={() => void createSnapshot()}
173
174
  >
174
175
  {busy ? 'Working...' : 'Create snapshot'}
175
- </button>
176
+ </Button>
176
177
  </div>
177
178
 
178
179
  {#if error}
@@ -201,9 +202,9 @@ async function restoreVersion(versionNumber: number) {
201
202
  {/if}
202
203
  <div class="tool-card-footer">
203
204
  <span>{formatTimestamp(version.createdAt)}</span>
204
- <button
205
+ <Button
206
+ variant="secondary"
205
207
  type="button"
206
- class="secondary-button"
207
208
  disabled={busy || version.version === null || version.version === undefined}
208
209
  onclick={() => {
209
210
  if (version.version !== null && version.version !== undefined) {
@@ -212,7 +213,7 @@ async function restoreVersion(versionNumber: number) {
212
213
  }}
213
214
  >
214
215
  Restore
215
- </button>
216
+ </Button>
216
217
  </div>
217
218
  </div>
218
219
  {/each}
@@ -271,21 +272,6 @@ async function restoreVersion(versionNumber: number) {
271
272
  font-size: var(--smrt-typography-body-medium-size, 0.85rem);
272
273
  }
273
274
 
274
- .secondary-button {
275
- border-radius: 0.5rem;
276
- padding: 0.65rem 0.85rem;
277
- border: 1px solid var(--smrt-color-outline-variant);
278
- background: var(--smrt-color-surface);
279
- color: var(--smrt-color-on-surface);
280
- cursor: pointer;
281
- font-weight: var(--smrt-typography-weight-semibold, 600);
282
- }
283
-
284
- .secondary-button:disabled {
285
- cursor: not-allowed;
286
- opacity: 0.65;
287
- }
288
-
289
275
  .pill {
290
276
  border-radius: var(--smrt-radius-full, 9999px);
291
277
  padding: 0.2rem 0.55rem;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentVersionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentVersionsTool.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;CAC7D;AAwND,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ContentVersionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentVersionsTool.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;CAC7D;AAyND,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
@@ -5,6 +5,7 @@ export declare const M: {
5
5
  readonly 'content.content_agent_chat.no_topics': "content.content_agent_chat.no_topics";
6
6
  readonly 'content.content_agent_chat.topic_name_placeholder': "content.content_agent_chat.topic_name_placeholder";
7
7
  readonly 'content.content_agent_chat.new_topic': "content.content_agent_chat.new_topic";
8
+ readonly 'content.content_agent_chat.cancel': "content.content_agent_chat.cancel";
8
9
  readonly 'content.content_agent_chat.new': "content.content_agent_chat.new";
9
10
  readonly 'content.content_agent_chat.untitled_topic': "content.content_agent_chat.untitled_topic";
10
11
  readonly 'content.content_body_editor.toolbar': "content.content_body_editor.toolbar";
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.editor.d.ts","sourceRoot":"","sources":["../../src/svelte/i18n.editor.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGZ,CAAC"}
1
+ {"version":3,"file":"i18n.editor.d.ts","sourceRoot":"","sources":["../../src/svelte/i18n.editor.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGZ,CAAC"}
@@ -14,6 +14,7 @@ export const M = defineMessages({
14
14
  'content.content_agent_chat.no_topics': 'No topics...',
15
15
  'content.content_agent_chat.topic_name_placeholder': 'Topic name...',
16
16
  'content.content_agent_chat.new_topic': 'New Topic',
17
+ 'content.content_agent_chat.cancel': 'Cancel',
17
18
  'content.content_agent_chat.new': 'New',
18
19
  'content.content_agent_chat.untitled_topic': 'Untitled Topic',
19
20
  // ContentBodyEditor
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
4
  import { onMount } from 'svelte';
4
5
  import {
5
6
  type ContentContributionData,
@@ -413,13 +414,14 @@ async function handleDeleteContributor(data: Record<string, any>) {
413
414
  bind:value={portalEmail}
414
415
  placeholder={t(M['content.contributions.portal_email_placeholder'])}
415
416
  />
416
- <button
417
+ <Button
418
+ variant="ghost"
417
419
  type="submit"
418
- class="secondary"
420
+ class="load-button"
419
421
  disabled={refreshingPortal}
420
422
  >
421
423
  {refreshingPortal ? 'Loading...' : 'Load'}
422
- </button>
424
+ </Button>
423
425
  </form>
424
426
  </div>
425
427
 
@@ -721,8 +723,7 @@ async function handleDeleteContributor(data: Record<string, any>) {
721
723
  color: var(--smrt-color-on-surface);
722
724
  }
723
725
 
724
- .inline-form button,
725
- .secondary {
726
+ .inline-form :global(.load-button) {
726
727
  border-radius: var(--smrt-radius-full, 9999px);
727
728
  border: 1px solid color-mix(
728
729
  in srgb,
@@ -1 +1 @@
1
- {"version":3,"file":"ContentContributionsRoute.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/routes/ContentContributionsRoute.svelte.ts"],"names":[],"mappings":"AAmBA,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AAGrB,UAAU,8BAA8B;IACtC,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkcD,QAAA,MAAM,yBAAyB,oEAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ContentContributionsRoute.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/routes/ContentContributionsRoute.svelte.ts"],"names":[],"mappings":"AAoBA,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AAGrB,UAAU,8BAA8B;IACtC,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAmcD,QAAA,MAAM,yBAAyB,oEAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
4
  import { onMount } from 'svelte';
4
5
  import { createClient, type FactData } from '../../mock-smrt-client.js';
5
6
  import { M } from '../i18n.routes.js';
@@ -145,9 +146,9 @@ onMount(() => {
145
146
  <span>{t(M['content.facts.include_superseded'])}</span>
146
147
  </label>
147
148
 
148
- <button class="refresh-button" type="submit" disabled={refreshing}>
149
+ <Button variant="primary" class="refresh-button" type="submit" disabled={refreshing}>
149
150
  {refreshing ? 'Refreshing…' : 'Refresh'}
150
- </button>
151
+ </Button>
151
152
  </form>
152
153
  </section>
153
154
 
@@ -416,7 +417,7 @@ onMount(() => {
416
417
  color: var(--smrt-color-on-surface);
417
418
  }
418
419
 
419
- .refresh-button {
420
+ .filters :global(.refresh-button) {
420
421
  min-height: 2.85rem;
421
422
  border-radius: 0.85rem;
422
423
  border: none;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentFactsRoute.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/routes/ContentFactsRoute.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AAGrB,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiND,QAAA,MAAM,iBAAiB,4DAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"ContentFactsRoute.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/routes/ContentFactsRoute.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,aAAa,CAAC;AAGrB,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkND,QAAA,MAAM,iBAAiB,4DAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
4
  import { onMount } from 'svelte';
4
5
  import type { ContentData } from '../../mock-smrt-client.js';
5
6
  import { createClient } from '../../mock-smrt-client.js';
@@ -195,7 +196,7 @@ function closeForms() {
195
196
  {:else if error}
196
197
  <section class="panel panel--error">
197
198
  <p><strong>Error:</strong> {error}</p>
198
- <button type="button" onclick={loadContents}>{t(M['content.workspace.try_again'])}</button>
199
+ <Button variant="secondary" type="button" onclick={loadContents}>{t(M['content.workspace.try_again'])}</Button>
199
200
  </section>
200
201
  {:else if showAddForm || editingContent}
201
202
  <section class="panel">
@@ -230,13 +231,14 @@ function closeForms() {
230
231
  >
231
232
  {#snippet controls()}
232
233
  <div class="workspace-controls">
233
- <button
234
+ <Button
235
+ variant="ghost"
234
236
  type="button"
235
237
  class="secondary-action"
236
238
  onclick={handleAddGovernedContent}
237
239
  >
238
240
  {t(M['content.workspace.create_governed'])}
239
- </button>
241
+ </Button>
240
242
  <a class="inline-link" href={governanceHref}>
241
243
  {t(M['content.workspace.review_governance'])}
242
244
  </a>
@@ -404,7 +406,7 @@ function closeForms() {
404
406
  gap: 0.75rem;
405
407
  }
406
408
 
407
- .secondary-action {
409
+ .workspace-controls :global(.secondary-action) {
408
410
  border: 1px solid color-mix(
409
411
  in srgb,
410
412
  var(--smrt-color-primary) 30%,
@@ -1 +1 @@
1
- {"version":3,"file":"ContentWorkspaceRoute.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/routes/ContentWorkspaceRoute.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAM7D,OAAO,EAIL,KAAK,0BAA0B,EAEhC,MAAM,aAAa,CAAC;AAGrB,UAAU,0BAA0B;IAClC,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwND,QAAA,MAAM,qBAAqB,gEAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ContentWorkspaceRoute.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/routes/ContentWorkspaceRoute.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAM7D,OAAO,EAIL,KAAK,0BAA0B,EAEhC,MAAM,aAAa,CAAC;AAGrB,UAAU,0BAA0B;IAClC,UAAU,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAyND,QAAA,MAAM,qBAAqB,gEAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}