@ixo/editor 3.0.0-beta.2 → 3.0.0-beta.21

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-Dv0q3wZe.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-Dv0q3wZe.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-b82luVYe.mjs';
2
+ export { m as ActivationResult, l as AuthorizationContext, A as AuthorizationResult, D as DelegationStore, E as ExecuteNodeParams, k as ExecutionContext, j as ExecutionOutcome, F as FlowRuntimeStateManager, N as NodeActionResult, h as buildAuthzFromProps, g as buildFlowNodeFromBlock, c as createDelegationStore, b as createMemoryDelegationStore, d as createRuntimeStateManager, e as executeNode, f as findValidCapability, i as isActorAuthorized, a as isNodeActive, v as validateCapabilityChain } from './capabilityValidation-B3NRVwYZ.mjs';
3
+ export { C as Capability, a as CapabilityValidationResult, D as DelegationGrant, e as IxoCollaborativeEditorOptions, d as IxoCollaborativeUser, c as IxoEditorConfig, I as IxoEditorOptions, b as IxoEditorTheme, S as SignedCapability, f as blockSpecs, g as getExtraSlashMenuItems } from './index-CnqA4qDa.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,6 +17,17 @@ import {
17
17
  StakeType,
18
18
  ValidatorActionType,
19
19
  blockSpecs,
20
+ getEntity,
21
+ getExtraSlashMenuItems,
22
+ ixoGraphQLClient,
23
+ useBlockPresence,
24
+ useBlocknoteContext,
25
+ useBlocknoteHandlers,
26
+ useCreateCollaborativeIxoEditor,
27
+ useCreateIxoEditor,
28
+ useTrackBlockFocus
29
+ } from "./chunk-4344EQ47.mjs";
30
+ import {
20
31
  buildAuthzFromProps,
21
32
  buildFlowNodeFromBlock,
22
33
  createDelegationStore,
@@ -24,17 +35,10 @@ import {
24
35
  createRuntimeStateManager,
25
36
  executeNode,
26
37
  findValidCapability,
27
- getEntity,
28
- getExtraSlashMenuItems,
29
38
  isActorAuthorized,
30
39
  isNodeActive,
31
- ixoGraphQLClient,
32
- useBlocknoteContext,
33
- useBlocknoteHandlers,
34
- useCreateCollaborativeIxoEditor,
35
- useCreateIxoEditor,
36
40
  validateCapabilityChain
37
- } from "./chunk-HHEGZUQF.mjs";
41
+ } from "./chunk-3RYZSIC2.mjs";
38
42
 
39
43
  // src/index.ts
40
44
  import { cloneDocument } from "@ixo/matrix-crdt";
@@ -70,10 +74,12 @@ export {
70
74
  isActorAuthorized,
71
75
  isNodeActive,
72
76
  ixoGraphQLClient,
77
+ useBlockPresence,
73
78
  useBlocknoteContext,
74
79
  useBlocknoteHandlers,
75
80
  useCreateCollaborativeIxoEditor,
76
81
  useCreateIxoEditor,
82
+ useTrackBlockFocus,
77
83
  validateCapabilityChain
78
84
  };
79
85
  //# 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 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 { Capability, SignedCapability, CapabilityValidationResult, 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// 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,SAAS,qBAAqB;","names":[]}
@@ -1,6 +1,8 @@
1
- import { ak as IxoBlockProps, I as IxoEditorType, b as FlowNodeRuntimeState, W as BlocknoteHandlers } from '../graphql-client-Dv0q3wZe.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-Dv0q3wZe.mjs';
1
+ import { v as BlocknoteHandlers } from '../graphql-client-b82luVYe.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, ah as DomainCardData, ag as DomainCardRenderer, a8 as DropPosition, ad as DynamicListData, ae as DynamicListDataProvider, af 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, a9 as PageHeader, ab as PageHeaderMenuItem, aa as PageHeaderProps, _ 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, ac 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-b82luVYe.mjs';
3
3
  import React$1, { PropsWithChildren } from 'react';
4
+ import { K as IxoBlockProps, J as IxoEditorType, p as FlowNodeRuntimeState } from '../index-CnqA4qDa.mjs';
5
+ export { e as IxoCollaborativeEditorOptions, d as IxoCollaborativeUser, c as IxoEditorConfig, I as IxoEditorOptions, b as IxoEditorTheme, f as blockSpecs, g as getExtraSlashMenuItems } from '../index-CnqA4qDa.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';
@@ -141,6 +143,10 @@ interface DynamicListPanelConfig {
141
143
  actions?: DynamicListAction[];
142
144
  }
143
145
 
146
+ declare function DebugButton({ editor }: {
147
+ editor: IxoEditorType;
148
+ }): React$1.JSX.Element;
149
+
144
150
  interface BaseIconPickerProps {
145
151
  opened: boolean;
146
152
  onClose: () => void;
@@ -359,4 +365,4 @@ interface HookedActionsTabProps {
359
365
 
360
366
  declare const HookedActionsTab: React$1.FC<HookedActionsTabProps>;
361
367
 
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 };
368
+ export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DataSource, DebugButton, 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 };
@@ -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,
@@ -32,6 +33,7 @@ import {
32
33
  registerBlockActions,
33
34
  registerBuiltInActionTypes,
34
35
  registerHookedActionType,
36
+ useBlockPresence,
35
37
  useBlocknoteContext,
36
38
  useBlocknoteHandlers,
37
39
  useCreateCollaborativeIxoEditor,
@@ -41,8 +43,10 @@ import {
41
43
  useListBlocksUIStore,
42
44
  useNodeRuntime,
43
45
  usePanel,
44
- usePanelStore
45
- } from "../chunk-HHEGZUQF.mjs";
46
+ usePanelStore,
47
+ useTrackBlockFocus
48
+ } from "../chunk-4344EQ47.mjs";
49
+ import "../chunk-3RYZSIC2.mjs";
46
50
  export {
47
51
  ApiRequestBlockSpec,
48
52
  AuthorizationTab,
@@ -51,6 +55,7 @@ export {
51
55
  BlocknoteProvider,
52
56
  CheckboxBlockSpec,
53
57
  CoverImage,
58
+ DebugButton,
54
59
  DynamicListBlockSpec,
55
60
  EntitySigningSetup,
56
61
  EvaluationTab,
@@ -77,6 +82,7 @@ export {
77
82
  registerBlockActions,
78
83
  registerBuiltInActionTypes,
79
84
  registerHookedActionType,
85
+ useBlockPresence,
80
86
  useBlocknoteContext,
81
87
  useBlocknoteHandlers,
82
88
  useCreateCollaborativeIxoEditor,
@@ -86,6 +92,7 @@ export {
86
92
  useListBlocksUIStore,
87
93
  useNodeRuntime,
88
94
  usePanel,
89
- usePanelStore
95
+ usePanelStore,
96
+ useTrackBlockFocus
90
97
  };
91
98
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.21",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -22,6 +22,11 @@
22
22
  "types": "./dist/mantine/index.d.ts",
23
23
  "import": "./dist/mantine/index.mjs"
24
24
  },
25
+ "./core": {
26
+ "types": "./dist/core/index.d.ts",
27
+ "import": "./dist/core/index.mjs",
28
+ "default": "./dist/core/index.mjs"
29
+ },
25
30
  "./style.css": "./style.css",
26
31
  "./style-mantine.css": "./style-mantine.css",
27
32
  "./style-core.css": "./style-core.css"
@@ -64,6 +69,9 @@
64
69
  "@dnd-kit/core": "^6.3.1",
65
70
  "@ixo/ucan": "^1.0.1",
66
71
  "@tabler/icons-react": "3.35.0",
72
+ "blockstore-core": "^6.1.2",
73
+ "ipfs-unixfs-importer": "^16.1.1",
74
+ "multiformats": "^13.4.2",
67
75
  "yjs": "13.6.27",
68
76
  "zustand": "5.0.8"
69
77
  },
package/style-core.css CHANGED
@@ -45,7 +45,7 @@
45
45
  --bn-colors-tooltip-background: #f0f0f0;
46
46
  --bn-colors-tooltip-text: #1a1a1a;
47
47
  --bn-colors-hovered-background: #2a2a2a;
48
- --bn-colors-selected-background: #3a3a3a;
48
+ --bn-colors-selected-background: color-mix(in srgb, var(--mantine-color-neutralColor-7) 30%, transparent);
49
49
  --bn-colors-border: #3a3a3a;
50
50
  --bn-colors-side-menu: #999999;
51
51
  --bn-colors-highlight-colors-blue: #60a5fa;
@@ -76,6 +76,17 @@
76
76
  min-height: 1.5em;
77
77
  }
78
78
 
79
+ /* Disable text selection on custom (non-editable) blocks.
80
+ Standard text blocks re-enable it via .bn-inline-content below. */
81
+ .ixo-editor div.bn-block-content {
82
+ user-select: none;
83
+ }
84
+
85
+ /* Re-enable text selection inside standard editable block content */
86
+ .ixo-editor .bn-inline-content {
87
+ user-select: text;
88
+ }
89
+
79
90
  /* Heading styles */
80
91
  .ixo-editor h1.bn-inline-content {
81
92
  font-size: 2em;
@@ -208,6 +219,11 @@
208
219
  /* Selection styles */
209
220
  .ixo-editor ::selection {
210
221
  background-color: var(--bn-colors-selected-background);
222
+ color: var(--bn-colors-editor-text);
223
+ }
224
+
225
+ .ixo-editor--theme-dark ::selection {
226
+ background-color: color-mix(in srgb, var(--mantine-color-neutralColor-7) 30%, transparent) !important;
211
227
  }
212
228
 
213
229
  /* Scrollbar styles */
@@ -261,6 +277,36 @@
261
277
  }
262
278
  }
263
279
 
280
+ /* Block presence awareness */
281
+ .ixo-block-presence-border {
282
+ transition: border-left-color 200ms ease;
283
+ }
284
+
285
+ .ixo-block-presence-badges {
286
+ position: absolute;
287
+ top: -8px;
288
+ right: 12px;
289
+ display: flex;
290
+ gap: 4px;
291
+ z-index: 10;
292
+ pointer-events: none;
293
+ }
294
+
295
+ .ixo-block-presence-badge {
296
+ width: 20px;
297
+ height: 20px;
298
+ border-radius: 50%;
299
+ display: flex;
300
+ align-items: center;
301
+ justify-content: center;
302
+ font-size: 11px;
303
+ font-weight: 600;
304
+ color: #fff;
305
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
306
+ pointer-events: none;
307
+ overflow: hidden;
308
+ }
309
+
264
310
  /* Hide ProseMirror drop cursor ONLY when dragging external artifacts */
265
311
  body.external-artifact-drag-active .prosemirror-dropcursor-block,
266
312
  body.external-artifact-drag-active .prosemirror-dropcursor-inline {
package/style-mantine.css CHANGED
@@ -142,7 +142,7 @@
142
142
  --bn-colors-tooltip-background: #f0f0f0;
143
143
  --bn-colors-tooltip-text: #1a1a1a;
144
144
  --bn-colors-hovered-background: #2a2a2a;
145
- --bn-colors-selected-background: #3a3a3a;
145
+ --bn-colors-selected-background: color-mix(in srgb, var(--mantine-color-neutralColor-7) 30%, transparent);
146
146
  --bn-colors-border: #3a3a3a;
147
147
  --bn-colors-side-menu: #999999;
148
148
  --bn-colors-highlight-colors-blue: #60a5fa;
@@ -173,6 +173,17 @@
173
173
  min-height: 1.5em;
174
174
  }
175
175
 
176
+ /* Disable text selection on custom (non-editable) blocks.
177
+ Standard text blocks re-enable it via .bn-inline-content below. */
178
+ .ixo-editor div.bn-block-content {
179
+ user-select: none;
180
+ }
181
+
182
+ /* Re-enable text selection inside standard editable block content */
183
+ .ixo-editor .bn-inline-content {
184
+ user-select: text;
185
+ }
186
+
176
187
  /* Heading styles */
177
188
  .ixo-editor h1.bn-inline-content {
178
189
  font-size: 2em;
@@ -305,6 +316,11 @@
305
316
  /* Selection styles */
306
317
  .ixo-editor ::selection {
307
318
  background-color: var(--bn-colors-selected-background);
319
+ color: var(--bn-colors-editor-text);
320
+ }
321
+
322
+ .ixo-editor--theme-dark ::selection {
323
+ background-color: color-mix(in srgb, var(--mantine-color-neutralColor-7) 30%, transparent) !important;
308
324
  }
309
325
 
310
326
  /* Scrollbar styles */
@@ -358,6 +374,36 @@
358
374
  }
359
375
  }
360
376
 
377
+ /* Block presence awareness */
378
+ .ixo-block-presence-border {
379
+ transition: border-left-color 200ms ease;
380
+ }
381
+
382
+ .ixo-block-presence-badges {
383
+ position: absolute;
384
+ top: -8px;
385
+ right: 12px;
386
+ display: flex;
387
+ gap: 4px;
388
+ z-index: 10;
389
+ pointer-events: none;
390
+ }
391
+
392
+ .ixo-block-presence-badge {
393
+ width: 20px;
394
+ height: 20px;
395
+ border-radius: 50%;
396
+ display: flex;
397
+ align-items: center;
398
+ justify-content: center;
399
+ font-size: 11px;
400
+ font-weight: 600;
401
+ color: #fff;
402
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
403
+ pointer-events: none;
404
+ overflow: hidden;
405
+ }
406
+
361
407
  /* Hide ProseMirror drop cursor ONLY when dragging external artifacts */
362
408
  body.external-artifact-drag-active .prosemirror-dropcursor-block,
363
409
  body.external-artifact-drag-active .prosemirror-dropcursor-inline {
package/style.css CHANGED
@@ -142,7 +142,7 @@
142
142
  --bn-colors-tooltip-background: #f0f0f0;
143
143
  --bn-colors-tooltip-text: #1a1a1a;
144
144
  --bn-colors-hovered-background: #2a2a2a;
145
- --bn-colors-selected-background: #3a3a3a;
145
+ --bn-colors-selected-background: color-mix(in srgb, var(--mantine-color-neutralColor-7) 30%, transparent);
146
146
  --bn-colors-border: #3a3a3a;
147
147
  --bn-colors-side-menu: #999999;
148
148
  --bn-colors-highlight-colors-blue: #60a5fa;
@@ -173,6 +173,17 @@
173
173
  min-height: 1.5em;
174
174
  }
175
175
 
176
+ /* Disable text selection on custom (non-editable) blocks.
177
+ Standard text blocks re-enable it via .bn-inline-content below. */
178
+ .ixo-editor div.bn-block-content {
179
+ user-select: none;
180
+ }
181
+
182
+ /* Re-enable text selection inside standard editable block content */
183
+ .ixo-editor .bn-inline-content {
184
+ user-select: text;
185
+ }
186
+
176
187
  /* Heading styles */
177
188
  .ixo-editor h1.bn-inline-content {
178
189
  font-size: 2em;
@@ -305,6 +316,11 @@
305
316
  /* Selection styles */
306
317
  .ixo-editor ::selection {
307
318
  background-color: var(--bn-colors-selected-background);
319
+ color: var(--bn-colors-editor-text);
320
+ }
321
+
322
+ .ixo-editor--theme-dark ::selection {
323
+ background-color: color-mix(in srgb, var(--mantine-color-neutralColor-7) 30%, transparent) !important;
308
324
  }
309
325
 
310
326
  /* Scrollbar styles */
@@ -358,6 +374,36 @@
358
374
  }
359
375
  }
360
376
 
377
+ /* Block presence awareness */
378
+ .ixo-block-presence-border {
379
+ transition: border-left-color 200ms ease;
380
+ }
381
+
382
+ .ixo-block-presence-badges {
383
+ position: absolute;
384
+ top: -8px;
385
+ right: 12px;
386
+ display: flex;
387
+ gap: 4px;
388
+ z-index: 10;
389
+ pointer-events: none;
390
+ }
391
+
392
+ .ixo-block-presence-badge {
393
+ width: 20px;
394
+ height: 20px;
395
+ border-radius: 50%;
396
+ display: flex;
397
+ align-items: center;
398
+ justify-content: center;
399
+ font-size: 11px;
400
+ font-weight: 600;
401
+ color: #fff;
402
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
403
+ pointer-events: none;
404
+ overflow: hidden;
405
+ }
406
+
361
407
  /* Hide ProseMirror drop cursor ONLY when dragging external artifacts */
362
408
  body.external-artifact-drag-active .prosemirror-dropcursor-block,
363
409
  body.external-artifact-drag-active .prosemirror-dropcursor-inline {