@antcde/component-library 0.1.17-rc.ff2cb6c → 0.1.18-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ import { UpdateState } from './_BaseAppCardUpdate.vue';
2
+ type SplitPane = 'L' | 'R' | 'T' | 'B';
3
+ type __VLS_Props = {
4
+ icon?: string | null;
5
+ color?: string | null;
6
+ image?: string | null;
7
+ iconSize: number;
8
+ showLoadingIndicator?: boolean;
9
+ isLoading?: boolean;
10
+ isFavorite?: boolean;
11
+ showFavorite?: boolean;
12
+ favoriteVisibility?: 'always' | 'hover' | 'never';
13
+ menuOpen?: boolean;
14
+ updateState?: UpdateState;
15
+ updateAvailable?: boolean;
16
+ nextVersion?: string;
17
+ splitPane?: SplitPane | null;
18
+ hover?: boolean;
19
+ touchMode?: boolean;
20
+ /** App is connected to the selected task — show a corner "link" badge. */
21
+ linked?: boolean;
22
+ };
23
+ declare function __VLS_template(): {
24
+ attrs: Partial<{}>;
25
+ slots: {
26
+ 'bottom-right'?(_: {
27
+ foregroundColor: string;
28
+ }): any;
29
+ };
30
+ refs: {};
31
+ rootEl: HTMLDivElement;
32
+ };
33
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
34
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
35
+ update: () => any;
36
+ toggleFavorite: () => any;
37
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
38
+ onUpdate?: (() => any) | undefined;
39
+ onToggleFavorite?: (() => any) | undefined;
40
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
41
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
42
+ export default _default;
43
+ type __VLS_WithTemplateSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ app: {
3
+ title: string;
4
+ icon?: string | null;
5
+ color?: string | null;
6
+ image?: string | null;
7
+ };
8
+ iconSize: number;
9
+ cardClasses?: Record<string, boolean>;
10
+ showLoadingIndicator?: boolean;
11
+ titleless?: boolean;
12
+ };
13
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ clicked: () => any;
15
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ onClicked?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ export default _default;
@@ -0,0 +1,14 @@
1
+ export type UpdateState = 'idle' | 'updating' | 'done' | 'failed' | 'cleared';
2
+ type __VLS_Props = {
3
+ state?: UpdateState;
4
+ updateAvailable?: boolean;
5
+ nextVersion?: string;
6
+ hover?: boolean;
7
+ touchMode?: boolean;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ update: () => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onUpdate?: (() => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -1,13 +1,15 @@
1
+ import { UpdateState } from './_BaseAppCardUpdate.vue';
1
2
  export interface AppLike {
2
3
  title: string;
3
- icon: string;
4
+ icon?: string | null;
4
5
  id: string;
5
- color?: string;
6
+ color?: string | null;
6
7
  isFavorite?: boolean;
7
- image?: string;
8
+ image?: string | null;
8
9
  update_available?: boolean;
9
- activated?: boolean;
10
+ can_open?: boolean;
10
11
  }
12
+ type SplitPane = 'L' | 'R' | 'T' | 'B';
11
13
  type __VLS_Props = {
12
14
  app: AppLike;
13
15
  smallerVariant?: boolean;
@@ -19,6 +21,16 @@ type __VLS_Props = {
19
21
  favoriteVisibility?: 'always' | 'hover' | 'never';
20
22
  shadow?: boolean;
21
23
  size?: 's' | 'xs' | 'toolbar';
24
+ updateState?: UpdateState;
25
+ splitPane?: SplitPane | null;
26
+ menuOpen?: boolean;
27
+ nextVersion?: string;
28
+ touchMode?: boolean;
29
+ fluid?: boolean;
30
+ /** Ring the icon when this app is connected to the selected task. */
31
+ highlighted?: boolean;
32
+ /** Tooltip text shown while highlighted (e.g. "Connected to task X"). */
33
+ highlightLabel?: string;
22
34
  };
23
35
  declare function __VLS_template(): {
24
36
  attrs: Partial<{}>;
@@ -31,9 +43,11 @@ declare function __VLS_template(): {
31
43
  rootEl: any;
32
44
  };
33
45
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
34
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
46
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
47
+ update: (app: AppLike) => any;
35
48
  clicked: (app: AppLike) => any;
36
49
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
50
+ onUpdate?: ((app: AppLike) => any) | undefined;
37
51
  onClicked?: ((app: AppLike) => any) | undefined;
38
52
  }>, {
39
53
  showLoadingIndicator: boolean;
@@ -0,0 +1,18 @@
1
+ import { MentionItem } from './_useMentionPicker';
2
+ type __VLS_Props = {
3
+ items: MentionItem[];
4
+ selected: number;
5
+ loading: boolean;
6
+ rect: {
7
+ left: number;
8
+ top: number;
9
+ } | null;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ hover: (index: number) => any;
13
+ pick: (item: MentionItem) => any;
14
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onHover?: ((index: number) => any) | undefined;
16
+ onPick?: ((item: MentionItem) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor: Editor;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import { Ref } from 'vue';
2
+ export interface MentionItem {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ interface MentionState {
7
+ open: boolean;
8
+ items: MentionItem[];
9
+ selected: number;
10
+ loading: boolean;
11
+ rect: {
12
+ left: number;
13
+ top: number;
14
+ } | null;
15
+ command: ((item: MentionItem) => void) | null;
16
+ }
17
+ export declare function useMentionPicker(wrapperRef: Ref<HTMLElement | null>, mentionItems: ((q: string) => Promise<MentionItem[]>) | undefined): {
18
+ state: Ref<{
19
+ open: boolean;
20
+ items: {
21
+ id: string;
22
+ label: string;
23
+ }[];
24
+ selected: number;
25
+ loading: boolean;
26
+ rect: {
27
+ left: number;
28
+ top: number;
29
+ } | null;
30
+ command: ((item: MentionItem) => void) | null;
31
+ }, MentionState | {
32
+ open: boolean;
33
+ items: {
34
+ id: string;
35
+ label: string;
36
+ }[];
37
+ selected: number;
38
+ loading: boolean;
39
+ rect: {
40
+ left: number;
41
+ top: number;
42
+ } | null;
43
+ command: ((item: MentionItem) => void) | null;
44
+ }>;
45
+ buildExtension: () => import('@tiptap/core').Node<import('@tiptap/extension-mention').MentionOptions<any, import('@tiptap/extension-mention').MentionNodeAttrs>, any> | null;
46
+ };
47
+ export {};
@@ -1,7 +1,5 @@
1
- export interface MentionItem {
2
- id: string;
3
- label: string;
4
- }
1
+ import { MentionItem } from './_useMentionPicker';
2
+ export type { MentionItem };
5
3
  type __VLS_Props = {
6
4
  isDark?: boolean;
7
5
  placeholder?: string;
@@ -19,6 +17,14 @@ type __VLS_Props = {
19
17
  * (message use case).
20
18
  */
21
19
  mode?: 'inline' | 'composer';
20
+ /**
21
+ * Visual chrome. 'subtle' (default) is the soft tinted look for inline
22
+ * descriptions and chat composers. 'form' matches ANT form-field chrome
23
+ * (solid surface, ant border, rounded-lg, primary focus ring) so the
24
+ * editor sits next to other Inputs without looking like a different
25
+ * control.
26
+ */
27
+ variant?: 'subtle' | 'form';
22
28
  /**
23
29
  * Source of mention suggestions. When set, typing `@` opens an inline
24
30
  * picker that calls this function with the current query and renders
@@ -26,13 +32,12 @@ type __VLS_Props = {
26
32
  */
27
33
  mentionItems?: (query: string) => Promise<MentionItem[]>;
28
34
  };
29
- declare function clear(): void;
30
35
  type __VLS_PublicProps = {
31
36
  modelValue?: string;
32
37
  } & __VLS_Props;
33
38
  declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
34
39
  focus: () => boolean | undefined;
35
- clear: typeof clear;
40
+ clear: () => void;
36
41
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
37
42
  submit: () => any;
38
43
  "update:modelValue": (value: string) => any;
@@ -66,7 +66,7 @@ export declare function useTaskNodeState(props: TaskNodeProps, flowStore: FlowSt
66
66
  '--label-ring-color': string;
67
67
  } | undefined>;
68
68
  assignedUser: import('vue').ComputedRef<any>;
69
- userInitials: import('vue').ComputedRef<string>;
69
+ userInitials: import('vue').ComputedRef<any>;
70
70
  descriptionPlain: import('vue').ComputedRef<string>;
71
71
  isEditingTitle: import('vue').Ref<boolean, boolean>;
72
72
  editTitle: import('vue').Ref<string, string>;
@@ -5,7 +5,7 @@ import { default as BaseAntCreateCard } from './components/BaseAntCreateCard.vue
5
5
  import { default as BaseAntDatePicker } from './components/BaseAntDatePicker.vue';
6
6
  import { default as BaseAntInput } from './components/BaseAntInput.vue';
7
7
  import { default as BaseAntLoading } from './components/BaseAntLoading.vue';
8
- import { default as BaseAppCard } from './components/BaseAppCard.vue';
8
+ import { default as BaseAppCard } from './components/BaseAppCard/index.vue';
9
9
  import { default as BaseAppCardSkeleton } from './components/BaseAppCardSkeleton.vue';
10
10
  import { default as BaseClickableIcon } from './components/BaseClickableIcon.vue';
11
11
  import { default as BaseConfirmDialog } from './components/BaseConfirmDialog.vue';
@@ -26,7 +26,7 @@ import { default as UnifiedWindow } from './components/UnifiedWindow/index.vue';
26
26
  import { default as TaskFlow } from './components/TasksFlow/index.vue';
27
27
  import { default as VersionPublishDialog } from './components/VersionPublishDialog.vue';
28
28
  import { default as AntTourZone } from './components/AntTourZone/index.vue';
29
- export type { AppLike } from './components/BaseAppCard.vue';
29
+ export type { AppLike } from './components/BaseAppCard/index.vue';
30
30
  export type { MentionItem } from './components/RichTextEditor/index.vue';
31
31
  export type { StackedLabel } from './components/StackedLabels/index.vue';
32
32
  export type { FlowChannelSubscriber } from './components/TasksFlow/composables/useTaskFlow';
package/lib/build/uno.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import type { UserConfig } from 'unocss'
2
2
  import presetRemToPx from '@unocss/preset-rem-to-px'
3
+ import presetTypography from '@unocss/preset-typography'
3
4
  import presetWind4 from '@unocss/preset-wind4'
4
5
  import { defineConfig, transformerDirectives, transformerVariantGroup } from 'unocss'
5
6
 
6
7
  const antColors = {
7
8
  primary: '#125CFF',
8
9
  secondary: '#64748B',
10
+ error: '#B00020',
9
11
  info: '#2196F3',
10
12
  success: '#4CAF50',
11
13
  warning: '#FB8C00',
@@ -35,9 +37,14 @@ const antDesignTokens: NonNullable<UserConfig['rules']> = [
35
37
  ['text-body', { color: 'rgba(var(--v-theme-on-surface), 0.7)' }],
36
38
  ['text-muted', { color: 'rgba(var(--v-theme-on-surface), 0.5)' }],
37
39
  ['text-disabled', { color: 'rgba(var(--v-theme-on-surface), 0.38)' }],
40
+ ['text-warning-emphasis', { color: 'var(--ant-warning-text-emphasis)' }],
38
41
  ['border-ant', { 'border-color': 'rgba(var(--v-border-color), var(--v-border-opacity))' }],
39
42
  ]
40
43
 
44
+ const antPreflights: NonNullable<UserConfig['preflights']> = [
45
+ { getCSS: () => ':root { --ant-warning-text-emphasis: #9b5b00; }' },
46
+ ]
47
+
41
48
  /**
42
49
  * Normalizes shortcuts from either array or object form to array form.
43
50
  *
@@ -90,7 +97,7 @@ export function createAntUnoConfig(overrides: Partial<UserConfig> = {}): UserCon
90
97
  outputToCssLayers: {
91
98
  cssLayerName: (layer: string) => layer === 'properties' ? null : `uno-${layer}`,
92
99
  },
93
- preflights: preflights ?? [],
100
+ preflights: [...antPreflights, ...(preflights ?? [])],
94
101
  rules: [
95
102
  ...antDesignTokens,
96
103
  ...overrideRules,
@@ -104,6 +111,8 @@ export function createAntUnoConfig(overrides: Partial<UserConfig> = {}): UserCon
104
111
  presets: presets ?? [
105
112
  presetRemToPx,
106
113
  presetWind4({ dark: { dark: '.v-theme--dark' } }),
114
+ // Provides `prose` for markdown rendered via v-html (READMEs, release notes).
115
+ presetTypography(),
107
116
  ],
108
117
  shortcuts: [
109
118
  ...normalizeShortcuts(shortcuts),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antcde/component-library",
3
3
  "type": "module",
4
- "version": "0.1.17-rc.ff2cb6c",
4
+ "version": "0.1.18-rc.1",
5
5
  "description": "Helper to use ant components in Vue 3",
6
6
  "author": "CollaborAll",
7
7
  "exports": {
@@ -102,16 +102,19 @@
102
102
  "format": "prettier --write src/"
103
103
  },
104
104
  "peerDependencies": {
105
+ "@antcde/connect-ts": ">=0.4.0",
106
+ "@antcde/vue-utils": ">=0.2.0",
105
107
  "@iconify/vue": ">=5.0.0",
106
108
  "@intlify/unplugin-vue-i18n": ">=11.0.0",
107
109
  "@pinia/testing": ">=1.0.0",
108
- "@unocss/preset-rem-to-px": "*",
109
- "@unocss/preset-wind4": "*",
110
+ "@unocss/preset-rem-to-px": "^66.7.0",
111
+ "@unocss/preset-typography": "^66.7.0",
112
+ "@unocss/preset-wind4": "^66.7.0",
110
113
  "@vitejs/plugin-vue": ">=6.0.0",
111
114
  "@vue/test-utils": ">=2.4.0",
112
115
  "happy-dom": ">=20.0.0",
113
116
  "pinia": ">=3.0.0",
114
- "unocss": "*",
117
+ "unocss": "^66.7.0",
115
118
  "unplugin-auto-import": "*",
116
119
  "unplugin-icons": "*",
117
120
  "unplugin-vue-components": "*",
@@ -132,6 +135,9 @@
132
135
  "@unocss/preset-rem-to-px": {
133
136
  "optional": true
134
137
  },
138
+ "@unocss/preset-typography": {
139
+ "optional": true
140
+ },
135
141
  "@unocss/preset-wind4": {
136
142
  "optional": true
137
143
  },
@@ -176,8 +182,6 @@
176
182
  }
177
183
  },
178
184
  "dependencies": {
179
- "@antcde/connect-ts": "0.4.19-rc.ff2cb6c",
180
- "@antcde/vue-utils": "0.2.14-rc.ff2cb6c",
181
185
  "@arcgis/core": "^4.34.8",
182
186
  "@mdi/font": "^7.4.47",
183
187
  "@tiptap/extension-link": "^3.26.1",
@@ -195,6 +199,8 @@
195
199
  "vue-i18n": "^11.4.5"
196
200
  },
197
201
  "devDependencies": {
202
+ "@antcde/connect-ts": "0.4.20-rc.1",
203
+ "@antcde/vue-utils": "0.2.15-rc.1",
198
204
  "@arcgis/core": "^4.30.9",
199
205
  "@iconify-json/mdi": "^1.2.3",
200
206
  "@iconify/vue": "^5.0.1",