@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
package/dist/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"timestamp":
|
|
3
|
+
"timestamp": 1782290175450,
|
|
4
4
|
"packageName": "@happyvertical/smrt-content",
|
|
5
|
-
"packageVersion": "0.34.
|
|
5
|
+
"packageVersion": "0.34.7",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-content:ContentAsset": {
|
|
8
8
|
"name": "contentasset",
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-06-
|
|
3
|
+
"generatedAt": "2026-06-24T08:36:16.418Z",
|
|
4
4
|
"packageName": "@happyvertical/smrt-content",
|
|
5
|
-
"packageVersion": "0.34.
|
|
5
|
+
"packageVersion": "0.34.7",
|
|
6
6
|
"sourceManifestPath": "dist/manifest.json",
|
|
7
7
|
"agentDocPath": "AGENTS.md",
|
|
8
8
|
"sourceHashes": {
|
|
9
|
-
"manifest": "
|
|
10
|
-
"packageJson": "
|
|
9
|
+
"manifest": "43cf986f548e44679e46d3aa7f5aac5d82cfc41721c5a19465ec15cd86145005",
|
|
10
|
+
"packageJson": "eb13884b3fb83b76e1818ee4ae5f0cca5c437f1d62223e23dc5a3b4f6914fad8",
|
|
11
11
|
"agents": "d3e1fdba8cf8c8f393e682616c56fefcc789c44018407bbdf7332d5f06cfbb5c"
|
|
12
12
|
},
|
|
13
13
|
"exports": [
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { AgentChat } from '@happyvertical/smrt-chat/svelte';
|
|
9
|
+
import { Input, Select } from '@happyvertical/smrt-ui/forms';
|
|
9
10
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
11
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
10
12
|
import type {
|
|
11
13
|
ContentEditorAssistantContext,
|
|
12
14
|
ContentEditorAssistantFieldUpdateAllowList,
|
|
@@ -426,16 +428,16 @@ async function handleSendMessage(content: string) {
|
|
|
426
428
|
<div class="error-state">
|
|
427
429
|
<p>{error}</p>
|
|
428
430
|
{#if canRetrySessionLoad}
|
|
429
|
-
<button onclick={loadSession}>Retry</
|
|
431
|
+
<Button variant="primary" type="button" onclick={loadSession}>Retry</Button>
|
|
430
432
|
{/if}
|
|
431
433
|
</div>
|
|
432
434
|
{:else if session}
|
|
433
435
|
<div class="model-bar">
|
|
434
|
-
<
|
|
436
|
+
<Select class="smrt-select model-select" bind:value={selectedModelId}>
|
|
435
437
|
{#each availableAIModels as model}
|
|
436
438
|
<option value={model.id}>{model.label}</option>
|
|
437
439
|
{/each}
|
|
438
|
-
</
|
|
440
|
+
</Select>
|
|
439
441
|
</div>
|
|
440
442
|
|
|
441
443
|
<div class="chat-main">
|
|
@@ -464,22 +466,22 @@ async function handleSendMessage(content: string) {
|
|
|
464
466
|
<div class="topic-footer">
|
|
465
467
|
{#if showNewTopicInput}
|
|
466
468
|
<div class="new-topic-row">
|
|
467
|
-
<
|
|
468
|
-
class="new-topic-input"
|
|
469
|
-
type="text"
|
|
469
|
+
<Input
|
|
470
|
+
class="new-topic-input"
|
|
471
|
+
type="text"
|
|
470
472
|
placeholder={t(M['content.content_agent_chat.topic_name_placeholder'])}
|
|
471
473
|
bind:value={newTopicTitle}
|
|
472
474
|
onkeydown={(e: KeyboardEvent) => { if (e.key === 'Enter') { createNewTopic(); showNewTopicInput = false; } }}
|
|
473
475
|
/>
|
|
474
|
-
<button class="topic-action-btn" onclick={() => { createNewTopic(); showNewTopicInput = false; }} disabled={isCreatingTopic}>
|
|
476
|
+
<Button variant="ghost" size="sm" type="button" class="topic-action-btn" onclick={() => { createNewTopic(); showNewTopicInput = false; }} disabled={isCreatingTopic}>
|
|
475
477
|
{isCreatingTopic ? '...' : 'Create'}
|
|
476
|
-
</
|
|
477
|
-
<button class="topic-action-btn topic-cancel-btn" onclick={() => { showNewTopicInput = false; }}>✕</
|
|
478
|
+
</Button>
|
|
479
|
+
<Button variant="ghost" size="sm" type="button" class="topic-action-btn topic-cancel-btn" onclick={() => { showNewTopicInput = false; }} aria-label={t(M['content.content_agent_chat.cancel'])} title={t(M['content.content_agent_chat.cancel'])}>✕</Button>
|
|
478
480
|
</div>
|
|
479
481
|
{:else}
|
|
480
|
-
<
|
|
481
|
-
class="smrt-select topic-select"
|
|
482
|
-
|
|
482
|
+
<Select
|
|
483
|
+
class="smrt-select topic-select"
|
|
484
|
+
value={activeThreadId ?? ''}
|
|
483
485
|
onchange={(e: Event) => loadThread((e.currentTarget as HTMLSelectElement).value)}
|
|
484
486
|
disabled={!threads.length}
|
|
485
487
|
>
|
|
@@ -489,11 +491,11 @@ async function handleSendMessage(content: string) {
|
|
|
489
491
|
{#each threads as thread}
|
|
490
492
|
<option value={thread.id}>{thread.title || t(M['content.content_agent_chat.untitled_topic'])}</option>
|
|
491
493
|
{/each}
|
|
492
|
-
</
|
|
493
|
-
<button class="topic-action-btn" onclick={() => { showNewTopicInput = true; newTopicTitle = ''; }} title={t(M['content.content_agent_chat.new_topic'])}>
|
|
494
|
+
</Select>
|
|
495
|
+
<Button variant="ghost" size="sm" type="button" class="topic-action-btn" onclick={() => { showNewTopicInput = true; newTopicTitle = ''; }} title={t(M['content.content_agent_chat.new_topic'])}>
|
|
494
496
|
<svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
|
|
495
497
|
{t(M['content.content_agent_chat.new'])}
|
|
496
|
-
</
|
|
498
|
+
</Button>
|
|
497
499
|
{/if}
|
|
498
500
|
</div>
|
|
499
501
|
{/if}
|
|
@@ -535,22 +537,12 @@ async function handleSendMessage(content: string) {
|
|
|
535
537
|
to { transform: rotate(360deg); }
|
|
536
538
|
}
|
|
537
539
|
|
|
538
|
-
.error-state button {
|
|
539
|
-
margin-top: 1rem;
|
|
540
|
-
padding: 0.5rem 1rem;
|
|
541
|
-
background: var(--smrt-color-primary, #005ac1);
|
|
542
|
-
color: var(--smrt-color-on-primary, #ffffff);
|
|
543
|
-
border: none;
|
|
544
|
-
border-radius: var(--smrt-radius-sm, 4px);
|
|
545
|
-
cursor: pointer;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
540
|
.model-bar {
|
|
549
541
|
padding: var(--smrt-spacing-2, 8px) var(--smrt-spacing-3, 12px);
|
|
550
542
|
background: var(--smrt-color-surface-container-lowest, #ffffff);
|
|
551
543
|
}
|
|
552
544
|
|
|
553
|
-
.smrt-select {
|
|
545
|
+
.content-agent-chat-container :global(.smrt-select) {
|
|
554
546
|
width: 100%;
|
|
555
547
|
padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
|
|
556
548
|
border-radius: var(--smrt-radius-md, 8px);
|
|
@@ -561,15 +553,15 @@ async function handleSendMessage(content: string) {
|
|
|
561
553
|
outline: none;
|
|
562
554
|
cursor: pointer;
|
|
563
555
|
}
|
|
564
|
-
|
|
565
|
-
.smrt-select:disabled {
|
|
556
|
+
|
|
557
|
+
.content-agent-chat-container :global(.smrt-select:disabled) {
|
|
566
558
|
background: var(--smrt-color-surface-container, #f3f4f9);
|
|
567
559
|
color: var(--smrt-color-on-surface-variant, #43474e);
|
|
568
560
|
cursor: not-allowed;
|
|
569
561
|
opacity: 0.7;
|
|
570
562
|
}
|
|
571
563
|
|
|
572
|
-
.smrt-select:focus {
|
|
564
|
+
.content-agent-chat-container :global(.smrt-select:focus) {
|
|
573
565
|
background: var(--smrt-color-surface-variant, #e1e2ec);
|
|
574
566
|
}
|
|
575
567
|
|
|
@@ -598,11 +590,11 @@ async function handleSendMessage(content: string) {
|
|
|
598
590
|
background: var(--smrt-color-surface-container-lowest, #ffffff);
|
|
599
591
|
}
|
|
600
592
|
|
|
601
|
-
.topic-footer .smrt-select {
|
|
593
|
+
.topic-footer :global(.smrt-select) {
|
|
602
594
|
flex: 1;
|
|
603
595
|
}
|
|
604
596
|
|
|
605
|
-
.topic-action-btn {
|
|
597
|
+
.topic-footer :global(.topic-action-btn) {
|
|
606
598
|
display: inline-flex;
|
|
607
599
|
align-items: center;
|
|
608
600
|
gap: var(--smrt-spacing-1, 4px);
|
|
@@ -617,12 +609,12 @@ async function handleSendMessage(content: string) {
|
|
|
617
609
|
transition: background 0.15s;
|
|
618
610
|
}
|
|
619
611
|
|
|
620
|
-
.topic-action-btn:hover:not(:disabled) {
|
|
612
|
+
.topic-footer :global(.topic-action-btn:hover:not(:disabled)) {
|
|
621
613
|
background: var(--smrt-color-surface-variant, #e1e2e8);
|
|
622
614
|
color: var(--smrt-color-primary, #005ac1);
|
|
623
615
|
}
|
|
624
616
|
|
|
625
|
-
.topic-cancel-btn {
|
|
617
|
+
.topic-footer :global(.topic-cancel-btn) {
|
|
626
618
|
padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
|
|
627
619
|
border: none;
|
|
628
620
|
color: var(--smrt-color-outline, #74777f);
|
|
@@ -635,7 +627,7 @@ async function handleSendMessage(content: string) {
|
|
|
635
627
|
width: 100%;
|
|
636
628
|
}
|
|
637
629
|
|
|
638
|
-
.new-topic-input {
|
|
630
|
+
.new-topic-row :global(.new-topic-input) {
|
|
639
631
|
flex: 1;
|
|
640
632
|
padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
|
|
641
633
|
border: 1px solid var(--smrt-color-outline-variant, #c4c6d0);
|
|
@@ -646,7 +638,7 @@ async function handleSendMessage(content: string) {
|
|
|
646
638
|
color: var(--smrt-color-on-surface, #1a1c1e);
|
|
647
639
|
}
|
|
648
640
|
|
|
649
|
-
.new-topic-input:focus {
|
|
641
|
+
.new-topic-row :global(.new-topic-input:focus) {
|
|
650
642
|
border-color: var(--smrt-color-primary, #005ac1);
|
|
651
643
|
}
|
|
652
644
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentAgentChat.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentAgentChat.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentAgentChat.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentAgentChat.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0CAA0C,EAC3C,MAAM,gCAAgC,CAAC;AASxC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAodD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ImageLike } from '@happyvertical/smrt-images/svelte';
|
|
3
|
+
import { Select } from '@happyvertical/smrt-ui/forms';
|
|
3
4
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
5
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
6
|
import {
|
|
5
7
|
bodyToEditorHtml,
|
|
6
8
|
type ContentBodyFormat,
|
|
@@ -996,16 +998,16 @@ function handleEditorDragEnd() {
|
|
|
996
998
|
|
|
997
999
|
<div bind:this={rootElement} class="content-body-editor">
|
|
998
1000
|
<div class="body-editor-toolbar" aria-label={t(M['content.content_body_editor.toolbar'])}>
|
|
999
|
-
<button type="button" title={t(M['content.content_body_editor.bold'])} aria-label={t(M['content.content_body_editor.bold'])} onclick={() => runCommand('bold')}>
|
|
1001
|
+
<Button variant="ghost" size="sm" class="editor-toolbar-button" type="button" title={t(M['content.content_body_editor.bold'])} aria-label={t(M['content.content_body_editor.bold'])} onclick={() => runCommand('bold')}>
|
|
1000
1002
|
<strong>B</strong>
|
|
1001
|
-
</
|
|
1002
|
-
<button type="button" title={t(M['content.content_body_editor.italic'])} aria-label={t(M['content.content_body_editor.italic'])} onclick={() => runCommand('italic')}>
|
|
1003
|
+
</Button>
|
|
1004
|
+
<Button variant="ghost" size="sm" class="editor-toolbar-button" type="button" title={t(M['content.content_body_editor.italic'])} aria-label={t(M['content.content_body_editor.italic'])} onclick={() => runCommand('italic')}>
|
|
1003
1005
|
<em>I</em>
|
|
1004
|
-
</
|
|
1005
|
-
<button type="button" title={t(M['content.content_body_editor.heading'])} aria-label={t(M['content.content_body_editor.heading'])} onclick={() => runCommand('formatBlock', 'h2')}>
|
|
1006
|
+
</Button>
|
|
1007
|
+
<Button variant="ghost" size="sm" class="editor-toolbar-button" type="button" title={t(M['content.content_body_editor.heading'])} aria-label={t(M['content.content_body_editor.heading'])} onclick={() => runCommand('formatBlock', 'h2')}>
|
|
1006
1008
|
H2
|
|
1007
|
-
</
|
|
1008
|
-
<button type="button" title={t(M['content.content_body_editor.bulleted_list'])} aria-label={t(M['content.content_body_editor.bulleted_list'])} onclick={() => runCommand('insertUnorderedList')}>
|
|
1009
|
+
</Button>
|
|
1010
|
+
<Button variant="ghost" size="sm" class="editor-toolbar-button" type="button" title={t(M['content.content_body_editor.bulleted_list'])} aria-label={t(M['content.content_body_editor.bulleted_list'])} onclick={() => runCommand('insertUnorderedList')}>
|
|
1009
1011
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1010
1012
|
<line x1="9" y1="6" x2="21" y2="6"></line>
|
|
1011
1013
|
<line x1="9" y1="12" x2="21" y2="12"></line>
|
|
@@ -1014,24 +1016,24 @@ function handleEditorDragEnd() {
|
|
|
1014
1016
|
<circle cx="4" cy="12" r="1"></circle>
|
|
1015
1017
|
<circle cx="4" cy="18" r="1"></circle>
|
|
1016
1018
|
</svg>
|
|
1017
|
-
</
|
|
1018
|
-
<button type="button" title={t(M['content.content_body_editor.insert_image'])} aria-label={t(M['content.content_body_editor.insert_image'])} onclick={() => onOpenImageChooser?.()}>
|
|
1019
|
+
</Button>
|
|
1020
|
+
<Button variant="ghost" size="sm" class="editor-toolbar-button" type="button" title={t(M['content.content_body_editor.insert_image'])} aria-label={t(M['content.content_body_editor.insert_image'])} onclick={() => onOpenImageChooser?.()}>
|
|
1019
1021
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1020
1022
|
<rect x="3" y="3" width="18" height="18" rx="2"></rect>
|
|
1021
1023
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
1022
1024
|
<polyline points="21 15 16 10 5 21"></polyline>
|
|
1023
1025
|
</svg>
|
|
1024
|
-
</
|
|
1026
|
+
</Button>
|
|
1025
1027
|
|
|
1026
1028
|
<label class="format-select">
|
|
1027
1029
|
<span>{t(M['content.content_body_editor.save_as'])}</span>
|
|
1028
|
-
<
|
|
1030
|
+
<Select
|
|
1029
1031
|
value={currentFormat}
|
|
1030
1032
|
onchange={(event) => setBodyFormat((event.currentTarget as HTMLSelectElement).value as ContentBodyFormat)}
|
|
1031
1033
|
>
|
|
1032
1034
|
<option value="html">HTML</option>
|
|
1033
1035
|
<option value="markdown">Markdown</option>
|
|
1034
|
-
</
|
|
1036
|
+
</Select>
|
|
1035
1037
|
</label>
|
|
1036
1038
|
</div>
|
|
1037
1039
|
|
|
@@ -1041,7 +1043,7 @@ function handleEditorDragEnd() {
|
|
|
1041
1043
|
style={`top: ${Math.max(44, selectedImageBox.top + 8)}px; left: ${selectedImageBox.left + selectedImageBox.width / 2}px;`}
|
|
1042
1044
|
aria-label={t(M['content.content_body_editor.selected_image_controls'])}
|
|
1043
1045
|
>
|
|
1044
|
-
<button type="button" title={t(M['content.content_body_editor.move_image'])} aria-label={t(M['content.content_body_editor.move_image'])} onpointerdown={startImageMove}>
|
|
1046
|
+
<Button variant="ghost" size="sm" class="editor-popover-button" type="button" title={t(M['content.content_body_editor.move_image'])} aria-label={t(M['content.content_body_editor.move_image'])} onpointerdown={startImageMove}>
|
|
1045
1047
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1046
1048
|
<path d="M12 2v20"></path>
|
|
1047
1049
|
<path d="M2 12h20"></path>
|
|
@@ -1050,13 +1052,16 @@ function handleEditorDragEnd() {
|
|
|
1050
1052
|
<path d="m9 5 3-3 3 3"></path>
|
|
1051
1053
|
<path d="m9 19 3 3 3-3"></path>
|
|
1052
1054
|
</svg>
|
|
1053
|
-
</
|
|
1055
|
+
</Button>
|
|
1054
1056
|
<span class="image-control-divider"></span>
|
|
1055
|
-
<
|
|
1057
|
+
<Button
|
|
1058
|
+
variant="ghost"
|
|
1059
|
+
size="sm"
|
|
1060
|
+
class={`editor-popover-button${selectedImagePlacement === 'left' ? ' editor-popover-button--active' : ''}`}
|
|
1056
1061
|
type="button"
|
|
1057
1062
|
title={t(M['content.content_body_editor.wrap_text_on_right'])}
|
|
1058
1063
|
aria-label={t(M['content.content_body_editor.wrap_text_on_right'])}
|
|
1059
|
-
|
|
1064
|
+
aria-pressed={selectedImagePlacement === 'left'}
|
|
1060
1065
|
onclick={() => applyImagePlacement('left')}
|
|
1061
1066
|
>
|
|
1062
1067
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
@@ -1066,12 +1071,15 @@ function handleEditorDragEnd() {
|
|
|
1066
1071
|
<path d="M3 17h18"></path>
|
|
1067
1072
|
<path d="M3 21h14"></path>
|
|
1068
1073
|
</svg>
|
|
1069
|
-
</
|
|
1070
|
-
<
|
|
1074
|
+
</Button>
|
|
1075
|
+
<Button
|
|
1076
|
+
variant="ghost"
|
|
1077
|
+
size="sm"
|
|
1078
|
+
class={`editor-popover-button${selectedImagePlacement === 'center' || selectedImagePlacement === 'block' ? ' editor-popover-button--active' : ''}`}
|
|
1071
1079
|
type="button"
|
|
1072
1080
|
title={t(M['content.content_body_editor.center_image'])}
|
|
1073
1081
|
aria-label={t(M['content.content_body_editor.center_image'])}
|
|
1074
|
-
|
|
1082
|
+
aria-pressed={selectedImagePlacement === 'center' || selectedImagePlacement === 'block'}
|
|
1075
1083
|
onclick={() => applyImagePlacement('center')}
|
|
1076
1084
|
>
|
|
1077
1085
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
@@ -1079,12 +1087,15 @@ function handleEditorDragEnd() {
|
|
|
1079
1087
|
<rect x="7" y="9" width="10" height="6" rx="1"></rect>
|
|
1080
1088
|
<path d="M4 18h16"></path>
|
|
1081
1089
|
</svg>
|
|
1082
|
-
</
|
|
1083
|
-
<
|
|
1090
|
+
</Button>
|
|
1091
|
+
<Button
|
|
1092
|
+
variant="ghost"
|
|
1093
|
+
size="sm"
|
|
1094
|
+
class={`editor-popover-button${selectedImagePlacement === 'right' ? ' editor-popover-button--active' : ''}`}
|
|
1084
1095
|
type="button"
|
|
1085
1096
|
title={t(M['content.content_body_editor.wrap_text_on_left'])}
|
|
1086
1097
|
aria-label={t(M['content.content_body_editor.wrap_text_on_left'])}
|
|
1087
|
-
|
|
1098
|
+
aria-pressed={selectedImagePlacement === 'right'}
|
|
1088
1099
|
onclick={() => applyImagePlacement('right')}
|
|
1089
1100
|
>
|
|
1090
1101
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
@@ -1094,12 +1105,15 @@ function handleEditorDragEnd() {
|
|
|
1094
1105
|
<path d="M3 17h18"></path>
|
|
1095
1106
|
<path d="M7 21h14"></path>
|
|
1096
1107
|
</svg>
|
|
1097
|
-
</
|
|
1098
|
-
<
|
|
1108
|
+
</Button>
|
|
1109
|
+
<Button
|
|
1110
|
+
variant="ghost"
|
|
1111
|
+
size="sm"
|
|
1112
|
+
class={`editor-popover-button${selectedImagePlacement === 'full' ? ' editor-popover-button--active' : ''}`}
|
|
1099
1113
|
type="button"
|
|
1100
1114
|
title={t(M['content.content_body_editor.full_width'])}
|
|
1101
1115
|
aria-label={t(M['content.content_body_editor.full_width'])}
|
|
1102
|
-
|
|
1116
|
+
aria-pressed={selectedImagePlacement === 'full'}
|
|
1103
1117
|
onclick={() => applyImagePlacement('full')}
|
|
1104
1118
|
>
|
|
1105
1119
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -1107,38 +1121,39 @@ function handleEditorDragEnd() {
|
|
|
1107
1121
|
<rect x="4" y="8" width="16" height="8" rx="1"></rect>
|
|
1108
1122
|
<path d="M3 19h18"></path>
|
|
1109
1123
|
</svg>
|
|
1110
|
-
</
|
|
1124
|
+
</Button>
|
|
1111
1125
|
<span class="image-control-divider"></span>
|
|
1112
|
-
<button type="button" title={t(M['content.content_body_editor.make_smaller'])} aria-label={t(M['content.content_body_editor.make_image_smaller'])} onclick={() => resizeSelectedImage(-IMAGE_WIDTH_STEP)}>
|
|
1126
|
+
<Button variant="ghost" size="sm" class="editor-popover-button" type="button" title={t(M['content.content_body_editor.make_smaller'])} aria-label={t(M['content.content_body_editor.make_image_smaller'])} onclick={() => resizeSelectedImage(-IMAGE_WIDTH_STEP)}>
|
|
1113
1127
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1114
1128
|
<path d="M5 12h14"></path>
|
|
1115
1129
|
<path d="M9 8 5 12l4 4"></path>
|
|
1116
1130
|
<path d="m15 8 4 4-4 4"></path>
|
|
1117
1131
|
</svg>
|
|
1118
|
-
</
|
|
1119
|
-
<button type="button" title={t(M['content.content_body_editor.make_larger'])} aria-label={t(M['content.content_body_editor.make_image_larger'])} onclick={() => resizeSelectedImage(IMAGE_WIDTH_STEP)}>
|
|
1132
|
+
</Button>
|
|
1133
|
+
<Button variant="ghost" size="sm" class="editor-popover-button" type="button" title={t(M['content.content_body_editor.make_larger'])} aria-label={t(M['content.content_body_editor.make_image_larger'])} onclick={() => resizeSelectedImage(IMAGE_WIDTH_STEP)}>
|
|
1120
1134
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1121
1135
|
<path d="M3 12h18"></path>
|
|
1122
1136
|
<path d="m7 8-4 4 4 4"></path>
|
|
1123
1137
|
<path d="m17 8 4 4-4 4"></path>
|
|
1124
1138
|
</svg>
|
|
1125
|
-
</
|
|
1139
|
+
</Button>
|
|
1126
1140
|
{#if selectedImageAssetId && onUseImageAsThumbnail}
|
|
1127
|
-
<button type="button" title={t(M['content.content_body_editor.use_as_primary_image'])} aria-label={t(M['content.content_body_editor.use_as_primary_image'])} onclick={useSelectedImageAsThumbnail}>
|
|
1141
|
+
<Button variant="ghost" size="sm" class="editor-popover-button" type="button" title={t(M['content.content_body_editor.use_as_primary_image'])} aria-label={t(M['content.content_body_editor.use_as_primary_image'])} onclick={useSelectedImageAsThumbnail}>
|
|
1128
1142
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round">
|
|
1129
1143
|
<path d="m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2 7.5 14 3 9.6l6.2-.9L12 3Z"></path>
|
|
1130
1144
|
</svg>
|
|
1131
|
-
</
|
|
1145
|
+
</Button>
|
|
1132
1146
|
{/if}
|
|
1133
|
-
<button type="button" title={t(M['content.content_body_editor.remove_image'])} aria-label={t(M['content.content_body_editor.remove_image'])} onclick={removeSelectedImage}>
|
|
1147
|
+
<Button variant="ghost" size="sm" class="editor-popover-button" type="button" title={t(M['content.content_body_editor.remove_image'])} aria-label={t(M['content.content_body_editor.remove_image'])} onclick={removeSelectedImage}>
|
|
1134
1148
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1135
1149
|
<path d="M3 6h18"></path>
|
|
1136
1150
|
<path d="M8 6V4h8v2"></path>
|
|
1137
1151
|
<path d="M19 6l-1 14H6L5 6"></path>
|
|
1138
1152
|
</svg>
|
|
1139
|
-
</
|
|
1153
|
+
</Button>
|
|
1140
1154
|
</div>
|
|
1141
1155
|
|
|
1156
|
+
<!-- raw-primitive-allow: custom press-and-drag image resize handle driven by onpointerdown pointer-capture gesture and absolute positioning; no Button primitive owns this draggable resize grabber -->
|
|
1142
1157
|
<button
|
|
1143
1158
|
type="button"
|
|
1144
1159
|
class="image-resize-handle"
|
|
@@ -1207,7 +1222,7 @@ function handleEditorDragEnd() {
|
|
|
1207
1222
|
background: var(--smrt-color-surface-container-low, var(--smrt-color-surface-container));
|
|
1208
1223
|
}
|
|
1209
1224
|
|
|
1210
|
-
.body-editor-toolbar button {
|
|
1225
|
+
.body-editor-toolbar :global(.editor-toolbar-button) {
|
|
1211
1226
|
width: 2rem;
|
|
1212
1227
|
height: 2rem;
|
|
1213
1228
|
display: inline-grid;
|
|
@@ -1219,7 +1234,7 @@ function handleEditorDragEnd() {
|
|
|
1219
1234
|
cursor: pointer;
|
|
1220
1235
|
}
|
|
1221
1236
|
|
|
1222
|
-
.body-editor-toolbar button:hover {
|
|
1237
|
+
.body-editor-toolbar :global(.editor-toolbar-button:hover) {
|
|
1223
1238
|
border-color: var(--smrt-color-outline-variant);
|
|
1224
1239
|
background: var(--smrt-color-surface-container);
|
|
1225
1240
|
}
|
|
@@ -1233,7 +1248,7 @@ function handleEditorDragEnd() {
|
|
|
1233
1248
|
color: var(--smrt-color-on-surface-variant);
|
|
1234
1249
|
}
|
|
1235
1250
|
|
|
1236
|
-
.format-select select {
|
|
1251
|
+
.format-select :global(.select) {
|
|
1237
1252
|
min-height: 2rem;
|
|
1238
1253
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
1239
1254
|
border-radius: 0.45rem;
|
|
@@ -1399,7 +1414,7 @@ function handleEditorDragEnd() {
|
|
|
1399
1414
|
backdrop-filter: blur(10px);
|
|
1400
1415
|
}
|
|
1401
1416
|
|
|
1402
|
-
.image-control-popover button,
|
|
1417
|
+
.image-control-popover :global(.editor-popover-button),
|
|
1403
1418
|
.image-resize-handle {
|
|
1404
1419
|
display: inline-grid;
|
|
1405
1420
|
place-items: center;
|
|
@@ -1409,14 +1424,14 @@ function handleEditorDragEnd() {
|
|
|
1409
1424
|
cursor: pointer;
|
|
1410
1425
|
}
|
|
1411
1426
|
|
|
1412
|
-
.image-control-popover button {
|
|
1427
|
+
.image-control-popover :global(.editor-popover-button) {
|
|
1413
1428
|
width: 1.85rem;
|
|
1414
1429
|
height: 1.85rem;
|
|
1415
1430
|
border-radius: var(--smrt-radius-full, 9999px);
|
|
1416
1431
|
}
|
|
1417
1432
|
|
|
1418
|
-
.image-control-popover button:hover,
|
|
1419
|
-
.image-control-popover button.active {
|
|
1433
|
+
.image-control-popover :global(.editor-popover-button:hover),
|
|
1434
|
+
.image-control-popover :global(.editor-popover-button.editor-popover-button--active) {
|
|
1420
1435
|
background: var(--smrt-color-surface-container);
|
|
1421
1436
|
color: var(--smrt-color-primary);
|
|
1422
1437
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBodyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentBodyEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentBodyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentBodyEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAInE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAOtB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,iBAAiB,CAAC;IAC9B,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACrD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CACf,QAAQ,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,KAChC,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;CACvC;AAwlCD,QAAA,MAAM,iBAAiB;8BArdW,GAAG;wBAIT,MAAM;MAid6B,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
4
|
import type {
|
|
4
5
|
FactAuditClaimData,
|
|
5
6
|
FactAuditStateData,
|
|
@@ -197,22 +198,22 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
197
198
|
<span><strong>{factAudit?.counts.contradicted ?? 0}</strong> contradicted</span>
|
|
198
199
|
<span><strong>{factAudit?.counts.needs_review ?? 0}</strong> review</span>
|
|
199
200
|
</div>
|
|
200
|
-
<
|
|
201
|
+
<Button
|
|
202
|
+
variant="secondary"
|
|
201
203
|
type="button"
|
|
202
|
-
class="secondary-button"
|
|
203
204
|
disabled={busy || selectedClaimCount === 0}
|
|
204
205
|
onclick={() => void recheckFactClaims(selectedClaimIds)}
|
|
205
206
|
>
|
|
206
207
|
{busy ? 'Checking...' : `Recheck selected (${selectedClaimCount})`}
|
|
207
|
-
</
|
|
208
|
-
<
|
|
208
|
+
</Button>
|
|
209
|
+
<Button
|
|
210
|
+
variant="secondary"
|
|
209
211
|
type="button"
|
|
210
|
-
class="secondary-button"
|
|
211
212
|
disabled={busy}
|
|
212
213
|
onclick={() => void repairFactAudit()}
|
|
213
214
|
>
|
|
214
215
|
{busy ? 'Working...' : 'Repair audit'}
|
|
215
|
-
</
|
|
216
|
+
</Button>
|
|
216
217
|
</div>
|
|
217
218
|
<p class="empty-copy">
|
|
218
219
|
{t(M['content.claim_audit_tool.article_claims_help'])}
|
|
@@ -244,6 +245,7 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
244
245
|
<details class="tool-card">
|
|
245
246
|
<summary>
|
|
246
247
|
<label class="claim-audit-select">
|
|
248
|
+
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
247
249
|
<input
|
|
248
250
|
type="checkbox"
|
|
249
251
|
checked={isClaimSelected(claim)}
|
|
@@ -258,9 +260,9 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
258
260
|
</summary>
|
|
259
261
|
<div class="tool-card-body">
|
|
260
262
|
<div class="claim-audit-actions">
|
|
261
|
-
<
|
|
263
|
+
<Button
|
|
264
|
+
variant="secondary"
|
|
262
265
|
type="button"
|
|
263
|
-
class="secondary-button"
|
|
264
266
|
disabled={busy || !getClaimId(claim)}
|
|
265
267
|
onclick={() => {
|
|
266
268
|
const claimId = getClaimId(claim);
|
|
@@ -268,7 +270,7 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
268
270
|
}}
|
|
269
271
|
>
|
|
270
272
|
{t(M['content.claim_audit_tool.recheck_support'])}
|
|
271
|
-
</
|
|
273
|
+
</Button>
|
|
272
274
|
</div>
|
|
273
275
|
{#if claim.claimQuote}
|
|
274
276
|
<p><strong>{t(M['content.claim_audit_tool.article_claim_label'])}</strong> {claim.claimQuote}</p>
|
|
@@ -377,21 +379,6 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
377
379
|
line-height: 1;
|
|
378
380
|
}
|
|
379
381
|
|
|
380
|
-
.secondary-button {
|
|
381
|
-
border-radius: 0.5rem;
|
|
382
|
-
padding: 0.65rem 0.85rem;
|
|
383
|
-
border: 1px solid var(--smrt-color-outline-variant);
|
|
384
|
-
background: var(--smrt-color-surface);
|
|
385
|
-
color: var(--smrt-color-on-surface);
|
|
386
|
-
cursor: pointer;
|
|
387
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.secondary-button:disabled {
|
|
391
|
-
cursor: not-allowed;
|
|
392
|
-
opacity: 0.65;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
382
|
.pill {
|
|
396
383
|
border-radius: var(--smrt-radius-full, 9999px);
|
|
397
384
|
padding: 0.2rem 0.55rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentClaimAuditTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentClaimAuditTool.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentClaimAuditTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentClaimAuditTool.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAMhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;CAChE;AAgSD,QAAA,MAAM,qBAAqB;;MAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|