@dynect/base 0.5.0 → 0.7.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.
- package/package.json +1 -1
- package/src/module.ts +24 -5
- package/src/runtime/components/base/event-calendar/EventModal.vue +1 -0
- package/src/runtime/components/base/event-calendar/composables/useAdvancedValidation.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useColorManager.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useCompatibility.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useDragAndDrop.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useEventFiltering.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useEventStatus.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useEventStore.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useExternalCalendar.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useKeyboardNavigation.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useMonitoring.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useMultiDayLayout.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/usePerformanceCache.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useRecurringEvents.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useSecurity.ts +1 -0
- package/src/runtime/components/base/event-calendar/composables/useTimezone.ts +1 -0
- package/src/runtime/components/base/signature/index.vue +1 -0
- package/src/runtime/components/dynect/Autocomplete.vue +1 -0
- package/src/runtime/components/dynect/Checkbox.vue +1 -0
- package/src/runtime/components/dynect/DatePicker.vue +1 -0
- package/src/runtime/components/dynect/DateRange.vue +1 -0
- package/src/runtime/components/dynect/Dropzone.vue +1 -0
- package/src/runtime/components/dynect/Input.vue +1 -0
- package/src/runtime/components/dynect/OtpInput.vue +1 -0
- package/src/runtime/components/dynect/Radio.vue +1 -0
- package/src/runtime/components/dynect/Select.vue +1 -0
- package/src/runtime/components/dynect/SelectMultiple.vue +1 -0
- package/src/runtime/components/dynect/Signature.vue +1 -0
- package/src/runtime/components/dynect/TagsInput.vue +1 -0
- package/src/runtime/components/dynect/Textarea.vue +1 -0
- package/src/runtime/components/dynect/TimePicker.vue +1 -0
- package/src/runtime/components/dynect/Toggle.vue +1 -0
- package/src/runtime/utils/function.ts +1 -0
package/package.json
CHANGED
package/src/module.ts
CHANGED
|
@@ -71,21 +71,40 @@ export default defineNuxtModule<DynectBaseOptions>({
|
|
|
71
71
|
|
|
72
72
|
// ── Path aliases for intra-package imports ───────────────────────────────
|
|
73
73
|
// Dynect components use @/components/ui/* and @/lib/utils.
|
|
74
|
-
//
|
|
75
|
-
//
|
|
74
|
+
// nuxt.options.alias cannot intercept these because Vite first expands @→srcDir
|
|
75
|
+
// and stops alias processing. We must hook into vite:extendConfig and prepend
|
|
76
|
+
// regex aliases so they match *before* the @ alias fires.
|
|
76
77
|
|
|
77
78
|
const srcDir = nuxt.options.srcDir;
|
|
78
79
|
|
|
79
80
|
// @/lib/utils → runtime/lib/utils (when not present in consuming app)
|
|
81
|
+
// This one works via nuxt.options.alias because lib/utils is not prefixed with @
|
|
80
82
|
if (!existsSync(join(srcDir, 'lib', 'utils.ts'))) {
|
|
81
83
|
nuxt.options.alias[join(srcDir, 'lib', 'utils')] =
|
|
82
84
|
resolver.resolve('./runtime/lib/utils');
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
// @/components/ui/* → runtime/components/ui/*
|
|
87
|
+
// @/components/ui/* → runtime/components/ui/*
|
|
88
|
+
// Must run BEFORE @ is resolved, so we use a regex alias in vite:extendConfig.
|
|
89
|
+
// Only applied when the consuming app has no own components/ui directory.
|
|
86
90
|
if (isStandalone && !existsSync(join(srcDir, 'components', 'ui'))) {
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
const uiRuntimePath = join(runtimeComponentsDir, 'ui');
|
|
92
|
+
|
|
93
|
+
nuxt.hook('vite:extendConfig', (config) => {
|
|
94
|
+
config.resolve ??= {};
|
|
95
|
+
|
|
96
|
+
const entry = { find: /^[@~]\/components\/ui/, replacement: uiRuntimePath };
|
|
97
|
+
|
|
98
|
+
if (Array.isArray(config.resolve.alias)) {
|
|
99
|
+
(config.resolve.alias as any[]).unshift(entry);
|
|
100
|
+
} else {
|
|
101
|
+
const existing = config.resolve.alias ?? {};
|
|
102
|
+
config.resolve.alias = [
|
|
103
|
+
entry,
|
|
104
|
+
...Object.entries(existing).map(([find, replacement]) => ({ find, replacement })),
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
89
108
|
}
|
|
90
109
|
|
|
91
110
|
// ── Install required Nuxt modules ────────────────────────────────────────
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script setup lang="ts">
|
|
53
|
+
import { useId } from 'nuxt/app';
|
|
53
54
|
import type { DateValue } from '@internationalized/date';
|
|
54
55
|
import { DateFormatter, getLocalTimeZone, parseDate, today } from '@internationalized/date';
|
|
55
56
|
import { cn } from '@/lib/utils';
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script setup lang="ts">
|
|
56
|
+
import { useId } from 'nuxt/app';
|
|
56
57
|
import type { DateValue } from '@internationalized/date';
|
|
57
58
|
import { DateFormatter, getLocalTimeZone, today, parseDate } from '@internationalized/date';
|
|
58
59
|
import { cn } from '@/lib/utils';
|