@witchcraft/ui 0.1.3 → 0.2.1-beta.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.
Files changed (179) hide show
  1. package/README.md +3 -6
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +15 -12
  4. package/dist/runtime/build/generateTheme.js +1 -1
  5. package/dist/runtime/components/Aria/Aria.vue +5 -9
  6. package/dist/runtime/components/Aria/Aria.vue.d.ts +5 -0
  7. package/dist/runtime/components/Icon/Icon.vue +10 -30
  8. package/dist/runtime/components/Icon/Icon.vue.d.ts +21 -0
  9. package/dist/runtime/components/LibButton/LibButton.vue +51 -72
  10. package/dist/runtime/components/LibButton/LibButton.vue.d.ts +36 -0
  11. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +43 -74
  12. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +42 -0
  13. package/dist/runtime/components/LibColorInput/LibColorInput.vue +63 -107
  14. package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +63 -0
  15. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue +272 -352
  16. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +61 -0
  17. package/dist/runtime/components/LibColorPicker/utils/safeConvertToHsva.js +1 -1
  18. package/dist/runtime/components/LibColorPicker/utils/safeConvertToRgba.js +1 -1
  19. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +35 -69
  20. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts +22 -0
  21. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue +17 -38
  22. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +40 -0
  23. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue +58 -82
  24. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +34 -0
  25. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue +55 -67
  26. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue.d.ts +34 -0
  27. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue +7 -8
  28. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue.d.ts +22 -0
  29. package/dist/runtime/components/LibDebug/LibDebug.vue +43 -70
  30. package/dist/runtime/components/LibDebug/LibDebug.vue.d.ts +32 -0
  31. package/dist/runtime/components/LibDevOnly/LibDevOnly.vue +18 -31
  32. package/dist/runtime/components/LibDevOnly/LibDevOnly.vue.d.ts +22 -0
  33. package/dist/runtime/components/LibFileInput/LibFileInput.vue +116 -156
  34. package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +43 -0
  35. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +211 -241
  36. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +165 -0
  37. package/dist/runtime/components/LibLabel/LibLabel.vue +25 -46
  38. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +26 -0
  39. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +43 -58
  40. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +29 -0
  41. package/dist/runtime/components/LibNotifications/LibNotification.vue +34 -48
  42. package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +17 -0
  43. package/dist/runtime/components/LibNotifications/LibNotifications.vue +63 -83
  44. package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +13 -0
  45. package/dist/runtime/components/LibPagination/LibPagination.vue +67 -111
  46. package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +104 -0
  47. package/dist/runtime/components/LibPalette/LibPalette.vue +17 -23
  48. package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +14 -0
  49. package/dist/runtime/components/LibPopup/LibPopup.vue +314 -351
  50. package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +46 -0
  51. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +65 -91
  52. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue.d.ts +41 -0
  53. package/dist/runtime/components/LibRecorder/LibRecorder.vue +127 -177
  54. package/dist/runtime/components/LibRecorder/LibRecorder.vue.d.ts +77 -0
  55. package/dist/runtime/components/LibRoot/LibRoot.vue +75 -101
  56. package/dist/runtime/components/LibRoot/LibRoot.vue.d.ts +41 -0
  57. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue +42 -77
  58. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +35 -0
  59. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +118 -156
  60. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +94 -0
  61. package/dist/runtime/components/LibTable/LibTable.vue +63 -99
  62. package/dist/runtime/components/LibTable/LibTable.vue.d.ts +45 -0
  63. package/dist/runtime/components/Template/NAME.vue +15 -36
  64. package/dist/runtime/components/Template/NAME.vue.d.ts +17 -0
  65. package/dist/runtime/components/TestControls/TestControls.vue +6 -9
  66. package/dist/runtime/components/TestControls/TestControls.vue.d.ts +5 -0
  67. package/dist/runtime/components/shared/props.d.ts +0 -29
  68. package/dist/runtime/components/shared/props.js +0 -12
  69. package/dist/runtime/composables/useAccesibilityOutline.js +1 -1
  70. package/dist/runtime/composables/useDivideAttrs.js +1 -1
  71. package/dist/runtime/composables/useSuggestions.js +4 -4
  72. package/dist/runtime/directives/vDetectFlex.js +4 -4
  73. package/dist/runtime/directives/vExtractRootEl.d.ts +1 -1
  74. package/dist/runtime/directives/vResizableCols.d.ts +1 -1
  75. package/dist/runtime/directives/vResizableCols.js +4 -4
  76. package/dist/runtime/helpers/NotificationHandler.js +6 -6
  77. package/dist/runtime/helpers/base64ToImg.js +2 -2
  78. package/dist/runtime/nuxt/plugins/vue-plugin.js +1 -1
  79. package/dist/runtime/tailwind/themeConvertionOpts.d.ts +1 -1
  80. package/dist/runtime/theme.d.ts +1 -1
  81. package/dist/runtime/theme.js +1 -1
  82. package/dist/runtime/utils/notifyIfError.js +1 -1
  83. package/dist/runtime/vue/registerComponents.js +1 -1
  84. package/dist/types.d.mts +2 -6
  85. package/package.json +68 -90
  86. package/src/module.ts +19 -12
  87. package/src/runtime/build/generateTheme.ts +1 -1
  88. package/src/runtime/components/LibButton/LibButton.stories.ts +1 -1
  89. package/src/runtime/components/LibButton/LibButton.vue +3 -3
  90. package/src/runtime/components/LibCheckbox/LibCheckbox.vue +3 -7
  91. package/src/runtime/components/LibColorPicker/LibColorPicker.vue +6 -4
  92. package/src/runtime/components/LibColorPicker/utils/safeConvertToHsva.ts +1 -1
  93. package/src/runtime/components/LibColorPicker/utils/safeConvertToRgba.ts +1 -1
  94. package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +8 -15
  95. package/src/runtime/components/LibDatePicker/LibRangeDatePicker.vue +6 -0
  96. package/src/runtime/components/LibDatePicker/LibSingleDatePicker.vue +6 -0
  97. package/src/runtime/components/LibDebug/LibDebug.stories.ts +1 -1
  98. package/src/runtime/components/LibDebug/LibDebug.vue +2 -0
  99. package/src/runtime/components/LibFileInput/LibFileInput.vue +4 -0
  100. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +7 -5
  101. package/src/runtime/components/LibLabel/LibLabel.vue +2 -3
  102. package/src/runtime/components/LibMultiValues/LibMultiValues.vue +5 -3
  103. package/src/runtime/components/LibNotifications/LibNotification.vue +3 -0
  104. package/src/runtime/components/LibNotifications/LibNotifications.vue +1 -1
  105. package/src/runtime/components/LibPalette/LibPalette.vue +3 -3
  106. package/src/runtime/components/LibPopup/LibPopup.vue +2 -2
  107. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +2 -2
  108. package/src/runtime/components/LibRecorder/LibRecorder.vue +3 -3
  109. package/src/runtime/components/LibRoot/LibRoot.vue +3 -2
  110. package/src/runtime/components/LibSimpleInput/LibSimpleInput.vue +2 -2
  111. package/src/runtime/components/LibSuggestions/LibSuggestions.vue +2 -2
  112. package/src/runtime/components/LibTable/LibTable.vue +1 -1
  113. package/src/runtime/components/Template/NAME.vue +2 -2
  114. package/src/runtime/components/shared/props.ts +8 -12
  115. package/src/runtime/composables/useAccesibilityOutline.ts +1 -1
  116. package/src/runtime/composables/useDivideAttrs.ts +1 -1
  117. package/src/runtime/composables/useSuggestions.ts +4 -4
  118. package/src/runtime/directives/vDetectFlex.ts +4 -4
  119. package/src/runtime/directives/vExtractRootEl.ts +1 -1
  120. package/src/runtime/directives/vResizableCols.ts +5 -5
  121. package/src/runtime/helpers/NotificationHandler.ts +6 -6
  122. package/src/runtime/nuxt/plugins/vue-plugin.ts +1 -1
  123. package/src/runtime/tailwind/themeConvertionOpts.ts +1 -1
  124. package/src/runtime/theme.ts +2 -2
  125. package/src/runtime/utils/notifyIfError.ts +1 -1
  126. package/src/runtime/vue/registerComponents.ts +1 -1
  127. package/dist/module.cjs +0 -5
  128. package/dist/module.d.ts +0 -36
  129. package/dist/runtime/components/Focus.stories.d.ts +0 -11
  130. package/dist/runtime/components/Focus.stories.js +0 -53
  131. package/dist/runtime/components/LibButton/LibButton.stories.d.ts +0 -12
  132. package/dist/runtime/components/LibButton/LibButton.stories.js +0 -94
  133. package/dist/runtime/components/LibCheckbox/LibCheckbox.stories.d.ts +0 -14
  134. package/dist/runtime/components/LibCheckbox/LibCheckbox.stories.js +0 -29
  135. package/dist/runtime/components/LibColorInput/LibColorInput.stories.d.ts +0 -7
  136. package/dist/runtime/components/LibColorInput/LibColorInput.stories.js +0 -58
  137. package/dist/runtime/components/LibColorPicker/LibColorPicker.stories.d.ts +0 -9
  138. package/dist/runtime/components/LibColorPicker/LibColorPicker.stories.js +0 -68
  139. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.d.ts +0 -7
  140. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.js +0 -36
  141. package/dist/runtime/components/LibDatePicker/LibDatePicker.stories.d.ts +0 -11
  142. package/dist/runtime/components/LibDatePicker/LibDatePicker.stories.js +0 -98
  143. package/dist/runtime/components/LibDebug/LibDebug.stories.d.ts +0 -9
  144. package/dist/runtime/components/LibDebug/LibDebug.stories.js +0 -46
  145. package/dist/runtime/components/LibFileInput/LibFileInput.stories.d.ts +0 -10
  146. package/dist/runtime/components/LibFileInput/LibFileInput.stories.js +0 -63
  147. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.d.ts +0 -33
  148. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.js +0 -384
  149. package/dist/runtime/components/LibLabel/LibLabel.stories.d.ts +0 -6
  150. package/dist/runtime/components/LibLabel/LibLabel.stories.js +0 -25
  151. package/dist/runtime/components/LibMultiValues/LibMultiValues.stories.d.ts +0 -23
  152. package/dist/runtime/components/LibMultiValues/LibMultiValues.stories.js +0 -61
  153. package/dist/runtime/components/LibNotifications/LibNotification.stories.d.ts +0 -15
  154. package/dist/runtime/components/LibNotifications/LibNotification.stories.js +0 -126
  155. package/dist/runtime/components/LibNotifications/LibNotifications.stories.d.ts +0 -6
  156. package/dist/runtime/components/LibNotifications/LibNotifications.stories.js +0 -109
  157. package/dist/runtime/components/LibPagination/LibPagination.stories.d.ts +0 -6
  158. package/dist/runtime/components/LibPagination/LibPagination.stories.js +0 -40
  159. package/dist/runtime/components/LibPalette/LibPalette.stories.d.ts +0 -6
  160. package/dist/runtime/components/LibPalette/LibPalette.stories.js +0 -20
  161. package/dist/runtime/components/LibPopup/LibPopup.stories.d.ts +0 -14
  162. package/dist/runtime/components/LibPopup/LibPopup.stories.js +0 -147
  163. package/dist/runtime/components/LibProgressBar/LibProgressBar.stories.d.ts +0 -10
  164. package/dist/runtime/components/LibProgressBar/LibProgressBar.stories.js +0 -81
  165. package/dist/runtime/components/LibRecorder/LibRecorder.stories.d.ts +0 -19
  166. package/dist/runtime/components/LibRecorder/LibRecorder.stories.js +0 -63
  167. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.stories.d.ts +0 -26
  168. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.stories.js +0 -78
  169. package/dist/runtime/components/LibSuggestions/LibSuggestions.stories.d.ts +0 -27
  170. package/dist/runtime/components/LibSuggestions/LibSuggestions.stories.js +0 -112
  171. package/dist/runtime/components/LibTable/LibTable.stories.d.ts +0 -16
  172. package/dist/runtime/components/LibTable/LibTable.stories.js +0 -156
  173. package/dist/runtime/components/Reset.stories.d.ts +0 -5
  174. package/dist/runtime/components/Reset.stories.js +0 -19
  175. package/dist/runtime/components/Scrolling.stories.d.ts +0 -6
  176. package/dist/runtime/components/Scrolling.stories.js +0 -44
  177. package/dist/runtime/composables/useScrollNearContainerEdges.stories.d.ts +0 -7
  178. package/dist/runtime/composables/useScrollNearContainerEdges.stories.js +0 -85
  179. package/dist/types.d.ts +0 -7
@@ -0,0 +1,45 @@
1
+ import { type TableHTMLAttributes } from "vue";
2
+ import type { ResizableOptions, TableColConfig } from "../../types/index.js.js";
3
+ import type { TailwindClassProp } from "../shared/props.js.js";
4
+ type T = any;
5
+ type RealProps = {
6
+ resizable?: Partial<ResizableOptions>;
7
+ values?: T[];
8
+ itemKey?: keyof T | ((item: T) => string);
9
+ /** Let's the table know the shape of the data since values might be empty. */
10
+ cols?: (keyof T)[];
11
+ rounded?: boolean;
12
+ border?: boolean;
13
+ cellBorder?: boolean;
14
+ header?: boolean;
15
+ colConfig?: TableColConfig<T>;
16
+ };
17
+ interface Props extends
18
+ /** @vue-ignore */
19
+ Partial<Omit<TableHTMLAttributes, "class" | "readonly" | "disabled"> & TailwindClassProp>, RealProps {
20
+ }
21
+ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
22
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Props & Partial<{}>> & import("vue").PublicProps;
23
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
24
+ attrs: any;
25
+ slots: {
26
+ [x: string]: ((props: {
27
+ colKey: any;
28
+ style: string;
29
+ class: string;
30
+ }) => any) | undefined;
31
+ } & {
32
+ [x: string]: ((props: {
33
+ class: string;
34
+ item: any;
35
+ value: any;
36
+ }) => any) | undefined;
37
+ };
38
+ emit: {};
39
+ }>) => import("vue").VNode & {
40
+ __ctx?: Awaited<typeof __VLS_setup>;
41
+ };
42
+ export default _default;
43
+ type __VLS_PrettifyLocal<T> = {
44
+ [K in keyof T as K]: T[K];
45
+ } & {};
@@ -1,49 +1,28 @@
1
- <!-- eslint-disable -->
2
1
  <template>
3
2
  <div :class="twMerge(`
4
3
 
5
- `, ($attrs as any).class)"
6
- v-bind="{...$attrs, class:undefined}"
4
+ `, $attrs.class)"
5
+ v-bind="{ ...$attrs, class: void 0 }"
7
6
  >
8
7
  <slot/>
9
8
  </div>
10
9
  </template>
11
- <script setup lang="ts">
12
-
13
- import { computed, type HTMLAttributes, onBeforeUnmount, onMounted, type PropType, reactive, type Ref, ref, watch } from "vue"
14
-
15
- import { twMerge } from "../../utils/twMerge.js"
16
- import { baseInteractiveProps, type TailwindClassProp } from "../shared/props.js"
17
-
18
10
 
11
+ <script setup>
12
+ import { ref } from "vue";
13
+ import { twMerge } from "../../utils/twMerge.js";
14
+ import {} from "../shared/props.js";
19
15
  defineOptions({
20
- name: "lib-name", /* todo */
21
- inheritAttrs: false,
22
- })
23
-
24
-
25
- // const props = defineProps<{}>({ })
26
-
27
- const el = ref<null | HTMLElement>(null)
28
-
29
- const modelValue = defineModel<string>({ required: true })
30
-
31
-
16
+ name: "lib-name",
17
+ /* todo */
18
+ inheritAttrs: false
19
+ });
20
+ const el = ref(null);
21
+ const modelValue = defineModel({ type: String, ...{ required: true } });
32
22
  </script>
33
23
 
34
- <script lang="ts">
24
+ <script>
35
25
  export default {
36
- name: "lib-name",
37
- }
38
-
39
- type RealProps = {
40
- }
41
-
42
- interface Props
43
- extends
44
- /** @vue-ignore */
45
- Partial<Omit<HTMLAttributes, "class">
46
- & TailwindClassProp
47
- & RealProps
48
- > { }
26
+ name: "lib-name"
27
+ };
49
28
  </script>
@@ -0,0 +1,17 @@
1
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
2
+ modelValue: string;
3
+ }, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:modelValue": (value: string) => any;
5
+ }, string, import("vue").PublicProps, Readonly<{
6
+ modelValue: string;
7
+ }> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
10
+ default?: (props: {}) => any;
11
+ }>;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -7,13 +7,10 @@
7
7
  </div>
8
8
  </template>
9
9
 
10
- <script setup lang="ts">
11
- import LibDarkModeSwitcher from "../LibDarkModeSwitcher/LibDarkModeSwitcher.vue"
12
-
13
- defineOptions({ name: "test-controls" })
14
- defineProps< {
15
- showOutline: boolean
16
- }>()
17
-
10
+ <script setup>
11
+ import LibDarkModeSwitcher from "../LibDarkModeSwitcher/LibDarkModeSwitcher.vue";
12
+ defineOptions({ name: "test-controls" });
13
+ defineProps({
14
+ showOutline: { type: Boolean, required: true }
15
+ });
18
16
  </script>
19
-
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ showOutline: boolean;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, 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,4 +1,3 @@
1
- import { type PropType } from "vue";
2
1
  import type { PopupPositioner, PopupPositionModifier } from "../../types/index.js";
3
2
  export interface LinkableByIdProps {
4
3
  /**
@@ -145,28 +144,6 @@ export interface PopupProps {
145
144
  modifyPosition?: PopupPositionModifier;
146
145
  canClose?: boolean;
147
146
  }
148
- export declare const baseInteractiveProps: {
149
- readonly unstyle: {
150
- readonly type: PropType<boolean>;
151
- readonly required: false;
152
- readonly default: false;
153
- };
154
- readonly disabled: {
155
- readonly type: PropType<boolean>;
156
- readonly required: false;
157
- readonly default: false;
158
- };
159
- readonly readonly: {
160
- readonly type: PropType<boolean>;
161
- readonly required: false;
162
- readonly default: false;
163
- };
164
- readonly border: {
165
- readonly type: PropType<boolean>;
166
- readonly required: false;
167
- readonly default: true;
168
- };
169
- };
170
147
  export type BaseInteractiveProps = {
171
148
  /** Default is false. */
172
149
  disabled?: boolean;
@@ -177,12 +154,6 @@ export type BaseInteractiveProps = {
177
154
  /** Removes styles from the component. Default is false. */
178
155
  unstyle?: boolean;
179
156
  };
180
- export declare const baseInteractivePropsDefaults: {
181
- disabled: boolean;
182
- readonly: boolean;
183
- border: boolean;
184
- unstyle: boolean;
185
- };
186
157
  /**
187
158
  * @internal
188
159
  * For easily typing attributes created by useDivideAttrs. See readme.
@@ -1,14 +1,2 @@
1
1
  import { useId } from "vue";
2
2
  export const getFallbackId = () => useId();
3
- export const baseInteractiveProps = {
4
- unstyle: { type: Boolean, required: false, default: false },
5
- disabled: { type: Boolean, required: false, default: false },
6
- readonly: { type: Boolean, required: false, default: false },
7
- border: { type: Boolean, required: false, default: true }
8
- };
9
- export const baseInteractivePropsDefaults = {
10
- disabled: false,
11
- readonly: false,
12
- border: true,
13
- unstyle: false
14
- };
@@ -1,4 +1,4 @@
1
- import { castType } from "@alanscodelog/utils/castType.js";
1
+ import { castType } from "@alanscodelog/utils/castType";
2
2
  import { onBeforeUnmount, onMounted, ref, watch } from "vue";
3
3
  export function useAccesibilityOutline(target, enable = ref(true)) {
4
4
  const outline = ref(false);
@@ -1,4 +1,4 @@
1
- import { keys } from "@alanscodelog/utils/keys.js";
1
+ import { keys } from "@alanscodelog/utils/keys";
2
2
  import { computed, useAttrs } from "vue";
3
3
  export const useDivideAttrs = (divisionKeys) => computed(() => {
4
4
  const attrs = useAttrs();
@@ -1,7 +1,7 @@
1
- import { isBlank } from "@alanscodelog/utils/isBlank.js";
2
- import { isObject } from "@alanscodelog/utils/isObject.js";
3
- import { pushIfNotIn } from "@alanscodelog/utils/pushIfNotIn.js";
4
- import { removeIfIn } from "@alanscodelog/utils/removeIfIn.js";
1
+ import { isBlank } from "@alanscodelog/utils/isBlank";
2
+ import { isObject } from "@alanscodelog/utils/isObject";
3
+ import { pushIfNotIn } from "@alanscodelog/utils/pushIfNotIn";
4
+ import { removeIfIn } from "@alanscodelog/utils/removeIfIn";
5
5
  import { computed, ref, toRaw, watch } from "vue";
6
6
  export function useSuggestions($inputValue, $modelValue, $open, emit, opts, debug = false) {
7
7
  if (typeof opts.suggestions?.[0] === "object" && !opts.suggestionLabel && !opts.suggestionsFilter) {
@@ -1,7 +1,7 @@
1
- import { castType } from "@alanscodelog/utils/castType.js";
2
- import { last } from "@alanscodelog/utils/last.js";
3
- import { throttle } from "@alanscodelog/utils/throttle.js";
4
- import { unreachable } from "@alanscodelog/utils/unreachable.js";
1
+ import { castType } from "@alanscodelog/utils/castType";
2
+ import { last } from "@alanscodelog/utils/last";
3
+ import { throttle } from "@alanscodelog/utils/throttle";
4
+ import { unreachable } from "@alanscodelog/utils/unreachable";
5
5
  import { globalResizeObserver } from "../globalResizeObserver.js";
6
6
  const observer = globalResizeObserver;
7
7
  const callbacks = {};
@@ -8,7 +8,7 @@ import type { Directive } from "vue";
8
8
  *
9
9
  * One can create a ref:
10
10
  * ```ts
11
- * import { vExtractRootEl } from "@witchcraft/ui/directives/vExtractRootEl.js"
11
+ * import { vExtractRootEl } from "@witchcraft/ui/directives/vExtractRootEl"
12
12
  * const el = ref<HTMLElement|null>(null)
13
13
  *
14
14
  * ```
@@ -9,7 +9,7 @@ import type { Directive } from "vue";
9
9
  * </div>
10
10
  * </template>
11
11
  * <script setup>
12
- * import {vResizeCols} from "@witchcraft/ui/directives/vResizableCols.js"
12
+ * import {vResizeCols} from "@witchcraft/ui/directives/vResizableCols"
13
13
  * </script>
14
14
  * ```
15
15
  *
@@ -1,7 +1,7 @@
1
- import { castType } from "@alanscodelog/utils/castType.js";
2
- import { override } from "@alanscodelog/utils/override.js";
3
- import { throttle } from "@alanscodelog/utils/throttle.js";
4
- import { unreachable } from "@alanscodelog/utils/unreachable.js";
1
+ import { castType } from "@alanscodelog/utils/castType";
2
+ import { override } from "@alanscodelog/utils/override";
3
+ import { throttle } from "@alanscodelog/utils/throttle";
4
+ import { unreachable } from "@alanscodelog/utils/unreachable";
5
5
  import { globalResizeObserver } from "../globalResizeObserver.js";
6
6
  const observer = globalResizeObserver;
7
7
  const elMap = /* @__PURE__ */ new WeakMap();
@@ -1,9 +1,9 @@
1
- import { castType } from "@alanscodelog/utils/castType.js";
2
- import { crop } from "@alanscodelog/utils/crop.js";
3
- import { indent } from "@alanscodelog/utils/indent.js";
4
- import { isBlank } from "@alanscodelog/utils/isBlank.js";
5
- import { pretty } from "@alanscodelog/utils/pretty.js";
6
- import { setReadOnly } from "@alanscodelog/utils/setReadOnly.js";
1
+ import { castType } from "@alanscodelog/utils/castType";
2
+ import { crop } from "@alanscodelog/utils/crop";
3
+ import { indent } from "@alanscodelog/utils/indent";
4
+ import { isBlank } from "@alanscodelog/utils/isBlank";
5
+ import { pretty } from "@alanscodelog/utils/pretty";
6
+ import { setReadOnly } from "@alanscodelog/utils/setReadOnly";
7
7
  export class NotificationHandler {
8
8
  timeout = 5e3;
9
9
  debug = false;
@@ -1,10 +1,10 @@
1
1
  export const base64ToImg = async (imageSrc) => {
2
2
  const img = new Image();
3
- const loaded = new Promise((resolve) => {
3
+ const loaded = new Promise(((resolve) => {
4
4
  img.addEventListener("load", () => {
5
5
  resolve(img);
6
6
  });
7
- });
7
+ }));
8
8
  img.src = imageSrc;
9
9
  await loaded;
10
10
  return img;
@@ -1,4 +1,4 @@
1
- import { isArray } from "@alanscodelog/utils/isArray.js";
1
+ import { isArray } from "@alanscodelog/utils/isArray";
2
2
  import { defineNuxtPlugin, useRuntimeConfig } from "#imports";
3
3
  import { registerDirectives } from "../../vue/registerDirectives.js";
4
4
  export default defineNuxtPlugin({
@@ -1,2 +1,2 @@
1
- import { type themeAsTailwindCss } from "metamorphosis/tailwind.js";
1
+ import { type themeAsTailwindCss } from "metamorphosis/tailwind";
2
2
  export declare const themeConvertionOpts: Parameters<typeof themeAsTailwindCss>[1];
@@ -1,2 +1,2 @@
1
- import type { Theme } from "metamorphosis/Theme.js";
1
+ import type { Theme } from "metamorphosis/Theme";
2
2
  export declare const theme: Theme;
@@ -1,2 +1,2 @@
1
- import { baseTheme } from "metamorphosis/BaseTheme.js";
1
+ import { baseTheme } from "metamorphosis/BaseTheme";
2
2
  export const theme = baseTheme;
@@ -1,4 +1,4 @@
1
- import { TypedError } from "@alanscodelog/utils/TypedError.js";
1
+ import { TypedError } from "@alanscodelog/utils/TypedError";
2
2
  import { useNotificationHandler } from "../composables/useNotificationHandler.js";
3
3
  export function notifyIfError(err, {
4
4
  logger,
@@ -1,4 +1,4 @@
1
- import { capitalize } from "@alanscodelog/utils/capitalize.js";
1
+ import { capitalize } from "@alanscodelog/utils/capitalize";
2
2
  export const registerComponents = (app, components, prefix = "") => {
3
3
  for (const key of Object.keys(components)) {
4
4
  const component = components[key];
package/dist/types.d.mts CHANGED
@@ -1,7 +1,3 @@
1
- import type { NuxtModule } from '@nuxt/schema'
1
+ export { default } from './module.mjs'
2
2
 
3
- import type { default as Module } from './module.js'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module.js'
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@witchcraft/ui",
3
- "version": "0.1.3",
3
+ "version": "0.2.1-beta.1",
4
4
  "description": "Vue component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime/main.lib.js",
@@ -10,10 +10,6 @@
10
10
  "types": "./types/index.d.ts",
11
11
  "import": "./dist/runtime/main.lib.js"
12
12
  },
13
- "./*": {
14
- "import": "./dist/runtime/*",
15
- "types": "./dist/runtime/*.d.ts"
16
- },
17
13
  "./components": {
18
14
  "types": "./dist/runtime/components/index.d.ts",
19
15
  "import": "./dist/runtime/components/index.js"
@@ -22,10 +18,6 @@
22
18
  "types": "./dist/runtime/components/*/*.vue.d.ts",
23
19
  "import": "./dist/runtime/components/*/*.vue"
24
20
  },
25
- "./composables/*": {
26
- "types": "./dist/runtime/composables/*",
27
- "import": "./dist/runtime/composables/*"
28
- },
29
21
  "./composables": {
30
22
  "types": "./dist/runtime/composables/index.d.ts",
31
23
  "import": "./dist/runtime/composables/index.js"
@@ -34,22 +26,10 @@
34
26
  "types": "./dist/runtime/directives/index.d.ts",
35
27
  "import": "./dist/runtime/directives/index.js"
36
28
  },
37
- "./directives/*": {
38
- "types": "./dist/runtime/directives/*",
39
- "import": "./dist/runtime/directives/*"
40
- },
41
29
  "./helpers": {
42
30
  "types": "./dist/runtime/helpers/index.d.ts",
43
31
  "import": "./dist/runtime/helpers/index.js"
44
32
  },
45
- "./helpers/*": {
46
- "types": "./dist/runtime/helpers/*",
47
- "import": "./dist/runtime/helpers/*"
48
- },
49
- "./build/*": {
50
- "types": "./dist/runtime/build/*.d.ts",
51
- "import": "./dist/runtime/build/*"
52
- },
53
33
  "./utils.css": "./src/runtime/assets/utils.css",
54
34
  "./base.css": "./src/runtime/assets/base.css",
55
35
  "./nuxt": {
@@ -59,6 +39,10 @@
59
39
  "./types": {
60
40
  "types": "./dist/runtime/types/index.d.ts",
61
41
  "import": "./dist/runtime/types/index.js"
42
+ },
43
+ "./*": {
44
+ "import": "./dist/runtime/*.js",
45
+ "types": "./dist/runtime/*.d.ts"
62
46
  }
63
47
  },
64
48
  "unbuild": {
@@ -67,6 +51,7 @@
67
51
  "scripts": {
68
52
  "prepare": "husky && pnpm gen:theme && cd playground && pnpm i",
69
53
  "build": "nuxt-module-build prepare && nuxt-module-build build && nuxi generate playground",
54
+ "build:only": "nuxt-module-build build",
70
55
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
71
56
  "dev": "nuxi dev playground",
72
57
  "storybook": "BROWSER=none storybook dev -p 6006",
@@ -87,8 +72,7 @@
87
72
  "gen:theme": "echo src/runtime/build/generateTheme.ts"
88
73
  },
89
74
  "peerDependencies": {
90
- "@iconify/json": "^2.2.323",
91
- "tailwindcss": "^4.0.17",
75
+ "tailwindcss": "^4.1.12",
92
76
  "unplugin-icons": "^22.1.0",
93
77
  "vue": "^3.2.47"
94
78
  },
@@ -101,83 +85,82 @@
101
85
  }
102
86
  },
103
87
  "dependencies": {
104
- "@alanscodelog/utils": "^5.1.0",
88
+ "@alanscodelog/utils": "^6.0.1",
105
89
  "@egoist/vue-to-react": "^1.2.0",
106
- "@iconify/json": "^2.2.323",
107
- "@nuxt/kit": "^4.0.1",
108
- "@nuxt/schema": "^4.0.1",
109
- "@nuxt/types": "^2.17.3",
110
- "@tailwindcss/vite": "^4.1.0",
111
- "@witchcraft/nuxt-utils": "^0.1.0",
90
+ "@iconify/json": "^2.2.379",
91
+ "@nuxt/kit": "^4.0.3",
92
+ "@nuxt/schema": "^4.0.3",
93
+ "@nuxt/types": "^2.18.1",
94
+ "@tailwindcss/vite": "^4.1.12",
95
+ "@witchcraft/nuxt-utils": "^0.2.1",
112
96
  "colord": "^2.9.3",
113
97
  "colorjs.io": "0.6.0-alpha.1",
114
98
  "defu": "^6.1.4",
115
- "fast-glob": "^3.3.2",
116
- "metamorphosis": "^0.4.1",
117
- "reka-ui": "^2.2.1",
118
- "tailwind-merge": "^3.1.0",
119
- "unplugin-icons": "^22.1.0",
120
- "unplugin-vue-components": "^28.4.1",
121
- "vue-component-type-helpers": "^2.0.29"
99
+ "fast-glob": "^3.3.3",
100
+ "metamorphosis": "^0.6.1",
101
+ "reka-ui": "^2.5.0",
102
+ "tailwind-merge": "^3.3.1",
103
+ "unplugin-icons": "^22.2.0",
104
+ "unplugin-vue-components": "^28.8.0",
105
+ "vue-component-type-helpers": "^2.2.12"
122
106
  },
123
107
  "devDependencies": {
124
- "@alanscodelog/commitlint-config": "^3.0.2",
125
- "@alanscodelog/eslint-config": "^5.0.0",
108
+ "@alanscodelog/commitlint-config": "^3.1.2",
109
+ "@alanscodelog/eslint-config": "^5.0.4",
126
110
  "@alanscodelog/semantic-release-config": "^5.0.4",
127
- "@alanscodelog/tsconfigs": "^6.0.0",
111
+ "@alanscodelog/tsconfigs": "^6.1.0",
128
112
  "@alanscodelog/vite-config": "^0.0.5",
129
- "@chromatic-com/storybook": "^3.2.6",
130
- "@commitlint/cli": "^19.3.0",
131
- "@internationalized/date": "^3.1.0",
132
- "@nuxt/eslint-config": "^1.3.0",
133
- "@nuxt/module-builder": "^0.8.4",
134
- "@nuxtjs/i18n": "^9.5.3",
135
- "@playwright/test": "=1.50.0",
113
+ "@chromatic-com/storybook": "^3.2.7",
114
+ "@commitlint/cli": "^19.8.1",
115
+ "@internationalized/date": "^3.9.0",
116
+ "@nuxt/eslint-config": "^1.9.0",
117
+ "@nuxt/module-builder": "^1.0.2",
118
+ "@nuxtjs/i18n": "^9.5.6",
119
+ "@playwright/test": "^1.55.0",
136
120
  "@rollup/plugin-node-resolve": "^16.0.1",
137
- "@storybook/addon-a11y": "^8.6.12",
138
- "@storybook/addon-actions": "^8.6.12",
139
- "@storybook/addon-essentials": "^8.6.12",
140
- "@storybook/addon-interactions": "^8.6.12",
141
- "@storybook/addon-links": "^8.6.12",
142
- "@storybook/addon-storysource": "^8.6.12",
143
- "@storybook/blocks": "^8.6.12",
144
- "@storybook/manager-api": "^8.6.12",
145
- "@storybook/test": "^8.6.12",
146
- "@storybook/test-runner": "^0.22.0",
147
- "@storybook/vue3": "^8.6.12",
148
- "@storybook/vue3-vite": "^8.6.12",
149
- "@tailwindcss/cli": "^4.1.4",
150
- "@tailwindcss/postcss": "^4.1.2",
151
- "@types/node": "^24.1.0",
152
- "@vitejs/plugin-vue": "^6.0.0",
153
- "@vue/runtime-core": "^3.4.27",
154
- "@vue/runtime-dom": "^3.4.27",
155
- "@vueuse/components": "^13.0.0",
156
- "@vueuse/core": "^13.0.0",
157
- "autoprefixer": "^10.4.19",
158
- "concurrently": "^9.1.2",
159
- "eslint": "^9.32.0",
160
- "eslint-plugin-jsdoc": "^48.0.0",
121
+ "@storybook/addon-a11y": "^8.6.14",
122
+ "@storybook/addon-actions": "^8.6.14",
123
+ "@storybook/addon-essentials": "^8.6.14",
124
+ "@storybook/addon-interactions": "^8.6.14",
125
+ "@storybook/addon-links": "^8.6.14",
126
+ "@storybook/addon-storysource": "^8.6.14",
127
+ "@storybook/blocks": "^8.6.14",
128
+ "@storybook/manager-api": "^8.6.14",
129
+ "@storybook/test": "^8.6.14",
130
+ "@storybook/test-runner": "^0.22.1",
131
+ "@storybook/vue3": "^8.6.14",
132
+ "@storybook/vue3-vite": "^8.6.14",
133
+ "@tailwindcss/cli": "^4.1.12",
134
+ "@tailwindcss/postcss": "^4.1.12",
135
+ "@types/node": "^24.3.0",
136
+ "@vitejs/plugin-vue": "^6.0.1",
137
+ "@vue/runtime-core": "^3.5.20",
138
+ "@vue/runtime-dom": "^3.5.20",
139
+ "@vueuse/components": "^13.8.0",
140
+ "@vueuse/core": "^13.8.0",
141
+ "autoprefixer": "^10.4.21",
142
+ "concurrently": "^9.2.1",
143
+ "eslint": "^9.34.0",
144
+ "eslint-plugin-jsdoc": "^48.11.0",
161
145
  "http-server": "^14.1.1",
162
- "husky": "^9.0.11",
146
+ "husky": "^9.1.7",
163
147
  "indexit": "2.1.0-beta.3",
164
148
  "madge": "^7.0.0",
165
- "nuxt": "^4.0.1",
166
- "playwright": "=1.50.0",
167
- "playwright-core": "=1.50.0",
168
- "semantic-release": "^24.1.2",
169
- "storybook": "^8.6.12",
149
+ "nuxt": "^4.0.3",
150
+ "playwright": "^1.55.0",
151
+ "playwright-core": "^1.55.0",
152
+ "semantic-release": "^24.2.7",
153
+ "storybook": "^8.6.14",
170
154
  "storybook-dark-mode": "^4.0.2",
171
- "tailwindcss": "^4.1.2",
155
+ "tailwindcss": "^4.1.12",
172
156
  "ts-node": "^10.9.2",
173
- "typescript": "~5.8.2",
174
- "unbuild": "^3.5.0",
175
- "vite": "^7.0.6",
176
- "vite-plugin-externalize-deps": "^0.9.0",
177
- "vite-tsconfig-paths": "^5.0.1",
178
- "vue": "^3.5.13",
157
+ "typescript": "^5.9.2",
158
+ "unbuild": "^3.6.1",
159
+ "vite": "^7.1.3",
160
+ "vite-tsconfig-paths": "^5.1.4",
161
+ "vue": "^3.5.20",
179
162
  "vue-tsc": "3.0.4",
180
- "wait-on": "^8.0.3"
163
+ "wait-on": "^8.0.4"
181
164
  },
182
165
  "author": "Alan <alanscodelog@gmail.com>",
183
166
  "repository": "https://github.com/witchcraftjs/ui",
@@ -202,10 +185,5 @@
202
185
  },
203
186
  "publishConfig": {
204
187
  "access": "public"
205
- },
206
- "pnpm": {
207
- "overrides": {
208
- "rollup": "=4.45.0"
209
- }
210
188
  }
211
189
  }