@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
package/dist/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"timestamp":
|
|
3
|
+
"timestamp": 1782278497285,
|
|
4
4
|
"packageName": "@happyvertical/smrt-content",
|
|
5
|
-
"packageVersion": "0.34.
|
|
5
|
+
"packageVersion": "0.34.6",
|
|
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-24T05:21:38.489Z",
|
|
4
4
|
"packageName": "@happyvertical/smrt-content",
|
|
5
|
-
"packageVersion": "0.34.
|
|
5
|
+
"packageVersion": "0.34.6",
|
|
6
6
|
"sourceManifestPath": "dist/manifest.json",
|
|
7
7
|
"agentDocPath": "AGENTS.md",
|
|
8
8
|
"sourceHashes": {
|
|
9
|
-
"manifest": "
|
|
10
|
-
"packageJson": "
|
|
9
|
+
"manifest": "ed79ee816edadc64f6d3d336ce0e1cc753da30d8ed33e430456756a6757f0e62",
|
|
10
|
+
"packageJson": "b9e5e8fe0bded3d8f38ac434e80766155889ffd3caffa05f076ecc8e1eda68db",
|
|
11
11
|
"agents": "d3e1fdba8cf8c8f393e682616c56fefcc789c44018407bbdf7332d5f06cfbb5c"
|
|
12
12
|
},
|
|
13
13
|
"exports": [
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { AgentChat } from '@happyvertical/smrt-chat/svelte';
|
|
9
9
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
10
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
10
11
|
import type {
|
|
11
12
|
ContentEditorAssistantContext,
|
|
12
13
|
ContentEditorAssistantFieldUpdateAllowList,
|
|
@@ -426,7 +427,7 @@ async function handleSendMessage(content: string) {
|
|
|
426
427
|
<div class="error-state">
|
|
427
428
|
<p>{error}</p>
|
|
428
429
|
{#if canRetrySessionLoad}
|
|
429
|
-
<button onclick={loadSession}>Retry</
|
|
430
|
+
<Button variant="primary" type="button" onclick={loadSession}>Retry</Button>
|
|
430
431
|
{/if}
|
|
431
432
|
</div>
|
|
432
433
|
{:else if session}
|
|
@@ -471,10 +472,10 @@ async function handleSendMessage(content: string) {
|
|
|
471
472
|
bind:value={newTopicTitle}
|
|
472
473
|
onkeydown={(e: KeyboardEvent) => { if (e.key === 'Enter') { createNewTopic(); showNewTopicInput = false; } }}
|
|
473
474
|
/>
|
|
474
|
-
<button class="topic-action-btn" onclick={() => { createNewTopic(); showNewTopicInput = false; }} disabled={isCreatingTopic}>
|
|
475
|
+
<Button variant="ghost" size="sm" type="button" class="topic-action-btn" onclick={() => { createNewTopic(); showNewTopicInput = false; }} disabled={isCreatingTopic}>
|
|
475
476
|
{isCreatingTopic ? '...' : 'Create'}
|
|
476
|
-
</
|
|
477
|
-
<button class="topic-action-btn topic-cancel-btn" onclick={() => { showNewTopicInput = false; }}>✕</
|
|
477
|
+
</Button>
|
|
478
|
+
<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
479
|
</div>
|
|
479
480
|
{:else}
|
|
480
481
|
<select
|
|
@@ -490,10 +491,10 @@ async function handleSendMessage(content: string) {
|
|
|
490
491
|
<option value={thread.id}>{thread.title || t(M['content.content_agent_chat.untitled_topic'])}</option>
|
|
491
492
|
{/each}
|
|
492
493
|
</select>
|
|
493
|
-
<button class="topic-action-btn" onclick={() => { showNewTopicInput = true; newTopicTitle = ''; }} title={t(M['content.content_agent_chat.new_topic'])}>
|
|
494
|
+
<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
495
|
<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
496
|
{t(M['content.content_agent_chat.new'])}
|
|
496
|
-
</
|
|
497
|
+
</Button>
|
|
497
498
|
{/if}
|
|
498
499
|
</div>
|
|
499
500
|
{/if}
|
|
@@ -535,16 +536,6 @@ async function handleSendMessage(content: string) {
|
|
|
535
536
|
to { transform: rotate(360deg); }
|
|
536
537
|
}
|
|
537
538
|
|
|
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
539
|
.model-bar {
|
|
549
540
|
padding: var(--smrt-spacing-2, 8px) var(--smrt-spacing-3, 12px);
|
|
550
541
|
background: var(--smrt-color-surface-container-lowest, #ffffff);
|
|
@@ -602,7 +593,7 @@ async function handleSendMessage(content: string) {
|
|
|
602
593
|
flex: 1;
|
|
603
594
|
}
|
|
604
595
|
|
|
605
|
-
.topic-action-btn {
|
|
596
|
+
.topic-footer :global(.topic-action-btn) {
|
|
606
597
|
display: inline-flex;
|
|
607
598
|
align-items: center;
|
|
608
599
|
gap: var(--smrt-spacing-1, 4px);
|
|
@@ -617,12 +608,12 @@ async function handleSendMessage(content: string) {
|
|
|
617
608
|
transition: background 0.15s;
|
|
618
609
|
}
|
|
619
610
|
|
|
620
|
-
.topic-action-btn:hover:not(:disabled) {
|
|
611
|
+
.topic-footer :global(.topic-action-btn:hover:not(:disabled)) {
|
|
621
612
|
background: var(--smrt-color-surface-variant, #e1e2e8);
|
|
622
613
|
color: var(--smrt-color-primary, #005ac1);
|
|
623
614
|
}
|
|
624
615
|
|
|
625
|
-
.topic-cancel-btn {
|
|
616
|
+
.topic-footer :global(.topic-cancel-btn) {
|
|
626
617
|
padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
|
|
627
618
|
border: none;
|
|
628
619
|
color: var(--smrt-color-outline, #74777f);
|
|
@@ -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":"AAWA,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;AAmdD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ImageLike } from '@happyvertical/smrt-images/svelte';
|
|
3
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
5
|
import {
|
|
5
6
|
bodyToEditorHtml,
|
|
6
7
|
type ContentBodyFormat,
|
|
@@ -996,16 +997,16 @@ function handleEditorDragEnd() {
|
|
|
996
997
|
|
|
997
998
|
<div bind:this={rootElement} class="content-body-editor">
|
|
998
999
|
<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')}>
|
|
1000
|
+
<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
1001
|
<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')}>
|
|
1002
|
+
</Button>
|
|
1003
|
+
<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
1004
|
<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')}>
|
|
1005
|
+
</Button>
|
|
1006
|
+
<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
1007
|
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')}>
|
|
1008
|
+
</Button>
|
|
1009
|
+
<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
1010
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1010
1011
|
<line x1="9" y1="6" x2="21" y2="6"></line>
|
|
1011
1012
|
<line x1="9" y1="12" x2="21" y2="12"></line>
|
|
@@ -1014,14 +1015,14 @@ function handleEditorDragEnd() {
|
|
|
1014
1015
|
<circle cx="4" cy="12" r="1"></circle>
|
|
1015
1016
|
<circle cx="4" cy="18" r="1"></circle>
|
|
1016
1017
|
</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?.()}>
|
|
1018
|
+
</Button>
|
|
1019
|
+
<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
1020
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1020
1021
|
<rect x="3" y="3" width="18" height="18" rx="2"></rect>
|
|
1021
1022
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
1022
1023
|
<polyline points="21 15 16 10 5 21"></polyline>
|
|
1023
1024
|
</svg>
|
|
1024
|
-
</
|
|
1025
|
+
</Button>
|
|
1025
1026
|
|
|
1026
1027
|
<label class="format-select">
|
|
1027
1028
|
<span>{t(M['content.content_body_editor.save_as'])}</span>
|
|
@@ -1041,7 +1042,7 @@ function handleEditorDragEnd() {
|
|
|
1041
1042
|
style={`top: ${Math.max(44, selectedImageBox.top + 8)}px; left: ${selectedImageBox.left + selectedImageBox.width / 2}px;`}
|
|
1042
1043
|
aria-label={t(M['content.content_body_editor.selected_image_controls'])}
|
|
1043
1044
|
>
|
|
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}>
|
|
1045
|
+
<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
1046
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1046
1047
|
<path d="M12 2v20"></path>
|
|
1047
1048
|
<path d="M2 12h20"></path>
|
|
@@ -1050,13 +1051,16 @@ function handleEditorDragEnd() {
|
|
|
1050
1051
|
<path d="m9 5 3-3 3 3"></path>
|
|
1051
1052
|
<path d="m9 19 3 3 3-3"></path>
|
|
1052
1053
|
</svg>
|
|
1053
|
-
</
|
|
1054
|
+
</Button>
|
|
1054
1055
|
<span class="image-control-divider"></span>
|
|
1055
|
-
<
|
|
1056
|
+
<Button
|
|
1057
|
+
variant="ghost"
|
|
1058
|
+
size="sm"
|
|
1059
|
+
class={`editor-popover-button${selectedImagePlacement === 'left' ? ' editor-popover-button--active' : ''}`}
|
|
1056
1060
|
type="button"
|
|
1057
1061
|
title={t(M['content.content_body_editor.wrap_text_on_right'])}
|
|
1058
1062
|
aria-label={t(M['content.content_body_editor.wrap_text_on_right'])}
|
|
1059
|
-
|
|
1063
|
+
aria-pressed={selectedImagePlacement === 'left'}
|
|
1060
1064
|
onclick={() => applyImagePlacement('left')}
|
|
1061
1065
|
>
|
|
1062
1066
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
@@ -1066,12 +1070,15 @@ function handleEditorDragEnd() {
|
|
|
1066
1070
|
<path d="M3 17h18"></path>
|
|
1067
1071
|
<path d="M3 21h14"></path>
|
|
1068
1072
|
</svg>
|
|
1069
|
-
</
|
|
1070
|
-
<
|
|
1073
|
+
</Button>
|
|
1074
|
+
<Button
|
|
1075
|
+
variant="ghost"
|
|
1076
|
+
size="sm"
|
|
1077
|
+
class={`editor-popover-button${selectedImagePlacement === 'center' || selectedImagePlacement === 'block' ? ' editor-popover-button--active' : ''}`}
|
|
1071
1078
|
type="button"
|
|
1072
1079
|
title={t(M['content.content_body_editor.center_image'])}
|
|
1073
1080
|
aria-label={t(M['content.content_body_editor.center_image'])}
|
|
1074
|
-
|
|
1081
|
+
aria-pressed={selectedImagePlacement === 'center' || selectedImagePlacement === 'block'}
|
|
1075
1082
|
onclick={() => applyImagePlacement('center')}
|
|
1076
1083
|
>
|
|
1077
1084
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
@@ -1079,12 +1086,15 @@ function handleEditorDragEnd() {
|
|
|
1079
1086
|
<rect x="7" y="9" width="10" height="6" rx="1"></rect>
|
|
1080
1087
|
<path d="M4 18h16"></path>
|
|
1081
1088
|
</svg>
|
|
1082
|
-
</
|
|
1083
|
-
<
|
|
1089
|
+
</Button>
|
|
1090
|
+
<Button
|
|
1091
|
+
variant="ghost"
|
|
1092
|
+
size="sm"
|
|
1093
|
+
class={`editor-popover-button${selectedImagePlacement === 'right' ? ' editor-popover-button--active' : ''}`}
|
|
1084
1094
|
type="button"
|
|
1085
1095
|
title={t(M['content.content_body_editor.wrap_text_on_left'])}
|
|
1086
1096
|
aria-label={t(M['content.content_body_editor.wrap_text_on_left'])}
|
|
1087
|
-
|
|
1097
|
+
aria-pressed={selectedImagePlacement === 'right'}
|
|
1088
1098
|
onclick={() => applyImagePlacement('right')}
|
|
1089
1099
|
>
|
|
1090
1100
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
@@ -1094,12 +1104,15 @@ function handleEditorDragEnd() {
|
|
|
1094
1104
|
<path d="M3 17h18"></path>
|
|
1095
1105
|
<path d="M7 21h14"></path>
|
|
1096
1106
|
</svg>
|
|
1097
|
-
</
|
|
1098
|
-
<
|
|
1107
|
+
</Button>
|
|
1108
|
+
<Button
|
|
1109
|
+
variant="ghost"
|
|
1110
|
+
size="sm"
|
|
1111
|
+
class={`editor-popover-button${selectedImagePlacement === 'full' ? ' editor-popover-button--active' : ''}`}
|
|
1099
1112
|
type="button"
|
|
1100
1113
|
title={t(M['content.content_body_editor.full_width'])}
|
|
1101
1114
|
aria-label={t(M['content.content_body_editor.full_width'])}
|
|
1102
|
-
|
|
1115
|
+
aria-pressed={selectedImagePlacement === 'full'}
|
|
1103
1116
|
onclick={() => applyImagePlacement('full')}
|
|
1104
1117
|
>
|
|
1105
1118
|
<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 +1120,39 @@ function handleEditorDragEnd() {
|
|
|
1107
1120
|
<rect x="4" y="8" width="16" height="8" rx="1"></rect>
|
|
1108
1121
|
<path d="M3 19h18"></path>
|
|
1109
1122
|
</svg>
|
|
1110
|
-
</
|
|
1123
|
+
</Button>
|
|
1111
1124
|
<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)}>
|
|
1125
|
+
<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
1126
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1114
1127
|
<path d="M5 12h14"></path>
|
|
1115
1128
|
<path d="M9 8 5 12l4 4"></path>
|
|
1116
1129
|
<path d="m15 8 4 4-4 4"></path>
|
|
1117
1130
|
</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)}>
|
|
1131
|
+
</Button>
|
|
1132
|
+
<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
1133
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1121
1134
|
<path d="M3 12h18"></path>
|
|
1122
1135
|
<path d="m7 8-4 4 4 4"></path>
|
|
1123
1136
|
<path d="m17 8 4 4-4 4"></path>
|
|
1124
1137
|
</svg>
|
|
1125
|
-
</
|
|
1138
|
+
</Button>
|
|
1126
1139
|
{#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}>
|
|
1140
|
+
<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
1141
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round">
|
|
1129
1142
|
<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
1143
|
</svg>
|
|
1131
|
-
</
|
|
1144
|
+
</Button>
|
|
1132
1145
|
{/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}>
|
|
1146
|
+
<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
1147
|
<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1135
1148
|
<path d="M3 6h18"></path>
|
|
1136
1149
|
<path d="M8 6V4h8v2"></path>
|
|
1137
1150
|
<path d="M19 6l-1 14H6L5 6"></path>
|
|
1138
1151
|
</svg>
|
|
1139
|
-
</
|
|
1152
|
+
</Button>
|
|
1140
1153
|
</div>
|
|
1141
1154
|
|
|
1155
|
+
<!-- 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
1156
|
<button
|
|
1143
1157
|
type="button"
|
|
1144
1158
|
class="image-resize-handle"
|
|
@@ -1207,7 +1221,7 @@ function handleEditorDragEnd() {
|
|
|
1207
1221
|
background: var(--smrt-color-surface-container-low, var(--smrt-color-surface-container));
|
|
1208
1222
|
}
|
|
1209
1223
|
|
|
1210
|
-
.body-editor-toolbar button {
|
|
1224
|
+
.body-editor-toolbar :global(.editor-toolbar-button) {
|
|
1211
1225
|
width: 2rem;
|
|
1212
1226
|
height: 2rem;
|
|
1213
1227
|
display: inline-grid;
|
|
@@ -1219,7 +1233,7 @@ function handleEditorDragEnd() {
|
|
|
1219
1233
|
cursor: pointer;
|
|
1220
1234
|
}
|
|
1221
1235
|
|
|
1222
|
-
.body-editor-toolbar button:hover {
|
|
1236
|
+
.body-editor-toolbar :global(.editor-toolbar-button:hover) {
|
|
1223
1237
|
border-color: var(--smrt-color-outline-variant);
|
|
1224
1238
|
background: var(--smrt-color-surface-container);
|
|
1225
1239
|
}
|
|
@@ -1399,7 +1413,7 @@ function handleEditorDragEnd() {
|
|
|
1399
1413
|
backdrop-filter: blur(10px);
|
|
1400
1414
|
}
|
|
1401
1415
|
|
|
1402
|
-
.image-control-popover button,
|
|
1416
|
+
.image-control-popover :global(.editor-popover-button),
|
|
1403
1417
|
.image-resize-handle {
|
|
1404
1418
|
display: inline-grid;
|
|
1405
1419
|
place-items: center;
|
|
@@ -1409,14 +1423,14 @@ function handleEditorDragEnd() {
|
|
|
1409
1423
|
cursor: pointer;
|
|
1410
1424
|
}
|
|
1411
1425
|
|
|
1412
|
-
.image-control-popover button {
|
|
1426
|
+
.image-control-popover :global(.editor-popover-button) {
|
|
1413
1427
|
width: 1.85rem;
|
|
1414
1428
|
height: 1.85rem;
|
|
1415
1429
|
border-radius: var(--smrt-radius-full, 9999px);
|
|
1416
1430
|
}
|
|
1417
1431
|
|
|
1418
|
-
.image-control-popover button:hover,
|
|
1419
|
-
.image-control-popover button.active {
|
|
1432
|
+
.image-control-popover :global(.editor-popover-button:hover),
|
|
1433
|
+
.image-control-popover :global(.editor-popover-button.editor-popover-button--active) {
|
|
1420
1434
|
background: var(--smrt-color-surface-container);
|
|
1421
1435
|
color: var(--smrt-color-primary);
|
|
1422
1436
|
}
|
|
@@ -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;AAGnE,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;AAulCD,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'])}
|
|
@@ -258,9 +259,9 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
258
259
|
</summary>
|
|
259
260
|
<div class="tool-card-body">
|
|
260
261
|
<div class="claim-audit-actions">
|
|
261
|
-
<
|
|
262
|
+
<Button
|
|
263
|
+
variant="secondary"
|
|
262
264
|
type="button"
|
|
263
|
-
class="secondary-button"
|
|
264
265
|
disabled={busy || !getClaimId(claim)}
|
|
265
266
|
onclick={() => {
|
|
266
267
|
const claimId = getClaimId(claim);
|
|
@@ -268,7 +269,7 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
268
269
|
}}
|
|
269
270
|
>
|
|
270
271
|
{t(M['content.claim_audit_tool.recheck_support'])}
|
|
271
|
-
</
|
|
272
|
+
</Button>
|
|
272
273
|
</div>
|
|
273
274
|
{#if claim.claimQuote}
|
|
274
275
|
<p><strong>{t(M['content.claim_audit_tool.article_claim_label'])}</strong> {claim.claimQuote}</p>
|
|
@@ -377,21 +378,6 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
377
378
|
line-height: 1;
|
|
378
379
|
}
|
|
379
380
|
|
|
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
381
|
.pill {
|
|
396
382
|
border-radius: var(--smrt-radius-full, 9999px);
|
|
397
383
|
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;AA+RD,QAAA,MAAM,qBAAqB;;MAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,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
|
ContentContributionData,
|
|
5
6
|
ContentContributionTypeData,
|
|
@@ -184,11 +185,11 @@ function handleSubmit(event: SubmitEvent) {
|
|
|
184
185
|
{/if}
|
|
185
186
|
|
|
186
187
|
<div class="actions">
|
|
187
|
-
<
|
|
188
|
+
<Button variant="primary" type="submit">{submitLabel}</Button>
|
|
188
189
|
{#if onCancel}
|
|
189
|
-
<
|
|
190
|
+
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
190
191
|
Cancel
|
|
191
|
-
</
|
|
192
|
+
</Button>
|
|
192
193
|
{/if}
|
|
193
194
|
</div>
|
|
194
195
|
</form>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributionForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionForm.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributionForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionForm.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC3C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iCAAiC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAyKD,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,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 { ContentContributionData } from '../../mock-smrt-client';
|
|
4
5
|
import { M } from '../i18n.contribution.js';
|
|
5
6
|
|
|
@@ -132,6 +133,7 @@ $effect(() => {
|
|
|
132
133
|
<div class="inbox__layout">
|
|
133
134
|
<div class="inbox__list">
|
|
134
135
|
{#each contributions as contribution (contribution.id)}
|
|
136
|
+
<!-- raw-primitive-allow: large pressable selection card wrapping a title and metadata with a selected state -->
|
|
135
137
|
<button
|
|
136
138
|
type="button"
|
|
137
139
|
class:selected={selectedContribution?.id === contribution.id}
|
|
@@ -204,38 +206,39 @@ $effect(() => {
|
|
|
204
206
|
<option value="review">review</option>
|
|
205
207
|
</select>
|
|
206
208
|
</label>
|
|
207
|
-
<
|
|
209
|
+
<Button
|
|
210
|
+
variant="primary"
|
|
208
211
|
type="submit"
|
|
209
212
|
name="intent"
|
|
210
213
|
value="approve"
|
|
211
214
|
disabled={!canSubmitWorkflow}
|
|
212
215
|
>
|
|
213
216
|
{approveActionLabel(selectedContribution)}
|
|
214
|
-
</
|
|
217
|
+
</Button>
|
|
215
218
|
{/if}
|
|
216
219
|
|
|
217
220
|
{#if onRequestChanges || workflowFormAction}
|
|
218
|
-
<
|
|
221
|
+
<Button
|
|
222
|
+
variant="secondary"
|
|
219
223
|
type="submit"
|
|
220
224
|
name="intent"
|
|
221
225
|
value="request-changes"
|
|
222
|
-
class="secondary"
|
|
223
226
|
disabled={!canSubmitWorkflow}
|
|
224
227
|
>
|
|
225
228
|
{t(M['content.contribution_inbox.request_changes'])}
|
|
226
|
-
</
|
|
229
|
+
</Button>
|
|
227
230
|
{/if}
|
|
228
231
|
|
|
229
232
|
{#if onReject || workflowFormAction}
|
|
230
|
-
<
|
|
233
|
+
<Button
|
|
234
|
+
variant="danger"
|
|
231
235
|
type="submit"
|
|
232
236
|
name="intent"
|
|
233
237
|
value="reject"
|
|
234
|
-
class="danger"
|
|
235
238
|
disabled={!canSubmitWorkflow}
|
|
236
239
|
>
|
|
237
240
|
Reject
|
|
238
|
-
</
|
|
241
|
+
</Button>
|
|
239
242
|
{/if}
|
|
240
243
|
</div>
|
|
241
244
|
</form>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributionInbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionInbox.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributionInbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionInbox.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC3D,SAAS,CAAC,EAAE,CACV,YAAY,EAAE,uBAAuB,EACrC,OAAO,EAAE;QAAE,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KACxD,IAAI,CAAC;IACV,gBAAgB,CAAC,EAAE,CACjB,YAAY,EAAE,uBAAuB,EACrC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,CACT,YAAY,EAAE,uBAAuB,EACrC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,IAAI,CAAC;CACX;AAkND,QAAA,MAAM,wBAAwB,2CAAwC,CAAC;AACvE,KAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC5E,eAAe,wBAAwB,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 { ContentContributionData } from '../../mock-smrt-client';
|
|
4
5
|
import { M } from '../i18n.contribution.js';
|
|
5
6
|
|
|
@@ -49,6 +50,7 @@ function canWithdraw(contribution: ContentContributionData) {
|
|
|
49
50
|
<div class="portal__layout">
|
|
50
51
|
<div class="portal__list">
|
|
51
52
|
{#each contributions as contribution (contribution.id)}
|
|
53
|
+
<!-- raw-primitive-allow: large pressable selection card wrapping rich content (title, status) with selected state; no Button primitive owns this list-row selection pattern -->
|
|
52
54
|
<button
|
|
53
55
|
type="button"
|
|
54
56
|
class:selected={selectedContribution?.id === contribution.id}
|
|
@@ -91,9 +93,9 @@ function canWithdraw(contribution: ContentContributionData) {
|
|
|
91
93
|
</dl>
|
|
92
94
|
|
|
93
95
|
{#if onWithdraw && canWithdraw(selectedContribution)}
|
|
94
|
-
<
|
|
96
|
+
<Button variant="secondary" type="button" onclick={() => onWithdraw?.(selectedContribution)}>
|
|
95
97
|
{t(M['content.contribution_portal.withdraw_submission'])}
|
|
96
|
-
</
|
|
98
|
+
</Button>
|
|
97
99
|
{/if}
|
|
98
100
|
</article>
|
|
99
101
|
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributionPortal.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionPortal.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributionPortal.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionPortal.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAC9D;AAmGD,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,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 { ContentContributionTypeData } from '../../mock-smrt-client';
|
|
4
5
|
import { M } from '../i18n.contribution.js';
|
|
5
6
|
|
|
@@ -116,7 +117,7 @@ function handleSubmit() {
|
|
|
116
117
|
<h3>{t(M['content.contribution_type_manager.heading'])}</h3>
|
|
117
118
|
<p>{t(M['content.contribution_type_manager.intro'])}</p>
|
|
118
119
|
</div>
|
|
119
|
-
<
|
|
120
|
+
<Button variant="ghost" type="button" onclick={() => (editing = {})}>{t(M['content.contribution_type_manager.add_type'])}</Button>
|
|
120
121
|
</header>
|
|
121
122
|
|
|
122
123
|
<div class="layout">
|
|
@@ -128,9 +129,9 @@ function handleSubmit() {
|
|
|
128
129
|
<div>{type.key}</div>
|
|
129
130
|
</div>
|
|
130
131
|
<div class="actions">
|
|
131
|
-
<
|
|
132
|
+
<Button variant="secondary" type="button" onclick={() => (editing = type)}>Edit</Button>
|
|
132
133
|
{#if onDelete && type.id}
|
|
133
|
-
<
|
|
134
|
+
<Button variant="danger" type="button" onclick={() => onDelete?.(type)}>Delete</Button>
|
|
134
135
|
{/if}
|
|
135
136
|
</div>
|
|
136
137
|
</article>
|
|
@@ -231,7 +232,7 @@ function handleSubmit() {
|
|
|
231
232
|
</label>
|
|
232
233
|
|
|
233
234
|
<div class="actions">
|
|
234
|
-
<
|
|
235
|
+
<Button variant="primary" type="submit">{t(M['content.contribution_type_manager.save_type'])}</Button>
|
|
235
236
|
</div>
|
|
236
237
|
</form>
|
|
237
238
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributionTypeManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionTypeManager.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributionTypeManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionTypeManager.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAI1E,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,2BAA2B,CAAC,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;CACxD;AAqOD,QAAA,MAAM,8BAA8B,2CAAwC,CAAC;AAC7E,KAAK,8BAA8B,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACxF,eAAe,8BAA8B,CAAC"}
|