@frybynite/image-cloud 0.9.0 → 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
@@ -136,16 +134,8 @@ const mt = Object.freeze({
136
134
  queue: Object.freeze({
137
135
  enabled: !0,
138
136
  // When false, all images display simultaneously
139
- interval: 150,
137
+ interval: 150
140
138
  // ms between processing queue items (when enabled)
141
- maxConcurrent: void 0
142
- // STUB: Not implemented yet
143
- }),
144
- performance: Object.freeze({
145
- useGPU: void 0,
146
- // STUB: Not implemented yet
147
- reduceMotion: void 0
148
- // STUB: Not implemented yet
149
139
  }),
150
140
  entry: Object.freeze({
151
141
  start: Object.freeze({
@@ -181,19 +171,12 @@ const mt = Object.freeze({
181
171
  // Use default animation duration
182
172
  }),
183
173
  navigation: Object.freeze({
184
- keyboard: void 0,
185
- // STUB: Not implemented yet
186
- swipe: void 0,
187
- // STUB: Not implemented yet
174
+ keyboard: !0,
175
+ swipe: !0,
188
176
  mouseWheel: void 0
189
177
  // STUB: Not implemented yet
190
178
  }),
191
- gestures: Object.freeze({
192
- pinchToZoom: void 0,
193
- // STUB: Not implemented yet
194
- doubleTapToFocus: void 0
195
- // STUB: Not implemented yet
196
- })
179
+ dragging: !0
197
180
  }),
198
181
  // Pattern-based rendering configuration
199
182
  rendering: Object.freeze({
@@ -327,9 +310,6 @@ function Zt(o = {}) {
327
310
  }), o.animation.queue && (s.animation.queue = {
328
311
  ...E.animation.queue,
329
312
  ...o.animation.queue
330
- }), o.animation.performance && (s.animation.performance = {
331
- ...E.animation.performance,
332
- ...o.animation.performance
333
313
  }), o.animation.entry && (s.animation.entry = {
334
314
  ...E.animation.entry,
335
315
  ...o.animation.entry,
@@ -354,9 +334,6 @@ function Zt(o = {}) {
354
334
  }), o.interaction.navigation && (s.interaction.navigation = {
355
335
  ...E.interaction.navigation,
356
336
  ...o.interaction.navigation
357
- }), o.interaction.gestures && (s.interaction.gestures = {
358
- ...E.interaction.gestures,
359
- ...o.interaction.gestures
360
337
  })), o.rendering && (s.rendering = {
361
338
  ...E.rendering,
362
339
  ...o.rendering
@@ -3329,14 +3306,14 @@ class Qe {
3329
3306
  this.containerEl = this.containerRef;
3330
3307
  else if (this.containerEl = document.getElementById(this.containerId), !this.containerEl)
3331
3308
  throw new Error(`Container #${this.containerId} not found`);
3332
- 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, {
3333
3310
  onNext: () => this.navigateToNextImage(),
3334
3311
  onPrev: () => this.navigateToPreviousImage(),
3335
3312
  onDragOffset: (t) => this.zoomEngine.setDragOffset(t),
3336
3313
  onDragEnd: (t) => {
3337
3314
  t ? this.zoomEngine.clearDragOffset(!1) : this.zoomEngine.clearDragOffset(!0, qe);
3338
3315
  }
3339
- }), this.setupUI(), this.setupEventListeners(), this.logDebug("ImageCloud initialized"), await this.loadImages();
3316
+ })), this.setupUI(), this.setupEventListeners(), this.logDebug("ImageCloud initialized"), await this.loadImages();
3340
3317
  } catch (t) {
3341
3318
  console.error("Gallery initialization failed:", t), this.errorEl && t instanceof Error && this.showError("Gallery failed to initialize: " + t.message);
3342
3319
  }
@@ -3365,7 +3342,7 @@ class Qe {
3365
3342
  return t.className = "fbn-ic-counter fbn-ic-hidden", this.containerEl.appendChild(t), t;
3366
3343
  }
3367
3344
  setupEventListeners() {
3368
- document.addEventListener("keydown", (t) => {
3345
+ this.fullConfig.interaction.navigation?.keyboard !== !1 && this.containerEl.addEventListener("keydown", (t) => {
3369
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());
3370
3347
  }), document.addEventListener("click", (t) => {
3371
3348
  this.swipeEngine?.hadRecentTouch() || t.target.closest(".fbn-ic-image") || (this.zoomEngine.unfocusImage(), this.currentFocusIndex = null, this.swipeEngine?.disable(), this.hideCounter());
@@ -3539,7 +3516,7 @@ class Qe {
3539
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);
3540
3517
  })), t.forEach((l, u) => {
3541
3518
  const h = document.createElement("img");
3542
- h.referrerPolicy = "no-referrer", h.classList.add("fbn-ic-image"), 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";
3543
3520
  const d = a[u];
3544
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", () => {
3545
3522
  if (this.hoveredImage = { element: h, layout: d }, !this.zoomEngine.isInvolved(h)) {
@@ -3645,6 +3622,7 @@ export {
3645
3622
  Ke as FUNCTIONAL_CSS,
3646
3623
  Xe as GoogleDriveLoader,
3647
3624
  ye as GridPlacementLayout,
3625
+ Fe as HoneycombPlacementLayout,
3648
3626
  Qe as ImageCloud,
3649
3627
  Je as ImageFilter,
3650
3628
  Qe as ImageGallery,