@ixo/editor 2.21.0 → 2.23.0

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.
@@ -674,6 +674,11 @@ interface VoteResponse {
674
674
  interface User {
675
675
  address: string;
676
676
  }
677
+ type AwarenessDocActor = {
678
+ name: string;
679
+ did: string;
680
+ src: string | null;
681
+ };
677
682
  type IUserMatrixProfile = {
678
683
  walletAddress: string;
679
684
  displayname: string;
@@ -1286,6 +1291,7 @@ interface BlocknoteHandlers {
1286
1291
  getVote: (proposalContractAddress: string, proposalId: string, userAddress: string) => Promise<VoteResponse>;
1287
1292
  getProposal: (proposalContractAddress: string, proposalId: string) => Promise<ProposalResponse>;
1288
1293
  getCurrentUser: () => User;
1294
+ getRoomMembers: (roomId: string, mx: MatrixClient) => Promise<AwarenessDocActor[]>;
1289
1295
  getMatrixInfoPerDid: (did: string) => Promise<IUserMatrixProfile>;
1290
1296
  getDaoGroupsIds: () => Promise<string[] | undefined>;
1291
1297
  getDAOGroups: () => Promise<DAOGroup[]>;
@@ -1630,6 +1636,13 @@ interface BlocknoteHandlers {
1630
1636
  description: string;
1631
1637
  serviceEndpoint: string;
1632
1638
  }>;
1639
+ /** Linked entities (e.g., governance groups) */
1640
+ linkedEntity?: Array<{
1641
+ id: string;
1642
+ type: string;
1643
+ relationship: string;
1644
+ service: string;
1645
+ }>;
1633
1646
  /** Start date for the entity (from validFrom) */
1634
1647
  startDate?: string;
1635
1648
  /** End date for the entity (from validUntil) */
@@ -1742,6 +1755,27 @@ interface BlocknoteHandlers {
1742
1755
  * Create a Universal Decentralized Identifier (UDID) for an evaluation result
1743
1756
  */
1744
1757
  createUdid?: (params: CreateUdidParams) => Promise<CreateUdidResponse>;
1758
+ /**
1759
+ * Create a new governance group (categorical, multisig, NFT staking, or token staking).
1760
+ * The implementation is provided by the host application.
1761
+ */
1762
+ createGovernanceGroup?: (params: {
1763
+ /** Type of governance group to create */
1764
+ groupType: 'categorical' | 'multisig' | 'nftStaking' | 'tokenStaking';
1765
+ /** Name of the group */
1766
+ name: string;
1767
+ /** Optional description */
1768
+ description?: string;
1769
+ /** Group-type specific configuration from the survey */
1770
+ config: Record<string, unknown>;
1771
+ }) => Promise<{
1772
+ /** The DAO core contract address */
1773
+ coreAddress: string;
1774
+ /** The voting group contract address */
1775
+ groupAddress: string;
1776
+ /** Transaction hash */
1777
+ transactionHash: string;
1778
+ }>;
1745
1779
  }
1746
1780
  type DocType = 'template' | 'page' | 'flow';
1747
1781
  /**
@@ -2049,6 +2083,9 @@ declare const ApiRequestBlockSpec: {
2049
2083
  readonly conditions: {
2050
2084
  readonly default: "";
2051
2085
  };
2086
+ readonly assignment: {
2087
+ readonly default: string;
2088
+ };
2052
2089
  };
2053
2090
  readonly content: "inline";
2054
2091
  };
@@ -2088,6 +2125,9 @@ declare const ApiRequestBlockSpec: {
2088
2125
  readonly conditions: {
2089
2126
  readonly default: "";
2090
2127
  };
2128
+ readonly assignment: {
2129
+ readonly default: string;
2130
+ };
2091
2131
  };
2092
2132
  readonly content: "inline";
2093
2133
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
@@ -2394,6 +2434,9 @@ declare const blockSpecs: {
2394
2434
  readonly conditions: {
2395
2435
  readonly default: "";
2396
2436
  };
2437
+ readonly assignment: {
2438
+ readonly default: string;
2439
+ };
2397
2440
  };
2398
2441
  readonly content: "inline";
2399
2442
  };
@@ -2433,6 +2476,9 @@ declare const blockSpecs: {
2433
2476
  readonly conditions: {
2434
2477
  readonly default: "";
2435
2478
  };
2479
+ readonly assignment: {
2480
+ readonly default: string;
2481
+ };
2436
2482
  };
2437
2483
  readonly content: "inline";
2438
2484
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
@@ -2608,6 +2654,9 @@ declare const blockSpecs: {
2608
2654
  readonly activationRequireAuthorisedActor: {
2609
2655
  readonly default: false;
2610
2656
  };
2657
+ readonly assignment: {
2658
+ readonly default: string;
2659
+ };
2611
2660
  };
2612
2661
  readonly content: "none";
2613
2662
  };
@@ -2653,6 +2702,9 @@ declare const blockSpecs: {
2653
2702
  readonly activationRequireAuthorisedActor: {
2654
2703
  readonly default: false;
2655
2704
  };
2705
+ readonly assignment: {
2706
+ readonly default: string;
2707
+ };
2656
2708
  };
2657
2709
  readonly content: "none";
2658
2710
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
@@ -2694,6 +2746,9 @@ declare const blockSpecs: {
2694
2746
  readonly activationRequireAuthorisedActor: {
2695
2747
  readonly default: false;
2696
2748
  };
2749
+ readonly assignment: {
2750
+ readonly default: string;
2751
+ };
2697
2752
  };
2698
2753
  readonly content: "none";
2699
2754
  };
@@ -2733,6 +2788,9 @@ declare const blockSpecs: {
2733
2788
  readonly activationRequireAuthorisedActor: {
2734
2789
  readonly default: false;
2735
2790
  };
2791
+ readonly assignment: {
2792
+ readonly default: string;
2793
+ };
2736
2794
  };
2737
2795
  readonly content: "none";
2738
2796
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
@@ -2759,6 +2817,9 @@ declare const blockSpecs: {
2759
2817
  readonly adminAddress: {
2760
2818
  readonly default: "";
2761
2819
  };
2820
+ readonly assignment: {
2821
+ readonly default: string;
2822
+ };
2762
2823
  };
2763
2824
  readonly content: "none";
2764
2825
  };
@@ -2783,6 +2844,9 @@ declare const blockSpecs: {
2783
2844
  readonly adminAddress: {
2784
2845
  readonly default: "";
2785
2846
  };
2847
+ readonly assignment: {
2848
+ readonly default: string;
2849
+ };
2786
2850
  };
2787
2851
  readonly content: "none";
2788
2852
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
@@ -3232,6 +3296,12 @@ declare const blockSpecs: {
3232
3296
  readonly errorMessage: {
3233
3297
  readonly default: "";
3234
3298
  };
3299
+ readonly linkedEntities: {
3300
+ readonly default: "[]";
3301
+ };
3302
+ readonly assignment: {
3303
+ readonly default: string;
3304
+ };
3235
3305
  };
3236
3306
  readonly content: "none";
3237
3307
  };
@@ -3265,6 +3335,12 @@ declare const blockSpecs: {
3265
3335
  readonly errorMessage: {
3266
3336
  readonly default: "";
3267
3337
  };
3338
+ readonly linkedEntities: {
3339
+ readonly default: "[]";
3340
+ };
3341
+ readonly assignment: {
3342
+ readonly default: string;
3343
+ };
3268
3344
  };
3269
3345
  readonly content: "none";
3270
3346
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
@@ -3331,6 +3407,80 @@ declare const blockSpecs: {
3331
3407
  readonly content: "none";
3332
3408
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
3333
3409
  };
3410
+ governanceGroup: {
3411
+ config: {
3412
+ readonly type: "governanceGroup";
3413
+ readonly propSchema: {
3414
+ readonly title: {
3415
+ readonly default: "";
3416
+ };
3417
+ readonly description: {
3418
+ readonly default: "";
3419
+ };
3420
+ readonly icon: {
3421
+ readonly default: "users";
3422
+ };
3423
+ readonly groupType: {
3424
+ readonly default: "";
3425
+ };
3426
+ readonly surveySchema: {
3427
+ readonly default: "";
3428
+ };
3429
+ readonly answers: {
3430
+ readonly default: "";
3431
+ };
3432
+ readonly lastSubmission: {
3433
+ readonly default: "";
3434
+ };
3435
+ readonly coreAddress: {
3436
+ readonly default: "";
3437
+ };
3438
+ readonly groupAddress: {
3439
+ readonly default: "";
3440
+ };
3441
+ readonly afterCreate: {
3442
+ readonly default: "";
3443
+ };
3444
+ };
3445
+ readonly content: "none";
3446
+ };
3447
+ implementation: _blocknote_core.TiptapBlockImplementation<{
3448
+ readonly type: "governanceGroup";
3449
+ readonly propSchema: {
3450
+ readonly title: {
3451
+ readonly default: "";
3452
+ };
3453
+ readonly description: {
3454
+ readonly default: "";
3455
+ };
3456
+ readonly icon: {
3457
+ readonly default: "users";
3458
+ };
3459
+ readonly groupType: {
3460
+ readonly default: "";
3461
+ };
3462
+ readonly surveySchema: {
3463
+ readonly default: "";
3464
+ };
3465
+ readonly answers: {
3466
+ readonly default: "";
3467
+ };
3468
+ readonly lastSubmission: {
3469
+ readonly default: "";
3470
+ };
3471
+ readonly coreAddress: {
3472
+ readonly default: "";
3473
+ };
3474
+ readonly groupAddress: {
3475
+ readonly default: "";
3476
+ };
3477
+ readonly afterCreate: {
3478
+ readonly default: "";
3479
+ };
3480
+ };
3481
+ readonly content: "none";
3482
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
3483
+ };
3334
3484
  };
3335
3485
  declare const getExtraSlashMenuItems: (editor: any) => {
3336
3486
  title: string;
@@ -3585,6 +3735,15 @@ interface IxoEditorType<BSchema extends IxoBlockSchema = IxoBlockSchema, ISchema
3585
3735
  * @returns Flow metadata object
3586
3736
  */
3587
3737
  getFlowMetadata?: () => FlowMetadata;
3738
+ /**
3739
+ * Matrix room ID where this document is synced
3740
+ */
3741
+ getRoomId?: () => string;
3742
+ /**
3743
+ * Get Matrix client
3744
+ * @returns Matrix client
3745
+ */
3746
+ getMatrixClient?: () => MatrixClient;
3588
3747
  /**
3589
3748
  * Get flow-level metadata
3590
3749
  * @returns Flow metadata object
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FlowNode, a as FlowNodeAuthzExtension, b as FlowNodeRuntimeState, I as IxoEditorType, S as SignedCapability, E as EvaluationStatus, C as Capability, c as CapabilityValidationResult } from './graphql-client-B3dAtUfP.mjs';
2
- export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, W as BlocknoteHandlers, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, D as DelegationGrant, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from './graphql-client-B3dAtUfP.mjs';
1
+ import { F as FlowNode, a as FlowNodeAuthzExtension, b as FlowNodeRuntimeState, I as IxoEditorType, S as SignedCapability, E as EvaluationStatus, C as Capability, c as CapabilityValidationResult } from './graphql-client-Coy2wjmn.mjs';
2
+ export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, W as BlocknoteHandlers, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, D as DelegationGrant, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from './graphql-client-Coy2wjmn.mjs';
3
3
  import { Map } from 'yjs';
4
4
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
5
5
  import 'react';
package/dist/index.mjs CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  useCreateCollaborativeIxoEditor,
35
35
  useCreateIxoEditor,
36
36
  validateCapabilityChain
37
- } from "./chunk-BPS3TRQX.mjs";
37
+ } from "./chunk-75HEM77J.mjs";
38
38
  export {
39
39
  ApiRequestBlockSpec,
40
40
  AuthorizationTab,
@@ -1,5 +1,5 @@
1
- import { ak as IxoBlockProps } from '../graphql-client-B3dAtUfP.mjs';
2
- export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, W as BlocknoteHandlers, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, av as DomainCardData, au as DomainCardRenderer, am as DropPosition, ar as DynamicListData, as as DynamicListDataProvider, at as DynamicListPanelRenderer, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, al as ExternalDropZone, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, I as IxoEditorType, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, an as PageHeader, ap as PageHeaderMenuItem, ao as PageHeaderProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, aq as VisualizationRenderer, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from '../graphql-client-B3dAtUfP.mjs';
1
+ import { ak as IxoBlockProps } from '../graphql-client-Coy2wjmn.mjs';
2
+ export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, W as BlocknoteHandlers, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, av as DomainCardData, au as DomainCardRenderer, am as DropPosition, ar as DynamicListData, as as DynamicListDataProvider, at as DynamicListPanelRenderer, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, al as ExternalDropZone, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, I as IxoEditorType, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, an as PageHeader, ap as PageHeaderMenuItem, ao as PageHeaderProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, aq as VisualizationRenderer, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from '../graphql-client-Coy2wjmn.mjs';
3
3
  import React$1, { PropsWithChildren } from 'react';
4
4
  import * as zustand from 'zustand';
5
5
  import * as _blocknote_core from '@blocknote/core';
@@ -32,7 +32,7 @@ import {
32
32
  useListBlocksUIStore,
33
33
  usePanel,
34
34
  usePanelStore
35
- } from "../chunk-BPS3TRQX.mjs";
35
+ } from "../chunk-75HEM77J.mjs";
36
36
  export {
37
37
  ApiRequestBlockSpec,
38
38
  AuthorizationTab,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "2.21.0",
3
+ "version": "2.23.0",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",