@witchcraft/ui 0.2.1-beta.3 → 0.2.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 (173) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/build/WitchcraftUiResolver.d.ts +2 -2
  4. package/dist/runtime/build/generateTheme.js +2 -2
  5. package/dist/runtime/components/Aria/Aria.vue +4 -2
  6. package/dist/runtime/components/Aria/Aria.vue.d.ts +1 -1
  7. package/dist/runtime/components/Icon/Icon.vue +3 -3
  8. package/dist/runtime/components/Icon/Icon.vue.d.ts +1 -1
  9. package/dist/runtime/components/LibButton/LibButton.vue +9 -4
  10. package/dist/runtime/components/LibButton/LibButton.vue.d.ts +1 -1
  11. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +3 -4
  12. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +1 -1
  13. package/dist/runtime/components/LibColorInput/LibColorInput.vue +15 -8
  14. package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +1 -1
  15. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue +10 -6
  16. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +1 -1
  17. package/dist/runtime/components/LibColorPicker/utils/truncate.js +1 -1
  18. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +5 -2
  19. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts +1 -1
  20. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +1 -1
  21. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue +8 -6
  22. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +1 -1
  23. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue +7 -5
  24. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue.d.ts +1 -1
  25. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue.d.ts +1 -1
  26. package/dist/runtime/components/LibDebug/LibDebug.vue +9 -4
  27. package/dist/runtime/components/LibDebug/LibDebug.vue.d.ts +1 -1
  28. package/dist/runtime/components/LibDevOnly/LibDevOnly.vue +2 -1
  29. package/dist/runtime/components/LibDevOnly/LibDevOnly.vue.d.ts +4 -1
  30. package/dist/runtime/components/LibFileInput/LibFileInput.vue +29 -13
  31. package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +2 -2
  32. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +42 -12
  33. package/dist/runtime/components/LibLabel/LibLabel.vue +2 -2
  34. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +3 -3
  35. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +1 -2
  36. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +2 -2
  37. package/dist/runtime/components/LibNotifications/LibNotification.vue +19 -8
  38. package/dist/runtime/components/LibNotifications/LibNotifications.vue +10 -6
  39. package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +2 -2
  40. package/dist/runtime/components/LibPagination/LibPagination.vue +25 -12
  41. package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +2 -2
  42. package/dist/runtime/components/LibPalette/LibPalette.vue +6 -5
  43. package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +5 -5
  44. package/dist/runtime/components/LibPopup/LibPopup.vue +6 -4
  45. package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +3 -3
  46. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +5 -3
  47. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue.d.ts +9 -9
  48. package/dist/runtime/components/LibRecorder/LibRecorder.vue +1 -1
  49. package/dist/runtime/components/LibRecorder/LibRecorder.vue.d.ts +2 -2
  50. package/dist/runtime/components/LibRoot/LibRoot.vue +11 -6
  51. package/dist/runtime/components/LibRoot/LibRoot.vue.d.ts +1 -1
  52. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue +1 -1
  53. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +1 -1
  54. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +5 -3
  55. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +1 -1
  56. package/dist/runtime/components/LibTable/LibTable.vue +23 -8
  57. package/dist/runtime/components/LibTable/LibTable.vue.d.ts +1 -1
  58. package/dist/runtime/components/Template/NAME.vue +2 -3
  59. package/dist/runtime/components/Template/NAME.vue.d.ts +1 -1
  60. package/dist/runtime/components/TestControls/TestControls.vue +4 -2
  61. package/dist/runtime/components/TestControls/TestControls.vue.d.ts +1 -1
  62. package/dist/runtime/composables/useDragWithThreshold.d.ts +1 -1
  63. package/dist/runtime/composables/useInjectedI18n.d.ts +1 -1
  64. package/dist/runtime/composables/useScrollNearContainerEdges.d.ts +1 -1
  65. package/dist/runtime/composables/useSetupI18n.d.ts +1 -1
  66. package/dist/runtime/composables/useSuggestions.d.ts +2 -2
  67. package/dist/runtime/helpers/NotificationHandler.d.ts +1 -1
  68. package/dist/runtime/helpers/base64ToImg.js +2 -2
  69. package/dist/runtime/tailwind/themeConvertionOpts.d.ts +1 -1
  70. package/dist/runtime/types/index.d.ts +1 -1
  71. package/dist/runtime/utils/notifyIfError.d.ts +1 -1
  72. package/package.json +4 -6
  73. package/src/module.ts +25 -28
  74. package/src/runtime/build/WitchcraftUiResolver.ts +3 -3
  75. package/src/runtime/build/generateTheme.ts +3 -2
  76. package/src/runtime/build/unpluginIconViteOptions.ts +1 -1
  77. package/src/runtime/components/Aria/Aria.vue +5 -6
  78. package/src/runtime/components/Focus.stories.ts +11 -12
  79. package/src/runtime/components/Icon/Icon.vue +5 -9
  80. package/src/runtime/components/LibButton/LibButton.stories.ts +21 -22
  81. package/src/runtime/components/LibButton/LibButton.vue +23 -21
  82. package/src/runtime/components/LibCheckbox/LibCheckbox.stories.ts +6 -10
  83. package/src/runtime/components/LibCheckbox/LibCheckbox.vue +17 -19
  84. package/src/runtime/components/LibColorInput/LibColorInput.stories.ts +8 -13
  85. package/src/runtime/components/LibColorInput/LibColorInput.vue +49 -45
  86. package/src/runtime/components/LibColorPicker/LibColorPicker.stories.ts +14 -18
  87. package/src/runtime/components/LibColorPicker/LibColorPicker.vue +50 -52
  88. package/src/runtime/components/LibColorPicker/utils/safeConvertToHsva.ts +1 -2
  89. package/src/runtime/components/LibColorPicker/utils/safeConvertToRgba.ts +1 -2
  90. package/src/runtime/components/LibColorPicker/utils/truncate.ts +1 -2
  91. package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.ts +5 -8
  92. package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +11 -9
  93. package/src/runtime/components/LibDatePicker/LibDatePicker.stories.ts +14 -15
  94. package/src/runtime/components/LibDatePicker/LibDatePicker.vue +1 -2
  95. package/src/runtime/components/LibDatePicker/LibRangeDatePicker.vue +13 -13
  96. package/src/runtime/components/LibDatePicker/LibSingleDatePicker.vue +9 -8
  97. package/src/runtime/components/LibDatePicker/LibTimeZonePicker.vue +2 -1
  98. package/src/runtime/components/LibDatePicker/helpers.ts +0 -2
  99. package/src/runtime/components/LibDebug/LibDebug.stories.ts +11 -15
  100. package/src/runtime/components/LibDebug/LibDebug.vue +14 -11
  101. package/src/runtime/components/LibDevOnly/LibDevOnly.vue +8 -4
  102. package/src/runtime/components/LibFileInput/LibFileInput.stories.ts +12 -15
  103. package/src/runtime/components/LibFileInput/LibFileInput.vue +65 -47
  104. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.ts +59 -67
  105. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +73 -48
  106. package/src/runtime/components/LibLabel/LibLabel.stories.ts +4 -8
  107. package/src/runtime/components/LibLabel/LibLabel.vue +8 -8
  108. package/src/runtime/components/LibMultiValues/LibMultiValues.stories.ts +10 -15
  109. package/src/runtime/components/LibMultiValues/LibMultiValues.vue +14 -18
  110. package/src/runtime/components/LibNotifications/LibNotification.stories.ts +30 -34
  111. package/src/runtime/components/LibNotifications/LibNotification.vue +27 -17
  112. package/src/runtime/components/LibNotifications/LibNotifications.stories.ts +11 -15
  113. package/src/runtime/components/LibNotifications/LibNotifications.vue +21 -16
  114. package/src/runtime/components/LibPagination/LibPagination.stories.ts +5 -9
  115. package/src/runtime/components/LibPagination/LibPagination.vue +46 -32
  116. package/src/runtime/components/LibPalette/LibPalette.stories.ts +3 -7
  117. package/src/runtime/components/LibPalette/LibPalette.vue +13 -12
  118. package/src/runtime/components/LibPopup/LibPopup.stories.ts +19 -23
  119. package/src/runtime/components/LibPopup/LibPopup.vue +31 -35
  120. package/src/runtime/components/LibProgressBar/LibProgressBar.stories.ts +13 -17
  121. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +36 -33
  122. package/src/runtime/components/LibRecorder/LibRecorder.stories.ts +11 -12
  123. package/src/runtime/components/LibRecorder/LibRecorder.vue +34 -34
  124. package/src/runtime/components/LibRoot/LibRoot.vue +16 -12
  125. package/src/runtime/components/LibSimpleInput/LibSimpleInput.stories.ts +20 -24
  126. package/src/runtime/components/LibSimpleInput/LibSimpleInput.vue +17 -21
  127. package/src/runtime/components/LibSuggestions/LibSuggestions.stories.ts +16 -19
  128. package/src/runtime/components/LibSuggestions/LibSuggestions.vue +27 -30
  129. package/src/runtime/components/LibTable/LibTable.stories.ts +30 -33
  130. package/src/runtime/components/LibTable/LibTable.vue +38 -24
  131. package/src/runtime/components/Reset.stories.ts +3 -6
  132. package/src/runtime/components/Scrolling.stories.ts +5 -8
  133. package/src/runtime/components/Template/NAME.vue +11 -11
  134. package/src/runtime/components/Template/TemplateStory.ts +9 -10
  135. package/src/runtime/components/TestControls/TestControls.vue +5 -5
  136. package/src/runtime/components/shared/props.ts +4 -6
  137. package/src/runtime/components/shared/storyHelpers/playInput.ts +2 -3
  138. package/src/runtime/components/shared/storyHelpers/playSuggestions.ts +5 -9
  139. package/src/runtime/composables/useAccesibilityOutline.ts +1 -1
  140. package/src/runtime/composables/useAriaLabel.ts +1 -1
  141. package/src/runtime/composables/useDarkMode.ts +15 -19
  142. package/src/runtime/composables/useDragWithThreshold.ts +6 -8
  143. package/src/runtime/composables/useGlobalResizeObserver.ts +0 -1
  144. package/src/runtime/composables/useInjectedDarkMode.ts +2 -2
  145. package/src/runtime/composables/useInjectedI18n.ts +1 -1
  146. package/src/runtime/composables/useInjectedLocale.ts +3 -4
  147. package/src/runtime/composables/useScrollNearContainerEdges.stories.ts +4 -4
  148. package/src/runtime/composables/useScrollNearContainerEdges.ts +12 -13
  149. package/src/runtime/composables/useSetupI18n.ts +4 -7
  150. package/src/runtime/composables/useSetupLocale.ts +3 -5
  151. package/src/runtime/composables/useSuggestions.ts +25 -30
  152. package/src/runtime/directives/vDetectFlex.ts +5 -8
  153. package/src/runtime/directives/vExtractRootEl.ts +1 -1
  154. package/src/runtime/directives/vResizableCols.ts +3 -7
  155. package/src/runtime/directives/vResizeObserver.ts +1 -2
  156. package/src/runtime/globalResizeObserver.ts +0 -1
  157. package/src/runtime/helpers/NotificationHandler.ts +8 -12
  158. package/src/runtime/helpers/base64ToImg.ts +2 -3
  159. package/src/runtime/helpers/createNoonUtcDate.ts +0 -1
  160. package/src/runtime/helpers/defaultTranslationFunction.ts +0 -1
  161. package/src/runtime/helpers/getTimeZoneList.ts +0 -1
  162. package/src/runtime/helpers/readFile.ts +2 -2
  163. package/src/runtime/helpers/resizeObserverWrapper.ts +0 -1
  164. package/src/runtime/helpers/storybook.ts +2 -3
  165. package/src/runtime/main.lib.ts +0 -2
  166. package/src/runtime/nuxt/plugins/vue-plugin.ts +4 -5
  167. package/src/runtime/tailwind/themeConvertionOpts.ts +3 -4
  168. package/src/runtime/theme.ts +0 -1
  169. package/src/runtime/types/index.ts +3 -4
  170. package/src/runtime/utils/notifyIfError.ts +2 -2
  171. package/src/runtime/utils/twMerge.ts +2 -2
  172. package/src/runtime/vue/VueComponentsPlugin.ts +1 -2
  173. package/src/runtime/vue/registerComponents.ts +0 -1
@@ -1,5 +1,6 @@
1
1
  <template>
2
- <slot name="button"
2
+ <slot
3
+ name="button"
3
4
  :extract-el="(_) => buttonEl = _"
4
5
  />
5
6
  <!-- <Transition> -->
@@ -26,7 +27,8 @@
26
27
  ref="dialogEl"
27
28
  @mousedown.self="handleMouseup"
28
29
  >
29
- <div v-if="modelValue"
30
+ <div
31
+ v-if="modelValue"
30
32
  :class="`popup z-100 fixed ${props.avoidRepositioning ? 'transition-[top,left]' : ''}`"
31
33
  :style="`
32
34
  top:${pos.y}px;
@@ -46,7 +48,7 @@
46
48
  </template>
47
49
 
48
50
  <script setup>
49
- import { onMounted, nextTick, ref, useAttrs, watch } from "vue";
51
+ import { onMounted, ref, useAttrs, watch } from "vue";
50
52
  import { getFallbackId } from "../shared/props.js";
51
53
  import { twMerge } from "../../utils/twMerge.js";
52
54
  import { castType } from "@alanscodelog/utils/castType";
@@ -64,7 +66,7 @@ const props = defineProps({
64
66
  });
65
67
  const $attrs = useAttrs();
66
68
  defineOptions({
67
- name: "lib-popup",
69
+ name: "LibPopup",
68
70
  inheritAttrs: false
69
71
  });
70
72
  const emit = defineEmits(["close"]);
@@ -1,6 +1,6 @@
1
1
  import { type HTMLAttributes } from "vue";
2
2
  import { type LinkableByIdProps, type TailwindClassProp, type PopupProps } from "../shared/props.js.js";
3
- import type { IPopupReference, PopupPositioner } from "../../types/index.js.js";
3
+ import type { IPopupReference } from "../../types/index.js.js";
4
4
  type RealProps = LinkableByIdProps & PopupProps;
5
5
  interface Props extends
6
6
  /** @vue-ignore */
@@ -25,8 +25,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props & {
25
25
  canClose: boolean;
26
26
  useDialogForBackdrop: false;
27
27
  useBackdrop: boolean;
28
- preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | PopupPositioner;
29
- preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | PopupPositioner;
28
+ preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js.js").PopupPositioner;
29
+ preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js.js").PopupPositioner;
30
30
  avoidRepositioning: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
32
32
  button?: (props: {
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <Transition>
3
- <div v-if="!hide"
3
+ <div
4
+ v-if="!hide"
4
5
  :id="id ?? fallbackId"
5
6
  :class="twMerge(`
6
7
  progress-bar
@@ -52,7 +53,8 @@
52
53
  <span class="before:content-vertical-holder"/>
53
54
  <Transition>
54
55
  <slot>
55
- <label v-if="!psuedoHide"
56
+ <label
57
+ v-if="!psuedoHide"
56
58
  :for="id"
57
59
  class="
58
60
  text-bg
@@ -100,7 +102,7 @@ import { twMerge } from "../../utils/twMerge.js";
100
102
  import { getFallbackId } from "../shared/props.js";
101
103
  const clampVal = (n, min, max) => Math.min(Math.max(n, min), max);
102
104
  defineOptions({
103
- name: "lib-progress-bar",
105
+ name: "LibProgressBar",
104
106
  inheritAttrs: false
105
107
  });
106
108
  const fallbackId = getFallbackId();
@@ -1,26 +1,26 @@
1
- import { type HTMLAttributes } from "vue";
2
1
  import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
2
+ import type { HTMLAttributes } from "vue";
3
3
  type RealProps = LinkableByIdProps & BaseInteractiveProps & LabelProps & {
4
4
  progress: number;
5
5
  /** Will auto hide after this given time if progress is 100% or more or less than 0% until progress is set to something else. Disabled (-1) by default. */
6
6
  autohideOnComplete?: number;
7
7
  /**
8
- * Do not actually hide the element, just leave an unstyled div,
9
- * so the whole layout doesn't change on completion when autohideOnComplete is set.
10
- */
8
+ * Do not actually hide the element, just leave an unstyled div,
9
+ * so the whole layout doesn't change on completion when autohideOnComplete is set.
10
+ */
11
11
  keepSpaceWhenHidden?: boolean;
12
12
  /**
13
- * By default the progress bar is visually clamped to 0-100, even if the value might be something else.
14
- * You can change what it's clamped to here, to for example,
15
- * show at least a small sliver of the progress bar when it's still 0.
16
- */
13
+ * By default the progress bar is visually clamped to 0-100, even if the value might be something else.
14
+ * You can change what it's clamped to here, to for example,
15
+ * show at least a small sliver of the progress bar when it's still 0.
16
+ */
17
17
  clamp?: [start: number, end: number];
18
18
  };
19
19
  interface Props extends
20
20
  /** @vue-ignore */
21
21
  Partial<Omit<HTMLAttributes, "class"> & TailwindClassProp>, RealProps {
22
22
  }
23
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
23
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
24
24
  disabled: boolean;
25
25
  readonly: boolean;
26
26
  border: boolean;
@@ -78,7 +78,7 @@ import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
78
78
  import { twMerge } from "../../utils/twMerge.js";
79
79
  import { getFallbackId } from "../shared/props.js";
80
80
  defineOptions({
81
- name: "lib-recorder",
81
+ name: "LibRecorder",
82
82
  inheritAttrs: false
83
83
  });
84
84
  const t = useInjectedI18n();
@@ -14,7 +14,7 @@ type RealProps = LinkableByIdProps & BaseInteractiveProps & LabelProps & {
14
14
  * Note that the component does not handle the setting of `recording` (unless the component is disabled), `modelValue`, or `recordingValue` at all and has no mechanism for cancelling a recording. It is left to the recorder listeners and any `recorder:*` handlers to determine what to do.
15
15
  */
16
16
  recorder?: undefined | Record<string, any>;
17
- /** This provides a way to manually attach/remove event listeners to/from the element. It is an alternative to the `recorder` prop, see it for more details. Both cannot be specified at the same time.*/
17
+ /** This provides a way to manually attach/remove event listeners to/from the element. It is an alternative to the `recorder` prop, see it for more details. Both cannot be specified at the same time. */
18
18
  binders?: undefined | {
19
19
  bind: (el: HTMLElement) => void;
20
20
  unbind: (el: HTMLElement) => void;
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<Props & {
33
33
  recording?: boolean;
34
34
  /** The final value of the recorder. For intermediate values while recording, pass a recorder and set an appropriate recording value. */
35
35
  modelValue: string;
36
- }, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
37
  "update:modelValue": (value: string) => any;
38
38
  "update:recording": (value: boolean) => any;
39
39
  } & {
@@ -1,5 +1,6 @@
1
1
  <template>
2
- <div :id="id"
2
+ <div
3
+ :id="id"
3
4
  tabindex="-1"
4
5
  :class="twMerge(
5
6
  showOutline ? 'group outlined outlined-visible' : '[&_*]:outline-hidden',
@@ -33,9 +34,14 @@
33
34
  $attrs.attrs?.class
34
35
  )"
35
36
  >
36
- <TestControls v-if="testWrapperMode" :show-outline="showOutline"/>
37
- <!-- @vue-expect-error data-allow-mismatch is for vue/nuxt to allow the hydration mismatch-->
38
- <Notifications v-if="useNotifications && isClientSide" data-allow-mismatch/>
37
+ <TestControls
38
+ v-if="testWrapperMode"
39
+ :show-outline="showOutline"
40
+ />
41
+ <Notifications
42
+ v-if="useNotifications && isClientSide"
43
+ data-allow-mismatch
44
+ />
39
45
  <slot/>
40
46
  </div>
41
47
  </div>
@@ -43,7 +49,6 @@
43
49
 
44
50
  <script setup>
45
51
  import { unreachable } from "@alanscodelog/utils/unreachable";
46
- import {} from "metamorphosis";
47
52
  import { computed, onBeforeUnmount, onMounted, ref, toRaw } from "vue";
48
53
  import { useAccesibilityOutline } from "../../composables/useAccesibilityOutline.js";
49
54
  import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
@@ -58,7 +63,7 @@ import { twMerge } from "../../utils/twMerge.js";
58
63
  import Notifications from "../LibNotifications/LibNotifications.vue";
59
64
  import TestControls from "../TestControls/TestControls.vue";
60
65
  const $attrs = useDivideAttrs(["wrapper"]);
61
- defineOptions({ name: "root", inheritAttrs: false, suspensible: false });
66
+ defineOptions({ name: "Root", inheritAttrs: false, suspensible: false });
62
67
  const props = defineProps({
63
68
  theme: { type: Object, required: false, default: void 0 },
64
69
  outline: { type: Boolean, required: false, default: true },
@@ -1,4 +1,4 @@
1
- import { type Theme } from "metamorphosis";
1
+ import type { Theme } from "metamorphosis";
2
2
  import { NotificationHandler } from "../../helpers/NotificationHandler.js.js";
3
3
  type __VLS_Props = {
4
4
  theme?: Theme;
@@ -78,7 +78,7 @@ import { hasModifiers } from "../../helpers/hasModifiers.js";
78
78
  import { twMerge } from "../../utils/twMerge.js";
79
79
  import { getFallbackId } from "../shared/props.js";
80
80
  defineOptions({
81
- name: "lib-simple-input",
81
+ name: "LibSimpleInput",
82
82
  inheritAttrs: false
83
83
  });
84
84
  const fallbackId = getFallbackId();
@@ -18,7 +18,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
18
18
  readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
19
19
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onInput" | "onSubmit" | "onUpdate:modelValue"> & (Props & {
20
20
  modelValue: T;
21
- }) & Partial<{}>> & import("vue").PublicProps;
21
+ }) & {}> & import("vue").PublicProps;
22
22
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
23
23
  attrs: any;
24
24
  slots: {};
@@ -17,7 +17,8 @@
17
17
  v-bind="{ ...$.attrs, class: void 0 }"
18
18
  >
19
19
  <!-- Click event is just in case, it should not really be triggered. We can do click selections via the blur handler. -->
20
- <div :id="`suggestion-${id ?? fallbackId}-${index}`"
20
+ <div
21
+ :id="`suggestion-${id ?? fallbackId}-${index}`"
21
22
  role="option"
22
23
  :class="twMerge(
23
24
  `
@@ -41,7 +42,8 @@
41
42
  @mousedown.prevent
42
43
  @mouseup="suggestions.enterIndex(index, !Array.isArray($modelValue))"
43
44
  >
44
- <slot name="item"
45
+ <slot
46
+ name="item"
45
47
  :item="item"
46
48
  :index="index"
47
49
  :is-selected="Array.isArray($modelValue) ? $modelValue.includes(item) : $modelValue === item"
@@ -68,7 +70,7 @@ import { twMerge } from "../../utils/twMerge.js";
68
70
  import LibCheckbox from "../LibCheckbox/LibCheckbox.vue";
69
71
  import { getFallbackId } from "../shared/props.js";
70
72
  defineOptions({
71
- name: "lib-suggestions",
73
+ name: "LibSuggestions",
72
74
  inheritAttrs: false
73
75
  });
74
76
  const $ = useDivideAttrs(["item"]);
@@ -43,7 +43,7 @@ declare const _default: <TSuggestion extends string | object, TValue extends str
43
43
  */
44
44
  inputValue?: string;
45
45
  open?: boolean;
46
- }) & Partial<{}>> & import("vue").PublicProps;
46
+ }) & {}> & import("vue").PublicProps;
47
47
  expose(exposed: import("vue").ShallowUnwrapRef<{
48
48
  suggestions: {
49
49
  list: any[] | undefined;
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <!-- Assumes no scrollbars on children -->
3
- <table :class="twMerge(
3
+ <table
4
+ :class="twMerge(
4
5
  `table
5
6
  table-fixed
6
7
  border-separate
@@ -42,10 +43,17 @@
42
43
  )"
43
44
  v-resizable-cols="resizableOptions"
44
45
  >
45
- <thead v-if="header" class="table--header">
46
+ <thead
47
+ v-if="header"
48
+ class="table--header"
49
+ >
46
50
  <tr class="table--row">
47
- <template v-for="col,i of cols" :key="col">
48
- <slot :name="`header-${col.toString()}`"
51
+ <template
52
+ v-for="col, i of cols"
53
+ :key="col"
54
+ >
55
+ <slot
56
+ :name="`header-${col.toString()}`"
49
57
  :class="[
50
58
  extraClasses[`-1-${i}`],
51
59
  'cell table--header-cell',
@@ -54,7 +62,8 @@
54
62
  :style="`width:${widths.length > 0 ? widths[i] : ``}; `"
55
63
  :col-key="col"
56
64
  >
57
- <td :class="[
65
+ <td
66
+ :class="[
58
67
  extraClasses[`-1-${i}`],
59
68
  'cell table--header-cell',
60
69
  colConfig[col]?.resizable === false ? 'no-resize' : ''
@@ -68,9 +77,15 @@
68
77
  </tr>
69
78
  </thead>
70
79
  <tbody class="table--body">
71
- <template v-for="item, i of values" :key="typeof itemKey === 'function' ? itemKey(item) : item[itemKey]">
80
+ <template
81
+ v-for="item, i of values"
82
+ :key="typeof itemKey === 'function' ? itemKey(item) : item[itemKey]"
83
+ >
72
84
  <tr class="table--row">
73
- <template v-for="col, j of cols" :key="(typeof itemKey === 'function' ? itemKey(item) : item[itemKey]) + col.toString()">
85
+ <template
86
+ v-for="col, j of cols"
87
+ :key="(typeof itemKey === 'function' ? itemKey(item) : item[itemKey]) + col.toString()"
88
+ >
74
89
  <slot
75
90
  :name="col"
76
91
  :item="item"
@@ -94,7 +109,7 @@ import { computed, ref } from "vue";
94
109
  import { vResizableCols } from "../../directives/vResizableCols.js";
95
110
  import { twMerge } from "../../utils/twMerge.js";
96
111
  defineOptions({
97
- name: "lib-table"
112
+ name: "LibTable"
98
113
  });
99
114
  const props = defineProps({
100
115
  resizable: { type: Object, required: false, default: () => ({}) },
@@ -19,7 +19,7 @@ interface Props extends
19
19
  Partial<Omit<TableHTMLAttributes, "class" | "readonly" | "disabled"> & TailwindClassProp>, RealProps {
20
20
  }
21
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;
22
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Props & {}> & import("vue").PublicProps;
23
23
  expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
24
24
  attrs: any;
25
25
  slots: {
@@ -11,9 +11,8 @@
11
11
  <script setup>
12
12
  import { ref } from "vue";
13
13
  import { twMerge } from "../../utils/twMerge.js";
14
- import {} from "../shared/props.js";
15
14
  defineOptions({
16
- name: "lib-name",
15
+ name: "LibName",
17
16
  /* todo */
18
17
  inheritAttrs: false
19
18
  });
@@ -23,6 +22,6 @@ const modelValue = defineModel({ type: String, ...{ required: true } });
23
22
 
24
23
  <script>
25
24
  export default {
26
- name: "lib-name"
25
+ name: "LibName"
27
26
  };
28
27
  </script>
@@ -1,6 +1,6 @@
1
1
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
2
2
  modelValue: string;
3
- }, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
4
  "update:modelValue": (value: string) => any;
5
5
  }, string, import("vue").PublicProps, Readonly<{
6
6
  modelValue: string;
@@ -2,14 +2,16 @@
2
2
  <!-- Width 100% + 2xmargin in combination with the margins in LibRoot is a bit of a hack so that it looks like there's padding around the content in test mode (for storybook). We can't just absolutely position these controls or they make the container scroll. -->
3
3
  <div class="test-controls flex gap-2 p-1 pb-10 -ml-10 w-[calc(100%_+_var(--spacing)*20)]">
4
4
  <div class="flex-grow"/>
5
- <div class="outline-indicator">{{ showOutline ? "Outline Enabled" : "Outline Disabled" }}</div>
5
+ <div class="outline-indicator">
6
+ {{ showOutline ? "Outline Enabled" : "Outline Disabled" }}
7
+ </div>
6
8
  <lib-dark-mode-switcher/>
7
9
  </div>
8
10
  </template>
9
11
 
10
12
  <script setup>
11
13
  import LibDarkModeSwitcher from "../LibDarkModeSwitcher/LibDarkModeSwitcher.vue";
12
- defineOptions({ name: "test-controls" });
14
+ defineOptions({ name: "TestControls" });
13
15
  defineProps({
14
16
  showOutline: { type: Boolean, required: true }
15
17
  });
@@ -1,5 +1,5 @@
1
1
  type __VLS_Props = {
2
2
  showOutline: boolean;
3
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>;
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
5
  export default _default;
@@ -52,7 +52,7 @@ import type { Point } from "../types/index.js.js";
52
52
  * }
53
53
  * ```
54
54
  */
55
- export declare const useDragWithThreshold: ({ initialOffset, pointerCoords, threshold, }?: {
55
+ export declare const useDragWithThreshold: ({ initialOffset, pointerCoords, threshold }?: {
56
56
  initialOffset?: Ref<Point | undefined>;
57
57
  pointerCoords?: Ref<Point | undefined>;
58
58
  threshold?: Ref<number>;
@@ -1,2 +1,2 @@
1
- import { type TranslationFunction } from "./useSetupI18n.js.js";
1
+ import type { TranslationFunction } from "./useSetupI18n.js.js";
2
2
  export declare function useInjectedI18n(): TranslationFunction;
@@ -52,7 +52,7 @@ import type { ScrollNearContainerEdgesOptions } from "../types/index.js.js";
52
52
  * </div>
53
53
  * ```
54
54
  */
55
- export declare const useScrollNearContainerEdges: ({ containerEl, scrollMargin, outerScrollMargin, fastPixelMultiplier, fastPixelAmount, useTimer, timerInterval, }: ScrollNearContainerEdgesOptions) => {
55
+ export declare const useScrollNearContainerEdges: ({ containerEl, scrollMargin, outerScrollMargin, fastPixelMultiplier, fastPixelAmount, useTimer, timerInterval }: ScrollNearContainerEdgesOptions) => {
56
56
  scrollEdges: (clientX: number, clientY: number, overrideUseTimer?: boolean) => void;
57
57
  /** Reactive. */
58
58
  scrollIndicator: {
@@ -9,7 +9,7 @@ export type TranslationFunction = (key: string, replacements?: Record<string, an
9
9
  *
10
10
  * To avoid hydration errors, on the server, the message loading is awaited.
11
11
  */
12
- export declare function useSetupI18n({ locale, useBuiltinTranslations, useDummyMessageSetWhileLoading, translationFunction, }: {
12
+ export declare function useSetupI18n({ locale, useBuiltinTranslations, useDummyMessageSetWhileLoading, translationFunction }: {
13
13
  locale: Ref<string>;
14
14
  /** Will asynchronously load the built-in translations for the current locale (watching and updating if needed). If you don't use this, you'll need to provide a custom translation function. */
15
15
  useBuiltinTranslations?: boolean;
@@ -1,6 +1,6 @@
1
- import { type AnyFunction } from "@alanscodelog/utils";
1
+ import type { AnyFunction } from "@alanscodelog/utils";
2
2
  import { type Ref } from "vue";
3
- import { type SuggestionsEmits, type SuggestionsOptions } from "../components/shared/props.js.js";
3
+ import type { SuggestionsEmits, SuggestionsOptions } from "../components/shared/props.js.js";
4
4
  /**
5
5
  * The logic for the suggestions component.
6
6
  *
@@ -8,7 +8,7 @@ export declare class NotificationHandler<TRawEntry extends RawNotificationEntry<
8
8
  maxHistory: number;
9
9
  listeners: NotificationListener<TEntry>[];
10
10
  stringifier?: NotificationStringifier<TEntry>;
11
- constructor({ timeout, stringifier, maxHistory, }?: {
11
+ constructor({ timeout, stringifier, maxHistory }?: {
12
12
  timeout?: NotificationHandler<TRawEntry>["timeout"];
13
13
  stringifier?: NotificationHandler<TRawEntry>["stringifier"];
14
14
  maxHistory?: NotificationHandler<TRawEntry>["maxHistory"];
@@ -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,2 +1,2 @@
1
- import { type themeAsTailwindCss } from "metamorphosis/tailwind";
1
+ import type { themeAsTailwindCss } from "metamorphosis/tailwind";
2
2
  export declare const themeConvertionOpts: Parameters<typeof themeAsTailwindCss>[1];
@@ -1,5 +1,5 @@
1
1
  import type { ErrorW } from "@alanscodelog/utils";
2
- import { type Ref } from "vue";
2
+ import type { Ref } from "vue";
3
3
  export type ResizableOptions = {
4
4
  /**
5
5
  * Defaults to true.
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * If the value is not an error, it is returned.
7
7
  */
8
- export declare function notifyIfError<T>(err: T, { logger, ns, force, }?: {
8
+ export declare function notifyIfError<T>(err: T, { logger, ns, force }?: {
9
9
  logger?: {
10
10
  debug: (...args: any[]) => void;
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@witchcraft/ui",
3
- "version": "0.2.1-beta.3",
3
+ "version": "0.2.1",
4
4
  "description": "Vue component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime/main.lib.js",
@@ -86,7 +86,6 @@
86
86
  },
87
87
  "dependencies": {
88
88
  "@alanscodelog/utils": "^6.0.1",
89
- "@egoist/vue-to-react": "^1.2.0",
90
89
  "@iconify/json": "^2.2.379",
91
90
  "@nuxt/kit": "^4.0.3",
92
91
  "@nuxt/schema": "^4.0.3",
@@ -106,10 +105,10 @@
106
105
  },
107
106
  "devDependencies": {
108
107
  "@alanscodelog/commitlint-config": "^3.1.2",
109
- "@alanscodelog/eslint-config": "^5.0.4",
108
+ "@alanscodelog/eslint-config": "^6.0.0",
110
109
  "@alanscodelog/semantic-release-config": "^5.0.4",
111
110
  "@alanscodelog/tsconfigs": "^6.1.0",
112
- "@alanscodelog/vite-config": "^0.0.5",
111
+ "@alanscodelog/vite-config": "^0.0.6",
113
112
  "@chromatic-com/storybook": "^3.2.7",
114
113
  "@commitlint/cli": "^19.8.1",
115
114
  "@internationalized/date": "^3.9.0",
@@ -141,7 +140,6 @@
141
140
  "autoprefixer": "^10.4.21",
142
141
  "concurrently": "^9.2.1",
143
142
  "eslint": "^9.34.0",
144
- "eslint-plugin-jsdoc": "^48.11.0",
145
143
  "http-server": "^14.1.1",
146
144
  "husky": "^9.1.7",
147
145
  "indexit": "2.1.0-beta.3",
@@ -159,7 +157,7 @@
159
157
  "vite": "^7.1.3",
160
158
  "vite-tsconfig-paths": "^5.1.4",
161
159
  "vue": "^3.5.20",
162
- "vue-tsc": "3.0.4",
160
+ "vue-tsc": "3.0.6",
163
161
  "wait-on": "^8.0.4"
164
162
  },
165
163
  "author": "Alan <alanscodelog@gmail.com>",