@dxos/react-ui-canvas-compute 0.7.5-labs.5f04cf6
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/LICENSE +8 -0
- package/README.md +1 -0
- package/dist/lib/browser/index.mjs +2499 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node/index.cjs +2591 -0
- package/dist/lib/node/index.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +2499 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/types/src/compute-layout.d.ts +9 -0
- package/dist/types/src/compute-layout.d.ts.map +1 -0
- package/dist/types/src/compute.stories.d.ts +28 -0
- package/dist/types/src/compute.stories.d.ts.map +1 -0
- package/dist/types/src/graph/controller.d.ts +139 -0
- package/dist/types/src/graph/controller.d.ts.map +1 -0
- package/dist/types/src/graph/index.d.ts +3 -0
- package/dist/types/src/graph/index.d.ts.map +1 -0
- package/dist/types/src/graph/node-defs.d.ts +6 -0
- package/dist/types/src/graph/node-defs.d.ts.map +1 -0
- package/dist/types/src/hooks/compute-context.d.ts +7 -0
- package/dist/types/src/hooks/compute-context.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +4 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useComputeNodeState.d.ts +19 -0
- package/dist/types/src/hooks/useComputeNodeState.d.ts.map +1 -0
- package/dist/types/src/hooks/useGraphMonitor.d.ts +14 -0
- package/dist/types/src/hooks/useGraphMonitor.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +6 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/json.test.d.ts +21 -0
- package/dist/types/src/json.test.d.ts.map +1 -0
- package/dist/types/src/registry.d.ts +9 -0
- package/dist/types/src/registry.d.ts.map +1 -0
- package/dist/types/src/schema.test.d.ts +2 -0
- package/dist/types/src/schema.test.d.ts.map +1 -0
- package/dist/types/src/shapes/Append.d.ts +54 -0
- package/dist/types/src/shapes/Append.d.ts.map +1 -0
- package/dist/types/src/shapes/Array.d.ts +38 -0
- package/dist/types/src/shapes/Array.d.ts.map +1 -0
- package/dist/types/src/shapes/Audio.d.ts +54 -0
- package/dist/types/src/shapes/Audio.d.ts.map +1 -0
- package/dist/types/src/shapes/Beacon.d.ts +54 -0
- package/dist/types/src/shapes/Beacon.d.ts.map +1 -0
- package/dist/types/src/shapes/Boolean.d.ts +233 -0
- package/dist/types/src/shapes/Boolean.d.ts.map +1 -0
- package/dist/types/src/shapes/Chat.d.ts +57 -0
- package/dist/types/src/shapes/Chat.d.ts.map +1 -0
- package/dist/types/src/shapes/Constant.d.ts +60 -0
- package/dist/types/src/shapes/Constant.d.ts.map +1 -0
- package/dist/types/src/shapes/Database.d.ts +54 -0
- package/dist/types/src/shapes/Database.d.ts.map +1 -0
- package/dist/types/src/shapes/Function.d.ts +54 -0
- package/dist/types/src/shapes/Function.d.ts.map +1 -0
- package/dist/types/src/shapes/Gpt.d.ts +54 -0
- package/dist/types/src/shapes/Gpt.d.ts.map +1 -0
- package/dist/types/src/shapes/GptRealtime.d.ts +54 -0
- package/dist/types/src/shapes/GptRealtime.d.ts.map +1 -0
- package/dist/types/src/shapes/Json.d.ts +107 -0
- package/dist/types/src/shapes/Json.d.ts.map +1 -0
- package/dist/types/src/shapes/Logic.d.ts +109 -0
- package/dist/types/src/shapes/Logic.d.ts.map +1 -0
- package/dist/types/src/shapes/Queue.d.ts +58 -0
- package/dist/types/src/shapes/Queue.d.ts.map +1 -0
- package/dist/types/src/shapes/RNG.d.ts +58 -0
- package/dist/types/src/shapes/RNG.d.ts.map +1 -0
- package/dist/types/src/shapes/Scope.d.ts +54 -0
- package/dist/types/src/shapes/Scope.d.ts.map +1 -0
- package/dist/types/src/shapes/Surface.d.ts +54 -0
- package/dist/types/src/shapes/Surface.d.ts.map +1 -0
- package/dist/types/src/shapes/Switch.d.ts +54 -0
- package/dist/types/src/shapes/Switch.d.ts.map +1 -0
- package/dist/types/src/shapes/Table.d.ts +54 -0
- package/dist/types/src/shapes/Table.d.ts.map +1 -0
- package/dist/types/src/shapes/Template.d.ts +56 -0
- package/dist/types/src/shapes/Template.d.ts.map +1 -0
- package/dist/types/src/shapes/Text.d.ts +54 -0
- package/dist/types/src/shapes/Text.d.ts.map +1 -0
- package/dist/types/src/shapes/TextToImage.d.ts +54 -0
- package/dist/types/src/shapes/TextToImage.d.ts.map +1 -0
- package/dist/types/src/shapes/Thread.d.ts +58 -0
- package/dist/types/src/shapes/Thread.d.ts.map +1 -0
- package/dist/types/src/shapes/Trigger.d.ts +64 -0
- package/dist/types/src/shapes/Trigger.d.ts.map +1 -0
- package/dist/types/src/shapes/common/Box.d.ts +25 -0
- package/dist/types/src/shapes/common/Box.d.ts.map +1 -0
- package/dist/types/src/shapes/common/FunctionBody.d.ts +15 -0
- package/dist/types/src/shapes/common/FunctionBody.d.ts.map +1 -0
- package/dist/types/src/shapes/common/TypeSelect.d.ts +4 -0
- package/dist/types/src/shapes/common/TypeSelect.d.ts.map +1 -0
- package/dist/types/src/shapes/common/index.d.ts +4 -0
- package/dist/types/src/shapes/common/index.d.ts.map +1 -0
- package/dist/types/src/shapes/defs.d.ts +39 -0
- package/dist/types/src/shapes/defs.d.ts.map +1 -0
- package/dist/types/src/shapes/index.d.ts +27 -0
- package/dist/types/src/shapes/index.d.ts.map +1 -0
- package/dist/types/src/testing/circuits.d.ts +193 -0
- package/dist/types/src/testing/circuits.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +85 -0
- package/src/README.md +47 -0
- package/src/compute-layout.ts +37 -0
- package/src/compute.stories.tsx +362 -0
- package/src/graph/controller.ts +405 -0
- package/src/graph/index.ts +6 -0
- package/src/graph/node-defs.ts +82 -0
- package/src/hooks/compute-context.ts +19 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/useComputeNodeState.ts +83 -0
- package/src/hooks/useGraphMonitor.ts +133 -0
- package/src/index.ts +9 -0
- package/src/json.test.ts +35 -0
- package/src/registry.ts +100 -0
- package/src/schema.test.ts +62 -0
- package/src/shapes/Append.tsx +43 -0
- package/src/shapes/Array.tsx +61 -0
- package/src/shapes/Audio.tsx +55 -0
- package/src/shapes/Beacon.tsx +56 -0
- package/src/shapes/Boolean.tsx +215 -0
- package/src/shapes/Chat.tsx +77 -0
- package/src/shapes/Constant.tsx +125 -0
- package/src/shapes/Database.tsx +39 -0
- package/src/shapes/Function.tsx +40 -0
- package/src/shapes/Gpt.tsx +91 -0
- package/src/shapes/GptRealtime.tsx +168 -0
- package/src/shapes/Json.tsx +103 -0
- package/src/shapes/Logic.tsx +82 -0
- package/src/shapes/Queue.tsx +78 -0
- package/src/shapes/RNG.tsx +84 -0
- package/src/shapes/Scope.tsx +54 -0
- package/src/shapes/Surface.tsx +57 -0
- package/src/shapes/Switch.tsx +53 -0
- package/src/shapes/Table.tsx +45 -0
- package/src/shapes/Template.tsx +98 -0
- package/src/shapes/Text.tsx +56 -0
- package/src/shapes/TextToImage.tsx +39 -0
- package/src/shapes/Thread.tsx +87 -0
- package/src/shapes/Trigger.tsx +152 -0
- package/src/shapes/common/Box.tsx +74 -0
- package/src/shapes/common/FunctionBody.tsx +122 -0
- package/src/shapes/common/TypeSelect.tsx +27 -0
- package/src/shapes/common/index.ts +7 -0
- package/src/shapes/defs.ts +50 -0
- package/src/shapes/index.ts +31 -0
- package/src/testing/circuits.ts +320 -0
- package/src/testing/index.ts +5 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
3
|
+
import { type CreateShapeProps } from './defs';
|
|
4
|
+
export declare const TemplateShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly data?: any;
|
|
7
|
+
}, {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly data?: any;
|
|
10
|
+
}, never>, S.Struct<{
|
|
11
|
+
type: typeof S.String;
|
|
12
|
+
text: S.optional<typeof S.String>;
|
|
13
|
+
guide: S.optional<typeof S.Boolean>;
|
|
14
|
+
classNames: S.optional<typeof S.String>;
|
|
15
|
+
}>>, S.Struct<{
|
|
16
|
+
center: S.Struct<{
|
|
17
|
+
x: typeof S.Number;
|
|
18
|
+
y: typeof S.Number;
|
|
19
|
+
}>;
|
|
20
|
+
size: S.mutable<S.Struct<{
|
|
21
|
+
width: typeof S.Number;
|
|
22
|
+
height: typeof S.Number;
|
|
23
|
+
}>>;
|
|
24
|
+
}>>>, S.mutable<S.Struct<{
|
|
25
|
+
node: S.optional<S.SchemaClass<string, string, never>>;
|
|
26
|
+
}>>>, S.Struct<{
|
|
27
|
+
type: S.Literal<["template"]>;
|
|
28
|
+
valueType: S.optional<S.Literal<["string", "number", "boolean", "object"]>>;
|
|
29
|
+
}>>;
|
|
30
|
+
export type TemplateShape = S.Schema.Type<typeof TemplateShape>;
|
|
31
|
+
export type CreateTemplateProps = CreateShapeProps<TemplateShape> & {
|
|
32
|
+
text?: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const createTemplate: (props: CreateTemplateProps) => {
|
|
35
|
+
id: string;
|
|
36
|
+
data?: any;
|
|
37
|
+
type: string;
|
|
38
|
+
text?: string | undefined;
|
|
39
|
+
guide?: boolean | undefined;
|
|
40
|
+
classNames?: string | undefined;
|
|
41
|
+
center: {
|
|
42
|
+
readonly x: number;
|
|
43
|
+
readonly y: number;
|
|
44
|
+
};
|
|
45
|
+
size: {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
};
|
|
49
|
+
} & {
|
|
50
|
+
node?: string | undefined;
|
|
51
|
+
} & {
|
|
52
|
+
readonly type: "template";
|
|
53
|
+
readonly valueType?: "string" | "number" | "boolean" | "object" | undefined;
|
|
54
|
+
};
|
|
55
|
+
export declare const templateShape: ShapeDef<TemplateShape>;
|
|
56
|
+
//# sourceMappingURL=Template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Template.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Template.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAgB,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAEL,KAAK,QAAQ,EAId,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAO1E,eAAO,MAAM,aAAa;;;;;;;iBAyBL,EAAG,MACpB;UAAW,EAAG,QAAQ,QAAO,EAAG,MAAM;WAExC,EAEA,QAAK,QAAO,EAAG,OAAO;gBAAkB,EAAG,QAC1C,QAAO,EAAG,MAAM;;YAA8B,EAAG,MAAM;kBAE7C,EAAG,MAAM;kBACX,EAAG,MAAM;;UAAmB,EAAG,OAAO,CAAC,EAAE,MAAM;sBAGjD,EACL,MAAG;uBAED,EAAA,MAAK;;;;;;;GAlCV,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAC;AAmDhE,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF,eAAO,MAAM,cAAc,UAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAEhG,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,aAAa,CAQjD,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { S } from '@dxos/echo-schema';
|
|
3
|
+
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
4
|
+
import { type CreateShapeProps } from './defs';
|
|
5
|
+
export declare const TextShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly data?: any;
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly data?: any;
|
|
11
|
+
}, never>, S.Struct<{
|
|
12
|
+
type: typeof S.String;
|
|
13
|
+
text: S.optional<typeof S.String>;
|
|
14
|
+
guide: S.optional<typeof S.Boolean>;
|
|
15
|
+
classNames: S.optional<typeof S.String>;
|
|
16
|
+
}>>, S.Struct<{
|
|
17
|
+
center: S.Struct<{
|
|
18
|
+
x: typeof S.Number;
|
|
19
|
+
y: typeof S.Number;
|
|
20
|
+
}>;
|
|
21
|
+
size: S.mutable<S.Struct<{
|
|
22
|
+
width: typeof S.Number;
|
|
23
|
+
height: typeof S.Number;
|
|
24
|
+
}>>;
|
|
25
|
+
}>>>, S.mutable<S.Struct<{
|
|
26
|
+
node: S.optional<S.SchemaClass<string, string, never>>;
|
|
27
|
+
}>>>, S.Struct<{
|
|
28
|
+
type: S.Literal<["text"]>;
|
|
29
|
+
}>>;
|
|
30
|
+
export type TextShape = S.Schema.Type<typeof TextShape>;
|
|
31
|
+
export type CreateTextProps = CreateShapeProps<TextShape>;
|
|
32
|
+
export declare const createText: (props: CreateTextProps) => {
|
|
33
|
+
id: string;
|
|
34
|
+
data?: any;
|
|
35
|
+
type: string;
|
|
36
|
+
text?: string | undefined;
|
|
37
|
+
guide?: boolean | undefined;
|
|
38
|
+
classNames?: string | undefined;
|
|
39
|
+
center: {
|
|
40
|
+
readonly x: number;
|
|
41
|
+
readonly y: number;
|
|
42
|
+
};
|
|
43
|
+
size: {
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
node?: string | undefined;
|
|
49
|
+
} & {
|
|
50
|
+
readonly type: "text";
|
|
51
|
+
};
|
|
52
|
+
export declare const TextComponent: ({ shape }: ShapeComponentProps<TextShape>) => React.JSX.Element;
|
|
53
|
+
export declare const textShape: ShapeDef<TextShape>;
|
|
54
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Text.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAW,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIhG,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1F,eAAO,MAAM,SAAS;;;;;;;iBAgClB,EAAG,MAAM;UAAW,EAAG,QAAQ,QAAO,EAAI,MAC3C;WACD,EAAC,QAAQ,QACT,EAAG,OAAO;gBAAkB,EAC5B,QAAO,QAAO,EAAG,MAAM;;YAEvB,EAAC,MAAM;kBAAoB,EAAG,MAAM;kBAAmB,EAAG,MAAM;;UAAoB,EAAG,OAAM,CAC7F,EAAA,MAAK;sBAEE,EAAG,MAAM;uBAAwB,EAAG,MAAM;;;;;;GApClD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU,UAAW,eAAe;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAExF,eAAO,MAAM,aAAa,cAAe,mBAAmB,CAAC,SAAS,CAAC,sBAgBtE,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,SAAS,CAQzC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { S } from '@dxos/echo-schema';
|
|
3
|
+
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
4
|
+
import { type CreateShapeProps } from './defs';
|
|
5
|
+
export declare const TextToImageShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly data?: any;
|
|
8
|
+
}, {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly data?: any;
|
|
11
|
+
}, never>, S.Struct<{
|
|
12
|
+
type: typeof S.String;
|
|
13
|
+
text: S.optional<typeof S.String>;
|
|
14
|
+
guide: S.optional<typeof S.Boolean>;
|
|
15
|
+
classNames: S.optional<typeof S.String>;
|
|
16
|
+
}>>, S.Struct<{
|
|
17
|
+
center: S.Struct<{
|
|
18
|
+
x: typeof S.Number;
|
|
19
|
+
y: typeof S.Number;
|
|
20
|
+
}>;
|
|
21
|
+
size: S.mutable<S.Struct<{
|
|
22
|
+
width: typeof S.Number;
|
|
23
|
+
height: typeof S.Number;
|
|
24
|
+
}>>;
|
|
25
|
+
}>>>, S.mutable<S.Struct<{
|
|
26
|
+
node: S.optional<S.SchemaClass<string, string, never>>;
|
|
27
|
+
}>>>, S.Struct<{
|
|
28
|
+
type: S.Literal<["text-to-image"]>;
|
|
29
|
+
}>>;
|
|
30
|
+
export type TextToImageShape = S.Schema.Type<typeof TextToImageShape>;
|
|
31
|
+
export type CreateTextToImageProps = CreateShapeProps<TextToImageShape>;
|
|
32
|
+
export declare const createTextToImage: (props: CreateTextToImageProps) => {
|
|
33
|
+
id: string;
|
|
34
|
+
data?: any;
|
|
35
|
+
type: string;
|
|
36
|
+
text?: string | undefined;
|
|
37
|
+
guide?: boolean | undefined;
|
|
38
|
+
classNames?: string | undefined;
|
|
39
|
+
center: {
|
|
40
|
+
readonly x: number;
|
|
41
|
+
readonly y: number;
|
|
42
|
+
};
|
|
43
|
+
size: {
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
node?: string | undefined;
|
|
49
|
+
} & {
|
|
50
|
+
readonly type: "text-to-image";
|
|
51
|
+
};
|
|
52
|
+
export declare const TextToImageComponent: ({ shape }: ShapeComponentProps<TextToImageShape>) => React.JSX.Element;
|
|
53
|
+
export declare const textToImageShape: ShapeDef<TextToImageShape>;
|
|
54
|
+
//# sourceMappingURL=TextToImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextToImage.d.ts","sourceRoot":"","sources":["../../../../src/shapes/TextToImage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIvF,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1F,eAAO,MAAM,gBAAgB;;;;;;;iBA0BsE,EAAG,MAAM;UAAW,EAAG,QAAQ,QAAO,EAAG,MAAM;WAAa,EAAG,QAAQ,QAAO,EAAG,OAAO;gBAAkB,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAA8B,EAAG,MAAM;kBAAoB,EAAG,MAAM;kBAAmB,EAAG,MAAM;;UAAmB,EAAG,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAAwB,EAAG,MAAM;;;;;;GArB/a,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEtE,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AAExE,eAAO,MAAM,iBAAiB,UAAW,sBAAsB;;;;;;;;;;;;;;;;;;;CACuC,CAAC;AAEvG,eAAO,MAAM,oBAAoB,cAAe,mBAAmB,CAAC,gBAAgB,CAAC,sBAEpF,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAOvD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { S } from '@dxos/echo-schema';
|
|
3
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
+
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
5
|
+
import { type CreateShapeProps } from './defs';
|
|
6
|
+
export declare const ThreadShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly data?: any;
|
|
9
|
+
}, {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly data?: any;
|
|
12
|
+
}, never>, S.Struct<{
|
|
13
|
+
type: typeof S.String;
|
|
14
|
+
text: S.optional<typeof S.String>;
|
|
15
|
+
guide: S.optional<typeof S.Boolean>;
|
|
16
|
+
classNames: S.optional<typeof S.String>;
|
|
17
|
+
}>>, S.Struct<{
|
|
18
|
+
center: S.Struct<{
|
|
19
|
+
x: typeof S.Number;
|
|
20
|
+
y: typeof S.Number;
|
|
21
|
+
}>;
|
|
22
|
+
size: S.mutable<S.Struct<{
|
|
23
|
+
width: typeof S.Number;
|
|
24
|
+
height: typeof S.Number;
|
|
25
|
+
}>>;
|
|
26
|
+
}>>>, S.mutable<S.Struct<{
|
|
27
|
+
node: S.optional<S.SchemaClass<string, string, never>>;
|
|
28
|
+
}>>>, S.Struct<{
|
|
29
|
+
type: S.Literal<["thread"]>;
|
|
30
|
+
}>>;
|
|
31
|
+
export type ThreadShape = S.Schema.Type<typeof ThreadShape>;
|
|
32
|
+
export type CreateThreadProps = CreateShapeProps<ThreadShape>;
|
|
33
|
+
export declare const createThread: (props: CreateThreadProps) => {
|
|
34
|
+
id: string;
|
|
35
|
+
data?: any;
|
|
36
|
+
type: string;
|
|
37
|
+
text?: string | undefined;
|
|
38
|
+
guide?: boolean | undefined;
|
|
39
|
+
classNames?: string | undefined;
|
|
40
|
+
center: {
|
|
41
|
+
readonly x: number;
|
|
42
|
+
readonly y: number;
|
|
43
|
+
};
|
|
44
|
+
size: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
} & {
|
|
49
|
+
node?: string | undefined;
|
|
50
|
+
} & {
|
|
51
|
+
readonly type: "thread";
|
|
52
|
+
};
|
|
53
|
+
export declare const ThreadComponent: ({ shape }: ShapeComponentProps<ThreadShape>) => React.JSX.Element;
|
|
54
|
+
export declare const ThreadItem: ({ classNames, item }: ThemedClassName<{
|
|
55
|
+
item: any;
|
|
56
|
+
}>) => React.JSX.Element;
|
|
57
|
+
export declare const threadShape: ShapeDef<ThreadShape>;
|
|
58
|
+
//# sourceMappingURL=Thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thread.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Thread.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIvF,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAK1E,eAAO,MAAM,WAAW;;;;;;;iBAwBpB,EAAA,MAAK;UAAW,EACd,QAAC,QAAO,EAAG,MAAM;WAAa,EAAG,QAAQ,QAAO,EAAG,OAAO;gBAAmB,EAAE,QACjF,QAAO,EAAG,MAAM;;YACT,EAAG,MAAM;kBAAoB,EAAG,MACvC;kBACO,EACP,MAAG;;UAIA,EAAE,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAAwB,EAChF,MAAG;;;;;;GA9BJ,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;AAE9D,eAAO,MAAM,YAAY,UAAW,iBAAiB;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAE5F,eAAO,MAAM,eAAe,cAAe,mBAAmB,CAAC,WAAW,CAAC,sBAkB1E,CAAC;AAEF,eAAO,MAAM,UAAU,yBAA0B,eAAe,CAAC;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,sBAwB9E,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAQ7C,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { S } from '@dxos/echo-schema';
|
|
3
|
+
import { TriggerKind } from '@dxos/functions';
|
|
4
|
+
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
5
|
+
import { type CreateShapeProps } from './defs';
|
|
6
|
+
export declare const TriggerShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly data?: any;
|
|
9
|
+
}, {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly data?: any;
|
|
12
|
+
}, never>, S.Struct<{
|
|
13
|
+
type: typeof S.String;
|
|
14
|
+
text: S.optional<typeof S.String>;
|
|
15
|
+
guide: S.optional<typeof S.Boolean>;
|
|
16
|
+
classNames: S.optional<typeof S.String>;
|
|
17
|
+
}>>, S.Struct<{
|
|
18
|
+
center: S.Struct<{
|
|
19
|
+
x: typeof S.Number;
|
|
20
|
+
y: typeof S.Number;
|
|
21
|
+
}>;
|
|
22
|
+
size: S.mutable<S.Struct<{
|
|
23
|
+
width: typeof S.Number;
|
|
24
|
+
height: typeof S.Number;
|
|
25
|
+
}>>;
|
|
26
|
+
}>>>, S.mutable<S.Struct<{
|
|
27
|
+
node: S.optional<S.SchemaClass<string, string, never>>;
|
|
28
|
+
}>>>, S.Struct<{
|
|
29
|
+
type: S.Literal<["trigger"]>;
|
|
30
|
+
functionTrigger: S.optional<import("@dxos/echo-schema").Ref$<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
31
|
+
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
32
|
+
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
33
|
+
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
34
|
+
type: S.Literal<[TriggerKind.Timer]>;
|
|
35
|
+
cron: S.SchemaClass<string, string, never>;
|
|
36
|
+
}>>, S.mutable<S.Struct<{
|
|
37
|
+
type: S.Literal<[TriggerKind.Webhook]>;
|
|
38
|
+
method: S.optional<S.SchemaClass<string, string, never>>;
|
|
39
|
+
port: S.optional<S.SchemaClass<number, number, never>>;
|
|
40
|
+
}>>, S.mutable<S.Struct<{
|
|
41
|
+
type: S.Literal<[TriggerKind.Subscription]>;
|
|
42
|
+
filter: S.Struct<{
|
|
43
|
+
type: S.optional<S.SchemaClass<string, string, never>>;
|
|
44
|
+
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
45
|
+
}>;
|
|
46
|
+
options: S.optional<S.Struct<{
|
|
47
|
+
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
48
|
+
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
49
|
+
}>>;
|
|
50
|
+
}>>, S.mutable<S.Struct<{
|
|
51
|
+
type: S.Literal<[TriggerKind.Email]>;
|
|
52
|
+
}>>]>>;
|
|
53
|
+
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
54
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>>>;
|
|
55
|
+
}>>;
|
|
56
|
+
export type TriggerShape = S.Schema.Type<typeof TriggerShape>;
|
|
57
|
+
export type CreateTriggerProps = CreateShapeProps<Omit<TriggerShape, 'functionTrigger'>> & {
|
|
58
|
+
triggerKind?: TriggerKind;
|
|
59
|
+
};
|
|
60
|
+
export declare const createTrigger: (props: CreateTriggerProps) => TriggerShape;
|
|
61
|
+
export type TriggerComponentProps = ShapeComponentProps<TriggerShape>;
|
|
62
|
+
export declare const TriggerComponent: ({ shape }: TriggerComponentProps) => React.JSX.Element | undefined;
|
|
63
|
+
export declare const triggerShape: ShapeDef<TriggerShape>;
|
|
64
|
+
//# sourceMappingURL=Trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Trigger.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoB,MAAM,OAAO,CAAC;AASzC,OAAO,EAAO,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAKL,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGvF,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1E,eAAO,MAAM,YAAY;;;;;;;iBAgBW,EAAG,MAAM;UAAW,EAAG,QAAQ,QAEjE,EAAA,MAAM;WAAa,EAAG,QAAQ,QAC5B,EAAC,OAAO;gBACH,EAAG,QAAQ,QAAO,EAAG,MAAM;;YACjB,EAAG,MAAM;kBAAoB,EAAG,MAAM;kBAC9C,EACT,MACF;;UAEe,EAAG,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAEhD,EAAG,MAAM;;;;;;;2BA0EwB,EAAG,QACnD,CAAC,EAAE,WAAW;0BACE,EAAG,QAAQ,CAAC,EAAE,WAAW;uBAKzC,EAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM;kBACtC,EAAG,OAAO,EAAE,YACP,KAAK;kBACF,EAAG,WAAW;aACD,EAAG,OACxB,CAAC,EAAE,MAAM;kBACZ,EAAC,OAAO,EAAE,YACR,OAAE;oBAAmB,EACnB,QAAG,CAAC,EACJ,WAAI;kBACsB,EAAG,QAAQ,CAAC,EAAE,WAAW;aACrD,EACJ,OACI,CAAC,EAAE,MAAM;kBAAgB,EAAG,OAAO,EAAE,YAAY,YAAY;oBAAmB,EAAG,MAAM;sBAAoB,EAAG,QAAQ,CAAC,EAAE,WAAW;uBAA4C,EAAG,QAAQ,CAAC,EAAE,OAAO,QAAO,EAAG,MAAM,SAAQ,EAAG,GAAG;;qBAAgC,EAAG,QAAQ,CAAC,EAAE,MAAM;sBAAoB,EAAG,QAAQ,CAAC,EAAE,WAAW;uBAA8C,EAAG,QAAQ,CAAC,EAAE,WAAW;;aAA+C,EAAG,OAAO,CAAC,EAAE,MAAM;kBAAgB,EAAG,OAAO,EAAE,YAAY,KAAK;;uBAAkC,EAAG,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,QAAO,EAAG,MAAM,SAAQ,EAAG,GAAG;;GApH9lB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,GAAG;IACzF,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAG,YAWzD,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;AAEtE,eAAO,MAAM,gBAAgB,cAAe,qBAAqB,kCAiChE,CAAC;AAgDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,YAAY,CAY/C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type Shape } from '@dxos/react-ui-canvas-editor';
|
|
4
|
+
export declare const headerHeight = 32;
|
|
5
|
+
export declare const footerHeight = 32;
|
|
6
|
+
export type BoxActionHandler = (action: 'run' | 'open' | 'close') => void;
|
|
7
|
+
export type BoxProps = PropsWithChildren<ThemedClassName<{
|
|
8
|
+
shape: Shape;
|
|
9
|
+
title?: string;
|
|
10
|
+
status?: string | ReactNode;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
onAction?: BoxActionHandler;
|
|
13
|
+
}>>;
|
|
14
|
+
export declare const Box: React.ForwardRefExoticComponent<Omit<{
|
|
15
|
+
shape: Shape;
|
|
16
|
+
title?: string;
|
|
17
|
+
status?: string | ReactNode;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
onAction?: BoxActionHandler;
|
|
20
|
+
}, "className"> & {
|
|
21
|
+
classNames?: import("@dxos/react-ui").ClassNameValue;
|
|
22
|
+
} & {
|
|
23
|
+
children?: ReactNode | undefined;
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../../src/shapes/common/Box.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAc,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlF,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAG1D,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;AAE1E,MAAM,MAAM,QAAQ,GAAG,iBAAiB,CACtC,eAAe,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B,CAAC,CACH,CAAC;AAEF,eAAO,MAAM,GAAG;WARL,KAAK;YACJ,MAAM;aACL,MAAM,GAAG,SAAS;WACpB,OAAO;eACH,gBAAgB;;;;;wCAkD9B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
|
+
import { type S } from '@dxos/echo-schema';
|
|
3
|
+
import { type Polygon, type Shape } from '@dxos/react-ui-canvas-editor';
|
|
4
|
+
import { type BoxProps } from '../common';
|
|
5
|
+
export type FunctionBodyProps = {
|
|
6
|
+
shape: Shape;
|
|
7
|
+
name?: string;
|
|
8
|
+
content?: JSX.Element;
|
|
9
|
+
inputSchema?: S.Schema.Any;
|
|
10
|
+
outputSchema?: S.Schema.Any;
|
|
11
|
+
} & Pick<BoxProps, 'status'>;
|
|
12
|
+
export declare const FunctionBody: ({ shape, name, content, inputSchema, outputSchema, ...props }: FunctionBodyProps) => JSX.Element;
|
|
13
|
+
export declare const getHeight: (input: S.Schema<any>) => number;
|
|
14
|
+
export declare const createFunctionAnchors: (shape: Polygon, input?: S.Schema<any>, output?: S.Schema<any>) => Record<string, import("@dxos/react-ui-canvas-editor").Anchor>;
|
|
15
|
+
//# sourceMappingURL=FunctionBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunctionBody.d.ts","sourceRoot":"","sources":["../../../../../src/shapes/common/FunctionBody.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,GAAG,EAAoB,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAO,KAAK,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,EAAO,KAAK,QAAQ,EAA8B,MAAM,WAAW,CAAC;AAM3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;CAC7B,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE7B,eAAO,MAAM,YAAY,kEAOtB,iBAAiB,gBAwEnB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WAG7C,CAAC;AAEF,eAAO,MAAM,qBAAqB,UACzB,OAAO,UACP,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,WACZ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,kEAMtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeSelect.d.ts","sourceRoot":"","sources":["../../../../../src/shapes/common/TypeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI9D,eAAO,MAAM,UAAU,6BAA8B,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,eAAe,CAAC,sBAoBpG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shapes/common/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AST } from '@effect/schema';
|
|
2
|
+
import { S } from '@dxos/echo-schema';
|
|
3
|
+
import { Polygon } from '@dxos/react-ui-canvas-editor';
|
|
4
|
+
import { type MakeOptional } from '@dxos/util';
|
|
5
|
+
export type PropertyKind = 'input' | 'output';
|
|
6
|
+
export declare const getProperties: (ast: AST.AST) => {
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const createAnchorId: (kind: PropertyKind, property?: string) => string;
|
|
10
|
+
export declare const parseAnchorId: (id: string) => [PropertyKind | undefined, string];
|
|
11
|
+
export type CreateShapeProps<S extends Polygon> = Omit<MakeOptional<S, 'id' | 'size'>, 'type' | 'node'>;
|
|
12
|
+
export declare const ComputeShape: S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly data?: any;
|
|
15
|
+
}, {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly data?: any;
|
|
18
|
+
}, never>, S.Struct<{
|
|
19
|
+
type: typeof S.String;
|
|
20
|
+
text: S.optional<typeof S.String>;
|
|
21
|
+
guide: S.optional<typeof S.Boolean>;
|
|
22
|
+
classNames: S.optional<typeof S.String>;
|
|
23
|
+
}>>, S.Struct<{
|
|
24
|
+
center: S.Struct<{
|
|
25
|
+
x: typeof S.Number;
|
|
26
|
+
y: typeof S.Number;
|
|
27
|
+
}>;
|
|
28
|
+
size: S.mutable<S.Struct<{
|
|
29
|
+
width: typeof S.Number;
|
|
30
|
+
height: typeof S.Number;
|
|
31
|
+
}>>;
|
|
32
|
+
}>>>, S.mutable<S.Struct<{
|
|
33
|
+
node: S.optional<S.SchemaClass<string, string, never>>;
|
|
34
|
+
}>>>;
|
|
35
|
+
export type ComputeShape = S.Schema.Type<typeof ComputeShape>;
|
|
36
|
+
export declare const createShape: <S extends ComputeShape>({ id, ...rest }: CreateShapeProps<S> & {
|
|
37
|
+
type: string;
|
|
38
|
+
}) => S;
|
|
39
|
+
//# sourceMappingURL=defs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../src/shapes/defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAGrC,OAAO,EAAY,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9C,eAAO,MAAM,aAAa,QAAS,GAAG,CAAC,GAAG;;GACqC,CAAC;AAEhF,eAAO,MAAM,cAAc,SAAU,YAAY,8BACrB,CAAC;AAE7B,eAAO,MAAM,aAAa,OAAQ,MAAM,KAAG,CAAC,YAAY,GAAG,SAAS,EAAE,MAAM,CAG3E,CAAC;AAMF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAExG,eAAO,MAAM,YAAY;;;;;;;iBAU0E,EAAE,MAAM;UACzG,EAAE,QACH,QAAO,EAAG,MAAM;WAAa,EAC1B,QAAI,QACN,EAAG,OACH;gBACe,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAA8B,EAAG,MAAM;kBAAoB,EAAG,MAAM;kBAAmB,EAAG,MAAM;;UAAmB,EAAG,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAAwB,EAAG,MAAM;;;;IAVnP,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,YAAY,mBAAmB,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,CAK7G,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './common';
|
|
2
|
+
export * from './defs';
|
|
3
|
+
export * from './Array';
|
|
4
|
+
export * from './Append';
|
|
5
|
+
export * from './Audio';
|
|
6
|
+
export * from './Beacon';
|
|
7
|
+
export * from './Boolean';
|
|
8
|
+
export * from './Chat';
|
|
9
|
+
export * from './Constant';
|
|
10
|
+
export * from './Database';
|
|
11
|
+
export * from './Function';
|
|
12
|
+
export * from './Gpt';
|
|
13
|
+
export * from './Json';
|
|
14
|
+
export * from './Logic';
|
|
15
|
+
export * from './Queue';
|
|
16
|
+
export * from './RNG';
|
|
17
|
+
export * from './Scope';
|
|
18
|
+
export * from './Surface';
|
|
19
|
+
export * from './Switch';
|
|
20
|
+
export * from './Table';
|
|
21
|
+
export * from './Template';
|
|
22
|
+
export * from './Text';
|
|
23
|
+
export * from './Thread';
|
|
24
|
+
export * from './TextToImage';
|
|
25
|
+
export * from './Trigger';
|
|
26
|
+
export * from './GptRealtime';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shapes/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { CanvasGraphModel } from '@dxos/react-ui-canvas-editor';
|
|
2
|
+
import { ComputeGraphController, type Services } from '../graph';
|
|
3
|
+
import { type ComputeShape } from '../shapes';
|
|
4
|
+
export declare const createComputeGraphController: (graph?: CanvasGraphModel<ComputeShape>, services?: Partial<Services>) => {
|
|
5
|
+
controller: ComputeGraphController;
|
|
6
|
+
graph: CanvasGraphModel<{
|
|
7
|
+
id: string;
|
|
8
|
+
data?: any;
|
|
9
|
+
type: string;
|
|
10
|
+
text?: string | undefined;
|
|
11
|
+
guide?: boolean | undefined;
|
|
12
|
+
classNames?: string | undefined;
|
|
13
|
+
center: {
|
|
14
|
+
readonly x: number;
|
|
15
|
+
readonly y: number;
|
|
16
|
+
};
|
|
17
|
+
size: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
} & {
|
|
22
|
+
node?: string | undefined;
|
|
23
|
+
}> | undefined;
|
|
24
|
+
};
|
|
25
|
+
export declare const createBasicCircuit: () => CanvasGraphModel<{
|
|
26
|
+
id: string;
|
|
27
|
+
data?: any;
|
|
28
|
+
type: string;
|
|
29
|
+
text?: string | undefined;
|
|
30
|
+
guide?: boolean | undefined;
|
|
31
|
+
classNames?: string | undefined;
|
|
32
|
+
center: {
|
|
33
|
+
readonly x: number;
|
|
34
|
+
readonly y: number;
|
|
35
|
+
};
|
|
36
|
+
size: {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
};
|
|
40
|
+
} & {
|
|
41
|
+
node?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const createTransformCircuit: () => CanvasGraphModel<{
|
|
44
|
+
id: string;
|
|
45
|
+
data?: any;
|
|
46
|
+
type: string;
|
|
47
|
+
text?: string | undefined;
|
|
48
|
+
guide?: boolean | undefined;
|
|
49
|
+
classNames?: string | undefined;
|
|
50
|
+
center: {
|
|
51
|
+
readonly x: number;
|
|
52
|
+
readonly y: number;
|
|
53
|
+
};
|
|
54
|
+
size: {
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
};
|
|
58
|
+
} & {
|
|
59
|
+
node?: string | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export declare const createLogicCircuit: () => CanvasGraphModel<{
|
|
62
|
+
id: string;
|
|
63
|
+
data?: any;
|
|
64
|
+
type: string;
|
|
65
|
+
text?: string | undefined;
|
|
66
|
+
guide?: boolean | undefined;
|
|
67
|
+
classNames?: string | undefined;
|
|
68
|
+
center: {
|
|
69
|
+
readonly x: number;
|
|
70
|
+
readonly y: number;
|
|
71
|
+
};
|
|
72
|
+
size: {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
};
|
|
76
|
+
} & {
|
|
77
|
+
node?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
export declare const createControlCircuit: () => CanvasGraphModel<{
|
|
80
|
+
id: string;
|
|
81
|
+
data?: any;
|
|
82
|
+
type: string;
|
|
83
|
+
text?: string | undefined;
|
|
84
|
+
guide?: boolean | undefined;
|
|
85
|
+
classNames?: string | undefined;
|
|
86
|
+
center: {
|
|
87
|
+
readonly x: number;
|
|
88
|
+
readonly y: number;
|
|
89
|
+
};
|
|
90
|
+
size: {
|
|
91
|
+
width: number;
|
|
92
|
+
height: number;
|
|
93
|
+
};
|
|
94
|
+
} & {
|
|
95
|
+
node?: string | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
export declare const createTemplateCircuit: () => CanvasGraphModel<{
|
|
98
|
+
id: string;
|
|
99
|
+
data?: any;
|
|
100
|
+
type: string;
|
|
101
|
+
text?: string | undefined;
|
|
102
|
+
guide?: boolean | undefined;
|
|
103
|
+
classNames?: string | undefined;
|
|
104
|
+
center: {
|
|
105
|
+
readonly x: number;
|
|
106
|
+
readonly y: number;
|
|
107
|
+
};
|
|
108
|
+
size: {
|
|
109
|
+
width: number;
|
|
110
|
+
height: number;
|
|
111
|
+
};
|
|
112
|
+
} & {
|
|
113
|
+
node?: string | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
export declare const createArtifactCircuit: () => CanvasGraphModel<{
|
|
116
|
+
id: string;
|
|
117
|
+
data?: any;
|
|
118
|
+
type: string;
|
|
119
|
+
text?: string | undefined;
|
|
120
|
+
guide?: boolean | undefined;
|
|
121
|
+
classNames?: string | undefined;
|
|
122
|
+
center: {
|
|
123
|
+
readonly x: number;
|
|
124
|
+
readonly y: number;
|
|
125
|
+
};
|
|
126
|
+
size: {
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
};
|
|
130
|
+
} & {
|
|
131
|
+
node?: string | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
export declare const createGptCircuit: (options: {
|
|
134
|
+
db?: boolean;
|
|
135
|
+
cot?: boolean;
|
|
136
|
+
image?: boolean;
|
|
137
|
+
history?: boolean;
|
|
138
|
+
artifact?: boolean;
|
|
139
|
+
}) => CanvasGraphModel<{
|
|
140
|
+
id: string;
|
|
141
|
+
data?: any;
|
|
142
|
+
type: string;
|
|
143
|
+
text?: string | undefined;
|
|
144
|
+
guide?: boolean | undefined;
|
|
145
|
+
classNames?: string | undefined;
|
|
146
|
+
center: {
|
|
147
|
+
readonly x: number;
|
|
148
|
+
readonly y: number;
|
|
149
|
+
};
|
|
150
|
+
size: {
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
};
|
|
154
|
+
} & {
|
|
155
|
+
node?: string | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
export declare const createGPTRealtimeCircuit: () => CanvasGraphModel<{
|
|
158
|
+
id: string;
|
|
159
|
+
data?: any;
|
|
160
|
+
type: string;
|
|
161
|
+
text?: string | undefined;
|
|
162
|
+
guide?: boolean | undefined;
|
|
163
|
+
classNames?: string | undefined;
|
|
164
|
+
center: {
|
|
165
|
+
readonly x: number;
|
|
166
|
+
readonly y: number;
|
|
167
|
+
};
|
|
168
|
+
size: {
|
|
169
|
+
width: number;
|
|
170
|
+
height: number;
|
|
171
|
+
};
|
|
172
|
+
} & {
|
|
173
|
+
node?: string | undefined;
|
|
174
|
+
}>;
|
|
175
|
+
export declare const createAudioCircuit: () => CanvasGraphModel<{
|
|
176
|
+
id: string;
|
|
177
|
+
data?: any;
|
|
178
|
+
type: string;
|
|
179
|
+
text?: string | undefined;
|
|
180
|
+
guide?: boolean | undefined;
|
|
181
|
+
classNames?: string | undefined;
|
|
182
|
+
center: {
|
|
183
|
+
readonly x: number;
|
|
184
|
+
readonly y: number;
|
|
185
|
+
};
|
|
186
|
+
size: {
|
|
187
|
+
width: number;
|
|
188
|
+
height: number;
|
|
189
|
+
};
|
|
190
|
+
} & {
|
|
191
|
+
node?: string | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
//# sourceMappingURL=circuits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circuits.d.ts","sourceRoot":"","sources":["../../../../src/testing/circuits.ts"],"names":[],"mappings":"AAQA,OAAO,EAAyD,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEvH,OAAO,EAAE,sBAAsB,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,EACL,KAAK,YAAY,EAwBlB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,4BAA4B,WAAY,gBAAgB,CAAC,YAAY,CAAC,aAAa,OAAO,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;CAKhH,CAAC;AAMF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;EAa9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;EAiBlC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;EAmB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;EA2BhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;EAiEjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;EAqBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAAa;IACxC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;EA0DA,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;EAIpC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;EAS9B,CAAC"}
|