@ixo/editor 3.0.0-beta.3 → 3.0.0-beta.30
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-5PHI3WWK.mjs +470 -0
- package/dist/chunk-5PHI3WWK.mjs.map +1 -0
- package/dist/chunk-77R3T42S.mjs +2564 -0
- package/dist/chunk-77R3T42S.mjs.map +1 -0
- package/dist/{chunk-EE3V7B4I.mjs → chunk-TAYMLU7F.mjs} +16203 -14934
- package/dist/chunk-TAYMLU7F.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-Di1UKINF.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-CahGoKeh.d.ts +452 -0
- package/package.json +18 -3
- package/style-core.css +47 -1
- package/style-mantine.css +47 -1
- package/style.css +47 -1
- package/dist/chunk-EE3V7B4I.mjs.map +0 -1
- package/dist/graphql-client-C82HQLeC.d.ts +0 -5308
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/core/lib/cid.ts
|
|
2
|
+
async function computeCID(content) {
|
|
3
|
+
const { MemoryBlockstore } = await import("blockstore-core/memory");
|
|
4
|
+
const { importer } = await import("ipfs-unixfs-importer");
|
|
5
|
+
let blockstore = new MemoryBlockstore();
|
|
6
|
+
try {
|
|
7
|
+
function* singleFile() {
|
|
8
|
+
yield { path: "file", content };
|
|
9
|
+
}
|
|
10
|
+
let fileCid = null;
|
|
11
|
+
for await (const entry of importer(singleFile(), blockstore, {
|
|
12
|
+
cidVersion: 0,
|
|
13
|
+
rawLeaves: false,
|
|
14
|
+
wrapWithDirectory: false
|
|
15
|
+
})) {
|
|
16
|
+
fileCid = entry.cid.toString();
|
|
17
|
+
}
|
|
18
|
+
if (!fileCid) {
|
|
19
|
+
throw new Error("Failed to compute CID");
|
|
20
|
+
}
|
|
21
|
+
return fileCid;
|
|
22
|
+
} finally {
|
|
23
|
+
blockstore = null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function computeJsonCID(obj) {
|
|
27
|
+
const json = JSON.stringify(obj);
|
|
28
|
+
const encoder = new TextEncoder();
|
|
29
|
+
return computeCID(encoder.encode(json));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
computeCID,
|
|
34
|
+
computeJsonCID
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=chunk-VU34HOXM.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/lib/cid.ts"],"sourcesContent":["/**\n * Compute an IPFS-compatible CID for arbitrary content.\n * Dependencies are lazy-loaded to avoid bundling IPFS libraries\n * into the main entry point.\n *\n * Uses CIDv0 with raw leaves disabled to match ixo ecosystem conventions.\n */\nexport async function computeCID(content: Uint8Array): Promise<string> {\n const { MemoryBlockstore } = await import('blockstore-core/memory');\n const { importer } = await import('ipfs-unixfs-importer');\n\n let blockstore: InstanceType<typeof MemoryBlockstore> | null = new MemoryBlockstore();\n\n try {\n function* singleFile() {\n yield { path: 'file', content };\n }\n\n let fileCid: string | null = null;\n for await (const entry of importer(singleFile(), blockstore, {\n cidVersion: 0,\n rawLeaves: false,\n wrapWithDirectory: false,\n })) {\n fileCid = entry.cid.toString();\n }\n\n if (!fileCid) {\n throw new Error('Failed to compute CID');\n }\n return fileCid;\n } finally {\n blockstore = null;\n }\n}\n\n/**\n * Compute CID for a JSON object by stringifying and encoding to UTF-8.\n */\nexport async function computeJsonCID(obj: Record<string, any>): Promise<string> {\n const json = JSON.stringify(obj);\n const encoder = new TextEncoder();\n return computeCID(encoder.encode(json));\n}\n"],"mappings":";AAOA,eAAsB,WAAW,SAAsC;AACrE,QAAM,EAAE,iBAAiB,IAAI,MAAM,OAAO,wBAAwB;AAClE,QAAM,EAAE,SAAS,IAAI,MAAM,OAAO,sBAAsB;AAExD,MAAI,aAA2D,IAAI,iBAAiB;AAEpF,MAAI;AACF,cAAU,aAAa;AACrB,YAAM,EAAE,MAAM,QAAQ,QAAQ;AAAA,IAChC;AAEA,QAAI,UAAyB;AAC7B,qBAAiB,SAAS,SAAS,WAAW,GAAG,YAAY;AAAA,MAC3D,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,mBAAmB;AAAA,IACrB,CAAC,GAAG;AACF,gBAAU,MAAM,IAAI,SAAS;AAAA,IAC/B;AAEA,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,MAAM,uBAAuB;AAAA,IACzC;AACA,WAAO;AAAA,EACT,UAAE;AACA,iBAAa;AAAA,EACf;AACF;AAKA,eAAsB,eAAe,KAA2C;AAC9E,QAAM,OAAO,KAAK,UAAU,GAAG;AAC/B,QAAM,UAAU,IAAI,YAAY;AAChC,SAAO,WAAW,QAAQ,OAAO,IAAI,CAAC;AACxC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { n as ActionDefinition, o as ActionServices } from '../setup-CahGoKeh.mjs';
|
|
2
|
+
export { q as ActionContext, r as ActionResult, h as ActivationResult, u as ActorConstraint, A as AuthorizationResult, B as BaseUcanFlow, v as CompiledBlock, w as CompiledEdge, m as CompiledFlow, x as CompiledFlowNode, C as CompilerRegistry, t as ConditionRef, E as ExecuteNodeParams, g as ExecutionContext, f as ExecutionOutcome, l as FlowCapability, F as FlowRuntimeStateManager, N as NodeActionResult, O as OutputSchemaField, R as RuntimeRef, S as SetupFlowOptions, k as SetupFlowResult, T as TTLConstraint, d as buildAuthzFromProps, b as buildFlowNodeFromBlock, p as clearRuntimeForTemplateClone, j as compileBaseUcanFlow, c as createRuntimeStateManager, e as executeNode, i as isAuthorized, a as isNodeActive, y as isRuntimeRef, s as setupFlowFromBaseUcan } from '../setup-CahGoKeh.mjs';
|
|
3
|
+
export { A as ActivationCondition, C as ClaimCollectionURI, G as CreateDelegationParams, H as CreateInvocationParams, B as CreateRootDelegationParams, s as DID, D as DelegationChainValidationResult, k as DelegationGrant, E as EvaluationStatus, y as ExecutionWithInvocationResult, z as FindProofsResult, v as FlowNode, F as FlowNodeAuthzExtension, u as FlowNodeBase, t as FlowNodeRuntimeState, w as InvocationRequest, x as InvocationResult, I as InvocationStore, L as LinkedClaim, N as NodeState, S as StoredDelegation, j as StoredInvocation, i as UcanCapability, U as UcanDelegationStore, f as UcanService, g as UcanServiceConfig, h as UcanServiceHandlers, b as createInvocationStore, d as createMemoryInvocationStore, a as createMemoryUcanDelegationStore, c as createUcanDelegationStore, e as createUcanService } from '../index-7ptWHYA8.mjs';
|
|
4
|
+
import 'yjs';
|
|
5
|
+
import 'matrix-js-sdk';
|
|
6
|
+
import '@blocknote/core';
|
|
7
|
+
import '@ixo/ucan';
|
|
8
|
+
|
|
9
|
+
declare function registerAction(definition: ActionDefinition): void;
|
|
10
|
+
declare function getAction(type: string): ActionDefinition | undefined;
|
|
11
|
+
declare function getAllActions(): ActionDefinition[];
|
|
12
|
+
declare function hasAction(type: string): boolean;
|
|
13
|
+
/** Look up an action by its UCAN `can` ability string, e.g., "bid/submit". */
|
|
14
|
+
declare function getActionByCan(can: string): ActionDefinition | undefined;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Bidirectional mapping between UCAN `can` vocabulary and registry `type` strings.
|
|
18
|
+
* Derived mechanically: strip "qi/", replace "." with "/".
|
|
19
|
+
*/
|
|
20
|
+
/** Resolve a `can` ability string to the registry `type` string. */
|
|
21
|
+
declare function canToType(can: string): string | undefined;
|
|
22
|
+
/** Resolve a registry `type` string to the `can` ability string. */
|
|
23
|
+
declare function typeToCan(type: string): string | undefined;
|
|
24
|
+
/** Get all registered can↔type mappings. */
|
|
25
|
+
declare function getAllCanMappings(): ReadonlyArray<{
|
|
26
|
+
can: string;
|
|
27
|
+
type: string;
|
|
28
|
+
}>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Builds an ActionServices map from BlocknoteHandlers.
|
|
32
|
+
* Used by block components to bridge existing DI into registry calls.
|
|
33
|
+
*
|
|
34
|
+
* The handlers parameter is typed as `any` to avoid a circular dependency
|
|
35
|
+
* between core and mantine layers — BlocknoteHandlers is defined in mantine/context.
|
|
36
|
+
*/
|
|
37
|
+
declare function buildServicesFromHandlers(handlers: any): ActionServices;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Resolve runtime references in an nb (caveats) object.
|
|
41
|
+
*
|
|
42
|
+
* At compile time, `{ "$ref": "nodeId.output.fieldPath" }` values are serialized
|
|
43
|
+
* as-is into the block's `inputs` JSON string. At execution time, this function
|
|
44
|
+
* replaces them with actual output values from upstream nodes.
|
|
45
|
+
*
|
|
46
|
+
* @param nb - The caveats object (may contain nested RuntimeRef values)
|
|
47
|
+
* @param getNodeOutput - Lookup function for upstream node outputs
|
|
48
|
+
* @returns A new object with all $ref values resolved
|
|
49
|
+
*/
|
|
50
|
+
declare function resolveRuntimeRefs(nb: Record<string, unknown>, getNodeOutput: (nodeId: string) => Record<string, unknown> | undefined): Record<string, unknown>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Compute an IPFS-compatible CID for arbitrary content.
|
|
54
|
+
* Dependencies are lazy-loaded to avoid bundling IPFS libraries
|
|
55
|
+
* into the main entry point.
|
|
56
|
+
*
|
|
57
|
+
* Uses CIDv0 with raw leaves disabled to match ixo ecosystem conventions.
|
|
58
|
+
*/
|
|
59
|
+
declare function computeCID(content: Uint8Array): Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Compute CID for a JSON object by stringifying and encoding to UTF-8.
|
|
62
|
+
*/
|
|
63
|
+
declare function computeJsonCID(obj: Record<string, any>): Promise<string>;
|
|
64
|
+
|
|
65
|
+
export { ActionDefinition, ActionServices, buildServicesFromHandlers, canToType, computeCID, computeJsonCID, getAction, getActionByCan, getAllActions, getAllCanMappings, hasAction, registerAction, resolveRuntimeRefs, typeToCan };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compileBaseUcanFlow,
|
|
3
|
+
isRuntimeRef,
|
|
4
|
+
resolveRuntimeRefs,
|
|
5
|
+
setupFlowFromBaseUcan
|
|
6
|
+
} from "../chunk-5PHI3WWK.mjs";
|
|
7
|
+
import {
|
|
8
|
+
buildAuthzFromProps,
|
|
9
|
+
buildFlowNodeFromBlock,
|
|
10
|
+
buildServicesFromHandlers,
|
|
11
|
+
canToType,
|
|
12
|
+
clearRuntimeForTemplateClone,
|
|
13
|
+
createInvocationStore,
|
|
14
|
+
createMemoryInvocationStore,
|
|
15
|
+
createMemoryUcanDelegationStore,
|
|
16
|
+
createRuntimeStateManager,
|
|
17
|
+
createUcanDelegationStore,
|
|
18
|
+
createUcanService,
|
|
19
|
+
executeNode,
|
|
20
|
+
getAction,
|
|
21
|
+
getActionByCan,
|
|
22
|
+
getAllActions,
|
|
23
|
+
getAllCanMappings,
|
|
24
|
+
hasAction,
|
|
25
|
+
isAuthorized,
|
|
26
|
+
isNodeActive,
|
|
27
|
+
registerAction,
|
|
28
|
+
typeToCan
|
|
29
|
+
} from "../chunk-77R3T42S.mjs";
|
|
30
|
+
import {
|
|
31
|
+
computeCID,
|
|
32
|
+
computeJsonCID
|
|
33
|
+
} from "../chunk-VU34HOXM.mjs";
|
|
34
|
+
export {
|
|
35
|
+
buildAuthzFromProps,
|
|
36
|
+
buildFlowNodeFromBlock,
|
|
37
|
+
buildServicesFromHandlers,
|
|
38
|
+
canToType,
|
|
39
|
+
clearRuntimeForTemplateClone,
|
|
40
|
+
compileBaseUcanFlow,
|
|
41
|
+
computeCID,
|
|
42
|
+
computeJsonCID,
|
|
43
|
+
createInvocationStore,
|
|
44
|
+
createMemoryInvocationStore,
|
|
45
|
+
createMemoryUcanDelegationStore,
|
|
46
|
+
createRuntimeStateManager,
|
|
47
|
+
createUcanDelegationStore,
|
|
48
|
+
createUcanService,
|
|
49
|
+
executeNode,
|
|
50
|
+
getAction,
|
|
51
|
+
getActionByCan,
|
|
52
|
+
getAllActions,
|
|
53
|
+
getAllCanMappings,
|
|
54
|
+
hasAction,
|
|
55
|
+
isAuthorized,
|
|
56
|
+
isNodeActive,
|
|
57
|
+
isRuntimeRef,
|
|
58
|
+
registerAction,
|
|
59
|
+
resolveRuntimeRefs,
|
|
60
|
+
setupFlowFromBaseUcan,
|
|
61
|
+
typeToCan
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|