@ixo/editor 3.0.0-beta.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-5D26UG3I.mjs +2848 -0
- package/dist/chunk-5D26UG3I.mjs.map +1 -0
- package/dist/chunk-KXKEXO53.mjs +470 -0
- package/dist/chunk-KXKEXO53.mjs.map +1 -0
- package/dist/{chunk-VFQFOPNS.mjs → chunk-UWTEHXWI.mjs} +14618 -14476
- package/dist/chunk-UWTEHXWI.mjs.map +1 -0
- package/dist/chunk-VU34HOXM.mjs +36 -0
- package/dist/chunk-VU34HOXM.mjs.map +1 -0
- package/dist/cid-6O646X2I.mjs +9 -0
- package/dist/cid-6O646X2I.mjs.map +1 -0
- package/dist/core/index.d.ts +65 -0
- package/dist/core/index.mjs +63 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/graphql-client-H2qzHfsm.d.ts +2858 -0
- package/dist/index-7ptWHYA8.d.ts +2738 -0
- package/dist/index.d.ts +5 -149
- package/dist/index.mjs +30 -16
- package/dist/index.mjs.map +1 -1
- package/dist/mantine/index.d.ts +65 -5
- package/dist/mantine/index.mjs +25 -3
- package/dist/setup-Do4fqPI0.d.ts +452 -0
- package/package.json +18 -3
- package/style-core.css +30 -0
- package/style-mantine.css +30 -0
- package/style.css +30 -0
- package/dist/chunk-VFQFOPNS.mjs.map +0 -1
- package/dist/graphql-client-C82HQLeC.d.ts +0 -5308
package/dist/index.d.ts
CHANGED
|
@@ -1,153 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
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-H2qzHfsm.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-Do4fqPI0.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-7ptWHYA8.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
|
-
|
|
37
|
-
} from "./chunk-
|
|
28
|
+
useTrackBlockFocus
|
|
29
|
+
} from "./chunk-UWTEHXWI.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
|
-
|
|
64
|
-
|
|
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
|
-
|
|
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
|
-
|
|
91
|
+
useTrackBlockFocus
|
|
78
92
|
};
|
|
79
93
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["
|
|
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":[]}
|
package/dist/mantine/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { v as BlocknoteHandlers } from '../graphql-client-H2qzHfsm.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-H2qzHfsm.mjs';
|
|
3
3
|
import React$1, { PropsWithChildren } from 'react';
|
|
4
|
+
import { K as IxoBlockProps, J as IxoEditorType, t as FlowNodeRuntimeState } from '../index-7ptWHYA8.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-7ptWHYA8.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 '
|
|
8
|
-
import '
|
|
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,6 +144,10 @@ 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;
|
|
@@ -359,4 +366,57 @@ interface HookedActionsTabProps {
|
|
|
359
366
|
|
|
360
367
|
declare const HookedActionsTab: React$1.FC<HookedActionsTabProps>;
|
|
361
368
|
|
|
362
|
-
|
|
369
|
+
/**
|
|
370
|
+
* Extract the homeserver domain from a Matrix user ID.
|
|
371
|
+
* e.g. "@user:matrix.ixo.world" → "matrix.ixo.world"
|
|
372
|
+
*/
|
|
373
|
+
declare function getHomeserver(matrixClient: MatrixClient): string;
|
|
374
|
+
/**
|
|
375
|
+
* Convert a DID to a Matrix user ID.
|
|
376
|
+
* e.g. "did:ixo:abc" → "@did-ixo-abc:matrix.ixo.world"
|
|
377
|
+
*
|
|
378
|
+
* This mirrors the reverse mapping in AssignmentTab:
|
|
379
|
+
* matrixUserId.split(':')[0].replace('@', '').replace(/-/g, ':')
|
|
380
|
+
*/
|
|
381
|
+
declare function didToMatrixUserId(did: string, homeserver: string): string;
|
|
382
|
+
/**
|
|
383
|
+
* Find an existing DM room with the target user, or create one.
|
|
384
|
+
* Uses the `m.direct` account data to track DM room associations.
|
|
385
|
+
*/
|
|
386
|
+
declare function findOrCreateDMRoom(matrixClient: MatrixClient, targetUserId: string): Promise<string>;
|
|
387
|
+
/**
|
|
388
|
+
* Send a direct message to a user identified by DID.
|
|
389
|
+
* Finds or creates a DM room and sends the message.
|
|
390
|
+
*/
|
|
391
|
+
declare function sendDirectMessage(matrixClient: MatrixClient, targetDid: string, message: string): Promise<{
|
|
392
|
+
roomId: string;
|
|
393
|
+
}>;
|
|
394
|
+
|
|
395
|
+
interface DMNotificationRecord {
|
|
396
|
+
/** DID of the assigned actor who was notified */
|
|
397
|
+
assignedDid: string;
|
|
398
|
+
/** Unix timestamp (ms) when the notification was sent */
|
|
399
|
+
notifiedAt: number;
|
|
400
|
+
/** Matrix user ID of whoever triggered the notification */
|
|
401
|
+
notifiedBy: string;
|
|
402
|
+
}
|
|
403
|
+
interface DMNotificationState {
|
|
404
|
+
[blockId: string]: DMNotificationRecord;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Read the DM notification dedup state from the runtime Y.Map.
|
|
408
|
+
*/
|
|
409
|
+
declare function getDMNotificationState(runtimeMap: Map$1<any>): DMNotificationState;
|
|
410
|
+
/**
|
|
411
|
+
* Write a DM notification record for a block, merging with existing state.
|
|
412
|
+
*/
|
|
413
|
+
declare function setDMNotificationRecord(runtimeMap: Map$1<any>, blockId: string, record: DMNotificationRecord): void;
|
|
414
|
+
/**
|
|
415
|
+
* Check whether a DM notification should be sent for a given block.
|
|
416
|
+
* Returns true if:
|
|
417
|
+
* - No notification was ever sent for this block, OR
|
|
418
|
+
* - The assigned DID has changed since the last notification
|
|
419
|
+
*/
|
|
420
|
+
declare function shouldNotify(state: DMNotificationState, blockId: string, currentAssignedDid: string): boolean;
|
|
421
|
+
|
|
422
|
+
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, type PayloadField, didToMatrixUserId, findOrCreateDMRoom, getAllHookedActionTypes, getBlockActions, getDMNotificationState, getHomeserver, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, sendDirectMessage, setDMNotificationRecord, shouldNotify, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
|
package/dist/mantine/index.mjs
CHANGED
|
@@ -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,
|
|
@@ -24,6 +25,7 @@ import {
|
|
|
24
25
|
blockSpecs,
|
|
25
26
|
getAllHookedActionTypes,
|
|
26
27
|
getBlockActions,
|
|
28
|
+
getDMNotificationState,
|
|
27
29
|
getEntity,
|
|
28
30
|
getExtraSlashMenuItems,
|
|
29
31
|
getHookedActionType,
|
|
@@ -32,6 +34,9 @@ import {
|
|
|
32
34
|
registerBlockActions,
|
|
33
35
|
registerBuiltInActionTypes,
|
|
34
36
|
registerHookedActionType,
|
|
37
|
+
setDMNotificationRecord,
|
|
38
|
+
shouldNotify,
|
|
39
|
+
useBlockPresence,
|
|
35
40
|
useBlocknoteContext,
|
|
36
41
|
useBlocknoteHandlers,
|
|
37
42
|
useCreateCollaborativeIxoEditor,
|
|
@@ -41,8 +46,15 @@ import {
|
|
|
41
46
|
useListBlocksUIStore,
|
|
42
47
|
useNodeRuntime,
|
|
43
48
|
usePanel,
|
|
44
|
-
usePanelStore
|
|
45
|
-
|
|
49
|
+
usePanelStore,
|
|
50
|
+
useTrackBlockFocus
|
|
51
|
+
} from "../chunk-UWTEHXWI.mjs";
|
|
52
|
+
import {
|
|
53
|
+
didToMatrixUserId,
|
|
54
|
+
findOrCreateDMRoom,
|
|
55
|
+
getHomeserver,
|
|
56
|
+
sendDirectMessage
|
|
57
|
+
} from "../chunk-5D26UG3I.mjs";
|
|
46
58
|
export {
|
|
47
59
|
ApiRequestBlockSpec,
|
|
48
60
|
AuthorizationTab,
|
|
@@ -51,6 +63,7 @@ export {
|
|
|
51
63
|
BlocknoteProvider,
|
|
52
64
|
CheckboxBlockSpec,
|
|
53
65
|
CoverImage,
|
|
66
|
+
DebugButton,
|
|
54
67
|
DynamicListBlockSpec,
|
|
55
68
|
EntitySigningSetup,
|
|
56
69
|
EvaluationTab,
|
|
@@ -67,16 +80,24 @@ export {
|
|
|
67
80
|
StakeType,
|
|
68
81
|
ValidatorActionType,
|
|
69
82
|
blockSpecs,
|
|
83
|
+
didToMatrixUserId,
|
|
84
|
+
findOrCreateDMRoom,
|
|
70
85
|
getAllHookedActionTypes,
|
|
71
86
|
getBlockActions,
|
|
87
|
+
getDMNotificationState,
|
|
72
88
|
getEntity,
|
|
73
89
|
getExtraSlashMenuItems,
|
|
90
|
+
getHomeserver,
|
|
74
91
|
getHookedActionType,
|
|
75
92
|
initializeHookedActions,
|
|
76
93
|
ixoGraphQLClient,
|
|
77
94
|
registerBlockActions,
|
|
78
95
|
registerBuiltInActionTypes,
|
|
79
96
|
registerHookedActionType,
|
|
97
|
+
sendDirectMessage,
|
|
98
|
+
setDMNotificationRecord,
|
|
99
|
+
shouldNotify,
|
|
100
|
+
useBlockPresence,
|
|
80
101
|
useBlocknoteContext,
|
|
81
102
|
useBlocknoteHandlers,
|
|
82
103
|
useCreateCollaborativeIxoEditor,
|
|
@@ -86,6 +107,7 @@ export {
|
|
|
86
107
|
useListBlocksUIStore,
|
|
87
108
|
useNodeRuntime,
|
|
88
109
|
usePanel,
|
|
89
|
-
usePanelStore
|
|
110
|
+
usePanelStore,
|
|
111
|
+
useTrackBlockFocus
|
|
90
112
|
};
|
|
91
113
|
//# sourceMappingURL=index.mjs.map
|