@tresjs/leches 1.1.3 → 1.2.0

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.
@@ -29,6 +29,7 @@ export interface LechesNumberControl extends Omit<LechesControl<number>, 'type'>
29
29
  min?: number;
30
30
  max?: number;
31
31
  step?: number;
32
+ format?: (value: number) => string;
32
33
  }
33
34
  export interface LechesStringControl extends Omit<LechesControl<string>, 'type'> {
34
35
  type: 'text' | 'color';
@@ -46,6 +47,10 @@ export interface LechesButtonControl extends Omit<LechesControl<LechesSelectCont
46
47
  export interface LechesVectorControl extends Omit<LechesControl<any>, 'type'> {
47
48
  type: 'vector';
48
49
  value: any;
50
+ step?: number;
51
+ min?: number;
52
+ max?: number;
53
+ format?: (value: number) => string;
49
54
  }
50
55
  export interface LechesGraphControl extends Omit<LechesControl<any>, 'type'> {
51
56
  type: 'graph' | 'fpsgraph';
@@ -0,0 +1,4 @@
1
+ export declare function inferDecimalsFromStep(step: number): number;
2
+ export declare function defaultFormat(step: number): (value: number) => string;
3
+ export declare function getInputMode(step: number): 'numeric' | 'decimal';
4
+ export declare function clampValue(value: number, min?: number, max?: number): number;
@@ -1,2 +1,3 @@
1
+ export * from './format';
1
2
  export * from './is';
2
3
  export * from './normalize';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tresjs/leches",
3
3
  "type": "module",
4
- "version": "1.1.3",
4
+ "version": "1.2.0",
5
5
  "description": "Tasty GUI for Vue controls 🍰",
6
6
  "author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
7
7
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "rollup-plugin-analyzer": "^4.0.0",
64
64
  "rollup-plugin-visualizer": "^6.0.3",
65
65
  "typescript": "^5.8.3",
66
- "unocss": "^66.1.2",
66
+ "unocss": "^66.6.7",
67
67
  "unplugin-vue-components": "^28.8.0",
68
68
  "vite": "^7.1.9",
69
69
  "vite-plugin-banner": "^0.8.1",
@@ -83,6 +83,7 @@
83
83
  },
84
84
  "scripts": {
85
85
  "build": "vite build",
86
+ "build:analyze": "ANALYZE=true vite build",
86
87
  "preview": "vite preview",
87
88
  "test": "vitest",
88
89
  "test:ci": "echo 'Tests disabled for this branch'",