@antcde/component-library 0.1.18-rc.1 → 0.1.18-rc.2

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.
@@ -1,15 +1,13 @@
1
- import { UpdateState } from './_BaseAppCardUpdate.vue';
2
1
  export interface AppLike {
3
2
  title: string;
4
- icon?: string | null;
3
+ icon: string;
5
4
  id: string;
6
- color?: string | null;
5
+ color?: string;
7
6
  isFavorite?: boolean;
8
- image?: string | null;
7
+ image?: string;
9
8
  update_available?: boolean;
10
- can_open?: boolean;
9
+ activated?: boolean;
11
10
  }
12
- type SplitPane = 'L' | 'R' | 'T' | 'B';
13
11
  type __VLS_Props = {
14
12
  app: AppLike;
15
13
  smallerVariant?: boolean;
@@ -21,16 +19,6 @@ type __VLS_Props = {
21
19
  favoriteVisibility?: 'always' | 'hover' | 'never';
22
20
  shadow?: boolean;
23
21
  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;
34
22
  };
35
23
  declare function __VLS_template(): {
36
24
  attrs: Partial<{}>;
@@ -43,11 +31,9 @@ declare function __VLS_template(): {
43
31
  rootEl: any;
44
32
  };
45
33
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
46
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
47
- update: (app: AppLike) => any;
34
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
48
35
  clicked: (app: AppLike) => any;
49
36
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
50
- onUpdate?: ((app: AppLike) => any) | undefined;
51
37
  onClicked?: ((app: AppLike) => any) | undefined;
52
38
  }>, {
53
39
  showLoadingIndicator: boolean;
@@ -1,5 +1,7 @@
1
- import { MentionItem } from './_useMentionPicker';
2
- export type { MentionItem };
1
+ export interface MentionItem {
2
+ id: string;
3
+ label: string;
4
+ }
3
5
  type __VLS_Props = {
4
6
  isDark?: boolean;
5
7
  placeholder?: string;
@@ -17,14 +19,6 @@ type __VLS_Props = {
17
19
  * (message use case).
18
20
  */
19
21
  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';
28
22
  /**
29
23
  * Source of mention suggestions. When set, typing `@` opens an inline
30
24
  * picker that calls this function with the current query and renders
@@ -32,12 +26,13 @@ type __VLS_Props = {
32
26
  */
33
27
  mentionItems?: (query: string) => Promise<MentionItem[]>;
34
28
  };
29
+ declare function clear(): void;
35
30
  type __VLS_PublicProps = {
36
31
  modelValue?: string;
37
32
  } & __VLS_Props;
38
33
  declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
39
34
  focus: () => boolean | undefined;
40
- clear: () => void;
35
+ clear: typeof clear;
41
36
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
42
37
  submit: () => any;
43
38
  "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<any>;
69
+ userInitials: import('vue').ComputedRef<string>;
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/index.vue';
8
+ import { default as BaseAppCard } from './components/BaseAppCard.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/index.vue';
29
+ export type { AppLike } from './components/BaseAppCard.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,13 +1,11 @@
1
1
  import type { UserConfig } from 'unocss'
2
2
  import presetRemToPx from '@unocss/preset-rem-to-px'
3
- import presetTypography from '@unocss/preset-typography'
4
3
  import presetWind4 from '@unocss/preset-wind4'
5
4
  import { defineConfig, transformerDirectives, transformerVariantGroup } from 'unocss'
6
5
 
7
6
  const antColors = {
8
7
  primary: '#125CFF',
9
8
  secondary: '#64748B',
10
- error: '#B00020',
11
9
  info: '#2196F3',
12
10
  success: '#4CAF50',
13
11
  warning: '#FB8C00',
@@ -37,14 +35,9 @@ const antDesignTokens: NonNullable<UserConfig['rules']> = [
37
35
  ['text-body', { color: 'rgba(var(--v-theme-on-surface), 0.7)' }],
38
36
  ['text-muted', { color: 'rgba(var(--v-theme-on-surface), 0.5)' }],
39
37
  ['text-disabled', { color: 'rgba(var(--v-theme-on-surface), 0.38)' }],
40
- ['text-warning-emphasis', { color: 'var(--ant-warning-text-emphasis)' }],
41
38
  ['border-ant', { 'border-color': 'rgba(var(--v-border-color), var(--v-border-opacity))' }],
42
39
  ]
43
40
 
44
- const antPreflights: NonNullable<UserConfig['preflights']> = [
45
- { getCSS: () => ':root { --ant-warning-text-emphasis: #9b5b00; }' },
46
- ]
47
-
48
41
  /**
49
42
  * Normalizes shortcuts from either array or object form to array form.
50
43
  *
@@ -97,7 +90,7 @@ export function createAntUnoConfig(overrides: Partial<UserConfig> = {}): UserCon
97
90
  outputToCssLayers: {
98
91
  cssLayerName: (layer: string) => layer === 'properties' ? null : `uno-${layer}`,
99
92
  },
100
- preflights: [...antPreflights, ...(preflights ?? [])],
93
+ preflights: preflights ?? [],
101
94
  rules: [
102
95
  ...antDesignTokens,
103
96
  ...overrideRules,
@@ -111,8 +104,6 @@ export function createAntUnoConfig(overrides: Partial<UserConfig> = {}): UserCon
111
104
  presets: presets ?? [
112
105
  presetRemToPx,
113
106
  presetWind4({ dark: { dark: '.v-theme--dark' } }),
114
- // Provides `prose` for markdown rendered via v-html (READMEs, release notes).
115
- presetTypography(),
116
107
  ],
117
108
  shortcuts: [
118
109
  ...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.18-rc.1",
4
+ "version": "0.1.18-rc.2",
5
5
  "description": "Helper to use ant components in Vue 3",
6
6
  "author": "CollaborAll",
7
7
  "exports": {
@@ -107,14 +107,13 @@
107
107
  "@iconify/vue": ">=5.0.0",
108
108
  "@intlify/unplugin-vue-i18n": ">=11.0.0",
109
109
  "@pinia/testing": ">=1.0.0",
110
- "@unocss/preset-rem-to-px": "^66.7.0",
111
- "@unocss/preset-typography": "^66.7.0",
112
- "@unocss/preset-wind4": "^66.7.0",
110
+ "@unocss/preset-rem-to-px": "*",
111
+ "@unocss/preset-wind4": "*",
113
112
  "@vitejs/plugin-vue": ">=6.0.0",
114
113
  "@vue/test-utils": ">=2.4.0",
115
114
  "happy-dom": ">=20.0.0",
116
115
  "pinia": ">=3.0.0",
117
- "unocss": "^66.7.0",
116
+ "unocss": "*",
118
117
  "unplugin-auto-import": "*",
119
118
  "unplugin-icons": "*",
120
119
  "unplugin-vue-components": "*",
@@ -135,9 +134,6 @@
135
134
  "@unocss/preset-rem-to-px": {
136
135
  "optional": true
137
136
  },
138
- "@unocss/preset-typography": {
139
- "optional": true
140
- },
141
137
  "@unocss/preset-wind4": {
142
138
  "optional": true
143
139
  },
@@ -199,8 +195,8 @@
199
195
  "vue-i18n": "^11.4.5"
200
196
  },
201
197
  "devDependencies": {
202
- "@antcde/connect-ts": "0.4.20-rc.1",
203
- "@antcde/vue-utils": "0.2.15-rc.1",
198
+ "@antcde/connect-ts": "0.4.20-rc.2",
199
+ "@antcde/vue-utils": "0.2.15-rc.2",
204
200
  "@arcgis/core": "^4.30.9",
205
201
  "@iconify-json/mdi": "^1.2.3",
206
202
  "@iconify/vue": "^5.0.1",
@@ -1,47 +0,0 @@
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
- };
@@ -1,5 +0,0 @@
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;
@@ -1,18 +0,0 @@
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;
@@ -1,14 +0,0 @@
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,18 +0,0 @@
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;
@@ -1,6 +0,0 @@
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;
@@ -1,47 +0,0 @@
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 {};