@ixo/editor 3.0.0-beta.21 → 3.0.0-beta.22
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.mjs
CHANGED
package/dist/mantine/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export { e as IxoCollaborativeEditorOptions, d as IxoCollaborativeUser, c as Ixo
|
|
|
6
6
|
import * as zustand from 'zustand';
|
|
7
7
|
import * as _blocknote_core from '@blocknote/core';
|
|
8
8
|
export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
9
|
+
import { MatrixClient } from 'matrix-js-sdk';
|
|
10
|
+
import { Map as Map$1 } from 'yjs';
|
|
11
11
|
|
|
12
12
|
declare const DynamicListBlockSpec: {
|
|
13
13
|
config: {
|
|
@@ -365,4 +365,57 @@ interface HookedActionsTabProps {
|
|
|
365
365
|
|
|
366
366
|
declare const HookedActionsTab: React$1.FC<HookedActionsTabProps>;
|
|
367
367
|
|
|
368
|
-
|
|
368
|
+
/**
|
|
369
|
+
* Extract the homeserver domain from a Matrix user ID.
|
|
370
|
+
* e.g. "@user:matrix.ixo.world" → "matrix.ixo.world"
|
|
371
|
+
*/
|
|
372
|
+
declare function getHomeserver(matrixClient: MatrixClient): string;
|
|
373
|
+
/**
|
|
374
|
+
* Convert a DID to a Matrix user ID.
|
|
375
|
+
* e.g. "did:ixo:abc" → "@did-ixo-abc:matrix.ixo.world"
|
|
376
|
+
*
|
|
377
|
+
* This mirrors the reverse mapping in AssignmentTab:
|
|
378
|
+
* matrixUserId.split(':')[0].replace('@', '').replace(/-/g, ':')
|
|
379
|
+
*/
|
|
380
|
+
declare function didToMatrixUserId(did: string, homeserver: string): string;
|
|
381
|
+
/**
|
|
382
|
+
* Find an existing DM room with the target user, or create one.
|
|
383
|
+
* Uses the `m.direct` account data to track DM room associations.
|
|
384
|
+
*/
|
|
385
|
+
declare function findOrCreateDMRoom(matrixClient: MatrixClient, targetUserId: string): Promise<string>;
|
|
386
|
+
/**
|
|
387
|
+
* Send a direct message to a user identified by DID.
|
|
388
|
+
* Finds or creates a DM room and sends the message.
|
|
389
|
+
*/
|
|
390
|
+
declare function sendDirectMessage(matrixClient: MatrixClient, targetDid: string, message: string): Promise<{
|
|
391
|
+
roomId: string;
|
|
392
|
+
}>;
|
|
393
|
+
|
|
394
|
+
interface DMNotificationRecord {
|
|
395
|
+
/** DID of the assigned actor who was notified */
|
|
396
|
+
assignedDid: string;
|
|
397
|
+
/** Unix timestamp (ms) when the notification was sent */
|
|
398
|
+
notifiedAt: number;
|
|
399
|
+
/** Matrix user ID of whoever triggered the notification */
|
|
400
|
+
notifiedBy: string;
|
|
401
|
+
}
|
|
402
|
+
interface DMNotificationState {
|
|
403
|
+
[blockId: string]: DMNotificationRecord;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Read the DM notification dedup state from the runtime Y.Map.
|
|
407
|
+
*/
|
|
408
|
+
declare function getDMNotificationState(runtimeMap: Map$1<any>): DMNotificationState;
|
|
409
|
+
/**
|
|
410
|
+
* Write a DM notification record for a block, merging with existing state.
|
|
411
|
+
*/
|
|
412
|
+
declare function setDMNotificationRecord(runtimeMap: Map$1<any>, blockId: string, record: DMNotificationRecord): void;
|
|
413
|
+
/**
|
|
414
|
+
* Check whether a DM notification should be sent for a given block.
|
|
415
|
+
* Returns true if:
|
|
416
|
+
* - No notification was ever sent for this block, OR
|
|
417
|
+
* - The assigned DID has changed since the last notification
|
|
418
|
+
*/
|
|
419
|
+
declare function shouldNotify(state: DMNotificationState, blockId: string, currentAssignedDid: string): boolean;
|
|
420
|
+
|
|
421
|
+
export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DMNotificationRecord, type DMNotificationState, type DataSource, DebugButton, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type HookedActionInstanceConfig, type HookedActionType, type HookedActionsConfig, HookedActionsTab, IxoEditorType, type ListBlocksUIContextValue, type Listener, type PayloadField, didToMatrixUserId, findOrCreateDMRoom, getAllHookedActionTypes, getBlockActions, getDMNotificationState, getHomeserver, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, sendDirectMessage, setDMNotificationRecord, shouldNotify, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
|
package/dist/mantine/index.mjs
CHANGED
|
@@ -23,16 +23,23 @@ import {
|
|
|
23
23
|
StakeType,
|
|
24
24
|
ValidatorActionType,
|
|
25
25
|
blockSpecs,
|
|
26
|
+
didToMatrixUserId,
|
|
27
|
+
findOrCreateDMRoom,
|
|
26
28
|
getAllHookedActionTypes,
|
|
27
29
|
getBlockActions,
|
|
30
|
+
getDMNotificationState,
|
|
28
31
|
getEntity,
|
|
29
32
|
getExtraSlashMenuItems,
|
|
33
|
+
getHomeserver,
|
|
30
34
|
getHookedActionType,
|
|
31
35
|
initializeHookedActions,
|
|
32
36
|
ixoGraphQLClient,
|
|
33
37
|
registerBlockActions,
|
|
34
38
|
registerBuiltInActionTypes,
|
|
35
39
|
registerHookedActionType,
|
|
40
|
+
sendDirectMessage,
|
|
41
|
+
setDMNotificationRecord,
|
|
42
|
+
shouldNotify,
|
|
36
43
|
useBlockPresence,
|
|
37
44
|
useBlocknoteContext,
|
|
38
45
|
useBlocknoteHandlers,
|
|
@@ -45,7 +52,7 @@ import {
|
|
|
45
52
|
usePanel,
|
|
46
53
|
usePanelStore,
|
|
47
54
|
useTrackBlockFocus
|
|
48
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-XGUFDDLJ.mjs";
|
|
49
56
|
import "../chunk-3RYZSIC2.mjs";
|
|
50
57
|
export {
|
|
51
58
|
ApiRequestBlockSpec,
|
|
@@ -72,16 +79,23 @@ export {
|
|
|
72
79
|
StakeType,
|
|
73
80
|
ValidatorActionType,
|
|
74
81
|
blockSpecs,
|
|
82
|
+
didToMatrixUserId,
|
|
83
|
+
findOrCreateDMRoom,
|
|
75
84
|
getAllHookedActionTypes,
|
|
76
85
|
getBlockActions,
|
|
86
|
+
getDMNotificationState,
|
|
77
87
|
getEntity,
|
|
78
88
|
getExtraSlashMenuItems,
|
|
89
|
+
getHomeserver,
|
|
79
90
|
getHookedActionType,
|
|
80
91
|
initializeHookedActions,
|
|
81
92
|
ixoGraphQLClient,
|
|
82
93
|
registerBlockActions,
|
|
83
94
|
registerBuiltInActionTypes,
|
|
84
95
|
registerHookedActionType,
|
|
96
|
+
sendDirectMessage,
|
|
97
|
+
setDMNotificationRecord,
|
|
98
|
+
shouldNotify,
|
|
85
99
|
useBlockPresence,
|
|
86
100
|
useBlocknoteContext,
|
|
87
101
|
useBlocknoteHandlers,
|