@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/auto.cjs +21 -2
- package/dist/auto.cjs.map +1 -1
- package/dist/auto.js +21 -2
- package/dist/auto.js.map +1 -1
- package/dist/index.cjs +21 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +2538 -0
- package/dist/internal.cjs.map +1 -0
- package/dist/internal.d.cts +446 -0
- package/dist/internal.d.ts +446 -0
- package/dist/internal.js +2507 -0
- package/dist/internal.js.map +1 -0
- package/dist/vizu.min.js +5 -1
- package/dist/vizu.min.js.map +1 -1
- package/package.json +6 -1
package/dist/index.d.cts
CHANGED
|
@@ -319,6 +319,16 @@ interface VizuOptions {
|
|
|
319
319
|
*/
|
|
320
320
|
onCommentAdded?: (c: VizuComment) => void;
|
|
321
321
|
onCommentRemoved?: (id: string) => void;
|
|
322
|
+
/**
|
|
323
|
+
* Optional override for the @ mention picker's member list. When set,
|
|
324
|
+
* the popover dropdown calls this instead of going to the cloud
|
|
325
|
+
* `/api/workspaces/[slug]/mentionable` route. Useful for non-cloud
|
|
326
|
+
* hosts (local / memory storage) that still want @-mentions, and for
|
|
327
|
+
* tests / playgrounds that need a static teammate list.
|
|
328
|
+
*
|
|
329
|
+
* Return an empty array to suppress the dropdown.
|
|
330
|
+
*/
|
|
331
|
+
mentionable?: () => MentionableUser[] | Promise<MentionableUser[]>;
|
|
322
332
|
}
|
|
323
333
|
/**
|
|
324
334
|
* Typed event map. Every event payload is an object (never bare values) so the
|
|
@@ -680,8 +690,13 @@ declare class Vizu {
|
|
|
680
690
|
/**
|
|
681
691
|
* Fetch the list of users who can be @-mentioned on the current
|
|
682
692
|
* workspace. Used by the popover's mention dropdown; hosts can also
|
|
683
|
-
* call this directly to build their own picker.
|
|
684
|
-
*
|
|
693
|
+
* call this directly to build their own picker.
|
|
694
|
+
*
|
|
695
|
+
* Resolution order:
|
|
696
|
+
* 1. `options.mentionable` if provided — host-supplied static or
|
|
697
|
+
* custom resolver. Wins over everything else.
|
|
698
|
+
* 2. Cloud adapter's API call if running cloud mode.
|
|
699
|
+
* 3. Empty array (non-cloud, no override).
|
|
685
700
|
*/
|
|
686
701
|
searchMentionable(): Promise<MentionableUser[]>;
|
|
687
702
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,16 @@ interface VizuOptions {
|
|
|
319
319
|
*/
|
|
320
320
|
onCommentAdded?: (c: VizuComment) => void;
|
|
321
321
|
onCommentRemoved?: (id: string) => void;
|
|
322
|
+
/**
|
|
323
|
+
* Optional override for the @ mention picker's member list. When set,
|
|
324
|
+
* the popover dropdown calls this instead of going to the cloud
|
|
325
|
+
* `/api/workspaces/[slug]/mentionable` route. Useful for non-cloud
|
|
326
|
+
* hosts (local / memory storage) that still want @-mentions, and for
|
|
327
|
+
* tests / playgrounds that need a static teammate list.
|
|
328
|
+
*
|
|
329
|
+
* Return an empty array to suppress the dropdown.
|
|
330
|
+
*/
|
|
331
|
+
mentionable?: () => MentionableUser[] | Promise<MentionableUser[]>;
|
|
322
332
|
}
|
|
323
333
|
/**
|
|
324
334
|
* Typed event map. Every event payload is an object (never bare values) so the
|
|
@@ -680,8 +690,13 @@ declare class Vizu {
|
|
|
680
690
|
/**
|
|
681
691
|
* Fetch the list of users who can be @-mentioned on the current
|
|
682
692
|
* workspace. Used by the popover's mention dropdown; hosts can also
|
|
683
|
-
* call this directly to build their own picker.
|
|
684
|
-
*
|
|
693
|
+
* call this directly to build their own picker.
|
|
694
|
+
*
|
|
695
|
+
* Resolution order:
|
|
696
|
+
* 1. `options.mentionable` if provided — host-supplied static or
|
|
697
|
+
* custom resolver. Wins over everything else.
|
|
698
|
+
* 2. Cloud adapter's API call if running cloud mode.
|
|
699
|
+
* 3. Empty array (non-cloud, no override).
|
|
685
700
|
*/
|
|
686
701
|
searchMentionable(): Promise<MentionableUser[]>;
|
|
687
702
|
/**
|
package/dist/index.js
CHANGED
|
@@ -3342,6 +3342,10 @@ var STYLES = `
|
|
|
3342
3342
|
pointer-events: none;
|
|
3343
3343
|
z-index: 1;
|
|
3344
3344
|
}
|
|
3345
|
+
/* Opt-in only during an active dragover. The explicit display:flex
|
|
3346
|
+
* above out-specifics the browser default for [hidden], so we restate
|
|
3347
|
+
* the hide rule here to make the attribute toggle effective. */
|
|
3348
|
+
.vz-attachment-drop-hint[hidden] { display: none; }
|
|
3345
3349
|
|
|
3346
3350
|
/* Pending attachments (uploaded but not yet saved) */
|
|
3347
3351
|
.vz-attachment-list {
|
|
@@ -3738,10 +3742,25 @@ var Vizu = class {
|
|
|
3738
3742
|
/**
|
|
3739
3743
|
* Fetch the list of users who can be @-mentioned on the current
|
|
3740
3744
|
* workspace. Used by the popover's mention dropdown; hosts can also
|
|
3741
|
-
* call this directly to build their own picker.
|
|
3742
|
-
*
|
|
3745
|
+
* call this directly to build their own picker.
|
|
3746
|
+
*
|
|
3747
|
+
* Resolution order:
|
|
3748
|
+
* 1. `options.mentionable` if provided — host-supplied static or
|
|
3749
|
+
* custom resolver. Wins over everything else.
|
|
3750
|
+
* 2. Cloud adapter's API call if running cloud mode.
|
|
3751
|
+
* 3. Empty array (non-cloud, no override).
|
|
3743
3752
|
*/
|
|
3744
3753
|
async searchMentionable() {
|
|
3754
|
+
if (this.opts.mentionable) {
|
|
3755
|
+
try {
|
|
3756
|
+
return await this.opts.mentionable();
|
|
3757
|
+
} catch (err) {
|
|
3758
|
+
if (typeof console !== "undefined") {
|
|
3759
|
+
console.warn("[vizu] options.mentionable threw", err);
|
|
3760
|
+
}
|
|
3761
|
+
return [];
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3745
3764
|
if (this.storage instanceof CloudStorageAdapter) {
|
|
3746
3765
|
return this.storage.searchMentionable();
|
|
3747
3766
|
}
|