@ixo/editor 2.8.2 → 2.10.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.
- package/dist/{chunk-FCQRE6KU.mjs → chunk-RGZLIZL2.mjs} +2613 -1396
- package/dist/chunk-RGZLIZL2.mjs.map +1 -0
- package/dist/{graphql-client-BOB1vfQH.d.ts → graphql-client-B8LHwJc9.d.ts} +199 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/mantine/index.d.ts +132 -2
- package/dist/mantine/index.mjs +5 -1
- package/package.json +6 -6
- package/style-core.css +8 -0
- package/style-mantine.css +8 -0
- package/style.css +8 -0
- package/dist/chunk-FCQRE6KU.mjs.map +0 -1
|
@@ -754,7 +754,7 @@ interface EntityResponse$1 {
|
|
|
754
754
|
metadata: string;
|
|
755
755
|
linkedResource: LinkedResource[];
|
|
756
756
|
settings: Record<string, LinkedResource>;
|
|
757
|
-
service:
|
|
757
|
+
service: Service[];
|
|
758
758
|
externalId: string;
|
|
759
759
|
}
|
|
760
760
|
interface Asset {
|
|
@@ -1495,6 +1495,67 @@ interface BlocknoteHandlers {
|
|
|
1495
1495
|
}>;
|
|
1496
1496
|
}
|
|
1497
1497
|
type DocType = 'template' | 'page' | 'flow';
|
|
1498
|
+
/**
|
|
1499
|
+
* Visualization renderer type for AG-UI integration.
|
|
1500
|
+
* This function is called by visualization blocks to render the actual AG-UI component.
|
|
1501
|
+
* @param vizType - The type of visualization (e.g., 'lineChart', 'barChart', 'dataTable', etc.)
|
|
1502
|
+
* @param config - The configuration object for the visualization
|
|
1503
|
+
* @param preferences - Optional user customizations (e.g., { pageSize: 25 }) persisted to the block
|
|
1504
|
+
* @param onPreferencesChange - Optional callback to update preferences (persists via CRDT)
|
|
1505
|
+
* @returns React node with the rendered visualization, or null if type is not supported
|
|
1506
|
+
*/
|
|
1507
|
+
type VisualizationRenderer = (vizType: string, config: object, preferences?: object, onPreferencesChange?: (prefs: object) => void) => React.ReactNode | null;
|
|
1508
|
+
/**
|
|
1509
|
+
* Dynamic list data returned by the data provider
|
|
1510
|
+
*/
|
|
1511
|
+
interface DynamicListData {
|
|
1512
|
+
items: any[] | null;
|
|
1513
|
+
loading: boolean;
|
|
1514
|
+
error: string | null;
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Function type for getting dynamic list data from context
|
|
1518
|
+
*/
|
|
1519
|
+
type DynamicListDataProvider = (listId: string) => DynamicListData;
|
|
1520
|
+
/**
|
|
1521
|
+
* Dynamic list column definition (imported from types for context)
|
|
1522
|
+
*/
|
|
1523
|
+
interface DynamicListColumn {
|
|
1524
|
+
key: string;
|
|
1525
|
+
label: string;
|
|
1526
|
+
position?: 'topLeft' | 'bottomLeft' | 'topRight' | 'bottomRight';
|
|
1527
|
+
type?: 'string' | 'number' | 'date';
|
|
1528
|
+
color?: string;
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* DataSource for dynamic lists
|
|
1532
|
+
*/
|
|
1533
|
+
interface DataSource {
|
|
1534
|
+
oracleDid: string;
|
|
1535
|
+
oracleName?: string;
|
|
1536
|
+
query: string;
|
|
1537
|
+
toolName?: string;
|
|
1538
|
+
params?: Record<string, any>;
|
|
1539
|
+
description?: string;
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
* Action that can be performed on a dynamic list item
|
|
1543
|
+
*/
|
|
1544
|
+
interface DynamicListAction {
|
|
1545
|
+
id: string;
|
|
1546
|
+
label: string;
|
|
1547
|
+
color?: string;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Panel renderer type for dynamic list selection panel.
|
|
1551
|
+
* This function is called when an item is selected in a dynamic list.
|
|
1552
|
+
* If provided, renders custom content. If not provided, shows default key-value view.
|
|
1553
|
+
* @param item - The selected item data
|
|
1554
|
+
* @param columns - Column definitions from the dynamic list
|
|
1555
|
+
* @param dataSource - Data source info (oracle, query, etc.)
|
|
1556
|
+
* @returns React node with custom panel content, or null to use default
|
|
1557
|
+
*/
|
|
1558
|
+
type DynamicListPanelRenderer = (item: any, columns: DynamicListColumn[], dataSource: DataSource | null, panelDescription?: string, actions?: DynamicListAction[], onClose?: () => void) => React.ReactNode | null;
|
|
1498
1559
|
interface BlocknoteContextValue {
|
|
1499
1560
|
editor?: IxoEditorType;
|
|
1500
1561
|
handlers?: BlocknoteHandlers;
|
|
@@ -1509,6 +1570,9 @@ interface BlocknoteContextValue {
|
|
|
1509
1570
|
drawerContent: React.ReactNode | null;
|
|
1510
1571
|
openDrawer: (id: string, content: React.ReactNode) => void;
|
|
1511
1572
|
closeDrawer: () => void;
|
|
1573
|
+
visualizationRenderer?: VisualizationRenderer;
|
|
1574
|
+
getDynamicListData?: DynamicListDataProvider;
|
|
1575
|
+
dynamicListPanelRenderer?: DynamicListPanelRenderer;
|
|
1512
1576
|
}
|
|
1513
1577
|
declare const BlocknoteProvider: React.FC<{
|
|
1514
1578
|
children: React.ReactNode;
|
|
@@ -1516,6 +1580,9 @@ declare const BlocknoteProvider: React.FC<{
|
|
|
1516
1580
|
handlers?: BlocknoteHandlers;
|
|
1517
1581
|
blockRequirements?: BlockRequirements;
|
|
1518
1582
|
editable?: boolean;
|
|
1583
|
+
visualizationRenderer?: VisualizationRenderer;
|
|
1584
|
+
getDynamicListData?: DynamicListDataProvider;
|
|
1585
|
+
dynamicListPanelRenderer?: DynamicListPanelRenderer;
|
|
1519
1586
|
}>;
|
|
1520
1587
|
declare const useBlocknoteContext: () => BlocknoteContextValue;
|
|
1521
1588
|
declare const useBlocknoteHandlers: () => BlocknoteHandlers;
|
|
@@ -2489,6 +2556,106 @@ declare const blockSpecs: {
|
|
|
2489
2556
|
readonly content: "none";
|
|
2490
2557
|
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2491
2558
|
};
|
|
2559
|
+
visualization: {
|
|
2560
|
+
config: {
|
|
2561
|
+
readonly type: "visualization";
|
|
2562
|
+
readonly propSchema: {
|
|
2563
|
+
readonly vizType: {
|
|
2564
|
+
readonly default: "";
|
|
2565
|
+
};
|
|
2566
|
+
readonly config: {
|
|
2567
|
+
readonly default: "{}";
|
|
2568
|
+
};
|
|
2569
|
+
readonly title: {
|
|
2570
|
+
readonly default: "";
|
|
2571
|
+
};
|
|
2572
|
+
readonly preferences: {
|
|
2573
|
+
readonly default: "{}";
|
|
2574
|
+
};
|
|
2575
|
+
};
|
|
2576
|
+
readonly content: "none";
|
|
2577
|
+
};
|
|
2578
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2579
|
+
readonly type: "visualization";
|
|
2580
|
+
readonly propSchema: {
|
|
2581
|
+
readonly vizType: {
|
|
2582
|
+
readonly default: "";
|
|
2583
|
+
};
|
|
2584
|
+
readonly config: {
|
|
2585
|
+
readonly default: "{}";
|
|
2586
|
+
};
|
|
2587
|
+
readonly title: {
|
|
2588
|
+
readonly default: "";
|
|
2589
|
+
};
|
|
2590
|
+
readonly preferences: {
|
|
2591
|
+
readonly default: "{}";
|
|
2592
|
+
};
|
|
2593
|
+
};
|
|
2594
|
+
readonly content: "none";
|
|
2595
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2596
|
+
};
|
|
2597
|
+
dynamicList: {
|
|
2598
|
+
config: {
|
|
2599
|
+
readonly type: "dynamicList";
|
|
2600
|
+
readonly propSchema: {
|
|
2601
|
+
readonly listId: {
|
|
2602
|
+
readonly default: "";
|
|
2603
|
+
};
|
|
2604
|
+
readonly title: {
|
|
2605
|
+
readonly default: "";
|
|
2606
|
+
};
|
|
2607
|
+
readonly columns: {
|
|
2608
|
+
readonly default: "[]";
|
|
2609
|
+
};
|
|
2610
|
+
readonly dataSource: {
|
|
2611
|
+
readonly default: "{}";
|
|
2612
|
+
};
|
|
2613
|
+
readonly snapshot: {
|
|
2614
|
+
readonly default: "";
|
|
2615
|
+
};
|
|
2616
|
+
readonly snapshotTimestamp: {
|
|
2617
|
+
readonly default: "";
|
|
2618
|
+
};
|
|
2619
|
+
readonly panelDescription: {
|
|
2620
|
+
readonly default: "";
|
|
2621
|
+
};
|
|
2622
|
+
readonly actions: {
|
|
2623
|
+
readonly default: "[]";
|
|
2624
|
+
};
|
|
2625
|
+
};
|
|
2626
|
+
readonly content: "none";
|
|
2627
|
+
};
|
|
2628
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2629
|
+
readonly type: "dynamicList";
|
|
2630
|
+
readonly propSchema: {
|
|
2631
|
+
readonly listId: {
|
|
2632
|
+
readonly default: "";
|
|
2633
|
+
};
|
|
2634
|
+
readonly title: {
|
|
2635
|
+
readonly default: "";
|
|
2636
|
+
};
|
|
2637
|
+
readonly columns: {
|
|
2638
|
+
readonly default: "[]";
|
|
2639
|
+
};
|
|
2640
|
+
readonly dataSource: {
|
|
2641
|
+
readonly default: "{}";
|
|
2642
|
+
};
|
|
2643
|
+
readonly snapshot: {
|
|
2644
|
+
readonly default: "";
|
|
2645
|
+
};
|
|
2646
|
+
readonly snapshotTimestamp: {
|
|
2647
|
+
readonly default: "";
|
|
2648
|
+
};
|
|
2649
|
+
readonly panelDescription: {
|
|
2650
|
+
readonly default: "";
|
|
2651
|
+
};
|
|
2652
|
+
readonly actions: {
|
|
2653
|
+
readonly default: "[]";
|
|
2654
|
+
};
|
|
2655
|
+
};
|
|
2656
|
+
readonly content: "none";
|
|
2657
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2658
|
+
};
|
|
2492
2659
|
};
|
|
2493
2660
|
declare const getExtraSlashMenuItems: (editor: any) => {
|
|
2494
2661
|
title: string;
|
|
@@ -2980,6 +3147,26 @@ interface PageHeaderProps {
|
|
|
2980
3147
|
*/
|
|
2981
3148
|
declare function PageHeader({ title, icon, isPrivate, lastEdited, onShare, onFavorite, isFavorited, menuItems, }: PageHeaderProps): React.ReactElement;
|
|
2982
3149
|
|
|
3150
|
+
/** Position info passed to drop callback */
|
|
3151
|
+
interface DropPosition {
|
|
3152
|
+
blockId: string;
|
|
3153
|
+
placement: 'before' | 'after';
|
|
3154
|
+
index: number;
|
|
3155
|
+
}
|
|
3156
|
+
interface ExternalDropZoneProps {
|
|
3157
|
+
/** Editor instance to get block positions from */
|
|
3158
|
+
editor: any;
|
|
3159
|
+
/** Callback when external data is dropped - position only, caller handles data */
|
|
3160
|
+
onDrop: (position: DropPosition) => void;
|
|
3161
|
+
/** MIME type to accept (default: 'application/x-artifact') */
|
|
3162
|
+
acceptedType?: string;
|
|
3163
|
+
/** Drop indicator element to show (provided by caller, already has data) */
|
|
3164
|
+
dropIndicator?: React.ReactNode;
|
|
3165
|
+
/** Children (the editor content) */
|
|
3166
|
+
children: React.ReactNode;
|
|
3167
|
+
}
|
|
3168
|
+
declare const ExternalDropZone: React.FC<ExternalDropZoneProps>;
|
|
3169
|
+
|
|
2983
3170
|
interface IxoEditorProps {
|
|
2984
3171
|
editor: IxoEditorType | undefined;
|
|
2985
3172
|
editable?: boolean;
|
|
@@ -2995,11 +3182,20 @@ interface IxoEditorProps {
|
|
|
2995
3182
|
logoUrl?: string;
|
|
2996
3183
|
selfNav?: boolean;
|
|
2997
3184
|
pageHeaderProps?: Omit<PageHeaderProps, 'children'>;
|
|
3185
|
+
visualizationRenderer?: (vizType: string, config: object) => React.ReactNode;
|
|
3186
|
+
getDynamicListData?: DynamicListDataProvider;
|
|
3187
|
+
dynamicListPanelRenderer?: DynamicListPanelRenderer;
|
|
3188
|
+
/** Callback when external content is dropped into the editor (receives position only) */
|
|
3189
|
+
onExternalDrop?: (position: DropPosition) => void;
|
|
3190
|
+
/** MIME type to accept for external drops (default: 'application/x-artifact') */
|
|
3191
|
+
externalDropType?: string;
|
|
3192
|
+
/** Drop indicator element to show during drag (caller provides with data already populated) */
|
|
3193
|
+
dropIndicator?: React.ReactNode;
|
|
2998
3194
|
}
|
|
2999
3195
|
/**
|
|
3000
3196
|
* IxoEditor component - A customized BlockNote editor for IXO (Mantine UI)
|
|
3001
3197
|
*/
|
|
3002
|
-
declare function IxoEditor({ editor, editable, className, onChange, onSelectionChange, children, mantineTheme, handlers, blockRequirements, isPanelVisible, coverImageUrl, logoUrl, selfNav, pageHeaderProps, }: IxoEditorProps): React.ReactElement | null;
|
|
3198
|
+
declare function IxoEditor({ editor, editable, className, onChange, onSelectionChange, children, mantineTheme, handlers, blockRequirements, isPanelVisible, coverImageUrl, logoUrl, selfNav, pageHeaderProps, visualizationRenderer, getDynamicListData, dynamicListPanelRenderer, onExternalDrop, externalDropType, dropIndicator, }: IxoEditorProps): React.ReactElement | null;
|
|
3003
3199
|
|
|
3004
3200
|
interface CoverImageProps {
|
|
3005
3201
|
coverImageUrl?: string;
|
|
@@ -3147,4 +3343,4 @@ declare class GraphQLClient {
|
|
|
3147
3343
|
}
|
|
3148
3344
|
declare const ixoGraphQLClient: GraphQLClient;
|
|
3149
3345
|
|
|
3150
|
-
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,
|
|
3346
|
+
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 };
|
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-
|
|
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-
|
|
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-B8LHwJc9.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-B8LHwJc9.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
package/dist/mantine/index.d.ts
CHANGED
|
@@ -1,10 +1,140 @@
|
|
|
1
|
-
|
|
1
|
+
import { ak as IxoBlockProps } from '../graphql-client-B8LHwJc9.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-B8LHwJc9.mjs';
|
|
2
3
|
import * as zustand from 'zustand';
|
|
4
|
+
import * as _blocknote_core from '@blocknote/core';
|
|
3
5
|
export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
|
|
4
6
|
import 'yjs';
|
|
5
7
|
import 'react';
|
|
6
8
|
import 'matrix-js-sdk';
|
|
7
9
|
|
|
10
|
+
declare const DynamicListBlockSpec: {
|
|
11
|
+
config: {
|
|
12
|
+
readonly type: "dynamicList";
|
|
13
|
+
readonly propSchema: {
|
|
14
|
+
readonly listId: {
|
|
15
|
+
readonly default: "";
|
|
16
|
+
};
|
|
17
|
+
readonly title: {
|
|
18
|
+
readonly default: "";
|
|
19
|
+
};
|
|
20
|
+
readonly columns: {
|
|
21
|
+
readonly default: "[]";
|
|
22
|
+
};
|
|
23
|
+
readonly dataSource: {
|
|
24
|
+
readonly default: "{}";
|
|
25
|
+
};
|
|
26
|
+
readonly snapshot: {
|
|
27
|
+
readonly default: "";
|
|
28
|
+
};
|
|
29
|
+
readonly snapshotTimestamp: {
|
|
30
|
+
readonly default: "";
|
|
31
|
+
};
|
|
32
|
+
readonly panelDescription: {
|
|
33
|
+
readonly default: "";
|
|
34
|
+
};
|
|
35
|
+
readonly actions: {
|
|
36
|
+
readonly default: "[]";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly content: "none";
|
|
40
|
+
};
|
|
41
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
42
|
+
readonly type: "dynamicList";
|
|
43
|
+
readonly propSchema: {
|
|
44
|
+
readonly listId: {
|
|
45
|
+
readonly default: "";
|
|
46
|
+
};
|
|
47
|
+
readonly title: {
|
|
48
|
+
readonly default: "";
|
|
49
|
+
};
|
|
50
|
+
readonly columns: {
|
|
51
|
+
readonly default: "[]";
|
|
52
|
+
};
|
|
53
|
+
readonly dataSource: {
|
|
54
|
+
readonly default: "{}";
|
|
55
|
+
};
|
|
56
|
+
readonly snapshot: {
|
|
57
|
+
readonly default: "";
|
|
58
|
+
};
|
|
59
|
+
readonly snapshotTimestamp: {
|
|
60
|
+
readonly default: "";
|
|
61
|
+
};
|
|
62
|
+
readonly panelDescription: {
|
|
63
|
+
readonly default: "";
|
|
64
|
+
};
|
|
65
|
+
readonly actions: {
|
|
66
|
+
readonly default: "[]";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly content: "none";
|
|
70
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
interface DynamicListBlockProps extends IxoBlockProps {
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Position in the list item layout
|
|
78
|
+
* - topLeft: Primary identifier (e.g., name, title)
|
|
79
|
+
* - bottomLeft: Secondary info (e.g., subtitle, address, description)
|
|
80
|
+
* - topRight: Primary value (e.g., amount, percentage, status)
|
|
81
|
+
* - bottomRight: Secondary value (e.g., role, date, additional info)
|
|
82
|
+
*/
|
|
83
|
+
type ColumnPosition = 'topLeft' | 'bottomLeft' | 'topRight' | 'bottomRight';
|
|
84
|
+
/**
|
|
85
|
+
* Column definition for dynamic lists
|
|
86
|
+
*/
|
|
87
|
+
interface DynamicListColumn {
|
|
88
|
+
/** Unique key matching data object properties */
|
|
89
|
+
key: string;
|
|
90
|
+
/** Display label for the column header (shown in table view, used for accessibility) */
|
|
91
|
+
label: string;
|
|
92
|
+
/** Position in the list item layout - optional, columns without position shown only in detail panel */
|
|
93
|
+
position?: ColumnPosition;
|
|
94
|
+
/** Data type for formatting and sorting */
|
|
95
|
+
type?: 'string' | 'number' | 'date';
|
|
96
|
+
/** Optional color for the text (Mantine color like 'blue', 'green', 'dimmed') */
|
|
97
|
+
color?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* DataSource describes how to fetch the list data
|
|
101
|
+
* This is stored in the block so other users can reproduce the query
|
|
102
|
+
*/
|
|
103
|
+
interface DataSource {
|
|
104
|
+
/** The DID (Decentralized Identifier) of the oracle that generated this data */
|
|
105
|
+
oracleDid: string;
|
|
106
|
+
/** Human-readable oracle name */
|
|
107
|
+
oracleName?: string;
|
|
108
|
+
/** A standalone query that can be used in a brand new conversation to reproduce this data */
|
|
109
|
+
query: string;
|
|
110
|
+
/** Tool name for programmatic re-fetch (if oracle supports it) */
|
|
111
|
+
toolName?: string;
|
|
112
|
+
/** Parameters for the tool call */
|
|
113
|
+
params?: Record<string, any>;
|
|
114
|
+
/** Human description of what this data represents */
|
|
115
|
+
description?: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Action that can be performed on a dynamic list item
|
|
119
|
+
*/
|
|
120
|
+
interface DynamicListAction {
|
|
121
|
+
/** Unique identifier for the action */
|
|
122
|
+
id: string;
|
|
123
|
+
/** Display label for the action button */
|
|
124
|
+
label: string;
|
|
125
|
+
/** Optional button color (Mantine color like 'blue', 'green', 'red') */
|
|
126
|
+
color?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Panel configuration for dynamic list item detail view
|
|
130
|
+
*/
|
|
131
|
+
interface DynamicListPanelConfig {
|
|
132
|
+
/** Description shown at the top of the panel explaining what items represent */
|
|
133
|
+
panelDescription?: string;
|
|
134
|
+
/** List of actions that can be performed on items */
|
|
135
|
+
actions?: DynamicListAction[];
|
|
136
|
+
}
|
|
137
|
+
|
|
8
138
|
interface PanelState {
|
|
9
139
|
activePanel: string | null;
|
|
10
140
|
registeredPanels: Map<string, React.ReactNode>;
|
|
@@ -42,4 +172,4 @@ declare const useListBlocksUIStore: zustand.UseBoundStore<zustand.StoreApi<ListB
|
|
|
42
172
|
*/
|
|
43
173
|
declare const useListBlocksUI: () => ListBlocksUIContextValue;
|
|
44
174
|
|
|
45
|
-
export { type CollapseEvent, type ListBlocksUIContextValue, type Listener, useListBlocksUI, useListBlocksUIStore, usePanel, usePanelStore };
|
|
175
|
+
export { type CollapseEvent, type ColumnPosition, type DataSource, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type ListBlocksUIContextValue, type Listener, useListBlocksUI, useListBlocksUIStore, usePanel, usePanelStore };
|
package/dist/mantine/index.mjs
CHANGED
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
BlocknoteProvider,
|
|
6
6
|
CheckboxBlockSpec,
|
|
7
7
|
CoverImage,
|
|
8
|
+
DynamicListBlockSpec,
|
|
8
9
|
EntitySigningSetup,
|
|
9
10
|
EvaluationTab,
|
|
11
|
+
ExternalDropZone,
|
|
10
12
|
FlowPermissionsPanel,
|
|
11
13
|
GrantPermissionModal,
|
|
12
14
|
GraphQLClient,
|
|
@@ -29,7 +31,7 @@ import {
|
|
|
29
31
|
useListBlocksUIStore,
|
|
30
32
|
usePanel,
|
|
31
33
|
usePanelStore
|
|
32
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-RGZLIZL2.mjs";
|
|
33
35
|
export {
|
|
34
36
|
ApiRequestBlockSpec,
|
|
35
37
|
AuthorizationTab,
|
|
@@ -37,8 +39,10 @@ export {
|
|
|
37
39
|
BlocknoteProvider,
|
|
38
40
|
CheckboxBlockSpec,
|
|
39
41
|
CoverImage,
|
|
42
|
+
DynamicListBlockSpec,
|
|
40
43
|
EntitySigningSetup,
|
|
41
44
|
EvaluationTab,
|
|
45
|
+
ExternalDropZone,
|
|
42
46
|
FlowPermissionsPanel,
|
|
43
47
|
GrantPermissionModal,
|
|
44
48
|
GraphQLClient,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixo/editor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.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",
|
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsup && node scripts/rename-dts.mjs",
|
|
31
|
-
"
|
|
32
|
-
"dev": "tsup --watch",
|
|
31
|
+
"dev": "nodemon --watch src --ext ts,tsx --exec \"tsup\"",
|
|
33
32
|
"clean": "rimraf dist style.css",
|
|
34
33
|
"prepare": "husky install && npm run clean && npm run build",
|
|
35
34
|
"type-check": "tsc --noEmit",
|
|
@@ -50,10 +49,10 @@
|
|
|
50
49
|
"private": false,
|
|
51
50
|
"peerDependencies": {
|
|
52
51
|
"@ixo/matrix-crdt": "*",
|
|
53
|
-
"@ixo/surveys": "^0.0
|
|
52
|
+
"@ixo/surveys": "^0.1.0",
|
|
54
53
|
"@mantine/core": "^7.11.2",
|
|
55
54
|
"@mantine/hooks": "^7.11.2",
|
|
56
|
-
"matrix-js-sdk": "37.5.0",
|
|
55
|
+
"matrix-js-sdk": ">=37.5.0",
|
|
57
56
|
"react": "^18.0.0",
|
|
58
57
|
"react-dom": "^18.0.0"
|
|
59
58
|
},
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
"zustand": "5.0.8"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
|
-
"@ixo/surveys": "^0.0
|
|
68
|
+
"@ixo/surveys": "^0.1.0",
|
|
70
69
|
"@commitlint/cli": "^20.0.0",
|
|
71
70
|
"@commitlint/config-conventional": "^20.0.0",
|
|
72
71
|
"@eslint/compat": "^1.4.0",
|
|
@@ -91,6 +90,7 @@
|
|
|
91
90
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
92
91
|
"husky": "^8.0.3",
|
|
93
92
|
"lint-staged": "^16.2.0",
|
|
93
|
+
"nodemon": "^3.1.11",
|
|
94
94
|
"prettier": "^3.2.5",
|
|
95
95
|
"react": "^18.2.0",
|
|
96
96
|
"react-dom": "^18.2.0",
|
package/style-core.css
CHANGED
|
@@ -260,3 +260,11 @@
|
|
|
260
260
|
font-size: 1.15em;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
+
|
|
264
|
+
/* Hide ProseMirror drop cursor ONLY when dragging external artifacts */
|
|
265
|
+
body.external-artifact-drag-active .prosemirror-dropcursor-block,
|
|
266
|
+
body.external-artifact-drag-active .prosemirror-dropcursor-inline {
|
|
267
|
+
display: none !important;
|
|
268
|
+
opacity: 0 !important;
|
|
269
|
+
visibility: hidden !important;
|
|
270
|
+
}
|
package/style-mantine.css
CHANGED
|
@@ -357,3 +357,11 @@
|
|
|
357
357
|
font-size: 1.15em;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
+
|
|
361
|
+
/* Hide ProseMirror drop cursor ONLY when dragging external artifacts */
|
|
362
|
+
body.external-artifact-drag-active .prosemirror-dropcursor-block,
|
|
363
|
+
body.external-artifact-drag-active .prosemirror-dropcursor-inline {
|
|
364
|
+
display: none !important;
|
|
365
|
+
opacity: 0 !important;
|
|
366
|
+
visibility: hidden !important;
|
|
367
|
+
}
|
package/style.css
CHANGED
|
@@ -357,3 +357,11 @@
|
|
|
357
357
|
font-size: 1.15em;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
+
|
|
361
|
+
/* Hide ProseMirror drop cursor ONLY when dragging external artifacts */
|
|
362
|
+
body.external-artifact-drag-active .prosemirror-dropcursor-block,
|
|
363
|
+
body.external-artifact-drag-active .prosemirror-dropcursor-inline {
|
|
364
|
+
display: none !important;
|
|
365
|
+
opacity: 0 !important;
|
|
366
|
+
visibility: hidden !important;
|
|
367
|
+
}
|