import * as _blocknote_core from '@blocknote/core';
import { BlockSchemaFromSpecs, InlineContentSchema, StyleSchema, BlockNoteEditor, PartialBlock } from '@blocknote/core';
import * as React from 'react';
import { MatrixClient } from 'matrix-js-sdk';
import { Map, Array as Array$1 } from 'yjs';
import { Delegation } from '@ixo/ucan';

declare const blockSpecs: {
    checkbox: {
        config: {
            readonly type: "checkbox";
            readonly propSchema: {
                readonly checked: {
                    readonly default: false;
                };
                readonly allowedCheckers: {
                    readonly default: "all";
                };
                readonly initialChecked: {
                    readonly default: false;
                };
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "square-check";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "checkbox";
            readonly propSchema: {
                readonly checked: {
                    readonly default: false;
                };
                readonly allowedCheckers: {
                    readonly default: "all";
                };
                readonly initialChecked: {
                    readonly default: false;
                };
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "square-check";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    list: {
        config: {
            readonly type: "list";
            readonly propSchema: {
                readonly listType: {
                    readonly default: "";
                };
                readonly sort: {
                    readonly default: "{}";
                };
                readonly filter: {
                    readonly default: "{}";
                };
                readonly filterOptions: {
                    readonly default: "{}";
                };
                readonly sortOptions: {
                    readonly default: "{}";
                };
                readonly listConfig: {
                    readonly default: "{}";
                };
                readonly icon: {
                    readonly default: "📋";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "list";
            readonly propSchema: {
                readonly listType: {
                    readonly default: "";
                };
                readonly sort: {
                    readonly default: "{}";
                };
                readonly filter: {
                    readonly default: "{}";
                };
                readonly filterOptions: {
                    readonly default: "{}";
                };
                readonly sortOptions: {
                    readonly default: "{}";
                };
                readonly listConfig: {
                    readonly default: "{}";
                };
                readonly icon: {
                    readonly default: "📋";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    enumChecklist: {
        config: {
            readonly type: "enumChecklist";
            readonly propSchema: {
                readonly listType: {
                    readonly default: "";
                };
                readonly listConfig: {
                    readonly default: "{}";
                };
                readonly selectedIds: {
                    readonly default: "[]";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "enumChecklist";
            readonly propSchema: {
                readonly listType: {
                    readonly default: "";
                };
                readonly listConfig: {
                    readonly default: "{}";
                };
                readonly selectedIds: {
                    readonly default: "[]";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    overview: {
        config: {
            readonly type: "overview";
            readonly propSchema: {
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "overview";
            readonly propSchema: {
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    proposal: {
        config: {
            readonly type: "proposal";
            readonly propSchema: {
                readonly status: {
                    readonly default: "draft";
                    readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
                };
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "file-text";
                };
                readonly proposalId: {
                    readonly default: "";
                };
                readonly actions: {
                    readonly default: "[]";
                };
                readonly voteEnabled: {
                    readonly default: true;
                };
                readonly voteTitle: {
                    readonly default: "";
                };
                readonly voteSubtitle: {
                    readonly default: "";
                };
                readonly voteIcon: {
                    readonly default: "checklist";
                };
                readonly daysLeft: {
                    readonly default: 0;
                };
                readonly proposalContractAddress: {
                    readonly default: "";
                };
                readonly coreAddress: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "proposal";
            readonly propSchema: {
                readonly status: {
                    readonly default: "draft";
                    readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
                };
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "file-text";
                };
                readonly proposalId: {
                    readonly default: "";
                };
                readonly actions: {
                    readonly default: "[]";
                };
                readonly voteEnabled: {
                    readonly default: true;
                };
                readonly voteTitle: {
                    readonly default: "";
                };
                readonly voteSubtitle: {
                    readonly default: "";
                };
                readonly voteIcon: {
                    readonly default: "checklist";
                };
                readonly daysLeft: {
                    readonly default: 0;
                };
                readonly proposalContractAddress: {
                    readonly default: "";
                };
                readonly coreAddress: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    apiRequest: {
        config: {
            readonly type: "apiRequest";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "square-check";
                };
                readonly endpoint: {
                    readonly default: "";
                };
                readonly method: {
                    readonly default: "GET";
                };
                readonly headers: {
                    readonly default: "[]";
                };
                readonly body: {
                    readonly default: "[]";
                };
                readonly response: {
                    readonly default: "";
                };
                readonly status: {
                    readonly default: "idle";
                };
                readonly responseSchema: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "apiRequest";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "square-check";
                };
                readonly endpoint: {
                    readonly default: "";
                };
                readonly method: {
                    readonly default: "GET";
                };
                readonly headers: {
                    readonly default: "[]";
                };
                readonly body: {
                    readonly default: "[]";
                };
                readonly response: {
                    readonly default: "";
                };
                readonly status: {
                    readonly default: "idle";
                };
                readonly responseSchema: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    notify: {
        config: {
            readonly type: "notify";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "bell";
                };
                readonly channel: {
                    readonly default: "email";
                };
                readonly to: {
                    readonly default: "[]";
                };
                readonly cc: {
                    readonly default: "[]";
                };
                readonly bcc: {
                    readonly default: "[]";
                };
                readonly subject: {
                    readonly default: "";
                };
                readonly body: {
                    readonly default: "";
                };
                readonly bodyType: {
                    readonly default: "text";
                };
                readonly from: {
                    readonly default: "";
                };
                readonly replyTo: {
                    readonly default: "";
                };
                readonly templateId: {
                    readonly default: "";
                };
                readonly templateVariables: {
                    readonly default: "{}";
                };
                readonly status: {
                    readonly default: "idle";
                };
                readonly messageId: {
                    readonly default: "";
                };
                readonly sentAt: {
                    readonly default: "";
                };
                readonly errorMessage: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "notify";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "bell";
                };
                readonly channel: {
                    readonly default: "email";
                };
                readonly to: {
                    readonly default: "[]";
                };
                readonly cc: {
                    readonly default: "[]";
                };
                readonly bcc: {
                    readonly default: "[]";
                };
                readonly subject: {
                    readonly default: "";
                };
                readonly body: {
                    readonly default: "";
                };
                readonly bodyType: {
                    readonly default: "text";
                };
                readonly from: {
                    readonly default: "";
                };
                readonly replyTo: {
                    readonly default: "";
                };
                readonly templateId: {
                    readonly default: "";
                };
                readonly templateVariables: {
                    readonly default: "{}";
                };
                readonly status: {
                    readonly default: "idle";
                };
                readonly messageId: {
                    readonly default: "";
                };
                readonly sentAt: {
                    readonly default: "";
                };
                readonly errorMessage: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    claim: {
        config: {
            readonly type: "claim";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "square-check";
                };
                readonly deedDid: {
                    readonly default: "";
                };
                readonly selectedCollections: {
                    readonly default: "[]";
                };
                readonly adminAddress: {
                    readonly default: "";
                };
                readonly claimCollectionId: {
                    readonly default: "";
                };
                readonly linkedClaimCollectionId: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "claim";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "square-check";
                };
                readonly deedDid: {
                    readonly default: "";
                };
                readonly selectedCollections: {
                    readonly default: "[]";
                };
                readonly adminAddress: {
                    readonly default: "";
                };
                readonly claimCollectionId: {
                    readonly default: "";
                };
                readonly linkedClaimCollectionId: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    evaluator: {
        config: {
            readonly type: "evaluator";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "checklist";
                };
                readonly deedDid: {
                    readonly default: "";
                };
                readonly selectedCollections: {
                    readonly default: "[]";
                };
                readonly adminAddress: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "evaluator";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "checklist";
                };
                readonly deedDid: {
                    readonly default: "";
                };
                readonly selectedCollections: {
                    readonly default: "[]";
                };
                readonly adminAddress: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    email: {
        config: {
            readonly type: "email";
            readonly propSchema: {
                readonly templateName: {
                    readonly default: "";
                };
                readonly templateVersion: {
                    readonly default: "";
                };
                readonly to: {
                    readonly default: "";
                };
                readonly cc: {
                    readonly default: "";
                };
                readonly bcc: {
                    readonly default: "";
                };
                readonly subject: {
                    readonly default: "";
                };
                readonly replyTo: {
                    readonly default: "";
                };
                readonly variables: {
                    readonly default: "{}";
                };
                readonly extractedVariables: {
                    readonly default: "[]";
                };
                readonly title: {
                    readonly default: "Send Email";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "mail";
                };
                readonly buttonLabel: {
                    readonly default: "Send Email";
                };
                readonly status: {
                    readonly default: "idle";
                };
                readonly lastSentAt: {
                    readonly default: "";
                };
                readonly lastMessageId: {
                    readonly default: "";
                };
                readonly error: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "email";
            readonly propSchema: {
                readonly templateName: {
                    readonly default: "";
                };
                readonly templateVersion: {
                    readonly default: "";
                };
                readonly to: {
                    readonly default: "";
                };
                readonly cc: {
                    readonly default: "";
                };
                readonly bcc: {
                    readonly default: "";
                };
                readonly subject: {
                    readonly default: "";
                };
                readonly replyTo: {
                    readonly default: "";
                };
                readonly variables: {
                    readonly default: "{}";
                };
                readonly extractedVariables: {
                    readonly default: "[]";
                };
                readonly title: {
                    readonly default: "Send Email";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "mail";
                };
                readonly buttonLabel: {
                    readonly default: "Send Email";
                };
                readonly status: {
                    readonly default: "idle";
                };
                readonly lastSentAt: {
                    readonly default: "";
                };
                readonly lastMessageId: {
                    readonly default: "";
                };
                readonly error: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    visualization: {
        config: {
            readonly type: "visualization";
            readonly propSchema: {
                readonly vizType: {
                    readonly default: "";
                };
                readonly config: {
                    readonly default: "{}";
                };
                readonly title: {
                    readonly default: "";
                };
                readonly preferences: {
                    readonly default: "{}";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "visualization";
            readonly propSchema: {
                readonly vizType: {
                    readonly default: "";
                };
                readonly config: {
                    readonly default: "{}";
                };
                readonly title: {
                    readonly default: "";
                };
                readonly preferences: {
                    readonly default: "{}";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    dynamicList: {
        config: {
            readonly type: "dynamicList";
            readonly propSchema: {
                readonly listId: {
                    readonly default: "";
                };
                readonly title: {
                    readonly default: "";
                };
                readonly columns: {
                    readonly default: "[]";
                };
                readonly dataSource: {
                    readonly default: "{}";
                };
                readonly snapshot: {
                    readonly default: "";
                };
                readonly snapshotTimestamp: {
                    readonly default: "";
                };
                readonly panelDescription: {
                    readonly default: "";
                };
                readonly actions: {
                    readonly default: "[]";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "dynamicList";
            readonly propSchema: {
                readonly listId: {
                    readonly default: "";
                };
                readonly title: {
                    readonly default: "";
                };
                readonly columns: {
                    readonly default: "[]";
                };
                readonly dataSource: {
                    readonly default: "{}";
                };
                readonly snapshot: {
                    readonly default: "";
                };
                readonly snapshotTimestamp: {
                    readonly default: "";
                };
                readonly panelDescription: {
                    readonly default: "";
                };
                readonly actions: {
                    readonly default: "[]";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    protocolSelector: {
        config: {
            readonly type: "protocolSelector";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "git-branch";
                };
                readonly protocolDids: {
                    readonly default: "[]";
                };
                readonly selectedProtocolDid: {
                    readonly default: "";
                };
                readonly selectedProtocolName: {
                    readonly default: "";
                };
                readonly selectedProtocolType: {
                    readonly default: "";
                };
                readonly status: {
                    readonly default: "pending";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "protocolSelector";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "git-branch";
                };
                readonly protocolDids: {
                    readonly default: "[]";
                };
                readonly selectedProtocolDid: {
                    readonly default: "";
                };
                readonly selectedProtocolName: {
                    readonly default: "";
                };
                readonly selectedProtocolType: {
                    readonly default: "";
                };
                readonly status: {
                    readonly default: "pending";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    form: {
        config: {
            readonly type: "form";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "checklist";
                };
                readonly surveySchema: {
                    readonly default: "";
                };
                readonly answers: {
                    readonly default: "";
                };
                readonly status: {
                    readonly default: "pending";
                };
                readonly completedAt: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "form";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "checklist";
                };
                readonly surveySchema: {
                    readonly default: "";
                };
                readonly answers: {
                    readonly default: "";
                };
                readonly status: {
                    readonly default: "pending";
                };
                readonly completedAt: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    governanceGroup: {
        config: {
            readonly type: "governanceGroup";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "users";
                };
                readonly groupType: {
                    readonly default: "";
                };
                readonly surveySchema: {
                    readonly default: "";
                };
                readonly answers: {
                    readonly default: "";
                };
                readonly lastSubmission: {
                    readonly default: "";
                };
                readonly coreAddress: {
                    readonly default: "";
                };
                readonly groupAddress: {
                    readonly default: "";
                };
                readonly afterCreate: {
                    readonly default: "";
                };
                readonly hookedActions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "governanceGroup";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "users";
                };
                readonly groupType: {
                    readonly default: "";
                };
                readonly surveySchema: {
                    readonly default: "";
                };
                readonly answers: {
                    readonly default: "";
                };
                readonly lastSubmission: {
                    readonly default: "";
                };
                readonly coreAddress: {
                    readonly default: "";
                };
                readonly groupAddress: {
                    readonly default: "";
                };
                readonly afterCreate: {
                    readonly default: "";
                };
                readonly hookedActions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    flowLink: {
        config: {
            readonly type: "flowLink";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "external-link";
                };
                readonly links: {
                    readonly default: "[]";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "flowLink";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "external-link";
                };
                readonly links: {
                    readonly default: "[]";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    action: {
        config: {
            readonly type: "action";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "bolt";
                };
                readonly actionType: {
                    readonly default: "";
                };
                readonly inputs: {
                    readonly default: "{}";
                };
                readonly requiresConfirmation: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly trigger: {
                    readonly default: "";
                };
                readonly triggerMode: {
                    readonly default: "manual";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly paymentStatus: {
                    readonly default: "";
                };
                readonly transactionId: {
                    readonly default: "";
                };
                readonly paymentProposal: {
                    readonly default: "";
                };
                readonly paymentSummary: {
                    readonly default: "";
                };
                readonly paymentError: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "action";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "bolt";
                };
                readonly actionType: {
                    readonly default: "";
                };
                readonly inputs: {
                    readonly default: "{}";
                };
                readonly requiresConfirmation: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
                readonly conditions: {
                    readonly default: "";
                };
                readonly ttlAbsoluteDueDate: {
                    readonly default: "";
                };
                readonly ttlFromEnablement: {
                    readonly default: "";
                };
                readonly ttlFromCommitment: {
                    readonly default: "";
                };
                readonly trigger: {
                    readonly default: "";
                };
                readonly triggerMode: {
                    readonly default: "manual";
                };
                readonly assignment: {
                    readonly default: string;
                };
                readonly commitment: {
                    readonly default: string;
                };
                readonly paymentStatus: {
                    readonly default: "";
                };
                readonly transactionId: {
                    readonly default: "";
                };
                readonly paymentProposal: {
                    readonly default: "";
                };
                readonly paymentSummary: {
                    readonly default: "";
                };
                readonly paymentError: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    location: {
        config: {
            readonly type: "location";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly latitude: {
                    readonly default: "";
                };
                readonly longitude: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "location";
            readonly propSchema: {
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly latitude: {
                    readonly default: "";
                };
                readonly longitude: {
                    readonly default: "";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
    embed: {
        config: {
            readonly type: "embed";
            readonly propSchema: {
                readonly url: {
                    readonly default: "";
                };
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "code";
                };
                readonly height: {
                    readonly default: "400";
                };
                readonly allowAuth: {
                    readonly default: "false";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        };
        implementation: _blocknote_core.TiptapBlockImplementation<{
            readonly type: "embed";
            readonly propSchema: {
                readonly url: {
                    readonly default: "";
                };
                readonly title: {
                    readonly default: "";
                };
                readonly description: {
                    readonly default: "";
                };
                readonly icon: {
                    readonly default: "code";
                };
                readonly height: {
                    readonly default: "400";
                };
                readonly allowAuth: {
                    readonly default: "false";
                };
                readonly skill: {
                    readonly default: "";
                };
            };
            readonly content: "none";
        }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
    };
};
declare const getExtraSlashMenuItems: (editor: any) => {
    title: string;
    icon: React.JSX.Element;
    onItemClick: () => void;
    aliases: string[];
    group: string;
    subtext: string;
}[];

/**
 * Page metadata stored in Matrix state events
 * Now stores only URL strings in separate events
 */
interface PageMetadata {
    /** Page title (stored as Matrix room name) */
    title?: string;
    /** Cover image URL */
    cover?: string;
    /** Icon/logo image URL */
    icon?: string;
    /** Cover image vertical position (0-100 percentage) */
    coverPosition?: number;
}
/**
 * Callback type for metadata change subscriptions
 */
type MetadataChangeCallback = (metadata: PageMetadata) => void;
/**
 * Manager for Matrix state events containing page metadata (cover, icon)
 *
 * Stores cover and icon as separate state events, each containing only the URL string.
 */
declare class MatrixMetadataManager {
    private matrixClient;
    private roomId;
    private subscribers;
    private eventHandler;
    constructor(matrixClient: MatrixClient, roomId: string);
    /**
     * Set up Matrix event listener for real-time updates
     */
    private setupEventListener;
    /**
     * Notify all subscribers of metadata changes
     */
    private notifySubscribers;
    /**
     * Send metadata to Matrix state events (separate events for cover and icon)
     *
     * @param metadata - The metadata to store (only URL strings)
     * @param permissions - Permission check object
     * @returns Promise that resolves when state events are sent
     */
    setMetadata(metadata: PageMetadata, permissions: {
        write: boolean;
    }): Promise<void>;
    /**
     * Get current metadata from Matrix state (reads from separate events)
     *
     * @returns Current metadata or null if not set
     */
    getMetadata(): PageMetadata | null;
    /**
     * Subscribe to metadata changes
     *
     * @param callback - Function to call when metadata changes
     * @returns Unsubscribe function
     */
    subscribe(callback: MetadataChangeCallback): () => void;
    /**
     * Clean up event listeners and subscriptions
     * Call this when the manager is no longer needed
     */
    dispose(): void;
}

type DID = string;
type ClaimCollectionURI = string;
type EvaluationStatus = 'pending' | 'approved' | 'rejected';
interface LinkedClaim {
    collectionId: ClaimCollectionURI;
}
interface FlowNodeAuthzExtension {
    linkedClaim?: LinkedClaim;
}
type NodeState = 'idle' | 'running' | 'completed' | 'failed' | 'cancelled';
interface FlowNodeRuntimeState {
    state?: NodeState;
    output?: Record<string, any>;
    executedByDid?: DID;
    executedAt?: number;
    /** Unix timestamp (ms) when the block first became enabled/activated */
    enabledAt?: number;
    invocations?: string[];
    lastInvocationCid?: string;
    assignments?: Array<{
        actorDid: DID;
        assignedByDid?: DID;
        at: number;
        status: 'assigned' | 'accepted' | 'declined';
    }>;
    commitments?: Array<{
        actorDid: DID;
        at: number;
        expiresAt?: number;
    }>;
    proposals?: Array<{
        id: string;
        proposedByDid: DID;
        proposedAt: number;
        mode: 'inputs_patch' | 'output_patch';
        patch: any;
        rationale?: string;
        status: 'open' | 'accepted' | 'rejected';
        decidedByDid?: DID;
        decidedAt?: number;
        acceptanceInvocationCid?: string;
    }>;
    error?: {
        message: string;
        code?: string;
        at: number;
        data?: any;
    };
    claimId?: string;
    submittedByDid?: DID;
    evaluationStatus?: EvaluationStatus;
    executionTimestamp?: number;
}
interface FlowNodeBase {
    id: string;
    type: string;
    props: Record<string, any>;
}
type FlowNode = FlowNodeBase & FlowNodeAuthzExtension;

/**
 * UCAN types for @ixo/ucan integration
 *
 * These types support the new invocation-based execution model where:
 * - Delegations grant permissions (stored as Base64 CAR)
 * - Invocations exercise permissions (stored for audit trail)
 */
/**
 * Caveats/constraints for a capability
 */
interface CapabilityCaveats {
    /** Intent - user-provided description of the purpose of this capability */
    int?: string;
    /** Additional custom caveats */
    [key: string]: unknown;
}
/**
 * Capability definition aligned with @ixo/ucan
 */
interface UcanCapability {
    /** Action that can be performed, e.g., "flow/execute", "flow/block/execute" */
    can: string;
    /** Resource URI, e.g., "ixo:flow:abc123", "ixo:flow:abc123:blockId" */
    with: string;
    /** Additional constraints/caveats (optional) */
    nb?: CapabilityCaveats;
}
/**
 * Stored delegation in new CAR format or legacy JSON format
 */
interface StoredDelegation {
    /** CID of the delegation (content-addressed ID) */
    cid: string;
    /** Base64-encoded CAR bytes (for 'car' format) or empty string for legacy */
    delegation: string;
    /** Issuer DID (for quick lookup without parsing) */
    issuerDid: string;
    /** Audience DID (for quick lookup without parsing) */
    audienceDid: string;
    /** Capabilities granted (for quick lookup without parsing) */
    capabilities: UcanCapability[];
    /** Expiration timestamp in milliseconds (for quick expiry checks) */
    expiration?: number;
    /** When this delegation was created (milliseconds) */
    createdAt: number;
    /** Format indicator */
    format: 'car';
    /** CIDs of proof delegations in the chain */
    proofCids: string[];
}
/**
 * Stored invocation for audit trail and replay protection
 */
interface StoredInvocation {
    /** CID of the invocation (content-addressed ID) */
    cid: string;
    /** Base64-encoded CAR bytes */
    invocation: string;
    /** DID of the invoker */
    invokerDid: string;
    /** Capability being invoked */
    capability: UcanCapability;
    /** When this invocation was executed (milliseconds) */
    executedAt: number;
    /** Flow ID context */
    flowId: string;
    /** Block ID if block-level execution */
    blockId?: string;
    /** Execution result */
    result: 'success' | 'failure';
    /** Error message if failed */
    error?: string;
    /** CIDs of the proof delegation chain */
    proofCids: string[];
    /** Linked claim ID if this invocation created a claim */
    claimId?: string;
    /** Transaction hash if submitted to blockchain */
    transactionHash?: string;
}
/**
 * Request to create an invocation (before execution)
 */
interface InvocationRequest {
    /** Capability to invoke */
    capability: UcanCapability;
    /** CIDs of proof delegations */
    proofs: string[];
    /** Additional facts/context for the invocation */
    facts?: Record<string, unknown>;
}
/**
 * Result of creating and validating an invocation
 */
interface InvocationResult {
    /** CID of the created invocation */
    cid: string;
    /** Serialized invocation (Base64 CAR) */
    invocation: string;
    /** Whether validation passed */
    valid: boolean;
    /** Error message if validation failed */
    error?: string;
}
/**
 * Result of executing with an invocation
 */
interface ExecutionWithInvocationResult {
    /** Whether execution succeeded */
    success: boolean;
    /** CID of the invocation used */
    invocationCid: string;
    /** Action result if successful */
    result?: unknown;
    /** Error message if failed */
    error?: string;
}
/**
 * Result of validating a delegation chain
 */
interface DelegationChainValidationResult {
    /** Whether the chain is valid */
    valid: boolean;
    /** The proof chain from root to actor (if valid) */
    proofChain?: StoredDelegation[];
    /** Error message if invalid */
    error?: string;
}
/**
 * Result of finding valid proofs for an actor
 */
interface FindProofsResult {
    /** Whether valid proofs were found */
    found: boolean;
    /** CIDs of proof delegations (if found) */
    proofCids?: string[];
    /** Error message if not found */
    error?: string;
}
/**
 * Parameters for creating a root delegation
 */
interface CreateRootDelegationParams {
    /** DID of the flow owner (issuer and audience for root) */
    flowOwnerDid: string;
    /** Type of issuer for signing */
    issuerType: 'entity' | 'user';
    /** Entity room ID if signing as entity */
    entityRoomId?: string;
    /** Full flow URI, e.g., "ixo:flow:abc123" */
    flowUri: string;
    /** PIN for signing */
    pin: string;
}
/**
 * Parameters for creating a delegation
 */
interface CreateDelegationParams {
    /** DID of the issuer */
    issuerDid: string;
    /** Type of issuer for signing */
    issuerType: 'entity' | 'user';
    /** Entity room ID if signing as entity */
    entityRoomId?: string;
    /** DID of the audience (recipient) */
    audience: string;
    /** Capabilities to grant */
    capabilities: UcanCapability[];
    /** CIDs of proof delegations */
    proofs?: string[];
    /** Expiration timestamp in milliseconds */
    expiration?: number;
    /** PIN for signing */
    pin: string;
}
/**
 * Parameters for creating an invocation
 */
interface CreateInvocationParams {
    /** DID of the invoker */
    invokerDid: string;
    /** Type of invoker for signing */
    invokerType: 'entity' | 'user';
    /** Entity room ID if signing as entity */
    entityRoomId?: string;
    /** Capability to invoke */
    capability: UcanCapability;
    /** CIDs of proof delegations */
    proofs: string[];
    /** Additional facts/context */
    facts?: Record<string, unknown>;
    /** PIN for signing */
    pin: string;
}

/**
 * UCAN Delegation Store — stores CAR-serialized delegations
 */
interface UcanDelegationStore {
    get: (cid: string) => StoredDelegation | null;
    set: (delegation: StoredDelegation) => void;
    remove: (cid: string) => void;
    has: (cid: string) => boolean;
    getRoot: () => StoredDelegation | null;
    setRootCid: (cid: string) => void;
    getRootCid: () => string | null;
    getAll: () => StoredDelegation[];
    getByAudience: (audienceDid: string) => StoredDelegation[];
    getByIssuer: (issuerDid: string) => StoredDelegation[];
    findByCapability: (can: string, withUri: string) => StoredDelegation[];
}
/**
 * Create a UCAN delegation store backed by Y.Map
 */
declare const createUcanDelegationStore: (yMap: Map<unknown>) => UcanDelegationStore;
/**
 * Create an in-memory UCAN delegation store (for testing)
 */
declare const createMemoryUcanDelegationStore: () => UcanDelegationStore;

/**
 * Invocation Store for storing and querying invocations
 *
 * Invocations are stored for:
 * - Audit trail: Cryptographic proof of who did what, when, with what authority
 * - Replay protection: Prevent same invocation being used twice
 * - Dispute resolution: Evidence if actions are contested
 * - Blockchain submission: Submit proofs to chain for immutable record
 * - Analytics: Understand flow execution patterns
 */
interface InvocationStore {
    add: (invocation: StoredInvocation) => void;
    get: (cid: string) => StoredInvocation | null;
    remove: (cid: string) => void;
    getAll: () => StoredInvocation[];
    getByInvoker: (invokerDid: string) => StoredInvocation[];
    getByFlow: (flowId: string) => StoredInvocation[];
    getByBlock: (flowId: string, blockId: string) => StoredInvocation[];
    getByCapability: (can: string, withUri: string) => StoredInvocation[];
    hasBeenInvoked: (cid: string) => boolean;
    getInDateRange: (startMs: number, endMs: number) => StoredInvocation[];
    getSuccessful: () => StoredInvocation[];
    getFailures: () => StoredInvocation[];
    getPendingSubmission: () => StoredInvocation[];
    markSubmitted: (cid: string, transactionHash: string) => void;
    getCount: () => number;
    getCountByResult: () => {
        success: number;
        failure: number;
    };
}
/**
 * Create an invocation store backed by Y.Map
 */
declare const createInvocationStore: (yMap: Map<unknown>) => InvocationStore;
/**
 * Create an in-memory invocation store (for testing)
 */
declare const createMemoryInvocationStore: () => InvocationStore;

/**
 * UCAN Service using @ixo/ucan directly
 *
 * This service provides a high-level API for:
 * - Creating and managing delegations (CAR format)
 * - Creating and validating invocations
 * - Executing actions with invocation-based authorization
 *
 * The host app only needs to provide the signer (private key) after PIN decryption.
 * All UCAN operations are performed using @ixo/ucan directly.
 */

/**
 * Signer session scope type
 */
type SignerSessionScope = 'session' | 'operation';
/**
 * Signer session returned by createSignerSession
 */
interface SignerSessionInfo {
    sessionId: string;
    did: string;
    publicKey: string;
    keyId: string;
    expiresAt: number;
    scope: SignerSessionScope;
}
/**
 * Handler functions for getting signers from the host application
 * The host app handles PIN decryption and key management
 */
interface UcanServiceHandlers {
    /**
     * Get a signer for the given DID after PIN verification
     * The host app decrypts the private key using the PIN
     *
     * @returns The private key in multibase format (for parseSigner)
     * @deprecated Prefer createSignerSession for better security
     */
    getPrivateKey?: (params: {
        did: string;
        didType: 'entity' | 'user';
        entityRoomId?: string;
        pin: string;
    }) => Promise<string>;
    /**
     * Get a signer from mnemonic (alternative to getPrivateKey)
     * The host app retrieves and decrypts the mnemonic using the PIN
     *
     * @returns The mnemonic phrase
     * @deprecated Prefer createSignerSession for better security
     */
    getMnemonic?: (params: {
        did: string;
        didType: 'entity' | 'user';
        entityRoomId?: string;
        pin: string;
    }) => Promise<string>;
    /**
     * Create a signer session that can be used for multiple sign operations.
     * The host app keeps the key material secure; the editor only receives an opaque handle.
     *
     * @param params.scope - 'session' for multiple operations, 'operation' for one-time use
     * @param params.ttlSeconds - Time-to-live for session scope (default: 300, max: 3600)
     */
    createSignerSession?: (params: {
        did: string;
        didType: 'entity' | 'user';
        entityRoomId?: string;
        pin: string;
        scope: SignerSessionScope;
        ttlSeconds?: number;
    }) => Promise<SignerSessionInfo>;
    /**
     * Sign data using an existing session.
     * For 'operation' scope, the session is automatically invalidated after this call.
     */
    signWithSession?: (params: {
        sessionId: string;
        data: string;
        algorithm?: 'Ed25519';
    }) => Promise<{
        signature: string;
        algorithm: 'Ed25519';
        keyId: string;
    }>;
    /**
     * Release a session before it expires.
     * Safe to call on already-released or expired sessions.
     */
    releaseSignerSession?: (params: {
        sessionId: string;
    }) => Promise<{
        released: boolean;
        reason?: string;
    }>;
    /**
     * Create a delegation directly in the host app.
     * The host handles all signing internally using session-based signing.
     * This is the preferred approach for security.
     */
    createDelegationWithSession?: (params: {
        sessionId: string;
        audience: string;
        capabilities: Array<{
            can: string;
            with: string;
            nb?: Record<string, unknown>;
        }>;
        proofs?: string[];
        expiration?: number;
    }) => Promise<{
        cid: string;
        delegation: string;
    }>;
    /**
     * Create an invocation directly in the host app.
     * The host handles all signing internally using session-based signing.
     * This is the preferred approach for security.
     */
    createInvocationWithSession?: (params: {
        sessionId: string;
        audience: string;
        capability: {
            can: string;
            with: string;
            nb?: Record<string, unknown>;
        };
        proofs: string[];
    }) => Promise<{
        cid: string;
        invocation: string;
    }>;
}
/**
 * Configuration for UcanService
 */
interface UcanServiceConfig {
    delegationStore: UcanDelegationStore;
    invocationStore: InvocationStore;
    handlers: UcanServiceHandlers;
    flowOwnerDid: string;
    flowUri: string;
}
/**
 * UCAN Service interface
 */
interface UcanService {
    createRootDelegation: (params: CreateRootDelegationParams) => Promise<StoredDelegation>;
    createDelegation: (params: CreateDelegationParams) => Promise<StoredDelegation>;
    revokeDelegation: (cid: string) => void;
    getDelegation: (cid: string) => StoredDelegation | null;
    getAllDelegations: () => StoredDelegation[];
    getRootDelegation: () => StoredDelegation | null;
    createAndValidateInvocation: (params: CreateInvocationParams, flowId: string, blockId?: string) => Promise<InvocationResult>;
    executeWithInvocation: <T>(params: CreateInvocationParams, action: () => Promise<T>, flowId: string, blockId?: string) => Promise<ExecutionWithInvocationResult & {
        actionResult?: T;
    }>;
    validateDelegationChain: (audienceDid: string, capability: UcanCapability) => Promise<DelegationChainValidationResult>;
    findValidProofs: (audienceDid: string, capability: UcanCapability) => Promise<FindProofsResult>;
    parseDelegationFromStore: (cid: string) => Promise<Delegation | null>;
    isConfigured: () => boolean;
}
/**
 * Create a UCAN service instance
 */
declare const createUcanService: (config: UcanServiceConfig) => UcanService;

/**
 * The schema type for the IXO editor, derived from block specs
 */
type IxoBlockSchema = BlockSchemaFromSpecs<typeof blockSpecs>;
/**
 * Editor mode representing different use cases
 */
type EditorMode = 'flow' | 'template' | 'readonly';
/**
 * Flow metadata stored in the Y.Doc root map
 */
interface FlowMetadata {
    '@context': string;
    _type: string;
    schema_version: string;
    doc_id: string;
    title: string;
    createdAt: string;
    createdBy: string;
    /** DID of the flow owner who has root signing authority */
    flowOwnerDid: string;
    /** Custom flow settings set by template creators (e.g. protocolDid) */
    [key: string]: any;
}
/**
 * Image data returned from publicFileUpload handler
 */
interface ImageData {
    url: string;
    cid: string;
    encrypted: string;
    proof: string;
    serviceEndpoint: string;
    mxc: string;
}
/**
 * Extended editor type that augments BlockNoteEditor with IXO-specific properties
 * and methods. This type should be used throughout the application instead of
 * the base BlockNoteEditor type.
 *
 * Type Parameters:
 * - BSchema: The block schema (defaults to IxoBlockSchema)
 * - ISchema: The inline content schema (uses BlockNote defaults)
 * - SSchema: The style schema (uses BlockNote defaults)
 */
interface IxoEditorType<BSchema extends IxoBlockSchema = IxoBlockSchema, ISchema extends InlineContentSchema = InlineContentSchema, SSchema extends StyleSchema = StyleSchema> extends BlockNoteEditor<BSchema, ISchema, SSchema> {
    /**
     * Configuration options for the editor
     * @internal
     */
    _ixoConfig: IxoEditorConfig;
    /**
     * Y.Doc root map for collaborative metadata storage
     * @internal
     */
    _yRoot?: Map<any>;
    /**
     * Y.Array for flow-specific structured block storage
     * @internal
     */
    _yFlow?: Array$1<any>;
    /**
     * Y.Map for runtime per-node state (claim status, timestamps, etc.)
     * @internal
     */
    _yRuntime?: Map<any>;
    /**
     * Y.Map for storing capability delegations
     * @internal
     */
    _yDelegations?: Map<any>;
    /**
     * Y.Map for storing invocations (audit trail)
     * @internal
     */
    _yInvocations?: Map<any>;
    /**
     * Y.Map for migration state persistence
     * @internal
     */
    _yMigration?: Map<any>;
    /**
     * UCAN delegation store (new @ixo/ucan integration)
     * Supports both CAR format (new) and JSON format (legacy)
     * @internal
     */
    _ucanDelegationStore?: UcanDelegationStore;
    /**
     * Invocation store for audit trail and replay protection
     * @internal
     */
    _invocationStore?: InvocationStore;
    /**
     * Current editor mode (flow, template, readonly)
     */
    mode?: EditorMode;
    /**
     * Current user information (for collaborative editing)
     */
    user?: IxoCollaborativeUser;
    /**
     * Document type (template, flow)
     * This is a local prop-based value, NOT synced via CRDT
     */
    docType?: 'template' | 'flow';
    /**
     * Check whether the document contains at least one block of the given type
     * @param type - The block type to look for (e.g. 'action', 'proposal')
     * @returns true if a block with that type exists in editor.document
     */
    hasBlockType?: (type: string) => boolean;
    /**
     * Get user-specific properties for a block
     * @param block - The block to get user properties for
     * @returns User-specific properties object
     */
    getUserProps?: (block: any) => Record<string, any>;
    /**
     * Update user-specific properties for a block
     * @param block - The block to update
     * @param updates - Properties to update
     */
    updateUserProps?: (block: any, updates: Record<string, any>) => void;
    /**
     * Get flow-level metadata
     * @returns Flow metadata object
     */
    getFlowMetadata?: () => FlowMetadata;
    /**
     * Matrix room ID where this document is synced
     */
    getRoomId?: () => string;
    /**
     * Get Matrix client
     * @returns Matrix client
     */
    getMatrixClient?: () => MatrixClient;
    /**
     * Get flow-level metadata
     * @returns Flow metadata object
     */
    getCollaborativeUsers?: () => unknown[];
    /**
     * Update flow-level metadata
     * @param updates - Metadata fields to update
     */
    updateFlowMetadata?: (updates: Partial<FlowMetadata>) => void;
    /**
     * Get the DID of the flow owner (who has root signing authority)
     * @returns Flow owner DID or empty string if not set
     */
    getFlowOwnerDid?: () => string;
    /**
     * Get the flow array (structured block storage)
     * @returns Array of flow blocks
     */
    getFlow?: () => any[];
    /**
     * Retrieve a flow node by id from the structured flow array if available.
     */
    getFlowNode?: (nodeId: string) => FlowNode | null;
    /**
     * Get the UCAN service for this flow
     */
    getUcanService?: () => UcanService | null;
    /**
     * Get a delegation by CID
     */
    getDelegation?: (cid: string) => StoredDelegation | null;
    /**
     * Store a delegation (legacy compatibility — prefers UcanService)
     */
    setDelegation?: (delegation: any) => void;
    /**
     * Get the root capability for this flow
     */
    getRootCapability?: () => any | null;
    /**
     * Set the root capability ID
     */
    setRootCapabilityId?: (capabilityId: string) => void;
    /**
     * Get all delegations as array
     */
    getAllDelegations?: () => any[];
    /**
     * Remove a delegation (revoke)
     */
    removeDelegation?: (cid: string) => void;
    /**
     * Add an invocation to the store (audit trail)
     */
    addInvocation?: (invocation: StoredInvocation) => void;
    /**
     * Get an invocation by CID
     */
    getInvocation?: (cid: string) => StoredInvocation | null;
    /**
     * Get all invocations
     */
    getAllInvocations?: () => StoredInvocation[];
    /**
     * Get invocations for a specific block
     */
    getInvocationsByBlock?: (flowId: string, blockId: string) => StoredInvocation[];
    /**
     * Check if an invocation has already been used (replay protection)
     */
    hasBeenInvoked?: (cid: string) => boolean;
    /**
     * Matrix metadata manager for page metadata (cover, icon)
     * @internal
     */
    _metadataManager?: MatrixMetadataManager;
    /**
     * Set page metadata (cover image and/or icon)
     * @param metadata - Partial metadata to update (merges with existing)
     * @returns Promise that resolves when metadata is updated
     */
    setPageMetadata?: (metadata: Partial<PageMetadata>) => Promise<void>;
    /**
     * Get current page metadata (cover image and icon)
     * @returns Current metadata or null if not set
     */
    getPageMetadata?: () => PageMetadata | null;
    /**
     * @deprecated Use setPageMetadata({ cover: imageData }) instead
     */
    setCoverImage?: (imageData?: ImageData) => void;
    /**
     * @deprecated Use getPageMetadata()?.cover instead
     */
    getCoverImage?: () => ImageData | undefined;
    /**
     * @deprecated Use setPageMetadata({ icon: imageData }) instead
     */
    setLogo?: (imageData?: ImageData) => void;
    /**
     * @deprecated Use getPageMetadata()?.icon instead
     */
    getLogo?: () => ImageData | undefined;
    /**
     * Set the active block for presence awareness
     * Updates local awareness state so other users can see which block this user is working on
     * @param blockId - The block ID to mark as active, or null to clear
     */
    setActiveBlock?: (blockId: string | null) => void;
    /**
     * Get the Yjs awareness instance for presence tracking
     * @returns Awareness instance or null if not available
     */
    getAwarenessInstance?: () => any;
}
/**
 * Re-map BlockNote renderer props to use IxoEditorType instead of BlockNoteEditor.
 * This is used in block renderers to ensure they receive the augmented editor type.
 *
 * @example
 * ```typescript
 * export function MyBlock(props: IxoBlockProps) {
 *   const { block, editor } = props;
 *   // editor is now IxoEditorType with full type safety
 *   console.log(editor.user?.name);
 * }
 * ```
 */
interface IxoBlockProps<TBlock = any> {
    editor: IxoEditorType;
    block: TBlock;
}

/**
 * Capability types for UCAN-based authorization
 */

/**
 * Grant request for delegating capabilities to a recipient.
 * Used by the GrantPermissionPanel UI.
 */
interface DelegationGrant {
    /** DID of recipient */
    audience: string;
    /** Display name of recipient (for UI) */
    audienceDisplayName?: string;
    /** Capabilities to grant */
    capabilities: UcanCapability[];
    /** CIDs of proof delegations */
    proofs: string[];
    /** Expiration timestamp (optional) */
    expiration?: number;
    /** Whether recipient can further delegate */
    canDelegate?: boolean;
}

type IxoEditorTheme = 'light' | 'dark';
interface IxoEditorOptions {
    /**
     * The color theme for the editor
     * @default 'light'
     */
    theme?: IxoEditorTheme;
    /**
     * Function to handle file uploads
     */
    uploadFile?: (file: File) => Promise<string>;
    /**
     * Initial content for the editor
     */
    initialContent?: PartialBlock[];
    /**
     * Whether the editor is editable
     * @default true
     */
    editable?: boolean;
    /**
     * Whether to show the side menu (drag handle, plus button)
     * @default true
     */
    sideMenu?: boolean;
    /**
     * Whether to enable the slash menu
     * @default true
     */
    slashMenu?: boolean;
    /**
     * Whether to show the formatting toolbar
     * @default true
     */
    formattingToolbar?: boolean;
    /**
     * Whether to show the link toolbar
     * @default true
     */
    linkToolbar?: boolean;
    /**
     * Whether to show the file panel
     * @default true
     */
    filePanel?: boolean;
    /**
     * Whether to show table handles
     * @default true
     */
    tableHandles?: boolean;
    /**
     * Document type (template, flow)
     * This is a local prop and NOT synced via CRDT
     * @default 'flow'
     */
    docType?: 'template' | 'flow';
}
interface IxoCollaborativeUser {
    name: string;
    color: string;
    accessToken: string;
    address: string;
    id: string;
    /** Optional avatar image URL for presence indicators */
    avatar?: string;
}
interface IxoCollaborativeEditorPermissions {
    /**
     * Whether the user has write permissions
     * @default false
     */
    write: boolean;
}
interface IxoCollaborativeEditorOptions extends IxoEditorOptions {
    user: IxoCollaborativeUser;
    matrixClient: MatrixClient;
    roomId: string;
    /**
     * User permissions for the collaborative document
     * @default { write: false }
     */
    permissions?: IxoCollaborativeEditorPermissions;
    /**
     * Unique identifier for the document/flow
     */
    docId?: string;
    /**
     * Title of the flow document
     */
    title?: string;
}
interface IxoEditorConfig {
    theme: IxoEditorTheme;
    editable: boolean;
    sideMenu: boolean;
    slashMenu: boolean;
    formattingToolbar: boolean;
    linkToolbar: boolean;
    filePanel: boolean;
    tableHandles: boolean;
}

export { type FindProofsResult as A, type CreateRootDelegationParams as B, type ClaimCollectionURI as C, type DelegationChainValidationResult as D, type EvaluationStatus as E, type FlowNodeAuthzExtension as F, type CreateDelegationParams as G, type CreateInvocationParams as H, type InvocationStore as I, type IxoBlockProps as J, type LinkedClaim as L, type NodeState as N, type StoredDelegation as S, type UcanDelegationStore as U, createMemoryUcanDelegationStore as a, createInvocationStore as b, createUcanDelegationStore as c, createMemoryInvocationStore as d, createUcanService as e, type UcanService as f, type UcanServiceConfig as g, type UcanServiceHandlers as h, type UcanCapability as i, type StoredInvocation as j, type DelegationGrant as k, type IxoEditorOptions as l, type IxoEditorTheme as m, type IxoEditorConfig as n, type IxoCollaborativeUser as o, type IxoCollaborativeEditorOptions as p, blockSpecs as q, getExtraSlashMenuItems as r, type IxoEditorType as s, type DID as t, type FlowNodeRuntimeState as u, type FlowNodeBase as v, type FlowNode as w, type InvocationRequest as x, type InvocationResult as y, type ExecutionWithInvocationResult as z };
