niuma-ui 1.0.0
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/CHANGELOG.md +29 -0
- package/LICENSE +202 -0
- package/NOTICE +25 -0
- package/README.en.md +99 -0
- package/README.md +161 -0
- package/package.json +106 -0
- package/src/__tests__/RsBadge.spec.ts +40 -0
- package/src/__tests__/RsBreadcrumb.spec.ts +172 -0
- package/src/__tests__/RsButton.spec.ts +108 -0
- package/src/__tests__/RsCalendarGrid.spec.ts +82 -0
- package/src/__tests__/RsCard.spec.ts +97 -0
- package/src/__tests__/RsCheckbox.spec.ts +36 -0
- package/src/__tests__/RsCodeEditor.spec.ts +111 -0
- package/src/__tests__/RsConfirmDialog.spec.ts +158 -0
- package/src/__tests__/RsContainer.spec.ts +89 -0
- package/src/__tests__/RsContextMenu.spec.ts +118 -0
- package/src/__tests__/RsDatePicker.spec.ts +88 -0
- package/src/__tests__/RsDateTimePicker.spec.ts +69 -0
- package/src/__tests__/RsDialog.spec.ts +404 -0
- package/src/__tests__/RsDrawer.spec.ts +145 -0
- package/src/__tests__/RsDropdown.spec.ts +135 -0
- package/src/__tests__/RsEmpty.spec.ts +99 -0
- package/src/__tests__/RsForm.spec.ts +173 -0
- package/src/__tests__/RsIcon.spec.ts +244 -0
- package/src/__tests__/RsInput.spec.ts +269 -0
- package/src/__tests__/RsInputNumber.spec.ts +118 -0
- package/src/__tests__/RsLabel.spec.ts +106 -0
- package/src/__tests__/RsLink.spec.ts +49 -0
- package/src/__tests__/RsLoading.spec.ts +84 -0
- package/src/__tests__/RsMarkdown.spec.ts +143 -0
- package/src/__tests__/RsMenu.spec.ts +119 -0
- package/src/__tests__/RsNewComponents.spec.ts +17 -0
- package/src/__tests__/RsPagination.spec.ts +158 -0
- package/src/__tests__/RsPopover.spec.ts +126 -0
- package/src/__tests__/RsScrollbar.spec.ts +53 -0
- package/src/__tests__/RsSelect.spec.ts +291 -0
- package/src/__tests__/RsSidebar.spec.ts +119 -0
- package/src/__tests__/RsSplitPane.spec.ts +177 -0
- package/src/__tests__/RsStatCard.spec.ts +79 -0
- package/src/__tests__/RsSteps.spec.ts +125 -0
- package/src/__tests__/RsTable.perf.spec.ts +103 -0
- package/src/__tests__/RsTable.spec.ts +1135 -0
- package/src/__tests__/RsTabs.spec.ts +328 -0
- package/src/__tests__/RsTerminal.spec.ts +218 -0
- package/src/__tests__/RsTimePicker.spec.ts +77 -0
- package/src/__tests__/RsToaster.spec.ts +95 -0
- package/src/__tests__/RsToolbar.spec.ts +75 -0
- package/src/__tests__/RsTooltip.spec.ts +111 -0
- package/src/__tests__/RsTree.spec.ts +572 -0
- package/src/__tests__/RsUpload.spec.ts +160 -0
- package/src/__tests__/RsVirtualList.spec.ts +77 -0
- package/src/__tests__/date-picker-utils.spec.ts +70 -0
- package/src/__tests__/dialog-viewport.spec.ts +38 -0
- package/src/__tests__/iso-local-datetime.spec.ts +58 -0
- package/src/__tests__/rs-clipboard.spec.ts +142 -0
- package/src/__tests__/setup.ts +12 -0
- package/src/__tests__/split-pane-utils.spec.ts +136 -0
- package/src/__tests__/table-drag.spec.ts +35 -0
- package/src/__tests__/table-edit-utils.spec.ts +194 -0
- package/src/__tests__/table-utils.spec.ts +286 -0
- package/src/__tests__/theme.spec.ts +22 -0
- package/src/__tests__/tree-utils.spec.ts +234 -0
- package/src/__tests__/useTableCellTooltip.spec.ts +101 -0
- package/src/components/RsAvatar.vue +115 -0
- package/src/components/RsBadge.vue +59 -0
- package/src/components/RsBreadcrumb.vue +65 -0
- package/src/components/RsBreadcrumbItems.vue +36 -0
- package/src/components/RsButton.vue +393 -0
- package/src/components/RsCalendarGrid.vue +284 -0
- package/src/components/RsCard.vue +237 -0
- package/src/components/RsCheckbox.vue +189 -0
- package/src/components/RsCodeBlock.vue +278 -0
- package/src/components/RsCodeEditor.vue +597 -0
- package/src/components/RsConfigProvider.vue +92 -0
- package/src/components/RsConfirmDialog.vue +178 -0
- package/src/components/RsContainer.vue +235 -0
- package/src/components/RsContextMenu.vue +238 -0
- package/src/components/RsContextMenuItems.vue +77 -0
- package/src/components/RsDatePicker.vue +756 -0
- package/src/components/RsDateTimePicker.vue +42 -0
- package/src/components/RsDialog.vue +486 -0
- package/src/components/RsDrawer.vue +175 -0
- package/src/components/RsDropdown.vue +252 -0
- package/src/components/RsDropdownItems.vue +90 -0
- package/src/components/RsEmpty.vue +107 -0
- package/src/components/RsForm.vue +131 -0
- package/src/components/RsIcon.vue +104 -0
- package/src/components/RsInput.vue +1101 -0
- package/src/components/RsInputNumber.vue +532 -0
- package/src/components/RsLabel.vue +54 -0
- package/src/components/RsLink.vue +106 -0
- package/src/components/RsLoading.vue +171 -0
- package/src/components/RsMarkdown.vue +329 -0
- package/src/components/RsMenu.vue +256 -0
- package/src/components/RsMenuItems.vue +125 -0
- package/src/components/RsMonacoEditor.vue +541 -0
- package/src/components/RsPagination.vue +184 -0
- package/src/components/RsPopover.vue +77 -0
- package/src/components/RsProseEditor.vue +160 -0
- package/src/components/RsScrollbar.vue +171 -0
- package/src/components/RsSelect.vue +1045 -0
- package/src/components/RsSidebar.vue +121 -0
- package/src/components/RsSidebarGroup.vue +32 -0
- package/src/components/RsSidebarItem.vue +72 -0
- package/src/components/RsSplitPane.vue +619 -0
- package/src/components/RsStatCard.vue +85 -0
- package/src/components/RsSteps.vue +138 -0
- package/src/components/RsTable.vue +2664 -0
- package/src/components/RsTableColgroup.vue +17 -0
- package/src/components/RsTableHeaderRow.vue +30 -0
- package/src/components/RsTabs.vue +951 -0
- package/src/components/RsTerminal.vue +697 -0
- package/src/components/RsTimePicker.vue +554 -0
- package/src/components/RsTimePickerColumns.vue +226 -0
- package/src/components/RsToaster.vue +396 -0
- package/src/components/RsToolbar.vue +135 -0
- package/src/components/RsTooltip.vue +142 -0
- package/src/components/RsTooltipProvider.vue +20 -0
- package/src/components/RsTree.vue +1248 -0
- package/src/components/RsUpload.vue +279 -0
- package/src/components/RsVirtualList.vue +217 -0
- package/src/components/avatar-utils.ts +19 -0
- package/src/components/breadcrumb-utils.ts +19 -0
- package/src/components/class-utils.ts +29 -0
- package/src/components/code-editor-utils.ts +106 -0
- package/src/components/code-mirror-completion.ts +40 -0
- package/src/components/code-mirror-diagnostics.ts +52 -0
- package/src/components/code-mirror-ghost.ts +158 -0
- package/src/components/code-mirror-inline-edit.ts +55 -0
- package/src/components/code-mirror-intel.ts +81 -0
- package/src/components/code-mirror-lang.ts +128 -0
- package/src/components/context-menu-utils.ts +20 -0
- package/src/components/date-picker-utils.ts +284 -0
- package/src/components/date-range-validation.ts +29 -0
- package/src/components/date-validation.ts +38 -0
- package/src/components/dialog-viewport.ts +48 -0
- package/src/components/dialog-window.ts +253 -0
- package/src/components/dropdown-utils.ts +31 -0
- package/src/components/form-utils.ts +77 -0
- package/src/components/input-number-utils.ts +128 -0
- package/src/components/input-rules.ts +84 -0
- package/src/components/loading-utils.ts +8 -0
- package/src/components/markdown-utils.ts +126 -0
- package/src/components/menu-utils.ts +48 -0
- package/src/components/overlay-utils.ts +47 -0
- package/src/components/pagination-utils.ts +38 -0
- package/src/components/popover-utils.ts +8 -0
- package/src/components/reka.ts +106 -0
- package/src/components/resolve-radius.ts +22 -0
- package/src/components/resolve-size.ts +29 -0
- package/src/components/scrollbar-utils.ts +10 -0
- package/src/components/select-utils.ts +72 -0
- package/src/components/split-pane-utils.ts +187 -0
- package/src/components/steps-utils.ts +22 -0
- package/src/components/table/RsTableBodyRow.vue +287 -0
- package/src/components/table/RsTableCell.vue +239 -0
- package/src/components/table/RsTableCellContent.ts +18 -0
- package/src/components/table/RsTableCellEditor.vue +351 -0
- package/src/components/table/RsTableEditGutter.vue +54 -0
- package/src/components/table/RsTableHeaderFilter.vue +107 -0
- package/src/components/table/RsTableRowStatus.vue +69 -0
- package/src/components/table/rs-table.css +1141 -0
- package/src/components/table/table-context-menu.ts +53 -0
- package/src/components/table/table-edit-utils.ts +496 -0
- package/src/components/table/table-keys.ts +12 -0
- package/src/components/table-drag.ts +215 -0
- package/src/components/table-utils.ts +950 -0
- package/src/components/tabs-utils.ts +107 -0
- package/src/components/terminal-utils.ts +301 -0
- package/src/components/terminal-wheel.ts +49 -0
- package/src/components/time-picker-utils.ts +167 -0
- package/src/components/time-range-validation.ts +23 -0
- package/src/components/time-validation.ts +20 -0
- package/src/components/tree-utils.ts +518 -0
- package/src/components/upload-utils.ts +55 -0
- package/src/components/virtual-list-utils.ts +17 -0
- package/src/composables/useClickOutside.ts +22 -0
- package/src/composables/useRsConfig.ts +91 -0
- package/src/composables/useRsI18n.ts +22 -0
- package/src/composables/useRsTabsNav.ts +187 -0
- package/src/composables/useRsToast.ts +48 -0
- package/src/composables/useTableCellTooltip.ts +239 -0
- package/src/composables/useTableEdit.ts +271 -0
- package/src/composables/useTableRowHighlight.ts +50 -0
- package/src/dev/vite-codemirror-deps.ts +20 -0
- package/src/icons/custom/api.ts +54 -0
- package/src/icons/custom/clickhouse.ts +52 -0
- package/src/icons/custom/dameng.ts +83 -0
- package/src/icons/custom/ftp.ts +61 -0
- package/src/icons/custom/kingbase.ts +52 -0
- package/src/icons/custom/mongodb.ts +50 -0
- package/src/icons/custom/mysql.ts +51 -0
- package/src/icons/custom/oracle.ts +52 -0
- package/src/icons/custom/redis.ts +51 -0
- package/src/icons/custom/sqlite.ts +50 -0
- package/src/icons/custom/sqlserver.ts +52 -0
- package/src/icons/custom/vastbase.ts +57 -0
- package/src/icons/lucide.ts +78 -0
- package/src/icons/registry.ts +35 -0
- package/src/index.ts +425 -0
- package/src/lib/iso-local-datetime.ts +152 -0
- package/src/lib/rs-dayjs.ts +56 -0
- package/src/locale/messages.ts +362 -0
- package/src/locale/types.ts +5 -0
- package/src/monaco/debug-decorations.css +20 -0
- package/src/monaco/debug-decorations.ts +70 -0
- package/src/monaco/index.ts +22 -0
- package/src/monaco/languages/index.ts +21 -0
- package/src/monaco/languages/mongodb-shell.ts +125 -0
- package/src/monaco/languages/types.ts +55 -0
- package/src/monaco/setup.ts +101 -0
- package/src/styles.css +1040 -0
- package/src/theme/apply.ts +12 -0
- package/src/theme/brand.example.css +37 -0
- package/src/theme/presets.ts +69 -0
- package/src/theme/types.ts +81 -0
- package/src/utils/rs-clipboard.ts +272 -0
- package/src/vite-env.d.ts +7 -0
- package/vite-plugins/monaco-zh-nls.ts +101 -0
- package/vite-plugins/silence-antlr-parse-console.ts +29 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MongoDB 官方品牌图形路径(Simple Icons 项目收录,CC0 1.0 授权,可自由商用且无需署名)。
|
|
5
|
+
* 来源:https://github.com/simple-icons/simple-icons/blob/develop/icons/mongodb.svg
|
|
6
|
+
*/
|
|
7
|
+
const MONGODB_MARK_PATH =
|
|
8
|
+
'M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* NiuMa MongoDB —— 官方品牌 mark,单色填充,默认走 MongoDB 绿并随主题明暗自动调整对比度。
|
|
12
|
+
*/
|
|
13
|
+
export const MongodbIcon = defineComponent({
|
|
14
|
+
name: 'MongodbIcon',
|
|
15
|
+
inheritAttrs: false,
|
|
16
|
+
props: {
|
|
17
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
18
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
19
|
+
color: { type: String, default: 'currentColor' },
|
|
20
|
+
},
|
|
21
|
+
setup(props, { attrs }) {
|
|
22
|
+
return () => {
|
|
23
|
+
const size = Number(props.size) || 24
|
|
24
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
25
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
26
|
+
const style: Record<string, string> = {
|
|
27
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
28
|
+
? (attrStyle as Record<string, string>)
|
|
29
|
+
: {}),
|
|
30
|
+
...(accent ? { '--rs-icon-mongodb-accent': accent } : {}),
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return h(
|
|
34
|
+
'svg',
|
|
35
|
+
{
|
|
36
|
+
...restAttrs,
|
|
37
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
38
|
+
width: size,
|
|
39
|
+
height: size,
|
|
40
|
+
viewBox: '0 0 24 24',
|
|
41
|
+
fill: 'none',
|
|
42
|
+
overflow: 'visible',
|
|
43
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
44
|
+
class: ['lucide', 'lucide-mongodb-icon', attrClass].filter(Boolean),
|
|
45
|
+
},
|
|
46
|
+
[h('path', { class: 'mongodb-icon__mark', d: MONGODB_MARK_PATH })],
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
})
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MySQL 海豚品牌 mark(仅图形,不含 MySQL 字样)。
|
|
5
|
+
* 从 Simple Icons mysql.svg(CC0 1.0)中拆出海豚子路径并归一到 24×24。
|
|
6
|
+
* 来源:https://github.com/simple-icons/simple-icons/blob/develop/icons/mysql.svg
|
|
7
|
+
*/
|
|
8
|
+
const MYSQL_MARK_PATH =
|
|
9
|
+
'M6.51 5.69C6.27 5.69 6.1 5.72 5.93 5.76V5.79H5.96C6.08 6.01 6.27 6.17 6.41 6.36 6.53 6.59 6.62 6.81 6.74 7.04L6.77 7C6.96 6.87 7.06 6.64 7.06 6.3 6.98 6.21 6.96 6.11 6.89 6.01 6.81 5.87 6.63 5.8 6.51 5.69ZM20.84 17.9C19.72 17.87 18.85 17.99 18.12 18.3 17.91 18.38 17.57 18.38 17.54 18.65 17.66 18.76 17.67 18.94 17.77 19.1 17.94 19.38 18.23 19.76 18.5 19.95 18.79 20.19 19.09 20.41 19.4 20.61 19.94 20.94 20.56 21.14 21.1 21.48 21.4 21.68 21.71 21.93 22.02 22.14 22.18 22.24 22.28 22.43 22.47 22.5V22.46C22.38 22.33 22.35 22.15 22.25 22.01 22.11 21.87 21.97 21.74 21.83 21.6A6.77 6.77 0 0 0 20.37 20.18C19.92 19.88 18.94 19.45 18.75 18.93L18.73 18.9C19.03 18.88 19.4 18.77 19.69 18.68 20.17 18.56 20.61 18.58 21.1 18.46 21.32 18.4 21.55 18.33 21.77 18.26V18.13C21.52 17.88 21.33 17.54 21.07 17.3A18.64 18.64 0 0 0 18.75 15.57C18.31 15.29 17.75 15.11 17.29 14.87 17.12 14.79 16.84 14.75 16.74 14.61 16.49 14.3 16.34 13.89 16.16 13.53A37.18 37.18 0 0 1 15.01 11.08C14.76 10.53 14.61 9.98 14.3 9.48 12.85 7.09 11.28 5.64 8.86 4.22 8.34 3.93 7.72 3.8 7.06 3.65 6.71 3.63 6.36 3.61 6.01 3.59 5.78 3.49 5.56 3.23 5.36 3.1 4.56 2.59 2.49 1.5 1.91 2.95 1.53 3.86 2.47 4.76 2.79 5.22 3.03 5.54 3.34 5.91 3.51 6.27 3.61 6.51 3.63 6.76 3.73 7.02 3.95 7.64 4.17 8.33 4.46 8.9 4.61 9.2 4.78 9.51 4.98 9.77 5.09 9.93 5.29 10 5.33 10.25 5.13 10.54 5.12 10.95 5.01 11.3 4.5 12.89 4.7 14.86 5.42 16.03 5.64 16.38 6.18 17.15 6.89 16.85 7.52 16.6 7.38 15.8 7.57 15.1 7.61 14.93 7.58 14.82 7.67 14.71V14.74C7.86 15.13 8.06 15.51 8.24 15.9 8.68 16.59 9.43 17.31 10.06 17.79 10.4 18.04 10.67 18.48 11.09 18.63V18.59H11.06C10.97 18.47 10.85 18.41 10.73 18.31A7.24 7.24 0 0 1 10 17.47 18.41 18.41 0 0 1 8.43 14.91C8.2 14.47 8 13.99 7.82 13.56 7.73 13.39 7.73 13.14 7.59 13.05 7.38 13.36 7.07 13.63 6.92 14.01 6.65 14.61 6.63 15.35 6.53 16.13 6.47 16.14 6.5 16.13 6.47 16.16 6.02 16.05 5.87 15.58 5.7 15.19 5.28 14.19 5.21 12.59 5.57 11.44 5.67 11.14 6.09 10.22 5.92 9.93 5.83 9.67 5.56 9.51 5.4 9.3A5.21 5.21 0 0 1 4.9 8.4C4.56 7.61 4.39 6.74 4.03 5.96 3.86 5.59 3.57 5.21 3.33 4.88 3.06 4.5 2.77 4.23 2.55 3.79 2.48 3.63 2.38 3.38 2.5 3.21 2.53 3.1 2.58 3.05 2.69 3.02 2.88 2.87 3.4 3.07 3.58 3.15 4.1 3.36 4.54 3.56 4.97 3.85 5.17 3.99 5.38 4.26 5.63 4.33H5.93C6.38 4.43 6.88 4.36 7.3 4.48 8.05 4.72 8.72 5.07 9.33 5.45A12.51 12.51 0 0 1 13.71 10.25C13.88 10.58 13.95 10.87 14.1 11.21 14.4 11.9 14.76 12.6 15.06 13.27 15.35 13.94 15.64 14.61 16.06 15.16 16.27 15.45 17.12 15.61 17.49 15.76 17.77 15.89 18.21 16 18.46 16.16 18.94 16.45 19.41 16.79 19.87 17.11 20.1 17.27 20.8 17.62 20.84 17.9Z'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* NiuMa MySQL —— 海豚品牌 mark,单色填充,默认走 MySQL 蓝并随主题明暗自动调整对比度。
|
|
13
|
+
*/
|
|
14
|
+
export const MysqlIcon = defineComponent({
|
|
15
|
+
name: 'MysqlIcon',
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
props: {
|
|
18
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
19
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
20
|
+
color: { type: String, default: 'currentColor' },
|
|
21
|
+
},
|
|
22
|
+
setup(props, { attrs }) {
|
|
23
|
+
return () => {
|
|
24
|
+
const size = Number(props.size) || 24
|
|
25
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
26
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
27
|
+
const style: Record<string, string> = {
|
|
28
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
29
|
+
? (attrStyle as Record<string, string>)
|
|
30
|
+
: {}),
|
|
31
|
+
...(accent ? { '--rs-icon-mysql-accent': accent } : {}),
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return h(
|
|
35
|
+
'svg',
|
|
36
|
+
{
|
|
37
|
+
...restAttrs,
|
|
38
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
39
|
+
width: size,
|
|
40
|
+
height: size,
|
|
41
|
+
viewBox: '0 0 24 24',
|
|
42
|
+
fill: 'none',
|
|
43
|
+
overflow: 'visible',
|
|
44
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
45
|
+
class: ['lucide', 'lucide-mysql-icon', attrClass].filter(Boolean),
|
|
46
|
+
},
|
|
47
|
+
[h('path', { class: 'mysql-icon__mark', d: MYSQL_MARK_PATH })],
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
})
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Oracle 官方品牌 oval mark(双环跑道形,不含 Oracle 字样)。
|
|
5
|
+
* 路径来自 Simple Icons 历史收录的 oracle.svg(CC0 1.0),已归一到 24×24。
|
|
6
|
+
* 来源:https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/oracle.svg
|
|
7
|
+
* 品牌色:Oracle 红 #F80000。
|
|
8
|
+
*/
|
|
9
|
+
const ORACLE_MARK_PATH =
|
|
10
|
+
'M16.412 4.412h-8.82a7.588 7.588 0 0 0-.008 15.176h8.828a7.588 7.588 0 0 0 0-15.176zm-.193 12.502H7.786a4.915 4.915 0 0 1 0-9.828h8.433a4.914 4.914 0 1 1 0 9.828z'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* NiuMa Oracle —— 官方品牌 mark,单色填充,默认走 Oracle 红并随主题明暗自动调整对比度。
|
|
14
|
+
*/
|
|
15
|
+
export const OracleIcon = defineComponent({
|
|
16
|
+
name: 'OracleIcon',
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
props: {
|
|
19
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
20
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
21
|
+
color: { type: String, default: 'currentColor' },
|
|
22
|
+
},
|
|
23
|
+
setup(props, { attrs }) {
|
|
24
|
+
return () => {
|
|
25
|
+
const size = Number(props.size) || 24
|
|
26
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
27
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
28
|
+
const style: Record<string, string> = {
|
|
29
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
30
|
+
? (attrStyle as Record<string, string>)
|
|
31
|
+
: {}),
|
|
32
|
+
...(accent ? { '--rs-icon-oracle-accent': accent } : {}),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return h(
|
|
36
|
+
'svg',
|
|
37
|
+
{
|
|
38
|
+
...restAttrs,
|
|
39
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
40
|
+
width: size,
|
|
41
|
+
height: size,
|
|
42
|
+
viewBox: '0 0 24 24',
|
|
43
|
+
fill: 'none',
|
|
44
|
+
overflow: 'visible',
|
|
45
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
46
|
+
class: ['lucide', 'lucide-oracle-icon', attrClass].filter(Boolean),
|
|
47
|
+
},
|
|
48
|
+
[h('path', { class: 'oracle-icon__mark', d: ORACLE_MARK_PATH })],
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
})
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Redis 官方品牌图形路径(Simple Icons 项目收录,CC0 1.0 授权,可自由商用且无需署名)。
|
|
5
|
+
* 来源:https://github.com/simple-icons/simple-icons/blob/develop/icons/redis.svg
|
|
6
|
+
*/
|
|
7
|
+
const REDIS_MARK_PATH =
|
|
8
|
+
'M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* NiuMa Redis —— 官方品牌 mark,单色填充,默认走 Redis 红并随主题明暗自动调整对比度
|
|
12
|
+
* (比通用的 `server` 图标更能一眼识别协议类型)。
|
|
13
|
+
*/
|
|
14
|
+
export const RedisIcon = defineComponent({
|
|
15
|
+
name: 'RedisIcon',
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
props: {
|
|
18
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
19
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
20
|
+
color: { type: String, default: 'currentColor' },
|
|
21
|
+
},
|
|
22
|
+
setup(props, { attrs }) {
|
|
23
|
+
return () => {
|
|
24
|
+
const size = Number(props.size) || 24
|
|
25
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
26
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
27
|
+
const style: Record<string, string> = {
|
|
28
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
29
|
+
? (attrStyle as Record<string, string>)
|
|
30
|
+
: {}),
|
|
31
|
+
...(accent ? { '--rs-icon-redis-accent': accent } : {}),
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return h(
|
|
35
|
+
'svg',
|
|
36
|
+
{
|
|
37
|
+
...restAttrs,
|
|
38
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
39
|
+
width: size,
|
|
40
|
+
height: size,
|
|
41
|
+
viewBox: '0 0 24 24',
|
|
42
|
+
fill: 'none',
|
|
43
|
+
overflow: 'visible',
|
|
44
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
45
|
+
class: ['lucide', 'lucide-redis-icon', attrClass].filter(Boolean),
|
|
46
|
+
},
|
|
47
|
+
[h('path', { class: 'redis-icon__mark', d: REDIS_MARK_PATH })],
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SQLite 官方品牌图形路径(Simple Icons 项目收录,CC0 1.0 授权,可自由商用且无需署名)。
|
|
5
|
+
* 来源:https://github.com/simple-icons/simple-icons/blob/develop/icons/sqlite.svg
|
|
6
|
+
*/
|
|
7
|
+
const SQLITE_MARK_PATH =
|
|
8
|
+
'M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* NiuMa SQLite —— 官方品牌 mark,单色填充,默认走 SQLite 蓝并随主题明暗自动调整对比度。
|
|
12
|
+
*/
|
|
13
|
+
export const SqliteIcon = defineComponent({
|
|
14
|
+
name: 'SqliteIcon',
|
|
15
|
+
inheritAttrs: false,
|
|
16
|
+
props: {
|
|
17
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
18
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
19
|
+
color: { type: String, default: 'currentColor' },
|
|
20
|
+
},
|
|
21
|
+
setup(props, { attrs }) {
|
|
22
|
+
return () => {
|
|
23
|
+
const size = Number(props.size) || 24
|
|
24
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
25
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
26
|
+
const style: Record<string, string> = {
|
|
27
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
28
|
+
? (attrStyle as Record<string, string>)
|
|
29
|
+
: {}),
|
|
30
|
+
...(accent ? { '--rs-icon-sqlite-accent': accent } : {}),
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return h(
|
|
34
|
+
'svg',
|
|
35
|
+
{
|
|
36
|
+
...restAttrs,
|
|
37
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
38
|
+
width: size,
|
|
39
|
+
height: size,
|
|
40
|
+
viewBox: '0 0 24 24',
|
|
41
|
+
fill: 'none',
|
|
42
|
+
overflow: 'visible',
|
|
43
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
44
|
+
class: ['lucide', 'lucide-sqlite-icon', attrClass].filter(Boolean),
|
|
45
|
+
},
|
|
46
|
+
[h('path', { class: 'sqlite-icon__mark', d: SQLITE_MARK_PATH })],
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
})
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Microsoft SQL Server 官方品牌 mark(经典火焰/翼形,不含字样)。
|
|
5
|
+
* 路径来自 Simple Icons 历史收录的 microsoftsqlserver.svg(CC0 1.0),已归一到 24×24。
|
|
6
|
+
* 来源:https://cdn.jsdelivr.net/npm/simple-icons@v11/icons/microsoftsqlserver.svg
|
|
7
|
+
* 品牌色:SQL Server 红 #CC2927。
|
|
8
|
+
*/
|
|
9
|
+
const SQLSERVER_MARK_PATH =
|
|
10
|
+
'M4.724 2.505s-.08.127-.004.315c.046.116.186.256.34.404 0 0 1.615 1.576 1.813 1.804.895 1.033 1.284 2.05 1.32 3.453.022.9-.151 1.692-.573 2.613-.756 1.649-2.35 3.468-4.81 5.49l.36-.12c.233-.173.548-.359 1.292-.766 1.713-.936 3.636-1.798 5.999-2.686 3.399-1.277 8.99-2.776 12.172-3.263l.331-.051-.05-.08c-.292-.452-.49-.731-.73-1.027-.697-.863-1.542-1.567-2.577-2.146-1.422-.797-3.267-1.416-5.6-1.88a67.93 67.93 0 00-2.191-.375 209.29 209.29 0 01-3.924-.64c-.425-.075-1.06-.181-1.481-.272a9.404 9.404 0 01-.961-.258c-.268-.105-.645-.207-.726-.515zm.936.909c.003-.002.063.017.137.042.136.046.316.1.526.159.146.04.307.084.479.127.218.056.399.104.401.107.024.027.391 1.198.516 1.647.048.172.084.315.081.318a.789.789 0 01-.09-.14c-.424-.746-1.097-1.505-1.874-2.116a3.104 3.104 0 01-.176-.144zm1.79.494c.018-.001.099.012.195.034.619.136 1.725.35 2.435.47.119.02.216.04.216.047a.348.348 0 01-.098.062c-.119.06-.602.349-.763.457-.403.27-.766.559-1.03.821a5.4 5.4 0 01-.197.192c-.003 0-.022-.062-.041-.137a12.09 12.09 0 00-.65-1.779 1.801 1.801 0 01-.071-.165c0-.001 0-.002.004-.002zm3.147.598c.02.007.06.13.129.404a6.05 6.05 0 01.153 1.977l-.012.038-.187-.06c-.388-.124-1.02-.31-1.562-.46a6.625 6.625 0 01-.56-.17c0-.022.449-.471.642-.642.369-.326 1.362-1.098 1.397-1.087zm.25.036c.011-.01 1.504.248 2.182.378.506.097 1.237.25 1.281.269.022.008-.054.05-.297.16-.96.432-1.672.82-2.38 1.293-.186.124-.341.226-.344.226-.004 0-.006-.104-.006-.23 0-.69-.139-1.387-.391-1.976a.688.688 0 01-.045-.12zm3.86.764c.011.011-.038.306-.08.48-.132.54-.482 1.344-.914 2.099a2.26 2.26 0 01-.152.246 1.499 1.499 0 01-.219-.115c-.422-.247-.9-.48-1.425-.697a4.588 4.588 0 01-.278-.12c-.024-.022 1.143-.795 1.762-1.166.495-.297 1.292-.741 1.306-.727zm.276.043c.033 0 .695.18 1.037.283.853.255 1.837.614 2.475.904l.265.12-.187.043c-1.561.36-2.9.773-4.188 1.296-.107.044-.2.08-.207.08a.911.911 0 01.075-.185c.388-.823.638-1.687.703-2.42.006-.067.018-.121.027-.121zm-6.58 1.512c.01-.01.514.108.789.185.413.116 1.292.41 1.292.433 0 .004-.097.089-.215.188-.475.397-.934.813-1.483 1.343a5.27 5.27 0 01-.308.285c-.007 0-.01-.023-.006-.05.083-.611.065-1.395-.05-2.193a1.29 1.29 0 01-.02-.19zm10.61.01c.007.008-.234.385-.384.6-.22.314-.537.726-1.261 1.637l-.954 1.202a9.418 9.418 0 01-.269.333c-.003 0-.05-.066-.103-.146a7.584 7.584 0 00-1.47-1.625 9.59 9.59 0 00-.27-.218.427.427 0 01-.074-.063c0-.01.617-.274 1.088-.466a37.02 37.02 0 012.778-.99c.442-.135.912-.27.919-.264zm.278.073a.93.93 0 01.207.1 12.274 12.274 0 012.428 1.824c.194.19.667.683.66.687l-.363.029c-1.53.115-3.486.44-5.37.893-.128.03-.238.056-.246.056-.007 0 .133-.14.311-.312 1.107-1.063 1.611-1.734 2.205-2.934.088-.178.163-.333.166-.342h.002zm-8.088.83c.051.01.523.23.879.408.325.163.818.426.843.449.003.003-.17.093-.386.201-.683.342-1.268.664-1.878 1.037-.175.107-.32.194-.325.194-.015 0-.01-.013.088-.191a7.702 7.702 0 00.738-2.002c.014-.062.03-.1.041-.097zm-.475.084c.01.01-.112.46-.19.7a9.092 9.092 0 01-.835 1.808l-.09.147-.203-.197a2.671 2.671 0 00-.676-.5 1.009 1.009 0 01-.176-.102c0-.03.62-.593 1.098-.998.343-.29 1.064-.867 1.072-.858zm2.888 1.188l.177.115c.407.264.888.619 1.255.924.206.172.605.53.687.616l.044.047-.294.082a53.8 53.8 0 00-4.45 1.424c-.167.061-.31.112-.32.112-.021 0-.042.019.333-.326.96-.883 1.807-1.856 2.44-2.802zm-.759.19c.009.009-.492.71-.789 1.106-.356.473-.99 1.265-1.426 1.78a8.769 8.769 0 01-.346.397c-.01.003-.015-.05-.016-.133 0-.44-.112-.91-.308-1.308-.083-.168-.097-.208-.08-.224.068-.062 1.127-.666 1.794-1.023.459-.246 1.163-.604 1.171-.595zm-4.59 1.125a3.988 3.988 0 01.812.518c.008.005-.087.083-.21.172-.345.249-.87.644-1.173.886-.32.255-.331.263-.295.207.24-.367.36-.574.486-.84.113-.236.224-.516.304-.76a.675.675 0 01.077-.183zm1.223.96c.017-.003.04.028.139.175.207.31.366.722.407 1.058l.008.073-.497.192c-.89.346-1.711.687-2.266.94-.155.072-.428.202-.607.292-.179.09-.325.16-.325.156 0-.004.112-.089.25-.188 1.087-.79 2.025-1.654 2.732-2.519.075-.092.144-.172.153-.178a.016.016 0 01.006-.002zm-.564.14c.015.014-.401.484-.681.77-.7.715-1.396 1.275-2.256 1.821-.108.069-.206.13-.22.138-.023.014.008-.022.386-.434.238-.259.42-.474.628-.743.136-.177.162-.202.362-.346.537-.388 1.767-1.221 1.781-1.207zM9.925 0c-.08-.01-1.371.455-2.2.791-1.123.457-1.996.894-2.534 1.272-.2.14-.452.393-.488.49a.356.356 0 00-.021.123l.488.46 1.158.37L9.087 4l3.153.542.032-.27-.028-.005-.415-.066-.085-.148a27.702 27.702 0 01-1.177-2.325 12.264 12.264 0 01-.53-1.465C9.969.02 9.962.005 9.925 0zm-.061.186h.005c.003.003.017.105.032.225.062.508.176 1 .354 1.53.134.4.136.377-.024.332-.37-.103-2.032-.388-3.234-.555a8.796 8.796 0 01-.357-.053c-.015-.015.867-.477 1.258-.66.501-.232 1.867-.8 1.966-.819zM6.362 1.814l.141.048c.772.262 2.706.632 3.775.72.12.01.222.021.225.024.003.003-.1.058-.228.122-.515.258-1.083.573-1.476.819-.115.072-.22.13-.235.129a4.868 4.868 0 01-.17-.027l-.144-.023-.365-.355c-.641-.62-1.141-1.1-1.335-1.28zm-.143.114l.511.638c.282.35.564.699.626.774.063.075.111.138.108.14-.014.011-.74-.13-1.125-.219a8.532 8.532 0 01-.803-.212l-.2-.064.001-.049c.003-.245.312-.607.836-.976zm4.352.869c.015.001.032.032.077.131.124.272.51 1.008.603 1.15.03.047.08.05-.433-.033-1.23-.198-1.629-.265-1.629-.273a.36.36 0 01.083-.054 7.13 7.13 0 001.107-.767l.175-.147c.006-.005.012-.008.017-.007zm4.309 8.408l-4.808 1.568-4.18 1.846-1.17.31c-.298.282-.613.568-.948.86-.37.321-.716.612-.98.822a7.46 7.46 0 00-.953.945c-.332.414-.592.854-.704 1.193-.2.61-.103 1.228.285 1.798.495.728 1.48 1.468 2.625 1.972.585.256 1.57.588 2.31.774 1.233.312 3.614.65 4.926.7.266.01.62.01.637-.002.028-.019.233-.405.47-.89.806-1.646 1.389-3.19 1.703-4.508.19-.799.338-1.863.434-3.125.027-.354.037-1.533.016-1.934a13.564 13.564 0 00-.183-1.706.435.435 0 01-.012-.15c.014-.01.059-.025.65-.197zm-1.1.645c.045 0 .16 1.114.191 1.82.006.151.005.247-.004.247-.028 0-.615-.345-1.032-.606a28.716 28.716 0 01-1.162-.772c-.035-.028-.031-.029.266-.131.505-.174 1.704-.558 1.742-.558zm-2.448.803c.03 0 .115.047.315.172.75.47 1.766 1.035 2.2 1.225.136.06.151.036-.16.247-.662.45-1.486.892-2.497 1.342a7.59 7.59 0 01-.331.142.989.989 0 01.043-.2c.245-.905.383-1.82.387-2.554.002-.362.002-.364.037-.373h.006zm-.504.193c.021.022.006.834-.02 1.056a9.206 9.206 0 01-.418 1.837c-.014.017-.511-.468-.676-.66a4.918 4.918 0 01-.669-.973c-.082-.162-.214-.484-.202-.493.056-.04 1.971-.78 1.985-.767zm-2.375.936c.004 0 .008.001.01.004a.881.881 0 01.056.131c.116.315.376.782.602 1.08a6.247 6.247 0 001.017 1.06c.023.02.03.016-.562.24a48.53 48.53 0 01-2.294.8c-.327.106-.604.195-.615.2-.033.011-.023-.009.073-.158.427-.666 1.073-1.97 1.435-2.892.062-.16.122-.32.133-.356.015-.052.031-.07.08-.092a.149.149 0 01.065-.017zm-.728.3c.01.009-.174.398-.356.751-.351.686-.739 1.361-1.253 2.185l-.182.288c-.018.027-.026.018-.082-.094a3.307 3.307 0 01-.28-.842 3.39 3.39 0 01.02-1.083c.047-.227.045-.222.152-.276.462-.237 1.966-.942 1.981-.929zm6.268.255v.154a20.106 20.106 0 01-.255 2.992 9.362 9.362 0 01-1.898-.782c-.354-.194-.865-.507-.85-.522.003-.004.154-.083.334-.177.714-.37 1.395-.77 1.988-1.166.222-.148.555-.389.629-.454zM4.981 15.41c.015 0 .011.028-.012.161a4.137 4.137 0 00-.041.39c-.03.532.057.924.32 1.46.074.15.132.274.129.276-.027.023-2.43.726-3.186.933l-.435.12c-.027.008-.029.002-.02-.06.083-.533.49-1.232 1.058-1.82.378-.39.68-.622 1.195-.915a30.782 30.782 0 01.992-.545zm5.669 1.015c.002-.002.091.045.197.107.777.449 1.86.87 2.783 1.081l.084.02-.115.063c-.482.268-2.071.929-3.694 1.537a68.82 68.82 0 00-.513.194.314.314 0 01-.082.027c0-.004.067-.132.149-.286.456-.852.91-1.887 1.144-2.605.023-.073.044-.135.047-.138zm-.578.19a1.39 1.39 0 01-.063.169 23.534 23.534 0 01-1.261 2.54 9.009 9.009 0 01-.252.433c-.005 0-.114-.066-.244-.145-.77-.472-1.452-1.052-1.9-1.617l-.064-.08.332-.091a23.616 23.616 0 003.19-1.103c.142-.06.26-.109.262-.106zm3.59 1.253c.001 0 .002.001.002.003 0 .08-.183.828-.336 1.37-.128.453-.236.808-.435 1.437a8.533 8.533 0 01-.168.504 15.004 15.004 0 01-3-.841 7.964 7.964 0 01-.639-.283c-.006-.007.213-.11.486-.23 1.655-.721 3.369-1.543 3.955-1.896a.432.432 0 01.135-.064zm-8.287.283c.009.009-.454.671-1.1 1.576l-.587.823c-.097.139-.245.358-.329.488l-.153.236-.162-.137c-.191-.16-.525-.501-.677-.69-.312-.389-.523-.798-.607-1.174-.038-.174-.04-.262-.003-.273a176.26 176.26 0 011.934-.455l1.3-.305c.209-.05.382-.09.384-.089zm.465.178l.117.131a6.763 6.763 0 001.706 1.394c.115.066.202.124.195.128a281.967 281.967 0 01-4.33 1.53.858.858 0 01-.072-.048l-.067-.048.105-.152c.34-.493.768-1.035 1.705-2.162zm2.9 2.073c.003-.003.165.054.362.128.473.177.844.292 1.347.418.617.155 1.51.31 2.038.354.08.006.122.016.11.024-.025.016-.56.194-.953.318a258.526 258.526 0 01-4.636 1.363c-.035.007-.157-.025-.157-.04 0-.009.087-.119.193-.246a22.027 22.027 0 001.476-1.984 56.9 56.9 0 01.22-.335zm-.642.018c.005.005-.253.418-.706 1.132-.192.301-.409.645-.483.762-.075.118-.184.298-.242.4l-.107.185-.054-.014c-.13-.035-1.049-.36-1.291-.456-.301-.12-.615-.264-.846-.389-.289-.156-.655-.388-.627-.397l1.105-.302c1.592-.434 2.473-.683 3.05-.864.109-.033.199-.059.2-.057zm4.523 1.061h.006c.015.038-.575 1.67-.79 2.188-.049.116-.066.145-.092.143a55.54 55.54 0 01-1.433-.2c-.906-.138-2.423-.403-2.806-.49l-.089-.02.543-.122c1.164-.262 1.723-.403 2.29-.577a16.544 16.544 0 002.138-.824c.113-.052.21-.093.233-.098Z'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* NiuMa SQL Server —— 官方品牌 mark,单色填充,默认走 SQL Server 红并随主题明暗自动调整对比度。
|
|
14
|
+
*/
|
|
15
|
+
export const SqlserverIcon = defineComponent({
|
|
16
|
+
name: 'SqlserverIcon',
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
props: {
|
|
19
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
20
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
21
|
+
color: { type: String, default: 'currentColor' },
|
|
22
|
+
},
|
|
23
|
+
setup(props, { attrs }) {
|
|
24
|
+
return () => {
|
|
25
|
+
const size = Number(props.size) || 24
|
|
26
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
27
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
28
|
+
const style: Record<string, string> = {
|
|
29
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
30
|
+
? (attrStyle as Record<string, string>)
|
|
31
|
+
: {}),
|
|
32
|
+
...(accent ? { '--rs-icon-sqlserver-accent': accent } : {}),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return h(
|
|
36
|
+
'svg',
|
|
37
|
+
{
|
|
38
|
+
...restAttrs,
|
|
39
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
40
|
+
width: size,
|
|
41
|
+
height: size,
|
|
42
|
+
viewBox: '0 0 24 24',
|
|
43
|
+
fill: 'none',
|
|
44
|
+
overflow: 'visible',
|
|
45
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
46
|
+
class: ['lucide', 'lucide-sqlserver-icon', attrClass].filter(Boolean),
|
|
47
|
+
},
|
|
48
|
+
[h('path', { class: 'sqlserver-icon__mark', d: SQLSERVER_MARK_PATH })],
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent, h, type PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 海量数据 Vastbase 官方品牌 mark 路径(官网 header logo 左侧图形拆出)。
|
|
5
|
+
* 来源:https://www.vastdata.com.cn/images/hd_logo.svg
|
|
6
|
+
* 品牌强调色取官网产品图标用色 #FF6F1A。
|
|
7
|
+
*/
|
|
8
|
+
const VASTBASE_MARK_PATHS = [
|
|
9
|
+
'M34.323 44.7455L34.2626 44.6518C34.2109 44.5411 34.1591 44.4388 34.1074 44.3451L26.915 32.1364C26.5097 31.4718 25.768 31.0288 24.9315 31.0288C24.095 31.0288 23.3447 31.4804 22.9394 32.1534L15.7211 44.2599C15.7211 44.2599 15.7039 44.2855 15.6952 44.3025L15.6435 44.3877C15.6004 44.4644 15.5573 44.5496 15.5141 44.6263L15.4365 44.7455C14.9105 45.606 15.1864 46.7391 16.0574 47.2588L16.8508 47.7359C17.7219 48.2556 18.8689 47.983 19.3949 47.1225L19.8779 46.3387C19.9124 46.2876 19.9382 46.2365 19.9641 46.1768L24.897 37.9383L29.7782 46.1002C29.8127 46.1768 29.8472 46.262 29.8989 46.3387L30.2007 46.8329C30.2439 46.9095 30.2956 46.9862 30.3387 47.0544L30.3818 47.1225C30.9079 47.983 32.0549 48.2556 32.9259 47.7359L33.7193 47.2588C34.5903 46.7391 34.8663 45.606 34.3402 44.7455H34.323Z',
|
|
10
|
+
'M47.7674 26.2578H47.6553C47.5346 26.2492 47.4138 26.2407 47.3017 26.2407L33.0032 26.2918C32.2184 26.3089 31.4595 26.7178 31.0369 27.442C30.6144 28.1662 30.6402 29.0267 31.0197 29.7082L38.031 41.9425C38.031 41.9596 38.0482 41.9681 38.0568 41.9851L38.1086 42.0788C38.1517 42.1555 38.2034 42.2322 38.2552 42.3089L38.3242 42.4367C38.8157 43.3227 39.9455 43.6465 40.8424 43.1609L41.653 42.7178C42.5499 42.2322 42.8776 41.1161 42.3861 40.2301L41.9376 39.4292C41.9117 39.3781 41.8773 39.327 41.8428 39.2759L37.091 30.9436L46.6808 30.8499C46.767 30.8584 46.8533 30.8669 46.9481 30.8669L47.526 30.8499C47.6122 30.8499 47.7071 30.8499 47.7933 30.8499H47.8709C48.8885 30.8243 49.7078 29.9809 49.6819 28.9755L49.6647 28.0639C49.6388 27.0586 48.785 26.2492 47.7674 26.2748V26.2578Z',
|
|
11
|
+
'M38.2819 5.51233L38.2302 5.61457C38.1612 5.70829 38.0922 5.81052 38.0405 5.90424L30.9343 18.1641C30.5549 18.8457 30.5376 19.6976 30.9602 20.4218C31.3828 21.146 32.1503 21.5549 32.9437 21.572L47.1732 21.6912C47.1905 21.6912 47.2077 21.6912 47.2164 21.6912H47.3198C47.4061 21.6912 47.5009 21.6912 47.5958 21.6827H47.7424C48.76 21.7083 49.6138 20.9074 49.6397 19.8936L49.6569 18.982C49.6828 17.9767 48.8635 17.1332 47.8459 17.1076L46.9231 17.0906C46.8628 17.0906 46.8024 17.0906 46.742 17.0906L37.0573 16.9884L41.766 8.73278C41.8178 8.66462 41.8695 8.58795 41.9126 8.51127L42.1886 8.00861C42.2317 7.93193 42.2748 7.85525 42.3179 7.77858L42.3524 7.71042C42.844 6.82437 42.5077 5.70829 41.6194 5.22266L40.8088 4.77964C39.9119 4.29402 38.7821 4.62629 38.2906 5.50381L38.2819 5.51233Z',
|
|
12
|
+
'M15.359 3.25452L15.4194 3.34824C15.4711 3.45899 15.5229 3.56123 15.5746 3.65495L22.767 15.8637C23.1723 16.5282 23.914 16.9712 24.7505 16.9712C25.5871 16.9712 26.3373 16.5197 26.7427 15.8466L33.9609 3.74014C33.9609 3.74014 33.9782 3.71458 33.9868 3.69755L34.0385 3.61235C34.0817 3.53567 34.1248 3.45047 34.1679 3.3738L34.2455 3.25452C34.7716 2.39403 34.4956 1.26091 33.6246 0.741209L32.8312 0.264106C31.9602 -0.255596 30.8132 0.0170342 30.2871 0.877524L29.8042 1.66134C29.7697 1.71245 29.7438 1.76357 29.7179 1.82321L24.785 10.0618L19.9039 1.89989C19.8694 1.82321 19.8349 1.73801 19.7831 1.66134L19.4813 1.16719C19.4382 1.09052 19.3864 1.01384 19.3433 0.945682L19.3002 0.877524C18.7741 0.0170342 17.6271 -0.255596 16.7561 0.264106L15.9627 0.741209C15.0917 1.26091 14.8157 2.39403 15.3418 3.25452H15.359Z',
|
|
13
|
+
'M1.91414 21.7423H2.02625C2.14699 21.7508 2.26772 21.7594 2.37983 21.7594L16.6784 21.7082C17.4631 21.6912 18.2221 21.2823 18.6446 20.5581C19.0672 19.8339 19.0413 18.9734 18.6619 18.2918L11.6506 6.05755C11.6506 6.04051 11.6333 6.03199 11.6247 6.01495L11.573 5.92123C11.5299 5.84456 11.4781 5.76788 11.4264 5.6912L11.3574 5.56341C10.8658 4.67736 9.73607 4.35361 8.83918 4.83923L8.02853 5.28226C7.13164 5.76788 6.80393 6.88396 7.29549 7.77001L7.74394 8.57086C7.76981 8.62198 7.80431 8.6731 7.8388 8.72422L12.5906 17.0565L3.00076 17.1502C2.91452 17.1417 2.82828 17.1332 2.73342 17.1332L2.15561 17.1502C2.06937 17.1502 1.97451 17.1502 1.88827 17.1502H1.81065C0.793024 17.1843 -0.0262521 18.0277 -0.000380225 19.0416L0.0168677 19.9532C0.0427396 20.9585 0.896512 21.7679 1.91414 21.7423Z',
|
|
14
|
+
'M11.4002 42.4877L11.4519 42.3855C11.5209 42.2918 11.5899 42.1896 11.6417 42.0958L18.7478 29.836C19.1273 29.1544 19.1445 28.3024 18.7219 27.5783C18.2994 26.8541 17.5318 26.4452 16.7384 26.4281L2.5175 26.3088C2.50025 26.3088 2.483 26.3088 2.47438 26.3088H2.37089C2.28465 26.3088 2.18979 26.3088 2.09493 26.3174H1.94832C0.930692 26.2918 0.0769193 27.0927 0.0510474 28.1065L0.0337995 29.0181C0.00792757 30.0234 0.827204 30.8669 1.84483 30.8924L2.7676 30.9095C2.82796 30.9095 2.88833 30.9095 2.9487 30.9095L12.6334 31.0117L7.92473 39.2673C7.87298 39.3355 7.82124 39.4121 7.77812 39.4888L7.50215 39.9915C7.45903 40.0682 7.41591 40.1448 7.37279 40.2215L7.3383 40.2897C6.84673 41.1757 7.18306 42.2918 8.07133 42.7774L8.88199 43.2204C9.77888 43.7061 10.9086 43.3738 11.4002 42.4963V42.4877Z',
|
|
15
|
+
] as const
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* NiuMa Vastbase —— 官方品牌 mark,单色填充,默认走官网橙并随主题明暗调整。
|
|
19
|
+
*/
|
|
20
|
+
export const VastbaseIcon = defineComponent({
|
|
21
|
+
name: 'VastbaseIcon',
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
props: {
|
|
24
|
+
size: { type: [Number, String] as PropType<number | string>, default: 24 },
|
|
25
|
+
strokeWidth: { type: [Number, String] as PropType<number | string>, default: 2 },
|
|
26
|
+
color: { type: String, default: 'currentColor' },
|
|
27
|
+
},
|
|
28
|
+
setup(props, { attrs }) {
|
|
29
|
+
return () => {
|
|
30
|
+
const size = Number(props.size) || 24
|
|
31
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs
|
|
32
|
+
const accent = props.color && props.color !== 'currentColor' ? props.color : undefined
|
|
33
|
+
const style: Record<string, string> = {
|
|
34
|
+
...(typeof attrStyle === 'object' && attrStyle && !Array.isArray(attrStyle)
|
|
35
|
+
? (attrStyle as Record<string, string>)
|
|
36
|
+
: {}),
|
|
37
|
+
...(accent ? { '--rs-icon-vastbase-accent': accent } : {}),
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return h(
|
|
41
|
+
'svg',
|
|
42
|
+
{
|
|
43
|
+
...restAttrs,
|
|
44
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
45
|
+
width: size,
|
|
46
|
+
height: size,
|
|
47
|
+
viewBox: '0 0 50 48',
|
|
48
|
+
fill: 'none',
|
|
49
|
+
overflow: 'visible',
|
|
50
|
+
style: Object.keys(style).length > 0 ? style : undefined,
|
|
51
|
+
class: ['lucide', 'lucide-vastbase-icon', attrClass].filter(Boolean),
|
|
52
|
+
},
|
|
53
|
+
VASTBASE_MARK_PATHS.map((d) => h('path', { class: 'vastbase-icon__mark', d })),
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Component } from 'vue'
|
|
2
|
+
import { ApiIcon } from './custom/api'
|
|
3
|
+
import { FtpIcon } from './custom/ftp'
|
|
4
|
+
import { MongodbIcon } from './custom/mongodb'
|
|
5
|
+
import { MysqlIcon } from './custom/mysql'
|
|
6
|
+
import { RedisIcon } from './custom/redis'
|
|
7
|
+
import { SqliteIcon } from './custom/sqlite'
|
|
8
|
+
import { VastbaseIcon } from './custom/vastbase'
|
|
9
|
+
import { DamengIcon } from './custom/dameng'
|
|
10
|
+
import { OracleIcon } from './custom/oracle'
|
|
11
|
+
import { ClickhouseIcon } from './custom/clickhouse'
|
|
12
|
+
import { KingbaseIcon } from './custom/kingbase'
|
|
13
|
+
import { SqlserverIcon } from './custom/sqlserver'
|
|
14
|
+
|
|
15
|
+
export const LUCIDE_LICENSE = 'ISC'
|
|
16
|
+
export const LUCIDE_ATTRIBUTION =
|
|
17
|
+
'Icons by Lucide (https://lucide.dev) — ISC License, free for commercial use'
|
|
18
|
+
|
|
19
|
+
/** NiuMa 业务扩展图标(kebab-case,与 Lucide 同名查找) */
|
|
20
|
+
const customIconMap = new Map<string, Component>([
|
|
21
|
+
['api', ApiIcon],
|
|
22
|
+
['ftp', FtpIcon],
|
|
23
|
+
['mongodb', MongodbIcon],
|
|
24
|
+
['mysql', MysqlIcon],
|
|
25
|
+
['redis', RedisIcon],
|
|
26
|
+
['sqlite', SqliteIcon],
|
|
27
|
+
['vastbase', VastbaseIcon],
|
|
28
|
+
['dameng', DamengIcon],
|
|
29
|
+
['oracle', OracleIcon],
|
|
30
|
+
['clickhouse', ClickhouseIcon],
|
|
31
|
+
['kingbase', KingbaseIcon],
|
|
32
|
+
['sqlserver', SqlserverIcon],
|
|
33
|
+
])
|
|
34
|
+
|
|
35
|
+
/** Vite 构建时收集全部 Lucide 图标,运行时按名称 O(1) 查找 */
|
|
36
|
+
const iconModules = import.meta.glob<{ default: Component }>(
|
|
37
|
+
'../../node_modules/lucide-vue-next/dist/esm/icons/*.js',
|
|
38
|
+
{ eager: true },
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
const iconMap = new Map<string, Component>(customIconMap)
|
|
42
|
+
const iconPathPattern = /[/\\]icons[/\\]([^/\\]+)\.js$/
|
|
43
|
+
|
|
44
|
+
/** Lucide 更名兼容:旧 kebab 名 → 新图标文件名 */
|
|
45
|
+
const iconAliases = new Map<string, string>([
|
|
46
|
+
['code-2', 'code-xml'],
|
|
47
|
+
// Lucide v0.5xx:circle-help / help-circle → circle-question-mark
|
|
48
|
+
['circle-help', 'circle-question-mark'],
|
|
49
|
+
['help-circle', 'circle-question-mark'],
|
|
50
|
+
])
|
|
51
|
+
|
|
52
|
+
for (const [path, mod] of Object.entries(iconModules)) {
|
|
53
|
+
const match = iconPathPattern.exec(path)
|
|
54
|
+
if (match) iconMap.set(match[1], mod.default)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const iconCache = new Map<string, Component>()
|
|
58
|
+
|
|
59
|
+
function resolveIconName(name: string): string {
|
|
60
|
+
return iconAliases.get(name) ?? name
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function isRsIconName(name: string): boolean {
|
|
64
|
+
return iconMap.has(resolveIconName(name))
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function resolveLucideIcon(name: string): Component | undefined {
|
|
68
|
+
const resolvedName = resolveIconName(name)
|
|
69
|
+
const cached = iconCache.get(resolvedName)
|
|
70
|
+
if (cached) return cached
|
|
71
|
+
|
|
72
|
+
const icon = iconMap.get(resolvedName)
|
|
73
|
+
if (icon) iconCache.set(resolvedName, icon)
|
|
74
|
+
return icon
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Lucide 库中可用图标数量 */
|
|
78
|
+
export const lucideIconCount = iconMap.size
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export {
|
|
2
|
+
LUCIDE_ATTRIBUTION,
|
|
3
|
+
LUCIDE_LICENSE,
|
|
4
|
+
isRsIconName,
|
|
5
|
+
lucideIconCount,
|
|
6
|
+
resolveLucideIcon,
|
|
7
|
+
} from './lucide'
|
|
8
|
+
|
|
9
|
+
/** Playground / 文档常用图标(Lucide 全库约 1600+;kebab-case,如 `house`、`trash-2`) */
|
|
10
|
+
export const rsCommonIconNames = [
|
|
11
|
+
'house',
|
|
12
|
+
'settings',
|
|
13
|
+
'user',
|
|
14
|
+
'search',
|
|
15
|
+
'plus',
|
|
16
|
+
'x',
|
|
17
|
+
'check',
|
|
18
|
+
'message-square',
|
|
19
|
+
'folder',
|
|
20
|
+
'chevron-right',
|
|
21
|
+
'chevron-down',
|
|
22
|
+
'loader',
|
|
23
|
+
'trash-2',
|
|
24
|
+
'pencil',
|
|
25
|
+
'bell',
|
|
26
|
+
'cloud',
|
|
27
|
+
'download',
|
|
28
|
+
'upload',
|
|
29
|
+
'link',
|
|
30
|
+
'copy',
|
|
31
|
+
'external-link',
|
|
32
|
+
'layout-dashboard',
|
|
33
|
+
'credit-card',
|
|
34
|
+
'shield-check',
|
|
35
|
+
] as const satisfies readonly string[]
|