@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.
- package/dist/manifest.json +2 -2
- package/dist/smrt-knowledge.json +4 -4
- package/dist/svelte/components/ContentAgentChat.svelte +27 -35
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyEditor.svelte +56 -41
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentClaimAuditTool.svelte +11 -24
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionForm.svelte +74 -68
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionInbox.svelte +20 -15
- 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 +121 -94
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributorManager.svelte +38 -34
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentCorrectionsTool.svelte +15 -39
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentEditor.svelte +106 -124
- package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +77 -74
- 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 +64 -89
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +43 -44
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +68 -68
- 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 +60 -52
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentMetadataFields.svelte +8 -23
- package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReferencesPanel.svelte +24 -11
- 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/ContentStatusFields.svelte +8 -19
- package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentTitleField.svelte +16 -12
- package/dist/svelte/components/ContentTitleField.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 +27 -23
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentFactsRoute.svelte +13 -9
- 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,7 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ImageLike } from '@happyvertical/smrt-images/svelte';
|
|
3
3
|
import { ImageUploader } from '@happyvertical/smrt-images/svelte';
|
|
4
|
+
import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
|
|
4
5
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
6
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
5
7
|
import { untrack } from 'svelte';
|
|
6
8
|
import { extractBodyImages, resolveBodyFormat } from '../../body-format';
|
|
7
9
|
import type {
|
|
@@ -74,10 +76,17 @@ let {
|
|
|
74
76
|
onCancel,
|
|
75
77
|
}: Props = $props();
|
|
76
78
|
|
|
77
|
-
|
|
79
|
+
// Unique per-instance form id so triggerSave() targets THIS editor's form even
|
|
80
|
+
// when multiple ContentEditor / GovernedContentEditor instances are mounted
|
|
81
|
+
// (a hardcoded id + getElementById would resolve to the first match in the DOM).
|
|
82
|
+
const formId = $props.id();
|
|
78
83
|
|
|
79
84
|
export function triggerSave() {
|
|
80
85
|
if (saveDisabled) return;
|
|
86
|
+
const editForm =
|
|
87
|
+
typeof document !== 'undefined'
|
|
88
|
+
? (document.getElementById(formId) as HTMLFormElement | null)
|
|
89
|
+
: null;
|
|
81
90
|
if (editForm?.requestSubmit) {
|
|
82
91
|
editForm.requestSubmit();
|
|
83
92
|
return;
|
|
@@ -920,16 +929,17 @@ function removeAsset(id: string) {
|
|
|
920
929
|
<div class="form-container">
|
|
921
930
|
<div class="editor-grid" class:editor-grid--with-sidebar={showChatSidebar}>
|
|
922
931
|
<!-- LEFT COLUMN (Document Canvas) -->
|
|
923
|
-
<
|
|
924
|
-
|
|
925
|
-
id="content-edit-form"
|
|
932
|
+
<Form
|
|
933
|
+
id={formId}
|
|
926
934
|
class="editor-main-col"
|
|
927
935
|
onsubmit={handleSubmit}
|
|
928
936
|
>
|
|
929
937
|
{#if editorError}
|
|
930
938
|
<div class="editor-message editor-message--error" role="alert" aria-live="assertive">
|
|
931
939
|
<span>{editorError}</span>
|
|
932
|
-
<
|
|
940
|
+
<Button
|
|
941
|
+
variant="ghost"
|
|
942
|
+
size="sm"
|
|
933
943
|
type="button"
|
|
934
944
|
class="editor-message__dismiss"
|
|
935
945
|
onclick={() => {
|
|
@@ -938,46 +948,46 @@ function removeAsset(id: string) {
|
|
|
938
948
|
aria-label={t(M['content.content_editor.dismiss_message'])}
|
|
939
949
|
>
|
|
940
950
|
×
|
|
941
|
-
</
|
|
951
|
+
</Button>
|
|
942
952
|
</div>
|
|
943
953
|
{/if}
|
|
944
954
|
<div class="editor-toolbar">
|
|
945
955
|
<div class="editor-toolbar-left">
|
|
946
956
|
<div class="mui-field">
|
|
947
|
-
<
|
|
957
|
+
<Select id="type-select" bind:value={formData.type} class="mui-input">
|
|
948
958
|
<option value="article">Article</option>
|
|
949
959
|
<option value="document">Document</option>
|
|
950
960
|
<option value="mirror">Mirror</option>
|
|
951
|
-
</
|
|
961
|
+
</Select>
|
|
952
962
|
<label for="type-select">Type</label>
|
|
953
963
|
</div>
|
|
954
964
|
<div class="mui-field">
|
|
955
|
-
<
|
|
965
|
+
<Select id="state-select" bind:value={formData.state} class="mui-input">
|
|
956
966
|
<option value="active">Active</option>
|
|
957
967
|
<option value="highlighted">Highlighted</option>
|
|
958
968
|
<option value="deprecated">Deprecated</option>
|
|
959
|
-
</
|
|
969
|
+
</Select>
|
|
960
970
|
<label for="state-select">State</label>
|
|
961
971
|
</div>
|
|
962
972
|
<div class="mui-field">
|
|
963
|
-
<
|
|
973
|
+
<Select id="status-select" bind:value={formData.status} class="mui-input">
|
|
964
974
|
<option value="draft">Draft</option>
|
|
965
975
|
<option value="published">Published</option>
|
|
966
976
|
<option value="archived">Archived</option>
|
|
967
|
-
</
|
|
977
|
+
</Select>
|
|
968
978
|
<label for="status-select">Status</label>
|
|
969
979
|
</div>
|
|
970
980
|
<div class="mui-field">
|
|
971
|
-
<
|
|
981
|
+
<Input id="publish-date-input" type="datetime-local" bind:value={formData.publish_date} class="mui-input" />
|
|
972
982
|
<label for="publish-date-input">{t(M['content.content_editor.publish_date'])}</label>
|
|
973
983
|
</div>
|
|
974
984
|
</div>
|
|
975
985
|
{#if showActions}
|
|
976
986
|
<div class="editor-toolbar-right">
|
|
977
|
-
<
|
|
978
|
-
<
|
|
987
|
+
<Button variant="primary" type="submit" class="save-button" disabled={saveDisabled}>{content ? 'Update Content' : 'Save Content'}</Button>
|
|
988
|
+
<Button variant="secondary" type="button" onclick={handleCancel}>
|
|
979
989
|
Cancel
|
|
980
|
-
</
|
|
990
|
+
</Button>
|
|
981
991
|
</div>
|
|
982
992
|
{/if}
|
|
983
993
|
</div>
|
|
@@ -986,12 +996,12 @@ function removeAsset(id: string) {
|
|
|
986
996
|
<p class="save-notice">{saveNotice}</p>
|
|
987
997
|
{/if}
|
|
988
998
|
|
|
989
|
-
<
|
|
990
|
-
type="text"
|
|
991
|
-
class="document-title-input"
|
|
999
|
+
<Input
|
|
1000
|
+
type="text"
|
|
1001
|
+
class="document-title-input"
|
|
992
1002
|
bind:value={formData.title}
|
|
993
1003
|
placeholder={t(M['content.content_editor.document_title_placeholder'])}
|
|
994
|
-
required
|
|
1004
|
+
required
|
|
995
1005
|
/>
|
|
996
1006
|
|
|
997
1007
|
{#if showUndoBanner}
|
|
@@ -1008,9 +1018,9 @@ function removeAsset(id: string) {
|
|
|
1008
1018
|
fields: lastAppliedFields.join(', '),
|
|
1009
1019
|
})}
|
|
1010
1020
|
</span>
|
|
1011
|
-
<
|
|
1021
|
+
<Button variant="ghost" size="sm" type="button" class="undo-banner__btn" onclick={undoLastApply}>
|
|
1012
1022
|
Undo{fieldUndoStack.length > 1 ? ` (${fieldUndoStack.length})` : ''}
|
|
1013
|
-
</
|
|
1023
|
+
</Button>
|
|
1014
1024
|
</div>
|
|
1015
1025
|
{/if}
|
|
1016
1026
|
|
|
@@ -1083,14 +1093,14 @@ function removeAsset(id: string) {
|
|
|
1083
1093
|
<img class="media-item-image" src={getAssetImageSource(asset)} alt={asset.name || 'Asset image'} />
|
|
1084
1094
|
<div class="media-item-overlay">
|
|
1085
1095
|
{#if assetId && assetId !== formData.thumbnailAssetId}
|
|
1086
|
-
<
|
|
1096
|
+
<Button variant="ghost" size="sm" type="button" class="btn-make-thumbnail" aria-label={t(M['content.content_editor.make_thumbnail'])} title={t(M['content.content_editor.make_thumbnail'])} onclick={() => setThumbnail(assetId)}>
|
|
1087
1097
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
|
|
1088
|
-
</
|
|
1098
|
+
</Button>
|
|
1089
1099
|
{/if}
|
|
1090
1100
|
{#if assetId}
|
|
1091
|
-
<
|
|
1101
|
+
<Button variant="ghost" size="sm" type="button" class="btn-remove-asset" aria-label={t(M['content.content_editor.remove'])} title={t(M['content.content_editor.remove'])} onclick={() => removeAsset(assetId)}>
|
|
1092
1102
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/></svg>
|
|
1093
|
-
</
|
|
1103
|
+
</Button>
|
|
1094
1104
|
{/if}
|
|
1095
1105
|
</div>
|
|
1096
1106
|
{#if assetId === formData.thumbnailAssetId}
|
|
@@ -1103,14 +1113,14 @@ function removeAsset(id: string) {
|
|
|
1103
1113
|
<p class="no-media-text">{t(M['content.content_editor.no_images_attached'])}</p>
|
|
1104
1114
|
{/if}
|
|
1105
1115
|
{#if !showImageUploader}
|
|
1106
|
-
<
|
|
1116
|
+
<Button variant="ghost" type="button" class="add-image-btn" onclick={() => showImageUploader = true} style="margin-top: 1rem;">
|
|
1107
1117
|
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1108
1118
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
1109
1119
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
1110
1120
|
<polyline points="21 15 16 10 5 21"></polyline>
|
|
1111
1121
|
</svg>
|
|
1112
1122
|
{t(M['content.content_editor.add_image'])}
|
|
1113
|
-
</
|
|
1123
|
+
</Button>
|
|
1114
1124
|
{/if}
|
|
1115
1125
|
|
|
1116
1126
|
{#if showImageUploader}
|
|
@@ -1136,15 +1146,15 @@ function removeAsset(id: string) {
|
|
|
1136
1146
|
<div class="editor-drawer-content">
|
|
1137
1147
|
<label>
|
|
1138
1148
|
Author:
|
|
1139
|
-
<
|
|
1149
|
+
<Input type="text" bind:value={formData.author} placeholder={t(M['content.content_editor.author_name_placeholder'])} />
|
|
1140
1150
|
</label>
|
|
1141
1151
|
<label>
|
|
1142
1152
|
Description:
|
|
1143
|
-
<
|
|
1153
|
+
<Textarea bind:value={formData.description} rows={2} placeholder={t(M['content.content_editor.brief_summary_placeholder'])}></Textarea>
|
|
1144
1154
|
</label>
|
|
1145
1155
|
<label>
|
|
1146
1156
|
{t(M['content.content_editor.tags_comma_separated'])}
|
|
1147
|
-
<
|
|
1157
|
+
<Input
|
|
1148
1158
|
type="text"
|
|
1149
1159
|
value={(formData.tags || []).join(', ')}
|
|
1150
1160
|
placeholder={t(M['content.content_editor.tags_placeholder'])}
|
|
@@ -1178,7 +1188,7 @@ function removeAsset(id: string) {
|
|
|
1178
1188
|
{#each formData.referenceIds as refId}
|
|
1179
1189
|
<div class="reference-badge">
|
|
1180
1190
|
<span class="ref-id">{refId}</span>
|
|
1181
|
-
<
|
|
1191
|
+
<Button variant="ghost" size="sm" type="button" class="remove-ref-btn" aria-label={t(M['content.content_editor.remove'])} title={t(M['content.content_editor.remove'])} onclick={() => removeReference(refId)}>×</Button>
|
|
1182
1192
|
</div>
|
|
1183
1193
|
{/each}
|
|
1184
1194
|
{#if formData.referenceIds.length === 0 && auditReferences.length === 0}
|
|
@@ -1202,25 +1212,31 @@ function removeAsset(id: string) {
|
|
|
1202
1212
|
: M['content.content_editor.evidence_item_plural'],
|
|
1203
1213
|
),
|
|
1204
1214
|
})}</span>
|
|
1205
|
-
<
|
|
1215
|
+
<Select bind:value={bulkEvidenceStatus} disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}>
|
|
1206
1216
|
{#each evidenceStatuses as status}
|
|
1207
1217
|
<option value={status}>{status}</option>
|
|
1208
1218
|
{/each}
|
|
1209
|
-
</
|
|
1210
|
-
<
|
|
1219
|
+
</Select>
|
|
1220
|
+
<Button
|
|
1221
|
+
variant="ghost"
|
|
1222
|
+
size="sm"
|
|
1211
1223
|
type="button"
|
|
1224
|
+
class="evidence-action-button"
|
|
1212
1225
|
disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}
|
|
1213
1226
|
onclick={() => void updateSelectedEvidenceStatus()}
|
|
1214
1227
|
>
|
|
1215
1228
|
Mark
|
|
1216
|
-
</
|
|
1217
|
-
<
|
|
1229
|
+
</Button>
|
|
1230
|
+
<Button
|
|
1231
|
+
variant="ghost"
|
|
1232
|
+
size="sm"
|
|
1218
1233
|
type="button"
|
|
1234
|
+
class="evidence-action-button"
|
|
1219
1235
|
disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}
|
|
1220
1236
|
onclick={() => void repairSelectedReferenceEvidence()}
|
|
1221
1237
|
>
|
|
1222
1238
|
{t(M['content.content_editor.repair_resources'])}
|
|
1223
|
-
</
|
|
1239
|
+
</Button>
|
|
1224
1240
|
</div>
|
|
1225
1241
|
{#each auditReferences as reference, referenceIndex (reference._auditSourceId ?? reference.id ?? reference.url ?? reference.title)}
|
|
1226
1242
|
{@const resourceClaims = getResourceClaimsForReference(reference)}
|
|
@@ -1245,13 +1261,16 @@ function removeAsset(id: string) {
|
|
|
1245
1261
|
: M['content.content_editor.evidence_claim_plural'],
|
|
1246
1262
|
),
|
|
1247
1263
|
})}</span>
|
|
1248
|
-
<
|
|
1264
|
+
<Button
|
|
1265
|
+
variant="ghost"
|
|
1266
|
+
size="sm"
|
|
1249
1267
|
type="button"
|
|
1268
|
+
class="evidence-action-button"
|
|
1250
1269
|
disabled={Boolean(evidenceBusy)}
|
|
1251
1270
|
onclick={() => void repairReferenceEvidence(reference)}
|
|
1252
1271
|
>
|
|
1253
1272
|
{evidenceBusy === `repair:${reference.id}` ? 'Repairing...' : 'Repair'}
|
|
1254
|
-
</
|
|
1273
|
+
</Button>
|
|
1255
1274
|
</div>
|
|
1256
1275
|
</div>
|
|
1257
1276
|
{#if resourceClaims.length > 0}
|
|
@@ -1261,6 +1280,7 @@ function removeAsset(id: string) {
|
|
|
1261
1280
|
<details class="resource-claim">
|
|
1262
1281
|
<summary>
|
|
1263
1282
|
<label class="evidence-select">
|
|
1283
|
+
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
1264
1284
|
<input
|
|
1265
1285
|
type="checkbox"
|
|
1266
1286
|
checked={isResourceClaimSelected(claim)}
|
|
@@ -1311,26 +1331,31 @@ function removeAsset(id: string) {
|
|
|
1311
1331
|
{/each}
|
|
1312
1332
|
<div class="resource-claim-actions">
|
|
1313
1333
|
{#each evidenceStatuses as status}
|
|
1314
|
-
<
|
|
1334
|
+
<Button
|
|
1335
|
+
variant="ghost"
|
|
1336
|
+
size="sm"
|
|
1315
1337
|
type="button"
|
|
1338
|
+
class="evidence-action-button"
|
|
1316
1339
|
disabled={evidenceIds.length === 0 || Boolean(evidenceBusy)}
|
|
1317
1340
|
onclick={() => void updateEvidenceStatus(evidenceIds, status)}
|
|
1318
1341
|
>
|
|
1319
1342
|
{status}
|
|
1320
|
-
</
|
|
1343
|
+
</Button>
|
|
1321
1344
|
{/each}
|
|
1322
1345
|
</div>
|
|
1323
1346
|
</div>
|
|
1324
1347
|
</details>
|
|
1325
1348
|
{/each}
|
|
1326
1349
|
{#if resourceClaims.length > 6}
|
|
1327
|
-
<
|
|
1350
|
+
<Button
|
|
1351
|
+
variant="ghost"
|
|
1352
|
+
size="sm"
|
|
1328
1353
|
type="button"
|
|
1329
1354
|
class="resource-claim-more"
|
|
1330
1355
|
onclick={() => toggleReferenceClaims(reference, referenceIndex)}
|
|
1331
1356
|
>
|
|
1332
1357
|
{resourceClaimsExpanded ? 'Show fewer' : `+ ${resourceClaims.length - 6} more`}
|
|
1333
|
-
</
|
|
1358
|
+
</Button>
|
|
1334
1359
|
{/if}
|
|
1335
1360
|
</div>
|
|
1336
1361
|
{/if}
|
|
@@ -1339,22 +1364,22 @@ function removeAsset(id: string) {
|
|
|
1339
1364
|
</div>
|
|
1340
1365
|
{/if}
|
|
1341
1366
|
<div class="add-reference-row">
|
|
1342
|
-
<
|
|
1343
|
-
<
|
|
1367
|
+
<Input type="text" bind:value={newReferenceId} placeholder={t(M['content.content_editor.reference_id_or_url_placeholder'])} />
|
|
1368
|
+
<Button variant="ghost" type="button" class="add-reference-button" onclick={addReference}>Add</Button>
|
|
1344
1369
|
</div>
|
|
1345
1370
|
</div>
|
|
1346
1371
|
|
|
1347
1372
|
<label>
|
|
1348
1373
|
URL:
|
|
1349
|
-
<
|
|
1374
|
+
<Input type="url" bind:value={formData.url} />
|
|
1350
1375
|
</label>
|
|
1351
1376
|
<label>
|
|
1352
1377
|
{t(M['content.content_editor.file_key'])}
|
|
1353
|
-
<
|
|
1378
|
+
<Input type="text" bind:value={formData.fileKey} />
|
|
1354
1379
|
</label>
|
|
1355
1380
|
</div>
|
|
1356
1381
|
</details>
|
|
1357
|
-
</
|
|
1382
|
+
</Form>
|
|
1358
1383
|
|
|
1359
1384
|
{#if showChatSidebar}
|
|
1360
1385
|
<aside class="editor-sidebar-col">
|
|
@@ -1413,7 +1438,7 @@ function removeAsset(id: string) {
|
|
|
1413
1438
|
}
|
|
1414
1439
|
}
|
|
1415
1440
|
|
|
1416
|
-
.document-title-input {
|
|
1441
|
+
.form-container :global(.document-title-input) {
|
|
1417
1442
|
width: 100%;
|
|
1418
1443
|
font-size: var(--smrt-typography-display-medium-size, 2.5rem);
|
|
1419
1444
|
font-weight: var(--smrt-typography-weight-bold, 800);
|
|
@@ -1428,7 +1453,7 @@ function removeAsset(id: string) {
|
|
|
1428
1453
|
font-family: inherit;
|
|
1429
1454
|
}
|
|
1430
1455
|
|
|
1431
|
-
.document-title-input::placeholder {
|
|
1456
|
+
.form-container :global(.document-title-input)::placeholder {
|
|
1432
1457
|
color: var(--smrt-color-outline-variant);
|
|
1433
1458
|
}
|
|
1434
1459
|
|
|
@@ -1487,7 +1512,7 @@ function removeAsset(id: string) {
|
|
|
1487
1512
|
z-index: 1;
|
|
1488
1513
|
}
|
|
1489
1514
|
|
|
1490
|
-
.mui-input {
|
|
1515
|
+
.mui-field :global(.mui-input) {
|
|
1491
1516
|
padding: 0.5rem 0.75rem;
|
|
1492
1517
|
border-radius: 0.375rem;
|
|
1493
1518
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
@@ -1501,15 +1526,16 @@ function removeAsset(id: string) {
|
|
|
1501
1526
|
transition: border-color 0.2s;
|
|
1502
1527
|
}
|
|
1503
1528
|
|
|
1504
|
-
.mui-input:focus {
|
|
1529
|
+
.mui-field :global(.mui-input:focus) {
|
|
1505
1530
|
outline: none;
|
|
1506
1531
|
border-color: var(--smrt-color-primary);
|
|
1507
1532
|
}
|
|
1508
1533
|
|
|
1509
|
-
.editor-main-col {
|
|
1534
|
+
.form-container :global(.editor-main-col) {
|
|
1510
1535
|
display: flex;
|
|
1511
1536
|
flex-direction: column;
|
|
1512
1537
|
background: transparent;
|
|
1538
|
+
width: 100%;
|
|
1513
1539
|
}
|
|
1514
1540
|
|
|
1515
1541
|
.editor-sidebar-col {
|
|
@@ -1595,11 +1621,6 @@ function removeAsset(id: string) {
|
|
|
1595
1621
|
font-size: var(--smrt-typography-headline-small-size, 1.5rem);
|
|
1596
1622
|
}
|
|
1597
1623
|
|
|
1598
|
-
.form-container form {
|
|
1599
|
-
display: block;
|
|
1600
|
-
width: 100%;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
1624
|
.form-container label {
|
|
1604
1625
|
display: flex;
|
|
1605
1626
|
flex-direction: column;
|
|
@@ -1609,34 +1630,6 @@ function removeAsset(id: string) {
|
|
|
1609
1630
|
font-size: var(--smrt-typography-label-large-size, 0.875rem);
|
|
1610
1631
|
}
|
|
1611
1632
|
|
|
1612
|
-
.form-container input,
|
|
1613
|
-
.form-container select,
|
|
1614
|
-
.form-container textarea {
|
|
1615
|
-
padding: 0.75rem;
|
|
1616
|
-
border: 1px solid var(--smrt-color-outline);
|
|
1617
|
-
border-radius: 0.5rem;
|
|
1618
|
-
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
1619
|
-
transition: border-color 0.2s, box-shadow 0.2s;
|
|
1620
|
-
font-family: inherit;
|
|
1621
|
-
box-sizing: border-box;
|
|
1622
|
-
width: 100%;
|
|
1623
|
-
background: var(--smrt-color-surface-container-low);
|
|
1624
|
-
color: var(--smrt-color-on-surface);
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
.form-container input:focus,
|
|
1628
|
-
.form-container select:focus,
|
|
1629
|
-
.form-container textarea:focus {
|
|
1630
|
-
outline: none;
|
|
1631
|
-
border-color: var(--smrt-color-primary);
|
|
1632
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--smrt-color-primary) 10%, transparent);
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
.form-container textarea {
|
|
1636
|
-
resize: vertical;
|
|
1637
|
-
min-height: 120px;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
1633
|
.references-section {
|
|
1641
1634
|
display: flex;
|
|
1642
1635
|
flex-direction: column;
|
|
@@ -1664,7 +1657,7 @@ function removeAsset(id: string) {
|
|
|
1664
1657
|
color: var(--smrt-color-on-surface);
|
|
1665
1658
|
}
|
|
1666
1659
|
|
|
1667
|
-
.remove-ref-btn {
|
|
1660
|
+
.reference-badge :global(.remove-ref-btn) {
|
|
1668
1661
|
background: none;
|
|
1669
1662
|
border: none;
|
|
1670
1663
|
color: var(--smrt-color-outline);
|
|
@@ -1675,7 +1668,7 @@ function removeAsset(id: string) {
|
|
|
1675
1668
|
margin-left: 0.25rem;
|
|
1676
1669
|
}
|
|
1677
1670
|
|
|
1678
|
-
.remove-ref-btn:hover {
|
|
1671
|
+
.reference-badge :global(.remove-ref-btn:hover) {
|
|
1679
1672
|
color: var(--smrt-color-error);
|
|
1680
1673
|
}
|
|
1681
1674
|
|
|
@@ -1725,9 +1718,7 @@ function removeAsset(id: string) {
|
|
|
1725
1718
|
white-space: nowrap;
|
|
1726
1719
|
}
|
|
1727
1720
|
|
|
1728
|
-
.
|
|
1729
|
-
.resource-claim-actions button,
|
|
1730
|
-
.evidence-bulk-toolbar button {
|
|
1721
|
+
.references-section :global(.evidence-action-button) {
|
|
1731
1722
|
background: var(--smrt-color-surface);
|
|
1732
1723
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
1733
1724
|
border-radius: 0.375rem;
|
|
@@ -1738,9 +1729,7 @@ function removeAsset(id: string) {
|
|
|
1738
1729
|
padding: 0.25rem 0.5rem;
|
|
1739
1730
|
}
|
|
1740
1731
|
|
|
1741
|
-
.
|
|
1742
|
-
.resource-claim-actions button:disabled,
|
|
1743
|
-
.evidence-bulk-toolbar button:disabled {
|
|
1732
|
+
.references-section :global(.evidence-action-button:disabled) {
|
|
1744
1733
|
cursor: not-allowed;
|
|
1745
1734
|
opacity: 0.55;
|
|
1746
1735
|
}
|
|
@@ -1762,7 +1751,7 @@ function removeAsset(id: string) {
|
|
|
1762
1751
|
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
1763
1752
|
}
|
|
1764
1753
|
|
|
1765
|
-
.evidence-bulk-toolbar select {
|
|
1754
|
+
.evidence-bulk-toolbar :global(.select) {
|
|
1766
1755
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
1767
1756
|
border-radius: 0.375rem;
|
|
1768
1757
|
padding: 0.25rem 0.5rem;
|
|
@@ -1796,7 +1785,7 @@ function removeAsset(id: string) {
|
|
|
1796
1785
|
background: color-mix(in srgb, var(--smrt-color-error) 12%, transparent);
|
|
1797
1786
|
}
|
|
1798
1787
|
|
|
1799
|
-
.editor-message__dismiss {
|
|
1788
|
+
.editor-message :global(.editor-message__dismiss) {
|
|
1800
1789
|
border: none;
|
|
1801
1790
|
background: transparent;
|
|
1802
1791
|
color: inherit;
|
|
@@ -1808,18 +1797,19 @@ function removeAsset(id: string) {
|
|
|
1808
1797
|
|
|
1809
1798
|
.reference-detail-header a,
|
|
1810
1799
|
.reference-detail-header span,
|
|
1811
|
-
.resource-claim-body
|
|
1812
|
-
.resource-claim-more {
|
|
1800
|
+
.resource-claim-body {
|
|
1813
1801
|
color: var(--smrt-color-on-surface-variant);
|
|
1814
1802
|
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
1815
1803
|
}
|
|
1816
1804
|
|
|
1817
|
-
.resource-claim-more {
|
|
1805
|
+
.references-section :global(.resource-claim-more) {
|
|
1818
1806
|
align-self: flex-start;
|
|
1819
1807
|
border: 0;
|
|
1820
1808
|
background: transparent;
|
|
1821
1809
|
padding: 0;
|
|
1822
1810
|
cursor: pointer;
|
|
1811
|
+
color: var(--smrt-color-on-surface-variant);
|
|
1812
|
+
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
1823
1813
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
1824
1814
|
}
|
|
1825
1815
|
|
|
@@ -1939,11 +1929,11 @@ function removeAsset(id: string) {
|
|
|
1939
1929
|
gap: 0.5rem;
|
|
1940
1930
|
}
|
|
1941
1931
|
|
|
1942
|
-
.add-reference-row input {
|
|
1932
|
+
.add-reference-row :global(.input) {
|
|
1943
1933
|
flex: 1;
|
|
1944
1934
|
}
|
|
1945
1935
|
|
|
1946
|
-
.add-reference-row button {
|
|
1936
|
+
.add-reference-row :global(.add-reference-button) {
|
|
1947
1937
|
background: var(--smrt-color-surface);
|
|
1948
1938
|
border: 1px solid var(--smrt-color-outline);
|
|
1949
1939
|
color: var(--smrt-color-on-surface-variant);
|
|
@@ -1953,11 +1943,11 @@ function removeAsset(id: string) {
|
|
|
1953
1943
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
1954
1944
|
}
|
|
1955
1945
|
|
|
1956
|
-
.add-reference-row button:hover {
|
|
1946
|
+
.add-reference-row :global(.add-reference-button:hover) {
|
|
1957
1947
|
background: var(--smrt-color-surface-container-low, #f1f5f9);
|
|
1958
1948
|
}
|
|
1959
1949
|
|
|
1960
|
-
.add-image-btn {
|
|
1950
|
+
.media-gallery :global(.add-image-btn) {
|
|
1961
1951
|
display: flex;
|
|
1962
1952
|
align-items: center;
|
|
1963
1953
|
gap: 0.5rem;
|
|
@@ -1970,14 +1960,14 @@ function removeAsset(id: string) {
|
|
|
1970
1960
|
cursor: pointer;
|
|
1971
1961
|
transition: all 0.2s;
|
|
1972
1962
|
}
|
|
1973
|
-
|
|
1974
|
-
.add-image-btn:hover {
|
|
1963
|
+
|
|
1964
|
+
.media-gallery :global(.add-image-btn:hover) {
|
|
1975
1965
|
border-color: var(--smrt-color-primary, #94a3b8);
|
|
1976
1966
|
color: var(--smrt-color-on-surface, #1e293b);
|
|
1977
1967
|
background: var(--smrt-color-surface-container-low, #f1f5f9);
|
|
1978
1968
|
}
|
|
1979
1969
|
|
|
1980
|
-
.save-button {
|
|
1970
|
+
.editor-toolbar-right :global(.save-button) {
|
|
1981
1971
|
background: linear-gradient(
|
|
1982
1972
|
135deg,
|
|
1983
1973
|
var(--smrt-color-primary) 0%,
|
|
@@ -1992,27 +1982,17 @@ function removeAsset(id: string) {
|
|
|
1992
1982
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
1993
1983
|
}
|
|
1994
1984
|
|
|
1995
|
-
.save-button:hover {
|
|
1985
|
+
.editor-toolbar-right :global(.save-button:hover) {
|
|
1996
1986
|
transform: translateY(-1px);
|
|
1997
1987
|
box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--smrt-color-primary) 40%, transparent);
|
|
1998
1988
|
}
|
|
1999
1989
|
|
|
2000
|
-
.save-button:disabled {
|
|
1990
|
+
.editor-toolbar-right :global(.save-button:disabled) {
|
|
2001
1991
|
opacity: 0.65;
|
|
2002
1992
|
transform: none;
|
|
2003
1993
|
box-shadow: none;
|
|
2004
1994
|
}
|
|
2005
1995
|
|
|
2006
|
-
.cancel-button {
|
|
2007
|
-
background: var(--smrt-color-surface);
|
|
2008
|
-
color: var(--smrt-color-on-surface);
|
|
2009
|
-
border: 1px solid var(--smrt-color-outline-variant);
|
|
2010
|
-
padding: 0.75rem 1.25rem;
|
|
2011
|
-
border-radius: 0.5rem;
|
|
2012
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
2013
|
-
cursor: pointer;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
1996
|
.save-notice {
|
|
2017
1997
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
2018
1998
|
color: var(--smrt-color-primary, #3b82f6);
|
|
@@ -2069,7 +2049,7 @@ function removeAsset(id: string) {
|
|
|
2069
2049
|
flex-shrink: 0;
|
|
2070
2050
|
}
|
|
2071
2051
|
|
|
2072
|
-
.undo-banner__btn {
|
|
2052
|
+
.undo-banner :global(.undo-banner__btn) {
|
|
2073
2053
|
background: var(--smrt-color-surface);
|
|
2074
2054
|
color: var(--smrt-color-primary);
|
|
2075
2055
|
border: 1px solid var(--smrt-color-outline);
|
|
@@ -2082,7 +2062,7 @@ function removeAsset(id: string) {
|
|
|
2082
2062
|
transition: all 0.15s ease;
|
|
2083
2063
|
}
|
|
2084
2064
|
|
|
2085
|
-
.undo-banner__btn:hover {
|
|
2065
|
+
.undo-banner :global(.undo-banner__btn:hover) {
|
|
2086
2066
|
background: var(--smrt-color-surface-variant);
|
|
2087
2067
|
border-color: var(--smrt-color-primary);
|
|
2088
2068
|
}
|
|
@@ -2138,7 +2118,8 @@ function removeAsset(id: string) {
|
|
|
2138
2118
|
opacity: 1;
|
|
2139
2119
|
}
|
|
2140
2120
|
|
|
2141
|
-
.media-item-overlay
|
|
2121
|
+
.media-item-overlay :global(.btn-make-thumbnail),
|
|
2122
|
+
.media-item-overlay :global(.btn-remove-asset) {
|
|
2142
2123
|
padding: 0.4rem;
|
|
2143
2124
|
border: none;
|
|
2144
2125
|
border-radius: 0.375rem;
|
|
@@ -2151,12 +2132,13 @@ function removeAsset(id: string) {
|
|
|
2151
2132
|
justify-content: center;
|
|
2152
2133
|
}
|
|
2153
2134
|
|
|
2154
|
-
.media-item-overlay
|
|
2135
|
+
.media-item-overlay :global(.btn-make-thumbnail:hover),
|
|
2136
|
+
.media-item-overlay :global(.btn-remove-asset:hover) {
|
|
2155
2137
|
transform: scale(1.1);
|
|
2156
2138
|
background: var(--smrt-color-surface);
|
|
2157
2139
|
}
|
|
2158
2140
|
|
|
2159
|
-
.btn-remove-asset:hover {
|
|
2141
|
+
.media-item-overlay :global(.btn-remove-asset:hover) {
|
|
2160
2142
|
background: var(--smrt-color-error-container) !important;
|
|
2161
2143
|
color: var(--smrt-color-error) !important;
|
|
2162
2144
|
border-color: var(--smrt-color-error) !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentEditor.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentEditor.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,mCAAmC,EACnC,0CAA0C,EAE3C,MAAM,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,wBAAwB,CAAC;AAiBhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAivCD,QAAA,MAAM,aAAa;;MAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|