@happyvertical/smrt-content 0.60.15 → 0.60.17
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/README.md +8 -0
- package/dist/body-format.d.ts.map +1 -1
- package/dist/body-format.js +9 -5
- package/dist/body-format.js.map +1 -1
- package/dist/chunks/{content-query-Btubw6aG.js → content-query-YT83-Llc.js} +4 -4
- package/dist/chunks/{content-query-Btubw6aG.js.map → content-query-YT83-Llc.js.map} +1 -1
- package/dist/chunks/{content-versions-D9CG72yc.js → content-versions-DPdLvWjx.js} +2 -2
- package/dist/chunks/{content-versions-D9CG72yc.js.map → content-versions-DPdLvWjx.js.map} +1 -1
- package/dist/chunks/{contents-B72075dG.js → contents-vO5U0lE9.js} +2 -2
- package/dist/chunks/{contents-B72075dG.js.map → contents-vO5U0lE9.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/manifest.json +1 -1
- package/dist/server.js +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/ArticleCard.svelte +39 -36
- package/dist/svelte/components/ArticleList.svelte +10 -5
- package/dist/svelte/components/ContentAgentChat.svelte +90 -82
- package/dist/svelte/components/ContentBodyEditor.svelte +246 -231
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyRenderer.svelte +76 -82
- package/dist/svelte/components/ContentClaimAuditTool.svelte +100 -112
- package/dist/svelte/components/ContentContributionForm.svelte +17 -15
- package/dist/svelte/components/ContentContributionInbox.svelte +55 -51
- package/dist/svelte/components/ContentContributionPortal.svelte +50 -48
- package/dist/svelte/components/ContentContributionTypeManager.svelte +33 -31
- package/dist/svelte/components/ContentContributorManager.svelte +29 -27
- package/dist/svelte/components/ContentCorrectionsTool.svelte +76 -79
- package/dist/svelte/components/ContentEditor.svelte +523 -527
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +19 -16
- package/dist/svelte/components/ContentGovernanceManager.svelte +33 -33
- package/dist/svelte/components/ContentGovernancePanel.svelte +336 -359
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +14 -11
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +21 -19
- package/dist/svelte/components/ContentImageBrowser.svelte +72 -68
- package/dist/svelte/components/ContentImageChooser.svelte +30 -22
- package/dist/svelte/components/ContentList.svelte +504 -488
- package/dist/svelte/components/ContentListLifecyclePanel.svelte +19 -21
- package/dist/svelte/components/ContentMetadataFields.svelte +15 -12
- package/dist/svelte/components/ContentPictureDrawer.svelte +115 -112
- package/dist/svelte/components/ContentReferencesPanel.svelte +59 -54
- package/dist/svelte/components/ContentReviewStatusTray.svelte +40 -38
- package/dist/svelte/components/ContentStatusFields.svelte +12 -9
- package/dist/svelte/components/ContentTitleField.svelte +20 -20
- package/dist/svelte/components/ContentTransparencyReport.svelte +94 -92
- package/dist/svelte/components/ContentTransparencyTool.svelte +84 -87
- package/dist/svelte/components/ContentVersionsTool.svelte +60 -63
- package/dist/svelte/components/GovernedContentEditor.svelte +36 -35
- package/dist/svelte/components/ImageThumbnail.svelte +18 -12
- package/dist/svelte/components/Markdown.svelte +58 -55
- package/dist/svelte/routes/ContentContributionsRoute.svelte +206 -209
- package/dist/svelte/routes/ContentFactsRoute.svelte +239 -252
- package/dist/svelte/routes/ContentGovernanceRoute.svelte +77 -78
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte +98 -106
- package/dist/svelte/routes/PublishedArticleRoute.svelte +81 -77
- package/package.json +24 -24
|
@@ -172,10 +172,10 @@ function retryPreview() {
|
|
|
172
172
|
</script>
|
|
173
173
|
|
|
174
174
|
<section
|
|
175
|
-
class="lifecycle"
|
|
175
|
+
class="smrt-content-list-lifecycle-panel__root"
|
|
176
176
|
aria-label={mode === 'trash'
|
|
177
177
|
? t(M['content.content_list.trash_actions'])
|
|
178
|
-
: t(M['content.content_list.lifecycle_actions'])}
|
|
178
|
+
: t(M['content.content_list.lifecycle_actions'])} data-smrt-component="ContentListLifecyclePanel"
|
|
179
179
|
>
|
|
180
180
|
{#if mode === 'active'}
|
|
181
181
|
<Button
|
|
@@ -219,12 +219,12 @@ function retryPreview() {
|
|
|
219
219
|
{/if}
|
|
220
220
|
</section>
|
|
221
221
|
{#if mode === 'trash' && matchingSelectionTooLarge}
|
|
222
|
-
<p class="
|
|
222
|
+
<p class="smrt-content-list-lifecycle-panel__selection-limit" role="status" data-smrt-component="ContentListLifecyclePanel">
|
|
223
223
|
{t(M['content.content_list.empty_trash_limit'], { count: selectionLimit })}
|
|
224
224
|
</p>
|
|
225
225
|
{/if}
|
|
226
226
|
{#if lastResult}
|
|
227
|
-
<div class="lifecycle-
|
|
227
|
+
<div class="smrt-content-list-lifecycle-panel__result" aria-live="polite" data-smrt-component="ContentListLifecyclePanel">
|
|
228
228
|
<p>
|
|
229
229
|
{t(M['content.content_list.lifecycle_completed_summary'], {
|
|
230
230
|
accepted: lastResult.accepted,
|
|
@@ -257,7 +257,7 @@ function retryPreview() {
|
|
|
257
257
|
onClose={close}
|
|
258
258
|
ariaDescribedBy="content-lifecycle-summary"
|
|
259
259
|
>
|
|
260
|
-
<div class="
|
|
260
|
+
<div class="smrt-content-list-lifecycle-panel__preview" aria-live="polite" aria-busy={busy} data-smrt-part="panel">
|
|
261
261
|
{#if snapshot.status === 'previewing'}
|
|
262
262
|
<p id="content-lifecycle-summary">
|
|
263
263
|
{t(M['content.content_list.lifecycle_resolving'])}
|
|
@@ -306,7 +306,7 @@ function retryPreview() {
|
|
|
306
306
|
{/if}
|
|
307
307
|
|
|
308
308
|
{#if snapshot.error}
|
|
309
|
-
<p class="
|
|
309
|
+
<p class="smrt-content-list-lifecycle-panel__error" role="alert" data-smrt-part="error">{snapshot.error}</p>
|
|
310
310
|
{/if}
|
|
311
311
|
{#if snapshot.status === 'succeeded' && snapshot.summary}
|
|
312
312
|
<p role="status">
|
|
@@ -323,7 +323,7 @@ function retryPreview() {
|
|
|
323
323
|
{/if}
|
|
324
324
|
{/if}
|
|
325
325
|
|
|
326
|
-
<div class="actions">
|
|
326
|
+
<div class="smrt-content-list-lifecycle-panel__actions" data-smrt-part="actions">
|
|
327
327
|
<Button variant="ghost" type="button" disabled={busy} onclick={close}>
|
|
328
328
|
{snapshot.status === 'succeeded'
|
|
329
329
|
? t(M['content.content_list.lifecycle_close'])
|
|
@@ -352,39 +352,37 @@ function retryPreview() {
|
|
|
352
352
|
|
|
353
353
|
<style>
|
|
354
354
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
355
|
-
@layer smrt.
|
|
356
|
-
.lifecycle,
|
|
357
|
-
.
|
|
355
|
+
@layer smrt.structure {
|
|
356
|
+
.smrt-content-list-lifecycle-panel__root,
|
|
357
|
+
.smrt-content-list-lifecycle-panel__actions {
|
|
358
358
|
display: flex;
|
|
359
359
|
align-items: center;
|
|
360
360
|
flex-wrap: wrap;
|
|
361
361
|
gap: 0.5rem;
|
|
362
362
|
}
|
|
363
|
-
|
|
364
|
-
.preview {
|
|
363
|
+
.smrt-content-list-lifecycle-panel__preview {
|
|
365
364
|
display: grid;
|
|
366
365
|
gap: 0.75rem;
|
|
367
366
|
}
|
|
368
|
-
|
|
369
|
-
.preview p {
|
|
367
|
+
.smrt-content-list-lifecycle-panel__preview p {
|
|
370
368
|
margin: 0;
|
|
371
369
|
}
|
|
372
|
-
|
|
373
|
-
.lifecycle-result p {
|
|
370
|
+
.smrt-content-list-lifecycle-panel__result p {
|
|
374
371
|
margin: 0.5rem 0 0;
|
|
375
372
|
}
|
|
376
|
-
|
|
377
|
-
.selection-limit {
|
|
373
|
+
.smrt-content-list-lifecycle-panel__selection-limit {
|
|
378
374
|
margin: 0.5rem 0 0;
|
|
379
375
|
}
|
|
380
|
-
|
|
381
|
-
.actions {
|
|
376
|
+
.smrt-content-list-lifecycle-panel__actions {
|
|
382
377
|
justify-content: flex-end;
|
|
383
378
|
margin-top: 0.5rem;
|
|
384
379
|
}
|
|
380
|
+
}
|
|
385
381
|
|
|
386
|
-
|
|
382
|
+
@layer smrt.theme {
|
|
383
|
+
.smrt-content-list-lifecycle-panel__error {
|
|
387
384
|
color: var(--smrt-color-error);
|
|
388
385
|
}
|
|
389
386
|
}
|
|
387
|
+
|
|
390
388
|
</style>
|
|
@@ -96,7 +96,7 @@ function updateTags(value: string) {
|
|
|
96
96
|
</script>
|
|
97
97
|
|
|
98
98
|
{#snippet metadataFields()}
|
|
99
|
-
<div class="content-metadata-
|
|
99
|
+
<div class="smrt-content-metadata-fields__root" data-smrt-component="ContentMetadataFields">
|
|
100
100
|
{#if shown.has('author')}
|
|
101
101
|
<FormGroup label={fieldLabel(t(M['content.content_fields.author']))} id="{idPrefix}-author">
|
|
102
102
|
<Input
|
|
@@ -162,7 +162,7 @@ function updateTags(value: string) {
|
|
|
162
162
|
{/snippet}
|
|
163
163
|
|
|
164
164
|
{#if disclosure}
|
|
165
|
-
<details class="content-metadata-
|
|
165
|
+
<details class="smrt-content-metadata-fields__details" open={disclosure.open} data-smrt-component="ContentMetadataFields">
|
|
166
166
|
<summary>{disclosure.label}</summary>
|
|
167
167
|
{@render metadataFields()}
|
|
168
168
|
</details>
|
|
@@ -172,25 +172,28 @@ function updateTags(value: string) {
|
|
|
172
172
|
|
|
173
173
|
<style>
|
|
174
174
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
175
|
-
@layer smrt.
|
|
176
|
-
.content-metadata-
|
|
175
|
+
@layer smrt.structure {
|
|
176
|
+
.smrt-content-metadata-fields__root {
|
|
177
177
|
display: grid;
|
|
178
178
|
gap: 1rem;
|
|
179
179
|
}
|
|
180
|
-
|
|
181
|
-
.content-metadata-fields :global(.form-group) {
|
|
180
|
+
.smrt-content-metadata-fields__root :global([data-smrt-component="FormGroup"]) {
|
|
182
181
|
margin: 0;
|
|
183
182
|
}
|
|
184
|
-
|
|
185
|
-
.content-metadata-details > summary {
|
|
183
|
+
.smrt-content-metadata-fields__details > summary {
|
|
186
184
|
cursor: pointer;
|
|
187
185
|
padding-block: 0.5rem;
|
|
188
|
-
color: var(--smrt-color-on-surface);
|
|
189
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
190
186
|
}
|
|
191
|
-
|
|
192
|
-
.content-metadata-details[open] > summary {
|
|
187
|
+
.smrt-content-metadata-fields__details[open] > summary {
|
|
193
188
|
margin-bottom: 0.75rem;
|
|
194
189
|
}
|
|
195
190
|
}
|
|
191
|
+
|
|
192
|
+
@layer smrt.theme {
|
|
193
|
+
.smrt-content-metadata-fields__details > summary {
|
|
194
|
+
color: var(--smrt-color-on-surface);
|
|
195
|
+
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
196
199
|
</style>
|
|
@@ -206,9 +206,9 @@ $effect(() => {
|
|
|
206
206
|
|
|
207
207
|
// Keyboard and screen-reader users: focus near the end loads more.
|
|
208
208
|
function handleGridFocus(event: FocusEvent) {
|
|
209
|
-
const tile = (event.target as Element | null)?.closest('.
|
|
209
|
+
const tile = (event.target as Element | null)?.closest('.smrt-content-picture-drawer__picture');
|
|
210
210
|
if (!tile || !gridElement) return;
|
|
211
|
-
const tiles = Array.from(gridElement.querySelectorAll('.
|
|
211
|
+
const tiles = Array.from(gridElement.querySelectorAll('.smrt-content-picture-drawer__picture'));
|
|
212
212
|
if (tiles.indexOf(tile) >= tiles.length - MORE_FOCUS_TILES) requestMore();
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -276,8 +276,8 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
276
276
|
}
|
|
277
277
|
</script>
|
|
278
278
|
|
|
279
|
-
<div class="content-picture-
|
|
280
|
-
<header class="
|
|
279
|
+
<div class="smrt-content-picture-drawer__root" data-smrt-component="ContentPictureDrawer">
|
|
280
|
+
<header class="smrt-content-picture-drawer__header" data-smrt-part="header">
|
|
281
281
|
<h2>{t(M['content.content_picture_drawer.title'])}</h2>
|
|
282
282
|
{#if onClose}
|
|
283
283
|
<Button type="button" variant="secondary" size="sm" class="drawer-done" onclick={onClose}>
|
|
@@ -286,10 +286,10 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
286
286
|
{/if}
|
|
287
287
|
</header>
|
|
288
288
|
|
|
289
|
-
<p class="
|
|
289
|
+
<p class="smrt-content-picture-drawer__hint" data-smrt-part="description">{t(M['content.content_picture_drawer.hint'])}</p>
|
|
290
290
|
|
|
291
291
|
{#if mainPictureMode === 'chosen'}
|
|
292
|
-
<p class="
|
|
292
|
+
<p class="smrt-content-picture-drawer__main-status" data-smrt-part="status">
|
|
293
293
|
<span>{t(M['content.content_picture_drawer.main_chosen'])}</span>
|
|
294
294
|
{#if onClearMainChoice}
|
|
295
295
|
<Button type="button" variant="ghost" size="sm" onclick={onClearMainChoice}>
|
|
@@ -298,12 +298,12 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
298
298
|
{/if}
|
|
299
299
|
</p>
|
|
300
300
|
{:else if mainPictureMode === 'automatic'}
|
|
301
|
-
<p class="
|
|
301
|
+
<p class="smrt-content-picture-drawer__main-status" data-smrt-part="status">{t(M['content.content_picture_drawer.main_automatic'])}</p>
|
|
302
302
|
{:else}
|
|
303
|
-
<p class="
|
|
303
|
+
<p class="smrt-content-picture-drawer__main-status" data-smrt-part="status">{t(M['content.content_picture_drawer.main_none'])}</p>
|
|
304
304
|
{/if}
|
|
305
305
|
|
|
306
|
-
<div class="
|
|
306
|
+
<div class="smrt-content-picture-drawer__tools" data-smrt-part="list">
|
|
307
307
|
<Input
|
|
308
308
|
type="search"
|
|
309
309
|
bind:value={query}
|
|
@@ -325,7 +325,8 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
325
325
|
<!-- raw-primitive-allow: hidden file input opened by the Upload button (needs the DOM element for .click()) -->
|
|
326
326
|
<input
|
|
327
327
|
bind:this={fileInput}
|
|
328
|
-
class="
|
|
328
|
+
class="smrt-content-picture-drawer__file-input"
|
|
329
|
+
data-smrt-part="input"
|
|
329
330
|
type="file"
|
|
330
331
|
accept="image/*"
|
|
331
332
|
multiple
|
|
@@ -337,25 +338,27 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
337
338
|
</div>
|
|
338
339
|
|
|
339
340
|
{#if error}
|
|
340
|
-
<p class="
|
|
341
|
+
<p class="smrt-content-picture-drawer__error" data-smrt-part="error" role="alert">{error}</p>
|
|
341
342
|
{/if}
|
|
342
343
|
|
|
343
344
|
{#if visible.length > 0}
|
|
344
|
-
<ul class="
|
|
345
|
+
<ul class="smrt-content-picture-drawer__grid" data-smrt-part="grid" bind:this={gridElement} onfocusin={handleGridFocus}>
|
|
345
346
|
{#each visible as picture (picture.id)}
|
|
346
347
|
{@const isSelected = selectedIds.includes(picture.id)}
|
|
347
348
|
{@const isMain = mainPictureId === picture.id}
|
|
348
349
|
<li
|
|
349
|
-
class="
|
|
350
|
-
|
|
351
|
-
class:
|
|
350
|
+
class="smrt-content-picture-drawer__picture"
|
|
351
|
+
data-smrt-part="item"
|
|
352
|
+
class:smrt-content-picture-drawer__selected={isSelected}
|
|
353
|
+
class:smrt-content-picture-drawer__main={isMain}
|
|
352
354
|
draggable="true"
|
|
353
355
|
ondragstart={(event) => handleDragStart(event, picture)}
|
|
354
356
|
>
|
|
355
357
|
<!-- raw-primitive-allow: a large picture tile that toggles selection (aria-pressed) and wraps an image; Button would impose its own padding and label layout -->
|
|
356
358
|
<button
|
|
357
359
|
type="button"
|
|
358
|
-
class="
|
|
360
|
+
class="smrt-content-picture-drawer__picture-pick"
|
|
361
|
+
data-smrt-part="panel"
|
|
359
362
|
aria-pressed={isSelected}
|
|
360
363
|
aria-label={t(M['content.content_picture_drawer.select'], { name: picture.title })}
|
|
361
364
|
onclick={() => toggle(picture)}
|
|
@@ -370,44 +373,44 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
370
373
|
onerror={() => hideBrokenPicture(picture)}
|
|
371
374
|
/>
|
|
372
375
|
{:else}
|
|
373
|
-
<span class="
|
|
376
|
+
<span class="smrt-content-picture-drawer__picture-missing" data-smrt-part="empty">
|
|
374
377
|
{t(M['content.content_picture_drawer.no_preview'])}
|
|
375
378
|
</span>
|
|
376
379
|
{/if}
|
|
377
380
|
{#if isSelected}
|
|
378
|
-
<span class="
|
|
381
|
+
<span class="smrt-content-picture-drawer__picture-check" data-smrt-part="badge" aria-hidden="true">
|
|
379
382
|
{selectedIds.indexOf(picture.id) + 1}
|
|
380
383
|
</span>
|
|
381
384
|
{/if}
|
|
382
385
|
</button>
|
|
383
|
-
<span class="
|
|
384
|
-
<span class="
|
|
386
|
+
<span class="smrt-content-picture-drawer__picture-title" data-smrt-part="title">{picture.title}</span>
|
|
387
|
+
<span class="smrt-content-picture-drawer__picture-tags" data-smrt-part="meta">
|
|
385
388
|
{#if isMain}
|
|
386
|
-
<span class="
|
|
389
|
+
<span class="smrt-content-picture-drawer__tag smrt-content-picture-drawer__tag--main" data-smrt-part="meta">{t(M['content.content_picture_drawer.main'])}</span>
|
|
387
390
|
{:else if inStory.has(picture.id)}
|
|
388
|
-
<span class="
|
|
391
|
+
<span class="smrt-content-picture-drawer__tag" data-smrt-part="meta">{t(M['content.content_picture_drawer.in_story'])}</span>
|
|
389
392
|
{/if}
|
|
390
393
|
</span>
|
|
391
394
|
</li>
|
|
392
395
|
{/each}
|
|
393
396
|
{#if hasMore && onLoadMore}
|
|
394
|
-
<li class="
|
|
397
|
+
<li class="smrt-content-picture-drawer__more" data-smrt-part="footer" aria-hidden="true" bind:this={moreSentinel}>
|
|
395
398
|
{#if loading}{t(M['content.content_picture_drawer.loading_more'])}{/if}
|
|
396
399
|
</li>
|
|
397
400
|
{/if}
|
|
398
401
|
</ul>
|
|
399
402
|
{:else if loading}
|
|
400
|
-
<p class="
|
|
403
|
+
<p class="smrt-content-picture-drawer__hint" data-smrt-part="description">{t(M['content.content_picture_drawer.loading'])}</p>
|
|
401
404
|
{:else if pictures.some((picture) => !brokenPreviews[picture.id]) || (onSearch && query.trim())}
|
|
402
|
-
<p class="
|
|
405
|
+
<p class="smrt-content-picture-drawer__hint" data-smrt-part="description">{t(M['content.content_picture_drawer.no_match'])}</p>
|
|
403
406
|
{:else}
|
|
404
|
-
<p class="
|
|
407
|
+
<p class="smrt-content-picture-drawer__hint" data-smrt-part="description">{t(M['content.content_picture_drawer.empty'])}</p>
|
|
405
408
|
{/if}
|
|
406
409
|
|
|
407
|
-
<p class="
|
|
410
|
+
<p class="smrt-content-picture-drawer__status" data-smrt-part="status" role="status" aria-live="polite">{moreStatus}</p>
|
|
408
411
|
|
|
409
412
|
{#if selected.length > 0 && (onInsert || onUseAsMain)}
|
|
410
|
-
<div class="
|
|
413
|
+
<div class="smrt-content-picture-drawer__actions" data-smrt-part="actions">
|
|
411
414
|
{#if onInsert}
|
|
412
415
|
<Button type="button" variant="primary" onclick={insertSelected}>
|
|
413
416
|
{selected.length === 1
|
|
@@ -429,65 +432,49 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
429
432
|
|
|
430
433
|
<style>
|
|
431
434
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
432
|
-
@layer smrt.
|
|
433
|
-
.content-picture-
|
|
435
|
+
@layer smrt.structure {
|
|
436
|
+
.smrt-content-picture-drawer__root {
|
|
434
437
|
display: grid;
|
|
435
438
|
gap: 0.75rem;
|
|
436
439
|
}
|
|
437
|
-
|
|
438
|
-
.drawer-header {
|
|
440
|
+
.smrt-content-picture-drawer__header {
|
|
439
441
|
display: flex;
|
|
440
442
|
align-items: center;
|
|
441
443
|
justify-content: space-between;
|
|
442
444
|
gap: 0.75rem;
|
|
443
445
|
}
|
|
444
|
-
|
|
445
|
-
.drawer-header h2 {
|
|
446
|
+
.smrt-content-picture-drawer__header h2 {
|
|
446
447
|
margin: 0;
|
|
447
|
-
font-size: var(--smrt-typography-body-large-size, 1rem);
|
|
448
|
-
color: var(--smrt-color-on-surface);
|
|
449
448
|
}
|
|
450
|
-
|
|
451
|
-
.content-picture-drawer :global(.drawer-done) {
|
|
449
|
+
.smrt-content-picture-drawer__root :global(.drawer-done) {
|
|
452
450
|
min-height: 2.75rem;
|
|
453
451
|
}
|
|
454
|
-
|
|
455
|
-
.
|
|
456
|
-
.drawer-main {
|
|
452
|
+
.smrt-content-picture-drawer__hint,
|
|
453
|
+
.smrt-content-picture-drawer__main-status {
|
|
457
454
|
margin: 0;
|
|
458
|
-
color: var(--smrt-color-on-surface-variant);
|
|
459
|
-
font-size: var(--smrt-typography-body-medium-size, 0.85rem);
|
|
460
455
|
}
|
|
461
|
-
|
|
462
|
-
.drawer-main {
|
|
456
|
+
.smrt-content-picture-drawer__main-status {
|
|
463
457
|
display: flex;
|
|
464
458
|
flex-wrap: wrap;
|
|
465
459
|
align-items: center;
|
|
466
460
|
gap: 0.5rem;
|
|
467
461
|
}
|
|
468
|
-
|
|
469
|
-
.drawer-tools {
|
|
462
|
+
.smrt-content-picture-drawer__tools {
|
|
470
463
|
display: flex;
|
|
471
464
|
flex-wrap: wrap;
|
|
472
465
|
gap: 0.5rem;
|
|
473
466
|
}
|
|
474
|
-
|
|
475
|
-
.drawer-tools :global(input) {
|
|
467
|
+
.smrt-content-picture-drawer__tools :global(input) {
|
|
476
468
|
flex: 1 1 12rem;
|
|
477
469
|
min-height: 2.75rem;
|
|
478
470
|
}
|
|
479
|
-
|
|
480
|
-
.drawer-file-input {
|
|
471
|
+
.smrt-content-picture-drawer__file-input {
|
|
481
472
|
display: none;
|
|
482
473
|
}
|
|
483
|
-
|
|
484
|
-
.drawer-error {
|
|
474
|
+
.smrt-content-picture-drawer__error {
|
|
485
475
|
margin: 0;
|
|
486
|
-
color: var(--smrt-color-error);
|
|
487
|
-
font-size: var(--smrt-typography-body-medium-size, 0.85rem);
|
|
488
476
|
}
|
|
489
|
-
|
|
490
|
-
.drawer-grid {
|
|
477
|
+
.smrt-content-picture-drawer__grid {
|
|
491
478
|
/* Scrolls on its own so the story stays in reach for dragging. */
|
|
492
479
|
max-height: min(22rem, 45vh);
|
|
493
480
|
overflow-y: auto;
|
|
@@ -498,16 +485,11 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
498
485
|
padding: 0;
|
|
499
486
|
list-style: none;
|
|
500
487
|
}
|
|
501
|
-
|
|
502
|
-
.drawer-more {
|
|
488
|
+
.smrt-content-picture-drawer__more {
|
|
503
489
|
grid-column: 1 / -1;
|
|
504
490
|
min-height: 1.5rem;
|
|
505
|
-
color: var(--smrt-color-on-surface-variant);
|
|
506
|
-
font-size: var(--smrt-typography-body-small-size, 0.8rem);
|
|
507
|
-
text-align: center;
|
|
508
491
|
}
|
|
509
|
-
|
|
510
|
-
.drawer-status {
|
|
492
|
+
.smrt-content-picture-drawer__status {
|
|
511
493
|
position: absolute;
|
|
512
494
|
width: 1px;
|
|
513
495
|
height: 1px;
|
|
@@ -515,16 +497,14 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
515
497
|
clip: rect(0 0 0 0);
|
|
516
498
|
white-space: nowrap;
|
|
517
499
|
}
|
|
518
|
-
|
|
519
|
-
.drawer-picture {
|
|
500
|
+
.smrt-content-picture-drawer__picture {
|
|
520
501
|
display: grid;
|
|
521
502
|
gap: 0.25rem;
|
|
522
503
|
align-content: start;
|
|
523
504
|
min-width: 0;
|
|
524
505
|
cursor: grab;
|
|
525
506
|
}
|
|
526
|
-
|
|
527
|
-
.drawer-picture-pick {
|
|
507
|
+
.smrt-content-picture-drawer__picture-pick {
|
|
528
508
|
position: relative;
|
|
529
509
|
display: grid;
|
|
530
510
|
place-items: center;
|
|
@@ -532,29 +512,15 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
532
512
|
width: 100%;
|
|
533
513
|
padding: 0;
|
|
534
514
|
overflow: hidden;
|
|
535
|
-
border: 2px solid var(--smrt-color-outline-variant);
|
|
536
|
-
border-radius: 0.5rem;
|
|
537
|
-
background: var(--smrt-color-surface-container-low);
|
|
538
|
-
color: var(--smrt-color-on-surface-variant);
|
|
539
515
|
cursor: pointer;
|
|
540
516
|
}
|
|
541
|
-
|
|
542
|
-
.drawer-picture.selected .drawer-picture-pick {
|
|
543
|
-
border-color: var(--smrt-color-primary);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
.drawer-picture.main .drawer-picture-pick {
|
|
547
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--smrt-color-primary) 30%, transparent);
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
.drawer-picture-pick img {
|
|
517
|
+
.smrt-content-picture-drawer__picture-pick img {
|
|
551
518
|
width: 100%;
|
|
552
519
|
height: 100%;
|
|
553
520
|
object-fit: cover;
|
|
554
521
|
pointer-events: none;
|
|
555
522
|
}
|
|
556
|
-
|
|
557
|
-
.drawer-picture-check {
|
|
523
|
+
.smrt-content-picture-drawer__picture-check {
|
|
558
524
|
position: absolute;
|
|
559
525
|
top: 0.35rem;
|
|
560
526
|
right: 0.35rem;
|
|
@@ -562,55 +528,92 @@ function handleFiles(event: Event & { currentTarget: HTMLInputElement }) {
|
|
|
562
528
|
place-items: center;
|
|
563
529
|
min-width: 1.5rem;
|
|
564
530
|
height: 1.5rem;
|
|
531
|
+
}
|
|
532
|
+
.smrt-content-picture-drawer__picture-missing {
|
|
533
|
+
padding: 0.25rem;
|
|
534
|
+
}
|
|
535
|
+
.smrt-content-picture-drawer__picture-title {
|
|
536
|
+
overflow: hidden;
|
|
537
|
+
text-overflow: ellipsis;
|
|
538
|
+
white-space: nowrap;
|
|
539
|
+
}
|
|
540
|
+
.smrt-content-picture-drawer__picture-tags {
|
|
541
|
+
min-height: 0;
|
|
542
|
+
}
|
|
543
|
+
.smrt-content-picture-drawer__tag {
|
|
544
|
+
display: inline-block;
|
|
545
|
+
padding: 0.05rem 0.4rem;
|
|
546
|
+
}
|
|
547
|
+
.smrt-content-picture-drawer__actions {
|
|
548
|
+
display: flex;
|
|
549
|
+
flex-wrap: wrap;
|
|
550
|
+
gap: 0.5rem;
|
|
551
|
+
padding: 0.5rem 0;
|
|
552
|
+
}
|
|
553
|
+
.smrt-content-picture-drawer__actions :global(button) {
|
|
554
|
+
min-height: 2.75rem;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@layer smrt.theme {
|
|
559
|
+
.smrt-content-picture-drawer__header h2 {
|
|
560
|
+
font-size: var(--smrt-typography-body-large-size, 1rem);
|
|
561
|
+
color: var(--smrt-color-on-surface);
|
|
562
|
+
}
|
|
563
|
+
.smrt-content-picture-drawer__hint,
|
|
564
|
+
.smrt-content-picture-drawer__main-status {
|
|
565
|
+
color: var(--smrt-color-on-surface-variant);
|
|
566
|
+
font-size: var(--smrt-typography-body-medium-size, 0.85rem);
|
|
567
|
+
}
|
|
568
|
+
.smrt-content-picture-drawer__error {
|
|
569
|
+
color: var(--smrt-color-error);
|
|
570
|
+
font-size: var(--smrt-typography-body-medium-size, 0.85rem);
|
|
571
|
+
}
|
|
572
|
+
.smrt-content-picture-drawer__more {
|
|
573
|
+
color: var(--smrt-color-on-surface-variant);
|
|
574
|
+
font-size: var(--smrt-typography-body-small-size, 0.8rem);
|
|
575
|
+
text-align: center;
|
|
576
|
+
}
|
|
577
|
+
.smrt-content-picture-drawer__picture-pick {
|
|
578
|
+
border: 2px solid var(--smrt-color-outline-variant);
|
|
579
|
+
border-radius: 0.5rem;
|
|
580
|
+
background: var(--smrt-color-surface-container-low);
|
|
581
|
+
color: var(--smrt-color-on-surface-variant);
|
|
582
|
+
}
|
|
583
|
+
.smrt-content-picture-drawer__picture.smrt-content-picture-drawer__selected .smrt-content-picture-drawer__picture-pick {
|
|
584
|
+
border-color: var(--smrt-color-primary);
|
|
585
|
+
}
|
|
586
|
+
.smrt-content-picture-drawer__picture.smrt-content-picture-drawer__main .smrt-content-picture-drawer__picture-pick {
|
|
587
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--smrt-color-primary) 30%, transparent);
|
|
588
|
+
}
|
|
589
|
+
.smrt-content-picture-drawer__picture-check {
|
|
565
590
|
border-radius: var(--smrt-radius-full);
|
|
566
591
|
background: var(--smrt-color-primary);
|
|
567
592
|
color: var(--smrt-color-on-primary);
|
|
568
593
|
font-size: var(--smrt-typography-body-small-size, 0.8rem);
|
|
569
594
|
font-weight: var(--smrt-typography-weight-bold, 700);
|
|
570
595
|
}
|
|
571
|
-
|
|
572
|
-
.drawer-picture-missing {
|
|
573
|
-
padding: 0.25rem;
|
|
596
|
+
.smrt-content-picture-drawer__picture-missing {
|
|
574
597
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
575
598
|
text-align: center;
|
|
576
599
|
}
|
|
577
|
-
|
|
578
|
-
.drawer-picture-title {
|
|
579
|
-
overflow: hidden;
|
|
600
|
+
.smrt-content-picture-drawer__picture-title {
|
|
580
601
|
color: var(--smrt-color-on-surface);
|
|
581
602
|
font-size: var(--smrt-typography-body-small-size, 0.8rem);
|
|
582
|
-
text-overflow: ellipsis;
|
|
583
|
-
white-space: nowrap;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
.drawer-picture-tags {
|
|
587
|
-
min-height: 0;
|
|
588
603
|
}
|
|
589
|
-
|
|
590
|
-
.tag {
|
|
591
|
-
display: inline-block;
|
|
592
|
-
padding: 0.05rem 0.4rem;
|
|
604
|
+
.smrt-content-picture-drawer__tag {
|
|
593
605
|
border-radius: var(--smrt-radius-full);
|
|
594
606
|
background: var(--smrt-color-surface-container-high);
|
|
595
607
|
color: var(--smrt-color-on-surface-variant);
|
|
596
608
|
font-size: var(--smrt-typography-body-small-size, 0.72rem);
|
|
597
609
|
}
|
|
598
|
-
|
|
599
|
-
.tag-main {
|
|
610
|
+
.smrt-content-picture-drawer__tag--main {
|
|
600
611
|
background: var(--smrt-color-primary);
|
|
601
612
|
color: var(--smrt-color-on-primary);
|
|
602
613
|
}
|
|
603
|
-
|
|
604
|
-
.drawer-actions {
|
|
605
|
-
display: flex;
|
|
606
|
-
flex-wrap: wrap;
|
|
607
|
-
gap: 0.5rem;
|
|
608
|
-
padding: 0.5rem 0;
|
|
614
|
+
.smrt-content-picture-drawer__actions {
|
|
609
615
|
background: var(--smrt-color-surface);
|
|
610
616
|
}
|
|
611
|
-
|
|
612
|
-
.drawer-actions :global(button) {
|
|
613
|
-
min-height: 2.75rem;
|
|
614
|
-
}
|
|
615
617
|
}
|
|
618
|
+
|
|
616
619
|
</style>
|