@marianmeres/stuic 2.41.0 → 2.41.1
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.
|
@@ -67,6 +67,8 @@
|
|
|
67
67
|
close: () => void;
|
|
68
68
|
}
|
|
69
69
|
) => void;
|
|
70
|
+
/** optional "do not display file name" switch flag */
|
|
71
|
+
noName?: boolean;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
export function getAssetIcon(ext?: string) {
|
|
@@ -163,7 +165,13 @@
|
|
|
163
165
|
<script lang="ts">
|
|
164
166
|
const clog = createClog("AssetsPreview", { color: "auto" });
|
|
165
167
|
|
|
166
|
-
let {
|
|
168
|
+
let {
|
|
169
|
+
assets: _assets,
|
|
170
|
+
t = t_default,
|
|
171
|
+
classControls = "",
|
|
172
|
+
onDelete,
|
|
173
|
+
noName,
|
|
174
|
+
}: Props = $props();
|
|
167
175
|
|
|
168
176
|
let assets: AssetPreviewNormalized[] = $derived(
|
|
169
177
|
(_assets ?? []).map(normalizeInput).filter(Boolean) as AssetPreviewNormalized[]
|
|
@@ -501,14 +509,14 @@
|
|
|
501
509
|
</button>
|
|
502
510
|
</div>
|
|
503
511
|
|
|
504
|
-
{#if previewAsset?.name}
|
|
512
|
+
{#if !noName && previewAsset?.name}
|
|
505
513
|
<span class="absolute top-4 left-4 bg-white px-1 rounded">
|
|
506
514
|
{previewAsset?.name}
|
|
507
515
|
</span>
|
|
508
516
|
{/if}
|
|
509
517
|
|
|
510
518
|
{#if assets.length > 1}
|
|
511
|
-
{#if dotTooltip}
|
|
519
|
+
{#if !noName && dotTooltip}
|
|
512
520
|
<div
|
|
513
521
|
class="absolute bottom-10 left-0 right-0 text-center"
|
|
514
522
|
transition:fade={{ duration: 100 }}
|
|
@@ -18,6 +18,8 @@ export interface Props {
|
|
|
18
18
|
onDelete?: (asset: AssetPreview, index: number, controls: {
|
|
19
19
|
close: () => void;
|
|
20
20
|
}) => void;
|
|
21
|
+
/** optional "do not display file name" switch flag */
|
|
22
|
+
noName?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export declare function getAssetIcon(ext?: string): CallableFunction;
|
|
23
25
|
declare const AssetsPreview: import("svelte").Component<Props, {
|