@ixo/editor 3.0.0-beta.9 → 3.1.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/index.d.ts CHANGED
@@ -1,153 +1,9 @@
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-C82HQLeC.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-C82HQLeC.mjs';
3
- import { Map } from 'yjs';
1
+ export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, v as BlocknoteHandlers, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from './graphql-client-B49ND-qp.mjs';
2
+ export { h as ActivationResult, A as AuthorizationResult, B as BaseUcanFlow, m as CompiledFlow, C as CompilerRegistry, E as ExecuteNodeParams, g as ExecutionContext, f as ExecutionOutcome, l as FlowCapability, F as FlowRuntimeStateManager, N as NodeActionResult, S as SetupFlowOptions, k as SetupFlowResult, d as buildAuthzFromProps, b as buildFlowNodeFromBlock, j as compileBaseUcanFlow, c as createRuntimeStateManager, e as executeNode, i as isAuthorized, a as isNodeActive, s as setupFlowFromBaseUcan } from './setup-eMnRk02Q.mjs';
3
+ export { D as DelegationChainValidationResult, k as DelegationGrant, I as InvocationStore, p as IxoCollaborativeEditorOptions, o as IxoCollaborativeUser, n as IxoEditorConfig, l as IxoEditorOptions, m as IxoEditorTheme, S as StoredDelegation, j as StoredInvocation, i as UcanCapability, U as UcanDelegationStore, f as UcanService, g as UcanServiceConfig, h as UcanServiceHandlers, q as blockSpecs, b as createInvocationStore, d as createMemoryInvocationStore, a as createMemoryUcanDelegationStore, c as createUcanDelegationStore, e as createUcanService, r as getExtraSlashMenuItems } from './index-Ch49AFng.mjs';
4
4
  export { CloneDocumentResult, cloneDocument } from '@ixo/matrix-crdt';
5
5
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
6
+ import 'yjs';
6
7
  import 'react';
7
8
  import 'matrix-js-sdk';
8
-
9
- declare const buildAuthzFromProps: (props: Record<string, any>) => FlowNodeAuthzExtension;
10
- declare const buildFlowNodeFromBlock: (block: any) => FlowNode;
11
-
12
- interface FlowRuntimeStateManager {
13
- get: (nodeId: string) => FlowNodeRuntimeState;
14
- update: (nodeId: string, updates: Partial<FlowNodeRuntimeState>) => void;
15
- }
16
- declare const createRuntimeStateManager: (editor?: IxoEditorType | null) => FlowRuntimeStateManager;
17
-
18
- interface DelegationStore {
19
- get: (capabilityId: string) => SignedCapability | null;
20
- set: (capability: SignedCapability) => void;
21
- remove: (capabilityId: string) => void;
22
- getRoot: () => SignedCapability | null;
23
- setRootId: (capabilityId: string) => void;
24
- getAll: () => SignedCapability[];
25
- has: (capabilityId: string) => boolean;
26
- }
27
- /**
28
- * Create a delegation store backed by Y.Map
29
- */
30
- declare const createDelegationStore: (yMap: Map<any>) => DelegationStore;
31
- /**
32
- * Create an in-memory delegation store (for testing or when Y.Map unavailable)
33
- */
34
- declare const createMemoryDelegationStore: () => DelegationStore;
35
-
36
- interface CapabilityGrant {
37
- raw: string;
38
- with?: string;
39
- audience?: string;
40
- expiresAt?: number;
41
- action?: string;
42
- }
43
- type DerivedCapability = CapabilityGrant;
44
- interface UCANManager {
45
- loadParentCapability: (capability: string) => Promise<CapabilityGrant>;
46
- deriveNodeCapability: (parent: CapabilityGrant, nodeId: string, actorDid: string) => Promise<DerivedCapability>;
47
- validateDerivedCapability: (derived: DerivedCapability, nodeId: string, actorDid: string) => Promise<void>;
48
- }
49
-
50
- interface NodeActionResult {
51
- claimId?: string;
52
- evaluationStatus?: EvaluationStatus;
53
- submittedByDid?: string;
54
- payload?: any;
55
- }
56
- interface ExecutionContext {
57
- runtime: FlowRuntimeStateManager;
58
- /** @deprecated Use delegationStore instead */
59
- ucanManager?: UCANManager;
60
- delegationStore?: DelegationStore;
61
- verifySignature?: (capabilityRaw: string, issuerDid: string) => Promise<{
62
- valid: boolean;
63
- error?: string;
64
- }>;
65
- rootIssuer?: string;
66
- flowUri?: string;
67
- now?: () => number;
68
- }
69
- interface ExecutionOutcome {
70
- success: boolean;
71
- stage: 'activation' | 'authorization' | 'claim' | 'action' | 'complete';
72
- error?: string;
73
- result?: NodeActionResult;
74
- capabilityId?: string;
75
- /** Invocation CID (new @ixo/ucan) */
76
- invocationCid?: string;
77
- }
78
- interface ExecuteNodeParams {
79
- node: FlowNode;
80
- actorDid: string;
81
- context: ExecutionContext;
82
- action: () => Promise<NodeActionResult>;
83
- }
84
- declare const executeNode: ({ node, actorDid, context, action }: ExecuteNodeParams) => Promise<ExecutionOutcome>;
85
-
86
- interface AuthorizationResult {
87
- authorized: boolean;
88
- reason?: string;
89
- capabilityId?: string;
90
- /** Proof chain CIDs for creating invocations (new @ixo/ucan) */
91
- proofCids?: string[];
92
- /** @deprecated */
93
- derived?: DerivedCapability;
94
- }
95
- interface AuthorizationContext {
96
- /** @deprecated Use delegationStore instead */
97
- ucanManager?: UCANManager;
98
- delegationStore?: DelegationStore;
99
- verifySignature?: (capabilityRaw: string, issuerDid: string) => Promise<{
100
- valid: boolean;
101
- error?: string;
102
- }>;
103
- rootIssuer?: string;
104
- flowUri?: string;
105
- }
106
- declare const isActorAuthorized: (node: FlowNode, actorDid: string, context?: AuthorizationContext) => Promise<AuthorizationResult>;
107
-
108
- interface ActivationResult {
109
- active: boolean;
110
- reason?: string;
111
- }
112
- declare const isNodeActive: (node: FlowNode, runtime: FlowRuntimeStateManager) => ActivationResult;
113
-
114
- interface ValidateChainParams {
115
- /** The capability to validate */
116
- capability: SignedCapability;
117
- /** The actor DID trying to use the capability */
118
- actorDid: string;
119
- /** Required capability (what the actor wants to do) */
120
- requiredCapability: Capability;
121
- /** The delegation store */
122
- delegationStore: DelegationStore;
123
- /** Handler to verify signatures */
124
- verifySignature: (capabilityRaw: string, issuerDid: string) => Promise<{
125
- valid: boolean;
126
- error?: string;
127
- }>;
128
- /** Expected root issuer (entity DID) */
129
- rootIssuer: string;
130
- }
131
- /**
132
- * Validate a capability chain back to the root
133
- */
134
- declare const validateCapabilityChain: (params: ValidateChainParams) => Promise<CapabilityValidationResult>;
135
- /**
136
- * Find a valid capability for an actor to perform an action
137
- */
138
- declare const findValidCapability: (params: {
139
- actorDid: string;
140
- requiredCapability: Capability;
141
- delegationStore: DelegationStore;
142
- verifySignature: (capabilityRaw: string, issuerDid: string) => Promise<{
143
- valid: boolean;
144
- error?: string;
145
- }>;
146
- rootIssuer: string;
147
- }) => Promise<{
148
- found: boolean;
149
- capabilityId?: string;
150
- error?: string;
151
- }>;
152
-
153
- export { type ActivationResult, type AuthorizationContext, type AuthorizationResult, Capability, CapabilityValidationResult, type DelegationStore, type ExecuteNodeParams, type ExecutionContext, type ExecutionOutcome, type FlowRuntimeStateManager, type NodeActionResult, SignedCapability, buildAuthzFromProps, buildFlowNodeFromBlock, createDelegationStore, createMemoryDelegationStore, createRuntimeStateManager, executeNode, findValidCapability, isActorAuthorized, isNodeActive, validateCapabilityChain };
9
+ import '@ixo/ucan';
package/dist/index.mjs CHANGED
@@ -17,24 +17,33 @@ import {
17
17
  StakeType,
18
18
  ValidatorActionType,
19
19
  blockSpecs,
20
- buildAuthzFromProps,
21
- buildFlowNodeFromBlock,
22
- createDelegationStore,
23
- createMemoryDelegationStore,
24
- createRuntimeStateManager,
25
- executeNode,
26
- findValidCapability,
27
20
  getEntity,
28
21
  getExtraSlashMenuItems,
29
- isActorAuthorized,
30
- isNodeActive,
31
22
  ixoGraphQLClient,
23
+ useBlockPresence,
32
24
  useBlocknoteContext,
33
25
  useBlocknoteHandlers,
34
26
  useCreateCollaborativeIxoEditor,
35
27
  useCreateIxoEditor,
36
- validateCapabilityChain
37
- } from "./chunk-VFQFOPNS.mjs";
28
+ useTrackBlockFocus
29
+ } from "./chunk-FM2G22RS.mjs";
30
+ import {
31
+ compileBaseUcanFlow,
32
+ setupFlowFromBaseUcan
33
+ } from "./chunk-KXKEXO53.mjs";
34
+ import {
35
+ buildAuthzFromProps,
36
+ buildFlowNodeFromBlock,
37
+ createInvocationStore,
38
+ createMemoryInvocationStore,
39
+ createMemoryUcanDelegationStore,
40
+ createRuntimeStateManager,
41
+ createUcanDelegationStore,
42
+ createUcanService,
43
+ executeNode,
44
+ isAuthorized,
45
+ isNodeActive
46
+ } from "./chunk-5D26UG3I.mjs";
38
47
 
39
48
  // src/index.ts
40
49
  import { cloneDocument } from "@ixo/matrix-crdt";
@@ -60,20 +69,25 @@ export {
60
69
  buildAuthzFromProps,
61
70
  buildFlowNodeFromBlock,
62
71
  cloneDocument,
63
- createDelegationStore,
64
- createMemoryDelegationStore,
72
+ compileBaseUcanFlow,
73
+ createInvocationStore,
74
+ createMemoryInvocationStore,
75
+ createMemoryUcanDelegationStore,
65
76
  createRuntimeStateManager,
77
+ createUcanDelegationStore,
78
+ createUcanService,
66
79
  executeNode,
67
- findValidCapability,
68
80
  getEntity,
69
81
  getExtraSlashMenuItems,
70
- isActorAuthorized,
82
+ isAuthorized,
71
83
  isNodeActive,
72
84
  ixoGraphQLClient,
85
+ setupFlowFromBaseUcan,
86
+ useBlockPresence,
73
87
  useBlocknoteContext,
74
88
  useBlocknoteHandlers,
75
89
  useCreateCollaborativeIxoEditor,
76
90
  useCreateIxoEditor,
77
- validateCapabilityChain
91
+ useTrackBlockFocus
78
92
  };
79
93
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main exports for ixo-editor package\n// This exports the mantine version by default\n// For explicit mantine imports, use:\n// - import { ... } from \"@ixo/editor/mantine\"\n\n// Export the main hook (mantine version by default)\nexport { useCreateIxoEditor } from './mantine/hooks/useCreateIxoEditor';\nexport { useCreateCollaborativeIxoEditor } from './mantine/hooks/useCollaborativeIxoEditor';\n\n// Export the main component (mantine version by default)\nexport { IxoEditor, type IxoEditorProps } from './mantine/IxoEditor';\n\n// Export CoverImage component\nexport { CoverImage, type CoverImageProps } from './mantine/components/CoverImage';\n\n// Export authorization components\nexport { AuthorizationTab, type AuthorizationTabState } from './mantine/components/AuthorizationTab';\nexport { EvaluationTab, type EvaluationTabState } from './mantine/components/EvaluationTab';\nexport { EntitySigningSetup } from './mantine/components/EntitySigningSetup';\nexport { FlowPermissionsPanel } from './mantine/components/FlowPermissionsPanel';\nexport { GrantPermissionModal } from './mantine/components/GrantPermissionModal';\n\n// Export flow engine\nexport {\n executeNode,\n isActorAuthorized,\n isNodeActive,\n validateCapabilityChain,\n findValidCapability,\n createDelegationStore,\n createMemoryDelegationStore,\n createRuntimeStateManager,\n buildFlowNodeFromBlock,\n buildAuthzFromProps,\n} from './core/lib/flowEngine';\nexport type {\n ExecuteNodeParams,\n ExecutionOutcome,\n NodeActionResult,\n ExecutionContext,\n AuthorizationResult,\n AuthorizationContext,\n ActivationResult,\n DelegationStore,\n FlowRuntimeStateManager,\n} from './core/lib/flowEngine';\n\n// Export capability types\nexport type {\n Capability,\n SignedCapability,\n CapabilityValidationResult,\n DelegationGrant,\n} from './core/types/capability';\n\n// Export types from core\nexport type { IxoEditorOptions, IxoEditorTheme, IxoEditorConfig, IxoCollaborativeUser, IxoCollaborativeEditorOptions } from './core/types';\n\n// Export custom blocks (mantine version by default)\nexport { CheckboxBlockSpec, ListBlockSpec, OverviewBlock, ProposalBlockSpec, ApiRequestBlockSpec, blockSpecs, getExtraSlashMenuItems } from './mantine/blocks';\nexport type { CheckboxBlockProps, ListBlockSettings, ListBlockProps } from './mantine/blocks';\nexport type { OverviewBlockProps } from './mantine/blocks';\nexport type { ProposalBlockProps } from './mantine/blocks';\nexport type { ApiRequestBlockProps, HttpMethod, KeyValuePair } from './mantine/blocks';\n\n// Export context and handlers\nexport { BlocknoteProvider, useBlocknoteContext, useBlocknoteHandlers, StakeType, AuthzExecActionTypes, ValidatorActionType } from './mantine/context';\nexport type {\n BlocknoteHandlers,\n BlocknoteContextValue,\n BlockRequirements,\n ProposalResponse,\n SingleChoiceProposal,\n VoteResponse,\n VoteInfo,\n Vote,\n User,\n Addr,\n Uint128,\n Timestamp,\n Expiration,\n Status,\n Threshold,\n Votes,\n CosmosMsgForEmpty,\n ProposalAction,\n StakeTypeValue,\n} from './mantine/context';\n\n// Export GraphQL client and queries from core\nexport { getEntity } from './core/lib/graphql-queries';\nexport type { Entity, EntityResponse, EntityVariables } from './core/lib/graphql-queries';\nexport { GraphQLClient, ixoGraphQLClient } from './core/lib/graphql-client';\nexport type { GraphQLResponse, GraphQLRequest } from './core/lib/graphql-client';\n\n// Re-export cloneDocument from matrix-crdt\nexport { cloneDocument } from '@ixo/matrix-crdt';\nexport type { CloneDocumentResult } from '@ixo/matrix-crdt';\n\n// Re-export useful BlockNote types that users might need\nexport type { BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock, Block } from '@blocknote/core';\n\n// Note: Additional BlockNote utilities can be imported directly from @blocknote/react if needed\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,SAAS,qBAAqB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Main exports for ixo-editor package\n// This exports the mantine version by default\n// For explicit mantine imports, use:\n// - import { ... } from \"@ixo/editor/mantine\"\n\n// Export the main hook (mantine version by default)\nexport { useCreateIxoEditor } from './mantine/hooks/useCreateIxoEditor';\nexport { useCreateCollaborativeIxoEditor } from './mantine/hooks/useCollaborativeIxoEditor';\n\n// Export the main component (mantine version by default)\nexport { IxoEditor, type IxoEditorProps } from './mantine/IxoEditor';\n\n// Export CoverImage component\nexport { CoverImage, type CoverImageProps } from './mantine/components/CoverImage';\n\n// Export authorization components\nexport { AuthorizationTab, type AuthorizationTabState } from './mantine/components/AuthorizationTab';\nexport { EvaluationTab, type EvaluationTabState } from './mantine/components/EvaluationTab';\nexport { EntitySigningSetup } from './mantine/components/EntitySigningSetup';\nexport { FlowPermissionsPanel } from './mantine/components/FlowPermissionsPanel';\nexport { GrantPermissionModal } from './mantine/components/GrantPermissionModal';\n\n// Export flow engine\nexport {\n executeNode,\n isAuthorized,\n isNodeActive,\n createRuntimeStateManager,\n buildFlowNodeFromBlock,\n buildAuthzFromProps,\n createUcanDelegationStore,\n createMemoryUcanDelegationStore,\n createInvocationStore,\n createMemoryInvocationStore,\n createUcanService,\n} from './core/lib/flowEngine';\nexport type {\n ExecuteNodeParams,\n ExecutionOutcome,\n NodeActionResult,\n ExecutionContext,\n AuthorizationResult,\n ActivationResult,\n UcanDelegationStore,\n InvocationStore,\n UcanService,\n UcanServiceConfig,\n UcanServiceHandlers,\n FlowRuntimeStateManager,\n} from './core/lib/flowEngine';\n\n// Export UCAN types\nexport type { UcanCapability, StoredDelegation, StoredInvocation, DelegationChainValidationResult } from './core/types/ucan';\nexport type { DelegationGrant } from './core/types/capability';\n\n// Export types from core\nexport type { IxoEditorOptions, IxoEditorTheme, IxoEditorConfig, IxoCollaborativeUser, IxoCollaborativeEditorOptions } from './core/types';\n\n// Export custom blocks (mantine version by default)\nexport { CheckboxBlockSpec, ListBlockSpec, OverviewBlock, ProposalBlockSpec, ApiRequestBlockSpec, blockSpecs, getExtraSlashMenuItems } from './mantine/blocks';\nexport type { CheckboxBlockProps, ListBlockSettings, ListBlockProps } from './mantine/blocks';\nexport type { OverviewBlockProps } from './mantine/blocks';\nexport type { ProposalBlockProps } from './mantine/blocks';\nexport type { ApiRequestBlockProps, HttpMethod, KeyValuePair } from './mantine/blocks';\n\n// Export block presence hooks\nexport { useBlockPresence, type BlockPresenceUser } from './mantine/hooks/useBlockPresence';\nexport { useTrackBlockFocus } from './mantine/hooks/useTrackBlockFocus';\n\n// Export context and handlers\nexport { BlocknoteProvider, useBlocknoteContext, useBlocknoteHandlers, StakeType, AuthzExecActionTypes, ValidatorActionType } from './mantine/context';\nexport type {\n BlocknoteHandlers,\n BlocknoteContextValue,\n BlockRequirements,\n ProposalResponse,\n SingleChoiceProposal,\n VoteResponse,\n VoteInfo,\n Vote,\n User,\n Addr,\n Uint128,\n Timestamp,\n Expiration,\n Status,\n Threshold,\n Votes,\n CosmosMsgForEmpty,\n ProposalAction,\n StakeTypeValue,\n} from './mantine/context';\n\n// Export GraphQL client and queries from core\nexport { getEntity } from './core/lib/graphql-queries';\nexport type { Entity, EntityResponse, EntityVariables } from './core/lib/graphql-queries';\nexport { GraphQLClient, ixoGraphQLClient } from './core/lib/graphql-client';\nexport type { GraphQLResponse, GraphQLRequest } from './core/lib/graphql-client';\n\n// Export flow compiler (Base UCAN → flow setup)\nexport { setupFlowFromBaseUcan, compileBaseUcanFlow } from './core/lib/flowCompiler';\nexport type { SetupFlowOptions, SetupFlowResult, CompilerRegistry } from './core/lib/flowCompiler';\nexport type { BaseUcanFlow, FlowCapability, CompiledFlow } from './core/types/baseUcan';\n\n// Re-export cloneDocument from matrix-crdt\nexport { cloneDocument } from '@ixo/matrix-crdt';\nexport type { CloneDocumentResult } from '@ixo/matrix-crdt';\n\n// Re-export useful BlockNote types that users might need\nexport type { BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock, Block } from '@blocknote/core';\n\n// Note: Additional BlockNote utilities can be imported directly from @blocknote/react if needed\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,SAAS,qBAAqB;","names":[]}
@@ -1,11 +1,14 @@
1
- import { ak as IxoBlockProps, I as IxoEditorType, b as FlowNodeRuntimeState, W as BlocknoteHandlers } from '../graphql-client-C82HQLeC.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, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, av as DomainCardData, au as DomainCardRenderer, am as DropPosition, ar as DynamicListData, as as DynamicListDataProvider, at as DynamicListPanelRenderer, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, al as ExternalDropZone, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, 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-C82HQLeC.mjs';
1
+ import { v as BlocknoteHandlers } from '../graphql-client-B49ND-qp.mjs';
2
+ export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, ae as DomainCardData, ad as DomainCardRenderer, a8 as DropPosition, aa as DynamicListData, ab as DynamicListDataProvider, ac as DynamicListPanelRenderer, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, a7 as ExternalDropZone, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, a9 as VisualizationRenderer, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from '../graphql-client-B49ND-qp.mjs';
3
3
  import React$1, { PropsWithChildren } from 'react';
4
+ import { K as IxoBlockProps, J as IxoEditorType, t as FlowNodeRuntimeState } from '../index-Ch49AFng.mjs';
5
+ export { p as IxoCollaborativeEditorOptions, o as IxoCollaborativeUser, n as IxoEditorConfig, l as IxoEditorOptions, m as IxoEditorTheme, q as blockSpecs, r as getExtraSlashMenuItems } from '../index-Ch49AFng.mjs';
4
6
  import * as zustand from 'zustand';
5
7
  import * as _blocknote_core from '@blocknote/core';
6
8
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
7
- import 'yjs';
8
- import 'matrix-js-sdk';
9
+ import { MatrixClient } from 'matrix-js-sdk';
10
+ import { Map as Map$1 } from 'yjs';
11
+ import '@ixo/ucan';
9
12
 
10
13
  declare const DynamicListBlockSpec: {
11
14
  config: {
@@ -141,14 +144,48 @@ interface DynamicListPanelConfig {
141
144
  actions?: DynamicListAction[];
142
145
  }
143
146
 
147
+ declare function DebugButton({ editor }: {
148
+ editor: IxoEditorType;
149
+ }): React$1.JSX.Element;
150
+
144
151
  interface BaseIconPickerProps {
145
152
  opened: boolean;
146
153
  onClose: () => void;
147
154
  onSelectIcon: (iconName: string) => void;
148
155
  onUploadClick?: () => void;
156
+ onRemove?: () => void;
149
157
  currentIcon?: string;
150
158
  }
151
- declare function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children, currentIcon }: PropsWithChildren<BaseIconPickerProps>): React$1.JSX.Element;
159
+ declare function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove, children, currentIcon }: PropsWithChildren<BaseIconPickerProps>): React$1.JSX.Element;
160
+
161
+ interface PageHeaderMenuItem {
162
+ label: string;
163
+ onClick: () => void;
164
+ icon?: React$1.ReactNode;
165
+ disabled?: boolean;
166
+ divider?: boolean;
167
+ }
168
+ interface PageHeaderProps {
169
+ title?: string;
170
+ icon?: React$1.ReactNode;
171
+ isPrivate?: boolean;
172
+ onPrivacyChange?: (isPrivate: boolean) => void;
173
+ lastEdited?: string;
174
+ onShare?: () => void;
175
+ onFavorite?: () => void;
176
+ isFavorited?: boolean;
177
+ menuItems?: PageHeaderMenuItem[];
178
+ }
179
+ /**
180
+ * PageHeader component - A Notion-style page header with title, privacy badge, and actions
181
+ */
182
+ declare function PageHeader({ title, icon, isPrivate, onPrivacyChange, lastEdited, onShare, onFavorite, isFavorited, menuItems, }: PageHeaderProps): React$1.ReactElement;
183
+
184
+ interface PageTitleProps {
185
+ editor: IxoEditorType;
186
+ editable?: boolean;
187
+ }
188
+ declare function PageTitle({ editor, editable }: PageTitleProps): React$1.ReactElement;
152
189
 
153
190
  interface PanelState {
154
191
  activePanel: string | null;
@@ -359,4 +396,57 @@ interface HookedActionsTabProps {
359
396
 
360
397
  declare const HookedActionsTab: React$1.FC<HookedActionsTabProps>;
361
398
 
362
- export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DataSource, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type HookedActionInstanceConfig, type HookedActionType, type HookedActionsConfig, HookedActionsTab, IxoEditorType, type ListBlocksUIContextValue, type Listener, type PayloadField, getAllHookedActionTypes, getBlockActions, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
399
+ /**
400
+ * Extract the homeserver domain from a Matrix user ID.
401
+ * e.g. "@user:matrix.ixo.world" → "matrix.ixo.world"
402
+ */
403
+ declare function getHomeserver(matrixClient: MatrixClient): string;
404
+ /**
405
+ * Convert a DID to a Matrix user ID.
406
+ * e.g. "did:ixo:abc" → "@did-ixo-abc:matrix.ixo.world"
407
+ *
408
+ * This mirrors the reverse mapping in AssignmentTab:
409
+ * matrixUserId.split(':')[0].replace('@', '').replace(/-/g, ':')
410
+ */
411
+ declare function didToMatrixUserId(did: string, homeserver: string): string;
412
+ /**
413
+ * Find an existing DM room with the target user, or create one.
414
+ * Uses the `m.direct` account data to track DM room associations.
415
+ */
416
+ declare function findOrCreateDMRoom(matrixClient: MatrixClient, targetUserId: string): Promise<string>;
417
+ /**
418
+ * Send a direct message to a user identified by DID.
419
+ * Finds or creates a DM room and sends the message.
420
+ */
421
+ declare function sendDirectMessage(matrixClient: MatrixClient, targetDid: string, message: string): Promise<{
422
+ roomId: string;
423
+ }>;
424
+
425
+ interface DMNotificationRecord {
426
+ /** DID of the assigned actor who was notified */
427
+ assignedDid: string;
428
+ /** Unix timestamp (ms) when the notification was sent */
429
+ notifiedAt: number;
430
+ /** Matrix user ID of whoever triggered the notification */
431
+ notifiedBy: string;
432
+ }
433
+ interface DMNotificationState {
434
+ [blockId: string]: DMNotificationRecord;
435
+ }
436
+ /**
437
+ * Read the DM notification dedup state from the runtime Y.Map.
438
+ */
439
+ declare function getDMNotificationState(runtimeMap: Map$1<any>): DMNotificationState;
440
+ /**
441
+ * Write a DM notification record for a block, merging with existing state.
442
+ */
443
+ declare function setDMNotificationRecord(runtimeMap: Map$1<any>, blockId: string, record: DMNotificationRecord): void;
444
+ /**
445
+ * Check whether a DM notification should be sent for a given block.
446
+ * Returns true if:
447
+ * - No notification was ever sent for this block, OR
448
+ * - The assigned DID has changed since the last notification
449
+ */
450
+ declare function shouldNotify(state: DMNotificationState, blockId: string, currentAssignedDid: string): boolean;
451
+
452
+ export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DMNotificationRecord, type DMNotificationState, type DataSource, DebugButton, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type HookedActionInstanceConfig, type HookedActionType, type HookedActionsConfig, HookedActionsTab, IxoEditorType, type ListBlocksUIContextValue, type Listener, PageHeader, type PageHeaderMenuItem, type PageHeaderProps, PageTitle, type PageTitleProps, type PayloadField, didToMatrixUserId, findOrCreateDMRoom, getAllHookedActionTypes, getBlockActions, getDMNotificationState, getHomeserver, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, sendDirectMessage, setDMNotificationRecord, shouldNotify, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
@@ -6,6 +6,7 @@ import {
6
6
  BlocknoteProvider,
7
7
  CheckboxBlockSpec,
8
8
  CoverImage,
9
+ DebugButton,
9
10
  DynamicListBlockSpec,
10
11
  EntitySigningSetup,
11
12
  EvaluationTab,
@@ -18,12 +19,14 @@ import {
18
19
  ListBlockSpec,
19
20
  OverviewBlock,
20
21
  PageHeader,
22
+ PageTitle,
21
23
  ProposalBlockSpec,
22
24
  StakeType,
23
25
  ValidatorActionType,
24
26
  blockSpecs,
25
27
  getAllHookedActionTypes,
26
28
  getBlockActions,
29
+ getDMNotificationState,
27
30
  getEntity,
28
31
  getExtraSlashMenuItems,
29
32
  getHookedActionType,
@@ -32,6 +35,9 @@ import {
32
35
  registerBlockActions,
33
36
  registerBuiltInActionTypes,
34
37
  registerHookedActionType,
38
+ setDMNotificationRecord,
39
+ shouldNotify,
40
+ useBlockPresence,
35
41
  useBlocknoteContext,
36
42
  useBlocknoteHandlers,
37
43
  useCreateCollaborativeIxoEditor,
@@ -41,8 +47,15 @@ import {
41
47
  useListBlocksUIStore,
42
48
  useNodeRuntime,
43
49
  usePanel,
44
- usePanelStore
45
- } from "../chunk-VFQFOPNS.mjs";
50
+ usePanelStore,
51
+ useTrackBlockFocus
52
+ } from "../chunk-FM2G22RS.mjs";
53
+ import {
54
+ didToMatrixUserId,
55
+ findOrCreateDMRoom,
56
+ getHomeserver,
57
+ sendDirectMessage
58
+ } from "../chunk-5D26UG3I.mjs";
46
59
  export {
47
60
  ApiRequestBlockSpec,
48
61
  AuthorizationTab,
@@ -51,6 +64,7 @@ export {
51
64
  BlocknoteProvider,
52
65
  CheckboxBlockSpec,
53
66
  CoverImage,
67
+ DebugButton,
54
68
  DynamicListBlockSpec,
55
69
  EntitySigningSetup,
56
70
  EvaluationTab,
@@ -63,20 +77,29 @@ export {
63
77
  ListBlockSpec,
64
78
  OverviewBlock,
65
79
  PageHeader,
80
+ PageTitle,
66
81
  ProposalBlockSpec,
67
82
  StakeType,
68
83
  ValidatorActionType,
69
84
  blockSpecs,
85
+ didToMatrixUserId,
86
+ findOrCreateDMRoom,
70
87
  getAllHookedActionTypes,
71
88
  getBlockActions,
89
+ getDMNotificationState,
72
90
  getEntity,
73
91
  getExtraSlashMenuItems,
92
+ getHomeserver,
74
93
  getHookedActionType,
75
94
  initializeHookedActions,
76
95
  ixoGraphQLClient,
77
96
  registerBlockActions,
78
97
  registerBuiltInActionTypes,
79
98
  registerHookedActionType,
99
+ sendDirectMessage,
100
+ setDMNotificationRecord,
101
+ shouldNotify,
102
+ useBlockPresence,
80
103
  useBlocknoteContext,
81
104
  useBlocknoteHandlers,
82
105
  useCreateCollaborativeIxoEditor,
@@ -86,6 +109,7 @@ export {
86
109
  useListBlocksUIStore,
87
110
  useNodeRuntime,
88
111
  usePanel,
89
- usePanelStore
112
+ usePanelStore,
113
+ useTrackBlockFocus
90
114
  };
91
115
  //# sourceMappingURL=index.mjs.map