@ixo/editor 2.15.0 → 2.16.1

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.
@@ -1520,6 +1520,48 @@ type DocType = 'template' | 'page' | 'flow';
1520
1520
  * @returns React node with the rendered visualization, or null if type is not supported
1521
1521
  */
1522
1522
  type VisualizationRenderer = (vizType: string, config: object, preferences?: object, onPreferencesChange?: (prefs: object) => void) => React.ReactNode | null;
1523
+ /**
1524
+ * Domain card data structure for rendering domain card previews
1525
+ */
1526
+ interface DomainCardData {
1527
+ name?: string;
1528
+ summary?: string;
1529
+ description?: string;
1530
+ entity_type?: string[];
1531
+ faq?: Array<{
1532
+ question: string;
1533
+ answer: string;
1534
+ }>;
1535
+ logo_url?: {
1536
+ url?: string;
1537
+ alt?: string;
1538
+ };
1539
+ image_urls?: Array<{
1540
+ url: string;
1541
+ alt: string;
1542
+ }>;
1543
+ keywords?: string[];
1544
+ valid_from?: string;
1545
+ issuer?: string;
1546
+ area_served?: string;
1547
+ address?: string;
1548
+ coordinates?: {
1549
+ type: string;
1550
+ coordinates: [number, number];
1551
+ };
1552
+ contact?: {
1553
+ email?: string;
1554
+ website?: string;
1555
+ location?: string;
1556
+ socialLinks?: string[];
1557
+ };
1558
+ [key: string]: unknown;
1559
+ }
1560
+ /**
1561
+ * Renderer for domain card previews in the domainCardViewer block.
1562
+ * The web app provides this renderer to display domain card data with proper styling.
1563
+ */
1564
+ type DomainCardRenderer = (domainCardData: DomainCardData) => React.ReactNode;
1523
1565
  /**
1524
1566
  * Dynamic list data returned by the data provider
1525
1567
  */
@@ -1588,6 +1630,7 @@ interface BlocknoteContextValue {
1588
1630
  visualizationRenderer?: VisualizationRenderer;
1589
1631
  getDynamicListData?: DynamicListDataProvider;
1590
1632
  dynamicListPanelRenderer?: DynamicListPanelRenderer;
1633
+ domainCardRenderer?: DomainCardRenderer;
1591
1634
  }
1592
1635
  declare const BlocknoteProvider: React.FC<{
1593
1636
  children: React.ReactNode;
@@ -1598,6 +1641,7 @@ declare const BlocknoteProvider: React.FC<{
1598
1641
  visualizationRenderer?: VisualizationRenderer;
1599
1642
  getDynamicListData?: DynamicListDataProvider;
1600
1643
  dynamicListPanelRenderer?: DynamicListPanelRenderer;
1644
+ domainCardRenderer?: DomainCardRenderer;
1601
1645
  }>;
1602
1646
  declare const useBlocknoteContext: () => BlocknoteContextValue;
1603
1647
  declare const useBlocknoteHandlers: () => BlocknoteHandlers;
@@ -2806,10 +2850,7 @@ declare const blockSpecs: {
2806
2850
  readonly default: "";
2807
2851
  };
2808
2852
  readonly icon: {
2809
- readonly default: "file-text";
2810
- };
2811
- readonly domainCardData: {
2812
- readonly default: "{}";
2853
+ readonly default: "feather";
2813
2854
  };
2814
2855
  readonly entityType: {
2815
2856
  readonly default: "";
@@ -2839,10 +2880,7 @@ declare const blockSpecs: {
2839
2880
  readonly default: "";
2840
2881
  };
2841
2882
  readonly icon: {
2842
- readonly default: "file-text";
2843
- };
2844
- readonly domainCardData: {
2845
- readonly default: "{}";
2883
+ readonly default: "feather";
2846
2884
  };
2847
2885
  readonly entityType: {
2848
2886
  readonly default: "";
@@ -2863,6 +2901,68 @@ declare const blockSpecs: {
2863
2901
  readonly content: "none";
2864
2902
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
2865
2903
  };
2904
+ domainCardViewer: {
2905
+ config: {
2906
+ readonly type: "domainCardViewer";
2907
+ readonly propSchema: {
2908
+ readonly title: {
2909
+ readonly default: "";
2910
+ };
2911
+ readonly description: {
2912
+ readonly default: "";
2913
+ };
2914
+ readonly icon: {
2915
+ readonly default: "dots-circle";
2916
+ };
2917
+ readonly domainPreviewData: {
2918
+ readonly default: "{}";
2919
+ };
2920
+ readonly domainCardData: {
2921
+ readonly default: "{}";
2922
+ };
2923
+ readonly status: {
2924
+ readonly default: "pending";
2925
+ };
2926
+ readonly loadingMessage: {
2927
+ readonly default: "";
2928
+ };
2929
+ readonly errorMessage: {
2930
+ readonly default: "";
2931
+ };
2932
+ };
2933
+ readonly content: "none";
2934
+ };
2935
+ implementation: _blocknote_core.TiptapBlockImplementation<{
2936
+ readonly type: "domainCardViewer";
2937
+ readonly propSchema: {
2938
+ readonly title: {
2939
+ readonly default: "";
2940
+ };
2941
+ readonly description: {
2942
+ readonly default: "";
2943
+ };
2944
+ readonly icon: {
2945
+ readonly default: "dots-circle";
2946
+ };
2947
+ readonly domainPreviewData: {
2948
+ readonly default: "{}";
2949
+ };
2950
+ readonly domainCardData: {
2951
+ readonly default: "{}";
2952
+ };
2953
+ readonly status: {
2954
+ readonly default: "pending";
2955
+ };
2956
+ readonly loadingMessage: {
2957
+ readonly default: "";
2958
+ };
2959
+ readonly errorMessage: {
2960
+ readonly default: "";
2961
+ };
2962
+ };
2963
+ readonly content: "none";
2964
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
2965
+ };
2866
2966
  };
2867
2967
  declare const getExtraSlashMenuItems: (editor: any) => {
2868
2968
  title: string;
@@ -3396,6 +3496,7 @@ interface IxoEditorProps {
3396
3496
  visualizationRenderer?: (vizType: string, config: object) => React.ReactNode;
3397
3497
  getDynamicListData?: DynamicListDataProvider;
3398
3498
  dynamicListPanelRenderer?: DynamicListPanelRenderer;
3499
+ domainCardRenderer?: DomainCardRenderer;
3399
3500
  /** Callback when external content is dropped into the editor (receives position only) */
3400
3501
  onExternalDrop?: (position: DropPosition) => void;
3401
3502
  /** MIME type to accept for external drops (default: 'application/x-artifact') */
@@ -3410,7 +3511,7 @@ interface IxoEditorProps {
3410
3511
  /**
3411
3512
  * IxoEditor component - A customized BlockNote editor for IXO (Mantine UI)
3412
3513
  */
3413
- declare function IxoEditor({ editor, editable, className, onChange, onSelectionChange, children, mantineTheme, handlers, blockRequirements, isPanelVisible, coverImageUrl, logoUrl, selfNav, pageHeaderProps, visualizationRenderer, getDynamicListData, dynamicListPanelRenderer, onExternalDrop, externalDropType, dropIndicator, isPlacementMode, onPlacementCancel, }: IxoEditorProps): React.ReactElement | null;
3514
+ declare function IxoEditor({ editor, editable, className, onChange, onSelectionChange, children, mantineTheme, handlers, blockRequirements, isPanelVisible, coverImageUrl, logoUrl, selfNav, pageHeaderProps, visualizationRenderer, getDynamicListData, dynamicListPanelRenderer, domainCardRenderer, onExternalDrop, externalDropType, dropIndicator, isPlacementMode, onPlacementCancel, }: IxoEditorProps): React.ReactElement | null;
3414
3515
 
3415
3516
  interface CoverImageProps {
3416
3517
  coverImageUrl?: string;
@@ -3558,4 +3659,4 @@ declare class GraphQLClient {
3558
3659
  }
3559
3660
  declare const ixoGraphQLClient: GraphQLClient;
3560
3661
 
3561
- export { type VoteResponse as $, AuthorizationTab as A, type OverviewBlockProps as B, type Capability as C, type DelegationGrant as D, type EvaluationStatus as E, type FlowNode as F, GrantPermissionModal as G, type ProposalBlockProps as H, type IxoEditorType as I, type ApiRequestBlockProps as J, type HttpMethod as K, ListBlockSpec as L, type KeyValuePair as M, BlocknoteProvider as N, OverviewBlock as O, ProposalBlockSpec as P, useBlocknoteContext as Q, useBlocknoteHandlers as R, type SignedCapability as S, StakeType as T, AuthzExecActionTypes as U, ValidatorActionType as V, type BlocknoteHandlers as W, type BlocknoteContextValue as X, type BlockRequirements as Y, type ProposalResponse as Z, type SingleChoiceProposal as _, type FlowNodeAuthzExtension as a, type VoteInfo as a0, type Vote as a1, type User as a2, type Addr as a3, type Uint128 as a4, type Timestamp as a5, type Expiration as a6, type Status as a7, type Threshold as a8, type Votes as a9, type CosmosMsgForEmpty as aa, type ProposalAction as ab, getEntity as ac, type Entity as ad, type EntityResponse as ae, type EntityVariables as af, GraphQLClient as ag, ixoGraphQLClient as ah, type GraphQLResponse as ai, type GraphQLRequest as aj, type IxoBlockProps as ak, ExternalDropZone as al, type DropPosition as am, PageHeader as an, type PageHeaderProps as ao, type PageHeaderMenuItem as ap, type VisualizationRenderer as aq, type DynamicListData as ar, type DynamicListDataProvider as as, type DynamicListPanelRenderer as at, type FlowNodeRuntimeState as b, type CapabilityValidationResult as c, useCreateCollaborativeIxoEditor as d, IxoEditor as e, type IxoEditorProps as f, CoverImage as g, type CoverImageProps as h, type AuthorizationTabState as i, EvaluationTab as j, type EvaluationTabState as k, EntitySigningSetup as l, FlowPermissionsPanel as m, type IxoEditorOptions as n, type IxoEditorTheme as o, type IxoEditorConfig as p, type IxoCollaborativeUser as q, type IxoCollaborativeEditorOptions as r, CheckboxBlockSpec as s, ApiRequestBlockSpec as t, useCreateIxoEditor as u, blockSpecs as v, getExtraSlashMenuItems as w, type CheckboxBlockProps as x, type ListBlockSettings as y, type ListBlockProps as z };
3662
+ export { type VoteResponse as $, AuthorizationTab as A, type OverviewBlockProps as B, type Capability as C, type DelegationGrant as D, type EvaluationStatus as E, type FlowNode as F, GrantPermissionModal as G, type ProposalBlockProps as H, type IxoEditorType as I, type ApiRequestBlockProps as J, type HttpMethod as K, ListBlockSpec as L, type KeyValuePair as M, BlocknoteProvider as N, OverviewBlock as O, ProposalBlockSpec as P, useBlocknoteContext as Q, useBlocknoteHandlers as R, type SignedCapability as S, StakeType as T, AuthzExecActionTypes as U, ValidatorActionType as V, type BlocknoteHandlers as W, type BlocknoteContextValue as X, type BlockRequirements as Y, type ProposalResponse as Z, type SingleChoiceProposal as _, type FlowNodeAuthzExtension as a, type VoteInfo as a0, type Vote as a1, type User as a2, type Addr as a3, type Uint128 as a4, type Timestamp as a5, type Expiration as a6, type Status as a7, type Threshold as a8, type Votes as a9, type CosmosMsgForEmpty as aa, type ProposalAction as ab, getEntity as ac, type Entity as ad, type EntityResponse as ae, type EntityVariables as af, GraphQLClient as ag, ixoGraphQLClient as ah, type GraphQLResponse as ai, type GraphQLRequest as aj, type IxoBlockProps as ak, ExternalDropZone as al, type DropPosition as am, PageHeader as an, type PageHeaderProps as ao, type PageHeaderMenuItem as ap, type VisualizationRenderer as aq, type DynamicListData as ar, type DynamicListDataProvider as as, type DynamicListPanelRenderer as at, type DomainCardRenderer as au, type DomainCardData as av, type FlowNodeRuntimeState as b, type CapabilityValidationResult as c, useCreateCollaborativeIxoEditor as d, IxoEditor as e, type IxoEditorProps as f, CoverImage as g, type CoverImageProps as h, type AuthorizationTabState as i, EvaluationTab as j, type EvaluationTabState as k, EntitySigningSetup as l, FlowPermissionsPanel as m, type IxoEditorOptions as n, type IxoEditorTheme as o, type IxoEditorConfig as p, type IxoCollaborativeUser as q, type IxoCollaborativeEditorOptions as r, CheckboxBlockSpec as s, ApiRequestBlockSpec as t, useCreateIxoEditor as u, blockSpecs as v, getExtraSlashMenuItems as w, type CheckboxBlockProps as x, type ListBlockSettings as y, type ListBlockProps as z };
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-C_hXBK9A.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-C_hXBK9A.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-HAjOB4WG.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-HAjOB4WG.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-ER7KTMUM.mjs";
37
+ } from "./chunk-52ED245Y.mjs";
38
38
  export {
39
39
  ApiRequestBlockSpec,
40
40
  AuthorizationTab,
@@ -1,5 +1,5 @@
1
- import { ak as IxoBlockProps } from '../graphql-client-C_hXBK9A.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, 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-C_hXBK9A.mjs';
1
+ import { ak as IxoBlockProps } from '../graphql-client-HAjOB4WG.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-HAjOB4WG.mjs';
3
3
  import * as zustand from 'zustand';
4
4
  import * as _blocknote_core from '@blocknote/core';
5
5
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
@@ -31,7 +31,7 @@ import {
31
31
  useListBlocksUIStore,
32
32
  usePanel,
33
33
  usePanelStore
34
- } from "../chunk-ER7KTMUM.mjs";
34
+ } from "../chunk-52ED245Y.mjs";
35
35
  export {
36
36
  ApiRequestBlockSpec,
37
37
  AuthorizationTab,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "2.15.0",
3
+ "version": "2.16.1",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",