@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.
- package/dist/manifest.json +2 -2
- package/dist/smrt-knowledge.json +4 -4
- package/dist/svelte/components/ContentAgentChat.svelte +10 -19
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyEditor.svelte +52 -38
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentClaimAuditTool.svelte +10 -24
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionForm.svelte +4 -3
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionInbox.svelte +11 -8
- package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionPortal.svelte +4 -2
- package/dist/svelte/components/ContentContributionPortal.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionTypeManager.svelte +5 -4
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributorManager.svelte +5 -4
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentCorrectionsTool.svelte +4 -17
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentEditor.svelte +66 -60
- package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +4 -3
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceManager.svelte +21 -20
- package/dist/svelte/components/ContentGovernanceManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePanel.svelte +44 -58
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +4 -3
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +8 -7
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentImageBrowser.svelte +11 -10
- package/dist/svelte/components/ContentImageBrowser.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentImageChooser.svelte +19 -12
- package/dist/svelte/components/ContentImageChooser.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentList.svelte +48 -34
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReferencesPanel.svelte +14 -5
- package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReviewStatusTray.svelte +17 -13
- package/dist/svelte/components/ContentReviewStatusTray.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentVersionsTool.svelte +7 -21
- package/dist/svelte/components/ContentVersionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/i18n.editor.d.ts +1 -0
- package/dist/svelte/i18n.editor.d.ts.map +1 -1
- package/dist/svelte/i18n.editor.js +1 -0
- package/dist/svelte/routes/ContentContributionsRoute.svelte +6 -5
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentFactsRoute.svelte +4 -3
- package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte +6 -4
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte.d.ts.map +1 -1
- 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 {
|
|
5
6
|
type ContentCorrectionData,
|
|
6
7
|
type ContentGovernanceDefinitionsData,
|
|
@@ -1078,22 +1079,22 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1078
1079
|
<span><strong>{factAudit?.counts.contradicted ?? 0}</strong> contradicted</span>
|
|
1079
1080
|
<span><strong>{factAudit?.counts.needs_review ?? 0}</strong> review</span>
|
|
1080
1081
|
</div>
|
|
1081
|
-
<
|
|
1082
|
+
<Button
|
|
1083
|
+
variant="secondary"
|
|
1082
1084
|
type="button"
|
|
1083
|
-
class="secondary-button"
|
|
1084
1085
|
disabled={factAuditBusy || selectedClaimCount === 0}
|
|
1085
1086
|
onclick={() => void recheckSelectedClaims()}
|
|
1086
1087
|
>
|
|
1087
1088
|
{factAuditBusy ? 'Checking...' : `Recheck selected (${selectedClaimCount})`}
|
|
1088
|
-
</
|
|
1089
|
-
<
|
|
1089
|
+
</Button>
|
|
1090
|
+
<Button
|
|
1091
|
+
variant="secondary"
|
|
1090
1092
|
type="button"
|
|
1091
|
-
class="secondary-button"
|
|
1092
1093
|
disabled={factAuditBusy}
|
|
1093
1094
|
onclick={() => void repairFactAudit()}
|
|
1094
1095
|
>
|
|
1095
1096
|
{factAuditBusy ? 'Repairing...' : 'Repair audit'}
|
|
1096
|
-
</
|
|
1097
|
+
</Button>
|
|
1097
1098
|
</div>
|
|
1098
1099
|
<p class="claim-audit-help">
|
|
1099
1100
|
{t(M['content.governance_panel.article_claims_help'])}
|
|
@@ -1141,9 +1142,9 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1141
1142
|
</summary>
|
|
1142
1143
|
<div class="claim-audit-item__body">
|
|
1143
1144
|
<div class="claim-audit-item__actions">
|
|
1144
|
-
<
|
|
1145
|
+
<Button
|
|
1146
|
+
variant="secondary"
|
|
1145
1147
|
type="button"
|
|
1146
|
-
class="secondary-button"
|
|
1147
1148
|
disabled={factAuditBusy || !getClaimId(claim)}
|
|
1148
1149
|
onclick={() => {
|
|
1149
1150
|
const claimId = getClaimId(claim);
|
|
@@ -1151,7 +1152,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1151
1152
|
}}
|
|
1152
1153
|
>
|
|
1153
1154
|
{t(M['content.governance_panel.recheck_support'])}
|
|
1154
|
-
</
|
|
1155
|
+
</Button>
|
|
1155
1156
|
</div>
|
|
1156
1157
|
{#if claim.claimQuote}
|
|
1157
1158
|
<p><strong>{t(M['content.governance_panel.article_claim_label'])}</strong> {claim.claimQuote}</p>
|
|
@@ -1233,13 +1234,15 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1233
1234
|
{fact.status} · confidence {formatPercent(fact.confidence)}
|
|
1234
1235
|
</span>
|
|
1235
1236
|
</div>
|
|
1236
|
-
<
|
|
1237
|
+
<Button
|
|
1238
|
+
variant="ghost"
|
|
1239
|
+
size="sm"
|
|
1237
1240
|
type="button"
|
|
1238
1241
|
class="fact-chip__remove"
|
|
1239
1242
|
onclick={() => fact.id && removeFact(fact.id)}
|
|
1240
1243
|
>
|
|
1241
1244
|
Remove
|
|
1242
|
-
</
|
|
1245
|
+
</Button>
|
|
1243
1246
|
</div>
|
|
1244
1247
|
{/each}
|
|
1245
1248
|
</div>
|
|
@@ -1253,9 +1256,9 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1253
1256
|
bind:value={factQuery}
|
|
1254
1257
|
placeholder={t(M['content.governance_panel.search_fact_catalog'])}
|
|
1255
1258
|
/>
|
|
1256
|
-
<
|
|
1259
|
+
<Button variant="primary" type="button" onclick={searchFactsFirstPage}>
|
|
1257
1260
|
Search
|
|
1258
|
-
</
|
|
1261
|
+
</Button>
|
|
1259
1262
|
</div>
|
|
1260
1263
|
|
|
1261
1264
|
{#if catalogError}
|
|
@@ -1278,13 +1281,15 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1278
1281
|
{fact.status} · {fact.domain || 'general'} · confidence {formatPercent(fact.confidence)}
|
|
1279
1282
|
</span>
|
|
1280
1283
|
</div>
|
|
1281
|
-
<
|
|
1284
|
+
<Button
|
|
1285
|
+
variant="ghost"
|
|
1286
|
+
size="sm"
|
|
1282
1287
|
type="button"
|
|
1283
1288
|
disabled={!fact.id || selectedFactIds.includes(fact.id ?? '')}
|
|
1284
1289
|
onclick={() => addFact(fact)}
|
|
1285
1290
|
>
|
|
1286
1291
|
{!fact.id || selectedFactIds.includes(fact.id ?? '') ? 'Selected' : 'Add'}
|
|
1287
|
-
</
|
|
1292
|
+
</Button>
|
|
1288
1293
|
</div>
|
|
1289
1294
|
{/each}
|
|
1290
1295
|
</div>
|
|
@@ -1299,22 +1304,24 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1299
1304
|
{/if}
|
|
1300
1305
|
</span>
|
|
1301
1306
|
<div class="fact-pagination__actions">
|
|
1302
|
-
<
|
|
1307
|
+
<Button
|
|
1308
|
+
variant="ghost"
|
|
1309
|
+
size="sm"
|
|
1303
1310
|
type="button"
|
|
1304
|
-
class="secondary-button"
|
|
1305
1311
|
disabled={catalogLoading || catalogPage <= 1}
|
|
1306
1312
|
onclick={browsePreviousFacts}
|
|
1307
1313
|
>
|
|
1308
1314
|
Previous
|
|
1309
|
-
</
|
|
1310
|
-
<
|
|
1315
|
+
</Button>
|
|
1316
|
+
<Button
|
|
1317
|
+
variant="ghost"
|
|
1318
|
+
size="sm"
|
|
1311
1319
|
type="button"
|
|
1312
|
-
class="secondary-button"
|
|
1313
1320
|
disabled={catalogLoading || !catalogHasNextPage}
|
|
1314
1321
|
onclick={browseNextFacts}
|
|
1315
1322
|
>
|
|
1316
1323
|
Next
|
|
1317
|
-
</
|
|
1324
|
+
</Button>
|
|
1318
1325
|
</div>
|
|
1319
1326
|
</div>
|
|
1320
1327
|
{/if}
|
|
@@ -1414,7 +1421,8 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1414
1421
|
|
|
1415
1422
|
<div class="review-actions">
|
|
1416
1423
|
{#each activeProfileReviewActions as action (action.policyKey ?? action.kind)}
|
|
1417
|
-
<
|
|
1424
|
+
<Button
|
|
1425
|
+
variant="primary"
|
|
1418
1426
|
type="button"
|
|
1419
1427
|
disabled={reviewBusy !== null}
|
|
1420
1428
|
onclick={() => void runReview(action)}
|
|
@@ -1424,7 +1432,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1424
1432
|
{:else}
|
|
1425
1433
|
Run {action.label}
|
|
1426
1434
|
{/if}
|
|
1427
|
-
</
|
|
1435
|
+
</Button>
|
|
1428
1436
|
{/each}
|
|
1429
1437
|
</div>
|
|
1430
1438
|
|
|
@@ -1450,7 +1458,8 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1450
1458
|
placeholder={t(M['content.governance_panel.optional_review_instructions'])}
|
|
1451
1459
|
></textarea>
|
|
1452
1460
|
</label>
|
|
1453
|
-
<
|
|
1461
|
+
<Button
|
|
1462
|
+
variant="primary"
|
|
1454
1463
|
type="button"
|
|
1455
1464
|
disabled={reviewBusy !== null || !canRunCustomReview()}
|
|
1456
1465
|
onclick={() =>
|
|
@@ -1468,7 +1477,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1468
1477
|
{:else}
|
|
1469
1478
|
Run {customReviewButtonLabel}
|
|
1470
1479
|
{/if}
|
|
1471
|
-
</
|
|
1480
|
+
</Button>
|
|
1472
1481
|
</div>
|
|
1473
1482
|
|
|
1474
1483
|
<div class="review-list">
|
|
@@ -1697,13 +1706,14 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1697
1706
|
{t(M['content.governance_panel.publish_immediately'])}
|
|
1698
1707
|
</label>
|
|
1699
1708
|
|
|
1700
|
-
<
|
|
1709
|
+
<Button
|
|
1710
|
+
variant="primary"
|
|
1701
1711
|
type="button"
|
|
1702
1712
|
disabled={correctionBusy || correctionSummary.trim().length === 0}
|
|
1703
1713
|
onclick={() => void issueCorrection()}
|
|
1704
1714
|
>
|
|
1705
1715
|
{correctionBusy ? 'Issuing correction...' : 'Issue Correction'}
|
|
1706
|
-
</
|
|
1716
|
+
</Button>
|
|
1707
1717
|
|
|
1708
1718
|
<div class="review-list">
|
|
1709
1719
|
<div class="section-caption">{t(M['content.governance_panel.published_history'])}</div>
|
|
@@ -1736,14 +1746,14 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1736
1746
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
1737
1747
|
Versions
|
|
1738
1748
|
</div>
|
|
1739
|
-
<
|
|
1749
|
+
<Button
|
|
1750
|
+
variant="secondary"
|
|
1740
1751
|
type="button"
|
|
1741
|
-
class="secondary-button"
|
|
1742
1752
|
disabled={versionBusy}
|
|
1743
1753
|
onclick={(e) => { e.preventDefault(); void createSnapshot(); }}
|
|
1744
1754
|
>
|
|
1745
1755
|
{versionBusy ? 'Working...' : 'Create Snapshot'}
|
|
1746
|
-
</
|
|
1756
|
+
</Button>
|
|
1747
1757
|
</div>
|
|
1748
1758
|
<svg class="drawer-icon" style="margin-left: 1rem;" viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
|
1749
1759
|
</summary>
|
|
@@ -1765,9 +1775,9 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1765
1775
|
{/if}
|
|
1766
1776
|
<div class="version-card__footer">
|
|
1767
1777
|
<span>{formatTimestamp(version.createdAt)}</span>
|
|
1768
|
-
<
|
|
1778
|
+
<Button
|
|
1779
|
+
variant="secondary"
|
|
1769
1780
|
type="button"
|
|
1770
|
-
class="secondary-button"
|
|
1771
1781
|
disabled={versionBusy || version.version === null || version.version === undefined}
|
|
1772
1782
|
onclick={() => {
|
|
1773
1783
|
if (
|
|
@@ -1779,7 +1789,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1779
1789
|
}}
|
|
1780
1790
|
>
|
|
1781
1791
|
Restore
|
|
1782
|
-
</
|
|
1792
|
+
</Button>
|
|
1783
1793
|
</div>
|
|
1784
1794
|
</div>
|
|
1785
1795
|
{/each}
|
|
@@ -1943,30 +1953,6 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1943
1953
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
1944
1954
|
}
|
|
1945
1955
|
|
|
1946
|
-
.fact-search button,
|
|
1947
|
-
.review-actions button {
|
|
1948
|
-
border: none;
|
|
1949
|
-
border-radius: 0.5rem;
|
|
1950
|
-
padding: 0.7rem 0.95rem;
|
|
1951
|
-
background: var(--smrt-color-primary);
|
|
1952
|
-
color: var(--smrt-color-on-primary, white);
|
|
1953
|
-
cursor: pointer;
|
|
1954
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
.fact-search button:disabled,
|
|
1958
|
-
.review-actions button:disabled,
|
|
1959
|
-
.fact-pagination button:disabled {
|
|
1960
|
-
cursor: not-allowed;
|
|
1961
|
-
opacity: 0.65;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
.secondary-button {
|
|
1965
|
-
background: var(--smrt-color-surface);
|
|
1966
|
-
color: var(--smrt-color-on-surface);
|
|
1967
|
-
border: 1px solid var(--smrt-color-outline-variant);
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
1956
|
.fact-chip-list,
|
|
1971
1957
|
.fact-catalog__list,
|
|
1972
1958
|
.claim-audit-group,
|
|
@@ -2060,7 +2046,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
2060
2046
|
gap: 0.25rem;
|
|
2061
2047
|
}
|
|
2062
2048
|
|
|
2063
|
-
.fact-chip__remove {
|
|
2049
|
+
.fact-chip :global(.fact-chip__remove) {
|
|
2064
2050
|
background: transparent !important;
|
|
2065
2051
|
color: var(--smrt-color-error) !important;
|
|
2066
2052
|
padding: 0 !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernancePanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePanel.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentGovernancePanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePanel.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,KAAK,0BAA0B,EAQ/B,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EAEd,MAAM,wBAAwB,CAAC;AAMhC,MAAM,MAAM,6BAA6B,GACrC,WAAW,GACX,OAAO,GACP,SAAS,GACT,cAAc,GACd,aAAa,GACb,UAAU,CAAC;AASf,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAC/D,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7E,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,cAAc,CAAC,EAAE,6BAA6B,EAAE,CAAC;CAClD;AAioDD,QAAA,MAAM,sBAAsB;gCA34Bc,MAAM;MA24BoB,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,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 { ContentReviewPolicyData } from '../../mock-smrt-client';
|
|
4
5
|
import { M } from '../i18n.tools.js';
|
|
5
6
|
|
|
@@ -70,11 +71,11 @@ function handleSubmit() {
|
|
|
70
71
|
Enabled
|
|
71
72
|
</label>
|
|
72
73
|
<div class="actions">
|
|
73
|
-
<
|
|
74
|
+
<Button variant="primary" type="submit">{t(M['content.governance_policy_editor.save_policy'])}</Button>
|
|
74
75
|
{#if onCancel}
|
|
75
|
-
<
|
|
76
|
+
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
76
77
|
Cancel
|
|
77
|
-
</
|
|
78
|
+
</Button>
|
|
78
79
|
{/if}
|
|
79
80
|
</div>
|
|
80
81
|
</form>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernancePolicyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePolicyEditor.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentGovernancePolicyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePolicyEditor.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC1C,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAkFD,QAAA,MAAM,6BAA6B,2CAAwC,CAAC;AAC5E,KAAK,6BAA6B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACtF,eAAe,6BAA6B,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 {
|
|
4
5
|
ContentGovernanceProfileData,
|
|
5
6
|
ContentReviewPolicyData,
|
|
@@ -105,9 +106,9 @@ function handleSubmit() {
|
|
|
105
106
|
<div class="requirements">
|
|
106
107
|
<div class="requirements__header">
|
|
107
108
|
<strong>Requirements</strong>
|
|
108
|
-
<
|
|
109
|
+
<Button variant="secondary" type="button" onclick={addRequirement}>
|
|
109
110
|
{t(M['content.governance_profile_editor.add_requirement'])}
|
|
110
|
-
</
|
|
111
|
+
</Button>
|
|
111
112
|
</div>
|
|
112
113
|
|
|
113
114
|
{#each draft.requirements as requirement, index (`${requirement.policyKey}-${index}`)}
|
|
@@ -128,19 +129,19 @@ function handleSubmit() {
|
|
|
128
129
|
<input type="checkbox" bind:checked={requirement.blocking} />
|
|
129
130
|
Blocking
|
|
130
131
|
</label>
|
|
131
|
-
<
|
|
132
|
+
<Button variant="danger" type="button" onclick={() => removeRequirement(index)}>
|
|
132
133
|
Remove
|
|
133
|
-
</
|
|
134
|
+
</Button>
|
|
134
135
|
</div>
|
|
135
136
|
{/each}
|
|
136
137
|
</div>
|
|
137
138
|
|
|
138
139
|
<div class="actions">
|
|
139
|
-
<
|
|
140
|
+
<Button variant="primary" type="submit">{t(M['content.governance_profile_editor.save_profile'])}</Button>
|
|
140
141
|
{#if onCancel}
|
|
141
|
-
<
|
|
142
|
+
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
142
143
|
Cancel
|
|
143
|
-
</
|
|
144
|
+
</Button>
|
|
144
145
|
{/if}
|
|
145
146
|
</div>
|
|
146
147
|
</form>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernanceProfileEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceProfileEditor.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentGovernanceProfileEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceProfileEditor.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACrC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,4BAA4B,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAgJD,QAAA,MAAM,8BAA8B,2CAAwC,CAAC;AAC7E,KAAK,8BAA8B,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACxF,eAAe,8BAA8B,CAAC"}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
ImageUploader,
|
|
5
5
|
} from '@happyvertical/smrt-images/svelte';
|
|
6
6
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
7
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
7
8
|
import type { ContentEditorAsset } from '../content-editor-form';
|
|
8
9
|
import { M } from '../i18n.editor.js';
|
|
9
10
|
|
|
@@ -87,13 +88,13 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
87
88
|
</div>
|
|
88
89
|
<div class="asset-actions">
|
|
89
90
|
{#if onUseAsset}
|
|
90
|
-
<
|
|
91
|
+
<Button variant="ghost" type="button" class="asset-action-btn" onclick={() => onUseAsset?.(asset)}>{selectActionLabel}</Button>
|
|
91
92
|
{/if}
|
|
92
93
|
{#if onUseAsThumbnail && assetId && thumbnailAssetId !== assetId}
|
|
93
|
-
<
|
|
94
|
+
<Button variant="ghost" type="button" class="asset-action-btn" onclick={() => onUseAsThumbnail?.(assetId)}>Thumbnail</Button>
|
|
94
95
|
{/if}
|
|
95
96
|
{#if onRemoveAsset && assetId}
|
|
96
|
-
<
|
|
97
|
+
<Button variant="ghost" type="button" class="asset-action-btn asset-action-btn--danger" onclick={() => onRemoveAsset?.(assetId)}>Remove</Button>
|
|
97
98
|
{/if}
|
|
98
99
|
</div>
|
|
99
100
|
</article>
|
|
@@ -108,14 +109,14 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
108
109
|
<ImageUploader {apiBaseUrl} onSelect={handleSelect} onCancel={() => showUploader = false} />
|
|
109
110
|
</div>
|
|
110
111
|
{:else if onSelectImage}
|
|
111
|
-
<
|
|
112
|
+
<Button variant="ghost" type="button" class="asset-action-btn add-image-button" onclick={() => showUploader = true}>
|
|
112
113
|
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
113
114
|
<rect x="3" y="3" width="18" height="18" rx="2"></rect>
|
|
114
115
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
115
116
|
<path d="m21 15-5-5L5 21"></path>
|
|
116
117
|
</svg>
|
|
117
118
|
{addButtonLabel}
|
|
118
|
-
</
|
|
119
|
+
</Button>
|
|
119
120
|
{/if}
|
|
120
121
|
</div>
|
|
121
122
|
|
|
@@ -197,7 +198,7 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
197
198
|
gap: 0.5rem;
|
|
198
199
|
}
|
|
199
200
|
|
|
200
|
-
|
|
201
|
+
.content-image-browser :global(.asset-action-btn) {
|
|
201
202
|
display: inline-flex;
|
|
202
203
|
align-items: center;
|
|
203
204
|
justify-content: center;
|
|
@@ -214,19 +215,19 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
214
215
|
padding: 0.5rem 0.875rem;
|
|
215
216
|
}
|
|
216
217
|
|
|
217
|
-
|
|
218
|
+
.content-image-browser :global(.asset-action-btn:hover) {
|
|
218
219
|
background: var(--smrt-color-surface-container-high);
|
|
219
220
|
}
|
|
220
221
|
|
|
221
|
-
|
|
222
|
+
.content-image-browser :global(.asset-action-btn--danger) {
|
|
222
223
|
color: var(--smrt-color-error);
|
|
223
224
|
}
|
|
224
225
|
|
|
225
|
-
.add-image-button {
|
|
226
|
+
.content-image-browser :global(.add-image-button) {
|
|
226
227
|
justify-self: start;
|
|
227
228
|
}
|
|
228
229
|
|
|
229
|
-
.add-image-button svg {
|
|
230
|
+
.content-image-browser :global(.add-image-button svg) {
|
|
230
231
|
width: 1rem;
|
|
231
232
|
height: 1rem;
|
|
232
233
|
fill: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentImageBrowser.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentImageBrowser.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentImageBrowser.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentImageBrowser.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAEf,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAIjE,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAgHD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,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 {
|
|
4
5
|
type ContentBodyFormat,
|
|
5
6
|
extractBodyImages,
|
|
@@ -48,7 +49,9 @@ function cycle(delta: number) {
|
|
|
48
49
|
{#if activeImage}
|
|
49
50
|
<div class="content-image-chooser" aria-label={t(M['content.content_image_chooser.body_images'])}>
|
|
50
51
|
{#if hasMultiple}
|
|
51
|
-
<
|
|
52
|
+
<Button
|
|
53
|
+
variant="ghost"
|
|
54
|
+
size="sm"
|
|
52
55
|
type="button"
|
|
53
56
|
class="chooser-arrow"
|
|
54
57
|
aria-label={t(M['content.content_image_chooser.previous_body_image'])}
|
|
@@ -57,10 +60,12 @@ function cycle(delta: number) {
|
|
|
57
60
|
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
58
61
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
59
62
|
</svg>
|
|
60
|
-
</
|
|
63
|
+
</Button>
|
|
61
64
|
{/if}
|
|
62
65
|
|
|
63
|
-
<
|
|
66
|
+
<Button
|
|
67
|
+
variant="ghost"
|
|
68
|
+
size="sm"
|
|
64
69
|
type="button"
|
|
65
70
|
class="chooser-preview"
|
|
66
71
|
aria-label={t(M['content.content_image_chooser.focus_selected_body_image'])}
|
|
@@ -68,10 +73,12 @@ function cycle(delta: number) {
|
|
|
68
73
|
>
|
|
69
74
|
<img src={activeImage.src} alt={activeImage.alt || 'Body image'} />
|
|
70
75
|
<span>{normalizedIndex + 1} / {images.length}</span>
|
|
71
|
-
</
|
|
76
|
+
</Button>
|
|
72
77
|
|
|
73
78
|
{#if hasMultiple}
|
|
74
|
-
<
|
|
79
|
+
<Button
|
|
80
|
+
variant="ghost"
|
|
81
|
+
size="sm"
|
|
75
82
|
type="button"
|
|
76
83
|
class="chooser-arrow"
|
|
77
84
|
aria-label={t(M['content.content_image_chooser.next_body_image'])}
|
|
@@ -80,7 +87,7 @@ function cycle(delta: number) {
|
|
|
80
87
|
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
81
88
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
82
89
|
</svg>
|
|
83
|
-
</
|
|
90
|
+
</Button>
|
|
84
91
|
{/if}
|
|
85
92
|
</div>
|
|
86
93
|
{/if}
|
|
@@ -93,8 +100,8 @@ function cycle(delta: number) {
|
|
|
93
100
|
min-height: 2.75rem;
|
|
94
101
|
}
|
|
95
102
|
|
|
96
|
-
.chooser-arrow,
|
|
97
|
-
.chooser-preview {
|
|
103
|
+
.content-image-chooser :global(.chooser-arrow),
|
|
104
|
+
.content-image-chooser :global(.chooser-preview) {
|
|
98
105
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
99
106
|
background: var(--smrt-color-surface-container);
|
|
100
107
|
color: var(--smrt-color-on-surface);
|
|
@@ -102,7 +109,7 @@ function cycle(delta: number) {
|
|
|
102
109
|
cursor: pointer;
|
|
103
110
|
}
|
|
104
111
|
|
|
105
|
-
.chooser-arrow {
|
|
112
|
+
.content-image-chooser :global(.chooser-arrow) {
|
|
106
113
|
width: 2.25rem;
|
|
107
114
|
height: 2.25rem;
|
|
108
115
|
display: grid;
|
|
@@ -110,12 +117,12 @@ function cycle(delta: number) {
|
|
|
110
117
|
padding: 0;
|
|
111
118
|
}
|
|
112
119
|
|
|
113
|
-
.chooser-arrow:disabled {
|
|
120
|
+
.content-image-chooser :global(.chooser-arrow:disabled) {
|
|
114
121
|
cursor: not-allowed;
|
|
115
122
|
opacity: 0.38;
|
|
116
123
|
}
|
|
117
124
|
|
|
118
|
-
.chooser-preview {
|
|
125
|
+
.content-image-chooser :global(.chooser-preview) {
|
|
119
126
|
display: inline-flex;
|
|
120
127
|
align-items: center;
|
|
121
128
|
gap: 0.45rem;
|
|
@@ -124,7 +131,7 @@ function cycle(delta: number) {
|
|
|
124
131
|
font-weight: var(--smrt-typography-weight-bold, 650);
|
|
125
132
|
}
|
|
126
133
|
|
|
127
|
-
.chooser-preview img {
|
|
134
|
+
.content-image-chooser :global(.chooser-preview img) {
|
|
128
135
|
width: 2rem;
|
|
129
136
|
height: 2rem;
|
|
130
137
|
border-radius: var(--smrt-radius-full, 9999px);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentImageChooser.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentImageChooser.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentImageChooser.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentImageChooser.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAoED,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|