@frybynite/image-cloud 0.9.1 → 0.9.2

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.
@@ -115,10 +115,8 @@ const mt = Object.freeze({
115
115
  densityFactor: 1,
116
116
  // Default density
117
117
  spacing: Object.freeze({
118
- padding: 50,
118
+ padding: 50
119
119
  // padding from viewport edges
120
- minGap: 20
121
- // minimum spacing between images
122
120
  })
123
121
  }),
124
122
  // Pattern-based animation configuration
@@ -139,12 +137,6 @@ const mt = Object.freeze({
139
137
  interval: 150
140
138
  // ms between processing queue items (when enabled)
141
139
  }),
142
- performance: Object.freeze({
143
- useGPU: void 0,
144
- // STUB: Not implemented yet
145
- reduceMotion: void 0
146
- // STUB: Not implemented yet
147
- }),
148
140
  entry: Object.freeze({
149
141
  start: Object.freeze({
150
142
  position: "nearest-edge",
@@ -179,20 +171,12 @@ const mt = Object.freeze({
179
171
  // Use default animation duration
180
172
  }),
181
173
  navigation: Object.freeze({
182
- keyboard: void 0,
183
- // STUB: Not implemented yet
184
- swipe: void 0,
185
- // STUB: Not implemented yet
174
+ keyboard: !0,
175
+ swipe: !0,
186
176
  mouseWheel: void 0
187
177
  // STUB: Not implemented yet
188
178
  }),
189
- gestures: Object.freeze({
190
- pinchToZoom: void 0,
191
- // STUB: Not implemented yet
192
- doubleTapToFocus: void 0
193
- // STUB: Not implemented yet
194
- }),
195
- disableDragging: !1
179
+ dragging: !0
196
180
  }),
197
181
  // Pattern-based rendering configuration
198
182
  rendering: Object.freeze({
@@ -326,9 +310,6 @@ function Zt(o = {}) {
326
310
  }), o.animation.queue && (s.animation.queue = {
327
311
  ...E.animation.queue,
328
312
  ...o.animation.queue
329
- }), o.animation.performance && (s.animation.performance = {
330
- ...E.animation.performance,
331
- ...o.animation.performance
332
313
  }), o.animation.entry && (s.animation.entry = {
333
314
  ...E.animation.entry,
334
315
  ...o.animation.entry,
@@ -353,9 +334,6 @@ function Zt(o = {}) {
353
334
  }), o.interaction.navigation && (s.interaction.navigation = {
354
335
  ...E.interaction.navigation,
355
336
  ...o.interaction.navigation
356
- }), o.interaction.gestures && (s.interaction.gestures = {
357
- ...E.interaction.gestures,
358
- ...o.interaction.gestures
359
337
  })), o.rendering && (s.rendering = {
360
338
  ...E.rendering,
361
339
  ...o.rendering
@@ -3328,14 +3306,14 @@ class Qe {
3328
3306
  this.containerEl = this.containerRef;
3329
3307
  else if (this.containerEl = document.getElementById(this.containerId), !this.containerEl)
3330
3308
  throw new Error(`Container #${this.containerId} not found`);
3331
- this.containerEl.classList.add("fbn-ic-gallery"), this.swipeEngine = new bt(this.containerEl, {
3309
+ this.containerEl.classList.add("fbn-ic-gallery"), this.containerEl.setAttribute("tabindex", "0"), this.fullConfig.interaction.navigation?.swipe !== !1 && (this.swipeEngine = new bt(this.containerEl, {
3332
3310
  onNext: () => this.navigateToNextImage(),
3333
3311
  onPrev: () => this.navigateToPreviousImage(),
3334
3312
  onDragOffset: (t) => this.zoomEngine.setDragOffset(t),
3335
3313
  onDragEnd: (t) => {
3336
3314
  t ? this.zoomEngine.clearDragOffset(!1) : this.zoomEngine.clearDragOffset(!0, qe);
3337
3315
  }
3338
- }), this.setupUI(), this.setupEventListeners(), this.logDebug("ImageCloud initialized"), await this.loadImages();
3316
+ })), this.setupUI(), this.setupEventListeners(), this.logDebug("ImageCloud initialized"), await this.loadImages();
3339
3317
  } catch (t) {
3340
3318
  console.error("Gallery initialization failed:", t), this.errorEl && t instanceof Error && this.showError("Gallery failed to initialize: " + t.message);
3341
3319
  }
@@ -3364,7 +3342,7 @@ class Qe {
3364
3342
  return t.className = "fbn-ic-counter fbn-ic-hidden", this.containerEl.appendChild(t), t;
3365
3343
  }
3366
3344
  setupEventListeners() {
3367
- document.addEventListener("keydown", (t) => {
3345
+ this.fullConfig.interaction.navigation?.keyboard !== !1 && this.containerEl.addEventListener("keydown", (t) => {
3368
3346
  t.key === "Escape" ? (this.zoomEngine.unfocusImage(), this.currentFocusIndex = null, this.swipeEngine?.disable(), this.hideCounter()) : t.key === "ArrowRight" ? this.navigateToNextImage() : t.key === "ArrowLeft" ? this.navigateToPreviousImage() : (t.key === "Enter" || t.key === " ") && this.hoveredImage && (this.handleImageClick(this.hoveredImage.element, this.hoveredImage.layout), t.preventDefault());
3369
3347
  }), document.addEventListener("click", (t) => {
3370
3348
  this.swipeEngine?.hadRecentTouch() || t.target.closest(".fbn-ic-image") || (this.zoomEngine.unfocusImage(), this.currentFocusIndex = null, this.swipeEngine?.disable(), this.hideCounter());
@@ -3538,7 +3516,7 @@ class Qe {
3538
3516
  h.style.left = `${d - 6}px`, h.style.top = `${f - 6}px`, h.title = `Image ${u}: center (${Math.round(d)}, ${Math.round(f)})`, this.containerEl.appendChild(h);
3539
3517
  })), t.forEach((l, u) => {
3540
3518
  const h = document.createElement("img");
3541
- h.referrerPolicy = "no-referrer", h.classList.add("fbn-ic-image"), this.fullConfig.interaction.disableDragging && (h.draggable = !1), h.dataset.imageId = String(u), h.dataset.createdFlag = "true";
3519
+ h.referrerPolicy = "no-referrer", h.classList.add("fbn-ic-image"), this.fullConfig.interaction.dragging === !1 && (h.draggable = !1), h.dataset.imageId = String(u), h.dataset.createdFlag = "true";
3542
3520
  const d = a[u];
3543
3521
  h.style.position = "absolute", h.style.width = "auto", h.style.height = `${i}px`, h.style.left = `${d.x}px`, h.style.top = `${d.y}px`, d.zIndex && (h.style.zIndex = String(d.zIndex)), st(h, this.defaultClassName), h.addEventListener("mouseenter", () => {
3544
3522
  if (this.hoveredImage = { element: h, layout: d }, !this.zoomEngine.isInvolved(h)) {
@@ -3644,6 +3622,7 @@ export {
3644
3622
  Ke as FUNCTIONAL_CSS,
3645
3623
  Xe as GoogleDriveLoader,
3646
3624
  ye as GridPlacementLayout,
3625
+ Fe as HoneycombPlacementLayout,
3647
3626
  Qe as ImageCloud,
3648
3627
  Je as ImageFilter,
3649
3628
  Qe as ImageGallery,