@veltra/vite 1.2.32 → 1.2.34

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/resolver.js CHANGED
@@ -20,6 +20,7 @@ const SHARED_STYLE_DIR = {
20
20
  "nav-sub": "nav",
21
21
  "nav-item": "nav",
22
22
  "dual-nav-app": "dual-nav",
23
+ "group-nav-item": "group-nav",
23
24
  "tabs-horizontal": "tabs",
24
25
  "tabs-vertical": "tabs"
25
26
  };
@@ -74,6 +75,8 @@ const DESKTOP_COMPONENTS = new Set([
74
75
  "UListItem",
75
76
  "ULoading",
76
77
  "UDualNav",
78
+ "UGroupNav",
79
+ "UGroupNavItem",
77
80
  "UNav",
78
81
  "UNavItem",
79
82
  "UNavSub",
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.js","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["import type { ComponentResolver } from 'unplugin-vue-components/types'\n\nexport interface VeltraDesktopUIResolverOptions {\n /**\n * Component style directories to exclude.\n * @example ['button', 'loading']\n */\n exclude?: string[]\n /**\n * Component style directories to include. Empty or omitted means all known\n * desktop components are eligible.\n * @example ['button', 'input', 'dialog']\n */\n include?: string[]\n /**\n * Whether to import component styles as side effects.\n * @default true\n */\n importStyle?: boolean\n}\n\n/**\n * Components that reside in another component's directory and share its style entry.\n *\n * These components don't have their own `style.ts` — they live inside a parent\n * component directory and use the parent's style (e.g. `UButtonGroup` lives in\n * `button/` and uses `button/style.ts`).\n */\nconst SHARED_STYLE_DIR: Record<string, string> = {\n 'button-group': 'button',\n 'collapse-item': 'collapse',\n 'action-group': 'action',\n 'card-header': 'card',\n 'card-cover': 'card',\n 'card-content': 'card',\n 'card-action': 'card',\n 'checkbox-button': 'checkbox',\n 'grid-item': 'grid',\n 'list-item': 'list',\n 'nav-sub': 'nav',\n 'nav-item': 'nav',\n 'dual-nav-app': 'dual-nav',\n 'tabs-horizontal': 'tabs',\n 'tabs-vertical': 'tabs'\n}\n\nconst DESKTOP_COMPONENTS = new Set([\n 'UAction',\n 'UActionGroup',\n 'UAutoComplete',\n 'UBadge',\n 'UBatchEdit',\n 'UBreadcrumb',\n 'UButton',\n 'UButtonGroup',\n 'UCalendar',\n 'UCard',\n 'UCardAction',\n 'UCardContent',\n 'UCardCover',\n 'UCardHeader',\n 'UCascade',\n 'UCheckTag',\n 'UCheckbox',\n 'UCollapse',\n 'UCollapseItem',\n 'UCheckboxButton',\n 'UCheckboxGroup',\n 'UCodeEditor',\n 'UConditionEditor',\n 'UContextmenu',\n 'UDatePanel',\n 'UDatePicker',\n 'UDateRangePicker',\n 'UDialog',\n 'UDrawer',\n 'UDropdown',\n 'UEmpty',\n 'UExpressionEditor',\n 'UFilePicker',\n 'UFileViewer',\n 'UFloatButton',\n 'UForm',\n 'UFormItem',\n 'UGanttChart',\n 'UGrid',\n 'UGridInput',\n 'UGridItem',\n 'UGroupInput',\n 'UIcon',\n 'UKbd',\n 'UInput',\n 'ULayout',\n 'UList',\n 'UListItem',\n 'ULoading',\n 'UDualNav',\n 'UNav',\n 'UNavItem',\n 'UNavSub',\n 'UMessage',\n 'UMessageConfirm',\n 'UMultiSelect',\n 'UMultiTreeSelect',\n 'UNodeRender',\n 'UNotification',\n 'UNumber',\n 'UNumberInput',\n 'UNumberRangeInput',\n 'UPaginator',\n 'UPalette',\n 'UPasswordInput',\n 'UPopConfirm',\n 'UProgress',\n 'UProgressNodes',\n 'URadio',\n 'URadioGroup',\n 'URichTextEditor',\n 'UScroll',\n 'USelect',\n 'USlider',\n 'USteps',\n 'USwitch',\n 'UTable',\n 'UTableEditor',\n 'UTabs',\n 'UTabsHorizontal',\n 'UTabsVertical',\n 'UTag',\n 'UText',\n 'UTextarea',\n 'UTheme',\n 'UTip',\n 'UTree',\n 'UTreeSelect',\n 'UWatermark'\n])\n\nfunction pascalToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (char, index) => (index > 0 ? '-' : '') + char.toLowerCase())\n}\n\n/**\n * Resolver for `unplugin-vue-components` that auto-imports `@veltra/desktop`\n * components and their style side effects.\n *\n * Style resolution relies on `@veltra/desktop` package exports conditions:\n * - **veltra-dev** (Vite dev): resolves to `src/components/<dir>/style.ts`\n * (source SCSS pipeline, full HMR)\n * - **production** (Vite build): resolves to `dist/components/<dir>/style.js`\n * (pre-compiled, CSS imported by the JS entry)\n */\nexport function VeltraDesktopUIResolver(\n options: VeltraDesktopUIResolverOptions = {}\n): ComponentResolver {\n const { exclude = [], importStyle = true, include = [] } = options\n const excluded = new Set(exclude)\n const included = new Set(include)\n\n return {\n type: 'component',\n resolve(name: string) {\n if (!DESKTOP_COMPONENTS.has(name)) return\n\n const kebabName = pascalToKebab(name.slice(1))\n const styleDir = SHARED_STYLE_DIR[kebabName] ?? kebabName\n if (excluded.has(styleDir)) return\n if (included.size > 0 && !included.has(styleDir)) return\n\n return {\n name,\n from: '@veltra/desktop',\n sideEffects: importStyle ? `@veltra/desktop/components/${styleDir}/style` : undefined\n }\n }\n }\n}\n"],"mappings":";;;;;;;;AA4BA,MAAM,mBAA2C;CAC/C,gBAAgB;CAChB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,cAAc;CACd,gBAAgB;CAChB,eAAe;CACf,mBAAmB;CACnB,aAAa;CACb,aAAa;CACb,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,IAAI,IAAI;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,SAAS,cAAc,KAAqB;CAC1C,OAAO,IAAI,QAAQ,WAAW,MAAM,WAAW,QAAQ,IAAI,MAAM,MAAM,KAAK,YAAY,CAAC;AAC3F;;;;;;;;;;;AAYA,SAAgB,wBACd,UAA0C,CAAC,GACxB;CACnB,MAAM,EAAE,UAAU,CAAC,GAAG,cAAc,MAAM,UAAU,CAAC,MAAM;CAC3D,MAAM,WAAW,IAAI,IAAI,OAAO;CAChC,MAAM,WAAW,IAAI,IAAI,OAAO;CAEhC,OAAO;EACL,MAAM;EACN,QAAQ,MAAc;GACpB,IAAI,CAAC,mBAAmB,IAAI,IAAI,GAAG;GAEnC,MAAM,YAAY,cAAc,KAAK,MAAM,CAAC,CAAC;GAC7C,MAAM,WAAW,iBAAiB,cAAc;GAChD,IAAI,SAAS,IAAI,QAAQ,GAAG;GAC5B,IAAI,SAAS,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ,GAAG;GAElD,OAAO;IACL;IACA,MAAM;IACN,aAAa,cAAc,8BAA8B,SAAS,UAAU,KAAA;GAC9E;EACF;CACF;AACF"}
1
+ {"version":3,"file":"resolver.js","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["import type { ComponentResolver } from 'unplugin-vue-components/types'\n\nexport interface VeltraDesktopUIResolverOptions {\n /**\n * Component style directories to exclude.\n * @example ['button', 'loading']\n */\n exclude?: string[]\n /**\n * Component style directories to include. Empty or omitted means all known\n * desktop components are eligible.\n * @example ['button', 'input', 'dialog']\n */\n include?: string[]\n /**\n * Whether to import component styles as side effects.\n * @default true\n */\n importStyle?: boolean\n}\n\n/**\n * Components that reside in another component's directory and share its style entry.\n *\n * These components don't have their own `style.ts` — they live inside a parent\n * component directory and use the parent's style (e.g. `UButtonGroup` lives in\n * `button/` and uses `button/style.ts`).\n */\nconst SHARED_STYLE_DIR: Record<string, string> = {\n 'button-group': 'button',\n 'collapse-item': 'collapse',\n 'action-group': 'action',\n 'card-header': 'card',\n 'card-cover': 'card',\n 'card-content': 'card',\n 'card-action': 'card',\n 'checkbox-button': 'checkbox',\n 'grid-item': 'grid',\n 'list-item': 'list',\n 'nav-sub': 'nav',\n 'nav-item': 'nav',\n 'dual-nav-app': 'dual-nav',\n 'group-nav-item': 'group-nav',\n 'tabs-horizontal': 'tabs',\n 'tabs-vertical': 'tabs'\n}\n\nconst DESKTOP_COMPONENTS = new Set([\n 'UAction',\n 'UActionGroup',\n 'UAutoComplete',\n 'UBadge',\n 'UBatchEdit',\n 'UBreadcrumb',\n 'UButton',\n 'UButtonGroup',\n 'UCalendar',\n 'UCard',\n 'UCardAction',\n 'UCardContent',\n 'UCardCover',\n 'UCardHeader',\n 'UCascade',\n 'UCheckTag',\n 'UCheckbox',\n 'UCollapse',\n 'UCollapseItem',\n 'UCheckboxButton',\n 'UCheckboxGroup',\n 'UCodeEditor',\n 'UConditionEditor',\n 'UContextmenu',\n 'UDatePanel',\n 'UDatePicker',\n 'UDateRangePicker',\n 'UDialog',\n 'UDrawer',\n 'UDropdown',\n 'UEmpty',\n 'UExpressionEditor',\n 'UFilePicker',\n 'UFileViewer',\n 'UFloatButton',\n 'UForm',\n 'UFormItem',\n 'UGanttChart',\n 'UGrid',\n 'UGridInput',\n 'UGridItem',\n 'UGroupInput',\n 'UIcon',\n 'UKbd',\n 'UInput',\n 'ULayout',\n 'UList',\n 'UListItem',\n 'ULoading',\n 'UDualNav',\n 'UGroupNav',\n 'UGroupNavItem',\n 'UNav',\n 'UNavItem',\n 'UNavSub',\n 'UMessage',\n 'UMessageConfirm',\n 'UMultiSelect',\n 'UMultiTreeSelect',\n 'UNodeRender',\n 'UNotification',\n 'UNumber',\n 'UNumberInput',\n 'UNumberRangeInput',\n 'UPaginator',\n 'UPalette',\n 'UPasswordInput',\n 'UPopConfirm',\n 'UProgress',\n 'UProgressNodes',\n 'URadio',\n 'URadioGroup',\n 'URichTextEditor',\n 'UScroll',\n 'USelect',\n 'USlider',\n 'USteps',\n 'USwitch',\n 'UTable',\n 'UTableEditor',\n 'UTabs',\n 'UTabsHorizontal',\n 'UTabsVertical',\n 'UTag',\n 'UText',\n 'UTextarea',\n 'UTheme',\n 'UTip',\n 'UTree',\n 'UTreeSelect',\n 'UWatermark'\n])\n\nfunction pascalToKebab(str: string): string {\n return str.replace(/[A-Z]/g, (char, index) => (index > 0 ? '-' : '') + char.toLowerCase())\n}\n\n/**\n * Resolver for `unplugin-vue-components` that auto-imports `@veltra/desktop`\n * components and their style side effects.\n *\n * Style resolution relies on `@veltra/desktop` package exports conditions:\n * - **veltra-dev** (Vite dev): resolves to `src/components/<dir>/style.ts`\n * (source SCSS pipeline, full HMR)\n * - **production** (Vite build): resolves to `dist/components/<dir>/style.js`\n * (pre-compiled, CSS imported by the JS entry)\n */\nexport function VeltraDesktopUIResolver(\n options: VeltraDesktopUIResolverOptions = {}\n): ComponentResolver {\n const { exclude = [], importStyle = true, include = [] } = options\n const excluded = new Set(exclude)\n const included = new Set(include)\n\n return {\n type: 'component',\n resolve(name: string) {\n if (!DESKTOP_COMPONENTS.has(name)) return\n\n const kebabName = pascalToKebab(name.slice(1))\n const styleDir = SHARED_STYLE_DIR[kebabName] ?? kebabName\n if (excluded.has(styleDir)) return\n if (included.size > 0 && !included.has(styleDir)) return\n\n return {\n name,\n from: '@veltra/desktop',\n sideEffects: importStyle ? `@veltra/desktop/components/${styleDir}/style` : undefined\n }\n }\n }\n}\n"],"mappings":";;;;;;;;AA4BA,MAAM,mBAA2C;CAC/C,gBAAgB;CAChB,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,cAAc;CACd,gBAAgB;CAChB,eAAe;CACf,mBAAmB;CACnB,aAAa;CACb,aAAa;CACb,WAAW;CACX,YAAY;CACZ,gBAAgB;CAChB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,IAAI,IAAI;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,SAAS,cAAc,KAAqB;CAC1C,OAAO,IAAI,QAAQ,WAAW,MAAM,WAAW,QAAQ,IAAI,MAAM,MAAM,KAAK,YAAY,CAAC;AAC3F;;;;;;;;;;;AAYA,SAAgB,wBACd,UAA0C,CAAC,GACxB;CACnB,MAAM,EAAE,UAAU,CAAC,GAAG,cAAc,MAAM,UAAU,CAAC,MAAM;CAC3D,MAAM,WAAW,IAAI,IAAI,OAAO;CAChC,MAAM,WAAW,IAAI,IAAI,OAAO;CAEhC,OAAO;EACL,MAAM;EACN,QAAQ,MAAc;GACpB,IAAI,CAAC,mBAAmB,IAAI,IAAI,GAAG;GAEnC,MAAM,YAAY,cAAc,KAAK,MAAM,CAAC,CAAC;GAC7C,MAAM,WAAW,iBAAiB,cAAc;GAChD,IAAI,SAAS,IAAI,QAAQ,GAAG;GAC5B,IAAI,SAAS,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ,GAAG;GAElD,OAAO;IACL;IACA,MAAM;IACN,aAAa,cAAc,8BAA8B,SAAS,UAAU,KAAA;GAC9E;EACF;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltra/vite",
3
- "version": "1.2.32",
3
+ "version": "1.2.34",
4
4
  "description": "Vite helpers for Veltra UI (e.g. unplugin-vue-components resolver for @veltra/desktop)",
5
5
  "files": [
6
6
  "dist",
@@ -14,10 +14,10 @@
14
14
  }
15
15
  },
16
16
  "devDependencies": {
17
- "@veltra/desktop": "1.2.32"
17
+ "@veltra/desktop": "1.2.34"
18
18
  },
19
19
  "peerDependencies": {
20
- "@veltra/desktop": "1.2.32",
20
+ "@veltra/desktop": "1.2.34",
21
21
  "unplugin-vue-components": ">=32.0.0"
22
22
  }
23
23
  }
package/src/resolver.ts CHANGED
@@ -40,6 +40,7 @@ const SHARED_STYLE_DIR: Record<string, string> = {
40
40
  'nav-sub': 'nav',
41
41
  'nav-item': 'nav',
42
42
  'dual-nav-app': 'dual-nav',
43
+ 'group-nav-item': 'group-nav',
43
44
  'tabs-horizontal': 'tabs',
44
45
  'tabs-vertical': 'tabs'
45
46
  }
@@ -95,6 +96,8 @@ const DESKTOP_COMPONENTS = new Set([
95
96
  'UListItem',
96
97
  'ULoading',
97
98
  'UDualNav',
99
+ 'UGroupNav',
100
+ 'UGroupNavItem',
98
101
  'UNav',
99
102
  'UNavItem',
100
103
  'UNavSub',