@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,5 +1,7 @@
1
1
  <script lang="ts">
2
+ import { Form, Input, Select } 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 { ContentContributorData } from '../../mock-smrt-client';
4
6
  import { M } from '../i18n.contribution.js';
5
7
 
@@ -45,7 +47,7 @@ function handleSubmit() {
45
47
  <h3>Contributors</h3>
46
48
  <p>{t(M['content.contributor_manager.intro'])}</p>
47
49
  </div>
48
- <button type="button" onclick={() => (editing = {})}>{t(M['content.contributor_manager.add_contributor'])}</button>
50
+ <Button variant="ghost" type="button" onclick={() => (editing = {})}>{t(M['content.contributor_manager.add_contributor'])}</Button>
49
51
  </header>
50
52
 
51
53
  <div class="layout">
@@ -57,43 +59,45 @@ function handleSubmit() {
57
59
  <div>{contributor.trustLevel || 'standard'}</div>
58
60
  </div>
59
61
  <div class="actions">
60
- <button type="button" class="secondary" onclick={() => (editing = contributor)}>Edit</button>
62
+ <Button variant="secondary" type="button" onclick={() => (editing = contributor)}>Edit</Button>
61
63
  {#if onDelete}
62
- <button type="button" class="danger" onclick={() => onDelete?.(contributor)}>Delete</button>
64
+ <Button variant="danger" type="button" onclick={() => onDelete?.(contributor)}>Delete</Button>
63
65
  {/if}
64
66
  </div>
65
67
  </article>
66
68
  {/each}
67
69
  </div>
68
70
 
69
- <form
70
- class="editor"
71
- onsubmit={(event) => {
72
- event.preventDefault();
73
- handleSubmit();
74
- }}
75
- >
76
- <label>
77
- Email
78
- <input type="email" bind:value={draft.email} required />
79
- </label>
80
- <label>
81
- Name
82
- <input type="text" bind:value={draft.name} />
83
- </label>
84
- <label>
85
- {t(M['content.contributor_manager.trust_level'])}
86
- <select bind:value={draft.trustLevel}>
87
- <option value="standard">standard</option>
88
- <option value="trusted">trusted</option>
89
- <option value="blocked">blocked</option>
90
- </select>
91
- </label>
92
-
93
- <div class="actions">
94
- <button type="submit">{t(M['content.contributor_manager.save_contributor'])}</button>
95
- </div>
96
- </form>
71
+ <div class="editor-shell">
72
+ <Form
73
+ class="editor"
74
+ onsubmit={(event) => {
75
+ event.preventDefault();
76
+ handleSubmit();
77
+ }}
78
+ >
79
+ <label>
80
+ Email
81
+ <Input type="email" bind:value={draft.email} required />
82
+ </label>
83
+ <label>
84
+ Name
85
+ <Input type="text" bind:value={draft.name} />
86
+ </label>
87
+ <label>
88
+ {t(M['content.contributor_manager.trust_level'])}
89
+ <Select bind:value={draft.trustLevel}>
90
+ <option value="standard">standard</option>
91
+ <option value="trusted">trusted</option>
92
+ <option value="blocked">blocked</option>
93
+ </Select>
94
+ </label>
95
+
96
+ <div class="actions">
97
+ <Button variant="primary" type="submit">{t(M['content.contributor_manager.save_contributor'])}</Button>
98
+ </div>
99
+ </Form>
100
+ </div>
97
101
  </div>
98
102
  </section>
99
103
 
@@ -101,7 +105,7 @@ function handleSubmit() {
101
105
  .manager,
102
106
  .layout,
103
107
  .list,
104
- .editor {
108
+ .editor-shell :global(.editor) {
105
109
  display: grid;
106
110
  gap: 1rem;
107
111
  }
@@ -111,7 +115,7 @@ function handleSubmit() {
111
115
  }
112
116
 
113
117
  .card,
114
- .editor {
118
+ .editor-shell :global(.editor) {
115
119
  border: 1px solid var(--smrt-color-outline-variant);
116
120
  border-radius: 0.75rem;
117
121
  padding: 0.9rem;
@@ -127,7 +131,7 @@ function handleSubmit() {
127
131
  flex-wrap: wrap;
128
132
  }
129
133
 
130
- .editor label {
134
+ .editor-shell label {
131
135
  display: grid;
132
136
  gap: 0.35rem;
133
137
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentContributorManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributorManager.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC1D;AAgGD,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ContentContributorManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributorManager.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC1D;AAoGD,QAAA,MAAM,yBAAyB,2CAAwC,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 { Input, Select, Textarea } 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 { ContentCorrectionData, FactData } from '../../mock-smrt-client';
4
6
  import { createClient } from '../../mock-smrt-client';
5
7
  import { normalizeApiBaseUrl } from '../api';
@@ -172,7 +174,7 @@ async function issueCorrection() {
172
174
  {:else}
173
175
  <label class="workflow-field">
174
176
  Summary
175
- <input
177
+ <Input
176
178
  type="text"
177
179
  bind:value={correctionSummary}
178
180
  placeholder={t(M['content.corrections_tool.what_was_wrong'])}
@@ -181,44 +183,46 @@ async function issueCorrection() {
181
183
 
182
184
  <label class="workflow-field">
183
185
  {t(M['content.corrections_tool.related_fact'])}
184
- <select bind:value={correctionFactId}>
186
+ <Select bind:value={correctionFactId}>
185
187
  <option value="">{t(M['content.corrections_tool.general_correction'])}</option>
186
188
  {#each facts as fact (fact.id)}
187
189
  <option value={fact.id ?? ''}>{fact.textRefined}</option>
188
190
  {/each}
189
- </select>
191
+ </Select>
190
192
  </label>
191
193
 
192
194
  <label class="workflow-field">
193
195
  {t(M['content.corrections_tool.corrected_fact_text'])}
194
- <textarea
195
- rows="4"
196
+ <Textarea
197
+ rows={4}
196
198
  bind:value={correctedFactText}
197
199
  placeholder={t(M['content.corrections_tool.provide_corrected_wording'])}
198
- ></textarea>
200
+ ></Textarea>
199
201
  </label>
200
202
 
201
203
  <label class="workflow-field">
202
204
  {t(M['content.corrections_tool.public_note'])}
203
- <textarea
204
- rows="3"
205
+ <Textarea
206
+ rows={3}
205
207
  bind:value={correctionPublicNote}
206
208
  placeholder={t(M['content.corrections_tool.optional_public_correction_note'])}
207
- ></textarea>
209
+ ></Textarea>
208
210
  </label>
209
211
 
210
212
  <label class="checkbox-row">
213
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
211
214
  <input type="checkbox" bind:checked={publishCorrection} />
212
215
  {t(M['content.corrections_tool.publish_immediately'])}
213
216
  </label>
214
217
 
215
- <button
218
+ <Button
219
+ variant="primary"
216
220
  type="button"
217
221
  disabled={busy || correctionSummary.trim().length === 0}
218
222
  onclick={() => void issueCorrection()}
219
223
  >
220
224
  {busy ? 'Issuing correction...' : 'Issue correction'}
221
- </button>
225
+ </Button>
222
226
 
223
227
  <div class="tool-list">
224
228
  <div class="section-caption">{t(M['content.corrections_tool.published_history'])}</div>
@@ -258,34 +262,6 @@ async function issueCorrection() {
258
262
  font-weight: var(--smrt-typography-weight-medium, 500);
259
263
  }
260
264
 
261
- .workflow-field input,
262
- .workflow-field textarea,
263
- .workflow-field select {
264
- width: 100%;
265
- box-sizing: border-box;
266
- padding: 0.75rem;
267
- border-radius: 0.5rem;
268
- border: 1px solid var(--smrt-color-outline);
269
- background: var(--smrt-color-surface);
270
- color: var(--smrt-color-on-surface);
271
- font-family: inherit;
272
- }
273
-
274
- button {
275
- border: none;
276
- border-radius: 0.5rem;
277
- padding: 0.7rem 0.95rem;
278
- background: var(--smrt-color-primary);
279
- color: var(--smrt-color-on-primary, white);
280
- cursor: pointer;
281
- font-weight: var(--smrt-typography-weight-semibold, 600);
282
- }
283
-
284
- button:disabled {
285
- cursor: not-allowed;
286
- opacity: 0.65;
287
- }
288
-
289
265
  .tool-card {
290
266
  display: flex;
291
267
  flex-direction: column;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentCorrectionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentCorrectionsTool.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAY,MAAM,wBAAwB,CAAC;AAM9E,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAK,IAAI,CAAC;CACtE;AAoOD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ContentCorrectionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentCorrectionsTool.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAY,MAAM,wBAAwB,CAAC;AAM9E,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAK,IAAI,CAAC;CACtE;AAuOD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}