@ixo/editor 3.0.0-beta.21 → 3.0.0-beta.23

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.
@@ -1492,7 +1492,7 @@ interface BlocknoteHandlers {
1492
1492
  getValidatorDetails?: (id: string) => Promise<ValidatorDetails>;
1493
1493
  getLinkedResourceDetails?: (id: string) => Promise<LinkedResourceDetails>;
1494
1494
  getDaoMemberDetails?: (id: string) => Promise<MemberDetails>;
1495
- getDeedSurveyTemplate: (deedDid: string) => Promise<{
1495
+ getDeedSurveyTemplate: (deedDid: string, claimCollectionId?: string) => Promise<{
1496
1496
  surveyTemplate: any;
1497
1497
  claimCollectionId: string;
1498
1498
  } | null>;
@@ -1531,10 +1531,10 @@ interface BlocknoteHandlers {
1531
1531
  approveBid: (params: ApproveBidParams) => Promise<BidResponse>;
1532
1532
  rejectBid: (params: RejectBidParams) => Promise<BidResponse>;
1533
1533
  getUserRoles: (params: CheckUserRoleParams) => Promise<ClaimCollectionRole[]>;
1534
- getBidContributorSurveyTemplate: (deedId: string) => Promise<{
1534
+ getBidContributorSurveyTemplate: (deedId: string, claimCollectionId?: string) => Promise<{
1535
1535
  surveyTemplate: any;
1536
1536
  } | null>;
1537
- getBidEvaluatorSurveyTemplate: (deedId: string) => Promise<{
1537
+ getBidEvaluatorSurveyTemplate: (deedId: string, claimCollectionId?: string) => Promise<{
1538
1538
  surveyTemplate: any;
1539
1539
  } | null>;
1540
1540
  approveServiceAgentApplication: (params: {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, v as BlocknoteHandlers, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from './graphql-client-b82luVYe.mjs';
1
+ export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, v as BlocknoteHandlers, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from './graphql-client-OErTZSm9.mjs';
2
2
  export { m as ActivationResult, l as AuthorizationContext, A as AuthorizationResult, D as DelegationStore, E as ExecuteNodeParams, k as ExecutionContext, j as ExecutionOutcome, F as FlowRuntimeStateManager, N as NodeActionResult, h as buildAuthzFromProps, g as buildFlowNodeFromBlock, c as createDelegationStore, b as createMemoryDelegationStore, d as createRuntimeStateManager, e as executeNode, f as findValidCapability, i as isActorAuthorized, a as isNodeActive, v as validateCapabilityChain } from './capabilityValidation-B3NRVwYZ.mjs';
3
3
  export { C as Capability, a as CapabilityValidationResult, D as DelegationGrant, e as IxoCollaborativeEditorOptions, d as IxoCollaborativeUser, c as IxoEditorConfig, I as IxoEditorOptions, b as IxoEditorTheme, S as SignedCapability, f as blockSpecs, g as getExtraSlashMenuItems } from './index-CnqA4qDa.mjs';
4
4
  export { CloneDocumentResult, cloneDocument } from '@ixo/matrix-crdt';
package/dist/index.mjs CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  useCreateCollaborativeIxoEditor,
27
27
  useCreateIxoEditor,
28
28
  useTrackBlockFocus
29
- } from "./chunk-4344EQ47.mjs";
29
+ } from "./chunk-GKAKYGC3.mjs";
30
30
  import {
31
31
  buildAuthzFromProps,
32
32
  buildFlowNodeFromBlock,
@@ -1,13 +1,13 @@
1
- import { v as BlocknoteHandlers } from '../graphql-client-b82luVYe.mjs';
2
- export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, ah as DomainCardData, ag as DomainCardRenderer, a8 as DropPosition, ad as DynamicListData, ae as DynamicListDataProvider, af as DynamicListPanelRenderer, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, a7 as ExternalDropZone, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, a9 as PageHeader, ab as PageHeaderMenuItem, aa as PageHeaderProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, ac as VisualizationRenderer, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from '../graphql-client-b82luVYe.mjs';
1
+ import { v as BlocknoteHandlers } from '../graphql-client-OErTZSm9.mjs';
2
+ export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, ah as DomainCardData, ag as DomainCardRenderer, a8 as DropPosition, ad as DynamicListData, ae as DynamicListDataProvider, af as DynamicListPanelRenderer, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, a7 as ExternalDropZone, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, a9 as PageHeader, ab as PageHeaderMenuItem, aa as PageHeaderProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, ac as VisualizationRenderer, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from '../graphql-client-OErTZSm9.mjs';
3
3
  import React$1, { PropsWithChildren } from 'react';
4
4
  import { K as IxoBlockProps, J as IxoEditorType, p as FlowNodeRuntimeState } from '../index-CnqA4qDa.mjs';
5
5
  export { e as IxoCollaborativeEditorOptions, d as IxoCollaborativeUser, c as IxoEditorConfig, I as IxoEditorOptions, b as IxoEditorTheme, f as blockSpecs, g as getExtraSlashMenuItems } from '../index-CnqA4qDa.mjs';
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 'yjs';
10
- import 'matrix-js-sdk';
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
- export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, 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, getAllHookedActionTypes, getBlockActions, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
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 };
@@ -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-4344EQ47.mjs";
55
+ } from "../chunk-GKAKYGC3.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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "3.0.0-beta.21",
3
+ "version": "3.0.0-beta.23",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",