vueless 0.0.570 → 0.0.571

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.570",
3
+ "version": "0.0.571",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
package/types.ts CHANGED
@@ -250,16 +250,22 @@ export interface NestedComponent {
250
250
  [key: string]: Record<string, string | object> | string;
251
251
  }
252
252
 
253
- export type ComponentConfig<T> = [T & Component] extends [Ref]
253
+ /* Make all config keys optional and allow to have string and object values. */
254
+ export type ComponentConfig<T> = Partial<{
255
+ [K in keyof T]: T[K] | string;
256
+ }> &
257
+ Component;
258
+
259
+ export type ComponentConfigRef<T> = [T & Component] extends [Ref]
254
260
  ? Ref<T & Component>
255
261
  : Ref<UnwrapRef<T & Component>, T & Component>;
256
262
 
257
263
  export interface UseUI<T> {
258
- config: ComponentConfig<T>;
264
+ config: ComponentConfigRef<T>;
259
265
  getKeysAttrs: (mutatedProps?: ComputedRef) => KeysAttrs;
260
266
  [key: string]:
261
267
  | ComputedRef<KeyAttrs>
262
- | ComponentConfig<T>
268
+ | ComponentConfigRef<T>
263
269
  | ((mutatedProps?: ComputedRef) => KeysAttrs);
264
270
  }
265
271
 
@@ -445,6 +451,7 @@ export interface ExposeProperty {
445
451
  type: string;
446
452
  description?: string;
447
453
  }
454
+
448
455
  /**
449
456
  * Utility types to extract component props, slots, emit, exposed types.
450
457
  * Original code taken from `vue-component-type-helpers` npm package.
@@ -1,7 +1,7 @@
1
1
  import defaultConfig from "./config.ts";
2
- import type { Component } from "../types.ts";
2
+ import type { ComponentConfig } from "../types.ts";
3
3
 
4
- export type Config = Partial<typeof defaultConfig> & Component;
4
+ export type Config = ComponentConfig<typeof defaultConfig>;
5
5
 
6
6
  export type LoaderSize = "sm" | "md" | "lg";
7
7
  export type IconSize = "2xs" | "xs" | "sm" | "md";
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.570",
4
+ "version": "0.0.571",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",