@liwe3/webcomponents 1.0.2 → 1.1.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.
- package/dist/AITextEditor.d.ts +173 -0
- package/dist/AITextEditor.d.ts.map +1 -0
- package/dist/ChunkUploader.d.ts +103 -0
- package/dist/ChunkUploader.d.ts.map +1 -0
- package/dist/ChunkUploader.js +614 -0
- package/dist/ChunkUploader.js.map +1 -0
- package/dist/ContainerBox.d.ts +112 -0
- package/dist/ContainerBox.d.ts.map +1 -0
- package/dist/ContainerBox.js +359 -0
- package/dist/ContainerBox.js.map +1 -0
- package/dist/DateSelector.d.ts +103 -0
- package/dist/DateSelector.d.ts.map +1 -0
- package/dist/DateSelector.js +372 -0
- package/dist/DateSelector.js.map +1 -0
- package/dist/Drawer.d.ts +63 -0
- package/dist/Drawer.d.ts.map +1 -0
- package/dist/Drawer.js +340 -0
- package/dist/Drawer.js.map +1 -0
- package/dist/ImageView.d.ts +42 -0
- package/dist/ImageView.d.ts.map +1 -0
- package/dist/ImageView.js +209 -0
- package/dist/ImageView.js.map +1 -0
- package/dist/PopoverMenu.d.ts +103 -0
- package/dist/PopoverMenu.d.ts.map +1 -0
- package/dist/PopoverMenu.js +312 -0
- package/dist/PopoverMenu.js.map +1 -0
- package/dist/SmartSelect.d.ts +99 -0
- package/dist/SmartSelect.d.ts.map +1 -0
- package/dist/SmartSelect.js.map +1 -1
- package/dist/Toast.d.ts +127 -0
- package/dist/Toast.d.ts.map +1 -0
- package/dist/Toast.js +507 -0
- package/dist/Toast.js.map +1 -0
- package/dist/TreeView.d.ts +84 -0
- package/dist/TreeView.d.ts.map +1 -0
- package/dist/TreeView.js +478 -0
- package/dist/TreeView.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -6
- package/dist/index.js.map +1 -1
- package/package.json +43 -3
- package/src/ChunkUploader.ts +921 -0
- package/src/ContainerBox.ts +570 -0
- package/src/DateSelector.ts +550 -0
- package/src/Drawer.ts +435 -0
- package/src/ImageView.ts +265 -0
- package/src/PopoverMenu.ts +595 -0
- package/src/SmartSelect.ts +231 -231
- package/src/Toast.ts +834 -0
- package/src/TreeView.ts +673 -0
- package/src/index.ts +70 -3
package/dist/Drawer.js
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
class n extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super(), this.currentState = "expanded", this.config = {
|
|
4
|
+
direction: "horizontal",
|
|
5
|
+
duration: 300,
|
|
6
|
+
showTitleWhenShrunk: !1,
|
|
7
|
+
closable: !0,
|
|
8
|
+
title: "",
|
|
9
|
+
icon: "☰",
|
|
10
|
+
showToggleButton: !0,
|
|
11
|
+
contentPadding: "16px"
|
|
12
|
+
}, this.attachShadow({ mode: "open" }), this.render(), this.bindEvents();
|
|
13
|
+
}
|
|
14
|
+
static get observedAttributes() {
|
|
15
|
+
return ["direction", "duration", "show-title-when-shrunk", "closable", "title", "icon", "state", "show-toggle-button", "content-padding"];
|
|
16
|
+
}
|
|
17
|
+
attributeChangedCallback(t, r, e) {
|
|
18
|
+
if (r !== e) {
|
|
19
|
+
switch (t) {
|
|
20
|
+
case "direction":
|
|
21
|
+
this.config.direction = e || "horizontal";
|
|
22
|
+
break;
|
|
23
|
+
case "duration":
|
|
24
|
+
this.config.duration = parseInt(e || "300", 10);
|
|
25
|
+
break;
|
|
26
|
+
case "show-title-when-shrunk":
|
|
27
|
+
this.config.showTitleWhenShrunk = e === "true";
|
|
28
|
+
break;
|
|
29
|
+
case "closable":
|
|
30
|
+
this.config.closable = e !== "false";
|
|
31
|
+
break;
|
|
32
|
+
case "title":
|
|
33
|
+
this.config.title = e || "";
|
|
34
|
+
break;
|
|
35
|
+
case "icon":
|
|
36
|
+
this.config.icon = e || "☰";
|
|
37
|
+
break;
|
|
38
|
+
case "state":
|
|
39
|
+
this.currentState = e || "expanded";
|
|
40
|
+
break;
|
|
41
|
+
case "show-toggle-button":
|
|
42
|
+
this.config.showToggleButton = e !== "false";
|
|
43
|
+
break;
|
|
44
|
+
case "content-padding":
|
|
45
|
+
this.config.contentPadding = e ?? void 0;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
this.render();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
get direction() {
|
|
52
|
+
return this.config.direction;
|
|
53
|
+
}
|
|
54
|
+
set direction(t) {
|
|
55
|
+
this.config.direction = t, this.setAttribute("direction", t);
|
|
56
|
+
}
|
|
57
|
+
get duration() {
|
|
58
|
+
return this.config.duration;
|
|
59
|
+
}
|
|
60
|
+
set duration(t) {
|
|
61
|
+
this.config.duration = t, this.setAttribute("duration", t.toString());
|
|
62
|
+
}
|
|
63
|
+
get showTitleWhenShrunk() {
|
|
64
|
+
return this.config.showTitleWhenShrunk;
|
|
65
|
+
}
|
|
66
|
+
set showTitleWhenShrunk(t) {
|
|
67
|
+
this.config.showTitleWhenShrunk = t, this.setAttribute("show-title-when-shrunk", t.toString());
|
|
68
|
+
}
|
|
69
|
+
get closable() {
|
|
70
|
+
return this.config.closable;
|
|
71
|
+
}
|
|
72
|
+
set closable(t) {
|
|
73
|
+
this.config.closable = t, this.setAttribute("closable", t.toString());
|
|
74
|
+
}
|
|
75
|
+
get title() {
|
|
76
|
+
return this.config.title;
|
|
77
|
+
}
|
|
78
|
+
set title(t) {
|
|
79
|
+
this.config.title = t, this.setAttribute("title", t);
|
|
80
|
+
}
|
|
81
|
+
get icon() {
|
|
82
|
+
return this.config.icon;
|
|
83
|
+
}
|
|
84
|
+
set icon(t) {
|
|
85
|
+
this.config.icon = t, this.setAttribute("icon", t);
|
|
86
|
+
}
|
|
87
|
+
get showToggleButton() {
|
|
88
|
+
return this.config.showToggleButton;
|
|
89
|
+
}
|
|
90
|
+
set showToggleButton(t) {
|
|
91
|
+
this.config.showToggleButton = t, this.setAttribute("show-toggle-button", t.toString());
|
|
92
|
+
}
|
|
93
|
+
get contentPadding() {
|
|
94
|
+
return this.config.contentPadding ?? "16px";
|
|
95
|
+
}
|
|
96
|
+
set contentPadding(t) {
|
|
97
|
+
this.config.contentPadding = t, this.setAttribute("content-padding", t);
|
|
98
|
+
}
|
|
99
|
+
get state() {
|
|
100
|
+
return this.currentState;
|
|
101
|
+
}
|
|
102
|
+
set state(t) {
|
|
103
|
+
this.setState(t);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Expand the drawer
|
|
107
|
+
*/
|
|
108
|
+
expand() {
|
|
109
|
+
this.setState("expanded");
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Shrink the drawer
|
|
113
|
+
*/
|
|
114
|
+
shrink() {
|
|
115
|
+
this.setState("shrunk");
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Close the drawer (removes from DOM)
|
|
119
|
+
*/
|
|
120
|
+
close() {
|
|
121
|
+
this.setState("closed");
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Toggle between expanded and shrunk states
|
|
125
|
+
*/
|
|
126
|
+
toggle() {
|
|
127
|
+
this.currentState === "expanded" ? this.shrink() : this.currentState === "shrunk" && this.expand();
|
|
128
|
+
}
|
|
129
|
+
setState(t) {
|
|
130
|
+
const r = this.currentState;
|
|
131
|
+
this.currentState = t, this.setAttribute("state", t);
|
|
132
|
+
const e = this.shadowRoot.querySelector(".drawer-container");
|
|
133
|
+
if (e) {
|
|
134
|
+
if (this.dispatchEvent(new CustomEvent("drawer-state-change", {
|
|
135
|
+
detail: { oldState: r, newState: t },
|
|
136
|
+
bubbles: !0,
|
|
137
|
+
composed: !0
|
|
138
|
+
})), t === "closed") {
|
|
139
|
+
e.style.display = "none", this.dispatchEvent(new CustomEvent("drawer-closed", { bubbles: !0, composed: !0 })), this.remove();
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (t === "shrunk") {
|
|
143
|
+
e.style.display = "block", e.classList.add("shrunk"), e.classList.remove("expanded"), this.dispatchEvent(new CustomEvent("drawer-shrunk", { bubbles: !0, composed: !0 }));
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (t === "expanded") {
|
|
147
|
+
e.style.display = "block", e.classList.remove("shrunk"), e.classList.add("expanded"), this.dispatchEvent(new CustomEvent("drawer-expanded", { bubbles: !0, composed: !0 }));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
bindEvents() {
|
|
153
|
+
this.shadowRoot.addEventListener("click", (t) => {
|
|
154
|
+
const r = t.target;
|
|
155
|
+
r.closest(".drawer-toggle") && (t.preventDefault(), this.toggle()), r.closest(".drawer-close") && this.config.closable && (t.preventDefault(), this.close());
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
render() {
|
|
159
|
+
const t = this.config.direction === "horizontal", r = this.config.showTitleWhenShrunk, e = this.config.showToggleButton !== !1, o = this.config.contentPadding ?? "16px";
|
|
160
|
+
this.shadowRoot.innerHTML = `
|
|
161
|
+
<style>
|
|
162
|
+
:host {
|
|
163
|
+
display: block;
|
|
164
|
+
--drawer-duration: ${this.config.duration}ms;
|
|
165
|
+
--drawer-bg: #ffffff;
|
|
166
|
+
--drawer-border: #e5e7eb;
|
|
167
|
+
--drawer-text: #1f2937;
|
|
168
|
+
--drawer-icon-bg: #f3f4f6;
|
|
169
|
+
--drawer-icon-hover: #e5e7eb;
|
|
170
|
+
--drawer-button-hover: #f9fafb;
|
|
171
|
+
--drawer-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Container when expanded */
|
|
175
|
+
.drawer-container {
|
|
176
|
+
background: var(--drawer-bg);
|
|
177
|
+
border: 1px solid var(--drawer-border);
|
|
178
|
+
border-radius: 8px;
|
|
179
|
+
box-shadow: var(--drawer-shadow);
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
position: relative;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.drawer-container.horizontal {
|
|
185
|
+
width: var(--drawer-horizontal-size, 300px);
|
|
186
|
+
height: auto;
|
|
187
|
+
transition: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.drawer-container.vertical {
|
|
191
|
+
width: auto;
|
|
192
|
+
height: var(--drawer-vertical-size, 300px);
|
|
193
|
+
transition: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.drawer-container.expanded {
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.drawer-container.shrunk.horizontal {
|
|
201
|
+
width: var(--drawer-horizontal-shrunk-size, 48px);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.drawer-container.shrunk.vertical {
|
|
205
|
+
height: var(--drawer-vertical-shrunk-size, 48px);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Header area with title and buttons */
|
|
209
|
+
.drawer-header {
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
gap: 12px;
|
|
213
|
+
padding: 12px;
|
|
214
|
+
border-bottom: 1px solid var(--drawer-border);
|
|
215
|
+
transition: none;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.drawer-container.shrunk .drawer-header {
|
|
219
|
+
border-bottom: none;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.drawer-container.shrunk .drawer-title:not(.keep-visible),
|
|
223
|
+
.drawer-container.shrunk .drawer-close {
|
|
224
|
+
display: none;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.drawer-container.shrunk .drawer-title.keep-visible {
|
|
228
|
+
display: block;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.drawer-toggle {
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
width: 28px;
|
|
236
|
+
height: 28px;
|
|
237
|
+
background: var(--drawer-icon-bg);
|
|
238
|
+
border: none;
|
|
239
|
+
border-radius: 6px;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
font-size: 16px;
|
|
242
|
+
transition: background 0.2s;
|
|
243
|
+
flex-shrink: 0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.drawer-toggle:hover {
|
|
247
|
+
background: var(--drawer-icon-hover);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.drawer-title {
|
|
251
|
+
flex: 1;
|
|
252
|
+
font-size: 16px;
|
|
253
|
+
font-weight: 600;
|
|
254
|
+
color: var(--drawer-text);
|
|
255
|
+
transition: none;
|
|
256
|
+
white-space: nowrap;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.drawer-close {
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
width: 24px;
|
|
265
|
+
height: 24px;
|
|
266
|
+
background: transparent;
|
|
267
|
+
border: none;
|
|
268
|
+
border-radius: 4px;
|
|
269
|
+
cursor: pointer;
|
|
270
|
+
font-size: 18px;
|
|
271
|
+
color: #6b7280;
|
|
272
|
+
transition: none;
|
|
273
|
+
flex-shrink: 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.drawer-close:hover {
|
|
277
|
+
background: var(--drawer-button-hover);
|
|
278
|
+
color: #ef4444;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Content area */
|
|
282
|
+
.drawer-content {
|
|
283
|
+
padding: var(--drawer-content-padding, 16px);
|
|
284
|
+
transition: none;
|
|
285
|
+
overflow: auto;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.drawer-container.shrunk .drawer-content {
|
|
289
|
+
opacity: 0;
|
|
290
|
+
height: 0;
|
|
291
|
+
padding: 0;
|
|
292
|
+
overflow: hidden;
|
|
293
|
+
position: absolute;
|
|
294
|
+
z-index: -1;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Vertical specific styles */
|
|
298
|
+
.drawer-container.vertical {
|
|
299
|
+
display: flex;
|
|
300
|
+
flex-direction: column;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.drawer-container.vertical .drawer-content {
|
|
304
|
+
flex: 1;
|
|
305
|
+
overflow: auto;
|
|
306
|
+
}
|
|
307
|
+
</style>
|
|
308
|
+
|
|
309
|
+
<div class="drawer-container ${t ? "horizontal" : "vertical"} ${this.currentState}" style="display:block; --drawer-content-padding:${o};">
|
|
310
|
+
<div class="drawer-header">
|
|
311
|
+
${e ? `
|
|
312
|
+
<button class="drawer-toggle" aria-label="Toggle drawer">
|
|
313
|
+
${this.config.icon}
|
|
314
|
+
</button>
|
|
315
|
+
` : ""}
|
|
316
|
+
<div class="drawer-title ${r ? "keep-visible" : ""}">
|
|
317
|
+
${this.config.title}
|
|
318
|
+
</div>
|
|
319
|
+
${this.config.closable ? `
|
|
320
|
+
<button class="drawer-close" aria-label="Close drawer">
|
|
321
|
+
×
|
|
322
|
+
</button>
|
|
323
|
+
` : ""}
|
|
324
|
+
</div>
|
|
325
|
+
<div class="drawer-content">
|
|
326
|
+
<slot></slot>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
`;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
customElements.get("liwe3-drawer") || customElements.define("liwe3-drawer", n);
|
|
333
|
+
function s(i = "liwe3-drawer") {
|
|
334
|
+
customElements.get(i) || customElements.define(i, n);
|
|
335
|
+
}
|
|
336
|
+
export {
|
|
337
|
+
n as DrawerElement,
|
|
338
|
+
s as defineDrawer
|
|
339
|
+
};
|
|
340
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../src/Drawer.ts"],"sourcesContent":["/**\n * Drawer Web Component\n * A container that can be expanded, shrunk, or closed with smooth animations\n */\n\nexport type DrawerDirection = 'horizontal' | 'vertical';\nexport type DrawerState = 'expanded' | 'shrunk' | 'closed';\n\nexport interface DrawerConfig {\n direction?: DrawerDirection;\n duration?: number;\n showTitleWhenShrunk?: boolean;\n closable?: boolean;\n title?: string;\n icon?: string;\n showToggleButton?: boolean;\n contentPadding?: string;\n}\n\nexport class DrawerElement extends HTMLElement {\n declare shadowRoot: ShadowRoot;\n private currentState: DrawerState = 'expanded';\n private config: DrawerConfig = {\n direction: 'horizontal',\n duration: 300,\n showTitleWhenShrunk: false,\n closable: true,\n title: '',\n icon: '☰',\n showToggleButton: true,\n contentPadding: '16px'\n };\n\n constructor () {\n super();\n this.attachShadow( { mode: 'open' } );\n this.render();\n this.bindEvents();\n }\n\n static get observedAttributes (): string[] {\n return [ 'direction', 'duration', 'show-title-when-shrunk', 'closable', 'title', 'icon', 'state', 'show-toggle-button', 'content-padding' ];\n }\n\n attributeChangedCallback ( name: string, oldValue: string | null, newValue: string | null ): void {\n if ( oldValue !== newValue ) {\n switch ( name ) {\n case 'direction':\n this.config.direction = ( newValue as DrawerDirection ) || 'horizontal';\n break;\n case 'duration':\n this.config.duration = parseInt( newValue || '300', 10 );\n break;\n case 'show-title-when-shrunk':\n this.config.showTitleWhenShrunk = newValue === 'true';\n break;\n case 'closable':\n this.config.closable = newValue !== 'false';\n break;\n case 'title':\n this.config.title = newValue || '';\n break;\n case 'icon':\n this.config.icon = newValue || '☰';\n break;\n case 'state':\n this.currentState = ( newValue as DrawerState ) || 'expanded';\n break;\n case 'show-toggle-button':\n this.config.showToggleButton = newValue !== 'false';\n break;\n case 'content-padding':\n this.config.contentPadding = newValue ?? undefined;\n break;\n }\n this.render();\n }\n }\n\n get direction (): DrawerDirection {\n return this.config.direction!;\n }\n\n set direction ( value: DrawerDirection ) {\n this.config.direction = value;\n this.setAttribute( 'direction', value );\n }\n\n get duration (): number {\n return this.config.duration!;\n }\n\n set duration ( value: number ) {\n this.config.duration = value;\n this.setAttribute( 'duration', value.toString() );\n }\n\n get showTitleWhenShrunk (): boolean {\n return this.config.showTitleWhenShrunk!;\n }\n\n set showTitleWhenShrunk ( value: boolean ) {\n this.config.showTitleWhenShrunk = value;\n this.setAttribute( 'show-title-when-shrunk', value.toString() );\n }\n\n get closable (): boolean {\n return this.config.closable!;\n }\n\n set closable ( value: boolean ) {\n this.config.closable = value;\n this.setAttribute( 'closable', value.toString() );\n }\n\n get title (): string {\n return this.config.title!;\n }\n\n set title ( value: string ) {\n this.config.title = value;\n this.setAttribute( 'title', value );\n }\n\n get icon (): string {\n return this.config.icon!;\n }\n\n set icon ( value: string ) {\n this.config.icon = value;\n this.setAttribute( 'icon', value );\n }\n\n get showToggleButton (): boolean {\n return this.config.showToggleButton!;\n }\n\n set showToggleButton ( value: boolean ) {\n this.config.showToggleButton = value;\n this.setAttribute( 'show-toggle-button', value.toString() );\n }\n\n get contentPadding (): string {\n return this.config.contentPadding ?? '16px';\n }\n\n set contentPadding ( value: string ) {\n this.config.contentPadding = value;\n this.setAttribute( 'content-padding', value );\n }\n\n get state (): DrawerState {\n return this.currentState;\n }\n\n set state ( value: DrawerState ) {\n this.setState( value );\n }\n\n /**\n * Expand the drawer\n */\n expand (): void {\n this.setState( 'expanded' );\n }\n\n /**\n * Shrink the drawer\n */\n shrink (): void {\n this.setState( 'shrunk' );\n }\n\n /**\n * Close the drawer (removes from DOM)\n */\n close (): void {\n this.setState( 'closed' );\n }\n\n /**\n * Toggle between expanded and shrunk states\n */\n toggle (): void {\n if ( this.currentState === 'expanded' ) {\n this.shrink();\n } else if ( this.currentState === 'shrunk' ) {\n this.expand();\n }\n }\n\n private setState ( newState: DrawerState ): void {\n const oldState = this.currentState;\n this.currentState = newState;\n this.setAttribute( 'state', newState );\n\n const container = this.shadowRoot.querySelector( '.drawer-container' ) as HTMLElement;\n if ( !container ) return;\n\n // Dispatch state change event\n this.dispatchEvent( new CustomEvent( 'drawer-state-change', {\n detail: { oldState, newState },\n bubbles: true,\n composed: true\n } ) );\n\n if ( newState === 'closed' ) {\n // Immediately remove from DOM (no animation) without visual jump\n container.style.display = 'none';\n this.dispatchEvent( new CustomEvent( 'drawer-closed', { bubbles: true, composed: true } ) );\n this.remove();\n return;\n }\n\n if ( newState === 'shrunk' ) {\n container.style.display = 'block';\n container.classList.add( 'shrunk' );\n container.classList.remove( 'expanded' );\n this.dispatchEvent( new CustomEvent( 'drawer-shrunk', { bubbles: true, composed: true } ) );\n return;\n }\n\n if ( newState === 'expanded' ) {\n container.style.display = 'block';\n container.classList.remove( 'shrunk' );\n container.classList.add( 'expanded' );\n this.dispatchEvent( new CustomEvent( 'drawer-expanded', { bubbles: true, composed: true } ) );\n return;\n }\n }\n\n private bindEvents (): void {\n this.shadowRoot.addEventListener( 'click', ( e ) => {\n const target = e.target as HTMLElement;\n\n if ( target.closest( '.drawer-toggle' ) ) {\n e.preventDefault();\n this.toggle();\n }\n\n if ( target.closest( '.drawer-close' ) && this.config.closable ) {\n e.preventDefault();\n this.close();\n }\n } );\n }\n\n private render (): void {\n const isHorizontal = this.config.direction === 'horizontal';\n const showTitle = this.config.showTitleWhenShrunk;\n const showToggleButton = this.config.showToggleButton !== false;\n const contentPadding = this.config.contentPadding ?? '16px';\n\n this.shadowRoot.innerHTML = `\n <style>\n :host {\n display: block;\n --drawer-duration: ${ this.config.duration }ms;\n --drawer-bg: #ffffff;\n --drawer-border: #e5e7eb;\n --drawer-text: #1f2937;\n --drawer-icon-bg: #f3f4f6;\n --drawer-icon-hover: #e5e7eb;\n --drawer-button-hover: #f9fafb;\n --drawer-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n }\n\n /* Container when expanded */\n .drawer-container {\n background: var(--drawer-bg);\n border: 1px solid var(--drawer-border);\n border-radius: 8px;\n box-shadow: var(--drawer-shadow);\n overflow: hidden;\n position: relative;\n }\n\n .drawer-container.horizontal {\n width: var(--drawer-horizontal-size, 300px);\n height: auto;\n transition: none;\n }\n\n .drawer-container.vertical {\n width: auto;\n height: var(--drawer-vertical-size, 300px);\n transition: none;\n }\n\n .drawer-container.expanded {\n opacity: 1;\n }\n\n .drawer-container.shrunk.horizontal {\n width: var(--drawer-horizontal-shrunk-size, 48px);\n }\n\n .drawer-container.shrunk.vertical {\n height: var(--drawer-vertical-shrunk-size, 48px);\n }\n\n /* Header area with title and buttons */\n .drawer-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n border-bottom: 1px solid var(--drawer-border);\n transition: none;\n }\n\n .drawer-container.shrunk .drawer-header {\n border-bottom: none;\n }\n\n .drawer-container.shrunk .drawer-title:not(.keep-visible),\n .drawer-container.shrunk .drawer-close {\n display: none;\n }\n\n .drawer-container.shrunk .drawer-title.keep-visible {\n display: block;\n }\n\n .drawer-toggle {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n background: var(--drawer-icon-bg);\n border: none;\n border-radius: 6px;\n cursor: pointer;\n font-size: 16px;\n transition: background 0.2s;\n flex-shrink: 0;\n }\n\n .drawer-toggle:hover {\n background: var(--drawer-icon-hover);\n }\n\n .drawer-title {\n flex: 1;\n font-size: 16px;\n font-weight: 600;\n color: var(--drawer-text);\n transition: none;\n white-space: nowrap;\n overflow: hidden;\n }\n\n .drawer-close {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n background: transparent;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 18px;\n color: #6b7280;\n transition: none;\n flex-shrink: 0;\n }\n\n .drawer-close:hover {\n background: var(--drawer-button-hover);\n color: #ef4444;\n }\n\n /* Content area */\n .drawer-content {\n padding: var(--drawer-content-padding, 16px);\n transition: none;\n overflow: auto;\n }\n\n .drawer-container.shrunk .drawer-content {\n opacity: 0;\n height: 0;\n padding: 0;\n overflow: hidden;\n position: absolute;\n z-index: -1;\n }\n\n /* Vertical specific styles */\n .drawer-container.vertical {\n display: flex;\n flex-direction: column;\n }\n\n .drawer-container.vertical .drawer-content {\n flex: 1;\n overflow: auto;\n }\n </style>\n\n <div class=\"drawer-container ${ isHorizontal ? 'horizontal' : 'vertical' } ${ this.currentState }\" style=\"display:block; --drawer-content-padding:${ contentPadding };\">\n <div class=\"drawer-header\">\n ${ showToggleButton ? `\n <button class=\"drawer-toggle\" aria-label=\"Toggle drawer\">\n ${ this.config.icon }\n </button>\n ` : '' }\n <div class=\"drawer-title ${ showTitle ? 'keep-visible' : '' }\">\n ${ this.config.title }\n </div>\n ${ this.config.closable ? `\n <button class=\\\"drawer-close\\\" aria-label=\\\"Close drawer\\\">\\n ×\\n </button>\n ` : '' }\n </div>\n <div class=\"drawer-content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n\n// Auto-register the custom element\nif ( !customElements.get( 'liwe3-drawer' ) ) {\n customElements.define( 'liwe3-drawer', DrawerElement );\n}\n\n// Export a function to manually register with a custom tag name\nexport function defineDrawer ( tagName: string = 'liwe3-drawer' ): void {\n if ( !customElements.get( tagName ) ) {\n customElements.define( tagName, DrawerElement );\n }\n}\n"],"names":["DrawerElement","name","oldValue","newValue","value","newState","oldState","container","e","target","isHorizontal","showTitle","showToggleButton","contentPadding","defineDrawer","tagName"],"mappings":"AAmBO,MAAMA,UAAsB,YAAY;AAAA,EAc7C,cAAe;AACb,UAAA,GAbF,KAAQ,eAA4B,YACpC,KAAQ,SAAuB;AAAA,MAC7B,WAAW;AAAA,MACX,UAAU;AAAA,MACV,qBAAqB;AAAA,MACrB,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,MACN,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAAA,GAKhB,KAAK,aAAc,EAAE,MAAM,OAAA,CAAS,GACpC,KAAK,OAAA,GACL,KAAK,WAAA;AAAA,EACP;AAAA,EAEA,WAAW,qBAAgC;AACzC,WAAO,CAAE,aAAa,YAAY,0BAA0B,YAAY,SAAS,QAAQ,SAAS,sBAAsB,iBAAkB;AAAA,EAC5I;AAAA,EAEA,yBAA2BC,GAAcC,GAAyBC,GAAgC;AAChG,QAAKD,MAAaC,GAAW;AAC3B,cAASF,GAAA;AAAA,QACP,KAAK;AACH,eAAK,OAAO,YAAcE,KAAiC;AAC3D;AAAA,QACF,KA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AAAA;AAAA;AAAA,cAEtB,EAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOf;AACF;AAGM,eAAe,IAAK,cAAe,KACvC,eAAe,OAAQ,gBAAgBX,CAAc;AAIhD,SAASc,EAAeC,IAAkB,gBAAuB;AACtE,EAAM,eAAe,IAAKA,CAAQ,KAChC,eAAe,OAAQA,GAASf,CAAc;AAElD;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type ImageMode = 'stretch' | '1:1' | 'cover' | 'contain';
|
|
2
|
+
export type ImagePosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3
|
+
export type ImageFX = 'none' | 'bokeh' | 'pan-left' | 'pan-right' | 'zoom-in' | 'zoom-out';
|
|
4
|
+
export declare class ImageView extends HTMLElement {
|
|
5
|
+
private _src;
|
|
6
|
+
private _width;
|
|
7
|
+
private _height;
|
|
8
|
+
private _mode;
|
|
9
|
+
private _position;
|
|
10
|
+
private _fx;
|
|
11
|
+
private _fxHover;
|
|
12
|
+
private _alt;
|
|
13
|
+
private _isHovering;
|
|
14
|
+
private container;
|
|
15
|
+
private img;
|
|
16
|
+
constructor();
|
|
17
|
+
private _handleMouseEnter;
|
|
18
|
+
private _handleMouseLeave;
|
|
19
|
+
static get observedAttributes(): string[];
|
|
20
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
private updateDimensions;
|
|
23
|
+
private updateClasses;
|
|
24
|
+
private render;
|
|
25
|
+
get src(): string;
|
|
26
|
+
set src(value: string);
|
|
27
|
+
get width(): string;
|
|
28
|
+
set width(value: string);
|
|
29
|
+
get height(): string;
|
|
30
|
+
set height(value: string);
|
|
31
|
+
get mode(): ImageMode;
|
|
32
|
+
set mode(value: ImageMode);
|
|
33
|
+
get position(): ImagePosition;
|
|
34
|
+
set position(value: ImagePosition);
|
|
35
|
+
get fx(): ImageFX;
|
|
36
|
+
set fx(value: ImageFX);
|
|
37
|
+
get fxHover(): ImageFX;
|
|
38
|
+
set fxHover(value: ImageFX);
|
|
39
|
+
get alt(): string;
|
|
40
|
+
set alt(value: string);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ImageView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageView.d.ts","sourceRoot":"","sources":["../src/ImageView.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AACvI,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAE3F,qBAAa,SAAU,SAAQ,WAAW;IACzC,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,GAAG,CAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,GAAG,CAAmB;;IAuH9B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,iBAAiB;IAOzB,MAAM,KAAK,kBAAkB,aAE5B;IAED,wBAAwB,CAAG,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAuC3E,iBAAiB;IAMjB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,MAAM;IAqBd,IAAI,GAAG,IAAK,MAAM,CAAsB;IACxC,IAAI,GAAG,CAAG,KAAK,EAAE,MAAM,EAAyC;IAEhE,IAAI,KAAK,IAAK,MAAM,CAAwB;IAC5C,IAAI,KAAK,CAAG,KAAK,EAAE,MAAM,EAA2C;IAEpE,IAAI,MAAM,IAAK,MAAM,CAAyB;IAC9C,IAAI,MAAM,CAAG,KAAK,EAAE,MAAM,EAA4C;IAEtE,IAAI,IAAI,IAAK,SAAS,CAAuB;IAC7C,IAAI,IAAI,CAAG,KAAK,EAAE,SAAS,EAA0C;IAErE,IAAI,QAAQ,IAAK,aAAa,CAA2B;IACzD,IAAI,QAAQ,CAAG,KAAK,EAAE,aAAa,EAA8C;IAEjF,IAAI,EAAE,IAAK,OAAO,CAAqB;IACvC,IAAI,EAAE,CAAG,KAAK,EAAE,OAAO,EAAwC;IAE/D,IAAI,OAAO,IAAK,OAAO,CAA0B;IACjD,IAAI,OAAO,CAAG,KAAK,EAAE,OAAO,EAA8C;IAE1E,IAAI,GAAG,IAAK,MAAM,CAAsB;IACxC,IAAI,GAAG,CAAG,KAAK,EAAE,MAAM,EAAyC;CAChE"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
class s extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super(), this._src = "", this._width = "100%", this._height = "auto", this._mode = "cover", this._position = "center", this._fx = "none", this._fxHover = "none", this._alt = "", this._isHovering = !1, this.attachShadow({ mode: "open" });
|
|
4
|
+
const t = document.createElement("style");
|
|
5
|
+
t.textContent = `
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.container {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
img {
|
|
21
|
+
display: block;
|
|
22
|
+
transition: transform 0.5s ease, filter 0.5s ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Modes */
|
|
26
|
+
.mode-stretch img {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
object-fit: fill;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.mode-cover img {
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
object-fit: cover;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mode-contain img {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
object-fit: contain;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.mode-1-1 img {
|
|
45
|
+
max-width: none;
|
|
46
|
+
max-height: none;
|
|
47
|
+
/* Default to auto, controlled by position */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Positions for 1:1 and others if applicable */
|
|
51
|
+
.pos-center { justify-content: center; align-items: center; }
|
|
52
|
+
.pos-top { justify-content: center; align-items: flex-start; }
|
|
53
|
+
.pos-bottom { justify-content: center; align-items: flex-end; }
|
|
54
|
+
.pos-left { justify-content: flex-start; align-items: center; }
|
|
55
|
+
.pos-right { justify-content: flex-end; align-items: center; }
|
|
56
|
+
.pos-top-left { justify-content: flex-start; align-items: flex-start; }
|
|
57
|
+
.pos-top-right { justify-content: flex-end; align-items: flex-start; }
|
|
58
|
+
.pos-bottom-left { justify-content: flex-start; align-items: flex-end; }
|
|
59
|
+
.pos-bottom-right { justify-content: flex-end; align-items: flex-end; }
|
|
60
|
+
|
|
61
|
+
/* FX */
|
|
62
|
+
.fx-bokeh img {
|
|
63
|
+
filter: blur(3px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes pan-left {
|
|
67
|
+
0% { transform: scale(1.2) translateX(0); }
|
|
68
|
+
100% { transform: scale(1.2) translateX(-10%); }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes pan-right {
|
|
72
|
+
0% { transform: scale(1.2) translateX(0); }
|
|
73
|
+
100% { transform: scale(1.2) translateX(10%); }
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes zoom-in {
|
|
77
|
+
0% { transform: scale(1); }
|
|
78
|
+
100% { transform: scale(1.2); }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes zoom-out {
|
|
82
|
+
0% { transform: scale(1.2); }
|
|
83
|
+
100% { transform: scale(1); }
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.fx-pan-left img {
|
|
87
|
+
animation: pan-left 10s linear infinite alternate;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.fx-pan-right img {
|
|
91
|
+
animation: pan-right 10s linear infinite alternate;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.fx-zoom-in img {
|
|
95
|
+
animation: zoom-in 10s linear infinite alternate;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.fx-zoom-out img {
|
|
99
|
+
animation: zoom-out 10s linear infinite alternate;
|
|
100
|
+
}
|
|
101
|
+
`, this.container = document.createElement("div"), this.container.classList.add("container"), this.img = document.createElement("img"), this.container.appendChild(this.img), this.shadowRoot.appendChild(t), this.shadowRoot.appendChild(this.container), this.addEventListener("mouseenter", this._handleMouseEnter.bind(this)), this.addEventListener("mouseleave", this._handleMouseLeave.bind(this));
|
|
102
|
+
}
|
|
103
|
+
_handleMouseEnter() {
|
|
104
|
+
this._fxHover !== "none" && (this._isHovering = !0, this.updateClasses());
|
|
105
|
+
}
|
|
106
|
+
_handleMouseLeave() {
|
|
107
|
+
this._fxHover !== "none" && (this._isHovering = !1, this.updateClasses());
|
|
108
|
+
}
|
|
109
|
+
static get observedAttributes() {
|
|
110
|
+
return ["src", "width", "height", "mode", "position", "fx", "fx-hover", "alt"];
|
|
111
|
+
}
|
|
112
|
+
attributeChangedCallback(t, i, e) {
|
|
113
|
+
if (i !== e)
|
|
114
|
+
switch (t) {
|
|
115
|
+
case "src":
|
|
116
|
+
this._src = e || "", this.render();
|
|
117
|
+
break;
|
|
118
|
+
case "width":
|
|
119
|
+
this._width = e || "100%", this.updateDimensions();
|
|
120
|
+
break;
|
|
121
|
+
case "height":
|
|
122
|
+
this._height = e || "auto", this.updateDimensions();
|
|
123
|
+
break;
|
|
124
|
+
case "mode":
|
|
125
|
+
this._mode = e || "cover", this.updateClasses();
|
|
126
|
+
break;
|
|
127
|
+
case "position":
|
|
128
|
+
this._position = e || "center", this.updateClasses();
|
|
129
|
+
break;
|
|
130
|
+
case "fx":
|
|
131
|
+
this._fx = e || "none", this.updateClasses();
|
|
132
|
+
break;
|
|
133
|
+
case "fx-hover":
|
|
134
|
+
this._fxHover = e || "none", this.updateClasses();
|
|
135
|
+
break;
|
|
136
|
+
case "alt":
|
|
137
|
+
this._alt = e || "", this.render();
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
connectedCallback() {
|
|
142
|
+
this.updateDimensions(), this.updateClasses(), this.render();
|
|
143
|
+
}
|
|
144
|
+
updateDimensions() {
|
|
145
|
+
this.style.width = this._width, this.style.height = this._height;
|
|
146
|
+
}
|
|
147
|
+
updateClasses() {
|
|
148
|
+
this.container.className = "container", this.container.classList.add(`mode-${this._mode}`), this.container.classList.add(`pos-${this._position}`);
|
|
149
|
+
const t = this._isHovering && this._fxHover !== "none" ? this._fxHover : this._fx;
|
|
150
|
+
this.container.classList.add(`fx-${t}`);
|
|
151
|
+
}
|
|
152
|
+
render() {
|
|
153
|
+
this.img.getAttribute("src") !== this._src && (this._src ? this.img.setAttribute("src", this._src) : this.img.removeAttribute("src")), this.img.getAttribute("alt") !== this._alt && (this._alt ? this.img.setAttribute("alt", this._alt) : this.img.removeAttribute("alt"));
|
|
154
|
+
}
|
|
155
|
+
// Public API
|
|
156
|
+
get src() {
|
|
157
|
+
return this._src;
|
|
158
|
+
}
|
|
159
|
+
set src(t) {
|
|
160
|
+
this.setAttribute("src", t);
|
|
161
|
+
}
|
|
162
|
+
get width() {
|
|
163
|
+
return this._width;
|
|
164
|
+
}
|
|
165
|
+
set width(t) {
|
|
166
|
+
this.setAttribute("width", t);
|
|
167
|
+
}
|
|
168
|
+
get height() {
|
|
169
|
+
return this._height;
|
|
170
|
+
}
|
|
171
|
+
set height(t) {
|
|
172
|
+
this.setAttribute("height", t);
|
|
173
|
+
}
|
|
174
|
+
get mode() {
|
|
175
|
+
return this._mode;
|
|
176
|
+
}
|
|
177
|
+
set mode(t) {
|
|
178
|
+
this.setAttribute("mode", t);
|
|
179
|
+
}
|
|
180
|
+
get position() {
|
|
181
|
+
return this._position;
|
|
182
|
+
}
|
|
183
|
+
set position(t) {
|
|
184
|
+
this.setAttribute("position", t);
|
|
185
|
+
}
|
|
186
|
+
get fx() {
|
|
187
|
+
return this._fx;
|
|
188
|
+
}
|
|
189
|
+
set fx(t) {
|
|
190
|
+
this.setAttribute("fx", t);
|
|
191
|
+
}
|
|
192
|
+
get fxHover() {
|
|
193
|
+
return this._fxHover;
|
|
194
|
+
}
|
|
195
|
+
set fxHover(t) {
|
|
196
|
+
this.setAttribute("fx-hover", t);
|
|
197
|
+
}
|
|
198
|
+
get alt() {
|
|
199
|
+
return this._alt;
|
|
200
|
+
}
|
|
201
|
+
set alt(t) {
|
|
202
|
+
this.setAttribute("alt", t);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
customElements.define("liwe3-image-view", s);
|
|
206
|
+
export {
|
|
207
|
+
s as ImageView
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=ImageView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageView.js","sources":["../src/ImageView.ts"],"sourcesContent":["export type ImageMode = 'stretch' | '1:1' | 'cover' | 'contain';\nexport type ImagePosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\nexport type ImageFX = 'none' | 'bokeh' | 'pan-left' | 'pan-right' | 'zoom-in' | 'zoom-out';\n\nexport class ImageView extends HTMLElement {\n\tprivate _src: string = '';\n\tprivate _width: string = '100%';\n\tprivate _height: string = 'auto';\n\tprivate _mode: ImageMode = 'cover';\n\tprivate _position: ImagePosition = 'center';\n\tprivate _fx: ImageFX = 'none';\n\tprivate _fxHover: ImageFX = 'none';\n\tprivate _alt: string = '';\n\tprivate _isHovering: boolean = false;\n\n\tprivate container: HTMLDivElement;\n\tprivate img: HTMLImageElement;\n\n\tconstructor () {\n\t\tsuper();\n\t\tthis.attachShadow( { mode: 'open' } );\n\n\t\tconst style = document.createElement( 'style' );\n\t\tstyle.textContent = `\n :host {\n display: block;\n overflow: hidden;\n position: relative;\n }\n\n .container {\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: relative;\n display: flex;\n }\n\n img {\n display: block;\n transition: transform 0.5s ease, filter 0.5s ease;\n }\n\n /* Modes */\n .mode-stretch img {\n width: 100%;\n height: 100%;\n object-fit: fill;\n }\n\n .mode-cover img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .mode-contain img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n\n .mode-1-1 img {\n max-width: none;\n max-height: none;\n /* Default to auto, controlled by position */\n }\n\n /* Positions for 1:1 and others if applicable */\n .pos-center { justify-content: center; align-items: center; }\n .pos-top { justify-content: center; align-items: flex-start; }\n .pos-bottom { justify-content: center; align-items: flex-end; }\n .pos-left { justify-content: flex-start; align-items: center; }\n .pos-right { justify-content: flex-end; align-items: center; }\n .pos-top-left { justify-content: flex-start; align-items: flex-start; }\n .pos-top-right { justify-content: flex-end; align-items: flex-start; }\n .pos-bottom-left { justify-content: flex-start; align-items: flex-end; }\n .pos-bottom-right { justify-content: flex-end; align-items: flex-end; }\n\n /* FX */\n .fx-bokeh img {\n filter: blur(3px);\n }\n\n @keyframes pan-left {\n 0% { transform: scale(1.2) translateX(0); }\n 100% { transform: scale(1.2) translateX(-10%); }\n }\n\n @keyframes pan-right {\n 0% { transform: scale(1.2) translateX(0); }\n 100% { transform: scale(1.2) translateX(10%); }\n }\n\n @keyframes zoom-in {\n 0% { transform: scale(1); }\n 100% { transform: scale(1.2); }\n }\n\n @keyframes zoom-out {\n 0% { transform: scale(1.2); }\n 100% { transform: scale(1); }\n }\n\n .fx-pan-left img {\n animation: pan-left 10s linear infinite alternate;\n }\n\n .fx-pan-right img {\n animation: pan-right 10s linear infinite alternate;\n }\n\n .fx-zoom-in img {\n animation: zoom-in 10s linear infinite alternate;\n }\n\n .fx-zoom-out img {\n animation: zoom-out 10s linear infinite alternate;\n }\n `;\n\n\t\tthis.container = document.createElement( 'div' );\n\t\tthis.container.classList.add( 'container' );\n\n\t\tthis.img = document.createElement( 'img' );\n\n\t\tthis.container.appendChild( this.img );\n\t\tthis.shadowRoot!.appendChild( style );\n\t\tthis.shadowRoot!.appendChild( this.container );\n\n\t\t// Add hover listeners\n\t\tthis.addEventListener( 'mouseenter', this._handleMouseEnter.bind( this ) );\n\t\tthis.addEventListener( 'mouseleave', this._handleMouseLeave.bind( this ) );\n\t}\n\n\tprivate _handleMouseEnter () {\n\t\tif ( this._fxHover !== 'none' ) {\n\t\t\tthis._isHovering = true;\n\t\t\tthis.updateClasses();\n\t\t}\n\t}\n\n\tprivate _handleMouseLeave () {\n\t\tif ( this._fxHover !== 'none' ) {\n\t\t\tthis._isHovering = false;\n\t\t\tthis.updateClasses();\n\t\t}\n\t}\n\n\tstatic get observedAttributes () {\n\t\treturn [ 'src', 'width', 'height', 'mode', 'position', 'fx', 'fx-hover', 'alt' ];\n\t}\n\n\tattributeChangedCallback ( name: string, oldValue: string, newValue: string ) {\n\t\tif ( oldValue === newValue ) return;\n\n\t\tswitch ( name ) {\n\t\t\tcase 'src':\n\t\t\t\tthis._src = newValue || '';\n\t\t\t\tthis.render();\n\t\t\t\tbreak;\n\t\t\tcase 'width':\n\t\t\t\tthis._width = newValue || '100%';\n\t\t\t\tthis.updateDimensions();\n\t\t\t\tbreak;\n\t\t\tcase 'height':\n\t\t\t\tthis._height = newValue || 'auto';\n\t\t\t\tthis.updateDimensions();\n\t\t\t\tbreak;\n\t\t\tcase 'mode':\n\t\t\t\tthis._mode = ( newValue as ImageMode ) || 'cover';\n\t\t\t\tthis.updateClasses();\n\t\t\t\tbreak;\n\t\t\tcase 'position':\n\t\t\t\tthis._position = ( newValue as ImagePosition ) || 'center';\n\t\t\t\tthis.updateClasses();\n\t\t\t\tbreak;\n\t\t\tcase 'fx':\n\t\t\t\tthis._fx = ( newValue as ImageFX ) || 'none';\n\t\t\t\tthis.updateClasses();\n\t\t\t\tbreak;\n\t\t\tcase 'fx-hover':\n\t\t\t\tthis._fxHover = ( newValue as ImageFX ) || 'none';\n\t\t\t\tthis.updateClasses();\n\t\t\t\tbreak;\n\t\t\tcase 'alt':\n\t\t\t\tthis._alt = newValue || '';\n\t\t\t\tthis.render();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tconnectedCallback () {\n\t\tthis.updateDimensions();\n\t\tthis.updateClasses();\n\t\tthis.render();\n\t}\n\n\tprivate updateDimensions () {\n\t\tthis.style.width = this._width;\n\t\tthis.style.height = this._height;\n\t}\n\n\tprivate updateClasses () {\n\t\t// Reset classes\n\t\tthis.container.className = 'container';\n\n\t\t// Add mode class\n\t\tthis.container.classList.add( `mode-${ this._mode }` );\n\n\t\t// Add position class\n\t\tthis.container.classList.add( `pos-${ this._position }` );\n\n\t\t// Add FX class - use hover fx if hovering and defined, otherwise use regular fx\n\t\tconst activeFx = ( this._isHovering && this._fxHover !== 'none' ) ? this._fxHover : this._fx;\n\t\tthis.container.classList.add( `fx-${ activeFx }` );\n\t}\n\n\tprivate render () {\n\t\tconst currentSrc = this.img.getAttribute( 'src' );\n\t\tif ( currentSrc !== this._src ) {\n\t\t\tif ( this._src ) {\n\t\t\t\tthis.img.setAttribute( 'src', this._src );\n\t\t\t} else {\n\t\t\t\tthis.img.removeAttribute( 'src' );\n\t\t\t}\n\t\t}\n\n\t\tconst currentAlt = this.img.getAttribute( 'alt' );\n\t\tif ( currentAlt !== this._alt ) {\n\t\t\tif ( this._alt ) {\n\t\t\t\tthis.img.setAttribute( 'alt', this._alt );\n\t\t\t} else {\n\t\t\t\tthis.img.removeAttribute( 'alt' );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Public API\n\tget src (): string { return this._src; }\n\tset src ( value: string ) { this.setAttribute( 'src', value ); }\n\n\tget width (): string { return this._width; }\n\tset width ( value: string ) { this.setAttribute( 'width', value ); }\n\n\tget height (): string { return this._height; }\n\tset height ( value: string ) { this.setAttribute( 'height', value ); }\n\n\tget mode (): ImageMode { return this._mode; }\n\tset mode ( value: ImageMode ) { this.setAttribute( 'mode', value ); }\n\n\tget position (): ImagePosition { return this._position; }\n\tset position ( value: ImagePosition ) { this.setAttribute( 'position', value ); }\n\n\tget fx (): ImageFX { return this._fx; }\n\tset fx ( value: ImageFX ) { this.setAttribute( 'fx', value ); }\n\n\tget fxHover (): ImageFX { return this._fxHover; }\n\tset fxHover ( value: ImageFX ) { this.setAttribute( 'fx-hover', value ); }\n\n\tget alt (): string { return this._alt; }\n\tset alt ( value: string ) { this.setAttribute( 'alt', value ); }\n}\n\ncustomElements.define( 'liwe3-image-view', ImageView );\n"],"names":["ImageView","style","name","oldValue","newValue","activeFx","value"],"mappings":"AAIO,MAAMA,UAAkB,YAAY;AAAA,EAc1C,cAAe;AACd,UAAA,GAdD,KAAQ,OAAe,IACvB,KAAQ,SAAiB,QACzB,KAAQ,UAAkB,QAC1B,KAAQ,QAAmB,SAC3B,KAAQ,YAA2B,UACnC,KAAQ,MAAe,QACvB,KAAQ,WAAoB,QAC5B,KAAQ,OAAe,IACvB,KAAQ,cAAuB,IAO9B,KAAK,aAAc,EAAE,MAAM,OAAA,CAAS;AAEpC,UAAMC,IAAQ,SAAS,cAAe,OAAQ;AAC9C,IAAAA,EAAM,cAAc;AAAA;AAAA;AAAA;AAAA;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