@product7/feedback-sdk 1.5.9 → 1.6.1

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.
@@ -3911,24 +3911,24 @@
3911
3911
 
3912
3912
  _getTabs() {
3913
3913
  const tabs = [
3914
- { id: 'home', label: 'Home', icon: this._getHomeIcon() },
3914
+ { id: 'home', label: 'Home', icon: 'ph:house-simple-duotone' },
3915
3915
  {
3916
3916
  id: 'messages',
3917
3917
  label: 'Messages',
3918
- icon: this._getMessagesIcon(),
3918
+ icon: 'ph:chats-duotone',
3919
3919
  badge: this.state.unreadCount,
3920
3920
  },
3921
3921
  ];
3922
3922
 
3923
3923
  if (this.state.enableHelp) {
3924
- tabs.push({ id: 'help', label: 'Help', icon: this._getHelpIcon() });
3924
+ tabs.push({ id: 'help', label: 'Help', icon: 'ph:books-duotone' });
3925
3925
  }
3926
3926
 
3927
3927
  if (this.state.enableChangelog) {
3928
3928
  tabs.push({
3929
3929
  id: 'changelog',
3930
- label: 'Changelog',
3931
- icon: this._getChangelogIcon(),
3930
+ label: 'Updates',
3931
+ icon: 'ph:megaphone-duotone',
3932
3932
  });
3933
3933
  }
3934
3934
 
@@ -3946,12 +3946,14 @@
3946
3946
  : '';
3947
3947
 
3948
3948
  return `
3949
- <button class="messenger-nav-tab ${isActive ? 'active' : ''}" data-tab="${tab.id}">
3950
- <span class="messenger-nav-icon">${tab.icon}</span>
3951
- <span class="messenger-nav-label">${tab.label}</span>
3952
- ${badgeHtml}
3953
- </button>
3954
- `;
3949
+ <button class="messenger-nav-tab ${isActive ? 'active' : ''}" data-tab="${tab.id}">
3950
+ <span class="messenger-nav-icon">
3951
+ <iconify-icon icon="${tab.icon}" width="22" height="22"></iconify-icon>
3952
+ </span>
3953
+ <span class="messenger-nav-label">${tab.label}</span>
3954
+ ${badgeHtml}
3955
+ </button>
3956
+ `;
3955
3957
  })
3956
3958
  .join('');
3957
3959
 
@@ -4004,31 +4006,6 @@
4004
4006
  });
4005
4007
  }
4006
4008
 
4007
- _getHomeIcon() {
4008
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
4009
- <path d="M40,216H216V120a8,8,0,0,0-2.34-5.66l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,40,120Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
4010
- </svg>`;
4011
- }
4012
-
4013
- _getMessagesIcon() {
4014
- return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><path d="M71.58,144,32,176V48a8,8,0,0,1,8-8H168a8,8,0,0,1,8,8v88a8,8,0,0,1-8,8Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><path d="M80,144v40a8,8,0,0,0,8,8h96.42L224,224V96a8,8,0,0,0-8-8H176" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/></svg>`;
4015
- }
4016
-
4017
- _getHelpIcon() {
4018
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
4019
- <circle cx="128" cy="128" r="96" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
4020
- <circle cx="128" cy="180" r="12"/>
4021
- <path d="M128,144v-8a28,28,0,1,0-28-28" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
4022
- </svg>`;
4023
- }
4024
-
4025
- _getChangelogIcon() {
4026
- return `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 256 256">
4027
- <path d="M160,80V200.67a8,8,0,0,0,3.56,6.65l11,7.33a8,8,0,0,0,12.2-4.72L200,160" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
4028
- <path d="M40,200a8,8,0,0,0,13.15,6.12C105.55,162.16,160,160,160,160h40a40,40,0,0,0,0-80H160S105.55,77.84,53.15,33.89A8,8,0,0,0,40,40Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
4029
- </svg>`;
4030
- }
4031
-
4032
4009
  destroy() {
4033
4010
  if (this._unsubscribe) {
4034
4011
  this._unsubscribe();
@@ -4152,6 +4129,9 @@
4152
4129
  this.options = options;
4153
4130
  this.element = null;
4154
4131
  this._unsubscribe = null;
4132
+
4133
+ // Configurable header colour — defaults to Product7 blue
4134
+ this._headerBg = `linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%)`;
4155
4135
  }
4156
4136
 
4157
4137
  render() {
@@ -4172,7 +4152,14 @@
4172
4152
  _updateContent() {
4173
4153
  this.element.innerHTML = `
4174
4154
  <div class="messenger-changelog-header">
4175
- <h2>Latest Updates</h2>
4155
+ <div class="messenger-changelog-header-top">
4156
+ <h2>Latest Updates</h2>
4157
+ <button class="sdk-close-btn messenger-changelog-close-btn" aria-label="Close">
4158
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 256 256">
4159
+ <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
4160
+ </svg>
4161
+ </button>
4162
+ </div>
4176
4163
  </div>
4177
4164
 
4178
4165
  <div class="messenger-changelog-body">
@@ -4206,8 +4193,8 @@
4206
4193
  const tagsHtml =
4207
4194
  item.tags && item.tags.length > 0
4208
4195
  ? `<div class="messenger-changelog-tags">
4209
- ${item.tags.map((tag) => `<span class="sdk-badge sdk-badge-primary messenger-changelog-tag">${tag}</span>`).join('')}
4210
- </div>`
4196
+ ${item.tags.map((tag) => `<span class="sdk-badge sdk-badge-primary messenger-changelog-tag">${tag}</span>`).join('')}
4197
+ </div>`
4211
4198
  : '';
4212
4199
 
4213
4200
  const dateStr = this._formatDate(item.publishedAt || item.date);
@@ -4235,36 +4222,11 @@
4235
4222
  `;
4236
4223
  }
4237
4224
 
4238
- _renderTeamAvatars() {
4239
- const avatars = this.state.teamAvatars;
4240
- if (!avatars || avatars.length === 0) {
4241
- return `
4242
- <div class="messenger-avatar-stack messenger-avatar-stack-tiny">
4243
- <div class="sdk-avatar sdk-avatar-sm">S</div>
4244
- </div>
4245
- `;
4246
- }
4247
-
4248
- const avatarItems = avatars
4249
- .slice(0, 2)
4250
- .map((avatar) => {
4251
- if (typeof avatar === 'string' && avatar.startsWith('http')) {
4252
- return `<div class="sdk-avatar sdk-avatar-sm"><img src="${avatar}" alt="Team member" /></div>`;
4253
- }
4254
- return `<div class="sdk-avatar sdk-avatar-sm">${avatar.charAt(0).toUpperCase()}</div>`;
4255
- })
4256
- .join('');
4257
-
4258
- return `<div class="messenger-avatar-stack messenger-avatar-stack-tiny">${avatarItems}</div>`;
4259
- }
4260
-
4261
4225
  _renderEmptyState() {
4262
4226
  return `
4263
4227
  <div class="messenger-empty-state">
4264
4228
  <div class="messenger-empty-state-icon">
4265
- <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 256 256">
4266
- <path d="M228.54,86.66l-26.46,23.07A40,40,0,0,0,168,72.13L120.89,46.5a40,40,0,0,0-75.44-4l-22-19.2a8,8,0,0,0-10.5,12L35.44,54.77a40,40,0,0,0,50,61.07l47.1,25.64a40,40,0,0,0,75.41,4.07l26.46-23.07a8,8,0,0,0-10.5-12ZM56,96A24,24,0,1,1,77.25,82.75,24,24,0,0,1,56,96Zm144,64a24,24,0,1,1,24-24A24,24,0,0,1,200,160Z"></path>
4267
- </svg>
4229
+ <iconify-icon icon="ph:megaphone-duotone" width="48" height="48"></iconify-icon>
4268
4230
  </div>
4269
4231
  <h3>No changelog yet</h3>
4270
4232
  <p>Check back later for updates</p>
@@ -4289,6 +4251,12 @@
4289
4251
  }
4290
4252
 
4291
4253
  _attachEvents() {
4254
+ this.element
4255
+ .querySelector('.messenger-changelog-close-btn')
4256
+ .addEventListener('click', () => {
4257
+ this.state.setOpen(false);
4258
+ });
4259
+
4292
4260
  this._attachChangelogEvents();
4293
4261
  }
4294
4262
 
@@ -4301,7 +4269,7 @@
4301
4269
  const changelogItem = this.state.changelogItems.find(
4302
4270
  (n) => n.id === changelogId
4303
4271
  );
4304
- if (changelogItem && changelogItem.url) {
4272
+ if (changelogItem?.url) {
4305
4273
  window.open(changelogItem.url, '_blank');
4306
4274
  } else if (this.options.onChangelogClick) {
4307
4275
  this.options.onChangelogClick(changelogItem);
@@ -5160,6 +5128,9 @@
5160
5128
  this.options = options;
5161
5129
  this.element = null;
5162
5130
  this._unsubscribe = null;
5131
+
5132
+ // Configurable header colour — defaults to Product7 blue
5133
+ this._headerBg = `linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%)`;
5163
5134
  }
5164
5135
 
5165
5136
  render() {
@@ -5184,18 +5155,23 @@
5184
5155
  <div class="messenger-help-header">
5185
5156
  <div class="messenger-help-header-top">
5186
5157
  <h2>Help</h2>
5187
- <button class="sdk-close-btn" aria-label="Close">
5158
+ <button class="sdk-close-btn messenger-help-close-btn" aria-label="Close">
5188
5159
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 256 256">
5189
5160
  <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path>
5190
5161
  </svg>
5191
5162
  </button>
5192
5163
  </div>
5193
- <input
5194
- type="text"
5195
- class="messenger-help-search-input"
5196
- placeholder="Search for help..."
5197
- value="${searchQuery}"
5198
- />
5164
+ <div class="messenger-help-search-wrap">
5165
+ <span class="messenger-help-search-icon">
5166
+ <iconify-icon icon="ph:magnifying-glass-duotone" width="16" height="16"></iconify-icon>
5167
+ </span>
5168
+ <input
5169
+ type="text"
5170
+ class="messenger-help-search-input"
5171
+ placeholder="Search for help..."
5172
+ value="${searchQuery}"
5173
+ />
5174
+ </div>
5199
5175
  </div>
5200
5176
 
5201
5177
  <div class="messenger-help-body">
@@ -5222,13 +5198,6 @@
5222
5198
  )
5223
5199
  : collections;
5224
5200
 
5225
- const headerEl = this.element.querySelector(
5226
- '.messenger-help-collections-header'
5227
- );
5228
- if (headerEl) {
5229
- headerEl.textContent = `${filteredCollections.length} collections`;
5230
- }
5231
-
5232
5201
  if (filteredCollections.length === 0) {
5233
5202
  collectionsContainer.innerHTML = this._renderEmptyState();
5234
5203
  return;
@@ -5241,32 +5210,125 @@
5241
5210
  this._attachCollectionEvents();
5242
5211
  }
5243
5212
 
5213
+ // ─── Avatar helpers ──────────────────────────────────────────────────────────
5214
+
5215
+ _avatarColors = [
5216
+ { bg: '#EF4444', text: '#FFFFFF' },
5217
+ { bg: '#F97316', text: '#FFFFFF' },
5218
+ { bg: '#F59E0B', text: '#FFFFFF' },
5219
+ { bg: '#10B981', text: '#FFFFFF' },
5220
+ { bg: '#06B6D4', text: '#FFFFFF' },
5221
+ { bg: '#3B82F6', text: '#FFFFFF' },
5222
+ { bg: '#8B5CF6', text: '#FFFFFF' },
5223
+ { bg: '#EC4899', text: '#FFFFFF' },
5224
+ ];
5225
+
5226
+ _getAvatarColor(id) {
5227
+ const hash = id
5228
+ .split('')
5229
+ .reduce((acc, char) => acc + char.charCodeAt(0), 0);
5230
+ return this._avatarColors[hash % this._avatarColors.length];
5231
+ }
5232
+
5233
+ _getInitials(name) {
5234
+ if (!name) return 'A';
5235
+ return name
5236
+ .split(' ')
5237
+ .map((n) => n[0])
5238
+ .join('')
5239
+ .toUpperCase()
5240
+ .slice(0, 2);
5241
+ }
5242
+
5243
+ _renderAuthorAvatar(collection) {
5244
+ if (collection.author?.picture) {
5245
+ return `
5246
+ <img
5247
+ src="${collection.author.picture}"
5248
+ alt="${collection.author.name || ''}"
5249
+ class="messenger-help-collection-avatar"
5250
+ title="${collection.author.name || ''}"
5251
+ />
5252
+ `;
5253
+ }
5254
+
5255
+ const { bg, text } = this._getAvatarColor(collection.id);
5256
+ const initials = collection.author?.name
5257
+ ? this._getInitials(collection.author.name)
5258
+ : 'A';
5259
+
5260
+ return `
5261
+ <span
5262
+ class="messenger-help-collection-avatar messenger-help-collection-avatar--initials"
5263
+ style="background-color: ${bg}; color: ${text};"
5264
+ title="${collection.author?.name || 'Author'}"
5265
+ >${initials}</span>
5266
+ `;
5267
+ }
5268
+
5269
+ // ─── Icon resolution ─────────────────────────────────────────────────────────
5270
+
5271
+ _resolveCollectionIcon(icon) {
5272
+ if (!icon) return this._defaultCollectionIcon();
5273
+
5274
+ if (icon.trimStart().startsWith('<')) {
5275
+ return `<span class="messenger-help-collection-icon">${icon}</span>`;
5276
+ }
5277
+
5278
+ if (icon.startsWith('ph:')) {
5279
+ return `
5280
+ <span class="messenger-help-collection-icon">
5281
+ <iconify-icon icon="${icon}" width="20" height="20"></iconify-icon>
5282
+ </span>
5283
+ `;
5284
+ }
5285
+
5286
+ return this._defaultCollectionIcon();
5287
+ }
5288
+
5289
+ _defaultCollectionIcon() {
5290
+ return `
5291
+ <span class="messenger-help-collection-icon">
5292
+ <iconify-icon icon="ph:book-open-duotone" width="20" height="20"></iconify-icon>
5293
+ </span>
5294
+ `;
5295
+ }
5296
+
5297
+ // ─── Rendering ───────────────────────────────────────────────────────────────
5298
+
5244
5299
  _renderCollectionItem(collection) {
5245
5300
  const articleCount = collection.articleCount || 0;
5301
+ const iconHtml = this._resolveCollectionIcon(collection.icon);
5302
+ const avatarHtml = this._renderAuthorAvatar(collection);
5303
+
5246
5304
  return `
5247
5305
  <div class="messenger-help-collection" data-collection-id="${collection.id}">
5306
+ ${iconHtml}
5248
5307
  <div class="messenger-help-collection-content">
5249
5308
  <h3 class="messenger-help-collection-title">${collection.title}</h3>
5250
- <p class="messenger-help-collection-desc">${collection.description || ''}</p>
5251
- <span class="messenger-help-collection-count">${articleCount} articles</span>
5309
+ ${collection.description ? `<p class="messenger-help-collection-desc">${collection.description}</p>` : ''}
5310
+ <div class="messenger-help-collection-meta">
5311
+ ${avatarHtml}
5312
+ <span class="messenger-help-collection-count">
5313
+ ${articleCount} ${articleCount === 1 ? 'article' : 'articles'}
5314
+ </span>
5315
+ </div>
5252
5316
  </div>
5253
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#000000" viewBox="0 0 256 256" class="messenger-help-collection-arrow">
5317
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 256 256" class="messenger-help-collection-arrow">
5254
5318
  <path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path>
5255
5319
  </svg>
5256
5320
  </div>
5257
5321
  `;
5258
5322
  }
5259
5323
 
5260
- _renderEmptyState() {
5261
- const isSearching = this.state.helpSearchQuery;
5324
+ // ─── Empty states ────────────────────────────────────────────────────────────
5262
5325
 
5263
- if (isSearching) {
5326
+ _renderEmptyState() {
5327
+ if (this.state.helpSearchQuery) {
5264
5328
  return `
5265
5329
  <div class="messenger-empty-state">
5266
5330
  <div class="messenger-empty-state-icon">
5267
- <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 256 256">
5268
- <path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path>
5269
- </svg>
5331
+ <iconify-icon icon="ph:magnifying-glass-duotone" width="48" height="48"></iconify-icon>
5270
5332
  </div>
5271
5333
  <h3>No results found</h3>
5272
5334
  <p>Try a different search term</p>
@@ -5277,9 +5339,7 @@
5277
5339
  return `
5278
5340
  <div class="messenger-empty-state">
5279
5341
  <div class="messenger-empty-state-icon">
5280
- <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" viewBox="0 0 256 256">
5281
- <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path>
5282
- </svg>
5342
+ <iconify-icon icon="ph:books-duotone" width="48" height="48"></iconify-icon>
5283
5343
  </div>
5284
5344
  <h3>Help collections</h3>
5285
5345
  <p>No collections available yet</p>
@@ -5287,9 +5347,11 @@
5287
5347
  `;
5288
5348
  }
5289
5349
 
5350
+ // ─── Events ──────────────────────────────────────────────────────────────────
5351
+
5290
5352
  _attachEvents() {
5291
5353
  this.element
5292
- .querySelector('.sdk-close-btn')
5354
+ .querySelector('.messenger-help-close-btn')
5293
5355
  .addEventListener('click', () => {
5294
5356
  this.state.setOpen(false);
5295
5357
  });
@@ -5317,7 +5379,7 @@
5317
5379
  const collection = this.state.helpArticles.find(
5318
5380
  (c) => c.id === collectionId
5319
5381
  );
5320
- if (collection && collection.url) {
5382
+ if (collection?.url) {
5321
5383
  window.open(collection.url, '_blank');
5322
5384
  } else if (this.options.onArticleClick) {
5323
5385
  this.options.onArticleClick(collection);
@@ -5326,6 +5388,8 @@
5326
5388
  });
5327
5389
  }
5328
5390
 
5391
+ // ─── Lifecycle ───────────────────────────────────────────────────────────────
5392
+
5329
5393
  destroy() {
5330
5394
  if (this._unsubscribe) {
5331
5395
  this._unsubscribe();
@@ -6430,11 +6494,17 @@
6430
6494
  ''
6431
6495
  );
6432
6496
 
6433
- return collections.map((collection) => ({
6497
+ const sorted = [...collections].sort(
6498
+ (a, b) => (a.order ?? 0) - (b.order ?? 0)
6499
+ );
6500
+
6501
+ return sorted.map((collection) => ({
6434
6502
  id: collection.id,
6435
6503
  title: collection.title,
6436
6504
  description: collection.description || '',
6437
6505
  articleCount: collection.article_count || 0,
6506
+ icon: collection.icon || null,
6507
+ author: collection.author || null,
6438
6508
  url:
6439
6509
  collection.url_slug && helpBase
6440
6510
  ? `${helpBase}/collections/${collection.url_slug}`
@@ -7186,12 +7256,12 @@
7186
7256
  }
7187
7257
 
7188
7258
  return `
7189
- <div class="feedback-survey-ces feedback-survey-rating-scale" data-page-id="${pageId}">
7259
+ <div class="feedback-survey-rating-scale" data-page-id="${pageId}">
7190
7260
  ${[...Array(scale).keys()]
7191
7261
  .map((i) => {
7192
7262
  const score = i + 1;
7193
7263
  const selected = currentRating === score ? ' selected' : '';
7194
- return `<button class="feedback-survey-page-rating-btn feedback-survey-ces-btn feedback-survey-rating-scale-btn${selected}" data-page-id="${pageId}" data-score="${score}">${score}</button>`;
7264
+ return `<button class="feedback-survey-page-rating-btn feedback-survey-rating-scale-btn${selected}" data-page-id="${pageId}" data-score="${score}">${score}</button>`;
7195
7265
  })
7196
7266
  .join('')}
7197
7267
  </div>
@@ -11030,7 +11100,6 @@
11030
11100
  `;
11031
11101
 
11032
11102
  const messengerViewsStyles = `
11033
-
11034
11103
  /* ========================================
11035
11104
  HOME VIEW
11036
11105
  ======================================== */
@@ -11484,9 +11553,36 @@
11484
11553
  display: flex;
11485
11554
  flex-direction: column;
11486
11555
  gap: var(--spacing-3);
11487
- padding: var(--spacing-4) var(--spacing-5) var(--spacing-5);
11556
+ padding: var(--spacing-3) var(--spacing-5) var(--spacing-4);
11488
11557
  border-bottom: 1px solid var(--color-border);
11489
- background: var(--color-white);
11558
+ flex-shrink: 0;
11559
+ background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
11560
+ position: relative;
11561
+ overflow: hidden;
11562
+ }
11563
+
11564
+ .messenger-help-header::before {
11565
+ content: '';
11566
+ position: absolute;
11567
+ top: -20px;
11568
+ left: -20px;
11569
+ width: 200px;
11570
+ height: 200px;
11571
+ background: radial-gradient(circle, rgba(21, 94, 239, 0.12) 0%, transparent 70%);
11572
+ filter: blur(30px);
11573
+ pointer-events: none;
11574
+ }
11575
+
11576
+ .messenger-help-header::after {
11577
+ content: '';
11578
+ position: absolute;
11579
+ top: -10px;
11580
+ right: -20px;
11581
+ width: 150px;
11582
+ height: 150px;
11583
+ background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
11584
+ filter: blur(25px);
11585
+ pointer-events: none;
11490
11586
  }
11491
11587
 
11492
11588
  .messenger-help-header-top {
@@ -11498,30 +11594,48 @@
11498
11594
 
11499
11595
  .messenger-help-header-top h2 {
11500
11596
  margin: 0;
11501
- font-size: var(--font-size-xl);
11597
+ font-size: var(--font-size-md);
11502
11598
  font-weight: var(--font-weight-semibold);
11503
11599
  color: var(--color-text-primary);
11504
11600
  }
11505
11601
 
11506
- .messenger-help-header-top .sdk-close-btn {
11602
+ .messenger-help-close-btn {
11507
11603
  position: absolute;
11508
11604
  right: 0;
11509
11605
  top: 50%;
11510
11606
  transform: translateY(-50%);
11511
11607
  }
11512
11608
 
11609
+ /* Search — back to normal style on light bg */
11610
+ .messenger-help-search-wrap {
11611
+ position: relative;
11612
+ width: 100%;
11613
+ }
11614
+
11615
+ .messenger-help-search-icon {
11616
+ position: absolute;
11617
+ left: var(--spacing-3);
11618
+ top: 50%;
11619
+ transform: translateY(-50%);
11620
+ color: var(--color-text-tertiary);
11621
+ display: flex;
11622
+ align-items: center;
11623
+ pointer-events: none;
11624
+ }
11625
+
11513
11626
  .messenger-help-search-input {
11514
11627
  width: 100%;
11515
- background: var(--color-neutral-50);
11628
+ background: rgba(255, 255, 255, 0.7);
11516
11629
  border: 1px solid var(--color-border);
11517
11630
  border-radius: var(--radius-md);
11518
- padding: var(--spacing-2) var(--spacing-3);
11631
+ padding: var(--spacing-2) var(--spacing-3) var(--spacing-2) calc(var(--spacing-3) + 16px + var(--spacing-2));
11519
11632
  font-size: var(--font-size-base);
11520
11633
  font-weight: var(--font-weight-normal);
11521
11634
  color: var(--color-text-primary);
11522
11635
  font-family: inherit;
11523
11636
  outline: none;
11524
- transition: border-color var(--transition-base);
11637
+ transition: border-color var(--transition-base), background var(--transition-base);
11638
+ box-sizing: border-box;
11525
11639
  }
11526
11640
 
11527
11641
  .messenger-help-search-input:focus {
@@ -11533,6 +11647,7 @@
11533
11647
  color: var(--color-text-tertiary);
11534
11648
  }
11535
11649
 
11650
+ /* Body */
11536
11651
  .messenger-help-body {
11537
11652
  flex: 1;
11538
11653
  overflow-y: auto;
@@ -11547,9 +11662,12 @@
11547
11662
  padding: 0;
11548
11663
  }
11549
11664
 
11665
+ /* ── Collection item ─────────────────────────────── */
11666
+
11550
11667
  .messenger-help-collection {
11551
11668
  display: flex;
11552
11669
  align-items: center;
11670
+ gap: var(--spacing-3);
11553
11671
  padding: var(--spacing-4) var(--spacing-5);
11554
11672
  cursor: pointer;
11555
11673
  transition: background var(--transition-base);
@@ -11560,13 +11678,34 @@
11560
11678
  background: var(--color-neutral-50);
11561
11679
  }
11562
11680
 
11681
+ /* Icon pill — tinted with primary colour */
11682
+ .messenger-help-collection-icon {
11683
+ flex-shrink: 0;
11684
+ width: 36px;
11685
+ height: 36px;
11686
+ border-radius: var(--radius-md);
11687
+ background: color-mix(in srgb, var(--color-primary) 10%, transparent);
11688
+ color: var(--color-primary);
11689
+ display: flex;
11690
+ align-items: center;
11691
+ justify-content: center;
11692
+ }
11693
+
11694
+ .messenger-help-collection-icon svg,
11695
+ .messenger-help-collection-icon iconify-icon {
11696
+ width: 20px;
11697
+ height: 20px;
11698
+ display: block;
11699
+ }
11700
+
11701
+ /* Content area */
11563
11702
  .messenger-help-collection-content {
11564
11703
  flex: 1;
11565
11704
  min-width: 0;
11566
11705
  }
11567
11706
 
11568
11707
  .messenger-help-collection-title {
11569
- margin: 0 0 var(--spacing-1);
11708
+ margin: 0 0 2px;
11570
11709
  font-size: var(--font-size-md);
11571
11710
  font-weight: var(--font-weight-bold);
11572
11711
  color: var(--color-text-primary);
@@ -11574,10 +11713,40 @@
11574
11713
  }
11575
11714
 
11576
11715
  .messenger-help-collection-desc {
11577
- margin: 0 0 var(--spacing-1);
11578
- font-size: var(--font-size-base);
11716
+ margin: 0 0 var(--spacing-2);
11717
+ font-size: var(--font-size-sm);
11579
11718
  color: var(--color-text-secondary);
11580
11719
  line-height: var(--line-height-normal);
11720
+ display: -webkit-box;
11721
+ -webkit-line-clamp: 2;
11722
+ -webkit-box-orient: vertical;
11723
+ overflow: hidden;
11724
+ }
11725
+
11726
+ /* Meta row: author avatar + article count */
11727
+ .messenger-help-collection-meta {
11728
+ display: flex;
11729
+ align-items: center;
11730
+ gap: var(--spacing-2);
11731
+ }
11732
+
11733
+ /* Avatar — shared base */
11734
+ .messenger-help-collection-avatar {
11735
+ width: 18px;
11736
+ height: 18px;
11737
+ border-radius: var(--radius-full);
11738
+ flex-shrink: 0;
11739
+ object-fit: cover;
11740
+ }
11741
+
11742
+ /* Initials fallback */
11743
+ .messenger-help-collection-avatar--initials {
11744
+ display: inline-flex;
11745
+ align-items: center;
11746
+ justify-content: center;
11747
+ font-size: 9px;
11748
+ font-weight: 600;
11749
+ line-height: 1;
11581
11750
  }
11582
11751
 
11583
11752
  .messenger-help-collection-count {
@@ -11588,9 +11757,11 @@
11588
11757
  .messenger-help-collection-arrow {
11589
11758
  color: var(--color-text-tertiary);
11590
11759
  flex-shrink: 0;
11591
- margin-left: var(--spacing-3);
11760
+ margin-left: auto;
11592
11761
  }
11593
11762
 
11763
+ /* ── Footer (kept for optional use) ─────────────── */
11764
+
11594
11765
  .messenger-help-footer {
11595
11766
  padding: var(--spacing-4) var(--spacing-5);
11596
11767
  border-top: 1px solid var(--color-border);
@@ -11618,19 +11789,59 @@
11618
11789
  ======================================== */
11619
11790
 
11620
11791
  .messenger-changelog-header {
11792
+ padding: var(--spacing-3) var(--spacing-5);
11793
+ border-bottom: 1px solid var(--color-border);
11794
+ flex-shrink: 0;
11795
+ background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
11796
+ position: relative;
11797
+ overflow: hidden;
11798
+ }
11799
+
11800
+ .messenger-changelog-header::before {
11801
+ content: '';
11802
+ position: absolute;
11803
+ top: -20px;
11804
+ left: -20px;
11805
+ width: 200px;
11806
+ height: 200px;
11807
+ background: radial-gradient(circle, rgba(21, 94, 239, 0.12) 0%, transparent 70%);
11808
+ filter: blur(30px);
11809
+ pointer-events: none;
11810
+ }
11811
+
11812
+ .messenger-changelog-header::after {
11813
+ content: '';
11814
+ position: absolute;
11815
+ top: -10px;
11816
+ right: -20px;
11817
+ width: 150px;
11818
+ height: 150px;
11819
+ background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
11820
+ filter: blur(25px);
11821
+ pointer-events: none;
11822
+ }
11823
+
11824
+ .messenger-changelog-header-top {
11621
11825
  display: flex;
11622
11826
  align-items: center;
11623
11827
  justify-content: center;
11624
- padding: var(--spacing-3) var(--spacing-5);
11828
+ position: relative;
11625
11829
  }
11626
11830
 
11627
- .messenger-changelog-header h2 {
11831
+ .messenger-changelog-header-top h2 {
11628
11832
  margin: 0;
11629
- font-size: var(--font-size-lg);
11833
+ font-size: var(--font-size-md);
11630
11834
  font-weight: var(--font-weight-semibold);
11631
11835
  color: var(--color-text-primary);
11632
11836
  }
11633
11837
 
11838
+ .messenger-changelog-close-btn {
11839
+ position: absolute;
11840
+ right: 0;
11841
+ top: 50%;
11842
+ transform: translateY(-50%);
11843
+ }
11844
+
11634
11845
  .messenger-changelog-body {
11635
11846
  flex: 1;
11636
11847
  overflow-y: auto;
@@ -12278,15 +12489,23 @@
12278
12489
  messengerStyles;
12279
12490
 
12280
12491
  function injectStyles() {
12281
- if (
12282
- typeof document !== 'undefined' &&
12283
- !document.querySelector('#feedback-sdk-styles')
12284
- ) {
12492
+ if (typeof document === 'undefined') return;
12493
+
12494
+ if (!document.querySelector('#feedback-sdk-styles')) {
12285
12495
  const style = document.createElement('style');
12286
12496
  style.id = 'feedback-sdk-styles';
12287
12497
  style.textContent = CSS_STYLES;
12288
12498
  document.head.appendChild(style);
12289
12499
  }
12500
+
12501
+ if (!document.querySelector('#feedback-sdk-iconify')) {
12502
+ const script = document.createElement('script');
12503
+ script.id = 'feedback-sdk-iconify';
12504
+ script.src =
12505
+ 'https://cdn.jsdelivr.net/npm/iconify-icon@2/dist/iconify-icon.min.js';
12506
+ script.async = true;
12507
+ document.head.appendChild(script);
12508
+ }
12290
12509
  }
12291
12510
 
12292
12511
  function autoInit() {