@happyvertical/smrt-content 0.34.5 → 0.34.7

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 (60) hide show
  1. package/dist/manifest.json +2 -2
  2. package/dist/smrt-knowledge.json +4 -4
  3. package/dist/svelte/components/ContentAgentChat.svelte +27 -35
  4. package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
  5. package/dist/svelte/components/ContentBodyEditor.svelte +56 -41
  6. package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
  7. package/dist/svelte/components/ContentClaimAuditTool.svelte +11 -24
  8. package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
  9. package/dist/svelte/components/ContentContributionForm.svelte +74 -68
  10. package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
  11. package/dist/svelte/components/ContentContributionInbox.svelte +20 -15
  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 +121 -94
  16. package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
  17. package/dist/svelte/components/ContentContributorManager.svelte +38 -34
  18. package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
  19. package/dist/svelte/components/ContentCorrectionsTool.svelte +15 -39
  20. package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
  21. package/dist/svelte/components/ContentEditor.svelte +106 -124
  22. package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
  23. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +77 -74
  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 +64 -89
  28. package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
  29. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +43 -44
  30. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
  31. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +68 -68
  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 +60 -52
  38. package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
  39. package/dist/svelte/components/ContentMetadataFields.svelte +8 -23
  40. package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
  41. package/dist/svelte/components/ContentReferencesPanel.svelte +24 -11
  42. package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
  43. package/dist/svelte/components/ContentReviewStatusTray.svelte +17 -13
  44. package/dist/svelte/components/ContentReviewStatusTray.svelte.d.ts.map +1 -1
  45. package/dist/svelte/components/ContentStatusFields.svelte +8 -19
  46. package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
  47. package/dist/svelte/components/ContentTitleField.svelte +16 -12
  48. package/dist/svelte/components/ContentTitleField.svelte.d.ts.map +1 -1
  49. package/dist/svelte/components/ContentVersionsTool.svelte +7 -21
  50. package/dist/svelte/components/ContentVersionsTool.svelte.d.ts.map +1 -1
  51. package/dist/svelte/i18n.editor.d.ts +1 -0
  52. package/dist/svelte/i18n.editor.d.ts.map +1 -1
  53. package/dist/svelte/i18n.editor.js +1 -0
  54. package/dist/svelte/routes/ContentContributionsRoute.svelte +27 -23
  55. package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
  56. package/dist/svelte/routes/ContentFactsRoute.svelte +13 -9
  57. package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
  58. package/dist/svelte/routes/ContentWorkspaceRoute.svelte +6 -4
  59. package/dist/svelte/routes/ContentWorkspaceRoute.svelte.d.ts.map +1 -1
  60. package/package.json +15 -14
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Input, Textarea } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { M } from '../i18n.editor.js';
4
5
 
@@ -33,7 +34,7 @@ function updateTags(value: string) {
33
34
  <div class="content-metadata-fields">
34
35
  <label>
35
36
  <span>Author</span>
36
- <input
37
+ <Input
37
38
  type="text"
38
39
  value={data.author || ''}
39
40
  oninput={(event) => updateField('author', event.currentTarget.value)}
@@ -41,15 +42,15 @@ function updateTags(value: string) {
41
42
  </label>
42
43
  <label>
43
44
  <span>Description</span>
44
- <textarea
45
- rows="4"
45
+ <Textarea
46
+ rows={4}
46
47
  value={data.description || ''}
47
48
  oninput={(event) => updateField('description', event.currentTarget.value)}
48
- ></textarea>
49
+ ></Textarea>
49
50
  </label>
50
51
  <label>
51
52
  <span>Tags</span>
52
- <input
53
+ <Input
53
54
  type="text"
54
55
  value={tagsValue}
55
56
  placeholder={t(M['content.content_metadata_fields.tags_placeholder'])}
@@ -58,7 +59,7 @@ function updateTags(value: string) {
58
59
  </label>
59
60
  <label>
60
61
  <span>URL</span>
61
- <input
62
+ <Input
62
63
  type="url"
63
64
  value={data.url || ''}
64
65
  oninput={(event) => updateField('url', event.currentTarget.value)}
@@ -66,7 +67,7 @@ function updateTags(value: string) {
66
67
  </label>
67
68
  <label>
68
69
  <span>{t(M['content.content_metadata_fields.file_key'])}</span>
69
- <input
70
+ <Input
70
71
  type="text"
71
72
  value={data.fileKey || ''}
72
73
  oninput={(event) => updateField('fileKey', event.currentTarget.value)}
@@ -88,20 +89,4 @@ function updateTags(value: string) {
88
89
  font-weight: var(--smrt-typography-weight-medium, 500);
89
90
  }
90
91
 
91
- input,
92
- textarea {
93
- width: 100%;
94
- box-sizing: border-box;
95
- border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 50%, transparent);
96
- border-radius: 0.5rem;
97
- background: var(--smrt-color-surface-container-low);
98
- color: var(--smrt-color-on-surface);
99
- font: inherit;
100
- padding: 0.75rem 0.875rem;
101
- }
102
-
103
- textarea {
104
- min-height: 7rem;
105
- resize: vertical;
106
- }
107
92
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentMetadataFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentMetadataFields.svelte.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAwDD,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ContentMetadataFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentMetadataFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAyDD,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  <script lang="ts">
2
+ import { Input } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
5
  import type { Snippet } from 'svelte';
4
6
  import type { ContentEditorReference } from '../content-editor-form';
5
7
  import { M } from '../i18n.editor.js';
@@ -99,7 +101,11 @@ function removeReference(id: string) {
99
101
  {/if}
100
102
  </div>
101
103
  {#if referenceId}
102
- <button type="button" onclick={() => removeReference(referenceId)}>Remove</button>
104
+ <Button
105
+ variant="ghost"
106
+ type="button"
107
+ class="reference-button"
108
+ onclick={() => removeReference(referenceId)}>Remove</Button>
103
109
  {/if}
104
110
  </div>
105
111
  {/each}
@@ -109,7 +115,7 @@ function removeReference(id: string) {
109
115
  {/if}
110
116
 
111
117
  <div class="reference-input-row">
112
- <input
118
+ <Input
113
119
  type="text"
114
120
  aria-label={t(M['content.content_references_panel.add_reference_by_id_or_url'])}
115
121
  placeholder={t(M['content.content_references_panel.reference_id_or_url_placeholder'])}
@@ -121,7 +127,11 @@ function removeReference(id: string) {
121
127
  }
122
128
  }}
123
129
  />
124
- <button type="button" onclick={addReference}>Add</button>
130
+ <Button
131
+ variant="ghost"
132
+ type="button"
133
+ class="reference-button"
134
+ onclick={addReference}>Add</Button>
125
135
  </div>
126
136
 
127
137
  {#if children}
@@ -198,24 +208,27 @@ function removeReference(id: string) {
198
208
  gap: 0.65rem;
199
209
  }
200
210
 
201
- 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;
206
- background: var(--smrt-color-surface-container-low);
215
+ background: var(--smrt-color-surface-container);
207
216
  color: var(--smrt-color-on-surface);
208
217
  font: inherit;
209
218
  padding: 0.55rem 0.875rem;
210
- }
211
-
212
- button {
213
- background: var(--smrt-color-surface-container);
214
219
  cursor: pointer;
215
220
  font-weight: var(--smrt-typography-weight-semibold, 600);
216
221
  }
217
222
 
218
- button:hover {
223
+ .content-references-panel :global(.reference-button:hover) {
219
224
  background: var(--smrt-color-surface-container-high);
220
225
  }
226
+
227
+ /* Match the Input primitive's height/radius to the sibling reference-button so
228
+ the two grid columns of .reference-input-row align (the primitive's base
229
+ .input has no min-height). */
230
+ .content-references-panel :global(.input) {
231
+ min-height: 2.5rem;
232
+ border-radius: 0.5rem;
233
+ }
221
234
  </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":"AAMA,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;AAwHD,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,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Input, Select } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { M } from '../i18n.editor.js';
4
5
 
@@ -19,33 +20,33 @@ function updateField(key: string, value: unknown) {
19
20
  <div class="content-status-fields">
20
21
  <label>
21
22
  <span>Type</span>
22
- <select value={data.type || 'article'} onchange={(event) => updateField('type', event.currentTarget.value)}>
23
+ <Select value={data.type || 'article'} onchange={(event) => updateField('type', event.currentTarget.value)}>
23
24
  <option value="article">Article</option>
24
25
  <option value="document">Document</option>
25
26
  <option value="mirror">Mirror</option>
26
27
  <option value="video-segment">{t(M['content.content_status_fields.video_segment'])}</option>
27
- </select>
28
+ </Select>
28
29
  </label>
29
30
  <label>
30
31
  <span>State</span>
31
- <select value={data.state || 'active'} onchange={(event) => updateField('state', event.currentTarget.value)}>
32
+ <Select value={data.state || 'active'} onchange={(event) => updateField('state', event.currentTarget.value)}>
32
33
  <option value="active">Active</option>
33
34
  <option value="highlighted">Highlighted</option>
34
35
  <option value="deprecated">Deprecated</option>
35
- </select>
36
+ </Select>
36
37
  </label>
37
38
  <label>
38
39
  <span>Status</span>
39
- <select value={data.status || 'draft'} onchange={(event) => updateField('status', event.currentTarget.value)}>
40
+ <Select value={data.status || 'draft'} onchange={(event) => updateField('status', event.currentTarget.value)}>
40
41
  <option value="draft">Draft</option>
41
42
  <option value="review">Review</option>
42
43
  <option value="published">Published</option>
43
44
  <option value="archived">Archived</option>
44
- </select>
45
+ </Select>
45
46
  </label>
46
47
  <label>
47
48
  <span>Published</span>
48
- <input
49
+ <Input
49
50
  type="datetime-local"
50
51
  value={data.publish_date || ''}
51
52
  onchange={(event) => updateField('publish_date', event.currentTarget.value)}
@@ -70,16 +71,4 @@ function updateField(key: string, value: unknown) {
70
71
  font-weight: var(--smrt-typography-weight-semibold, 600);
71
72
  }
72
73
 
73
- select,
74
- input {
75
- min-height: 2.5rem;
76
- border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 50%, transparent);
77
- border-radius: 0.5rem;
78
- background: var(--smrt-color-surface-container-low);
79
- color: var(--smrt-color-on-surface);
80
- font: inherit;
81
- font-size: var(--smrt-typography-body-medium-size, 0.875rem);
82
- font-weight: var(--smrt-typography-weight-medium, 500);
83
- padding: 0.55rem 0.75rem;
84
- }
85
74
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentStatusFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentStatusFields.svelte.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAoDD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ContentStatusFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentStatusFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAqDD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import { Input } from '@happyvertical/smrt-ui/forms';
3
+
2
4
  export interface Props {
3
5
  value?: string;
4
6
  placeholder?: string;
@@ -14,17 +16,19 @@ let {
14
16
  }: Props = $props();
15
17
  </script>
16
18
 
17
- <input
18
- class="content-title-field"
19
- type="text"
20
- {placeholder}
21
- {required}
22
- value={value || ''}
23
- oninput={(event) => onChange?.(event.currentTarget.value)}
24
- />
19
+ <div class="content-title-field-shell">
20
+ <Input
21
+ class="content-title-field"
22
+ type="text"
23
+ {placeholder}
24
+ {required}
25
+ value={value || ''}
26
+ oninput={(event) => onChange?.(event.currentTarget.value)}
27
+ />
28
+ </div>
25
29
 
26
30
  <style>
27
- .content-title-field {
31
+ .content-title-field-shell :global(.content-title-field) {
28
32
  width: 100%;
29
33
  box-sizing: border-box;
30
34
  border: 0;
@@ -39,15 +43,15 @@ let {
39
43
  padding: 0;
40
44
  }
41
45
 
42
- .content-title-field::placeholder {
46
+ .content-title-field-shell :global(.content-title-field)::placeholder {
43
47
  color: color-mix(in srgb, var(--smrt-color-on-surface-variant) 70%, transparent);
44
48
  }
45
49
 
46
- .content-title-field:focus {
50
+ .content-title-field-shell :global(.content-title-field):focus {
47
51
  outline: none;
48
52
  }
49
53
 
50
- .content-title-field:focus-visible {
54
+ .content-title-field-shell :global(.content-title-field):focus-visible {
51
55
  outline: 2px solid var(--smrt-color-primary, #005ac1);
52
56
  outline-offset: 0.35rem;
53
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTitleField.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTitleField.svelte.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAkBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"ContentTitleField.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTitleField.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAqBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,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,7 @@
1
1
  <script lang="ts">
2
+ import { Form, Input } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
5
  import { onMount } from 'svelte';
4
6
  import {
5
7
  type ContentContributionData,
@@ -401,26 +403,29 @@ async function handleDeleteContributor(data: Record<string, any>) {
401
403
  {t(M['content.contributions.portal_body'])}
402
404
  </p>
403
405
  </div>
404
- <form
405
- class="inline-form"
406
- onsubmit={(event) => {
407
- event.preventDefault();
408
- void refreshPortalOnly();
409
- }}
410
- >
411
- <input
412
- type="email"
413
- bind:value={portalEmail}
414
- placeholder={t(M['content.contributions.portal_email_placeholder'])}
415
- />
416
- <button
417
- type="submit"
418
- class="secondary"
419
- disabled={refreshingPortal}
406
+ <div class="inline-form-shell">
407
+ <Form
408
+ class="inline-form"
409
+ onsubmit={(event) => {
410
+ event.preventDefault();
411
+ void refreshPortalOnly();
412
+ }}
420
413
  >
421
- {refreshingPortal ? 'Loading...' : 'Load'}
422
- </button>
423
- </form>
414
+ <Input
415
+ type="email"
416
+ bind:value={portalEmail}
417
+ placeholder={t(M['content.contributions.portal_email_placeholder'])}
418
+ />
419
+ <Button
420
+ variant="ghost"
421
+ type="submit"
422
+ class="load-button"
423
+ disabled={refreshingPortal}
424
+ >
425
+ {refreshingPortal ? 'Loading...' : 'Load'}
426
+ </Button>
427
+ </Form>
428
+ </div>
424
429
  </div>
425
430
 
426
431
  <ContentContributionPortal
@@ -705,14 +710,14 @@ async function handleDeleteContributor(data: Record<string, any>) {
705
710
  color: var(--smrt-color-on-surface-variant);
706
711
  }
707
712
 
708
- .inline-form {
713
+ .inline-form-shell :global(.inline-form) {
709
714
  display: flex;
710
715
  gap: 0.5rem;
711
716
  flex-wrap: wrap;
712
717
  align-items: center;
713
718
  }
714
719
 
715
- .inline-form input {
720
+ .inline-form-shell :global(.input) {
716
721
  min-width: min(22rem, 100%);
717
722
  padding: 0.7rem 0.85rem;
718
723
  border-radius: 0.75rem;
@@ -721,8 +726,7 @@ async function handleDeleteContributor(data: Record<string, any>) {
721
726
  color: var(--smrt-color-on-surface);
722
727
  }
723
728
 
724
- .inline-form button,
725
- .secondary {
729
+ .inline-form-shell :global(.load-button) {
726
730
  border-radius: var(--smrt-radius-full, 9999px);
727
731
  border: 1px solid color-mix(
728
732
  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":"AAqBA,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;AAscD,QAAA,MAAM,yBAAyB,oEAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  <script lang="ts">
2
+ import { Form, Input } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
+ import { Button } from '@happyvertical/smrt-ui/ui';
3
5
  import { onMount } from 'svelte';
4
6
  import { createClient, type FactData } from '../../mock-smrt-client.js';
5
7
  import { M } from '../i18n.routes.js';
@@ -117,10 +119,10 @@ onMount(() => {
117
119
 
118
120
  <main class="container page-main">
119
121
  <section class="filters-panel">
120
- <form class="filters" onsubmit={handleSubmit}>
122
+ <Form class="filters" onsubmit={handleSubmit}>
121
123
  <label class="search-field">
122
124
  <span>Search</span>
123
- <input
125
+ <Input
124
126
  type="search"
125
127
  bind:value={query}
126
128
  placeholder={t(M['content.facts.search_placeholder'])}
@@ -128,6 +130,7 @@ onMount(() => {
128
130
  </label>
129
131
 
130
132
  <label class="toggle">
133
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
131
134
  <input
132
135
  type="checkbox"
133
136
  bind:checked={latestOnly}
@@ -137,6 +140,7 @@ onMount(() => {
137
140
  </label>
138
141
 
139
142
  <label class="toggle">
143
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
140
144
  <input
141
145
  type="checkbox"
142
146
  bind:checked={includeSuperseded}
@@ -145,10 +149,10 @@ onMount(() => {
145
149
  <span>{t(M['content.facts.include_superseded'])}</span>
146
150
  </label>
147
151
 
148
- <button class="refresh-button" type="submit" disabled={refreshing}>
152
+ <Button variant="primary" class="refresh-button" type="submit" disabled={refreshing}>
149
153
  {refreshing ? 'Refreshing…' : 'Refresh'}
150
- </button>
151
- </form>
154
+ </Button>
155
+ </Form>
152
156
  </section>
153
157
 
154
158
  {#if error}
@@ -378,7 +382,7 @@ onMount(() => {
378
382
  border-color: color-mix(in srgb, var(--smrt-color-error) 30%, transparent);
379
383
  }
380
384
 
381
- .filters {
385
+ .filters-panel :global(.filters) {
382
386
  display: grid;
383
387
  grid-template-columns: minmax(0, 1.8fr) repeat(2, auto) auto;
384
388
  gap: 0.75rem;
@@ -396,7 +400,7 @@ onMount(() => {
396
400
  color: var(--smrt-color-on-surface-variant);
397
401
  }
398
402
 
399
- .search-field input {
403
+ .search-field :global(.input) {
400
404
  min-height: 2.85rem;
401
405
  border-radius: 0.85rem;
402
406
  border: 1px solid var(--smrt-color-outline-variant);
@@ -416,7 +420,7 @@ onMount(() => {
416
420
  color: var(--smrt-color-on-surface);
417
421
  }
418
422
 
419
- .refresh-button {
423
+ .filters-panel :global(.refresh-button) {
420
424
  min-height: 2.85rem;
421
425
  border-radius: 0.85rem;
422
426
  border: none;
@@ -605,7 +609,7 @@ onMount(() => {
605
609
  justify-content: flex-start;
606
610
  }
607
611
 
608
- .filters {
612
+ .filters-panel :global(.filters) {
609
613
  grid-template-columns: 1fr;
610
614
  }
611
615
  }