@imaginario27/air-ui-ds 1.10.0 → 1.10.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this package are documented in this file.
5
5
  Historical releases were reconstructed from git history (GitHub repository) and npm publish dates.
6
6
  Future releases will include detailed entries generated with Changesets.
7
7
 
8
+ ## 1.10.0 - 2026-04-09
9
+
10
+ Release type: minor.
11
+ Commits found in range: 1.
12
+
13
+ ### Added
14
+
15
+ 1. add prefetchOn and disabled states to navigation components ([04f9124](https://github.com/imaginario27/air-ui/commit/04f91246519958fdf3619427f39504269a49a911))
16
+
17
+ - Package: @imaginario27/air-ui-ds.
18
+
8
19
  ## 1.9.4 - 2026-04-06
9
20
 
10
21
  Release type: patch.
@@ -157,6 +157,10 @@ const props = defineProps({
157
157
  },
158
158
  })
159
159
 
160
+ // Runtime constants
161
+ const config = useRuntimeConfig()
162
+ const { public: { appName } } = config
163
+
160
164
  // Constants
161
165
  const defaultErrorMappings: ErrorMapping[] = [
162
166
  // 4xx Client Errors
@@ -253,7 +257,7 @@ const pageTitleText = computed(() => resolvedErrorMapping.value.title)
253
257
 
254
258
  watchEffect(() => {
255
259
  if (props.setPageTitle) {
256
- document.title = pageTitle(pageTitleText.value, App.NAME)
260
+ document.title = pageTitle(pageTitleText.value, appName as string)
257
261
  }
258
262
  })
259
263
 
@@ -255,8 +255,11 @@ const currentPageTitle = computed<string>(() =>
255
255
  (route.meta.title as string) ?? 'Page title'
256
256
  )
257
257
 
258
+ const config = useRuntimeConfig()
259
+ const { public: { appName } } = config
260
+
258
261
  // Dynamically set the page title
259
262
  useHead(() => ({
260
- title: pageTitle(currentPageTitle.value, App.NAME, props.pageTitleFormat),
263
+ title: pageTitle(currentPageTitle.value, appName as string, props.pageTitleFormat),
261
264
  }))
262
265
  </script>
@@ -90,23 +90,27 @@ const handleTabClick = (index: number, to?: string) => {
90
90
  emit('update:modelValue', index)
91
91
  }
92
92
 
93
+ const isPrefetchOnOptions = (prefetchOn: PrefetchOnStrategy): prefetchOn is PrefetchOnOptions => {
94
+ return typeof prefetchOn === 'object' && prefetchOn !== null
95
+ }
96
+
93
97
  const shouldPrefetchOn = (trigger: PrefetchOn): boolean => {
94
- if (typeof props.prefetchOn === 'string') {
95
- return props.prefetchOn === trigger
96
- }
97
-
98
- return trigger === PrefetchOn.VISIBILITY
99
- ? !!props.prefetchOn?.visibility
100
- : !!props.prefetchOn?.interaction
98
+ if (!isPrefetchOnOptions(props.prefetchOn)) {
99
+ return props.prefetchOn === trigger
100
+ }
101
+
102
+ return trigger === PrefetchOn.VISIBILITY
103
+ ? !!props.prefetchOn.visibility
104
+ : !!props.prefetchOn.interaction
101
105
  }
102
106
 
103
107
  const handleTabPrefetch = (to?: string) => {
104
- if (!to) return
108
+ if (!to) return
105
109
 
106
- if (!shouldPrefetchOn(PrefetchOn.INTERACTION)) return
110
+ if (!shouldPrefetchOn(PrefetchOn.INTERACTION)) return
107
111
 
108
- // fire and forget do not await to avoid blocking
109
- preloadRouteComponents(to)
112
+ // fire and forget - do not await to avoid blocking
113
+ preloadRouteComponents(to)
110
114
  }
111
115
  // Watchers
112
116
  watch(() => props.modelValue, (newVal) => {
@@ -3,4 +3,6 @@ export type PrefetchOnStrategy =
3
3
  | {
4
4
  visibility?: boolean
5
5
  interaction?: boolean
6
- }
6
+ }
7
+
8
+ export type PrefetchOnOptions = Exclude<PrefetchOnStrategy, PrefetchOn>
@@ -1,3 +1,8 @@
1
+
2
+ import type { AllowedInputType } from './forms'
3
+ import type { ColorAccent } from '../enums/colors'
4
+ import type { IconPosition } from '../enums/icons'
5
+
1
6
  export interface SelectOption {
2
7
  id?: string | number
3
8
  value: string | number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imaginario27/air-ui-ds",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "author": "imaginario27",
5
5
  "type": "module",
6
6
  "homepage": "https://air-ui.netlify.app/",
@@ -1,8 +0,0 @@
1
- export const App = {
2
- NAME: 'AirUI',
3
- }
4
-
5
- export const AppSlug = {
6
- DOCS: 'docs',
7
- COMPONENTS: 'components',
8
- }
@@ -1,22 +0,0 @@
1
-
2
- export const FieldMaxLength = {
3
- FULLNAME: 80,
4
- LASTNAME: 80,
5
- EMAIL: 254,
6
- PHONE: 15,
7
- SUBJECT: 100,
8
- MESSAGE: 500,
9
- PASSWORD: 64,
10
- SEARCH: 80,
11
- DESCRIPTION: 400,
12
- }
13
-
14
- export const FieldError = {
15
- REQUIRED_FIELD: 'This field is required.',
16
- REQUIRED_EMAIL: 'Email is required.',
17
- INVALID_EMAIL: 'Invalid email address.',
18
- REQUIRED_OPTION: 'Please select an option.',
19
- INVALID_DATE_RANGE: 'Start date must be before or equal to end date',
20
- PASSWORDS_DO_NOT_MATCH: 'Passwords do not match.',
21
- INVALID_URL: 'Invalid URL.',
22
- }
@@ -1,6 +0,0 @@
1
- export interface HeaderConfig {
2
- field: string
3
- callback?: (value: any) => string
4
- }
5
-
6
- export type Headers = Record<string, string | HeaderConfig>