@unhingged/vizu-core 0.1.15 → 0.1.16

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/index.cjs CHANGED
@@ -3378,6 +3378,10 @@ var STYLES = `
3378
3378
  pointer-events: none;
3379
3379
  z-index: 1;
3380
3380
  }
3381
+ /* Opt-in only during an active dragover. The explicit display:flex
3382
+ * above out-specifics the browser default for [hidden], so we restate
3383
+ * the hide rule here to make the attribute toggle effective. */
3384
+ .vz-attachment-drop-hint[hidden] { display: none; }
3381
3385
 
3382
3386
  /* Pending attachments (uploaded but not yet saved) */
3383
3387
  .vz-attachment-list {
@@ -3774,10 +3778,25 @@ var Vizu = class {
3774
3778
  /**
3775
3779
  * Fetch the list of users who can be @-mentioned on the current
3776
3780
  * workspace. Used by the popover's mention dropdown; hosts can also
3777
- * call this directly to build their own picker. Returns [] for
3778
- * non-cloud adapters (no workspace, no member list to fetch from).
3781
+ * call this directly to build their own picker.
3782
+ *
3783
+ * Resolution order:
3784
+ * 1. `options.mentionable` if provided — host-supplied static or
3785
+ * custom resolver. Wins over everything else.
3786
+ * 2. Cloud adapter's API call if running cloud mode.
3787
+ * 3. Empty array (non-cloud, no override).
3779
3788
  */
3780
3789
  async searchMentionable() {
3790
+ if (this.opts.mentionable) {
3791
+ try {
3792
+ return await this.opts.mentionable();
3793
+ } catch (err) {
3794
+ if (typeof console !== "undefined") {
3795
+ console.warn("[vizu] options.mentionable threw", err);
3796
+ }
3797
+ return [];
3798
+ }
3799
+ }
3781
3800
  if (this.storage instanceof CloudStorageAdapter) {
3782
3801
  return this.storage.searchMentionable();
3783
3802
  }