@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.
Files changed (149) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +1 -0
  3. package/dist/lib/browser/index.mjs +2499 -0
  4. package/dist/lib/browser/index.mjs.map +7 -0
  5. package/dist/lib/browser/meta.json +1 -0
  6. package/dist/lib/node/index.cjs +2591 -0
  7. package/dist/lib/node/index.cjs.map +7 -0
  8. package/dist/lib/node/meta.json +1 -0
  9. package/dist/lib/node-esm/index.mjs +2499 -0
  10. package/dist/lib/node-esm/index.mjs.map +7 -0
  11. package/dist/lib/node-esm/meta.json +1 -0
  12. package/dist/types/src/compute-layout.d.ts +9 -0
  13. package/dist/types/src/compute-layout.d.ts.map +1 -0
  14. package/dist/types/src/compute.stories.d.ts +28 -0
  15. package/dist/types/src/compute.stories.d.ts.map +1 -0
  16. package/dist/types/src/graph/controller.d.ts +139 -0
  17. package/dist/types/src/graph/controller.d.ts.map +1 -0
  18. package/dist/types/src/graph/index.d.ts +3 -0
  19. package/dist/types/src/graph/index.d.ts.map +1 -0
  20. package/dist/types/src/graph/node-defs.d.ts +6 -0
  21. package/dist/types/src/graph/node-defs.d.ts.map +1 -0
  22. package/dist/types/src/hooks/compute-context.d.ts +7 -0
  23. package/dist/types/src/hooks/compute-context.d.ts.map +1 -0
  24. package/dist/types/src/hooks/index.d.ts +4 -0
  25. package/dist/types/src/hooks/index.d.ts.map +1 -0
  26. package/dist/types/src/hooks/useComputeNodeState.d.ts +19 -0
  27. package/dist/types/src/hooks/useComputeNodeState.d.ts.map +1 -0
  28. package/dist/types/src/hooks/useGraphMonitor.d.ts +14 -0
  29. package/dist/types/src/hooks/useGraphMonitor.d.ts.map +1 -0
  30. package/dist/types/src/index.d.ts +6 -0
  31. package/dist/types/src/index.d.ts.map +1 -0
  32. package/dist/types/src/json.test.d.ts +21 -0
  33. package/dist/types/src/json.test.d.ts.map +1 -0
  34. package/dist/types/src/registry.d.ts +9 -0
  35. package/dist/types/src/registry.d.ts.map +1 -0
  36. package/dist/types/src/schema.test.d.ts +2 -0
  37. package/dist/types/src/schema.test.d.ts.map +1 -0
  38. package/dist/types/src/shapes/Append.d.ts +54 -0
  39. package/dist/types/src/shapes/Append.d.ts.map +1 -0
  40. package/dist/types/src/shapes/Array.d.ts +38 -0
  41. package/dist/types/src/shapes/Array.d.ts.map +1 -0
  42. package/dist/types/src/shapes/Audio.d.ts +54 -0
  43. package/dist/types/src/shapes/Audio.d.ts.map +1 -0
  44. package/dist/types/src/shapes/Beacon.d.ts +54 -0
  45. package/dist/types/src/shapes/Beacon.d.ts.map +1 -0
  46. package/dist/types/src/shapes/Boolean.d.ts +233 -0
  47. package/dist/types/src/shapes/Boolean.d.ts.map +1 -0
  48. package/dist/types/src/shapes/Chat.d.ts +57 -0
  49. package/dist/types/src/shapes/Chat.d.ts.map +1 -0
  50. package/dist/types/src/shapes/Constant.d.ts +60 -0
  51. package/dist/types/src/shapes/Constant.d.ts.map +1 -0
  52. package/dist/types/src/shapes/Database.d.ts +54 -0
  53. package/dist/types/src/shapes/Database.d.ts.map +1 -0
  54. package/dist/types/src/shapes/Function.d.ts +54 -0
  55. package/dist/types/src/shapes/Function.d.ts.map +1 -0
  56. package/dist/types/src/shapes/Gpt.d.ts +54 -0
  57. package/dist/types/src/shapes/Gpt.d.ts.map +1 -0
  58. package/dist/types/src/shapes/GptRealtime.d.ts +54 -0
  59. package/dist/types/src/shapes/GptRealtime.d.ts.map +1 -0
  60. package/dist/types/src/shapes/Json.d.ts +107 -0
  61. package/dist/types/src/shapes/Json.d.ts.map +1 -0
  62. package/dist/types/src/shapes/Logic.d.ts +109 -0
  63. package/dist/types/src/shapes/Logic.d.ts.map +1 -0
  64. package/dist/types/src/shapes/Queue.d.ts +58 -0
  65. package/dist/types/src/shapes/Queue.d.ts.map +1 -0
  66. package/dist/types/src/shapes/RNG.d.ts +58 -0
  67. package/dist/types/src/shapes/RNG.d.ts.map +1 -0
  68. package/dist/types/src/shapes/Scope.d.ts +54 -0
  69. package/dist/types/src/shapes/Scope.d.ts.map +1 -0
  70. package/dist/types/src/shapes/Surface.d.ts +54 -0
  71. package/dist/types/src/shapes/Surface.d.ts.map +1 -0
  72. package/dist/types/src/shapes/Switch.d.ts +54 -0
  73. package/dist/types/src/shapes/Switch.d.ts.map +1 -0
  74. package/dist/types/src/shapes/Table.d.ts +54 -0
  75. package/dist/types/src/shapes/Table.d.ts.map +1 -0
  76. package/dist/types/src/shapes/Template.d.ts +56 -0
  77. package/dist/types/src/shapes/Template.d.ts.map +1 -0
  78. package/dist/types/src/shapes/Text.d.ts +54 -0
  79. package/dist/types/src/shapes/Text.d.ts.map +1 -0
  80. package/dist/types/src/shapes/TextToImage.d.ts +54 -0
  81. package/dist/types/src/shapes/TextToImage.d.ts.map +1 -0
  82. package/dist/types/src/shapes/Thread.d.ts +58 -0
  83. package/dist/types/src/shapes/Thread.d.ts.map +1 -0
  84. package/dist/types/src/shapes/Trigger.d.ts +64 -0
  85. package/dist/types/src/shapes/Trigger.d.ts.map +1 -0
  86. package/dist/types/src/shapes/common/Box.d.ts +25 -0
  87. package/dist/types/src/shapes/common/Box.d.ts.map +1 -0
  88. package/dist/types/src/shapes/common/FunctionBody.d.ts +15 -0
  89. package/dist/types/src/shapes/common/FunctionBody.d.ts.map +1 -0
  90. package/dist/types/src/shapes/common/TypeSelect.d.ts +4 -0
  91. package/dist/types/src/shapes/common/TypeSelect.d.ts.map +1 -0
  92. package/dist/types/src/shapes/common/index.d.ts +4 -0
  93. package/dist/types/src/shapes/common/index.d.ts.map +1 -0
  94. package/dist/types/src/shapes/defs.d.ts +39 -0
  95. package/dist/types/src/shapes/defs.d.ts.map +1 -0
  96. package/dist/types/src/shapes/index.d.ts +27 -0
  97. package/dist/types/src/shapes/index.d.ts.map +1 -0
  98. package/dist/types/src/testing/circuits.d.ts +193 -0
  99. package/dist/types/src/testing/circuits.d.ts.map +1 -0
  100. package/dist/types/src/testing/index.d.ts +2 -0
  101. package/dist/types/src/testing/index.d.ts.map +1 -0
  102. package/dist/types/tsconfig.tsbuildinfo +1 -0
  103. package/package.json +85 -0
  104. package/src/README.md +47 -0
  105. package/src/compute-layout.ts +37 -0
  106. package/src/compute.stories.tsx +362 -0
  107. package/src/graph/controller.ts +405 -0
  108. package/src/graph/index.ts +6 -0
  109. package/src/graph/node-defs.ts +82 -0
  110. package/src/hooks/compute-context.ts +19 -0
  111. package/src/hooks/index.ts +7 -0
  112. package/src/hooks/useComputeNodeState.ts +83 -0
  113. package/src/hooks/useGraphMonitor.ts +133 -0
  114. package/src/index.ts +9 -0
  115. package/src/json.test.ts +35 -0
  116. package/src/registry.ts +100 -0
  117. package/src/schema.test.ts +62 -0
  118. package/src/shapes/Append.tsx +43 -0
  119. package/src/shapes/Array.tsx +61 -0
  120. package/src/shapes/Audio.tsx +55 -0
  121. package/src/shapes/Beacon.tsx +56 -0
  122. package/src/shapes/Boolean.tsx +215 -0
  123. package/src/shapes/Chat.tsx +77 -0
  124. package/src/shapes/Constant.tsx +125 -0
  125. package/src/shapes/Database.tsx +39 -0
  126. package/src/shapes/Function.tsx +40 -0
  127. package/src/shapes/Gpt.tsx +91 -0
  128. package/src/shapes/GptRealtime.tsx +168 -0
  129. package/src/shapes/Json.tsx +103 -0
  130. package/src/shapes/Logic.tsx +82 -0
  131. package/src/shapes/Queue.tsx +78 -0
  132. package/src/shapes/RNG.tsx +84 -0
  133. package/src/shapes/Scope.tsx +54 -0
  134. package/src/shapes/Surface.tsx +57 -0
  135. package/src/shapes/Switch.tsx +53 -0
  136. package/src/shapes/Table.tsx +45 -0
  137. package/src/shapes/Template.tsx +98 -0
  138. package/src/shapes/Text.tsx +56 -0
  139. package/src/shapes/TextToImage.tsx +39 -0
  140. package/src/shapes/Thread.tsx +87 -0
  141. package/src/shapes/Trigger.tsx +152 -0
  142. package/src/shapes/common/Box.tsx +74 -0
  143. package/src/shapes/common/FunctionBody.tsx +122 -0
  144. package/src/shapes/common/TypeSelect.tsx +27 -0
  145. package/src/shapes/common/index.ts +7 -0
  146. package/src/shapes/defs.ts +50 -0
  147. package/src/shapes/index.ts +31 -0
  148. package/src/testing/circuits.ts +320 -0
  149. package/src/testing/index.ts +5 -0
@@ -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 GptRealtimeShape: 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<["gpt-realtime"]>;
29
+ }>>;
30
+ export type GptRealtimeShape = S.Schema.Type<typeof GptRealtimeShape>;
31
+ export type CreateGptRealtimeProps = CreateShapeProps<GptRealtimeShape>;
32
+ export declare const createGptRealtime: (props: CreateGptRealtimeProps) => {
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: "gpt-realtime";
51
+ };
52
+ export declare const GptRealtimeComponent: ({ shape }: ShapeComponentProps<GptRealtimeShape>) => React.JSX.Element;
53
+ export declare const gptRealtimeShape: ShapeDef<GptRealtimeShape>;
54
+ //# sourceMappingURL=GptRealtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GptRealtime.d.ts","sourceRoot":"","sources":["../../../../src/shapes/GptRealtime.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGvF,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1E,eAAO,MAAM,gBAAgB;;;;;;;iBA6BjB,EAAG,MAAM;UAAW,EAAG,QAC9B,QAAO,EAAG,MAAM;WAAa,EAAG,QAC/B,QAAO,EAAG,OAAO;gBAAkB,EACjC,QAAD,QAAO,EAAG,MAAM;;YACf,EAAA,MAAK;kBACN,EAGD,MADA;kBAAmB,EAAG,MACzB;;UAAmB,EAAG,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAE1D,EAAG,MAAM;;;;;;GAlCxB,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,sBAwHpF,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAgBvD,CAAC"}
@@ -0,0 +1,107 @@
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 JsonShape: 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<["json"]>;
29
+ }>>;
30
+ export type JsonShape = S.Schema.Type<typeof JsonShape>;
31
+ export declare const JsonTransformShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
32
+ readonly id: string;
33
+ readonly data?: any;
34
+ }, {
35
+ readonly id: string;
36
+ readonly data?: any;
37
+ }, never>, S.Struct<{
38
+ type: typeof S.String;
39
+ text: S.optional<typeof S.String>;
40
+ guide: S.optional<typeof S.Boolean>;
41
+ classNames: S.optional<typeof S.String>;
42
+ }>>, S.Struct<{
43
+ center: S.Struct<{
44
+ x: typeof S.Number;
45
+ y: typeof S.Number;
46
+ }>;
47
+ size: S.mutable<S.Struct<{
48
+ width: typeof S.Number;
49
+ height: typeof S.Number;
50
+ }>>;
51
+ }>>>, S.mutable<S.Struct<{
52
+ node: S.optional<S.SchemaClass<string, string, never>>;
53
+ }>>>, S.Struct<{
54
+ type: S.Literal<["json-transform"]>;
55
+ }>>;
56
+ export type JsonTransformShape = S.Schema.Type<typeof JsonTransformShape>;
57
+ export type JsonComponentProps = ShapeComponentProps<JsonShape>;
58
+ export declare const JsonComponent: ({ shape, ...props }: JsonComponentProps) => React.JSX.Element;
59
+ export type JsonTransformComponentProps = ShapeComponentProps<JsonTransformShape>;
60
+ export declare const JsonTransformComponent: ({ shape, ...props }: JsonTransformComponentProps) => React.JSX.Element;
61
+ export type CreateJsonProps = CreateShapeProps<JsonShape>;
62
+ export declare const createJson: (props: CreateJsonProps) => {
63
+ id: string;
64
+ data?: any;
65
+ type: string;
66
+ text?: string | undefined;
67
+ guide?: boolean | undefined;
68
+ classNames?: string | undefined;
69
+ center: {
70
+ readonly x: number;
71
+ readonly y: number;
72
+ };
73
+ size: {
74
+ width: number;
75
+ height: number;
76
+ };
77
+ } & {
78
+ node?: string | undefined;
79
+ } & {
80
+ readonly type: "json";
81
+ };
82
+ export declare const jsonShape: ShapeDef<JsonShape>;
83
+ export type CreateJsonTransformProps = CreateShapeProps<JsonTransformShape> & {
84
+ expression?: string;
85
+ };
86
+ export declare const createJsonTransform: (props: CreateJsonTransformProps) => {
87
+ id: string;
88
+ data?: any;
89
+ type: string;
90
+ text?: string | undefined;
91
+ guide?: boolean | undefined;
92
+ classNames?: string | undefined;
93
+ center: {
94
+ readonly x: number;
95
+ readonly y: number;
96
+ };
97
+ size: {
98
+ width: number;
99
+ height: number;
100
+ };
101
+ } & {
102
+ node?: string | undefined;
103
+ } & {
104
+ readonly type: "json-transform";
105
+ };
106
+ export declare const jsonTransformShape: ShapeDef<JsonTransformShape>;
107
+ //# sourceMappingURL=Json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Json.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Json.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAKvF,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAO1F,eAAO,MAAM,SAAS;;;;;;;iBA+BhB,EAAA,MAAE;UAAW,EAAG,QAAQ,QAAO,EAAG,MAAM;WAC1C,EAAG,QACH,QAGF,EAAG,OAAO;gBAAkB,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAEtD,EAAI,MAAK;kBAAoB,EAAI,MAAK;kBAAmB,EAAG,MAAM;;UAAoB,EAAG,OACxF,CAAC,EAAE,MAAM;sBAGZ,EACA,MAAM;uBAGY,EAAG,MAAM;;;;;;GAzC3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC;AAExD,eAAO,MAAM,kBAAkB;;;;;;;iBAsBzB,EAAA,MAAE;UAAW,EAAG,QAAQ,QAAO,EAAG,MAAM;WAC1C,EAAG,QACH,QAGF,EAAG,OAAO;gBAAkB,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAEtD,EAAI,MAAK;kBAAoB,EAAI,MAAK;kBAAmB,EAAG,MAAM;;UAAoB,EAAG,OACxF,CAAC,EAAE,MAAM;sBAGZ,EACA,MAAM;uBAGY,EAAG,MAAM;;;;;;GAhC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM1E,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,wBAAyB,kBAAkB,sBAUpE,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;AAElF,eAAO,MAAM,sBAAsB,wBAAyB,2BAA2B,sBAEtF,CAAC;AAMF,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU,UAAW,eAAe;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAExF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,SAAS,CAYzC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtG,eAAO,MAAM,mBAAmB,UAAW,wBAAwB;;;;;;;;;;;;;;;;;;;CAK/D,CAAC;AAEL,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,CAQ3D,CAAC"}
@@ -0,0 +1,109 @@
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 IfShape: 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<["if"]>;
29
+ }>>;
30
+ export type IfShape = S.Schema.Type<typeof IfShape>;
31
+ export declare const IfElseShape: S.extend<S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
32
+ readonly id: string;
33
+ readonly data?: any;
34
+ }, {
35
+ readonly id: string;
36
+ readonly data?: any;
37
+ }, never>, S.Struct<{
38
+ type: typeof S.String;
39
+ text: S.optional<typeof S.String>;
40
+ guide: S.optional<typeof S.Boolean>;
41
+ classNames: S.optional<typeof S.String>;
42
+ }>>, S.Struct<{
43
+ center: S.Struct<{
44
+ x: typeof S.Number;
45
+ y: typeof S.Number;
46
+ }>;
47
+ size: S.mutable<S.Struct<{
48
+ width: typeof S.Number;
49
+ height: typeof S.Number;
50
+ }>>;
51
+ }>>>, S.mutable<S.Struct<{
52
+ node: S.optional<S.SchemaClass<string, string, never>>;
53
+ }>>>, S.Struct<{
54
+ type: S.Literal<["if-else"]>;
55
+ }>>;
56
+ export type IfElseShape = S.Schema.Type<typeof IfElseShape>;
57
+ export type IfComponentProps = ShapeComponentProps<IfShape>;
58
+ export declare const IfComponent: ({ shape, ...props }: IfComponentProps) => React.JSX.Element;
59
+ export type IfElseComponentProps = ShapeComponentProps<IfElseShape>;
60
+ export declare const IfElseComponent: ({ shape, ...props }: IfElseComponentProps) => React.JSX.Element;
61
+ export type CreateIfProps = CreateShapeProps<IfShape> & {
62
+ if?: string;
63
+ };
64
+ export declare const createIf: (props: CreateIfProps) => {
65
+ id: string;
66
+ data?: any;
67
+ type: string;
68
+ text?: string | undefined;
69
+ guide?: boolean | undefined;
70
+ classNames?: string | undefined;
71
+ center: {
72
+ readonly x: number;
73
+ readonly y: number;
74
+ };
75
+ size: {
76
+ width: number;
77
+ height: number;
78
+ };
79
+ } & {
80
+ node?: string | undefined;
81
+ } & {
82
+ readonly type: "if";
83
+ };
84
+ export declare const ifShape: ShapeDef<IfShape>;
85
+ export type CreateIfElseProps = CreateShapeProps<IfShape> & {
86
+ if?: string;
87
+ };
88
+ export declare const createIfElse: (props: CreateIfElseProps) => {
89
+ id: string;
90
+ data?: any;
91
+ type: string;
92
+ text?: string | undefined;
93
+ guide?: boolean | undefined;
94
+ classNames?: string | undefined;
95
+ center: {
96
+ readonly x: number;
97
+ readonly y: number;
98
+ };
99
+ size: {
100
+ width: number;
101
+ height: number;
102
+ };
103
+ } & {
104
+ node?: string | undefined;
105
+ } & {
106
+ readonly type: "if-else";
107
+ };
108
+ export declare const ifElseShape: ShapeDef<IfElseShape>;
109
+ //# sourceMappingURL=Logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logic.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Logic.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGvF,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAM1E,eAAO,MAAM,OAAO;;;;;;;iBAwCjB,EAAI,MAAK;UAAY,EAAE,QAAQ,QAAO,EAAG,MAC5C;WAAa,EAAG,QAAQ,QAAO,EAAG,OAAO;gBAAkB,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAEvE,EAAG,MAAM;kBACtB,EAAC,MAAM;kBAEP,EAAC,MAAM;;UAAmB,EAAG,OAC9B,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAC5B,EAAG,MAAM;;;;;;GA3CvB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,CAAC;AAEpD,eAAO,MAAM,WAAW;;;;;;;iBA+BrB,EAAI,MAAK;UAAY,EAAE,QAAQ,QAAO,EAAG,MAC5C;WAAa,EAAG,QAAQ,QAAO,EAAG,OAAO;gBAAkB,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAEvE,EAAG,MAAM;kBACtB,EAAC,MAAM;kBAEP,EAAC,MAAM;;UAAmB,EAAG,OAC9B,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAC5B,EAAG,MAAM;;;;;;GAlCvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAM5D,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW,wBAAyB,gBAAgB,sBAEhE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe,wBAAyB,oBAAoB,sBAExE,CAAC;AAMF,MAAM,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,eAAO,MAAM,QAAQ,UAAW,aAAa;;;;;;;;;;;;;;;;;;;CACqD,CAAC;AAEnG,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,CAOrC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E,eAAO,MAAM,YAAY,UAAW,iBAAiB;;;;;;;;;;;;;;;;;;;CAC0D,CAAC;AAEhH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAO7C,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 QueueShape: 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<["queue"]>;
30
+ }>>;
31
+ export type QueueShape = S.Schema.Type<typeof QueueShape>;
32
+ export type CreateQueueProps = CreateShapeProps<QueueShape>;
33
+ export declare const createQueue: (props: CreateQueueProps) => {
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: "queue";
52
+ };
53
+ export declare const QueueComponent: ({ shape }: ShapeComponentProps<QueueShape>) => React.JSX.Element;
54
+ export declare const QueueItem: ({ classNames, item }: ThemedClassName<{
55
+ item: any;
56
+ }>) => React.JSX.Element;
57
+ export declare const queueShape: ShapeDef<QueueShape>;
58
+ //# sourceMappingURL=Queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Queue.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,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;AAKvF,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1E,eAAO,MAAM,UAAU;;;;;;;iBAwBrB,EAAA,MAAK;UACA,EAAG,QAAQ,QAAO,EAAG,MAAM;WAAc,EAAE,QAAQ,QAAO,EAAG,OAAO;gBAC/D,EAAG,QAAQ,QAAO,EAAG,MAAM;;YAA+B,EAAE,MAAM;kBACrE,EAAG,MAAM;kBAAmB,EAC3B,MAAH;;UAAmB,EAAG,OAAO,CAAC,EAAE,MAAM;sBACrC,EAAA,MACR;uBAEE,EAAC,MAGH;;;;;;GA9BC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW,UAAW,gBAAgB;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAE1F,eAAO,MAAM,cAAc,cAAe,mBAAmB,CAAC,UAAU,CAAC,sBAmBxE,CAAC;AAEF,eAAO,MAAM,SAAS,yBAA0B,eAAe,CAAC;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,sBAe7E,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,UAAU,CAQ3C,CAAC"}
@@ -0,0 +1,58 @@
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 RandomShape: 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<["rng"]>;
29
+ min: S.optional<typeof S.Number>;
30
+ max: S.optional<typeof S.Number>;
31
+ }>>;
32
+ export type RandomShape = S.Schema.Type<typeof RandomShape>;
33
+ export type CreateRandomProps = CreateShapeProps<RandomShape>;
34
+ export declare const createRandom: (props: CreateRandomProps) => {
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: "rng";
53
+ readonly max?: number | undefined;
54
+ readonly min?: number | undefined;
55
+ };
56
+ export declare const RandomComponent: ({ shape }: ShapeComponentProps<RandomShape>) => React.JSX.Element;
57
+ export declare const randomShape: ShapeDef<RandomShape>;
58
+ //# sourceMappingURL=RNG.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNG.d.ts","sourceRoot":"","sources":["../../../../src/shapes/RNG.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAmB,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxG,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1F,eAAO,MAAM,WAAW;;;;;;;iBA6BX,EAAG,MAAM;UAAW,EAAG,QAAQ,QAE1C,EAAC,MAAM;WAAa,EAAI,QAAO,QAAO,EACtC,OAAK;gBAAmB,EAAE,QAAQ,QAAO,EAAG,MAC1C;;YACW,EACT,MAAA;kBAGD,EAAG,MAAM;kBAAmB,EAAG,MAAM;;UACtC,EAAC,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAChC,EAAG,MAAM;;;;;;;;GAjC9B,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;;;;;;;;;;;;;;;;;;;;;CACiC,CAAC;AAcvF,eAAO,MAAM,eAAe,cAAe,mBAAmB,CAAC,WAAW,CAAC,sBA+B1E,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAO7C,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 ScopeShape: 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<["scope"]>;
29
+ }>>;
30
+ export type ScopeShape = S.Schema.Type<typeof ScopeShape>;
31
+ export type CreateScopeProps = CreateShapeProps<ScopeShape>;
32
+ export declare const createScope: (props: CreateScopeProps) => {
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: "scope";
51
+ };
52
+ export declare const ScopeComponent: ({ shape }: ShapeComponentProps<ScopeShape>) => React.JSX.Element;
53
+ export declare const scopeShape: ShapeDef<ScopeShape>;
54
+ //# sourceMappingURL=Scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Scope.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAmB,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxG,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1F,eAAO,MAAM,UAAU;;;;;;;iBA2BmC,EAAI,MAAK;UAAW,EAAG,QAAQ,QAAO,EAAG,MACnG;WACE,EACF,QAEI,QAAO,EAAG,OAAO;gBAAkB,EAAG,QAC1C,QAAQ,EAAE,MAAM;;YAEJ,EAAG,MAAM;kBACb,EAAG,MAAM;kBACV,EAAG,MAAM;;UACT,EAAG,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAAwB,EAAG,MAAM;;;;;;GAjC3F,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW,UAAW,gBAAgB;;;;;;;;;;;;;;;;;;;CAM/C,CAAC;AAEL,eAAO,MAAM,cAAc,cAAe,mBAAmB,CAAC,UAAU,CAAC,sBAWxE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,UAAU,CAO3C,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 SurfaceShape: 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<["surface"]>;
29
+ }>>;
30
+ export type SurfaceShape = S.Schema.Type<typeof SurfaceShape>;
31
+ export type CreateSurfaceProps = CreateShapeProps<SurfaceShape>;
32
+ export declare const createSurface: (props: CreateSurfaceProps) => {
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: "surface";
51
+ };
52
+ export declare const SurfaceComponent: ({ shape }: ShapeComponentProps<SurfaceShape>) => React.JSX.Element;
53
+ export declare const surfaceShape: ShapeDef<SurfaceShape>;
54
+ //# sourceMappingURL=Surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Surface.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,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;AAG1F,eAAO,MAAM,YAAY;;;;;;;iBA0BE,EAAG,MAAM;UAC9B,EAAA,QAAI,QAAO,EAAG,MAAM;WAAa,EAAG,QAAQ,QAAO,EAAI,OAAM;gBAC/D,EAAA,QACH,QAGD,EAAE,MAAM;;YAA8B,EAAG,MAAM;kBAClC,EAAG,MACb;kBACA,EAAG,MAAM;;UAAmB,EAAG,OAC/B,CAAC,EAAE,MAAM;sBACP,EAAG,MAAM;uBACN,EAAG,MAAM;;;;;;GAjChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,UAAW,kBAAkB;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAE9F,eAAO,MAAM,gBAAgB,cAAe,mBAAmB,CAAC,YAAY,CAAC,sBAgB5E,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,YAAY,CAQ/C,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 SwitchShape: 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<["switch"]>;
29
+ }>>;
30
+ export type SwitchShape = S.Schema.Type<typeof SwitchShape>;
31
+ export type CreateSwitchProps = CreateShapeProps<SwitchShape>;
32
+ export declare const createSwitch: (props: CreateSwitchProps) => {
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: "switch";
51
+ };
52
+ export declare const SwitchComponent: ({ shape }: ShapeComponentProps<SwitchShape>) => React.JSX.Element;
53
+ export declare const switchShape: ShapeDef<SwitchShape>;
54
+ //# sourceMappingURL=Switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Switch.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAEtC,OAAO,EAAmB,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExG,OAAO,EAA6C,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1F,eAAO,MAAM,WAAW;;;;;;;iBAyB0C,EAAG,MAAM;UACrE,EAAA,QAAK,QAAO,EACd,MAAG;WAIP,EAAG,QAAQ,QAAO,EAAG,OAAO;gBAAkB,EAAI,QAC7C,QAAO,EAAG,MACZ;;YACY,EAAG,MAAM;kBAChB,EAAG,MAAM;kBACX,EAAG,MAAM;;UACV,EAAG,OAAO,CAAC,EAAE,MAAM;sBAAwB,EAAG,MAAM;uBAAwB,EAAG,MAAM;;;;;;GAhCzF,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;;;;;;;;;;;;;;;;;;;CACoC,CAAC;AAG1F,eAAO,MAAM,eAAe,cAAe,mBAAmB,CAAC,WAAW,CAAC,sBAc1E,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAO7C,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 TableShape: 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<["table"]>;
29
+ }>>;
30
+ export type TableShape = S.Schema.Type<typeof TableShape>;
31
+ export type CreateTableProps = CreateShapeProps<TableShape>;
32
+ export declare const createTable: (props: CreateTableProps) => {
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: "table";
51
+ };
52
+ export declare const TableComponent: ({ shape }: ShapeComponentProps<TableShape>) => React.JSX.Element;
53
+ export declare const tableShape: ShapeDef<TableShape>;
54
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/shapes/Table.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGvF,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAK1E,eAAO,MAAM,UAAU;;;;;;;iBA6BtB,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;;;;;;GAxB7U,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW,UAAW,gBAAgB;;;;;;;;;;;;;;;;;;;CACsC,CAAC;AAE1F,eAAO,MAAM,cAAc,cAAe,mBAAmB,CAAC,UAAU,CAAC,sBAIxE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,UAAU,CAQ3C,CAAC"}