@ysgroup/ui 0.1.50 → 0.1.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/ui",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@ysgroup/contracts": ">=0.1.50",
14
- "@ysgroup/core": ">=0.1.28",
14
+ "@ysgroup/core": ">=0.1.29",
15
15
  "@ysgroup/theme": ">=0.3.1",
16
16
  "element-plus": ">=2.9",
17
17
  "vue": ">=3.5"
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@ysgroup/contracts": "^0.1.51",
29
- "@ysgroup/core": "^0.1.28",
29
+ "@ysgroup/core": "^0.1.29",
30
30
  "@ysgroup/theme": "^0.3.1",
31
31
  "docx-preview": "^0.4.1"
32
32
  }
@@ -18,6 +18,9 @@ const props = withDefaults(
18
18
  width?: string | number;
19
19
  /** 有未保存的修改:点右上角关闭、按 Esc、点取消都先问「放弃未保存的修改?」。 */
20
20
  dirty?: boolean;
21
+ /** dirty 时关闭确认的文案和按钮(如还有文件没传完:「关闭会取消这些上传…」「取消上传并关闭」)。 */
22
+ dirtyText?: string;
23
+ dirtyConfirmText?: string;
21
24
  /** 提交中:确认按钮转圈,取消、右上角关闭、Esc 都不起作用。 */
22
25
  confirmLoading?: boolean;
23
26
  confirmText?: string;
@@ -34,6 +37,8 @@ const props = withDefaults(
34
37
  title: "",
35
38
  width: "520px",
36
39
  dirty: false,
40
+ dirtyText: "放弃未保存的修改?",
41
+ dirtyConfirmText: "放弃修改",
37
42
  confirmLoading: false,
38
43
  confirmText: "保存",
39
44
  cancelText: "取消",
@@ -67,7 +72,7 @@ async function allowClose(): Promise<boolean> {
67
72
  if (!props.dirty) return true;
68
73
  asking = true;
69
74
  try {
70
- return await ysConfirm("放弃未保存的修改?", { title: "关闭确认", confirmText: "放弃修改", cancelText: "继续编辑" });
75
+ return await ysConfirm(props.dirtyText, { title: "关闭确认", confirmText: props.dirtyConfirmText, cancelText: "继续编辑" });
71
76
  } finally {
72
77
  asking = false;
73
78
  }
@@ -0,0 +1,138 @@
1
+ <!-- YsFileDropZone —— 拖入与粘贴上传区:把文件拖进区域、或在区域里 Ctrl/⌘+V 粘贴截图,都发 files 事件。
2
+ 规则(规范 8.11):
3
+ - 只接管拖入的「文件」(拖文字、链接、页面元素不管);进出深度计数,在子元素之间移动遮罩不闪;
4
+ 不能接收时也 preventDefault,免得文件掉在页面上浏览器跳去打开它。
5
+ - 嵌套区域加 exclusive:落在内层只给内层(如回复框),不冒泡给外层(如详情面板)。
6
+ - 粘贴:剪贴板里有文件且没有纯文本才当附件(Excel 单元格同时带图和文字,照常粘贴文字);剪贴板默认名改成
7
+ 「截图 MM-DD HHmmss.png」。paste="inside" 只在区域内有焦点时接管(默认),"window" 整页接管,false 不接管。
8
+ - 遮罩跟着区域、不挡操作(pointer-events: none),文案写清上限和粘贴方式。 -->
9
+ <script setup lang="ts">
10
+ import { onBeforeUnmount, onMounted, ref } from "vue";
11
+ import { hasDraggedFiles, pastedFiles } from "../fileRules";
12
+
13
+ const props = withDefaults(
14
+ defineProps<{
15
+ disabled?: boolean;
16
+ exclusive?: boolean;
17
+ paste?: "inside" | "window" | false;
18
+ title?: string;
19
+ hint?: string;
20
+ }>(),
21
+ { disabled: false, exclusive: false, paste: "inside", title: "松开即上传", hint: "" },
22
+ );
23
+
24
+ const emit = defineEmits<{ files: [files: File[]] }>();
25
+
26
+ const root = ref<HTMLElement | null>(null);
27
+ const over = ref(false);
28
+ let depth = 0;
29
+
30
+ function onEnter(event: DragEvent) {
31
+ if (!hasDraggedFiles(event)) return;
32
+ event.preventDefault();
33
+ if (props.exclusive) event.stopPropagation();
34
+ depth += 1;
35
+ over.value = !props.disabled;
36
+ }
37
+
38
+ function onOver(event: DragEvent) {
39
+ if (!hasDraggedFiles(event)) return;
40
+ event.preventDefault();
41
+ if (props.exclusive) event.stopPropagation();
42
+ if (event.dataTransfer) event.dataTransfer.dropEffect = props.disabled ? "none" : "copy";
43
+ }
44
+
45
+ function onLeave(event: DragEvent) {
46
+ if (!hasDraggedFiles(event)) return;
47
+ if (props.exclusive) event.stopPropagation();
48
+ depth = Math.max(0, depth - 1);
49
+ if (depth === 0) over.value = false;
50
+ }
51
+
52
+ function onDrop(event: DragEvent) {
53
+ if (!hasDraggedFiles(event)) return;
54
+ event.preventDefault();
55
+ if (props.exclusive) event.stopPropagation();
56
+ depth = 0;
57
+ over.value = false;
58
+ if (props.disabled) return;
59
+ const files = Array.from(event.dataTransfer?.files ?? []);
60
+ if (files.length) emit("files", files);
61
+ }
62
+
63
+ function onPaste(event: ClipboardEvent) {
64
+ if (props.disabled || !props.paste || event.defaultPrevented) return;
65
+ const files = pastedFiles(event);
66
+ if (!files.length) return;
67
+ event.preventDefault();
68
+ if (props.exclusive) event.stopPropagation();
69
+ emit("files", files);
70
+ }
71
+
72
+ function onWindowPaste(event: ClipboardEvent) {
73
+ // 落在别的上传区里的粘贴由那个区处理。
74
+ const target = event.target as HTMLElement | null;
75
+ if (target?.closest(".ys-drop-zone") && !root.value?.contains(target)) return;
76
+ onPaste(event);
77
+ }
78
+
79
+ function onInsidePaste(event: ClipboardEvent) {
80
+ if (props.paste === "inside") onPaste(event);
81
+ }
82
+
83
+ onMounted(() => {
84
+ if (props.paste === "window") window.addEventListener("paste", onWindowPaste);
85
+ });
86
+ onBeforeUnmount(() => window.removeEventListener("paste", onWindowPaste));
87
+ </script>
88
+
89
+ <template>
90
+ <div
91
+ ref="root"
92
+ class="ys-drop-zone"
93
+ :class="{ 'is-over': over }"
94
+ :tabindex="paste === 'inside' ? -1 : undefined"
95
+ @dragenter="onEnter"
96
+ @dragover="onOver"
97
+ @dragleave="onLeave"
98
+ @drop="onDrop"
99
+ @paste="onInsidePaste"
100
+ >
101
+ <slot :over="over" />
102
+ <div v-if="over" class="ys-drop-zone__overlay" aria-hidden="true">
103
+ <strong>{{ title }}</strong>
104
+ <span v-if="hint">{{ hint }}</span>
105
+ </div>
106
+ </div>
107
+ </template>
108
+
109
+ <style scoped>
110
+ .ys-drop-zone {
111
+ position: relative;
112
+ outline: none;
113
+ }
114
+ .ys-drop-zone__overlay {
115
+ position: absolute;
116
+ inset: 0;
117
+ z-index: 20;
118
+ display: flex;
119
+ flex-direction: column;
120
+ gap: 6px;
121
+ align-items: center;
122
+ justify-content: center;
123
+ padding: 16px;
124
+ border: 2px dashed var(--ys-color-primary);
125
+ border-radius: var(--ys-radius-m);
126
+ color: var(--ys-color-primary);
127
+ background: color-mix(in srgb, var(--ys-color-primary) 8%, var(--ys-color-bg-elevated) 86%);
128
+ text-align: center;
129
+ pointer-events: none;
130
+ }
131
+ .ys-drop-zone__overlay strong {
132
+ font-size: 16px;
133
+ }
134
+ .ys-drop-zone__overlay span {
135
+ color: var(--ys-color-text-2);
136
+ font-size: 13px;
137
+ }
138
+ </style>
@@ -0,0 +1,178 @@
1
+ <!-- YsFileNotes —— 文件标签:文件按文件规范检查后的结论(ys_base.files.file_media_fields 的 notes)。
2
+ 三个级别:不符合规范(红)、建议(橙)、说明(灰)。悬停或聚焦看原因和建议;inline 时直接把原因写出来(详情页、预览头部)。
3
+ 标签按级别排好序(服务端已排),max 之外的折叠成「+N」。 -->
4
+ <script setup lang="ts">
5
+ import { computed } from "vue";
6
+ import type { YsFileNote } from "../fileRules";
7
+
8
+ const props = withDefaults(
9
+ defineProps<{
10
+ notes?: YsFileNote[] | null;
11
+ /** 最多显示几个标签,其余折叠为「+N」(悬停看全部);0 为不限。 */
12
+ max?: number;
13
+ /** 只显示这些级别(如列表里只显示 noncompliant、advice)。 */
14
+ levels?: string[];
15
+ /** 平铺展开:标题 + 原因 + 建议,不用悬停。 */
16
+ inline?: boolean;
17
+ }>(),
18
+ { notes: () => [], max: 0, levels: undefined, inline: false },
19
+ );
20
+
21
+ const shown = computed(() => (props.notes ?? []).filter((note) => !props.levels || props.levels.includes(note.level)));
22
+ const visible = computed(() => (props.max > 0 ? shown.value.slice(0, props.max) : shown.value));
23
+ const hidden = computed(() => shown.value.slice(visible.value.length));
24
+ const tone = (level: string) => (level === "noncompliant" ? "danger" : level === "advice" ? "warning" : "info");
25
+ </script>
26
+
27
+ <template>
28
+ <div v-if="shown.length && inline" class="ys-file-notes is-inline">
29
+ <div v-for="note in shown" :key="note.code" class="ys-file-notes__row" :class="`is-${tone(note.level)}`">
30
+ <span class="ys-file-notes__level">{{ note.level_label }}</span>
31
+ <div class="ys-file-notes__body">
32
+ <strong>{{ note.title }}</strong>
33
+ <p v-if="note.reason">{{ note.reason }}</p>
34
+ <p v-if="note.suggestion" class="ys-file-notes__suggestion">建议:{{ note.suggestion }}</p>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <span v-else-if="shown.length" class="ys-file-notes">
39
+ <el-popover v-for="note in visible" :key="note.code" trigger="hover" placement="top" :width="320" :show-after="200">
40
+ <template #reference>
41
+ <button type="button" class="ys-file-notes__tag" :class="`is-${tone(note.level)}`" :aria-label="`${note.level_label}:${note.title}`">
42
+ {{ note.title }}
43
+ </button>
44
+ </template>
45
+ <div class="ys-file-notes__pop">
46
+ <div class="ys-file-notes__pop-head" :class="`is-${tone(note.level)}`">
47
+ <span class="ys-file-notes__level">{{ note.level_label }}</span>
48
+ <strong>{{ note.title }}</strong>
49
+ </div>
50
+ <p v-if="note.reason">{{ note.reason }}</p>
51
+ <p v-if="note.suggestion" class="ys-file-notes__suggestion">建议:{{ note.suggestion }}</p>
52
+ </div>
53
+ </el-popover>
54
+ <el-popover v-if="hidden.length" trigger="hover" placement="top" :width="320" :show-after="200">
55
+ <template #reference>
56
+ <button type="button" class="ys-file-notes__tag is-more" :aria-label="`还有 ${hidden.length} 个标签`">+{{ hidden.length }}</button>
57
+ </template>
58
+ <div class="ys-file-notes__pop">
59
+ <div v-for="note in hidden" :key="note.code" class="ys-file-notes__pop-item">
60
+ <div class="ys-file-notes__pop-head" :class="`is-${tone(note.level)}`">
61
+ <span class="ys-file-notes__level">{{ note.level_label }}</span>
62
+ <strong>{{ note.title }}</strong>
63
+ </div>
64
+ <p v-if="note.reason">{{ note.reason }}</p>
65
+ <p v-if="note.suggestion" class="ys-file-notes__suggestion">建议:{{ note.suggestion }}</p>
66
+ </div>
67
+ </div>
68
+ </el-popover>
69
+ </span>
70
+ </template>
71
+
72
+ <style>
73
+ /* 不 scoped:el-popover 的内容挂在 body 下。 */
74
+ .ys-file-notes {
75
+ display: inline-flex;
76
+ flex-wrap: wrap;
77
+ gap: 4px;
78
+ vertical-align: middle;
79
+ }
80
+ .ys-file-notes__tag {
81
+ max-width: 14em;
82
+ overflow: hidden;
83
+ padding: 0 6px;
84
+ border: 1px solid transparent;
85
+ border-radius: var(--ys-radius-s);
86
+ font: inherit;
87
+ font-size: 12px;
88
+ line-height: 18px;
89
+ white-space: nowrap;
90
+ text-overflow: ellipsis;
91
+ cursor: default;
92
+ }
93
+ .ys-file-notes__tag:focus-visible {
94
+ outline: var(--ys-focus-outline);
95
+ }
96
+ .ys-file-notes__tag.is-danger {
97
+ color: var(--ys-color-danger);
98
+ background: color-mix(in srgb, var(--ys-color-danger) 10%, transparent);
99
+ border-color: color-mix(in srgb, var(--ys-color-danger) 28%, transparent);
100
+ }
101
+ .ys-file-notes__tag.is-warning {
102
+ color: color-mix(in srgb, var(--ys-color-warning) 80%, var(--ys-color-text-1));
103
+ background: color-mix(in srgb, var(--ys-color-warning) 12%, transparent);
104
+ border-color: color-mix(in srgb, var(--ys-color-warning) 30%, transparent);
105
+ }
106
+ .ys-file-notes__tag.is-info,
107
+ .ys-file-notes__tag.is-more {
108
+ color: var(--ys-color-text-2);
109
+ background: color-mix(in srgb, var(--ys-color-text-3) 10%, transparent);
110
+ border-color: color-mix(in srgb, var(--ys-color-text-3) 22%, transparent);
111
+ }
112
+ .ys-file-notes__pop p {
113
+ margin: 6px 0 0;
114
+ color: var(--ys-color-text-2);
115
+ font-size: 13px;
116
+ line-height: 1.6;
117
+ }
118
+ .ys-file-notes__pop-item + .ys-file-notes__pop-item {
119
+ margin-top: 10px;
120
+ padding-top: 10px;
121
+ border-top: 1px solid var(--ys-color-border);
122
+ }
123
+ .ys-file-notes__pop-head {
124
+ display: flex;
125
+ align-items: center;
126
+ gap: 6px;
127
+ color: var(--ys-color-text-1);
128
+ }
129
+ .ys-file-notes__level {
130
+ flex: none;
131
+ padding: 0 5px;
132
+ border-radius: var(--ys-radius-s);
133
+ font-size: 12px;
134
+ line-height: 18px;
135
+ color: var(--ys-color-text-2);
136
+ background: color-mix(in srgb, var(--ys-color-text-3) 12%, transparent);
137
+ }
138
+ .is-danger > .ys-file-notes__level {
139
+ color: var(--ys-color-danger);
140
+ background: color-mix(in srgb, var(--ys-color-danger) 12%, transparent);
141
+ }
142
+ .is-warning > .ys-file-notes__level {
143
+ color: color-mix(in srgb, var(--ys-color-warning) 80%, var(--ys-color-text-1));
144
+ background: color-mix(in srgb, var(--ys-color-warning) 14%, transparent);
145
+ }
146
+ .ys-file-notes__suggestion {
147
+ color: var(--ys-color-text-1) !important;
148
+ }
149
+ .ys-file-notes.is-inline {
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 8px;
153
+ }
154
+ .ys-file-notes__row {
155
+ display: flex;
156
+ gap: 8px;
157
+ align-items: flex-start;
158
+ padding: 8px 10px;
159
+ border-radius: var(--ys-radius-m);
160
+ background: color-mix(in srgb, var(--ys-color-text-3) 6%, transparent);
161
+ }
162
+ .ys-file-notes__row.is-danger {
163
+ background: color-mix(in srgb, var(--ys-color-danger) 6%, transparent);
164
+ }
165
+ .ys-file-notes__row.is-warning {
166
+ background: color-mix(in srgb, var(--ys-color-warning) 8%, transparent);
167
+ }
168
+ .ys-file-notes__body {
169
+ min-width: 0;
170
+ color: var(--ys-color-text-1);
171
+ font-size: 13px;
172
+ }
173
+ .ys-file-notes__body p {
174
+ margin: 2px 0 0;
175
+ color: var(--ys-color-text-2);
176
+ line-height: 1.6;
177
+ }
178
+ </style>
@@ -1,14 +1,19 @@
1
1
  <!-- YsFilePreview —— 文件预览弹窗,全平台统一的文件查看/预览/播放入口。
2
2
  PDF 用 YsPdfViewer(pdf.js 自绘,跟随明暗),Excel/CSV 用 YsSheetViewer,Word(.docx)用 YsDocViewer,
3
- 视频/音频用 YsMediaPlayer,图片、文本直接显示,其他类型(含旧版 .doc/.ppt、压缩包)提示下载。
3
+ 视频/音频用 YsMediaPlayer,图片用 YsImageViewer(缩放、拖动,SVG 矢量放大),文本直接显示,其他类型(含旧版 .doc/.ppt、压缩包)提示下载。
4
4
  文件名和 content_type 认不出类型时(如只有材料编号),读到 Blob 后按 Blob 的 type 和文件头识别(sniffFileType)。
5
5
  文件内容由调用方的 load 取回(WS 分块、HTTP 都行),组件负责显示、进度、出错重试、下载、新标签打开、全屏和 ← → 切换;
6
6
  Esc 关闭;焦点在播放器上时 ← → 留给播放器快退快进。窄屏(≤ 640px)自动全屏。关闭后回收 blob 地址。
7
- 重型依赖(pdf.js、SheetJS、docx-preview)打开对应类型才加载。 -->
7
+ 重型依赖(pdf.js、SheetJS、docx-preview)打开对应类型才加载。
8
+ 文件规范:文件带 notes 时头部显示文件标签;可内嵌脚本的类型(SVG、HTML、XML……)不提供「新标签页打开」——
9
+ blob 地址与页面同源,新标签页里脚本会以本系统身份运行;页内的 <img>、文本预览不执行脚本,照常显示。 -->
8
10
  <script setup lang="ts">
9
11
  import { computed, defineAsyncComponent, onBeforeUnmount, onMounted, ref, shallowRef, watch } from "vue";
12
+ import YsImageViewer from "./YsImageViewer.vue";
10
13
  import YsViewerIcon from "./YsViewerIcon.vue";
11
14
  import YsViewerState from "./YsViewerState.vue";
15
+ import YsFileNotes from "./YsFileNotes.vue";
16
+ import { isActiveContent } from "../fileRules";
12
17
  import "../preview/viewer.css";
13
18
  import {
14
19
  OFFICE_MIME,
@@ -74,7 +79,11 @@ const typeLabel = computed(() => (file.value ? fileTypeLabel(file.value.name, mi
74
79
  const sizeText = computed(() => formatFileSize(file.value?.size));
75
80
  const isFull = computed(() => fullscreen.value || narrow.value);
76
81
  /** 新标签页打开只对浏览器能直接显示的类型有意义。 */
77
- const canOpenInTab = computed(() => ["pdf", "image", "video", "audio"].includes(kind.value));
82
+ const canOpenInTab = computed(
83
+ () =>
84
+ ["pdf", "image", "video", "audio"].includes(kind.value) &&
85
+ !(file.value && isActiveContent({ ...file.value, content_type: mime.value || file.value.content_type })),
86
+ );
78
87
  const isCsv = computed(() => fileExtension(file.value?.name ?? "") === "csv" || /csv/i.test(mime.value));
79
88
  /** 标题栏左侧的类型色块:PDF 红、表格绿、文档蓝、图片橙、音视频紫灰,其他中性。 */
80
89
  const badge = computed(() => {
@@ -87,6 +96,8 @@ const unsupported = computed(() => {
87
96
  const ext = fileExtension(file.value?.name ?? "");
88
97
  if (ext === "doc" || ext === "wps" || mime.value === OFFICE_MIME.doc)
89
98
  return { title: "旧版 Word(.doc)暂不支持在线预览", detail: "下载后用 Word / WPS 打开;另存为 .docx 后上传即可在线预览。" };
99
+ if (ext === "heic" || ext === "heif")
100
+ return { title: "HEIC 照片多数浏览器不能直接显示", detail: "下载后用系统相册打开;iPhone 可在「设置 → 相机 → 格式」选「兼容性最佳」,以后拍的就是 JPG。" };
90
101
  if (["ppt", "pptx", "dps"].includes(ext) || mime.value.includes("presentation") || mime.value === OFFICE_MIME.ppt)
91
102
  return { title: "演示文稿暂不支持在线预览", detail: "下载后用 PowerPoint / WPS 打开。" };
92
103
  return { title: `${typeLabel.value || "此类"}文件暂不支持在线预览`, detail: "下载后用本地软件打开。" };
@@ -116,6 +127,8 @@ async function open() {
116
127
  });
117
128
  if (mine !== token) return;
118
129
  let type = kind.value === "pdf" ? "application/pdf" : "";
130
+ // .svg 的 Blob 没带类型时浏览器不会按 SVG 显示。
131
+ if (kind.value === "image" && !data.type && fileExtension(target.name) === "svg") type = "image/svg+xml";
119
132
  if (kind.value === "none") {
120
133
  const sniffed = await sniffFileType(data);
121
134
  if (mine !== token) return;
@@ -246,6 +259,7 @@ function openInTab() {
246
259
  <span v-if="typeLabel" class="ys-file-preview__type">{{ typeLabel }}</span>
247
260
  <span v-if="sizeText">{{ sizeText }}</span>
248
261
  <span v-if="total > 1" class="ys-file-preview__index">{{ current + 1 }} / {{ total }}</span>
262
+ <YsFileNotes v-if="file?.notes?.length" :notes="file.notes" :max="3" />
249
263
  </span>
250
264
  </div>
251
265
  <div class="ys-file-preview__tools">
@@ -306,9 +320,9 @@ function openInTab() {
306
320
  <YsDocViewer v-else-if="kind === 'word'" :source="blob" :fullscreen-button="false">
307
321
  <template #error-actions><el-button type="primary" @click="download">下载</el-button></template>
308
322
  </YsDocViewer>
309
- <div v-else-if="kind === 'image' && url" class="ys-file-preview__image-wrap">
310
- <img class="ys-file-preview__image" :src="url" :alt="file.name" />
311
- </div>
323
+ <YsImageViewer v-else-if="kind === 'image' && url" :key="url" :src="url" :source="blob" :alt="file.name">
324
+ <template #error-actions><el-button type="primary" @click="download">下载</el-button></template>
325
+ </YsImageViewer>
312
326
  <YsMediaPlayer v-else-if="kind === 'video' && url" :key="url" :src="url" type="video" />
313
327
  <div v-else-if="kind === 'audio' && url" class="ys-file-preview__audio-wrap">
314
328
  <YsMediaPlayer :key="url" :src="url" type="audio" :title="file.name" />
@@ -458,7 +472,6 @@ function openInTab() {
458
472
  .ys-file-preview__pane {
459
473
  justify-content: center;
460
474
  }
461
- .ys-file-preview__image-wrap,
462
475
  .ys-file-preview__audio-wrap {
463
476
  display: flex;
464
477
  align-items: center;
@@ -466,15 +479,6 @@ function openInTab() {
466
479
  padding: 16px;
467
480
  overflow: auto;
468
481
  }
469
- .ys-file-preview__image {
470
- max-width: 100%;
471
- max-height: 100%;
472
- object-fit: contain;
473
- border-radius: 2px;
474
- box-shadow: var(--ys-shadow-paper);
475
- /* 透明图片垫一层浅色棋盘格,透明区域看得出来。 */
476
- background: repeating-conic-gradient(color-mix(in srgb, var(--ys-color-text-3) 14%, transparent) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
477
- }
478
482
  .ys-file-preview__text {
479
483
  display: flex;
480
484
  flex-direction: column;