@antcde/component-library 0.1.14-rc.a84bbf9 → 0.1.14-rc.c0e281b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21580 -35165
- package/dist/types/{index.d.ts → src/index.d.ts} +2 -2
- package/lib/GisViewer/GisViewer.vue +3 -2
- package/lib/build/layer-order.css +33 -0
- package/lib/build/uno.ts +92 -0
- package/lib/build/vite.ts +102 -0
- package/lib/build/vuetify.ts +189 -0
- package/package.json +71 -23
- /package/dist/types/{components → src/components}/BaseAntButton.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAntCard.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAntCreateCard.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAntDatePicker.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAntInput.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAntLoading.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAppCard.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseAppCardSkeleton.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseClickableIcon.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseConfirmDialog.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseDeleteDialog.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseDialog.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseLimitedButton.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BaseResizePanel.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/BulkLabelsMenu.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/GlobalLabelBadge.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/RBAC/Permissions/PermissionCard.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/StackedLabels/_LabelsMenuCard.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/StackedLabels/index.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/components/_dropzoneBackground.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/components/_flowEdge.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/components/_flowEditor.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/components/nodes/_taskNode.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/components/nodes/_triggerNode.vue.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/composables/useTaskFlow.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/composables/useTaskFlowDragDrop.d.ts +0 -0
- /package/dist/types/{components → src/components}/TasksFlow/index.vue.d.ts +0 -0
|
@@ -18,8 +18,8 @@ import { default as GlobalLabelBadge } from './components/GlobalLabelBadge.vue';
|
|
|
18
18
|
import { default as PermissionCard } from './components/RBAC/Permissions/PermissionCard.vue';
|
|
19
19
|
import { default as StackedLabels } from './components/StackedLabels/index.vue';
|
|
20
20
|
import { default as TaskFlow } from './components/TasksFlow/index.vue';
|
|
21
|
-
export type { AppLike } from '
|
|
22
|
-
export type { StackedLabel } from '
|
|
21
|
+
export type { AppLike } from '../components/BaseAppCard.vue';
|
|
22
|
+
export type { StackedLabel } from '../components/StackedLabels/index.vue';
|
|
23
23
|
export * from '@antcde/vue-utils';
|
|
24
24
|
export { BaseAntButton, BaseAntCard, BaseAntCreateCard, BaseAntDatePicker, BaseAntInput, BaseAntLoading, BaseAppCard, BaseAppCardSkeleton, BaseClickableIcon, BaseConfirmDialog, BaseDeleteDialog, BaseDialog, BaseLimitedButton, BaseResizePanel, BulkLabelsMenu, GlobalLabelBadge, PermissionCard, StackedLabels, TaskFlow, };
|
|
25
25
|
declare const _default: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
import type { ApplicationProps } from './useGisViewer'
|
|
2
3
|
import { watch } from 'vue'
|
|
3
4
|
import GisViewerAppBar from './GisViewerAppBar.vue'
|
|
4
|
-
import {
|
|
5
|
+
import { useGisViewer } from './useGisViewer'
|
|
5
6
|
|
|
6
7
|
const { client, widgets, drawings, toolbar = true } = defineProps<ApplicationProps & { toolbar?: boolean }>()
|
|
7
8
|
const {
|
|
@@ -43,7 +44,7 @@ watch(() => drawings, (newDrawings) => {
|
|
|
43
44
|
<slot name="toolbar-right" />
|
|
44
45
|
</template>
|
|
45
46
|
</GisViewerAppBar>
|
|
46
|
-
<div :class="`w-
|
|
47
|
+
<div :class="`w-full gis-wrapper bg-grey-lighten-3 position-relative ${toolbar ? 'toolbar' : ''}`">
|
|
47
48
|
<div id="gisViewer" />
|
|
48
49
|
</div>
|
|
49
50
|
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ANT Platform — CSS Layer Order
|
|
3
|
+
*
|
|
4
|
+
* Registers the layer cascade order BEFORE any Vuetify component CSS loads.
|
|
5
|
+
* CSS layer priority is set by the first declaration of each name. UnoCSS
|
|
6
|
+
* layers are prefixed with `uno-` (via `cssLayerName` in uno.config) to
|
|
7
|
+
* avoid collisions with Vuetify's own layer names.
|
|
8
|
+
*
|
|
9
|
+
* Order rationale:
|
|
10
|
+
* uno-base — UnoCSS preflights / resets (lowest priority)
|
|
11
|
+
* uno-theme — UnoCSS theme utilities
|
|
12
|
+
* vuetify-core — Vuetify resets (button { font: inherit }, etc.)
|
|
13
|
+
* vuetify-components — Vuetify component styles (.v-btn, .v-card, …)
|
|
14
|
+
* vuetify-overrides — Vuetify component overrides
|
|
15
|
+
* vuetify-utilities — Vuetify utility classes
|
|
16
|
+
* uno-shortcuts — UnoCSS shortcuts
|
|
17
|
+
* uno-default — UnoCSS utilities (above Vuetify so `p-4` beats `.v-card` padding)
|
|
18
|
+
* vuetify-final — Vuetify !important overrides (highest priority)
|
|
19
|
+
*
|
|
20
|
+
* This file is imported as a side-effect by:
|
|
21
|
+
* - `src/index.ts` (component library main entry — for apps using AntComponentLibrary plugin)
|
|
22
|
+
* - `lib/build/vuetify.ts` (createAntVuetify factory — for apps using the factory directly)
|
|
23
|
+
*/
|
|
24
|
+
@layer
|
|
25
|
+
uno-base,
|
|
26
|
+
uno-theme,
|
|
27
|
+
vuetify-core,
|
|
28
|
+
vuetify-components,
|
|
29
|
+
vuetify-overrides,
|
|
30
|
+
vuetify-utilities,
|
|
31
|
+
uno-shortcuts,
|
|
32
|
+
uno-default,
|
|
33
|
+
vuetify-final;
|
package/lib/build/uno.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { UserConfig } from 'unocss'
|
|
2
|
+
import presetRemToPx from '@unocss/preset-rem-to-px'
|
|
3
|
+
import presetWind4 from '@unocss/preset-wind4'
|
|
4
|
+
import { defineConfig, transformerDirectives, transformerVariantGroup } from 'unocss'
|
|
5
|
+
|
|
6
|
+
const antColors = {
|
|
7
|
+
primary: '#125CFF',
|
|
8
|
+
secondary: '#64748B',
|
|
9
|
+
info: '#2196F3',
|
|
10
|
+
success: '#4CAF50',
|
|
11
|
+
warning: '#FB8C00',
|
|
12
|
+
} as const
|
|
13
|
+
|
|
14
|
+
const vuetifyBreakpoints = {
|
|
15
|
+
xs: '0px',
|
|
16
|
+
sm: '600px',
|
|
17
|
+
md: '960px',
|
|
18
|
+
lg: '1280px',
|
|
19
|
+
xl: '1920px',
|
|
20
|
+
xxl: '2560px',
|
|
21
|
+
} as const
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Vuetify-aware UnoCSS rules that use Vuetify's CSS custom properties.
|
|
25
|
+
*
|
|
26
|
+
* Vuetify stores theme colors as raw RGB triplets (e.g. `--v-theme-surface: 255,255,255`),
|
|
27
|
+
* so they must be wrapped in `rgb()` / `rgba()`. These shortcuts provide clean utility
|
|
28
|
+
* classes that auto-adapt to light/dark theme without `style=""` blocks.
|
|
29
|
+
*/
|
|
30
|
+
const vuetifyRules: UserConfig['rules'] = [
|
|
31
|
+
['bg-v-surface', { 'background-color': 'rgb(var(--v-theme-surface))' }],
|
|
32
|
+
['bg-v-panel', { 'background-color': 'rgba(var(--v-theme-on-surface), 0.03)' }],
|
|
33
|
+
['bg-v-inset', { 'background-color': 'rgba(var(--v-border-color), 0.08)' }],
|
|
34
|
+
['bg-v-hover', { 'background-color': 'rgba(var(--v-border-color), 0.04)' }],
|
|
35
|
+
['text-v-heading', { color: 'rgb(var(--v-theme-on-surface))' }],
|
|
36
|
+
['text-v-body', { color: 'rgba(var(--v-theme-on-surface), 0.7)' }],
|
|
37
|
+
['text-v-muted', { color: 'rgba(var(--v-theme-on-surface), 0.5)' }],
|
|
38
|
+
['text-v-disabled', { color: 'rgba(var(--v-theme-on-surface), 0.38)' }],
|
|
39
|
+
['border-v', { 'border-color': 'rgba(var(--v-border-color), var(--v-border-opacity))' }],
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Creates a UnoCSS config pre-configured for the ANT platform with Vuetify 4.
|
|
44
|
+
*
|
|
45
|
+
* Includes:
|
|
46
|
+
* - Correct `outputToCssLayers` with `uno-` prefix (required for Vuetify 4 layer compatibility)
|
|
47
|
+
* - `presetWind4` with Vuetify dark mode selector (`.v-theme--dark`)
|
|
48
|
+
* - `presetRemToPx` for pixel-based design
|
|
49
|
+
* - Vuetify breakpoints matching Vuetify's built-in breakpoints
|
|
50
|
+
* - Vuetify-aware utility rules (`bg-v-surface`, `text-v-body`, etc.)
|
|
51
|
+
* - Standard transformers (directives + variant group)
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* // uno.config.ts — zero-arg default (most apps)
|
|
56
|
+
* import { createAntUnoConfig } from '@antcde/component-library/build/uno'
|
|
57
|
+
* export default createAntUnoConfig()
|
|
58
|
+
*
|
|
59
|
+
* // With overrides
|
|
60
|
+
* export default createAntUnoConfig({
|
|
61
|
+
* rules: [['my-rule', { color: 'red' }]],
|
|
62
|
+
* theme: { colors: { primary: '#009688' } },
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export function createAntUnoConfig(overrides: Partial<UserConfig> = {}): UserConfig {
|
|
67
|
+
const { rules, presets, transformers, theme, ...rest } = overrides
|
|
68
|
+
|
|
69
|
+
return defineConfig({
|
|
70
|
+
outputToCssLayers: {
|
|
71
|
+
cssLayerName: (layer: string) => layer === 'properties' ? null : `uno-${layer}`,
|
|
72
|
+
},
|
|
73
|
+
rules: [
|
|
74
|
+
...vuetifyRules,
|
|
75
|
+
...(rules ?? []),
|
|
76
|
+
],
|
|
77
|
+
theme: {
|
|
78
|
+
...theme,
|
|
79
|
+
colors: { ...antColors, ...(theme?.colors ?? {}) },
|
|
80
|
+
breakpoints: theme?.breakpoints ?? { ...vuetifyBreakpoints },
|
|
81
|
+
},
|
|
82
|
+
presets: presets ?? [
|
|
83
|
+
presetRemToPx,
|
|
84
|
+
presetWind4({ dark: { dark: '.v-theme--dark' } }),
|
|
85
|
+
],
|
|
86
|
+
transformers: transformers ?? [
|
|
87
|
+
transformerDirectives(),
|
|
88
|
+
transformerVariantGroup(),
|
|
89
|
+
],
|
|
90
|
+
...rest,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { UserConfig } from 'vite'
|
|
2
|
+
import { fileURLToPath, URL } from 'node:url'
|
|
3
|
+
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
|
4
|
+
import vue from '@vitejs/plugin-vue'
|
|
5
|
+
import UnoCSS from 'unocss/vite'
|
|
6
|
+
import AutoImport from 'unplugin-auto-import/rolldown'
|
|
7
|
+
import IconsResolver from 'unplugin-icons/resolver'
|
|
8
|
+
import Icons from 'unplugin-icons/rolldown'
|
|
9
|
+
import Components from 'unplugin-vue-components/rolldown'
|
|
10
|
+
import { defineConfig, mergeConfig } from 'vite'
|
|
11
|
+
import vuetify from 'vite-plugin-vuetify'
|
|
12
|
+
|
|
13
|
+
const RE_DIST = /dist/
|
|
14
|
+
const RE_VUETIFY_PLUGIN = /src\/plugins\/vuetify\.ts$/
|
|
15
|
+
|
|
16
|
+
/** Canonical CSS layer order declaration — single source of truth for Vuetify 4 + UnoCSS cascade. */
|
|
17
|
+
export const CSS_LAYER_ORDER = '@layer uno-base, uno-theme, vuetify-core, vuetify-components, vuetify-overrides, vuetify-utilities, uno-shortcuts, uno-default, vuetify-final;'
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Creates a Vite config pre-configured for ANT platform apps.
|
|
21
|
+
*
|
|
22
|
+
* Includes: vue, UnoCSS, Vuetify auto-import, AutoImport, Components,
|
|
23
|
+
* Icons, VueI18nPlugin, and sensible defaults for optimizeDeps, resolve, and build.
|
|
24
|
+
*
|
|
25
|
+
* @param appRoot - Pass `import.meta.url` from your vite.config.ts.
|
|
26
|
+
* Used to resolve relative paths (i18n translations, `@` alias) correctly.
|
|
27
|
+
* @param overrides - Additional Vite config merged via `mergeConfig()`.
|
|
28
|
+
* Plugins are appended, objects are deep-merged.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* // vite.config.ts — zero-override default (most apps)
|
|
33
|
+
* import { createAntViteConfig } from '@antcde/component-library/build/vite'
|
|
34
|
+
* export default createAntViteConfig(import.meta.url)
|
|
35
|
+
*
|
|
36
|
+
* // With overrides
|
|
37
|
+
* export default createAntViteConfig(import.meta.url, {
|
|
38
|
+
* server: { port: 5174 },
|
|
39
|
+
* })
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export function createAntViteConfig(appRoot: string | URL, overrides: UserConfig = {}): UserConfig {
|
|
43
|
+
const resolve = (relative: string) => fileURLToPath(new URL(relative, appRoot))
|
|
44
|
+
|
|
45
|
+
const baseConfig = defineConfig({
|
|
46
|
+
base: '/__APP_URL__/',
|
|
47
|
+
optimizeDeps: { exclude: ['vuetify'] },
|
|
48
|
+
plugins: [
|
|
49
|
+
// Inject CSS layer order into <head> before any JS-loaded CSS.
|
|
50
|
+
// This guarantees the cascade order is set before vite-plugin-vuetify
|
|
51
|
+
// auto-imports component CSS — no manual import ordering required.
|
|
52
|
+
{
|
|
53
|
+
name: 'ant-css-layer-order',
|
|
54
|
+
transformIndexHtml() {
|
|
55
|
+
return [{ tag: 'style', children: CSS_LAYER_ORDER, injectTo: 'head-prepend' }]
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
vue(),
|
|
59
|
+
UnoCSS('uno.config.ts'),
|
|
60
|
+
vuetify({ autoImport: { labs: true } }),
|
|
61
|
+
Icons({ autoInstall: true }),
|
|
62
|
+
AutoImport({
|
|
63
|
+
imports: [
|
|
64
|
+
'vue',
|
|
65
|
+
'@vueuse/core',
|
|
66
|
+
'@vueuse/math',
|
|
67
|
+
{ vuetify: ['useDisplay'] },
|
|
68
|
+
],
|
|
69
|
+
dirs: ['src/composables', 'src/stores', 'src/plugins'],
|
|
70
|
+
dts: true,
|
|
71
|
+
eslintrc: { enabled: true },
|
|
72
|
+
exclude: [RE_DIST, RE_VUETIFY_PLUGIN],
|
|
73
|
+
}),
|
|
74
|
+
Components({
|
|
75
|
+
dirs: ['src/components'],
|
|
76
|
+
extensions: ['vue'],
|
|
77
|
+
globs: [
|
|
78
|
+
'src/components/**/*.vue',
|
|
79
|
+
'!src/components/**/_*/**',
|
|
80
|
+
'!src/components/**/_*.vue',
|
|
81
|
+
'!src/components/**/components/**',
|
|
82
|
+
],
|
|
83
|
+
resolvers: [IconsResolver()],
|
|
84
|
+
}),
|
|
85
|
+
VueI18nPlugin({
|
|
86
|
+
include: resolve('./src/lang/translations/**'),
|
|
87
|
+
strictMessage: false,
|
|
88
|
+
}),
|
|
89
|
+
],
|
|
90
|
+
resolve: {
|
|
91
|
+
dedupe: ['vuetify'],
|
|
92
|
+
alias: {
|
|
93
|
+
'@': resolve('./src'),
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
build: {
|
|
97
|
+
cssMinify: 'esbuild',
|
|
98
|
+
},
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
return mergeConfig(baseConfig, overrides)
|
|
102
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { FunctionalComponent } from 'vue'
|
|
2
|
+
import type { VuetifyOptions } from 'vuetify'
|
|
3
|
+
import { Icon } from '@iconify/vue'
|
|
4
|
+
import { createVuetify } from 'vuetify'
|
|
5
|
+
import 'vuetify/styles'
|
|
6
|
+
import 'virtual:uno.css'
|
|
7
|
+
|
|
8
|
+
/** ANT platform light theme colors — exported for apps that need to reference them in `themes` overrides (e.g. when adding a dark theme). */
|
|
9
|
+
export const ANT_COLORS = {
|
|
10
|
+
'background': '#FFFFFF',
|
|
11
|
+
'surface': '#FFFFFF',
|
|
12
|
+
'surface-bright': '#FFFFFF',
|
|
13
|
+
'surface-light': '#F5F5F5',
|
|
14
|
+
'surface-variant': '#F1F5F9',
|
|
15
|
+
'on-surface-variant': '#334155',
|
|
16
|
+
'primary': '#125CFF',
|
|
17
|
+
'primary-darken-1': '#0D47A1',
|
|
18
|
+
'secondary': '#64748B',
|
|
19
|
+
'secondary-darken-1': '#475569',
|
|
20
|
+
'error': '#B00020',
|
|
21
|
+
'info': '#2196F3',
|
|
22
|
+
'success': '#4CAF50',
|
|
23
|
+
'warning': '#FB8C00',
|
|
24
|
+
} as const
|
|
25
|
+
|
|
26
|
+
/** ANT platform dark theme colors — exported for apps that need custom dark theme overrides. */
|
|
27
|
+
export const ANT_DARK_COLORS = {
|
|
28
|
+
'background': '#121212',
|
|
29
|
+
'surface': '#1E1E1E',
|
|
30
|
+
'surface-bright': '#2C2C2C',
|
|
31
|
+
'surface-light': '#252525',
|
|
32
|
+
'surface-variant': '#1E293B',
|
|
33
|
+
'on-surface-variant': '#CBD5E1',
|
|
34
|
+
'primary': '#5C9AFF',
|
|
35
|
+
'primary-darken-1': '#125CFF',
|
|
36
|
+
'secondary': '#94A3B8',
|
|
37
|
+
'secondary-darken-1': '#64748B',
|
|
38
|
+
'error': '#CF6679',
|
|
39
|
+
'info': '#64B5F6',
|
|
40
|
+
'success': '#81C784',
|
|
41
|
+
'warning': '#FFB74D',
|
|
42
|
+
} as const
|
|
43
|
+
|
|
44
|
+
/** Theme variables controlling opacity, borders, and interaction feedback. */
|
|
45
|
+
const ANT_VARIABLES = {
|
|
46
|
+
'border-color': '#000000',
|
|
47
|
+
'border-opacity': 0.12,
|
|
48
|
+
'high-emphasis-opacity': 0.87,
|
|
49
|
+
'medium-emphasis-opacity': 0.60,
|
|
50
|
+
'disabled-opacity': 0.38,
|
|
51
|
+
'idle-opacity': 0.04,
|
|
52
|
+
'hover-opacity': 0.04,
|
|
53
|
+
'focus-opacity': 0.12,
|
|
54
|
+
'selected-opacity': 0.08,
|
|
55
|
+
'activated-opacity': 0.12,
|
|
56
|
+
'pressed-opacity': 0.12,
|
|
57
|
+
'dragged-opacity': 0.08,
|
|
58
|
+
'theme-kbd': '#212529',
|
|
59
|
+
'theme-on-kbd': '#FFFFFF',
|
|
60
|
+
'theme-code': '#F5F5F5',
|
|
61
|
+
'theme-on-code': '#000000',
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Dark theme variables — borders flip to white-based. */
|
|
65
|
+
const ANT_DARK_VARIABLES = {
|
|
66
|
+
'border-color': '#FFFFFF',
|
|
67
|
+
'border-opacity': 0.12,
|
|
68
|
+
'high-emphasis-opacity': 0.87,
|
|
69
|
+
'medium-emphasis-opacity': 0.60,
|
|
70
|
+
'disabled-opacity': 0.38,
|
|
71
|
+
'idle-opacity': 0.10,
|
|
72
|
+
'hover-opacity': 0.04,
|
|
73
|
+
'focus-opacity': 0.12,
|
|
74
|
+
'selected-opacity': 0.08,
|
|
75
|
+
'activated-opacity': 0.12,
|
|
76
|
+
'pressed-opacity': 0.12,
|
|
77
|
+
'dragged-opacity': 0.08,
|
|
78
|
+
'theme-kbd': '#212529',
|
|
79
|
+
'theme-on-kbd': '#FFFFFF',
|
|
80
|
+
'theme-code': '#2C2C2C',
|
|
81
|
+
'theme-on-code': '#CCCCCC',
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** ANT platform component defaults — exported for reference. */
|
|
85
|
+
export const ANT_DEFAULTS: VuetifyOptions['defaults'] = {
|
|
86
|
+
VAppBar: {
|
|
87
|
+
flat: true,
|
|
88
|
+
},
|
|
89
|
+
VToolbar: {
|
|
90
|
+
flat: true,
|
|
91
|
+
},
|
|
92
|
+
VNavigationDrawer: {
|
|
93
|
+
elevation: 0,
|
|
94
|
+
},
|
|
95
|
+
VCard: {
|
|
96
|
+
rounded: 'xl',
|
|
97
|
+
flat: true,
|
|
98
|
+
border: true,
|
|
99
|
+
},
|
|
100
|
+
VCardTitle: {
|
|
101
|
+
style: 'white-space: break-spaces;',
|
|
102
|
+
},
|
|
103
|
+
VBtn: {
|
|
104
|
+
rounded: 'xl',
|
|
105
|
+
class: 'text-none',
|
|
106
|
+
},
|
|
107
|
+
VBtnToggle: {
|
|
108
|
+
rounded: 'xl',
|
|
109
|
+
},
|
|
110
|
+
VBtnGroup: {
|
|
111
|
+
rounded: 'xl',
|
|
112
|
+
},
|
|
113
|
+
VChip: {
|
|
114
|
+
rounded: 'xl',
|
|
115
|
+
borderColor: '#B8B8B8',
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const DEFAULT_ICONS: VuetifyOptions['icons'] = {
|
|
120
|
+
defaultSet: 'mdi',
|
|
121
|
+
sets: {
|
|
122
|
+
mdi: {
|
|
123
|
+
component: Icon as unknown as FunctionalComponent,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface AntVuetifyOverrides {
|
|
129
|
+
/** Merge additional component defaults (shallow merge at component level) */
|
|
130
|
+
defaults?: VuetifyOptions['defaults']
|
|
131
|
+
/** Override individual light theme colors (shallow merge). For dark theme overrides, use `themes` instead. */
|
|
132
|
+
colors?: Record<string, string>
|
|
133
|
+
/** Provide a full themes object (replaces the default light theme entirely) */
|
|
134
|
+
themes?: VuetifyOptions['theme'] extends { themes?: infer T } ? T : never
|
|
135
|
+
/** Default theme name (default: 'light') */
|
|
136
|
+
defaultTheme?: string
|
|
137
|
+
/** Explicit component imports (e.g., lab components like VDateInput) */
|
|
138
|
+
components?: VuetifyOptions['components']
|
|
139
|
+
/** Explicit directive imports */
|
|
140
|
+
directives?: VuetifyOptions['directives']
|
|
141
|
+
/** Override icon configuration */
|
|
142
|
+
icons?: VuetifyOptions['icons']
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Creates a Vuetify instance pre-configured with the ANT platform design system.
|
|
147
|
+
*
|
|
148
|
+
* Importing this module automatically loads `vuetify/styles` and `virtual:uno.css`
|
|
149
|
+
* as side effects. CSS layer ordering is handled by the `transformIndexHtml` plugin
|
|
150
|
+
* in `createAntViteConfig`.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* // plugins/vuetify.ts — zero-arg default (most apps)
|
|
155
|
+
* import { createAntVuetify } from '@antcde/component-library/build/vuetify'
|
|
156
|
+
* export default createAntVuetify()
|
|
157
|
+
*
|
|
158
|
+
* // With overrides (ant-os)
|
|
159
|
+
* export default createAntVuetify({
|
|
160
|
+
* defaults: {
|
|
161
|
+
* VMenu: { transition: 'menu-ant', openDelay: 0, closeDelay: 0 },
|
|
162
|
+
* },
|
|
163
|
+
* })
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
export function createAntVuetify(overrides: AntVuetifyOverrides = {}) {
|
|
167
|
+
const { defaults, colors, themes, defaultTheme, components, directives, icons } = overrides
|
|
168
|
+
|
|
169
|
+
return createVuetify({
|
|
170
|
+
defaults: { ...ANT_DEFAULTS, ...defaults },
|
|
171
|
+
theme: {
|
|
172
|
+
defaultTheme: defaultTheme ?? 'light',
|
|
173
|
+
themes: themes ?? {
|
|
174
|
+
light: {
|
|
175
|
+
colors: { ...ANT_COLORS, ...(colors ?? {}) },
|
|
176
|
+
variables: ANT_VARIABLES,
|
|
177
|
+
},
|
|
178
|
+
dark: {
|
|
179
|
+
dark: true,
|
|
180
|
+
colors: { ...ANT_DARK_COLORS },
|
|
181
|
+
variables: ANT_DARK_VARIABLES,
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
icons: icons ?? DEFAULT_ICONS,
|
|
186
|
+
...(components && { components }),
|
|
187
|
+
...(directives && { directives }),
|
|
188
|
+
})
|
|
189
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/component-library",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.14-rc.
|
|
4
|
+
"version": "0.1.14-rc.c0e281b",
|
|
5
5
|
"description": "Helper to use ant components in Vue 3",
|
|
6
6
|
"author": "CollaborAll",
|
|
7
7
|
"exports": {
|
|
@@ -13,6 +13,16 @@
|
|
|
13
13
|
"./composables/*": {
|
|
14
14
|
"types": "./dist/types/composables/*.d.ts"
|
|
15
15
|
},
|
|
16
|
+
"./build/uno": {
|
|
17
|
+
"import": "./lib/build/uno.ts"
|
|
18
|
+
},
|
|
19
|
+
"./build/vite": {
|
|
20
|
+
"import": "./lib/build/vite.ts"
|
|
21
|
+
},
|
|
22
|
+
"./build/vuetify": {
|
|
23
|
+
"import": "./lib/build/vuetify.ts"
|
|
24
|
+
},
|
|
25
|
+
"./build/layer-order.css": "./lib/build/layer-order.css",
|
|
16
26
|
"./lib/ForgeViewer": {
|
|
17
27
|
"import": "./lib/ForgeViewer/index.ts"
|
|
18
28
|
},
|
|
@@ -60,48 +70,86 @@
|
|
|
60
70
|
"format": "prettier --write src/"
|
|
61
71
|
},
|
|
62
72
|
"peerDependencies": {
|
|
73
|
+
"@iconify/vue": ">=5.0.0",
|
|
74
|
+
"@intlify/unplugin-vue-i18n": ">=11.0.0",
|
|
75
|
+
"@unocss/preset-rem-to-px": "*",
|
|
76
|
+
"@unocss/preset-wind4": "*",
|
|
77
|
+
"@vitejs/plugin-vue": ">=6.0.0",
|
|
78
|
+
"unocss": "*",
|
|
79
|
+
"unplugin-auto-import": "*",
|
|
80
|
+
"unplugin-icons": "*",
|
|
81
|
+
"unplugin-vue-components": "*",
|
|
82
|
+
"vite": ">=8.0.0",
|
|
83
|
+
"vite-plugin-vuetify": ">=2.0.0",
|
|
63
84
|
"vue": "^3.5.29",
|
|
64
|
-
"vuetify": "^
|
|
85
|
+
"vuetify": "^4.0.4"
|
|
86
|
+
},
|
|
87
|
+
"peerDependenciesMeta": {
|
|
88
|
+
"@iconify/vue": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"@intlify/unplugin-vue-i18n": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"@unocss/preset-rem-to-px": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@unocss/preset-wind4": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"@vitejs/plugin-vue": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"unocss": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"unplugin-auto-import": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
109
|
+
"unplugin-icons": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"unplugin-vue-components": {
|
|
113
|
+
"optional": true
|
|
114
|
+
},
|
|
115
|
+
"vite": {
|
|
116
|
+
"optional": true
|
|
117
|
+
},
|
|
118
|
+
"vite-plugin-vuetify": {
|
|
119
|
+
"optional": true
|
|
120
|
+
}
|
|
65
121
|
},
|
|
66
122
|
"dependencies": {
|
|
67
|
-
"@antcde/connect-ts": "0.4.17-rc.
|
|
68
|
-
"@antcde/vue-utils": "0.2.13-rc.
|
|
123
|
+
"@antcde/connect-ts": "0.4.17-rc.c0e281b",
|
|
124
|
+
"@antcde/vue-utils": "0.2.13-rc.c0e281b",
|
|
69
125
|
"@arcgis/core": "^4.34.8",
|
|
70
126
|
"@mdi/font": "^7.4.47",
|
|
71
127
|
"@vue-flow/background": "^1.3.2",
|
|
72
128
|
"@vue-flow/core": "^1.48.2",
|
|
73
129
|
"@vue-flow/minimap": "^1.5.4",
|
|
74
130
|
"@vueuse/core": "^14.2.1",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"uuid": "^13.0.0",
|
|
78
|
-
"vue-i18n": "^11.3.2",
|
|
79
|
-
"vue-router": "^5.0.4"
|
|
131
|
+
"qs": "^6.15.1",
|
|
132
|
+
"vue-i18n": "^11.4.0"
|
|
80
133
|
},
|
|
81
134
|
"devDependencies": {
|
|
82
135
|
"@arcgis/core": "^4.30.9",
|
|
83
136
|
"@iconify-json/mdi": "^1.2.3",
|
|
84
137
|
"@iconify/vue": "^5.0.0",
|
|
85
|
-
"@intlify/unplugin-vue-i18n": "^11.
|
|
138
|
+
"@intlify/unplugin-vue-i18n": "^11.1.2",
|
|
86
139
|
"@mdi/font": "^7.2.96",
|
|
87
|
-
"@tsconfig/
|
|
88
|
-
"@types/node": "^
|
|
140
|
+
"@tsconfig/node22": "^22.0.5",
|
|
141
|
+
"@types/node": "^25.6.0",
|
|
89
142
|
"@types/qs": "^6.15.0",
|
|
90
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
91
|
-
"@vue/tsconfig": "^0.
|
|
92
|
-
"axios": "^1.14.0",
|
|
93
|
-
"esbuild": "0.27.2",
|
|
94
|
-
"glob": "^13.0.6",
|
|
95
|
-
"npm-run-all2": "^6.2.6",
|
|
143
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
144
|
+
"@vue/tsconfig": "^0.9.1",
|
|
96
145
|
"pinia": "^3.0.4",
|
|
97
|
-
"rxjs": "^7.8.2",
|
|
98
146
|
"sass": "^1.99.0",
|
|
99
|
-
"typescript": "~
|
|
147
|
+
"typescript": "~6.0.3",
|
|
100
148
|
"unplugin-icons": "^23.0.1",
|
|
101
|
-
"vite": "^
|
|
102
|
-
"vite-plugin-css-injected-by-js": "^
|
|
149
|
+
"vite": "^8.0.10",
|
|
150
|
+
"vite-plugin-css-injected-by-js": "^5.0.1",
|
|
103
151
|
"vite-plugin-dts": "^4.5.4",
|
|
104
152
|
"vite-plugin-vuetify": "^2.1.3",
|
|
105
|
-
"vue-tsc": "^3.2.
|
|
153
|
+
"vue-tsc": "^3.2.7"
|
|
106
154
|
}
|
|
107
155
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{components → src/components}/TasksFlow/components/_dropzoneBackground.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{components → src/components}/TasksFlow/components/nodes/_taskNode.vue.d.ts
RENAMED
|
File without changes
|
/package/dist/types/{components → src/components}/TasksFlow/components/nodes/_triggerNode.vue.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/{components → src/components}/TasksFlow/composables/useTaskFlowDragDrop.d.ts
RENAMED
|
File without changes
|
|
File without changes
|