zs3-ui-components 1.2.3 → 1.2.5

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.

Potentially problematic release.


This version of zs3-ui-components might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ZS3 UI Components
2
2
 
3
- **v1.2.3** · Modern Web Components library with built-in theming, i18n, reactive state, HTTP client, and more.
3
+ **v1.2.4** · Modern Web Components library with built-in theming, i18n, reactive state, HTTP client, and more.
4
4
 
5
5
  ZS3 UI Components is a zero-dependency UI library based on native **Web Components** (Custom Elements + Shadow DOM). It provides a complete set of UI components and utilities that work in any framework or in plain HTML.
6
6
 
@@ -1984,7 +1984,7 @@ Logger avançat amb nivells i formatació a la consola del navegador.
1984
1984
  ```ts
1985
1985
  import { log } from 'zs3-ui-components'
1986
1986
 
1987
- log.info('Aplicació iniciada', { version: '1.2.3' })
1987
+ log.info('Aplicació iniciada', { version: '1.2.4' })
1988
1988
  log.warn('Configuració incompleta', { missing: 'api-key' })
1989
1989
  log.error('Error en la petició', { code: 500, url: '/api/users' })
1990
1990
  log.success('Operació completada!')
@@ -59,6 +59,14 @@ export declare class $Window extends $BaseComponent {
59
59
  * After mount setup
60
60
  */
61
61
  protected afterMount(): void;
62
+ /**
63
+ * Before unmount cleanup
64
+ */
65
+ protected beforeUnmount(): void;
66
+ /**
67
+ * Setup resize handles on the 4 corners
68
+ */
69
+ private setupResizeHandles;
62
70
  /**
63
71
  * Setup event listeners
64
72
  */
@@ -85,5 +93,6 @@ export declare class $Window extends $BaseComponent {
85
93
  closable: boolean;
86
94
  minimizable: boolean;
87
95
  maximizable: boolean;
96
+ resizable: boolean;
88
97
  i18nTitle: string | null;
89
98
  }
@@ -104,4 +104,69 @@ export declare const isMoveEnabled: (dragHandle: HTMLElement) => boolean;
104
104
  * @returns La direcció de moviment o undefined si no està activat
105
105
  */
106
106
  export declare const getMoveDirection: (dragHandle: HTMLElement) => MoveDirection | undefined;
107
+ /**
108
+ * Cantonada de redimensió
109
+ */
110
+ export type ResizeCorner = 'nw' | 'ne' | 'sw' | 'se';
111
+ /**
112
+ * Elements handle per a cada cantonada
113
+ */
114
+ export interface ResizeHandles {
115
+ nw?: HTMLElement | null;
116
+ ne?: HTMLElement | null;
117
+ sw?: HTMLElement | null;
118
+ se?: HTMLElement | null;
119
+ }
120
+ /**
121
+ * Configuració per a la funcionalitat de redimensió
122
+ */
123
+ export interface ResizeConfig {
124
+ /** L'element HTML que es redimensionarà */
125
+ container: HTMLElement;
126
+ /** Elements handle per a cada cantonada */
127
+ handles: ResizeHandles;
128
+ /** Amplada mínima en píxels (per defecte 100) */
129
+ minWidth?: number;
130
+ /** Alçada mínima en píxels (per defecte 60) */
131
+ minHeight?: number;
132
+ /** Amplada màxima en píxels (opcional) */
133
+ maxWidth?: number;
134
+ /** Alçada màxima en píxels (opcional) */
135
+ maxHeight?: number;
136
+ }
137
+ /**
138
+ * Detall dels esdeveniments de resize
139
+ */
140
+ export interface ResizeEventDetail {
141
+ element: HTMLElement;
142
+ corner: ResizeCorner;
143
+ width: number;
144
+ height: number;
145
+ left: number;
146
+ top: number;
147
+ }
148
+ /**
149
+ * Aplica la funcionalitat de redimensió a un element a través de handles de cantonada.
150
+ * Suporta ratolí i tàctil. Cada cantonada ajusta width/height i, si l'element
151
+ * està posicionat (ex: window amb move), també left/top.
152
+ *
153
+ * @param config - Configuració del resize
154
+ *
155
+ * @example
156
+ * ```typescript
157
+ * resize({
158
+ * container: windowElement,
159
+ * handles: { nw: handleNW, ne: handleNE, sw: handleSW, se: handleSE },
160
+ * minWidth: 200,
161
+ * minHeight: 120,
162
+ * })
163
+ * ```
164
+ */
165
+ export declare const resize: (config: ResizeConfig) => void;
166
+ /**
167
+ * Desactiva la funcionalitat de resize d'un conjunt de handles
168
+ *
169
+ * @param handles - Els elements handle a netejar
170
+ */
171
+ export declare const disableResize: (handles: ResizeHandles) => void;
107
172
  export declare const generateEvent: (eventDescription: EventDescription) => void;